python

Back Open Paginator
01.04.2026 20:08
treyhunner (@treyhunner@mastodon.social)

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)




Show Original Post


01.04.2026 19:24
vitex (@vitex@f.cz)

github.com/Vitexus/dungeona/re

#Python #Dungeon #Game #Release





Show Original Post


01.04.2026 19:22
neutrinoceros (@neutrinoceros@ieji.de)

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
pypi.org/project/inifix/




Show Original Post


01.04.2026 19:04
AAKL (@AAKL@infosec.exchange)

New.

AhnLab: A malicious LNK that spreads a Python-based backdoor and how it’s spreading (Kimsuky group) asec.ahnlab.com/en/93151/ #infosec #threatresearch #Python #malware




Show Original Post


01.04.2026 19:04
driscollis (@driscollis@mastodon.social)

There are several different ways to create an empty dictionary with

Here are two of them:





Show Original Post


01.04.2026 19:03
247CodeGirl (@247CodeGirl@mastodon.social)

Season 1 Lesson 12 Part 7 - Your First Steps in Python Big O Complexity Python Understanding O n Squared





Show Original Post


01.04.2026 18:46
pillow (@pillow@fosstodon.org)

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.

pillow.readthedocs.io/en/lates

#Python #Pillow #PythonPillow #release #security





Show Original Post


01.04.2026 18:32
pythonrennes (@pythonrennes@social.breizhcamp.org)

un projet de configuration d'environnement de travail en Python créé par @mattsi, facile à personnaliser ou étendre : github.com/Mattsi-Jansky/dotfi

Mattsi explique sa démarche, très différente d'#Ansible par exemple, dans ce billet de blog : matt.si/2026-04/dotfiles/

#Python #outil #configuration #environment




Show Original Post


01.04.2026 17:51
p (@p@pixelfed.social)
A #greenTreePython for #WildlifeWednesday 🐍


#GrünerBaumpython #MoreliaViridis #Baumpython #Schlange #Python #snake #snek #MoreliaAzurea #northernGreenTreePython #Rautenpython #wildlife #animal #animalPhotography #GrusonGewächshäuser



Show Original Post


01.04.2026 17:42
habr (@habr@zhub.link)

Как я уместил «Войну и мир» в 10 ГБ видеопамяти, или почему нейросеть убивает героев и выдумывает Пьера Бездаровского

Что делать, если по литературе задали два тома "Войны и мира", а времени (или желания) читать нет? Конечно, запрячь нейросеть! Но как быть, если в твоем распоряжении всего 10 ГБ видеопамяти, а модель упорно пытается "убить" выживших героев и переименовывает Пьера Безухова в Бездаровского? В этой статье я поделюсь опытом запуска Saiga Llama 3 8B на домашнем железе, расскажу, как бороться с галлюцинациями через промпт-инжиниринг, и почему 7500 символов текста Толстого иногда весят столько же, сколько одна строчка жесткого правила в системном промпте. Внутри - анализ вероятностей токенов, лог работы модели и готовый код для суммаризации длинных текстов. Узнать, как я спас Николая Ростова от LLM

habr.com/ru/articles/1018136/

#llm #llama_3 #нейросети #машинное_обучение #промптинжиниринг #nlp #генерация_текста #python #война_и_мир #квантование




Show Original Post


01.04.2026 17:35
admin (@admin@mastodon.raddemo.host)

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 👉 blog.radwebhosting.com/self-ho #opensource #selfhosting #laravel #composr #python #selfhosted #letsencrypt





Show Original Post


01.04.2026 17:35
radwebhosting (@radwebhosting@mastodon.social)

How to Run Self-Hosted Link-in-Bio Tool with on

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 👉 blog.radwebhosting.com/self-ho





Show Original Post


1 ...236 237 238 239 240 241 242 243 244 245 246 ...1615
UP