Educational Cards

Learn from video content, text, and interactive tasks

Filters
Clear
Where this leaves the 3b1b neural-networks arc

The arc began with layered nonlinearities and gradient descent on MNIST; it ends with those same...

Intermediate Machine learning
A simple timing decorator (wraps-preserving ergonomics)

Decorators that add timing/logging should use functools.wraps so __name__ , __doc__ , and...

Intermediate Accelerating numerics & developer hygiene
Why vectorised kernels beat naive Python loops numerically hot

NumPy (and pandas underneath) stores numeric data in contiguous, typed buffers and dispatches work...

Beginner Accelerating numerics & developer hygiene
JIT accelerators caveats

Numba (and similar tools) compile restricted Python/NumPy loops to machine code. They shine on...

Intermediate Accelerating numerics & developer hygiene
Profiling before rewriting

cProfile , py-spy , and IDE profilers show where time goes—function call counts and cumulative...

Beginner Accelerating numerics & developer hygiene
Type hints aiding maintainability—not runtime magic

PEP 484 annotations document expected types for humans and for static checkers ( mypy , pyright ,...

Beginner Accelerating numerics & developer hygiene
Linters versus formatters

Formatters (Black, isort) rewrite layout—whitespace, line breaks, import order—without changing...

Beginner Accelerating numerics & developer hygiene
Docker reproducibility anecdotes

Containers pin OS-level dependencies and, with lock files, Python package versions so collaborators...

Beginner Accelerating numerics & developer hygiene
Testing discipline vs folklore speedups

Unit tests lock behaviour while you refactor: changing a feature encoder should not silently shift...

Beginner Accelerating numerics & developer hygiene
Static methods versus instance misuse

@staticmethod functions live in class namespace but do not receive self or cls . They are plain...

Intermediate Defensive APIs: validation, sanitization & exceptions
Structured token ladders

Unary-free arithmetic ladders alternate operand, operator, operand, … with odd length: [10, '+', 2,...

Beginner Defensive APIs: validation, sanitization & exceptions
Guard clauses before brittle arithmetic

Division, logarithms, and normalisations explode on zero or negative values in the wrong domain....

Beginner Defensive APIs: validation, sanitization & exceptions