Skip to content

Commit

Permalink
fixed names
Browse files Browse the repository at this point in the history
  • Loading branch information
Martino Trevisan committed Apr 2, 2020
1 parent 09fa936 commit 7168a46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file renamed profile_distribution.pickle → models.pickle
Binary file not shown.
6 changes: 3 additions & 3 deletions sample_from_distribution.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import pickle
import sys

DIST_FILE = "profile_distribution.pickle"
DIST_FILE = "models.pickle"
profiles = pickle.load(open(DIST_FILE, "rb"))

# Parse Args
_, operator, country, rat, quality = sys.argv

# Test profile exists
try:
_ = profiles.loc[(operator,country,rat, quality, "no_roaming")]
_ = profiles.loc[(operator,country,rat, quality)]
except:
print("error")
exit(1)

# Sample
while True:
down, up, rtt = profiles.loc[(operator,country,rat, quality, "no_roaming")].kde.resample(1).transpose().squeeze()
down, up, rtt = profiles.loc[(operator,country,rat, quality)].kde.resample(1).transpose().squeeze()
if down > 0 and up > 0 and rtt > 0:
break

Expand Down

0 comments on commit 7168a46

Please sign in to comment.