Skip to content

Instantly share code, notes, and snippets.

View d2fn's full-sized avatar
🐢

Dietrich Featherston d2fn

🐢
View GitHub Profile

Keybase proof

I hereby claim:

  • I am d2fn on github.
  • I am d2fn (https://keybase.io/d2fn) on keybase.
  • I have a public key whose fingerprint is 9B44 A7D0 3783 FD03 570C 89FC AFEC 18F7 30BD 71C8

To claim this, I am signing this object:

@d2fn
d2fn / topk.py
Last active August 29, 2015 14:17
Bucketed top-k in Python using heap-ordered arrays
#!/usr/bin/env python
"""
Usage: topk [key-column-name] [score-column-name]
Reads tsv rows, including a header row, from stdin.
Writes to stdout the top 10 rows per distinct value of the given key column.
Author Dietrich Featherston
"""
@d2fn
d2fn / fr.csv
Last active August 29, 2015 14:04
Global Fossil Record I
We can't make this file beautiful and searchable because it's too large.
family,kingdom,phylum,classname,habitat,hadean precambrian,isuan,swazian,randian,huronian,animakean,riphean,sturtian,vendian,caerfai cambrian palaeozoic,st david's,merioneth,tremadoc ordovician,arenig,llanvirn,llandeilo,caradoc,ashgill,llandovery silurian,wenlock,ludlow,pridoli,lochkovian devonian,pragian,emsian,eifelian,givetian,frasnian,famennian,tournaisian carboniferous,visean,serpukhovian,bashkirian,moscovian,kasimovian,gzelian,asselian permian,sakmarian,artinskian,kungurian,ufimian,kazanian,tatarian,scythian triassic mesozoic,anisian,ladinian,carnian,norian,rhaetian,hettangian jurassic,sinemurian,pliensbachian,toarcian,aalenian,bajocian,bathonian,callovian,oxfordian,kimmeridgian,portlandian,berriasian cretaceous,valanginian,hauterivian,barremian,aptian,albian,cenomanian,turonian,coniacian,santonian,campanian,maastrichtian,danian palaeogene cainozoic,thanetian,ypresian,lutetian,bartonian,priabonian,rupelian,chattian,lower miocene neogene,middle miocene,upper miocene,pliocene,pleistocene quaternary,holoce
@d2fn
d2fn / README.md
Last active August 29, 2015 14:04
Perlin Curves II

Each curve follows 2d perlin space at a different, but nearby, z axis. The result is the appearance of topology as curves expose gradients in noise function.

@d2fn
d2fn / README.md
Last active March 11, 2021 12:41
Perlin Curves I

Curves drawn by randomly placing actors on the canvas, and walking them in a direction determined by the perlin noise function at their location. The continuity of the underlying noise function causes paths to converge together.

@d2fn
d2fn / README.md
Last active August 29, 2015 14:04
Perlin Noise Grid

Simple demonstration of 2d perlin noise.

@d2fn
d2fn / README.md
Last active August 29, 2015 14:03
Dendrite Growth with Cracks

Dendrite growth using d3 quadchart nearest neighbor search. A point is chosen at random and joined to its nearest neighbor. Each node keeps track of the node to which it was adjoined via a parent reference. As each node is attached the child count of each parent in the chain is incremented. The child count is used directly to determine rendering width of lines between nodes.

@d2fn
d2fn / README.md
Last active August 29, 2015 14:03
Dendrite Growth - nearest neighbor search using d3 quadtree

Dendrite growth using d3 quadchart nearest neighbor search.

@d2fn
d2fn / README.md
Last active August 29, 2015 14:03
Uniform Random Point Distribution

Demonstration of unevenness of uniform random distributions for point scattering.

@d2fn
d2fn / index.html
Last active August 29, 2015 14:03
Scatter Plot
<!DOCTYPE html>
<meta charset="utf-8">
<style type="text/css">
.axis path,
.axis line {
fill: none;
stroke: black;
shape-rendering: crispEdges;
}
.axis text {