PythonHub
2.31K subscribers
2.35K photos
48.9K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
No GPU left behind: Unlocking Efficiency with Co-located vLLM in TRL

Hugging Face’s new co-location feature lets vLLM inference and model training share the same GPUs and process group, eliminating idle GPU time and costly hardware overhead that plagued the old server-based setup. This integrated approach delivers up to 1.73X faster throughput for large language models, maintains model quality, and simplifies scaling—though it requires careful GPU memory ...

https://huggingface.co/blog/vllm-colocate
20 Pandas One-Liners That Can Save You Hours of Work

A curated set of 20 concise Pandas one-liners that leverage advanced features—like Arrow-backed dtypes, vectorized eval, and efficient group-by transforms—to optimize common data preprocessing, filtering, and aggregation tasks. These snippets are designed to streamline data analysis workflows on large datasets by reducing memory usage, speeding up computations, and minimizing boilerplate...

https://www.nb-data.com/p/20-pandas-one-liners-that-can-save
How local variables work in Python bytecode

The post explains how local variables are managed in Python bytecode: they’re stored in reserved slots at the bottom of each function’s stack frame, with the stack holding references to objects on the heap. By walking through a custom Python interpreter in Rust, the author illustrates how compiled bytecode uses indices (not names) to access these slots, demystifying the stack-based stora...

https://fromscratchcode.com/blog/how-local-variables-work-in-python-bytecode/
Surprisingly Fast AI-Generated Kernels We Didn’t Mean to Publish (Yet)

Stanford researchers show that AI-generated CUDA kernels—created without relying on standard libraries—can now match or even outperform expert-optimized PyTorch kernels on specific tasks, thanks to parallel search and synthetic data generation. Their approach demonstrates that combining strong reasoning with broad exploratory search yields rapid performance gains, highlighting a promisin...

https://crfm.stanford.edu/2025/05/28/fast-kernels.html
Should You Replace Every For Loop With Map and Filter?

Think map() and filter() are always better than for loops? Not so fast. This video walks you through four situations where functional code actually makes things worse—and explain why the classic for loop still deserves a place in your toolbox.

https://www.youtube.com/watch?v=ylzo04lU9Xs
Create a React + Flask Project in 2025

The tutorial provides an updated 2025 workflow for building a combined React and Flask application, detailing how to structure, run, and connect a modern React frontend with a Flask backend using current tools and best practices.

https://blog.miguelgrinberg.com/post/create-a-react-flask-project-in-2025
Create your customized running plan: A step-by-step guide using Python, Elasticsearch, and Agno

The article provides a step-by-step guide to building a personalized, AI-powered running plan using Python, Elasticsearch, and Agno, leveraging your workout history to generate a four-week training schedule. It walks through extracting fitness data, storing it in Elasticsearch, using agentic AI to create a tailored plan, and exporting the results to Notion for easy tracking and progress ...

https://allthingsopen.org/articles/step-by-step-guide-python-elasticsearch-agno-agentic-ai-create-running-plan