From 54b400f3b219a832e4e978e69030aeed0d99c469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Mo=C5=BEina?= Date: Tue, 10 Jan 2017 20:20:33 +0100 Subject: Save test users to a file. --- monkey/patterns.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'monkey') 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: -- cgit v1.2.1