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 / 2017cmpmo_teams.csv
Created April 29, 2017 21:00
2017 St. Louis Champs Team Breakdown
State Teams
Ontario 34
Minnesota 30
Illinois 14
Indiana 15
Maryland 10
Texas 2
Wisconsin 17
Iowa 6
Noord-Brabant 1
@phil-lopreiato
phil-lopreiato / ein_by_state.csv
Created April 29, 2017 20:57
St. Louis Einstein Teams by State
State Teams
Ontario 3
Pennsylvania 1
Michigan 6
West Virginia 1
Virginia 2
Minnesota 1
New Jersey 1
Connecticut 1
New York 2
public class BasicOperations
{
public static void main(String[] args)
{
int x1 = 10, x2 = 10;
int y = 3 + (--x1);
int z = 3 + (x2--);
System.out.println("Result y = " + y);
System.out.println("Result z = " + z);
x1 += 9;
@phil-lopreiato
phil-lopreiato / tba-swagger.json
Created July 20, 2016 22:58
Swagger Spec for TBA API v2
{
"swagger": "2.0",
"info": {
"title": "The Blue Alliance API",
"description": "Access data about the FIRST Robotics Competition",
"version": "2"
},
"host": "www.thebluealliance.com",
"schemes": [
"http"
@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
"""
@phil-lopreiato
phil-lopreiato / request.txt
Created April 27, 2016 02:05
City Google Places API Request
$ http https://maps.googleapis.com/maps/api/place/details/json?key=API_KEY&placeid=ChIJOwg_06VPwokRYv534QaPC8g
{
"html_attributions": [
],
"result": {
"address_components": [
{
"long_name": "New York",
"short_name": "New York",
@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 / 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 / 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
([{'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