finds.dev← search

// the find

chiphuyen/python-is-cool

★ 3,662 · Jupyter Notebook · updated Dec 2019

Cool Python features for machine learning that I used to be too afraid to use. Will be updated as I have more time / learn more.

A Jupyter notebook walking through Python features that intermediate developers often underuse: lambda/map/filter/reduce, list manipulation, magic methods, decorators, and lru_cache. Written by Chip Huyen (author of MLOPS-focused books) as a personal reference, not a structured course. Useful for Python developers coming from other languages who want to close gaps in idiomatic Python.

The n-gram generator example is genuinely good — it shows the memory tradeoff between lists and generators with a concrete ML-adjacent use case rather than a toy example. The __slots__ mention is the kind of thing most tutorials skip entirely. The decorator section builds the concept from scratch before showing the stdlib shortcut, which is the right teaching order. Chip's personal voice comes through — she flags her own preferences (named functions over lambdas) rather than just describing what's possible.

Abandoned in 2019 — the repo explicitly says 'will be updated' but never was. Python has moved on: walrus operator, structural pattern matching, TypedDict, dataclasses, and the improvements to typing are all absent. The lru_cache section doesn't mention cache_info(), maxsize, or typed, which are the parts you actually need when using it in production. A single notebook file means no way to run individual sections in isolation without scrolling; the Binder badge probably doesn't work anymore.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →