Skip to content

Instantly share code, notes, and snippets.

View harterrt's full-sized avatar

Ryan Harter harterrt

View GitHub Profile
@harterrt
harterrt / bootstrap.py
Last active April 12, 2019 15:41
Bootstrap
def basic_bootstrap(data, f):
point_estimate = f(data)
bootstraps = [
f(data.resample(frac=1, resample=True)) - point_estimate
for x in 100
]
return(
point_estimate,
point_estimate - bootstraps.quantile(0.05),
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function atmo_connect {
# Connects to first ATMO instance owned by harter
# Be sure the AWS CLI has default availability-zone of 'us-west-2'
instance=`aws ec2 describe-instances \
--filters Name=tag:Owner,Values=rharter@mozilla.com \
--query Reservations[0].Instances[0].NetworkInterfaces[0].Association.PublicDnsName
`
ssh "hadoop@${instance//\"/}"
}