Skip to content

Instantly share code, notes, and snippets.

View ludwigschubert's full-sized avatar

Ludwig Schubert ludwigschubert

View GitHub Profile
[1] `jq '.posts[].authors | map_values(.name) | select(index("Chris Olah") or index("Shan Carter")) | length' build/afterPostData.json | wc -l` // 22
[2] `jq '.posts[].authors | map_values(.name) | select(index("Chris Olah") == 0 or index("Shan Carter") == 0) | length' build/afterPostData.json | wc -l` // 10
[3] `jq '.posts[].authors | map_values(.name) | select(index("Chris Olah") or index("Shan Carter") | not) | length' build/afterPostData.json | wc -l` // 27, but includes one editorial update
@ludwigschubert
ludwigschubert / loadnpy.js
Created July 19, 2017 16:29 — forked from nvictus/loadnpy.js
NumPy binary file parser for javascript
// Client-side parser for .npy files
// See the specification: http://docs.scipy.org/doc/numpy-dev/neps/npy-format.html
var NumpyLoader = (function () {
function asciiDecode(buf) {
return String.fromCharCode.apply(null, new Uint8Array(buf));
}
function readUint16LE(buffer) {
var view = new DataView(buffer);
var val = view.getUint8(0);
@ludwigschubert
ludwigschubert / .block
Created June 28, 2017 21:29 — forked from mbostock/.block
Contour Plot
license: gpl-3.0
height: 673
border: no
@ludwigschubert
ludwigschubert / index.html
Created December 5, 2016 03:37
Filtering out duplicate links
<!DOCTYPE html>
<svg width="960" height="500"></svg>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="http://underscorejs.org/underscore-min.js"></script>
<script>
var svg = d3.select("svg"),
width = +svg.attr("width"),
height = +svg.attr("height"),
color = d3.scaleOrdinal(d3.schemeCategory10);
@ludwigschubert
ludwigschubert / index.html
Last active January 11, 2017 22:00
d3-single-brush
<!DOCTYPE html>
<meta charset="utf-8">
<meta title="Minimal D3 v4 single brush example--Ludwig Schubert for Stanford CS448b">
<style>
.grid-background {
fill: #eee;
}
.grid line,
@ludwigschubert
ludwigschubert / .block
Last active December 15, 2023 09:04
d3-multiple-brushes
license: mit
@ludwigschubert
ludwigschubert / .block
Created November 7, 2016 20:57
d3-multiple-brushes
license: mit
@ludwigschubert
ludwigschubert / README.md
Last active November 7, 2016 20:50
d3-multiple-brushes

d3-brush Multiple Brushes

multiple brush selections

This is an implementation of multiple brushes in D3js version 4. While brushes give a good out-of-the-box behavior for single brushes, it is not immediately clear how to implement multiple selections/brushes. This is far from a good solution, but it gets you started in understanding what's necessary.

About

Created 2016-10-30 by Ludwig Schubert for Stanford's Fall 2016 offering of CS 448b—Data Visualization.

@ludwigschubert
ludwigschubert / .block
Last active July 2, 2018 22:17
kD-tree explorations in D3.js
license: "cc-by-4.0"
height: 500
scrolling: "no"
border: "no"
@ludwigschubert
ludwigschubert / keybase.md
Created August 25, 2016 11:35
Verifying myself on keybase.io

Keybase proof

I hereby claim:

  • I am ludwigschubert on github.
  • I am ludwigschubert (https://keybase.io/ludwigschubert) on keybase.
  • I have a public key ASD-b4-YVALtI1pfQHcvsrFY_LmksUTxDyWBcg7l_f5E-go

To claim this, I am signing this object: