python

Back Open Paginator
05.02.2026 20:32
pycascades (@pycascades@hachyderm.io)

💜 PyCascades Grants Program 💜
We want PyCascades to be accessible to everyone. Our grants help support attendees who may need financial assistance to participate.

📅 Applications open
🛑 Close Feb 14, 2026

ℹ️ Details 👉 lnkd.in/eJYrz_PZ

#Python #PyCascades





Show Original Post


05.02.2026 20:21
treyhunner (@treyhunner@mastodon.social)

Python Tip #36 (of 365):

Instead of assigning a lambda function to a variable, use a "def" statement.

Instead of this:
square = lambda n: n**2

Write this:
def square(n): return n**2

Why? Because:

1. The USUAL way we define a function with a name is by using "def"
2. The one benefit that lambda provides is the fact it's an expression that can be passed into another expression and using an assignment statement nullifies that benefit

Also, PEP8 recommends this.




Show Original Post


05.02.2026 20:13
stylus (@stylus@social.afront.org)

@welshpixie I algorithmically colored in your owl.

All the pixels of the image were traversed in an order defined by the Hilibert curve. Whenever a white pixel was encountered, it was filled with a color whose hue depended on the fraction of the distance along the curve where the pixel was. But because the whole region is filled by the same color, they can snake into areas with different colors around them.

It's probably not the most aesthetic coloring but I like it because I had an idea and coded it up.

Thanks for sharing the original image!

#superbOwl #algorithmicArt #python





Show Original Post


05.02.2026 19:40
dalke (@dalke@toots.nu)

My eldest is learning #Python on his own. He saw some Python books on my books on my bookcase about Python and wondered if they were useful.

Lutz, "Learning Python", is from the late 1990s. It uses Python 1.5.2. It is for programmers picking up Python, and has a lot of Monty Python references which are obscure to a 9 year old in 2026.

The Pocket Reference is from 2004 or so. It uses Python 2.4, I think.

So, not useful.

Can anyone suggest relevant resources which are *NOT* video games?




Show Original Post


05.02.2026 19:26
openmp_arb (@openmp_arb@mast.hpc.social)

OpenMP ARB is bringing Python to the standard making it the fourth officially-supported language!

To facilitate this, OpenMP is very excited to announce that Anaconda, Inc., have joined the OpenMP ARB! As an OpenMP ARB member, Anaconda will contribute Python technical leadership, ensuring that the Python implementation meets the needs of the broader ecosystem.

Learn more: openmp.org/press-release/pytho
#openmp #python #parallel #computing #language #developer #programming





Show Original Post


05.02.2026 19:12
habr (@habr@zhub.link)

AI Bridge: Как по-простому дать Gemini «руки» для управления вашим компьютером

Представьте: вы скидываете нейросети скриншот сложной программы (будь то Cinema 4D, Excel или 1С) и говорите: «Сделай мне вот это». И через секунду мышка на вашем экране начинает сама летать по кнопкам, выполняя работу за вас. Это не магия и не дорогой корпоративный софт. Это AI Bridge — микро-утилита на Python, которую можно запустить за минуту.

habr.com/ru/articles/993328/

#AI #Python #Automation #Gemini #Desktop_Agent #PyAutoGUI #Автоматизация




Show Original Post


05.02.2026 19:00
mark (@mark@mastodon.fixermark.com)

The only criticism I have of types in Python:

Python is a really good dynamically typed language. Since classes are themselves instances of a class-describing object, you can do what other languages have to do with text-transforming macros by just treating the class as mutable and dynamically adding things like methods.

... and then the type system kicks your ass for doing that, so you're left with a few not-great options.

#python #mypy




Show Original Post


05.02.2026 18:40
johnbeers (@johnbeers@mastodon.social)

A new release is out for , the utility that converts images to musical compositions using color and algorithms. This is the version that was used in creating the Placebo Button track I posted about yesterday.

codeberg.org/jaerrib/image2sou




Show Original Post


05.02.2026 18:30
pytexas (@pytexas@fosstodon.org)

Passionate about empowering others to create greater success in their lives, this #python #SoftwareArchitect breaks down what they know into byte-sized pieces. 💛

Who from #PyTexasConference2026 do you think it might be?
pytexas.org/2026/





Show Original Post


05.02.2026 18:12
habr (@habr@zhub.link)

Запускаем AI-ассистента на бесплатном CPU: Qwen2.5 + Gradio + Hugging Face Spaces

Каждый раз, когда кто-то говорит про запуск LLM, возникает вопрос: "А где взять GPU?" Облачные GPU стоят денег, локальные видеокарты стоят ещё больших денег, а бесплатные GPU-тиры исчезают быстрее, чем появляются. Но что если можно запустить полноценного AI-ассистента вообще без GPU? На обычном CPU. Бесплатно. С хорошей поддержкой русского языка. И развернуть его за 15-20 минут. В этой статье рассказывается, как запустить Qwen2.5-3B на бесплатном CPU-тире Hugging Face Spaces, создать веб-интерфейс с помощью Gradio и получить работающего ассистента с поддержкой русского языка. Никаких глубоких знаний не требуется — только базовый Python и аккаунт на Hugging Face. Если вы устали искать бесплатный GPU или просто хотите поэкспериментировать с LLM без лишних затрат — эта статья для вас.

habr.com/ru/articles/993312/

#Qwen25 #Gradio #Hugging_Face_Spaces #AIассистент #CPU #Python #llamacpp #машинное_обучение




Show Original Post


05.02.2026 17:30
Reuven (@Reuven@fosstodon.org)

Think you can't modify a #Python list while iterating? You can append to it:

mylist = [10, 20, 30]
for i in mylist:
print(i)
if i < 100:
mylist.append(i ** 2)

This prints 10, 20, 30, 100, 400, and 900.

BUT don't insert or remove. That'll cause real trouble.





Show Original Post


05.02.2026 17:13
slott56 (@slott56@fosstodon.org)

#TTRPG #DSL #Python

Have been making a DSL for OpenD6 spells in Python for months.

All 342 of the spells that I'm working with are *minimally* working in the V3 DSL. This means the declarative language produces a useful `Spell` instance.

Are the difficulty values correct? That's yet another question to be answered later today or tomorrow.

There's still some refactoring required. Three of the table-lookup aspects have duplicate-looking implementations.




Show Original Post


1 ...531 532 533 534 535 536 537 538 539 540 541 ...1588
UP