Skip to content

Instantly share code, notes, and snippets.

@tim-one
tim-one / monster.py
Last active May 7, 2026 06:33
Gen divisors of monster group
import sys
N = 808017424794512875886459904961710757005754368000000000
def fac(n):
for div in range(2, 1000):
if not n % div:
count = 1
n //= div
while n > 1:
@tim-one
tim-one / cyclops.py
Last active April 21, 2026 20:55
Toy cyclic gc code
import sys
if 1:
import psutil
from collections import deque
import gc
def fint(i):
return format(i, '_')
@tim-one
tim-one / partool.py
Last active May 13, 2026 08:41
quickselect that retains info for repeated use
from bisect import bisect_right
from collections.abc import Sequence
from itertools import chain, islice, pairwise, repeat
import operator
import random
import secrets
seed = secrets.token_bytes(16)
#seed = b'N\x1b\xac(\xdf\x0e\xbbj\xfe\xccM\xaf\xb7{e\x91'
print("seed", seed)