Skip to content

Commit

Permalink
better name handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dkgitdev authored Apr 22, 2018
1 parent 5818f36 commit 98593da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion txttobin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys
data = file(sys.argv[1], 'rb').readlines()
uid = sys.argv[1].replace('.txt','')
if sys.argv[1].endswith('.txt'):
uid = sys.argv[1][:-4]

def parity(x):
return ("{0:08b}".format(x).count('1') & 1)
Expand Down

0 comments on commit 98593da

Please sign in to comment.