diff options
Diffstat (limited to 'experiments/build_network.py')
| -rw-r--r-- | experiments/build_network.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/experiments/build_network.py b/experiments/build_network.py index fd7179f..0756ded 100644 --- a/experiments/build_network.py +++ b/experiments/build_network.py @@ -7,7 +7,7 @@ from os.path import splitext def build_network(filename): victims = {} non_victims = {} - age = 0. + age = 0 with open(filename) as fh: reader = DictReader(fh) for row in reader: @@ -15,7 +15,7 @@ def build_network(filename): dist = int(row["dist"]) w1, w2, w3 = float(row["w1"]), float(row["w2"]), float(row["w3"]) # if int(float(row["dist"])) > 1: - # continue + # continue # 'to' is a victim if row["t2"] != "NA": dt = int(row["t2"]) - int(row["t1"]) @@ -43,6 +43,7 @@ def build_network(filename): if not victims[victim]: del victims[victim] root_victims[victim] = [] + print len(root_victims), len(victims), len(non_victims) return root_victims, victims, non_victims, age @@ -53,5 +54,4 @@ if __name__ == "__main__": filename = sys.argv[1] root, _ = splitext(filename) root_victims, victims, non_victims, age = build_network(filename) - print age dump((root_victims, victims, non_victims, age), open(root + ".pickle", "w")) |
