Skip to content

Instantly share code, notes, and snippets.

View chapmanjacobd's full-sized avatar
🥅
goal_net

Jacob Chapman chapmanjacobd

🥅
goal_net
View GitHub Profile
@mpurbo
mpurbo / gist:1651234
Created January 21, 2012 04:07
Japanese Address Regular Expression
public static final String SPACE = "[\\s\u3000]";
public static final String NUMBER = "[0-9\uff10-\uff19]"; // 0-90-9
public static final String HYPHEN = "[-\uff0d\u2212]";
public static final String NOT_NUMBER_OR_HYPHEN = "[^" + NUMBER.substring(1, NUMBER.length()-1) + HYPHEN.substring(1);
public static final String NUMBERS = "([0-9\uff10-\uff19\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+)"; // 0-90-9一二三四五六七八九
public static final String CHOUME = "\u4e01\u76ee"; // 丁目
public static final String BANCHI = "\u756a\u5730?"; // 番地
public static final String GOU = "\u53f7"; // 号
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@beaucronin
beaucronin / crp_generator.py
Created October 9, 2011 16:37
A Python generator for the Chinese Restaurant Process
from random import random
def crpgen(N = None, alpha = 1.0):
"""
A generator that implements the Chinese Restaurant Process
"""
counts = []
n = 0
while N == None or n < N:
# Compute the (unnormalized) probabilities of assigning the new object