PythonHub
2.38K subscribers
2.35K photos
49K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
Using Lean like an External SMT Solver from Python

The author demonstrates using Lean as an external SMT solver by translating proof goals into SMT queries and reconstructing the results back into valid Lean proofs. He builds a lightweight Python workflow that integrates Lean and SMT solvers seamlessly, enabling automated, proof-generating tactics within Lean.

https://www.philipzucker.com/lean_smt/
Escaping Contravariance Hell

The post explains how Python's type checkers reject certain Callable and Protocol overrides due to contravariant parameter rules, using a vegetable-peeler analogy to clarify the concept. It then shows how to resolve these issues safely with generics like TypeVar or PEP 695 patterns, avoiding the need to fall back on Any.

https://labs.quansight.org/blog/escaping-contravariance-hell
Python and Make in 2025

The post recommends using GNU Make with Python projects for automation entrypoints, preferring uv for fast interpreter/venv setup and delegating complex logic to Python task runners, keeping the Makefile minimal and focused.

https://onebadbit.com/posts/2025/07/python-and-make-in-2025/
1
PyTorch in One Hour: From Tensors to Training Neural Networks on Multiple GPUs

This tutorial offers a fast-paced introduction to PyTorch, covering key topics like tensors, GPU training, and backpropagation in about one hour. Its goal is to help you quickly start building and training deep neural networks, including large language models.

https://sebastianraschka.com/teaching/pytorch-1h/
Python Gotcha: Reusing Generators Returns Nothing

Reusing a Python generator after it’s been consumed yields no results, because generators maintain state and don’t reset once iterated. The fix is straightforward: call the generator function again to produce a fresh iterator before reusing it.<br>

https://andrewwegner.com/python-gotcha-reusing-generator-returns-nothing.html
Python AI Agents: Overview to Generative AI and Intro to Agents

Glenn Mossy, an AI Solutions Architect, presents an overview of generative AI and introduces Python AI agents, discussing how these technologies are automating tasks and transforming industries, with specific examples including an advanced calculator agent and a file system organizer. The session aims to be accessible for both beginners and experienced coders, highlighting the ongoing ev...

https://www.youtube.com/watch?v=2JPazei9e9Q