PythonHub
2.36K subscribers
2.35K photos
49K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
Statically Typed Functional Programming with Python 3.12

The article demonstrates how to use Python 3.12's new type alias and union type syntax to define a simple expression-based language with dataclasses, and then implements an evaluator function using pattern matching to evaluate expressions in that language.

https://wickstrom.tech/2024-05-23-statically-typed-functional-programming-python-312.html
Python at the Speed of Julia

The article explores achieving Python's ease of use with Julia's speed, illustrating how to optimize Python code using Julia for high-performance computing tasks. It provides examples and insights on integrating both languages to enhance computational efficiency without sacrificing Python's simplicity.

https://glassnotebook.io/r/dxJTYbJBmPR1X3NQUfwXB/99_python_at_the_speed_of_julia.jl
Let’s optimize! Running 15× faster with a situation-specific algorithm

Sometimes the best way to speed up your algorithm is to adjust it to the specifics of your data.

https://pythonspeed.com/articles/lets-optimize-median-local-threshold/
👍1
CPython Garbage Collection: The Internal Mechanics and Algorithms

A detailed code walkthrough of how CPython implements memory management, including reference counting and garbage collection.

https://blog.codingconfessions.com/p/cpython-garbage-collection-internals
👍3
Inspectus

Inspectus is a versatile visualization tool for large language models. It runs smoothly in Jupyter notebooks via an easy-to-use Python API. Inspectus provides multiple views, offering diverse insights into language model behaviors.

https://github.com/labmlai/inspectus
Let's reproduce GPT-2 (124M)

In this video, Andrej Karpathy demonstrates how to reproduce the GPT-2 (124M) model, covering topics like parameter sharing, model initialization, mixed precision training, optimizations like flash attention, and hyperparameter tuning.

https://www.youtube.com/watch?v=l8pRSuU81PU
Optimal SQLite settings for Django

The article provides optimal SQLite settings for Django applications, aimed at enhancing performance and reliability for smaller deployments. It includes specific PRAGMA configurations and a simple backup strategy, highlighting the potential of SQLite when correctly tuned for production use.

https://gcollazo.com/optimal-sqlite-settings-for-django/