This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lcu_driver import MultipleClientConnector | |
@connector.ws.register("/lol-champ-select/v1/session") | |
async def champ_select_listener(connection, event): | |
# Happens sometimes, need to properly analyze it | |
if not event.data: | |
return | |
# This is simply an ongoing draft, we exit after having written the draft | |
if event.data["timer"].get("phase") not in ["", "FINALIZATION", "GAME_STARTING"]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import math | |
import tabulate | |
import pandas as pd | |
import matplotlib | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import scipy.stats as stats | |
from collections import defaultdict | |
import trueskill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import splyce_lol_data_commons as sp | |
from collections import defaultdict, Counter | |
import datetime | |
blind_picks = defaultdict(lambda: Counter()) # Very convenient data structure for counting | |
session = sp.get_read_session() # SQLAlchemy session | |
team_name = 'SK Telecom T1' | |
start_date = datetime.date.fromisoformat('2019-06-01')) | |
# First, we get all the games objects as well as the chosen team's id in those games |