Skip to content

Instantly share code, notes, and snippets.

View aaronlelevier's full-sized avatar

Aaron Lelevier aaronlelevier

View GitHub Profile
@aaronlelevier
aaronlelevier / jupyter-notebook-quickstart.sh
Last active September 11, 2019 22:07
Bash commands to set up a local dev environment for Jupyter Notebook
mkdir juptyer-practice
cd juptyer-practice
echo "create virtualenv step"
python3 -m venv venv
echo "activate virtualenv"
source venv/bin/activate
echo "install dependencies"
@aaronlelevier
aaronlelevier / applicative.py
Created October 23, 2019 19:18
Python Applicative Pattern - apply a container of functions to a container of values
def add1(x):
return x+1
def double(x):
return x+x
def square(x):
return x*x
funs = [add1, double, square]
@aaronlelevier
aaronlelevier / practice_lists.erl
Created September 27, 2020 21:38
Practice with Lists in Erlang
%%%-------------------------------------------------------------------
%%% @author Aaron Lelevier
%%% @doc Practice with Lists in Erlang. It's been about a week since coding up some Erlang
%%% These functions are all in the [lists](http://erlang.org/doc/man/lists.html) module
%%% @end
%%% Created : 27. Sep 2020 2:26 PM
%%%-------------------------------------------------------------------
-module(practice).
-author("Aaron Lelevier").
-vsn(1.0).
@aaronlelevier
aaronlelevier / RTOP.tla
Last active January 23, 2022 19:56
My 2nd TLA+ Spec. RTOP stands for R-to-P and is a spec that shows a mapping of many-to-many P to R and the inverse
-------------------------------- MODULE RTOP --------------------------------
CONSTANT P, R
VARIABLE ptor, rtop
vars == <<ptor, rtop>>
TypeOK == /\ ptor \in [P -> SUBSET R]
/\ rtop \in [R -> SUBSET P]