Skip to content

Instantly share code, notes, and snippets.

View matt-bernhardt's full-sized avatar
💭
Learning Rails...

Matthew Bernhardt matt-bernhardt

💭
Learning Rails...
View GitHub Profile
@matt-bernhardt
matt-bernhardt / Crew_Attendance.csv
Last active August 29, 2015 13:59
Crew_Attendance.csv
MatchTime CrewScore Opponent OppScore VenueName Attendance Temperature Year Month Day DaysSince NewVenue DaysSinceCategory
4/13/1996 19:30 4 D.C. United 0 Ohio Stadium 25266 60 1996 4 13 1 Opener
4/20/1996 19:30 1 Tampa Bay Mutiny 2 Ohio Stadium 24343 66 1996 4 20 7 2 One Week
5/11/1996 0:00 3 New England Revolution 2 Ohio Stadium 24750 56 1996 5 11 20 3 Three Weeks
5/19/1996 0:00 2 Colorado Rapids 4 Ohio Stadium 20184 78 1996 5 19 8 4 One Week
6/8/1996 0:00 3 Sporting Kansas City 3 Ohio Stadium 16526 67 1996 6 8 20 5 Three Weeks
6/19/1996 0:00 2 Colorado Rapids 2 Ohio Stadium 13093 78 1996 6 19 11 6 One Week
6/30/1996 0:00 0 Red Bull New York 4 Ohio Stadium 17261 84 1996 6 30 11 7 One Week
7/11/1996 0:00 1 New England Revolution 1 Ohio Stadium 13751 68 1996 7 11 11 8 One Week
7/20/1996 0:00 3 San Jose Earthquakes 4 Ohio Stadium 18156 67 1996 7 20 9 9 One Week
@matt-bernhardt
matt-bernhardt / load-hours.js
Last active August 29, 2015 14:00
A bit of javascript to dynamically load library hours
/*globals jQuery,document,console */
function FindToday(testDay) {
'use strict';
var today, d, m, yy;
if (!testDay) {
today = new Date();
d = today.getDate();
m = today.getMonth() + 1;
yy = today.getFullYear();
today = m + '/' + d + '/' + yy;
@matt-bernhardt
matt-bernhardt / graph_explorer.html
Created July 28, 2014 21:41
Interactive alteration of force-directed graph visualization
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>D3 Vision Quest - Network Explorer</title>
<script src="/scripts/jquery-1.9.1.js"></script>
<script src="/scripts/d3.v3.min.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="/styles/reset.css">
<link rel="stylesheet" type="text/css" href="/styles/d3vq.css">
<style type="text/css">
@matt-bernhardt
matt-bernhardt / footer.html
Created August 7, 2014 13:44
LibGuides Group - L&T
@matt-bernhardt
matt-bernhardt / css-js.html
Last active August 29, 2015 14:05
Libguides Group - Moth Design
<meta name="viewport" content="width=device-width, maximum-scale=1">
<style>
/*
*** Libguides overrides
*/
body {
font-size: 16px;
}
footer h4 {
font: inherit;
@matt-bernhardt
matt-bernhardt / 1_about.txt
Last active August 29, 2015 14:05
Libguides Group - L&T Fallback
This gist contains code for the current (August 15, 2014) theme in use on libguides.mit.edu.
@matt-bernhardt
matt-bernhardt / goals_by_ppg.vbs
Last active August 29, 2015 14:06
Goals by PPG
Option Explicit
Dim oFSO
Dim LogFile 'logfile object
Dim conn 'db connection
Dim cst 'db connection string
Dim rs, rs1 'recordset object
Dim SQL 'SQL query statement
Dim x,y,z 'counter variables
Dim strLogFile 'Files created by this script
@matt-bernhardt
matt-bernhardt / crew-impact-table-141110.csv
Created October 7, 2014 17:20
Columbus Crew Impact Data - 10/7/2014
## ID Player Name Team Minutes Team Minutes Pctg Plus PlusRate TeamPlus PctgPlus Minus MinusRate TeamMinus PctgMinus Scoring ScoringRate Difference
91 3672 Bernardo Anor Columbus Crew 1484 2793 0.53 18 82.4 44 0.41 20 74.2 38 0.53 38 39.1 -2
92 3871 Jairo Arrieta Columbus Crew 1157 2793 0.41 17 68.1 44 0.39 15 77.1 38 0.39 32 36.2 2
93 4198 Fifi Baiden Columbus Crew 17 2793 0.01 0 44 0.00 2 8.5 38 0.05 2 8.5 -2
94 3901 Chad Barson Columbus Crew 734 2793 0.26 12 61.2 44 0.27 14 52.4 38 0.37 26 28.2 -2
95 4155 Adam Bedell Columbus Crew 632 2793 0.23 13 48.6 44 0.30 11 57.5 38 0.29 24 26.3 2
96 4145 Steve Clark Columbus Crew 2790 2793 1.00 44 63.4 44 1.00 38 73.4 38 1.00 82 34.0 6
97 3863 Ethan Finlay Columbus Crew 1654 2793 0.59 33 50.1 44 0.75 25 66.2 38 0.66 58 28.5 8
98 4154 Waylon Francis Columbus Crew 2021 2793 0.72 32 63.2 44 0.73 26 77.7 38 0.68 58 34.8 6
99 4238 Romain Gall Columbus Crew 16 2793 0.01 0 44 0.00 0 38 0.00 0 0
@matt-bernhardt
matt-bernhardt / 2015-mls-schedule.csv
Last active December 10, 2015 00:52
This is a CSV formatted version of the 2015 MLS regular season schedule. I pulled this off the MLS website on January 10, 2015 at http://www.mlssoccer.com/schedule?month=all&year=2015&club=all&competition_type=46&broadcast_type=all&op=Search&form_id=mls_schedule_form using a mix of Processing, jSoup, and OpenRefine. I've tried not to introduce a…
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 10.
MatchTime,Weekday,Month,Day,Year,Time,Composite,Home,Away,Stadium
"Friday, March 6, 2015 10:00PM EST",Friday,March,06,2015,20:00,2015-03-06 20:00,LA Galaxy,Chicago,StubHub Center
"Saturday, March 7, 2015 3:00PM EST",Saturday,March,07,2015,15:00,2015-03-07 15:00,D.C. United,Montreal,RFK Stadium
"Saturday, March 7, 2015 4:00PM EST",Saturday,March,07,2015,16:00,2015-03-07 16:00,Philadelphia,Colorado,PPL Park
"Saturday, March 7, 2015 6:00PM EST",Saturday,March,07,2015,18:00,2015-03-07 18:00,Vancouver,Toronto FC,BC Place
"Saturday, March 7, 2015 8:30PM EST",Saturday,March,07,2015,20:30,2015-03-07 20:30,FC Dallas,San Jose,Toyota Stadium
"Saturday, March 7, 2015 8:30PM EST",Saturday,March,07,2015,20:30,2015-03-07 20:30,Houston,Columbus,BBVA Compass Stadium
"Saturday, March 7, 2015 10:30PM EST",Saturday,March,07,2015,20:30,2015-03-07 20:30,Portland,Real Salt Lake,Providence Park
"Sunday, March 8, 2015 5:00PM EDT",Sunday,March,08,2015,17:00,2015-03-08 17:00,Orlando,New York City,Orlando Citrus Bowl
"Sunday, March 8, 2
@matt-bernhardt
matt-bernhardt / html_scraper_schedule.pde
Created January 10, 2015 06:13
The Processing sketch used to scrape the 2015 MLS schedule into a CSV format. The output of this sketch was parsed further in OpenRefine, and posted at https://gist.github.com/matt-bernhardt/7443a60c67dd69d231d5
/* HTML Scraper via jSoup
* ---
* This takes a URL (at url in setup() )
* and crawls the returned markup via the pattern defined in doc.select()
* This version then dumps the resulting content into a text file
* for further processing with Google Refine
*/
// Import libraries
import org.jsoup.safety.*;