Skip to content

Instantly share code, notes, and snippets.

Avatar

pjstein pjstein

View GitHub Profile
@pjstein
pjstein / mfa-commands.sh
Last active Apr 29, 2020 — forked from anniejw6/alias.sh
MFA for the AWS cli
View mfa-commands.sh
#!/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 Oct 30, 2018 — forked from rxwei/ad-manifesto.md
First-Class Automatic Differentiation in Swift: A Manifesto
View ad-manifesto.md

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 Aug 22, 2018 — forked from johnhw/umap_sparse.py
1 million prime UMAP layout
View umap_sparse.py
### 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 Feb 21, 2018 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
View easing.js
/*
* 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