Fix4Windowsv2.
This commit is contained in:
parent
049a5b2917
commit
4670ddbabc
|
@ -14,7 +14,7 @@ def dota2_players(context: Context) -> Prediction:
|
||||||
|
|
||||||
# Find the historic data closest matching the current number of players. Lol yolo
|
# Find the historic data closest matching the current number of players. Lol yolo
|
||||||
current_players = get_dota2_players()
|
current_players = get_dota2_players()
|
||||||
with Path(__file__).parent.joinpath("dotaplayers-2019-04-06-13:43:33.074496.csv").open() as csv:
|
with Path(__file__).parent.joinpath("dotaplayers-2019-04-06-13-43-33.074496.csv").open() as csv:
|
||||||
best_players, best_dt = min(csv, key=lambda l: abs(int(l.rstrip().split(", ")[0]) - current_players)).rstrip().split(", ")
|
best_players, best_dt = min(csv, key=lambda l: abs(int(l.rstrip().split(", ")[0]) - current_players)).rstrip().split(", ")
|
||||||
best_match_players = int(best_players)
|
best_match_players = int(best_players)
|
||||||
best_match_datetime = datetime.strptime(best_dt, "%Y-%m-%d %H:%M:%S.%f")
|
best_match_datetime = datetime.strptime(best_dt, "%Y-%m-%d %H:%M:%S.%f")
|
||||||
|
|
Loading…
Reference in a new issue