Skip to content

Instantly share code, notes, and snippets.

@wcbeard
wcbeard / beta_vs_ci.ipynb
Last active March 7, 2021 03:25
Beta ppf vs CI
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wcbeard
wcbeard / common_counties.py
Created August 3, 2020 15:13
Common counties
import pandas as pd
def get_cts(url, ix=None):
cts_df = pd.read_html(url)
cts = cts_df[ix]
return cts.County.str[:-7].pipe(set)
cky = get_cts('https://en.wikipedia.org/wiki/List_of_counties_in_Kentucky', ix=1)
cin = get_cts('https://en.wikipedia.org/wiki/List_of_counties_in_Indiana', 1)
import inspect
def monkey_patched(f):
return 'dont_do_this' in inspect.signature(f).parameters
def _build_enrollments_query_normandy(self, time_limits, dont_do_this=True):
"""Return SQL to query enrollments for a normandy experiment"""
return """
SELECT
e.client_id,
@wcbeard
wcbeard / Stan-demo.ipynb
Last active December 6, 2018 19:42
Stan demo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wcbeard
wcbeard / b
Created July 7, 2017 00:19
brew
arpack-julia
atk
autoconf
autoenv
automake
awscli
bazel
boot2docker
cabal-install
cairo
@wcbeard
wcbeard / CMakeOutput.log
Created January 23, 2017 15:05
turbodbc numpy error
The system is: Darwin - 15.5.0 - x86_64
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
Build flags:
Id flags:
The output was:
0
@wcbeard
wcbeard / bug.txt
Created September 16, 2016 14:18
bug list2
$ conda list
# packages in environment at /Users/me/miniconda3/envs/bug:
#
anaconda-client 1.5.1 py35_0
appnope 0.1.0 py35_0
clyent 1.2.2 py35_0
decorator 4.0.10 py35_0
entrypoints 0.2.2 py35_0
freetype 2.5.5 1
ipython 5.1.0 <pip>
@wcbeard
wcbeard / conda list
Last active September 14, 2016 19:02
jupyter conda bug
$ conda list
# packages in environment at /Users/chrisbeard/miniconda3/envs/bug:
#
_nb_ext_conf 0.3.0 py35_0
anaconda-client 1.5.1 py35_0
appnope 0.1.0 py35_0
clyent 1.2.2 py35_0
decorator 4.0.10 py35_0
entrypoints 0.2.2 py35_0
freetype 2.5.5 1
@wcbeard
wcbeard / dir_cat.ipynb
Created June 2, 2016 14:09
dirichlet categorical forloop
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.