diff --git a/spdl/mp.sh b/spdl/mp.sh index 16f4d8f..da45c62 100755 --- a/spdl/mp.sh +++ b/spdl/mp.sh @@ -6,4 +6,4 @@ # limit number of runs to 5 ulimit -v 100000 -cat $* | ../src/scyther -a -r3 --summary +cat $* | ../src/scyther -a -r3 -l20 --summary diff --git a/spdl/tuples.py b/spdl/tuples.py new file mode 100755 index 0000000..258c8c3 --- /dev/null +++ b/spdl/tuples.py @@ -0,0 +1,47 @@ +#!/usr/bin/python +# +# Given a number of input lines on std and an argument int, this program +# generates unordered tuples, e.g.: +# +# arg: 2 +# in: a +# b +# c +# d +# +# out: a,b +# a,c +# a,d +# b,c +# b,d +# c,d +# +# This should make it clear what happens. +# +import sys +import string + +# Retrieve the tuple width +tuplesize = sys.argv[1] +print tuplesize + +# Read stdin into list and count +list = [] + + +loop = 1 +while loop: + line = sys.stdin.readline() + if line != '': + # not the end of the input + line = string.strip(line) + if line != '': + # not a blank line + list.append(line) + else: + # end of the input + loop = 0 + +print list +print len(list) +