diff options
author | Martin Možina <martin.mozina@fri.uni-lj.si> | 2017-01-10 20:20:33 +0100 |
---|---|---|
committer | Martin Možina <martin.mozina@fri.uni-lj.si> | 2017-01-10 20:20:33 +0100 |
commit | 54b400f3b219a832e4e978e69030aeed0d99c469 (patch) | |
tree | a99007c9f8bd63c2cfac22e5b63102d90d31d017 /monkey | |
parent | 27d4458613a5b61f16ad9bf59ca1de460fea3b3a (diff) |
Save test users to a file.
Diffstat (limited to 'monkey')
-rw-r--r-- | monkey/patterns.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/monkey/patterns.py b/monkey/patterns.py index ae958a0..48f9163 100644 --- a/monkey/patterns.py +++ b/monkey/patterns.py @@ -336,7 +336,6 @@ def get_patterns(tree): for selected in combinations(nodes, 2): pat = pattern2(clause, selected) if pat: - print(pat) yield pat, selected #pat = connect(*selected) #if pat: @@ -349,7 +348,6 @@ def get_patterns(tree): if len(nodes) == 1: pat = pattern2(clause, nodes) if pat: - print(pat) yield pat, nodes #pat = pattern(tree, var) #if pat: @@ -446,7 +444,9 @@ if __name__ == '__main__': split = int(len(users)*0.7) learn_users = set(users[:split]) test_users = set(users[split:]) - print(test_users) + fusers = open('data/users-test-{}.txt'.format(pid), 'wt') + for tu in test_users: + fusers.write('{}\n'.format(tu)) for code, data in submissions.items(): if len(code) > 1000 or prolog_parse(code) is None: |