patterns shit

This commit is contained in:
2018-12-18 13:35:11 +01:00
parent 5780d869cf
commit 284026907b
11 changed files with 4801072 additions and 0 deletions

21
patterns/removedupes.py Normal file
View File

@@ -0,0 +1,21 @@
import sys, os
if len(sys.argv) < 2:
print("usage python removedupes.py FILE")
sys.exit()
lines = []
f = sys.argv[1]
with open(f, 'r') as infile:
lines = infile.readlines()
outlines = []
for l in lines:
if l not in outlines:
outlines.append(l)
with open(f+".dupless", "w") as outfile:
outfile.writelines(outlines)