atlas news
    
Peterbe : Python
18  décembre     09h46
Autocomplete using PostgreSQL instead of Elasticsearch
   Here on my blog I have a site search. Before you search, there’s autocomplete. The autocomplete is solved by using downshift in React and on the backend, there’s an API api v1 typeahead?q bla. Up until today, that backend was powered by Elasticsearch. Now it’s powered by PostgreSQL. Here’s how I...
15  décembre     23h37
Comparison of speed between gpt-5, gpt-5-mini, and gpt-5-nano
   gpt-5-mini is 3 times faster than gpt-5 and gpt-5-nano.
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.