Skip to content

Instantly share code, notes, and snippets.

# https://www.gavalas.dev/blog/spigot-algorithms-for-pi-in-python/
def gospers_pi_unproven():
q,r,t,i = 1, 180, 60, 2
while True:
u,y = 3*(3*i+1)*(3*i+2), (q*(27*i-12)+5*r)//(5*t)
yield y
q,r,t,i = 10*q*i*(2*i-1),10*u*(q*(5*i-2)+r-y*t),t*u,i+1
@tripplyons
tripplyons / reprex.py
Created February 11, 2026 18:11
Issue with expected Gated DeltaNet prefill output for MLSys26 FlashInfer-Bench Contest
# run with `uv run reprex.py`
# /// script
# requires-python = ">=3.10"
# dependencies = ["numpy", "packaging", "safetensors", "torch"]
# ///
import json
import subprocess
from pathlib import Path