Skip to content

Instantly share code, notes, and snippets.

View cscheid's full-sized avatar

Carlos Scheidegger cscheid

View GitHub Profile
@cscheid
cscheid / v8-flags.txt
Created February 14, 2023 17:50
V8 Flags on deno 1.28.2
The following syntax for options is accepted (both '-' and '--' are ok):
--flag (bool flags only)
--no-flag (bool flags only)
--flag=value (non-bool flags only, no spaces around '=')
--flag value (non-bool flags only)
-- (captures all remaining args in JavaScript)
Options:
--abort-on-contradictory-flags (Disallow flags or implications overriding each other.)
type: bool default: --no-abort-on-contradictory-flags
@cscheid
cscheid / 110_admin.geojson
Last active January 18, 2020 02:51 — forked from Alex-Devoid/110_admin.geojson
A viz of all the "remain in Mexico" (MPP) asylum cases.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cscheid
cscheid / keybase.md
Created November 22, 2017 19:39
keybase.md

Keybase proof

I hereby claim:

  • I am cscheid on github.
  • I am cscheid (https://keybase.io/cscheid) on keybase.
  • I have a public key ASCbHGh8DWbPaMRsAqX3jKu2t6uySLoIHP3RpjNWw7XvNQo

To claim this, I am signing this object:

@cscheid
cscheid / .block
Last active June 16, 2016 18:40 — forked from mbostock/.block
Cluster Dendrogram, not flipped
license: gpl-3.0
@cscheid
cscheid / prob.py
Last active August 29, 2015 14:14
probabilities, how do they work
import math
from pylab import *
def fact(x):
return math.gamma(x+1)
def choose(n,k):
return fact(n) / (fact(k) * fact(n-k))
def hypergeom_mass_at_k(N, K, n, k):
@cscheid
cscheid / README.md
Last active August 29, 2015 14:09 — forked from mbostock/.block

The scatterplot matrix visualizations pairwise correlations for multi-dimensional data; each cell in the matrix is a scatterplot. This example uses Anderson's data of iris flowers on the Gaspé Peninsula. Scatterplot matrix design invented by J. A. Hartigan; see also R and GGobi. Data on Iris flowers collected by Edgar Anderson and published by Ronald Fisher.

See also this version with brushing.

@cscheid
cscheid / README.md
Last active August 29, 2015 14:08 — forked from mbostock/.block
@cscheid
cscheid / main.jl
Created September 10, 2014 22:51
bare-bones stress majorization in julia
# You should totally ignore this because it's the first piece of Julia I've ever written.
# 2-clause BSD, blah.
function make_cycle(n)
result = Dict{Int32, Array{Int32}}()
for i = 1:n
ii = i - 1
push!(result, i, [1 + ((i+n-2) % n), 1 + i % n])
end
result
@cscheid
cscheid / main.md
Created September 10, 2014 19:51
A monotonic transformation from IEEE 754 floats to unsigned ints

You need to get to the bit representation of the float, and then:

inline unsigned int float2fint(unsigned int f) {
    return f ^ ((-(f >> 31)) | 0x80000000);
}

Callahan et al. used this trick in this paper.

Caveats:

@cscheid
cscheid / README.md
Created March 27, 2014 17:04 — forked from mbostock/.block

This choropleth encodes unemployment rates from 2008 with a quantize scale ranging from 0 to 15%. A threshold scale is a useful alternative for coloring arbitrary ranges.