@adarshd.bsky.social
Co founder: linkhq.co and digievolabs.com Python | Backend | APIs Blog: https://blog.adarshd.dev
Had a great time at @pycon.us this yearโskipped most talks and went all in on the hallway track.
I asked Python folks what they really think about AI taking over programming. Their answers (and a few surprises) are in my latest post ๐
blog.adarshd.dev/posts/pycon-...
Thanks to open-source tools like `python-chess` and Stockfish, anyone can build their own chess analysis program.
I'll be walking through how to do this live at @pycon.us poster session this weekend. Letโs write some code, analyze some blunders, and build something fun together. โ๏ธ
#Python Gem of the Day
๐: Peek - Replace print() for debugging code.
github.com/salabim/peek
- A superset of github.com/gruns/icecream
- Supports debugging function calls, benchmarking execution time etc.
#Python Gem of the Day
๐: Pydantic releases PydanticAI: AI agent framework
ai.pydantic.dev
- Can create LLM-powered agents that can run tools/functions based on user prompts, all with the type-safety guarantees provided by Pydantic.
- Can also be run locally using Ollama models that support tools.
- The implementation overfetches an object and uses that to determine if next page is present.
๐๐๐ ๐๐๐๐(๐๐๐๐, ๐๐๐๐๐๐):
...
๐๐๐๐๐๐ = (๐๐๐๐๐๐ - ๐ท) * ๐๐๐๐.๐๐๐_๐๐๐๐
๐๐๐ = ๐๐๐๐๐๐ + ๐๐๐๐.๐๐๐_๐๐๐๐ + ๐ท
...
- Can also be applied to ORMS other than Django for optimizing performance.
(2/2)
#Python Gem of the Day
๐: Avoid Counting in Django Pagination by Nik Tomazic: testdriven.io/blog/django-...
- Default Django paginator uses SELECT COUNT(*). Slow for big tables.
- Discusses an implementation of paginator class without COUNT.
(1/2)
We need more of these Python in production posts! Waiting for the next part..
26.11.2024 16:03 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0#Python Gem of the Day.
Python in production #1 (Cloud Native vs Stack Native) by @mkennedy.codes
๐: mkennedy.codes/posts/opposi...
Covers the architecture of production apps which handle:
- 9M req per month
- 10 TB traffic (1 TB served by Python)
Hosted on a 8 CPU / 16 GB Hetzner server.
#Python Gem of the day:
๐: nedbatchelder.com/blog/202411/... by @nedbat.com
for loops can assign to dict keys (and much more)..
๐๐๐๐๐๐ = {}
๐๐๐ ๐๐๐๐๐๐["๐๐๐๐"] ๐๐ ๐๐๐๐๐๐๐๐๐.๐๐๐๐๐():
# ๐๐๐๐ ๐ ๐๐๐๐
Link: pyzzles.gptengineer.run
21.11.2024 13:00 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0โช#Python Gem of the Day: Pyzzels by Oskar Eriksson
๐https://pyzzles.gptengineer.run/
Python puzzles where we are given test files and need to write solutions to satisfy the tests.
#Python Gem of the Day:
Python is said to be the second-best language for everything.
๐: blog.miguelgrinberg.com/post/is-pyth...
@miguelgrinberg.bsky.social shares his benchmark comparing Python (multiple Cpython versions, Pypy), NodeJS & Rust.
Thread local data in #Python
Since threads in Python share the memory space of their parent process, we might need to define thread-specific variables for specific use cases to avoid unintended side effects.
Read at: blog.adarshd.dev/posts/thread...
Evolution of `sort` in #Python and the role of `cmp_to_key`
This article from my "Python in the Wild" newsletter discusses the evolution of sorting from Python 2 to 3, and features an open-source example illustrating the usage of `functools.cmp_to_key` for sort operations.
"TIL: List from Python's typing module is inheritable"
Read the full post: adarshd.substack.com/p/til-list-f...
#python #typing #list
First comment
28.12.2023 17:58 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0First post ๐ซ
28.12.2023 17:57 โ ๐ 4 ๐ 0 ๐ฌ 1 ๐ 0