Skip to content

Instantly share code, notes, and snippets.

@luhenry
Created December 21, 2020 13:04
Show Gist options
  • Save luhenry/dafba2197ff143e4af807eb9291aca46 to your computer and use it in GitHub Desktop.
Save luhenry/dafba2197ff143e4af807eb9291aca46 to your computer and use it in GitHub Desktop.
import random
import sys
random.seed(0)
coefs = [random.random() * 20 - 10 for _ in range(0,100)]
sys.stderr.write(" ".join(["%.5f" % c for c in coefs]) + "\n")
for i in range(0, 100*1000):
print("%d %s" % (i+1, " ".join(["%d:%.3f" % (j+1, c * (random.random() * .1 + .95)) for j, c in enumerate(coefs)])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment