Hacker News with Generative AI: Python

/usr/bin/env -S uv run (simonwillison.net)
This is a really neat pattern. Start your Python script like this:
Using uv with PyTorch (astral.sh)
The PyTorch ecosystem is a popular choice for deep learning research and development. You can use uv to manage PyTorch projects and PyTorch dependencies across different Python versions and environments, even controlling for the choice of accelerator (e.g., CPU-only vs. CUDA).
Show HN: WASM runtime for sandboxing Python code (github.com/ErikKaum)
PyTorch 101: Understanding Graphs, Automatic Differentiation and Autograd (digitalocean.com)
PyTorch is one of the foremost python deep learning libraries out there. It’s the go to choice for deep learning research, and as each days passes by, more and more companies and research labs are adopting this library.
Show HN: Venmo Unofficial API (github.com/Integuru-AI)
This Python module provides a simple interface to interact with the Venmo API, allowing users to perform various operations such as checking balance, making payments, and requesting money.
CPython's Garbage Collector and Its Impact on Application Performance (codingconfessions.com)
Learn how the knowledge of CPython internals translate into performance insights for your code
Numpyro: Probabilistic programming with NumPy powered by Jax (github.com/pyro-ppl)
NumPyro is a lightweight probabilistic programming library that provides a NumPy backend for Pyro. We rely on JAX for automatic differentiation and JIT compilation to GPU / CPU. NumPyro is under active development, so beware of brittleness, bugs, and changes to the API as the design evolves.
Overrated Python Libraries (and What You Should Use Instead) (medium.com)
Python is like a wonderland of libraries, but with thousands of choices, it’s easy to follow the crowd and rely on popular but sometimes outdated or underperforming tools.
Non-elementary group-by aggregations in Polars vs pandas (quansight.org)
I attended PyData Berlin 2024 in April, and it was a blast! I met so many colleagues, collaborators, and friends. There was quite some talk of Polars - some people even gathered together for a Polars-themed dinner! It's certainly nice to see people talking about it, and the focus tends to be on features such as:
Pex: A tool for generating .pex (Python EXecutable) files, lock files and venvs (github.com/pex-tool)
pex is a library for generating .pex (Python EXecutable) files which are executable Python environments in the spirit of virtualenvs.
99 Bottles of OOP now available in Python (sandimetz.com)
99 Bottles of OOP is a practical guide to writing cost-effective, maintainable, and pleasing object-oriented code.
Query Your Python Lists (github.com/mkalioby)
Leopards is a way to query list of dictionaries or objects as if you are filtering in DBMS.
Attestations: A new generation of signatures on PyPI (trailofbits.com)
For the past year, we’ve worked with the Python Package Index (PyPI) on a new security feature for the Python ecosystem: index-hosted digital attestations, as specified in PEP 740.
Are We PEP740 Yet? (trailofbits.github.io)
This site shows the top 360 most-downloaded packages on PyPI showing which have been uploaded with attestations.
PyPI now supports digital attestations (pypi.org)
PyPI package maintainers can now publish signed digital attestations when publishing, in order to further increase trust in the supply-chain security of their projects. Additionally, a new API is available for consumers and installers to verify published attestations.
FireDucks: Pandas but Faster (bearblog.dev)
My main background is a hedge fund professional, so I deal with finance data all the time and so far the Pandas library has been an indispensable tool in my workflow and my most used Python library.
Show HN: Python Stream Processing with Denormalized (github.com/probably-nothing-labs)
Python bindings for denormalized
Vector Animations with Python (deepnote.com)
This data notebook shows how to create dynamic vector animations using Python.
ML in Go with a Python Sidecar (thegreenplace.net)
Machine learning models are rapidly becoming more capable; how can we make use of these powerful new tools in our Go applications?
TinyTroupe, a new LLM-powered multiagent persona simulation Python library (github.com/microsoft)
TinyTroupe is an experimental Python library that allows the simulation of people with specific personalities, interests, and goals.
Timing-Sensitive Analysis in Python (deepnote.com)
Time consistency is critical in many fields, especially in sensitive applications like cryptography.
Ruby might be better than Python for new learners (ronynn.github.io)
When it comes to teaching programming to beginners, there are two languages that frequently dominate the conversation: Ruby and Python. Both are high-level, interpreted languages known for their relatively easy learning curves and large supportive communities. However, when we dive deeper into the nuances of learning, there are several reasons why Ruby may offer distinct advantages over Python for new learners.
The Pythonic Emptiness (codingconfessions.com)
When in Rome, do as the Romans do
Malicious PyPI package with 37,000 downloads steals AWS keys (bleepingcomputer.com)
A malicious Python package named 'fabrice' has been present in the Python Package Index (PyPI) since 2021, stealing Amazon Web Services credentials from unsuspecting developers.
Python, C++ inspired language that transpiles to C and can be embedded within C (github.com/AnilBK)
ANIL is a statically typed programming language, inspired by Python and C++, that can be embedded within C source files.
Using Ghidra and Python to reverse engineer Ecco the Dolphin (32bits.substack.com)
Show HN: Bringing component-based design to Django templates (django-cotton.com)
PEP 2026 – Calendar versioning for Python (python.org)
This PEP proposes updating the versioning scheme for Python to include the calendar year.
PEP 750 – Template Strings (python.org)
This PEP introduces template strings for custom string processing.
PiML: Python Interpretable Machine Learning Toolbox (github.com/SelfExplainML)
PiML (or π-ML, /ˈpaɪ·ˈem·ˈel/) is a new Python toolbox for interpretable machine learning model development and validation.