m5l.eu is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.
This server runs the snac software and there is no automatic sign-up process.
sudo mkdir -p /etc/apt/keyrings
sudo curl -L -o /etc/apt/keyrings/ntfy.gpg https://archive.ntfy.sh/apt/keyring.gpg
sudo apt install apt-transport-https
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/ntfy.gpg] https://archive.ntfy.sh/apt stable main" \
| sudo tee /etc/apt/sources.list.d/ntfy.list
sudo apt update
sudo apt install ntfy
sudo systemctl enable ntfy
sudo systemctl start ntfy
#ntfy #notifications #programming #Android #Linux #sh #bash #csh #ksh #zsh #fish #curl #http #javascript #golang #powershell #python #php #technology #OpenSource #POSIX
ntfy
Today I read the brief synopsis of ntfy Android. I saw there that via linux the control and operation is fairly simple & straightforward
I went to the site and started reading.
sh
curl -d "Backup successful 😀" ntfy.sh/mytopic
a.out
ntfy publish mytopic
"Backup successful 😀"
HTML
POST /mytopic HTTP/1.1
Host: ntfy.sh
Backup successful 😀
javascript
fetch('https://ntfy.sh/mytopic', {
method: 'POST', // PUT works too
body: 'Backup successful 😀'
})
golang
http.Post("https://ntfy.sh/mytopic", "text/plain",
strings.NewReader("Backup successful 😀"))
python
requests.post("https://ntfy.sh/mytopic",
data="Backup successful 😀".encode(encoding='utf-8'))
php
file_get_contents('https://ntfy.sh/mytopic', false, stream_context_create([
'http' => [
'method' => 'POST', // PUT also works
'header' => 'Content-Type: text/plain',
'content' => 'Backup successful 😀'
]
]));
Markdown formatting¶
You can format messages using Markdown 🤩. That means you can use bold text, italicized text, links, images, and more. Supported Markdown features (web app only for now):
Emphasis such as bold (bold), italics (italics)
Links (some tool)
Images ()
Code blocks (code blocks) and inline code (inline code)
Headings (# headings, ## headings, etc.)
Lists (- lists, 1. lists, etc.)
Blockquotes (> blockquotes)
Horizontal rules (---)
Read more on
https://docs.ntfy.sh/publish/#markdown-formatting
Sources:
https://docs.ntfy.sh/publish/#markdown-formatting
#ntfy #notifications #programming #Android #Linux #sh #bash #csh #ksh #zsh #fish #curl #http #javascript #golang #powershell #python #php #technology #OpenSource #POSIX
It's important to learn to use libraries properly
Use local docs or use online docs , elevate your programming skills
Ever since I learned of the existence of matplotlib I knew I had another nice task set to have fun programming & keep me busy for a nice while
import matplotlib.pyplot as plt
import numpy as npplt.style.use('_mpl-gallery')
# make data
x = np.linspace(0, 10, 100)
y = 4 + 1 * np.sin(2 * x)
x2 = np.linspace(0, 10, 25)
y2 = 4 + 1 * np.sin(2 * x2)
# plot
fig, ax = plt.subplots()
ax.plot(x2, y2 + 2.5, 'x', markeredgewidth=2)
ax.plot(x, y, linewidth=2.0)
ax.plot(x2, y2 - 2.5, 'o-', linewidth=2)
ax.set(xlim=(0, 8), xticks=np.arange(1, 8),
ylim=(0, 8), yticks=np.arange(1, 8))
plt.show()
A gorgeous mathematical function is plotted when you run the program. I don't want to make screencaps now, use the link to see the output I got.
I use the featherweight geany on the SBC Pi5, you choose which IDE you like.
Yes vim is a superb source code editor. The syntax highlighting is sublime!
Sources
https://matplotlib.org/stable/plot_types/index.html
https://matplotlib.org/stable/plot_types/basic/plot.html
#python #programming #python #libraries #matplotlib #API #mathematics #SBC #Pi5 #arm #arm64 #x86 #Linux #OpenSource
RE: https://mastodon.social/@dzwiedziu/115570876140855775
Sooo, remember my most boosted post of #wrapstodon 2025?
I'm still unemployed, now facing moving out of France by the end of April.
Recap: jack of all trades #Linux sysadmin, with broad, 10y+ experience in system and applications administration. Preferred location would be #Strasbourg or fully remote or as a mentee for #freelance with #ADHD.
(Please clap, I mean boost 🔁)
Ich würde gerne mal "KI"-Unterstützung beim Schreiben von Python-Scripten ausprobieren, dabei aber ungern auf die großen, bekannten LLMs setzten. Gibt's da etwas, das (zumindest einigermaßen) dem FLOSS-Gedanken folgt und das man unter Linux lokal laufen lassen kann? Und brauchbare Ergebnisse liefert? 🤔
Und schön wär's, wenn's mit VSCodium zusammenspielen würde.
I have a question about Python libraries and testing scope.
If I'm importing 'serial' in my library, and use it like the following to create a connection to a sensor:
--- start code ---
import serial
class Sensor:
def __init__(self, serial_device):
self.__serial_device = serial_device
try:
self.__connection = serial.Serial(
port=serial_device,
baudrate=9600,
bytesize=serial.EIGHTBITS,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
)
except serial.SerialException:
print("Could not establish serial connection to sensor")
--- end code ---
how much testing should I do around the serial connection? Just mock up a few buffers (byte streams), and see how my class handles unexpected input?
One the one hand, I want to make the library as solid as possible. On the other hand, I don't want to run tests on code I don't control (the library module). I know of the 'mock-serial' utility, but haven't used it.
The aim is to make a Python version of my Arduino library for the CozIR Ambient CO2 sensor:
Seeking advice for FreeBSD as a daily driver on an ASUS X580VD
(Intel HD 630 + GTX 1050 Optimus)
Five questions at <https://www.reddit.com/r/freebsd/comments/1r9j67j/advice_for_running_freebsd_as_daily_driver_on_an/>, and:
"… Goals / use-case: - Prefer GNOME (but open to recommendations if another DE/DM is more reliable here) - Intel as primary + NVIDIA for on-demand/offload use (if possible) - Web dev stack: Java, Node/React, Python, Go - Occasional virtualization and Linuxulator for Linux-only tooling. …"
This took way more time than planned to get working: ESP32 Dev Kit microcontroller programmed from the command-line, using esptool and platformio running in a Python venv.
Inspired by https://github.com/rgl/platformio-esp32-arduino-hello-world
Well, once I became the person to guess that and I'm simply translating some textures with #Cpp everything is butter smooth again.
Another update of the Pyriodic Backend project:
Feedback and contributions are most welcome 
See it working at https://marsh-sim.github.io/bibliography/
Because everything is written in regular files, the editor can autocomplete citation keys without any special tooling - they are just sections in another file. This kind of interoperability is why simple tools like text files and #ssg are so great.
I'm not a fan of hosting it on GitHub anymore, but there are already links in various places that I can't update, so this is the reasonable thing to do.
- switching between #Zig versions, I liked it more than the dedicated anyzig
- #Python venv activation – it's silly but feels so good, and collaborates with uv
- ensuring I have the right language server and formatter for a project, be it #Lua, #TypeScript, and trying out various options for Python
- setting LANG="C.UTF-8" only in the specific project folder because #Ansible refused to work with Polish...
The final boss was getting a really comfortable Tree-sitter setup: get the #Rust CLI, write grammar in #JavaScript, re-generate and run tests on source change as a mise Task. And then I only cloned the repo on another machine and was ready to go!
This post was written as a more cultured outlet for my excitement instead of aggresively committing mise.toml into every repository I touch
Join the fun at: https://paste.sr.ht/~maarrk/2f1125139c62ebc567d15eac5e066a73ef638845
What made me finally try something else than raw pip and venv was easy installing of multiple Python versions. I was completing a PR to a library that (admirably) wants to support the old ones as well. Once I had the tool, I tried it for releasing a new version of my own PyPI package, and I wasn't ready for how fast and convenient it would be.
I did enjoy the ease of setup of TkInter, and compatibility with Matplotlib, but I was missing the simplicity of immediate mode libraries. In trying to emulate these, now a few callbacks trigger "given this dataclass with state, the widgets should look like this".
The micro-management gremlin is whining that it's repeating useless work, but more importantly the window is complete and I can go on with the experiment.