Skip to content

Instantly share code, notes, and snippets.

@bycoffe
bycoffe / index.html
Created August 7, 2012 16:29 — forked from enjalot/index.html
Simple Pie Chart example with D3.js
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Testing Pie Chart</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.1.3"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.1.3"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.1.3"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
#!/usr/bin/python
'''
Python-based gift exchange randomizer.
Step through a list of people and, for each member of that list,
select someone else to be a recipient of their gift. That recipient:
A) Must not be themselves (no self-gifting)
B) Must not already have been assigned as a recipient
@bycoffe
bycoffe / csvcut
Created September 15, 2009 13:08 — forked from JoeGermuska/csvcut
#!/usr/bin/env python
"""
Like cut, but for CSVs. To be used from a shell command line.
Note that fields are zero-based, as opposed to 'cut' where they are 1-based.
Should use something better than getopt, but this works...
Usage:
csvcut foobar.csv
@bycoffe
bycoffe / csvcut
Created September 14, 2009 18:19 — forked from JoeGermuska/csvcut
#!/usr/bin/env python
"""
Like cut, but for CSVs. To be used from a shell command line.
Note that fields are zero-based, as opposed to 'cut' where they are 1-based.
Leveraged from/motivated by an example from @bycoffe
Usage:
csvcut foobar.csv