The Python Journey
Follow the guides below to go from setting up a modern Python >=3.13 environment with uv to mastering the algorithms, libraries, and reusable patterns behind my Advent of Code solutions.
- Tooling & Structure: Environment setup with
uv, Git encryption withgit-crypt, project layout, Modern Python Ergonomics, and the evolution from Template v1 to Template v3. - Standard Library & Toolkits: Collections, comprehensions, regex, recursion,
heapq,Rich,NetworkX,Parsimonious,SymPy, andscipy.optimize.milp(Constraint Solving and Integer Optimisation). - Reusable Patterns & Algorithms: Shared 2D/3D spatial primitives (
aoc_common), Caching and Dynamic Programming, Interval and Range Algebra, Cycle Detection and Modular Arithmetic, Grid Geometry, Cellular Automata, Virtual Machines, graph traversal, and shortest-path search.
Chapters Index
- Getting Started with Python
- Logging
- Timing and Progress
- Opening and Reading Files
- Functions
- My AoC Template
- Packages and Environments
- Classes and Objects
- Assertion
- Regular Expressions
- Sets
- Comprehensions
- Complex Numbers
- NumPy
- Working with Images
- Enumerate and Enum
- Map, Filter, and Reduce
- Working with Binary and Other Bases
- Visualisations and Plots
- Graphs and Graph Theory
- Creating and Visualising Graphs with NetworkX
- Defaultdict
- Recursion
- Caching and Dynamic Programming
- Exceptions
- Permutations, Combinations, Products and More
- Zip
- Unit Testing
- Eval and Literal Eval
- Priority Queues and Heaps
- Shortest Path Algorithms - BFS, Dijkstra, and A*
- LIFO, FIFO, and deques
- Useful Algorithms
- Interval and Range Algebra
- Cycle Detection and Modular Arithmetic
- Grid Geometry — Shoelace Formula and Pick's Theorem
- Cellular Automata and Sparse Grids
- Virtual Machines and Bytecode Decompilation
- Project Structure
- Using Colours
- Reusable Code
- My AoC Template, Version 3
- Modern Python Ergonomics for AoC
- Parsing with Parsimonious
- Jupyter Notebooks
- Encrypting Your Input
- Maths with SymPy
- Constraint Solving and Integer Optimisation