Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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