This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import wraps, partial | |
| |
from metaflow import FlowSpec, catch, step | |
| |
| |
def profile_memory(f): | |
@wraps(f) | |
def func(self, *args, **kwargs): | |
from memory_profiler import choose_backend, LineProfiler, show_results | |
backend = choose_backend('psutil') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Script prerequisite > install jq > https://stedolan.github.io | |
# ******************************************************************************************** | |
# UPDATE: Check out Robert's repo here https://github.com/robertpeteuil/terraform-installer | |
# Robert's repo is more built out and has more options around the installation process. | |
# Cheers! -Adron | |
# ******************************************************************************************** | |
cd ~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Takes an adjacency list like: | |
// { 1: [2, 3], 2: [1, 3], 3: [2, 1] } | |
function pick(arr) { | |
var idx = (arr.length * Math.random()) | 0; | |
return arr[idx]; | |
} | |
function remove(arr, el){ | |
var idx; |