Skip to content

Instantly share code, notes, and snippets.

View dustinvtran's full-sized avatar

Dustin Tran dustinvtran

View GitHub Profile
@dustinvtran
dustinvtran / main.py
Created December 14, 2020 08:02
Python version of source code for https://mcspeedrun.com/dream.pdf. This implementation uses default precision (float64), so the decimal values are slightly off from the original Java implementation which uses BigDecimal.
import numpy as np
import scipy.stats
from typing import List
def shifty_investigator(num_trials: int,
num_successes: int,
p_success: float):
p_fail = 1. - p_success
target_p = 1. - scipy.stats.binom.cdf(n=num_trials,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007