Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fangeugene/963495d725978a1fc8d7362c08c20058 to your computer and use it in GitHub Desktop.
Save fangeugene/963495d725978a1fc8d7362c08c20058 to your computer and use it in GitHub Desktop.
Lists team component OPRs that feeds predictions
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