This repo turns a GitHub user's commit history into an animated seismograph: lines-added-per-month is the ground motion, major AI model releases are fault lines.
python3 seismograph.py --openAuth uses what your environment already has: GITHUB_TOKEN env, else the gh CLI.
No login flow, no extra installs - it's stdlib only.
Useful flags:
--user LOGINchart someone else (public repos only unless you own them)--out PATHoutput file (defaultseismograph.html)--openopen the result in the browser when done
That's the whole tool: one stdlib-only Python file, zero pip installs. The output is a single self-contained HTML file (data is inlined as JSON; fonts load from Google Fonts over the network).
- List every repo the target commits in (
gh/REST…/repos). - For each, pull
GET /repos/{owner}/{repo}/stats/contributors, keep the target's weeklyadditionsandcommits, aggregate by month. - Drop bulk-import repos (>100k additions and >10k additions/commit — those are
vendored deps, datasets, lockfiles, not hand-written code). See
BULK_MIN_ADD/BULK_RATIO. - Inline the series + the
EVENTSmodel-release list into the HTML template and write it.
- Model timeline: edit the
EVENTSlist (date, label, vendor, is_coding) andSHORTlabels near the top ofseismograph.py. - Vendor colors:
VENDOR_COLORS. - Look & feel: everything visual lives in the
TEMPLATEstring (CSS:rootvariables for palette, the<canvas>render loop for the trace). - Filter strictness: tune
BULK_RATIO. Set it very high to keep everything (raw).
The whole job is I/O-bound: it waits on GitHub's stats/contributors endpoint,
which computes lazily and answers 202 while it works (and 204 for empty repos).
A cold run is minutes of network wait but ~1s of CPU - rewriting it in a "faster
language" buys nothing. The levers that actually matter are already here:
- Per-repo cache keyed by last-push at
~/.cache/gitquake/stats.json. Unchanged repos are never refetched, so re-runs finish in seconds.--no-cachebypasses it. - Warm → collect → retry sweep that triggers GitHub's lazy computation up front instead of blocking on it repo-by-repo.
If you want it faster still, reduce requests, not CPU.
Keep it one file. No dependencies. That's the point.