PythonHub
2.36K subscribers
2.35K photos
49K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
Django: An admin extension to prevent state leaking between requests

Here’s a small protection I added to a project a few years ago. I was considering it again since I saw a similar potential bug in a Django middleware.

https://adamj.eu/tech/2024/04/29/django-admin-prevent-leaking-requests/
Poor mans autoreload server in single file python on linux

The article describes a simple Python server that provides automatic browser page reload on content change, without requiring any additional setup or configuration. The server acts as a regular file server but also serves WebSocket messages over a specified path to trigger the page reload.

https://hereket.com/posts/linux_live_reload_python_server/
AsyncIO and the Event Loop Explained

Over the years, I’ve produced several videos about AsyncIO. Today, however, I’m adopting a new approach where I explain the event loop in depth. I’ll delve deeper into asynchronous programming, focusing specifically on how the event loop operates behind the scenes.

https://www.youtube.com/watch?v=RIVcqT2OGPA
How LLMs Work, Explained Without Math

A basic question I think a lot of people have about the GenAI revolution is where does the apparent intelligence these models have come from. In this article, I'm going to attempt to explain in simple terms and without using advanced math how generative text models work, to help you think about them as computer algorithms and not as magic.

https://blog.miguelgrinberg.com/post/how-llms-work-explained-without-math
relax-py

A Python web development framework for htmx and tailwindcss, with hot module replacement, URL locators, dependency injection, supported by static typing, built on top of Starlette.

https://github.com/crpier/relax-py