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
#!/bin/bash | |
# Install CUDA Toolkit v9.0 | |
# Instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network)) | |
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
CUDA_REPO_PKG="cuda-repo-ubuntu1604_9.0.176-1_amd64.deb" | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} | |
sudo dpkg -i ${CUDA_REPO_PKG} | |
sudo apt-get update | |
sudo apt-get -y install cuda-9-0 |
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
pkill jupyter |
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
export PATH="$PATH:/home/ubuntu/src/anaconda3/bin" | |
jupyter notebook --notebook-dir=/home/ubuntu/ --profile=nbserver > /tmp/ipynb.out 2>&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
#!/bin/bash | |
if [ $(git rev-parse --is-bare-repository) = true ] | |
then | |
REPOSITORY=$(basename "$PWD") | |
USERNAME=$(basename $(readlink -nf "$PWD"/..)) | |
else | |
REPOSITORY=$(basename $(readlink -nf "$PWD"/..)) | |
USERNAME=$(basename $(readlink -nf "$PWD"/../..)) | |
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
#!/bin/bash | |
# Hook Setup | |
source $(dirname $0)/hook-setup | |
while read oldrev newrev ref | |
do | |
if [[ $ref =~ .*/master ]]; | |
then | |
echo "Ref $ref successfully received. Deploying to $PROJECT_DIR..." |
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 time_ago(timestamp, from_timestamp = nil) | |
if timestamp.nil? | |
return false | |
end | |
if from_timestamp.nil? | |
from_timestamp = Time.now.to_i | |
end | |
difference = from_timestamp - timestamp |