Skip to content

Instantly share code, notes, and snippets.

View ZachOrr's full-sized avatar
🤖
TBA

Zachary Orr ZachOrr

🤖
TBA
View GitHub Profile
<script src="http://d3js.org/d3.v3.js"></script>
<div class="well" id="graphzor">
<form>
<div class="btn-group" data-toggle="buttons-checkbox" style="margin-left: 50px;">
<button type="button" id="auton" class="btn btn-primary active">Autonomous</button>
<button type="button" id="teleop" class="btn btn-danger active">Teleoperated</button>
<button type="button" id="climb" class="btn btn-warning active">Climb (End Game)</button>
</div>
</form>
<script>
@ZachOrr
ZachOrr / email.md
Created February 15, 2014 03:04
An email I sent to FIRST, highlighting some of the issues developers have with their platform

(I’m not sure if this will be used in a Frank Answers Friday, since this is the same email address, so I’ll provide the information usually asked for. My name is Zachary Orr. I’m a MC in Michigan - not associated with a team - and I run Megaphone, a service that provides FIRSTers with text messages in real time when their favorite teams win or lose their matches, and automatically updates their team’s Twitter account to keep friends and family up to date with how they’re doing at competitions)

Earlier on Twitter I asked @FRCTeams about an example event page for the 2014 season. A lot of developers (including but not limited to the hardworking developers behind The Blue Alliance, FRC Spyder, and FRC Tracker) rely on parsing these web pages, due to the lack of a publicly available API for ranking, award, and alliance selection information. In the past, there’ve been minor changes from o

import requests
import xmldict
def main():
r = requests.get("http://www.chiefdelphi.com/forums/frcspy.php?xml=2")
matches = xmldict.xml_to_dict(r.content)
upset = 0
total = 0
http://www.thebluealliance.com/event/2013marc
http://www.thebluealliance.com/event/2013mikk
http://www.thebluealliance.com/event/2013mibed
http://www.thebluealliance.com/event/2013mitry
http://www.thebluealliance.com/event/2013migbl
http://www.thebluealliance.com/event/2013miwfd
Kettering Kickoff 2012
MARC 2012
http://www.thebluealliance.com/events/2012
http://www.thebluealliance.com/event/2012gl
This file has been truncated, but you can view the full file.
2014-05-25 21:31:29.592 the-blue-alliance-ios[63826:3e03] *** Terminating app due to uncaught exception 'Invalid CSV line: values count doesn't match key count', reason: 'keys(5) = (
"team_number",
name,
nickname,
location,
website
), values(2) = (
4,
"Gibbs CAM/SolidWorks\U2f00\U5300\U6100\U7700\U6900\U6e00\U6700\U2000\U5300\U6500\U7200\U7600\U6900\U6300\U6500\U7300\U2f00\U4e00\U4100\U5300\U4100\U2f00\U5700\U4100\U4100\U4700\U2f00\U4600\U7500\U6c00\U6c00\U2000\U5300\U6300\U6100\U6c00\U6500\U2000\U4500\U6600\U6600\U6500\U6300\U7400\U7300\U2f00\U5200\U6f00\U6200\U6500\U7200\U7400\U7300\U2000\U5400\U6f00\U6f00\U6c00\U2000\U4300\U6f00\U2e00\U2f00\U5400\U6800\U6f00\U6d00\U7300\U6f00\U6e00\U2000\U2600\U2000\U4800\U6900\U6700\U6800\U5400\U6500\U6300\U6800\U2d00\U4c00\U6f00\U7300\U2000\U4100\U6e00\U6700\U6500\U6c00\U6500\U7300\U2c00\U5400\U6500\U6100\U6d00\U2000\U3400\U2000\U4500\U4c00\U4500\U4d00\U4500\U4e00\U5400\U2c00\U2200\U5600\U6100\U6e00\U2000\U4e00\U7500\U7900\U7300\U2c00\U2000\U4
This file has been truncated, but you can view the full file.
2014-05-25 21:31:22.103 the-blue-alliance-ios[63826:3e03] Invalid CSV line: (
4,
"Gibbs CAM/SolidWorks\U2f00\U5300\U6100\U7700\U6900\U6e00\U6700\U2000\U5300\U6500\U7200\U7600\U6900\U6300\U6500\U7300\U2f00\U4e00\U4100\U5300\U4100\U2f00\U5700\U4100\U4100\U4700\U2f00\U4600\U7500\U6c00\U6c00\U2000\U5300\U6300\U6100\U6c00\U6500\U2000\U4500\U6600\U6600\U6500\U6300\U7400\U7300\U2f00\U5200\U6f00\U6200\U6500\U7200\U7400\U7300\U2000\U5400\U6f00\U6f00\U6c00\U2000\U4300\U6f00\U2e00\U2f00\U5400\U6800\U6f00\U6d00\U7300\U6f00\U6e00\U2000\U2600\U2000\U4800\U6900\U6700\U6800\U5400\U6500\U6300\U6800\U2d00\U4c00\U6f00\U7300\U2000\U4100\U6e00\U6700\U6500\U6c00\U6500\U7300\U2c00\U5400\U6500\U6100\U6d00\U2000\U3400\U2000\U4500\U4c00\U4500\U4d00\U4500\U4e00\U5400\U2c00\U2200\U5600\U6100\U6e00\U2000\U4e00\U7500\U7900\U7300\U2c00\U2000\U4300\U4100\U2c00\U2000\U5500\U5300\U4100\U2200\U2c00\U6800\U7400\U7400\U7000\U3a00\U2f00\U2f00\U7700\U7700\U7700\U2e00\U7400\U6500\U6100\U6d00\U3400\U6500\U6c00\U6500\U6d00\U6500\U6e00\U7400\U
// Needs CoreImage.framework
- (UIImage *)blurredImageWithImage:(UIImage *)sourceImage{
// Create our blurred image
CIContext *context = [CIContext contextWithOptions:nil];
CIImage *inputImage = [CIImage imageWithCGImage:sourceImage.CGImage];
// Setting up Gaussian Blur
CIFilter *filter = [CIFilter filterWithName:@"CIGaussianBlur"];
@ZachOrr
ZachOrr / gist:1321456
Created October 28, 2011 02:04
Load Spotify Playlists
sp_playlistcontainer *pc = sp_session_playlistcontainer(session);
for(int i = 0; i < sp_playlistcontainer_num_playlists(pc); i++){
sp_playlist *pl = sp_playlistcontainer_playlist(pc, i);
const char *name;
name = sp_playlist_name(pl);
NSLog(@"Name of playlist %d = %s\n", i, name);
@ZachOrr
ZachOrr / gist:2714950
Created May 16, 2012 23:43
ZachOrr brew doctor (ettercap issue)
Your system is raring to brew.
@ZachOrr
ZachOrr / gist:2714945
Created May 16, 2012 23:43
ZachOrr brew --config (ettercap issue)
HOMEBREW_VERSION: 0.9
HEAD: 1e7b63da4bfd3fc406107adcea41e4c656e990e5
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.3.2
GCC-4.0: N/A
GCC-4.2: N/A