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 models.match import Match | |
matches = Match.query(Match.year==2017).fetch() | |
near_count = 0 | |
middle_count = 0 | |
far_count = 0 | |
for match in matches: | |
for color in ['red', 'blue']: | |
if not match.score_breakdown: |
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 models.subscription import Subscription | |
from collections import defaultdict | |
counts = defaultdict(int) | |
for s in Subscription.query(Subscription.model_type==1).fetch(): | |
counts[s.model_key] += 1 | |
sorted_counts = sorted(counts.items(), key=lambda x: -x[1]) | |
for team, count in sorted_counts[:100]: | |
print team, count |
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 |
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 datetime | |
from models.event import Event | |
events = Event.query().filter( | |
Event.start_date >= datetime.datetime(2017, 3, 29)).filter( | |
Event.start_date <= datetime.datetime(2017, 4, 2)).order( | |
Event.start_date).fetch() | |
gear_stats = {} | |
pressure_stats = {} |
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 consts.event_type import EventType | |
from database.team_query import EventTeamsQuery | |
from database.event_query import TeamYearEventsQuery | |
teams = EventTeamsQuery('2017hop').fetch() | |
team_events_futures = [] | |
for team in teams: | |
team_events_futures.append(TeamYearEventsQuery(team.key.id(), 2017).fetch_async()) |
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
Event Key | Team Key | Date | Time (UTC) | |
---|---|---|---|---|
2018azpx | frc698 | 2017-09-28 | 18:34:16.021150 | |
2018azpx | frc991 | 2017-09-28 | 18:34:16.021360 | |
2018azpx | frc1290 | 2017-09-28 | 18:34:16.021540 | |
2018azpx | frc1492 | 2017-09-28 | 18:34:16.021670 | |
2018azpx | frc1633 | 2017-09-28 | 18:34:16.021980 | |
2018azpx | frc2375 | 2017-09-28 | 18:34:16.022310 | |
2018azpx | frc2403 | 2017-09-28 | 18:34:16.105460 | |
2018azpx | frc2647 | 2017-09-28 | 18:34:16.106810 | |
2018azpx | frc2662 | 2017-09-28 | 18:34:16.108040 |
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
Time | Mode | Red Score | Blue Score | Red Fuel | Blue Fuel | Red Rotors | Blue Rotors | Red Touchpads | Blue Touchpads | |
---|---|---|---|---|---|---|---|---|---|---|
0 | pre_match | 0 | 0 | 0 + 0/9 | 0 + 0/9 | 0 | 0 | 0 | 0 | |
14 | auto | 0 | 0 | 0 + 0/9 | 0 + 0/9 | 0 | 0 | 0 | 0 | |
13 | auto | 0 | 0 | 0 + 0/9 | 0 + 0/9 | 0 | 0 | 0 | 0 | |
12 | auto | 0 | 15 | 0 + 0/9 | 0 + 0/9 | 0 | 0 | 0 | 0 | |
11 | auto | 15 | 15 | 0 + 0/9 | 0 + 0/9 | 0 | 0 | 0 | 0 | |
10 | auto | 15 | 15 | 0 + 0/9 | 0 + 0/9 | 0 | 0 | 0 | 0 | |
9 | auto | 15 | 15 | 0 + 0/9 | 0 + 0/9 | 0 | 0 | 0 | 0 | |
8 | auto | 16 | 15 | 1 + 0/9 | 0 + 0/9 | 0 | 0 | 0 | 0 | |
7 | auto | 21 | 15 | 6 + 0/9 | 0 + 0/9 | 0 | 0 | 0 | 0 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 31 columns, instead of 22. in line 4.
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
time,matchKey,matchName,mode,timeRemaining,redScore,redForceCount,redForcePlayed,redLevitateCount,redLevitatePlayed,redBoostCount,redBoostPlayed,redScaleOwned,redSwitchOwned,redCurrentPowerup,redPowerupTimeRemaining,redAutoQuest,redFaceTheBoss,blueScore,blueForceCount,blueForcePlayed,blueLevitateCount,blueLevitatePlayed,blueBoostCount,blueBoostPlayed,blueScaleOwned,blueSwitchOwned,blueCurrentPowerup,bluePowerupTimeRemaining,blueAutoQuest,blueFaceTheBoss | |
2018-02-17 15:57:54.621448,f1m1,Final 1,auto,14,0,0,False,0,False,0,False,False,False,,,False,False,0,0,False,0,False,0,False,False,False,,,False,False | |
2018-02-17 15:57:55.621448,f1m1,Final 1,auto,13,0,0,False,0,False,0,False,False,False,,,False,False,0,0,False,0,False,0,False,False,False,,,False,False | |
2018-02-17 15:57:56.621448,f1m1,Final 1,auto,12,5,0,False,0,False,0,False,False,False,,,False,False,0,0,False,0,False,0,False,False,False,,,False,False | |
2018-02-17 15:57:57.621448,f1m1,Final 1,auto,11,5,0,False,0,False,0,False,False,False,,,False,False,0,0,False, |
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 consts.account_permissions import AccountPermissions | |
from consts.media_type import MediaType | |
from controllers.suggestions.suggestions_review_base_controller import SuggestionsReviewBaseController | |
from google.appengine.ext import ndb | |
import json | |
from models.media import Media | |
from models.suggestion import Suggestion | |
from helpers.suggestions.media_creator import MediaCreator | |
from helpers.media_manipulator import MediaManipulator | |
from helpers.user_bundle import UserBundle |
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
{"locations": {"frc16": {"loc": "A33", "div": "Carver"}, "frc59": {"loc": "I41", "div": "Hopper"}, "frc100": {"loc": "B34", "div": "Carver"}, "frc108": {"loc": "C29", "div": "Carver"}, "frc118": {"loc": "B04", "div": "Newton"}, "frc120": {"loc": "G16", "div": "Turing"}, "frc148": {"loc": "H40", "div": "Hopper"}, "frc175": {"loc": "D37", "div": "Carver"}, "frc179": {"loc": "E01", "div": "Roebling"}, "frc180": {"loc": "H34", "div": "Hopper"}, "frc254": {"loc": "H33", "div": "Hopper"}, "frc294": {"loc": "H37", "div": "Hopper"}, "frc330": {"loc": "E37", "div": "Galileo"}, "frc341": {"loc": "C32", "div": "Carver"}, "frc342": {"loc": "A32", "div": "Carver"}, "frc343": {"loc": "C36", "div": "Carver"}, "frc359": {"loc": "H38", "div": "Hopper"}, "frc360": {"loc": "H02", "div": "Turing"}, "frc364": {"loc": "G09", "div": "Turing"}, "frc368": {"loc": "E38", "div": "Galileo"}, "frc399": {"loc": "G34", "div": "Hopper"}, "frc418": {"loc": "A37", "div": "Carver"}, "frc456": {"loc": "H25", "div": "Hopper"}, "frc488": {"loc": |
OlderNewer