Skip to content

Instantly share code, notes, and snippets.

View phil-lopreiato's full-sized avatar

Phil Lopreiato phil-lopreiato

View GitHub Profile
@phil-lopreiato
phil-lopreiato / arc.csv
Last active August 29, 2015 14:19
2015cmp Results. Formatted <match>, <red teams>, <blue teams>, <red score>, <blue score>
qm1 2914 360 207 1706 2907 2363 97 91
qm2 5464 115 1700 135 3357 1640 53 134
qm3 3103 4207 3238 691 1310 5048 33 10
qm4 4451 217 857 2383 2655 2619 128 138
qm5 2220 1538 2338 378 122 2013 126 31
qm6 3322 2974 5571 201 5667 5581 108 24
qm7 4977 3996 3278 623 51 68 144 129
qm8 2342 3284 1572 5212 108 314 91 68
qm9 5692 3602 1023 1322 280 4213 93 140
qm10 4364 5162 1701 41 931 5505 52 7
@phil-lopreiato
phil-lopreiato / convert.py
Created April 24, 2015 00:13
Hacky 2015cmp Results Script
import xlrd
import csv
def clean(cell):
bad_chars = ['(', ')', '*']
val = str(cell.value)
val = val.translate(None, ''.join(bad_chars))
return int(float(val))
@phil-lopreiato
phil-lopreiato / arc.csv
Created April 24, 2015 15:40
2015 CMP Schedules
qm1 2914 360 207 1706 2907 2363
qm2 5464 115 1700 135 3357 1640
qm3 3103 4207 3238 691 1310 5048
qm4 4451 217 857 2383 2655 2619
qm5 2220 1538 2338 378 122 2013
qm6 3322 2974 5571 201 5667 5581
qm7 4977 3996 3278 623 51 68
qm8 2342 3284 1572 5212 108 314
qm9 5692 3602 1023 1322 280 4213
qm10 4364 5162 1701 41 931 5505
@phil-lopreiato
phil-lopreiato / resultsSince2011.txt
Last active January 12, 2016 22:42
Percentage of FRC Teams winning their events as top seed
[u'2011arc', u'2011az', u'2011ca', u'2011co', u'2011ct', u'2011cur', u'2011da', u'2011dc', u'2011dmn', u'2011dt', u'2011fl', u'2011ga', u'2011gal', u'2011gg', u'2011gl', u'2011gt', u'2011hi', u'2011il', u'2011in', u'2011is', u'2011kc', u'2011la', u'2011li', u'2011ma', u'2011md', u'2011mi', u'2011mn', u'2011mn2', u'2011mo', u'2011nc', u'2011new', u'2011nh', u'2011nj', u'2011nv', u'2011ny', u'2011oc', u'2011oc1', u'2011oh', u'2011ok', u'2011on', u'2011on2', u'2011or', u'2011pa', u'2011pit', u'2011roc', u'2011sac', u'2011sc', u'2011sdc', u'2011sj', u'2011stx', u'2011swm', u'2011tn', u'2011tx', u'2011ut', u'2011va', u'2011wa', u'2011wa2', u'2011wat', u'2011wc', u'2011wi', u'2011wor', u'2011ww', u'2012arc', u'2012az', u'2012ca', u'2012caf', u'2012co', u'2012ct', u'2012cur', u'2012da', u'2012da2', u'2012dc', u'2012dmn', u'2012dt', u'2012fl', u'2012ga', u'2012gal', u'2012gg', u'2012gl', u'2012gt', u'2012hi', u'2012il', u'2012in', u'2012is', u'2012kc', u'2012la', u'2012li', u'2012ma', u'2012md', u'2012mi', u'2012migl
{"2010arc": [{"declines": [], "picks": ["frc254", "frc233", "frc3357"]}, {"declines": [], "picks": ["frc330", "frc25", "frc1622"]}, {"declines": [], "picks": ["frc33", "frc148", "frc201"]}, {"declines": [], "picks": ["frc1124", "frc968", "frc2062"]}, {"declines": [], "picks": ["frc604", "frc341", "frc3256"]}, {"declines": [], "picks": ["frc3280", "frc359", "frc71"]}, {"declines": [], "picks": ["frc1519", "frc1918", "frc70"]}, {"declines": [], "picks": ["frc1730", "frc234", "frc1218"]}], "2010mn2": [{"declines": [], "picks": ["frc71", "frc1986", "frc2667"]}, {"declines": [], "picks": ["frc171", "frc537", "frc2041"]}, {"declines": [], "picks": ["frc2823", "frc3102", "frc3026"]}, {"declines": [], "picks": ["frc3291", "frc2512", "frc2225"]}, {"declines": [], "picks": ["frc2418", "frc876", "frc1816"]}, {"declines": [], "picks": ["frc2220", "frc2143", "frc2535"]}, {"declines": [], "picks": ["frc1764", "frc2472", "frc1675"]}, {"declines": [], "picks": ["frc3292", "frc1652", "frc2977"]}], "2010tx": [{"declines": [],
([{'team_number_list': [694], 'name_str': u"Regional Chairman's Award", 'award_type_enum': 0, 'recipient_json_list': ['{"awardee": null, "team_number": 694}']}, {'team_number_list': [1124, 383, 102], 'name_str': u'Winner', 'award_type_enum': 1, 'recipient_json_list': ['{"awardee": null, "team_number": 1124}', '{"awardee": null, "team_number": 383}', '{"awardee": null, "team_number": 102}']}, {'team_number_list': [230, 1501, 61], 'name_str': u'Finalist', 'award_type_enum': 2, 'recipient_json_list': ['{"awardee": null, "team_number": 230}', '{"awardee": null, "team_number": 1501}', '{"awardee": null, "team_number": 61}']}, {'team_number_list': [], 'name_str': u'Woodie Flowers Award', 'award_type_enum': 3, 'recipient_json_list': ['{"awardee": "William Pease", "team_number": null}']}, {'team_number_list': [], 'name_str': u"FIRST Dean's List Finalist Award", 'award_type_enum': 4, 'recipient_json_list': ['{"awardee": "Katherine Desy", "team_number": null}', '{"awardee": "Emily Spoldi", "team_number": null}']}, {'te
@phil-lopreiato
phil-lopreiato / topevents.py
Created April 3, 2016 03:08
Script to find highest breach and capture rates
#! /usr/bin/python
import argparse
import json
import urllib2
"""
A script to determine the 2016 FRC events with highest capture/breach rates
Takes further http://www.chiefdelphi.com/forums/showpost.php?p=1566654&postcount=41
@phil-lopreiato
phil-lopreiato / octo_alliances.json
Last active April 4, 2016 18:37
Staging Octofinal Data
{
"Alliances": [
{
"number": 1,
"name": "Alliance 1",
"captain": 573,
"round1": 812,
"round2": 589,
"round3": null,
"backup": null,
@phil-lopreiato
phil-lopreiato / 2016-against.csv
Created April 19, 2016 19:28
2016 FRC Scheduling With/Against
Event Key Mean Median Max Min
2016abca 27.0 27.0 30 24
2016alhu 29.372549019607842 30 30 27
2016arlr 31.591836734693878 32 34 28
2016ausy 28.27906976744186 28 30 26
2016azfl 29.653846153846153 30.0 32 28
2016azpx 31.72093023255814 32 36 28
2016cada 24.0 24.0 24 24
2016calb 24.0 24.0 24 24
2016cama 29.306122448979593 29 32 27
@phil-lopreiato
phil-lopreiato / oprstats.py
Created July 16, 2016 03:36
OPR Stats Data Script
#! /usr/bin/python
import argparse
import csv
import json
import urllib2
from collections import defaultdict
"""