Skip to content

Instantly share code, notes, and snippets.

View michaelcolenso's full-sized avatar

michael colenso michaelcolenso

View GitHub Profile
testing from iGist
@michaelcolenso
michaelcolenso / yeoGruntfile.js
Created December 12, 2012 06:05
grabbed this from [yeoman-wordpres] b/c I didn't want to fiddle with the python install script that no worky for me. Wordpress development Gruntfile for use with Yeoman.
module.exports = function( grunt ) {
'use strict';
//
// Grunt configuration:
//
// https://github.com/cowboy/grunt/blob/master/docs/getting_started.md
//
grunt.initConfig({
// Project configuration
#star-five {
margin: 50px 0;
position: relative;
display: block;
color: red;
width: 0px;
height: 0px;
border-right: 100px solid transparent;
border-bottom: 70px solid red;
border-left: 100px solid transparent;
var dataset = [];
for (var i = 0; i < 25; i++) {
var newNumber = Math.random() * 30;
dataset.push(newNumber);
}
d3.select(".container").selectAll("div")
.data(dataset)
.enter()
@michaelcolenso
michaelcolenso / rushingleaders.py
Created January 16, 2013 22:01
Top 10 NFL Rushing Leaders - displayed using d3
import nflgame
allweeks = nflgame.games(2012)
players = nflgame.combine(allweeks)
rushers = players.rushing()
top10 = rushers.sort("rushing_yds").limit(10)
top10.csv('top10rushers.csv')
:%!python -m json.tool
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@michaelcolenso
michaelcolenso / index.html
Last active December 13, 2015 17:28
a rather unimpressive pie chart. uses D3, NFL Play by Play Data, and Python.
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<style>