Skip to content

Instantly share code, notes, and snippets.

@hyonschu
hyonschu / _.md
Created October 29, 2014 16:03
kijani horizon static
@hyonschu
hyonschu / _.md
Created October 29, 2014 16:02
radial
@hyonschu
hyonschu / _.md
Created October 29, 2014 15:52
sin waves
d3.csv('iris.csv', function(data)
{
// THIS WORKS:
d3.select(".butts2")
.on("click", function() {
yscale = d3.scale.linear()
.domain(d3.extent(data, function(d) {return d.sepalW}))
.range([0,h])
<html>
<head>
<script src = 'd3.v3.min.js'></script>
<script src = 'angular.min.js'></script>
</head>
<body>
<script>
h = 300;
w = 745;
canvas = d3.select("body")
d3.csv('iris.csv', function(data)
{
canvas.selectAll("g")
.data(data)
.enter()
.append('circle')
.attr({
'cx': function(d, i) {
return i*5;
},
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.yaxis path,
.yaxis line,
.xaxis path,
.xaxis line {
fill: none;
stroke: #222;
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.yaxis path,
.yaxis line,
.xaxis path,
.xaxis line {
fill: none;
stroke: #222;
<!DOCTYPE html>
<html>
<head>
<script src="angular.min.js"></script>
<script src="d3.v3.min.js" charset="utf-8"></script>
</head>
<body ng-app="myApp">
<iris-chart>
<script>
var myApp = angular.module('myApp', []);
def fib(length):
first, second = 1, 1
if length < 2:
return length
else:
length -= 2
for i in range(length):
second, first = first+second, second
return second