Skip to content

Instantly share code, notes, and snippets.

@peterfoley
peterfoley / Dockerfile
Created February 13, 2020 19:25
Install causalml from source after installing requirements from conda-forge
ARG BASE_IMAGE=continuumio/miniconda3
FROM ${BASE_IMAGE}
ARG BASE_IMAGE
RUN git clone https://github.com/uber/causalml.git
WORKDIR causalml
RUN conda create -n my_env python=3.6
RUN conda install -n my_env -c conda-forge --file requirements.txt
@peterfoley
peterfoley / optimal_piechart.md
Last active August 23, 2017 23:36
optimal pie chart
library(tidyverse)
## Loading tidyverse: ggplot2
## Loading tidyverse: tibble
## Loading tidyverse: tidyr
## Loading tidyverse: readr
@peterfoley
peterfoley / ec2_doRedis_demo.md
Created December 7, 2012 20:43
Demo code for spinning up a doRedis cluster

Why doRedis?

doRedis is a foreach backend that is robust to node failure and that lets you add or remove worker nodes on the fly. Those are always useful features, but they are absolute requirements when you're running on EC2 spot instances that can shut down without warning. By using doRedis, you can move processing that would have required more reliable on-demand instances onto vastly cheaper spot instances.

Implementation Sketch

If you're starting from scratch, the basic steps in running a simple personal cluster are: