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 / FIM_YT_uploads.csv
Last active August 29, 2015 13:57
All uploads to the FIM Youtube Account
title youtube_key
Q-079 - Kettering District - 2014 K1ljs3uLSXI
Finals 1-2 - St. Joseph District - 2014 C35q1NmIQZI
Finals 1-1 - St. Joseph District - 2014 Hrg2Qxry4oo
Semifinals 1-3 - St. Joseph District - 2014 fW0ySG6S8wE
Semifinals 1-2 - St. Joseph District - 2014 RynP0vdFbqk
Semifinals 2-1 - St. Joseph District - 2014 XM8i_tDYAUk
Semifinals 1-1 - St. Joseph District - 2014 xzoA-8ZZDO8
Quarterfinals 2-3 - St. Joseph District - 2014 TgouiCY1Y0g
Quarterfinals 1-3 - St. Joseph District - 2014 qQBuwig2-dw
@phil-lopreiato
phil-lopreiato / parse_csv.py
Last active August 29, 2015 14:02
FRC Twitter Data 2012 - 2014
import csv
import json
with open("2012_data.csv") as data:
reader = csv.reader(data, delimiter=',', quoting=csv.QUOTE_NONE)
reader.next()
matches = []
for line in reader:
match = {}
match["eventKey"] = "2012"+line[0]
@phil-lopreiato
phil-lopreiato / deploy.sh
Last active August 29, 2015 14:05
Script to deploy TBA to App Engine, then generate and include the endpoints library
#! /bin/bash
perl -pi -e 's/tbatv-dev-hrd/tba-dev-phil/g' ~/Documents/Code/the-blue-alliance/app.yaml
./appcfg.py --oauth2 rollback ~/Documents/Code/the-blue-alliance/
# Replace cron.yaml with a different file to disable cron jobs
mv ~/Documents/Code/the-blue-alliance/cron.yaml ~/Documents/Code/the-blue-alliance/cron.yaml.bak
cp ~/Documents/Code/cron.yaml.simple ~/Documents/Code/the-blue-alliance/cron.yaml
./appcfg.py --oauth2 update ~/Documents/Code/the-blue-alliance/
@phil-lopreiato
phil-lopreiato / push_sitevars
Created August 30, 2014 01:55
Push Sitevars
These can all be added from APIs and Auth -> Credentials in the App Engine control panel
1. gcm.serverKey - Make sure you've enabled "Google Cloud Messaging for Android" API in the APIs section. Create a new server key for Public API Access.
2. appengine.webClientId - Create a new oauth Client ID for a web application
3. android.clientId - Create a new oauth Client ID for an Android Application. Include the package name and key fingerprint
@phil-lopreiato
phil-lopreiato / delta.sh
Created September 29, 2014 16:20
A script for checking when websites have changed and notifying via email
#!/bin/bash
CHANGED=()
abs=/abs/path/to/script/
# if we're calling from cronjob, use absolute path
if [ "$abs" == $(pwd) ]; then
pref=
else
pref=$abs
fi
@phil-lopreiato
phil-lopreiato / 2015njfla_matches.csv
Created March 10, 2015 02:07
2015 Mt. Olive matches
2015 njfla q 1 http://www.youtube.com/watch?v=9JMpH3JwEBw
2015 njfla q 2 http://www.youtube.com/watch?v=K3H943Y7ejA
2015 njfla q 3 http://www.youtube.com/watch?v=xq-me-urTog
2015 njfla q 4 http://www.youtube.com/watch?v=baoiIwxA2y0
2015 njfla q 5 http://www.youtube.com/watch?v=X4FMkTNWNrY
2015 njfla q 6 http://www.youtube.com/watch?v=Q4EIbBtWVzg
2015 njfla q 7 http://www.youtube.com/watch?v=oZOPWCOJiMw
2015 njfla q 8 http://www.youtube.com/watch?v=IaCWUdWgIdo
2015 njfla q 9 http://www.youtube.com/watch?v=_i1gPyGjsRU
2015 njfla q 10 http://www.youtube.com/watch?v=11t2IMpg_AM
@phil-lopreiato
phil-lopreiato / GroupPresentation1.tex
Created March 29, 2015 23:52
latex file for MATH3632 Group Problem #1
\documentclass{amsart}
\usepackage{amssymb,amsmath,latexsym,times,tikz, enumitem}
\pagestyle{empty}
\begin{document}
\hrule
\vspace{1pt}
@phil-lopreiato
phil-lopreiato / Archimedes-teams.csv
Last active August 29, 2015 14:19
2015 CMP Teams
41 51 68 108 115 122 135 188 201 207 217 234 280 314 360 378 503 623 691 836 857 931 1023 1089 1310 1322 1538 1572 1640 1648 1700 1701 1706 1714 1785 2013 2220 2338 2342 2363 2383 2522 2605 2619 2655 2848 2907 2914 2974 3103 3238 3278 3284 3322 3357 3602 3996 4010 4201 4207 4213 4334 4364 4451 4977 5048 5162 5212 5403 5464 5505 5536 5571 5581 5667 5687 5692
@phil-lopreiato
phil-lopreiato / arc.csv
Last active August 29, 2015 14:19
2015 FRC CMP Preliminary Qual Schedules
Thu 8:30 Qualification 1 1 1706 2907 2363 2914 360 207
Thu 8:37 Qualification 2 2 135 3357 1640 5464 115 1700
Thu 8:44 Qualification 3 3 691 1310 5048 3103 4207 3238
Thu 8:51 Qualification 4 4 2383 2655 2619 4451 217 857
Thu 8:58 Qualification 5 5 378 122 2013 2220 1538 2338
Thu 9:05 Qualification 6 6 201 5667 5581 3322 2974 5571
Thu 9:12 Qualification 7 7 623 51 68 4977 3996 3278
Thu 9:19 Qualification 8 8 5212 108 314 2342 3284 1572
Thu 9:26 Qualification 9 9 1322 280 4213 5692 3602 1023
Thu 9:33 Qualification 10 10 41 931 5505 4364 5162 1701
@phil-lopreiato
phil-lopreiato / arc.csv
Last active August 29, 2015 14:19
2015 FRC CMP Preliminary Qual Schedules For TBA
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