mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-14 15:16:18 +00:00
fixed jacob
This commit is contained in:
parent
eb90582db8
commit
9824f9349d
@ -35,6 +35,7 @@ from analysis import analysis as an
|
|||||||
from numba import jit
|
from numba import jit
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pickle
|
import pickle
|
||||||
|
import tba_match_result_request as tba
|
||||||
try:
|
try:
|
||||||
from analysis import trueskill as Trueskill
|
from analysis import trueskill as Trueskill
|
||||||
except:
|
except:
|
||||||
|
@ -3,8 +3,8 @@ def req_event_matches(eventkey,apikey):
|
|||||||
headers={'X-TBA-Auth-Key':apikey}
|
headers={'X-TBA-Auth-Key':apikey}
|
||||||
r=requests.get('https://www.thebluealliance.com/api/v3/event/'+eventkey+'/matches/simple', headers=headers)
|
r=requests.get('https://www.thebluealliance.com/api/v3/event/'+eventkey+'/matches/simple', headers=headers)
|
||||||
return r
|
return r
|
||||||
def sort_through_request(request)
|
def sort_through_request(request):
|
||||||
if request.status_code = 200
|
if request.status_code == 200:
|
||||||
x=[]
|
x=[]
|
||||||
for i in sorted(request.json(), key=lambda i: i['actual_time']):
|
for i in sorted(request.json(), key=lambda i: i['actual_time']):
|
||||||
x.append([[i['alliances']['red']['team_keys'], i['alliances']['blue']['team_keys']],i['winning_alliance']])
|
x.append([[i['alliances']['red']['team_keys'], i['alliances']['blue']['team_keys']],i['winning_alliance']])
|
||||||
|
Loading…
Reference in New Issue
Block a user