View test.slurm
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 | |
#SBATCH --ntasks=1 | |
#SBATCH -A uvasrg | |
# Total memory requested on system | |
# Maximum 4 nodes per job allowed | |
# Maximum 32GB/core allowed | |
#SBATCH --mem=32G |
View gpu_check.sh
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 | |
read -s password | |
myfun() | |
{ | |
f="$(mktemp /tmp/check.XXXXXX)" | |
nvidia-smi -q -x > $f | |
python -c "import xml.etree.ElementTree as ET; tree = ET.parse('$f'); root = tree.getroot(); import os; myname = os.uname()[1].split('.')[0]; z = [myname+'['+child.find('minor_number').text+'] : '+child.find('fb_memory_usage').find('free').text+'/'+child.find('fb_memory_usage').find('total').text for child in root.findall('gpu')]; print('\n'.join(z) + '\n')" | |
} | |
sshpass -p $password ssh -o StrictHostKeyChecking=no $1@gpusrv01.cs.virginia.edu "$(typeset -f); myfun" & | |
sshpass -p $password ssh -o StrictHostKeyChecking=no $1@gpusrv02.cs.virginia.edu "$(typeset -f); myfun" & |
View rbot.py
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 numpy as np | |
import random | |
import getpass | |
import requests | |
import time | |
from telegram import Bot, ParseMode | |
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters | |
View bookmyshow_stalking.py
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 telegram.ext import Updater, CommandHandler | |
import requests | |
import time | |
from bs4 import BeautifulSoup | |
import logging | |
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) | |
cities = ["national-capital-region-ncr", "hyderabad", "bengaluru"] | |
BOOKING_URL = "https://in.bookmyshow.com/CITY/movies/avengers-endgame/ET00090482" |
View train.log
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
INFO - 02/22/19 01:59:59 - 0:00:00 - ============ Initialized logger ============ | |
INFO - 02/22/19 01:59:59 - 0:00:00 - adversarial: True | |
batch_size: 32 | |
cuda: True | |
dico_build: S2T | |
dico_eval: default | |
dico_max_rank: 0 | |
dico_max_size: 0 | |
dico_method: csls_knn_10 | |
dico_min_size: 0 |
View setup.sh
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 | |
# Install pre-requisites | |
sudo apt-get -y install gcc g++ python | |
sudo apt-get -y install mercurial python-setuptools git | |
sudo apt-get -y install qt5-default | |
sudo apt-get -y install python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev ipython | |
sudo apt-get -y install openmpi-bin openmpi-common openmpi-doc libopenmpi-dev | |
sudo apt-get -y install autoconf cvs bzr unrar | |
sudo apt-get -y install gdb valgrind |
View dyamic_memory_growth.py
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 tensorflow as tf | |
import keras | |
# Don't hog GPU | |
config = tf.ConfigProto() | |
config.gpu_options.allow_growth=True | |
sess = tf.Session(config=config) | |
# If using Keras, add this line: | |
keras.backend.set_session(sess) |
View logger.sh
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 | |
pids=$(nvidia-smi | awk '$2=="Processes:" {p=1} p && $3 > 0 {print $3}' | grep -o '[0-9]*') | |
if [ ${#pids[@]} -gt 0 ] | |
then | |
date >> GPU_LOGFILE | |
fi | |
for p in $pids |
View login.py
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 urllib | |
import urllib2 | |
import time | |
time.sleep(1) | |
link = "http://www.gogole.com/" | |
req = urllib2.Request(link) | |
response = urllib2.urlopen(req) | |
a = response.read() |
View ocv14.sh
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-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get install -y build-essential cmake git pkg-config | |
sudo apt-get install -y libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev | |
sudo apt-get install -y libgtk2.0-dev | |
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev |
NewerOlder