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 | |
# pixman | |
wget https://cairographics.org/releases/pixman-0.34.0.tar.gz | |
tar -xvf pixman-0.34.0.tar.gz | |
cd pixman-0.34.0/ | |
./configure --prefix=$HOME/local --disable-static | |
make | |
make install | |
export pixman_CFLAGS="-I$HOME/local/include/pixman-1" |
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 | |
export PATH=$HOME/local/bin:$PATH | |
export PYTHON_2_VERSION=2.7.13 | |
export PYTHON_3_VERSION=3.6.1 | |
# executables will be installed in $HOME/local/bin | |
mkdir -p $HOME/local/bin | |
cd $HOME/local/bin |
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 | |
# check that WORKON_HOME has been set | |
function _venv_verifty_workon_home { | |
if [ ! -v WORKON_HOME ]; then | |
printf "$1: please set WORKON_HOME, " | |
printf ".bashrc example: \"export WORKON_HOME=<path>\"\n" | |
printf "quitting.\n" | |
return 1 |
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 | |
tr '\r' '\n' < $1 > $1.tmp | |
mv $1.tmp $1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
inkscape -D -z --file=$1.svg --export-pdf=$1.pdf --export-latex |
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 | |
PYTHON_VERSION="3.12.7" | |
function mkipycondaenv { | |
if [ "$#" -ne 1 ]; then | |
echo "usage: mkipycondaenv <condaenv_name>" | |
return 1 | |
fi |
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
given labeled_training_indices (e.g., maybe there are 20 labeled training instances) | |
given labeled_test_indices (there are always ~3000 of these due to the split created by Harutyunyan et al.) | |
train_fold, val_fold <- stratified split(labeled_training_indices, train=70%, "test"=30%) # "test" is really the validation set here | |
# for example, if we have 20 labeled training instances, then we have 14 instances for training and 6 for validation | |
# ... so we really don't have a lot when the number of labeled training instances is small | |
hp_grid = ParameterGrid({ | |
'penalty': ['l1', 'l2'], |
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
def add_home_dir(*fn): | |
import os.path | |
return os.path.join(os.path.expanduser('~'), *fn) | |
c.ServerApp.ip = '*' | |
c.ServerApp.port = 9999 | |
c.ServerApp.certfile = add_home_dir('certs', 'mycert.pem') | |
c.ServerApp.keyfile = add_home_dir('certs', 'mykey.key') |
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 | |
image_loc="/data/docker" | |
### | |
# https://docs.docker.com/engine/install/debian/ | |
### | |
# set up the docker repository |