gyptazy.com 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.

Site description
Only tech related content - nothing else!
Admin email
contact@gyptazy.com

Search results for tag #python

AodeRelay boosted

[?]o FediMeteo »

Under the hood update!

I’ve finally retired the old cron + sh setup for the weather bots. It served us well, but it had a major flaw: if I rebooted the server while it was posting, the job just died halfway. If the server was down during a scheduled slot, the forecast was lost forever.

So, I wrote a custom Python daemon to run inside the FreeBSD Jails.

  • It’s stateful now. If a crash happens at city 15 of 50, it resumes exactly there on reboot.
  • If the server naps/is rebooting during a scheduled run, the bot realizes it missed a slot and runs immediately upon waking up.

    AodeRelay boosted

    [?]o Bob Belderbos »

    Writing your own list chunking helpers? Check out ’s `itertools.batched()` that can do this for you 🚀

    ✅ Works with any iterable.
    ✅ Handles a smaller final chunk automatically.
    ✅ Use `strict=True` (Python 3.13+) to raise a `ValueError` when the final batch isn’t full.

      AodeRelay boosted

      [?]o -Fred- :debian: :noai: »

      Il existe des solutions pour ça et j'en ai trouvé 3 ou 4 sur des dépôts . Cela dit, et après en avoir commencé à tester, j'ai réalisé que je faisais fausse route et que ce cas d'usage ne nécessitait pas de déployer un (les solutions trouvées sont toutes déployées avec ça (et ça marche très bien)).

      Dans la pratique, ce de moins de 2 Ko (il va grossir un peu je précise) rend un service comparable à celui délivré via une image Docker de plus de 20 Mo.