Skip to content

Instantly share code, notes, and snippets.

View erikperkins's full-sized avatar
🏞️
Working from home

Erik Perkins erikperkins

🏞️
Working from home
View GitHub Profile
@chicagobuss
chicagobuss / conf_core-site.xml
Last active June 11, 2022 11:53
How to get spark 1.6.0 with hadoop 2.6 working with s3
<configuration>
<property>
<name>fs.s3a.access.key</name>
<description>AWS access key ID. Omit for Role-based authentication.</description>
<value>YOUR_ACCESS_KEY</value>
</property>
<property>
<name>fs.s3a.secret.key</name>
<description>AWS secret key. Omit for Role-based authentication.</description>
@ololobus
ololobus / Spark+ipython_on_MacOS.md
Last active October 3, 2025 16:28
Apache Spark installation + ipython/jupyter notebook integration guide for macOS

Apache Spark installation + ipython/jupyter notebook integration guide for macOS

Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112

For older versions of Spark and ipython, please, see also previous version of text.

Install Java Development Kit

@jdmaturen
jdmaturen / nps.py
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 http://en.wikipedia.org/wiki/Net_Promoter
@korya
korya / Subfolder to git repo.md
Last active August 21, 2025 16:19
Convert subfolder into Git submodule