atlas news
Peterbe : Python
12 novembre
12h42
Using AI to rewrite blog post comments
Using AI to correct and edit blog post comments as part of the moderation process.
10 octobre
13h07
In Python, you have to specify the type and not rely on inference
Unlike TypeScript, if you give a variable a default, which has a type, that variable is implied to always have the type of the default. That’s not the case with mypy and ty.
28 août
12h11
Faster way to sum an integer series in Python
You can sum a simple series with n(n 1) 2
09 août
18h33
Combining Django signals with in-memory LRU cache
It’s easy to combine functools.lru cache with Django signals to get a good memoization pattern on Django ORM queries.
25 juin
21h36
Native connection pooling in Django 5 with PostgreSQL
Enabling native connection pooling in Django 5 gives me a 5.4x speedup.
12 juin
20h25
A Python dict that can report which keys you did not use
Demonstrates a basic way, in Python, how to know which fields of a dict you never accessed.
13 février
12h41
get in JavaScript is the same as property in Python
Prefix a function, in an object or class, with get and then that acts as a function call without brackets. Just like Python’s property decorator.
14 janvier
20h06
How I run standalone Python in 2025
uv run --python 3.12 --with requests python to quickly start a Python interpreter with the requests package installed without creating a whole project.
22 juillet
14h29
Converting Celsius to Fahrenheit round-up
In the last couple of days, I’ve created variations of a simple algorithm to demonstrate how Celcius and Fahrenheit seem to relate to each other if you mirror the number . It wasn’t supposed to be about the programming language. Still, I used Python in the first one and I noticed that since the...
12 juillet
15h08
Converting Celsius to Fahrenheit with Python
Starting at 4 C, add 12 to the Celcius and mirror the number to get the Fahrenheit number.