Created
April 3, 2017 01:10
-
-
Save fangeugene/963495d725978a1fc8d7362c08c20058 to your computer and use it in GitHub Desktop.
Lists team component OPRs that feeds predictions
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 helpers.event_helper import EventHelper | |
events = EventHelper.getWeekEvents() | |
gear_stats = {} | |
for event in events: | |
predictions = event.details.predictions | |
if predictions and predictions.get('stat_mean_vars'): | |
for team, val in predictions['stat_mean_vars']['qual']['gears']['mean'].items(): | |
gear_stats[team] = val | |
for team, val in sorted(gear_stats.items(), key=lambda x: -x[1]): | |
print team, val |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment