Small, reusable Python & shell utilities I reach for often. Each lives in one file, no dependencies, copy-paste friendly.
slugify.py— turn any string into a URL-safe slugretry.py— retry a flaky call with exponential backoffhumanize_bytes.py— human-readable byte sizes (1536 -> '1.5 KiB')chunk.py— split an iterable into fixed-size chunkstimer.py— context manager that prints elapsed wall timeload_env.py— tiny .env parser into a dictparallel_map.py— thread-pooled map for I/O-bound workdeep_get.py— safe nested lookup by dotted pathdedupe.py— order-preserving dedupe with optional keysh.py— run a command, return stripped stdouttruncate.py— truncate to n chars on a word boundaryflatten.py— flatten a nested iterable one levelmemoize.py— cache a function's return valuesdebounce.py— delay a call until calls stop firingatomic_write.py— crash-safe file write via tmp + renameflatten_dict.py— nested dict to dotted keyshuman_duration.py— seconds to '1h 2m 5s'clamp.py— clamp a value to [lo, hi]