Skip to content

Instantly share code, notes, and snippets.

View jdmaturen's full-sized avatar

jd jdmaturen

View GitHub Profile
  1. As a pioneer in deep learning and AI research, what was the turning point for you when you began to perceive the potential risks associated with advanced AI as a serious concern?

  2. In your opinion, which AI applications have the most potential for positive impact on society, and how can we encourage their development while mitigating the risks associated with more dangerous applications?

  3. Can you share any insights on how the AI research community has responded to your concerns, and what collaborations or initiatives you've seen emerge to address AI safety?

  4. As AI technologies become more integrated into our everyday lives, what steps can individuals and organizations take to ensure they are using these tools responsibly and ethically?

  5. You mentioned the possibility of looking to the international ban on chemical weapons as a model for curbing dangerous AI development. How do you envision an AI-specific regulatory framework or treaty would function, and what challenges might it face?

jdmaturen /
Created October 28, 2021 05:02
Simple Thread Safe Python Rate Limiter. MIT License. Intended for use in e.g. limiting calls to rate limited services.
# MIT License
# author @jdmaturen
import logging
import time
from collections import deque
from threading import Lock
class RateLimiter(object):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
jdmaturen /
Last active July 29, 2023 22:39
Who pays when startup employees keep their equity?

Who pays when startup employees keep their equity?

JD Maturen, 2016/07/05, San Francisco, CA

As has been much discussed, stock options as used today are not a practical or reliable way of compensating employees of fast growing startups. With an often high strike price, a large tax burden on execution due to AMT, and a 90 day execution window after leaving the company many share options are left unexecuted.

There have been a variety of proposed modifications to how equity is distributed to address these issues for individual employees. However, there hasn't been much discussion of how these modifications will change overall ownership dynamics of startups. In this post we'll dive into the situation as it stands today where there is very near 100% equity loss when employees leave companies pre-exit and then we'll look at what would happen if there were instead a 0% loss rate.

What we'll see is that employees gain nearly 3-fold, while both founders and investors – particularly early investors – get dilute

Keybase proof

I hereby claim:

  • I am jdmaturen on github.
  • I am jdmaturen ( on keybase.
  • I have a public key whose fingerprint is A95A 6A67 8A9C 7701 272D 7CBD 126A 7513 766A 6932

To claim this, I am signing this object:

Heads or Tails Extended

In fact, only 2 out of 2,862 broad domestic stock funds were able to outperform their peers consistently over five years, according to one measure: performance in the top quartile of funds over five consecutive 12-month periods ended in March 2014. That translates to just 0.07 percent of the funds, which means that more than 99.9 percent of funds fell short of that feat.

Repeat those double flips five times and you’ll find the probability of a mutual fund ending up in the top quartile five times in a row through chance: 0.098 percent. (We’re flipping the coin twice for each year of mutual fund performance.) That’s a bigger probability than the 0.07 percent scored by the actual funds. This means that if mutual fund managers had just flipped coins, roughly three of them — not two — would have been expected to end up in the top quartile for five years in a row.


>>> 100 * .25 ** 5
jdmaturen / example_output
Last active August 29, 2015 14:16
From an individual box's viewpoint probabilistically limit the global concurrency of requests of a given actor based on observed local concurrency, the cluster size, and a set threshold.
burp-2:foo jd$ python 1000 16 64
request_count: 1000 cluster_size: 16 threshold: 64
probability of being quotad at a given local concurrency:
1 0.015070684079
2 0.07629533815
3 0.202571187171
4 0.378831226431
mean observed global concurrency limit: 64.033
jdmaturen /
Created October 30, 2014 22:26
Two methods of estimating confidence and error in NPS results. One uses the beta distribution as the conjugate prior to the Bernoulli distribution. The other uses the central limit theorem and standard error calculation. The latter can also correct for finite population size.
import math
import numpy as np
from scipy.stats import beta
def nps_beta_dist(sample_size, promoters, detractors, confidence=95):
Confidence range of NPS score. NPS score is defined as the percent of promoters
minus the percent of detractors. See also

On the relative value of startup stock

How do you compare the potential value of different stage companies? And as a company progresses what is the appropriate amount of stock to give new employees?

Using data from Crunchbase and Yahoo Finance we can calculate the average value created per company broken down by how much money they have raised. From this we can then compute relative returns at the different stages, e.g. $1M raised, $10M, $100M, etc.


For this exercise we'll calibrate relative to expected return from a company that's raised $1M.

jdmaturen /
Last active December 28, 2015 02:09
Vacuum up Crunchbase
Get a bunch of Crunchbase data, but respect the API limits.
Author JD Maturen
Apache 2 License
import logging
from random import random
import sys