Adarsh Divakaran

@adarshd
2 Followers
37 Following
11 Posts
Had a great time at @pycon 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 πŸ‘‡
https://blog.adarshd.dev/posts/pycon-us-ai-and-future-of-programming/
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.

Blog Adarsh Divakaran

β€œI have no chance against my phone.” – Magnus Carlsen, 5-time world chess champion, on the power of today’s chess engines.

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 poster session this weekend.

If you're around, drop by on May 18th, 10am-1pm. Let’s write some code, analyze some blunders, and build something fun together. β™ŸοΈ

πŸŽ‰ We’re in the second part of Day 1 at PyCascades 2025, and it’s been AMAZING! πŸŽ‰

We’ve already had incredible talks from Adarsh Divakaran, Yash Verma, Vagrant Cascadian and Tadeh Hakopian! πŸš€ The presentations have been top-notch, and we’re just getting started! πŸ™Œ

The energy is high, and we’re excited for what’s coming next. Stay tuned β€” the best is yet to come! 🌟

hashtag#PyCascades2025 hashtag#Python hashtag#Community

πŸ“£ Speaker Spotlight πŸŽ™οΈ

We’re thrilled to announce that Adarsh Divakaran will be joining us at PyCascades 2025! πŸš€

Get ready for an insightful session that you won’t want to miss! πŸ’‘

πŸ“… When: February 8th & 9th, 2025
πŸ“ Where: Revolution Hall, Portland, Oregon

🎟️ Don’t miss outβ€”grab your tickets now: https://2025.pycascades.com/

Join us for an amazing lineup of talks, hands-on learning, and unforgettable connections with the Python community! 🌟

#PyCascades2025 #Python #Speaker #Portland

PyCascades 2025

Website for PyCascades 2025, a regional Python conference in the Pacific Northwest.

#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
https://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.
- Examples at https://ai.pydantic.dev/examples/
- Can also be run locally using Ollama models that support tools.

Pydantic AI

GenAI Agent Framework, the Pydantic way

#Python Gem of the Day

πŸ’Ž: Avoid Counting in Django Pagination by Nik Tomazic: https://testdriven.io/blog/django-avoid-counting/

- Default Django paginator uses SELECT COUNT(*). Slow for big tables.
- Discusses an implementation of paginator class without COUNT.
- Overfetches an object and uses that to determine if next page is present.

𝚍𝚎𝚏 πš™πšŠπšπšŽ(πšœπšŽπš•πš, πš—πšžπš–πš‹πšŽπš›):
...
πš‹πš˜πšπšπš˜πš– = (πš—πšžπš–πš‹πšŽπš› - 𝟷) * πšœπšŽπš•πš.πš™πšŽπš›_πš™πšŠπšπšŽ
πšπš˜πš™ = πš‹πš˜πšπšπš˜πš– + πšœπšŽπš•πš.πš™πšŽπš›_πš™πšŠπšπšŽ + 𝟷
...

- Can also be applied to other ORMS too for optimizing perf.

Avoid Counting in Django Pagination

This article looks at how to avoid the count query in Django's paginator.

#Python Gem of the Day.

Python in production #1 (Cloud Native vs Stack Native) by Michael Kennedy.

πŸ’Ž: https://mkennedy.codes/posts/opposite-of-cloud-native-is-stack-native/

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.

Opposite of Cloud Native is?

Time to define what it means to be NOT cloud-native, in a positive way.

Michael Kennedy's Thoughts on Technology

My first tutorial for Real Python @realpython got published πŸŽ‰

"Python Thread Safety: Using a Lock and Other Techniques": https://realpython.com/python-thread-lock/

Unexpected things can happen when we try to introduce multithreading to existing Python code. Read the tutorial to spot such race conditions in multithreaded code and learn to fix them using Python's synchronization primitives.

Read now at: https://realpython.com/python-thread-lock/

#Python #Realpython #ThreadSafety #Tutorial

Python Thread Safety: Using a Lock and Other Techniques – Real Python

In this tutorial, you'll learn about the issues that can occur when your code is run in a multithreaded environment. Then you'll explore the various synchronization primitives available in Python's threading module, such as locks, which help you make your code safe.

It's the season of #Python 🐍 #Conferences!

Had a great time at #Piterpy 2024 in Saint Petersburg. I spoke on "Tackling Thread Safety in Python," which happened to be the only English talk at the offline part of the Piterpy conference.

A huge thanks to the entire JUG.RU team, who made sure everything went smoothly for me. They took extra care since I don’t speak Russian and went above and beyond to ensure I had a seamless experience.