Skip to content

Instantly share code, notes, and snippets.

View cmchap's full-sized avatar

Cory Chainsman cmchap

View GitHub Profile
import sys
def calc_weight(c, m):
return sum(
[c_i * (m_i + 100) for m_i, c_i in zip(m, c)])
def main():
if len(sys.argv) < 1:
@cmchap
cmchap / index.html
Last active August 29, 2015 13:56 — forked from GerHobbelt/.gitignore
D3.js streamgraph
<!DOCTYPE html>
<html>
<head>
<title>Streamgraph</title>
<link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow:700,400|Rock+Salt' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="http://d3js.org/d3.v2.js"></script>
<script type="text/javascript" src="stream_layers.js"></script>
<style>
#chart {
font: 12px/18px 'Rock Salt',sans-serif;