This file contains 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
# create a list of 2d indices of A in decreasing order by the size of the | |
# (real) entry of A that they index to | |
def sortedIndices(A): | |
indexList = [(i,j) for i in range(A.shape[0]) for j in range(A.shape[1])] | |
indexList.sort(key=lambda x: -A[x]) | |
return np.array(indexList) |
This file contains 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
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: ingress | |
spec: | |
rules: | |
- http: | |
paths: | |
- path: / | |
backend: |
This file contains 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 zsh | |
set -ex | |
INPUT_FILE_PATH=${INPUT:a} | |
INPUT_DIR=${INPUT:a:h} | |
INPUT_EXT=${INPUT:e} | |
REVERSE_FILE_PATH="${INPUT_DIR}/reverse.${INPUT_EXT}" | |
FORWARD_FILE_PATH="${INPUT_DIR}/forward.${INPUT_EXT}" |
This file contains 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
foo() { | |
echo "This is foo()" | |
} | |
bar=foo | |
bar | |
# --> zsh: command not found: bar |
This file contains 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
[Configuration] | |
FontName=DejaVu Sans Mono 8 | |
MiscAlwaysShowTabs=FALSE | |
MiscBell=FALSE | |
MiscBordersDefault=TRUE | |
MiscCursorBlinks=FALSE | |
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK | |
MiscDefaultGeometry=80x24 | |
MiscInheritGeometry=FALSE | |
MiscMenubarDefault=TRUE |
This file contains 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
curl "https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py" | sudo python3.3 | |
curl "https://raw.github.com/pypa/pip/master/contrib/get-pip.py" | sudo python3.3 | |
sudo pip install virtualenv |
This file contains 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
#!/bin/bash | |
#strace | |
# "-e trace=some_syscall" allows you to trace just the syscalls you want. | |
# lotta noise otherwise. comma separated list, but | |
# for our experiments, it'll prolly just be 1 | |
# syscall | |
# "-T" give us time data | |
# | |
# "program arg0 arg1" is the program we want to trace. this'll likely be |
This file contains 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 itertools import combinations | |
UP = [[0,0,1,0,1,1, | |
1,1,1,1,0,1], | |
[1,0,1,0,1,0, | |
0,1,1,0,1,1]] | |
DOWN = [[0,1,1,0,0,1, | |
1,1,1,1,0,1], | |
[1,0,1,0,1,0, | |
0,1,0,0,0,1]] |
This file contains 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
#!/bin/sh | |
# | |
# To enable this hook, place this file at: | |
# <repo-base-dir>/.git/hooks/pre-commit | |
printf "Updating submodules to origin master..." >&2 | |
git submodule update --rebase --remote | |
STATUS=$? | |
if [ $STATUS -eq 0 ]; then | |
echo "done" >&2 |
This file contains 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
Status | |
gst='git status' | |
gss='git status -s' | |
gstv='git status -v' | |
Remotes | |
gp='git push' | |
gl='git pull' | |
glom='git pull origin master' | |
ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' |