Skip to content

Instantly share code, notes, and snippets.

View mattevenson's full-sized avatar

Matt Evenson mattevenson

  • America/New_York
View GitHub Profile
{
"name": "Hello World",
"developer_id": "09509742-f473-41bb-9e8b-bbdcd6111011"
}
@mattevenson
mattevenson / Makefile
Last active January 30, 2019 05:24
Split test code for Akhil
CXX = g++
CXXFLAGS = -g -Wall -std=c++11
SPLIT_TEST = SPLIT_TEST
SPLIT_CATCH = split_catch.cpp
SPLIT = split.cpp
all: $(SPLIT_TEST)
run: all
@mattevenson
mattevenson / README.md
Last active July 16, 2018 18:42 — forked from michellechandra/README.md
Basic US State Map - D3
@mattevenson
mattevenson / index.html
Created July 16, 2018 17:54
Google charts test
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Age', 'Weight'],
@mattevenson
mattevenson / README.md
Last active July 16, 2018 16:17 — forked from simzou/README.md
US Map of Nielsen Media Markets
@mattevenson
mattevenson / .block
Last active July 19, 2018 14:12 — forked from tlfrd/.block
Sankey Diagram
license: mit
@mattevenson
mattevenson / conway.py
Last active October 14, 2017 16:13
Another crappy implementation of Conway's Game Of Life
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
class GameOfLife:
def __init__(self, seed):
assert all(len(c) == 2 for c in seed)
self.state = list(set(seed))
def __find_n(self, c):
@mattevenson
mattevenson / sierpinksi.py
Created September 24, 2017 14:59
Recursively draw Sierpinski's triangle via shrinking and duplication
from PIL import Image, ImageDraw
im = Image.new('1',(640, 640), color='white')
d = ImageDraw.Draw(im)
def subdivide(order, origin, size):
'''
Recursively draw sierpinski's triangle via shrinking and duplication:
1. Start with square in the plane
2. Halve dimensions of square, make three copies, and stack them in a pyramid