Add/fix shebang in python scripts, add execute permission (linux), remove whitespace/tabs at end of line

This commit is contained in:
Chocobo1
2015-07-11 13:51:30 +08:00
parent bbe51268d3
commit a59d1d3240
34 changed files with 207 additions and 182 deletions

5
tools/parse_lookup_log.py Normal file → Executable file
View File

@@ -1,3 +1,4 @@
#!/usr/bin/env python
# this is meant to parse the dht_lookups.log generated by parse_dht_log.py
import os
@@ -82,14 +83,14 @@ for l in f:
dst = '0.0.0.0'
if not dst in nodes:
nodes[dst] = { 'conns': set(), 'p': p, 'c': 'blue', 's': 'circle'}
p = calculate_pos(l[2], 25)
dst = '255.255.255.255'
if not dst in nodes:
nodes[dst] = { 'conns': set(), 'p': p, 'c': 'yellow', 's': 'circle'}
elif kind == '->':
dst = l[3]
if not dst in nodes:
src = get_origin(dst)
p = calculate_pos(l[2], int(l[1]))