Skip to content

Instantly share code, notes, and snippets.

@pjstein
pjstein / mfa-commands.sh
Last active April 29, 2020 17:26 — forked from anniejw6/alias.sh
MFA for the AWS cli
#!/usr/bin/env bash
aws-mfa-print-info()
{
echo "We've set your credentials in this shell"
echo "Generated at: '${EPHEMERAL_TOKEN_GENERATED_AT}'"
echo "These credentials are valid for *12 hours*"
unset EPHEMERAL_TOKEN_GENERATED_AT
}
@pjstein
pjstein / ad-manifesto.md
Created October 30, 2018 17:25 — forked from rxwei/ad-manifesto.md
First-Class Automatic Differentiation in Swift: A Manifesto

First-Class Automatic Differentiation in Swift: A Manifesto

This document is written for both the machine learning community and the Swift programming language design community, with a strong focus on language design.

Table of Contents

@pjstein
pjstein / umap_sparse.py
Created August 22, 2018 18:17 — forked from johnhw/umap_sparse.py
1 million prime UMAP layout
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
@pjstein
pjstein / easing.js
Created February 21, 2018 04:15 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity