Skip to content

Instantly share code, notes, and snippets.

View noisychannel's full-sized avatar

Gaurav Kumar noisychannel

View GitHub Profile
@noisychannel
noisychannel / crawl_images.sh
Last active February 26, 2016 00:01
Crawl images
#!/usr/bin/env bash
set -e
ROOT=...
MAX_RECURSION_DEPTH=10
crawl_folder() {
local page=$1
local folder_name=$2
@noisychannel
noisychannel / free-gpu.sh
Last active August 9, 2016 20:10
Get the first free GPU on a machine
#!/usr/bin/env bash
# Number of free GPUs on a machine
export n_gpus=`lspci | grep -i "nvidia" | wc -l`
# Return -1 if there are no GPUs on the machine
if [ $n_gpus -eq 0 ]; then
echo "-1"
exit -1
fi
@noisychannel
noisychannel / Makefile
Created January 26, 2017 10:53
TensorFlow INSTALL
install_venv:
# Install a virtual environment
virtualenv tf_cpu
# Activate the virutal environment
source tf_cpu/bin/activate
# Install tensorflow
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp27-none-linux_x86_64.whl
pip install $TF_BINARY_URL
install_no_venv: