Skip to content

Instantly share code, notes, and snippets.

@iwillspeak
Created January 23, 2013 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iwillspeak/4610901 to your computer and use it in GitHub Desktop.
Save iwillspeak/4610901 to your computer and use it in GitHub Desktop.
Grassmannian unit test generation script
#! /usr/bin/env python
import random
import string
import mdp
def foo():
return random.sample(xrange(255), 32)
def bar(n):
ret = []
for i in range(n):
ret.append(foo())
return ret
def baz(names):
for n in names:
print n, " = Grassmann(", ",".join(map(str, bar(4))), ")"
if __name__ == "__main__":
baz(string.letters[:6])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment