Skip to content

Instantly share code, notes, and snippets.

View Staphylococcus's full-sized avatar

Vas Zayarskiy Staphylococcus

View GitHub Profile
@Staphylococcus
Staphylococcus / gate_worker.py
Created September 1, 2025 18:51
Domesticated rocks doing tricks
#!/usr/bin/env python3
import os, time, math, json, random, sys, resource
def spin_cpu(seconds):
deadline = time.perf_counter() + max(0.0, seconds)
x = 0.0
while time.perf_counter() < deadline:
x += 1.0
return x