Adarsh D's Avatar

Adarsh D

@adarshd.bsky.social

Co founder: linkhq.co and digievolabs.com Python | Backend | APIs Blog: https://blog.adarshd.dev

53 Followers  |  256 Following  |  18 Posts  |  Joined: 27.12.2023  |  1.7685

Latest posts by adarshd.bsky.social on Bluesky

Goodbye GIL - Exploring Free Threaded Python 3.14 I compared execution time of code - which included CPU & I/O bound scripts and a WSGI app using the default and free-threaded Python 3.14 interpreters. This was for my talk: โ€œGoodbye GIL - Exploring F...

blog.adarshd.dev/posts/explor...

22.10.2025 18:24 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Will AI Replace Junior Developers? I Asked Experts at Pycon US I attended Pycon US in Pittsburgh - This was my first in-person Pycon US.

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-...

18.06.2025 14:40 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

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. โ™Ÿ๏ธ

12.05.2025 13:05 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
GitHub - gruns/icecream: ๐Ÿฆ Never use print() to debug again. ๐Ÿฆ Never use print() to debug again. Contribute to gruns/icecream development by creating an account on GitHub.

#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.

05.12.2024 04:37 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Introduction Agent Framework / shim to use Pydantic with LLMs

#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.

02.12.2024 16:32 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0


- 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)

29.11.2024 05:14 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Avoid Counting in Django Pagination This article looks at how to avoid the count query in Django's paginator.

#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)

29.11.2024 05:12 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

We need more of these Python in production posts! Waiting for the next part..

26.11.2024 16:03 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Opposite of Cloud Native is? Time to define what it means to be NOT cloud-native, in a positive way.

#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.

26.11.2024 05:39 โ€” ๐Ÿ‘ 4    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Loop targets People were surprised by my example of assigning to a dict item in a for loop. Hereโ€™s more explanation.

#Python Gem of the day:

๐Ÿ’Ž: nedbatchelder.com/blog/202411/... by @nedbat.com

for loops can assign to dict keys (and much more)..

๐š™๐šŠ๐š›๐šŠ๐š–๐šœ = {}

๐š๐š˜๐š› ๐š™๐šŠ๐š›๐šŠ๐š–๐šœ["๐š™๐šŠ๐š๐šŽ"] ๐š’๐š— ๐š’๐š๐šŽ๐š›๐š๐š˜๐š˜๐š•๐šœ.๐šŒ๐š˜๐šž๐š—๐š():
# ๐š๐š‘๐š’๐šœ ๐š ๐š˜๐š›๐š”๐šœ

25.11.2024 05:32 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
pyzzles | python puzzles weird python puzzles, tdd style

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.

21.11.2024 06:16 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Is Python Really That Slow? My standard response when someone asks me how I deal with Python being such a slow language is that Python is by far the fastest to write, cleanest, more maintainable programming language I know, andโ€ฆ

#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.

20.11.2024 04:50 โ€” ๐Ÿ‘ 2    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
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.

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...

18.02.2024 17:25 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Evolution of the sort in Python and the Role of functools.cmp_to_key In Python, the sort method and the sorted callable are commonly used for sorting operations. sort is a list method which modifies the list in-place, whereas sorted takes an iterable as its first argum...

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.

07.02.2024 12:55 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

"TIL: List from Python's typing module is inheritable"

Read the full post: adarshd.substack.com/p/til-list-f...

#python #typing #list

28.12.2023 18:02 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

First comment

28.12.2023 17:58 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

First post ๐Ÿซ 

28.12.2023 17:57 โ€” ๐Ÿ‘ 4    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

@adarshd is following 19 prominent accounts