Skip to content

Commit 56877d6

Browse files
[Bugfix:Plagiarism] Don't list users with no matches (#80)
1 parent fed8209 commit 56877d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/similarity_ranking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ def main():
163163
all_submissions.sort(reverse=True)
164164

165165
# A set of all the users we've written lines for thus far (duplicates aren't allowed)
166-
users_written = set('foo')
166+
users_written = set()
167167
with open(Path(args.basepath, 'overall_ranking.txt'), 'w') as ranking_file:
168168
for s in all_submissions:
169-
if s.user_id in users_written:
169+
if s.user_id in users_written or s.total_hashes_matched == 0:
170170
continue
171171
ranking_file.write(f"{s.user_id:10} {s.version:3} "
172172
f"{s.percent_match:4.0%} {s.total_hashes_matched:>8}\n")

0 commit comments

Comments
 (0)