Python
173 posts
The Kelly Criterion With Real Payoffs and Real Fees
The Kelly formula everyone quotes assumes you lose your entire stake. With real loss multipliers and fees the sizing changes. Deriving the general form.
The Billing Bug You Can't Have
How emit's prepaid credit system makes overdrawing impossible under concurrency, using an append-only ledger and one carefully shaped SQL update.
Prove the Test Can Fail: Mutate the Fix
A regression test is unverified until you have watched it fail against the unfixed code. The procedure, and three shapes that survive a naive check.
Stars, Views, and Clones Across 63 Repos
I ran stargazers 0.2.0 against my own GitHub account. The repos with the most stars and the repos with the most clones turned out to be different repos.
Sharing 100 Requests With Every User You Have
Strava's rate limit is per app, not per user. How that one detail shaped Pedal Wrencher: polling over webhooks, request budgets, and cooldowns.
PyGeoHash v3.3.1: A Round of Sharp-Edge Fixes
PyGeoHash v3.3.1 is a bugfix release that closes a buffer overrun, rejects bad coordinates, fixes distance and bounding box edge cases, and ships py.typed.
Into the C: Making PyGeoHash Decode Twice as Fast
Last time I optimized the Python wrapper around PyGeoHash. This time I went into the C extension and found it was building objects it immediately threw away.
Optimizing PyGeoHash Without Touching the C
A few days after benchmarking PyGeoHash against the field, I closed most of the gap to the C++ library without writing any C. Here is how.
Benchmarking PyGeoHash: Where It Lands Against the Field
I benchmarked PyGeoHash against six Python geohash libraries with pytest-benchmark. It trails the Rust and C++ options and beats pure Python by a mile.
The Full McGinnis Stack: An Opinionated Python Developer Setup
How to wire together ContextSwitch, python-skills, makefile-mcp, mutmut-mcp, Rampart, and the rest into a complete AI-powered Python development workflow.