Python · machine learning · AI
Notes on Python, machine learning and AI, built around code you can run.
2,282 short pieces: how a technique works, where it breaks, what to try next. Free, public domain, no sign-up.
Tryk-meanstransformersgradient descentpandasRAGregularization
- 2,282notes
- 14topics
- 345 hof reading
- CC0public domain
Most read this month
Where readers start
How a note works
One idea, the code that shows it, where it breaks.
- 1The idea in two lines. What the technique does and when you reach for it.
- 2Code you can run. Short, complete, with the libraries everyone has; copy it with one click.
- 3The picture and the limit. What the output looks like, and where the method stops working.
# the elbow: add clusters until the gain stops
from sklearn.cluster import KMeans
inertia = []
for k in range(1, 11):
km = KMeans(n_clusters=k, n_init="auto")
inertia.append(km.fit(X).inertia_)
plot(range(1, 11), inertia, marker="o")214 topics
Pick a topic
The language itself: core features, data structures, OOP, testing, performance and the standard library.
Python for ML and AIScientific and math computingCore language+6
Classical algorithms, model evaluation, feature work and the maths behind them.
Advanced ML topicsClassification and clusteringModel evaluation and validation+6
Neural networks from the ground up: layers, optimisers, CNNs, RNNs, GANs and training tricks.
Backpropagation and optimizationActivation functions and lossNeural network fundamentals+6
Large language models, retrieval, agents, fine-tuning and prompting.
LLM architecture and theoryRAG and retrievalAgents and LangChain+3
Text processing, embeddings, attention and transformer models.
Probability, statistics, linear algebra and calculus, with code.
Statistical inferenceProbability and distributionsCalculus and analysis+2
pandas, NumPy, exploratory analysis, cleaning and feature engineering.
Matplotlib, Seaborn and the craft of a readable chart.
Images in, structure out: convolution, detection, segmentation, transfer learning.
SQL, Spark, Kafka, pipelines and the plumbing under every model.
FastAPI, Flask, Django, REST and authentication.
Docker, CI/CD, serving models and tracking experiments.
Agents that learn by trying: Q-learning, policy gradients.
Everything that did not fit elsewhere: tools, curiosities, side roads.
Statistics and analysisAI applications and systemsData engineering and tools+5
The lab
Games and simulations, built to see how they work
ChessA chess board in the browser, against the computer.
BreakoutThe arcade classic in plain canvas.
The cubeA Rubik's cube you can turn and scramble.> GREETINGS PROFESSOR FALKEN. > SHALL WE PLAY A GAME? _WOPR terminalFilm subtitles typed out on a WarGames-style terminal.
SudokuGenerator and solver.
Space InvadersThe 1978 Taito game, rebuilt in the browser.
QuizPython and machine learning questions, with the answers explained.
MinesweeperWith an autoplay mode that solves the board by itself.Work with me
Software, AI and security, at fixed prices.
Twenty-seven years in software, security and data, CISSP, CTO of Silicon Psyche Labs. Remote, in English or Italian. A written answer within a day, a first delivery within ten days.
