fixed closeness calculation

This commit is contained in:
Kevin Froman 2020-10-26 06:11:24 +00:00
parent 57ec04eff5
commit 4a831a4a4d
3 changed files with 46 additions and 20 deletions

View file

@ -0,0 +1,21 @@
import sys
import os
import subprocess
import base64
if not os.path.exists('onionr.sh'):
os.chdir('../')
sys.path.append("src/")
from streamfill import identify_neighbors
onions = []
p = subprocess.Popen(["scripts/generate-onions.py", '5'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
for line in iter(p.stdout.readline, b''):
line = line.decode()
onions.append(line.strip())
for onion in onions:
print(onion, identify_neighbors(onion, onions, 3))