Skip to content

Instantly share code, notes, and snippets.

View harryh's full-sized avatar

Harry Heymann harryh

View GitHub Profile
import random
from collections import Counter
NUM_DISTRICTS = 500
# Doesn't matter, think of each of these as representing
# thousands of voters if you like.
NUM_VOTERS = 1000
# % of voters that vote D (remainder vote R)

Keybase proof

I hereby claim:

  • I am harryh on github.
  • I am harryh (https://keybase.io/harryh) on keybase.
  • I have a public key whose fingerprint is 2041 FC2E 0D1C 7B9A B8CE 4FA3 26C0 DDC8 24CC 3B7F

To claim this, I am signing this object:

Economic Inequality: A Simple Rebuttal
Paul Graham argues that "economic inequality per se is not bad." http://paulgraham.com/sim.html
Beyond a certain point this is not true.
In a state of nature, everyone is basically poor because no one cooperates. But this isn't bad for
everyone. If you look like this guy (http://nerdist.com/wp-content/uploads/2015/06/Dwayne-Johnson.jpg)
you can take anyone else's stuff, be a warlord, and generally have your way with the world.
A running tab of mistaken uses of my email address.
8/14/15 - £21.23 of food from Domino's Pizza in Edinburgh, Scotland.
8/25/15 - A receipt for a $10 belt buckle from an Aeropostale store in Chicago.
@harryh
harryh / gist:2af0f3bd29c58c5318cf
Last active April 8, 2018 01:52
Bruce Chassy on Jeffrey Smith in the New Yorker
Chassy is professor emeritus in the department of food science and human nutrition at the University
of Illinois. “As a public-sector scientist, researcher, and academic administrator with more than
forty years’ experience, I am appalled that any medical professional would give a platform to the
likes of Mr. Jeffrey Smith to impart health information to the public,” Chassy wrote. “His only
professional experience prior to taking up his crusade against biotechnology is as a ballroom-dance
teacher, yogic flying instructor, and political candidate for the Maharishi cult’s natural-law party.”
http://www.newyorker.com/reporting/2013/02/04/130204fa_fact_specter?currentPage=all
@harryh
harryh / not-front-running
Last active April 8, 2018 01:52
It's not front running; it's getting out of the way
Front-running[1] isn't really a thing that's actually happening. Here's what is actually happening.
The HFTer/liquidity provider wants to sit there all day long buying IBM for 99.99 and selling for 100.00
making his penny a share in return for providing liquidity. But the liquidity provider has a problem.
Every now and then Brad Katsuyama (or someone like him) shows up with proprietary information that,
say, IBM should really be trading for 101.00. Brad tries to suck up all those shares being sold for
100.00 as fast as possible before the price moves. That's great for Brad but all of a sudden the
liquidity provider has lost a bunch of money when IBM moves to 101.00 and he can no longer buy for 99.99.
So the liquidity provider tries to recognize as accurately as he can, and as fast as he can, that Brad
@harryh
harryh / Letterpress.scala
Created November 10, 2012 01:31
Letterpress Solver
val letterSupply = args.reduce(_ + _)
.groupBy(_.toLower)
.mapValues(_.length)
scala.io.Source.fromFile("letterpress.words")
.getLines
.filter(word => word.forall(c => letterSupply.get(c).exists(_ >= word.count(_ == c))))
.toList
.sortBy(_.length)
.foreach(System.out.println(_))