Python 101 — Basics for a New Bee
How do we turn CSV records into a useful command-line summary?
python python_101.py python python_101.py --self-test
6 checks passed · Python standard library
Each example includes imports and generated data. Working code and tests are included. No program imports another lesson's example.
Download the legacy coding bundle · Setup and command reference
python3 -m venv .venv source .venv/bin/activate python python_101.py python python_101.py --self-test # For ML examples: python -m pip install -r requirements.txt python cnn.py python cnn.py --self-test
Use Python 3.10+. On Windows PowerShell, activate with .venv\Scripts\Activate.ps1. ML demos run on CPU; no network dataset download is needed.
How do we turn CSV records into a useful command-line summary?
python python_101.py python python_101.py --self-test
6 checks passed · Python standard library
How can a contract determine the loop we should write?
python science_of_programming.py python science_of_programming.py --self-test
660 checks passed · Python standard library
Which starting states let a program finish with the required result?
python weakest_preconditions.py python weakest_preconditions.py --self-test
533 checks passed · Python standard library
How do we implement and check loops with precise boundary behavior?
python science_of_programming_python.py python science_of_programming_python.py --self-test
2304 checks passed · Python standard library
Can gradients learn the unknown slope and intercept of a line?
python pytorch_101.py python pytorch_101.py --self-test
5 checks passed · torch>=2.2
Can shared local filters learn to distinguish vertical and horizontal bars?
python cnn.py python cnn.py --self-test
6 checks passed · torch>=2.2
Can a small model learn next-character prediction while being unable to see future targets?
python llm_tech_talk.py python llm_tech_talk.py --self-test
5 checks passed · torch>=2.2
Can we select experts, accumulate state, and keep memory scoped to a user?
python adaptive_neural_infra.py python adaptive_neural_infra.py --self-test
8 checks passed · torch>=2.2
Train a heat-equation PINN, inspect its loss components, and compare against the exact solution.
python pinn_heat_equation.py --epochs 2500 python pinn_heat_equation.py --self-test
4 checks passed · torch, numpy, matplotlib
Use 192 generated Python programs for next-token training. Compare a grammar penalty with an inference mask.
The second lab learns a decay equation without sensor records.
Can a small state machine recognize a pattern one symbol at a time?
python automata_theory.py python automata_theory.py --self-test
510 checks passed · Python standard library
How does a stack or parsing table recognize nested structure?
python cfg_pda.py python cfg_pda.py --self-test
254 checks passed · Python standard library
How can a head and a transition table transform a binary number?
python turing_machines.py python turing_machines.py --self-test
257 checks passed · Python standard library
How do we check a SAT witness and preserve satisfiability in a graph reduction?
python p_vs_np.py python p_vs_np.py --self-test
42 checks passed · Python standard library
Can function application compute while preserving which binder a variable belongs to?
python lambda_calculus.py python lambda_calculus.py --self-test
6 checks passed · Python standard library
Which guarantees come from correctness, and which depend on random choices?
python randomized_algorithms.py python randomized_algorithms.py --self-test
389 checks passed · Python standard library
Can a prefix code reduce the average bits needed for a skewed source?
python entropy_source_coding.py python entropy_source_coding.py --self-test
14 checks passed · Python standard library
How does structured redundancy correct a single flipped bit?
python channel_capacity_codes.py python channel_capacity_codes.py --self-test
131 checks passed · Python standard library
How do model probabilities turn into a stable loss and gradient?
python kl_cross_entropy.py python kl_cross_entropy.py --self-test
14 checks passed · Python standard library
What can a short description show that a compressor's output length cannot?
python kolmogorov_complexity.py python kolmogorov_complexity.py --self-test
1005 checks passed · Python standard library
Can we encode data compactly and decode it exactly?
python compression_in_practice.py python compression_in_practice.py --self-test
29 checks passed · Python standard library
How can we compose successful steps while keeping missing values or errors explicit?
python monads_python.py python monads_python.py --self-test
38 checks passed · Python standard library
Captured outputs and numerical results are in verification.json. Tests cover finite cases and complement mathematical reasoning; they are not universal proofs.