Skip to content

Instantly share code, notes, and snippets.

@isomorphisms
isomorphisms / 9000D.md
Last active February 9, 2018 04:52
high-dimensional hacks
@isomorphisms
isomorphisms / adzerk.r
Last active December 5, 2017 08:19
adzerk example
'{"placements":[{"divName":"div1","networkId":23,"siteId":667480,"adTypes":[5]}],"user":{"key":"abc"}}' -> adzerk.json
'http://engine.adzerk.net/api/v2' -> adzerk.url
require(jsonlite)
fromJSON( adzerk.example )
require(httr)
@isomorphisms
isomorphisms / index.html
Last active November 24, 2017 05:39
barcodes of constant width at random intervals in D3
<html>
<head>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script>
d3.select("svg").selectAll("rect").data(["1em","5em","7em","13em"]).enter().append("rect").attr("x", (d) => { return d; })
</script>

What is "a" homology "theory"?

It’s impossible to get far in reading 20th-century mathematics without encountering the word cohomology. Cohomology & schemes are the subject of Hartshorne’s classic, where you can find out (Appendix C) that the Weil conjectures were resolved by defining a thing called l-adic cohomology.

hartshorne on weil conjectures hartshorne on weil conjectures

Schemes are like varieties = cycles. And cohomology is a way (ok, apparently various

https://twitter.com/Amber_Coffman/status/419635162230423552
# File src/library/stats/R/lm.R
# Part of the R package, http://www.R-project.org
#
# Copyright (C) 1995-2014 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
@isomorphisms
isomorphisms / calculus.md
Last active March 28, 2017 16:38
calculus for programming language theorist

Here's a silly-but-perhaps-provocative way to talk about calculus.

The only atom to start with is +1+1+1+1+1+1+1+… ↣ 5+5+5+5+5+5+5+…. Some people call this "to quintuple" but I'll just call it ƒ. Repeated addition of the number 5. I'm going to build up large classes of functions from this, using "meta-moves" i.e. just operating on the function.

The first meta-move I'll allow myself is to stick the +5+5+5+5… anywhere I want on the number line. Tangent picking. Also known as b in y=mx+b.

@isomorphisms
isomorphisms / how.to.strikethrough
Last active July 7, 2016 15:05
Flag flabby sentences.
Unicode[edit]
Combining characters[edit]
In plain text scenarios where markup cannot be used, Unicode offers a number of
combining characters that achieve similar effects.
The “combining long stroke overlay” (U+0336) results in an unbroken stroke
across the text:
@isomorphisms
isomorphisms / peek.bash
Last active January 1, 2016 11:48
alternative peeking tool to head and tail: pick out a random 20 lines of a file, plus the first and last lines.
#!/bin/bash
# peek
# look at N random lines of datafile.csv
# usage: rand datafile.csv N
# rand $1 $2
head -1 $1 #names row of $1
@isomorphisms
isomorphisms / brains.R
Last active December 21, 2015 16:58
animals sorted by brain size
require(ggplot2); data(msleep); attach(msleep)
animal.brains <- na.omit( data.frame( name, round( brainwt / bodywt * 100, 1) ))
names(list) <- c("animal", "how.brainy")