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
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does | |
import hudson.model.*; | |
import hudson.util.*; | |
import jenkins.model.*; | |
import hudson.FilePath.FileCallable; | |
import hudson.slaves.OfflineCause; | |
import hudson.node_monitors.*; | |
for (node in Jenkins.instance.nodes) { |
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 | |
sudo apt install -y texlive-latex-extra texlive-science gummi |
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
import requests | |
import json | |
TOKEN = "<YOUR_TOKEN>" | |
if __name__ == '__main__': | |
files_list_url = 'https://slack.com/api/users.list' | |
data = {"token": TOKEN} | |
response = requests.post(files_list_url, data=data) |
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
import requests | |
TOKEN = "<YOUR_TOKEN>" | |
def delete(_response): | |
for f in _response.json()["files"]: | |
print("Deleting file " + f["name"] + "...") | |
delete_url = 'https://slack.com/api/files.delete' | |
res = requests.post(delete_url, data={ |
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
echo "deb http://repo.yandex.ru/yandex-disk/deb/ stable main" | sudo tee -a /etc/apt/sources.list.d/yandex-disk.list > /dev/null && wget http://repo.yandex.ru/yandex-disk/YANDEX-DISK-KEY.GPG -O- | sudo apt-key add - && sudo apt-get update && sudo apt-get install -y yandex-disk |
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
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
bash Miniconda3-latest-Linux-x86_64.sh | |
#(Optional) | |
conda install pytorch=0.4.1 cuda90 -c pytorch |
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
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run | |
chmod +x cuda_9.0.176_384.81_linux-run | |
./cuda_9.0.176_384.81_linux-run --extract=`pwd` | |
./cuda-linux.9.0.176-22781540.run |
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
# First install CUDA https://gist.github.com/fatihbaltaci/e9ac5dde14e17c8b59c3ce4e90bcac0a | |
# Download (cuDNN Library for Linux) from https://developer.nvidia.com/rdp/cudnn-download | |
tar -xzvf cudnn-9.0-linux-x64-v7.5.0.56.tgz | |
#Default /usr/local/cuda | |
CUDA_HOME=<CUDA_PATH> | |
sudo cp cuda/include/cudnn.h $CUDA_HOME/include |
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
import scipy.io | |
mat = scipy.io.loadmat('file.mat') |
OlderNewer