Python Tip #91 (of 365):
Use re.VERBOSE to make your regular expressions more readable
Regexes are extremely dense: one character is often a whole expression, and they're usually written without whitespace or comments:
match = re.search(r"^\d{5}(-\d{4})?$", zip_code)
But they don't have to be so dense!
You can use the re.VERBOSE flag to space them out:
match = re.search(r"""
^
\d{5}
( - \d{4} )?
$
""", zip_code, flags=re.VERBOSE)
🧵(1/4)
https://github.com/Vitexus/dungeona/releases/tag/v0.4.0
#Python #Dungeon #Game #Release

Apparently #FastAPI killed #typer_slim, which used to be a lightweitght distribution of #typer without fancy dependencies, and is now a "thin wrapper" around #typer, which its entire #dependency tree, effectively removing the entire purpose of the package.
I really dislike *this* type of "dependency injection", so I'm out. I'll be using vanilla #pythonclick and if that also becomes a burden, I'll be back to #argparse.
#Python #CLI #softwaredevelopment #allsoftwareisbroken
https://pypi.org/project/inifix/
New.
AhnLab: A malicious LNK that spreads a Python-based backdoor and how it’s spreading (Kimsuky group) https://asec.ahnlab.com/en/93151/ #infosec #threatresearch #Python #malware
There are several different ways to create an empty dictionary with #Python
Here are two of them:

Season 1 Lesson 12 Part 7 - Your First Steps in Python Big O Complexity Python Understanding O n Squared #dataengineer #learncoding #dataanalysis #softwarengineer #jupyternotebook #softwaredeveloper #codingtutorial #pythoncode #python #datascience #machinelearning #pythonprogramming
Pillow 12.2.0 has been released!
This has a bunch of security fixes, new APIs for wrapping text and converting fonts, plus performance and thread-safety improvements.
https://pillow.readthedocs.io/en/latest/releasenotes/12.2.0.html
#Python #Pillow #PythonPillow #release #security

un projet de configuration d'environnement de travail en Python créé par @mattsi, facile à personnaliser ou étendre : https://github.com/Mattsi-Jansky/dotfiles.new
Mattsi explique sa démarche, très différente d'#Ansible par exemple, dans ce billet de blog : https://matt.si/2026-04/dotfiles/
#Python #outil #configuration #environment

Как я уместил «Войну и мир» в 10 ГБ видеопамяти, или почему нейросеть убивает героев и выдумывает Пьера Бездаровского
Что делать, если по литературе задали два тома "Войны и мира", а времени (или желания) читать нет? Конечно, запрячь нейросеть! Но как быть, если в твоем распоряжении всего 10 ГБ видеопамяти, а модель упорно пытается "убить" выживших героев и переименовывает Пьера Безухова в Бездаровского? В этой статье я поделюсь опытом запуска Saiga Llama 3 8B на домашнем железе, расскажу, как бороться с галлюцинациями через промпт-инжиниринг, и почему 7500 символов текста Толстого иногда весят столько же, сколько одна строчка жесткого правила в системном промпте. Внутри - анализ вероятностей токенов, лог работы модели и готовый код для суммаризации длинных текстов. Узнать, как я спас Николая Ростова от LLM
https://habr.com/ru/articles/1018136/
#llm #llama_3 #нейросети #машинное_обучение #промптинжиниринг #nlp #генерация_текста #python #война_и_мир #квантование
How to Run Self-Hosted Link-in-Bio Tool with #LinkStack on #AlmaLinux #VPS
This article provides a guide for how to run self-hosted Link-in-Bio tool with LinkStack on AlmaLinux VPS.
How to Run Self-Hosted Link-in-Bio Tool with LinkStack on AlmaLinux VPS
This guide walks you through installing and running LinkStack, a free and open-source alternative to Linktree, on an ...
Continued 👉 https://blog.radwebhosting.com/self-hosted-link-in-bio-tool-with-linkstack-on-almalinux-vps/?utm_source=mastodon&utm_medium=social&utm_campaign=mastodon.raddemo.host #opensource #selfhosting #laravel #composr #python #selfhosted #letsencrypt

How to Run Self-Hosted Link-in-Bio Tool with #LinkStack on #AlmaLinux #VPS
This article provides a guide for how to run self-hosted Link-in-Bio tool with LinkStack on AlmaLinux VPS.
How to Run Self-Hosted Link-in-Bio Tool with LinkStack on AlmaLinux VPS
This guide walks you through installing and running LinkStack, a free and open-source alternative to Linktree, on an ...
Continued 👉 https://blog.radwebhosting.com/self-hosted-link-in-bio-tool-with-linkstack-on-almalinux-vps/?utm_source=mastodon&utm_medium=social&utm_campaign=mastodon.social #selfhosting #python #composr #opensource #letsencrypt #selfhosted #laravel
