Skip to content

Instantly share code, notes, and snippets.

View planetceres's full-sized avatar

Matt Shaffer planetceres

View GitHub Profile
@planetceres
planetceres / tf_1-8_keras_2-1_gpu_setup.md
Created July 23, 2018 06:11
Provision Ubuntu 16.04 with CUDA 9.0 CUDNN 7.1.4 Tensorflow 1.8.0 Keras 2.1.5

Requirements

  • OS
    • Ubuntu 16.04
  • CUDA
    • CUDA 9.0
    • NVCC 9.0.176
    • CUDNN 7.1.4
  • Tensorflow
    • GPU 1.8.0
@planetceres
planetceres / horovod_cluster_setup.md
Last active March 5, 2020 20:56
Horovod Cluster Setup with CUDA 9.0, Miniconda3 and Tensorflow 1.8rc

Setup of GPU Enabled VM for Distributed Tensorflow using Horovod

Update CentOS

Update CentOS and reboot (you will need to login again):

sudo yum update -y
sudo reboot
@planetceres
planetceres / conda_remove_all.sh
Last active March 27, 2018 21:28
Remove all conda environmets 'bash conda_remove_all.sh'
#!/bin/bash
. ~/anaconda3/etc/profile.d/conda.sh
ENVS=$(conda env list | grep '^\w' | cut -d' ' -f1)
for env in $ENVS; do
conda remove -n $env --all
echo "Removing $env"
done
@planetceres
planetceres / conda_export_all.sh
Last active March 27, 2018 21:27
Export all conda env to environment.yml `bash conda_export_all.sh <folder path for backup>`
#!/bin/bash
. ~/anaconda3/etc/profile.d/conda.sh
NOW=$(date "+%Y-%m-%d")
if [ $1 -eq 0 ]; then
DIR='~/Desktop/condas/'
else
DIR=$1
fi
@planetceres
planetceres / conda_remove_all.sh
Last active March 27, 2018 21:27
[Deprecated] Remove all Anaconda environments with prompt `bash conda_remove_all.sh`
#!/bin/bash
ENVS=$(conda env list | grep '^\w' | cut -d' ' -f1)
for env in $ENVS; do
conda remove -n $env --all
echo "Removing $env"
done
@planetceres
planetceres / conda_backup_env.sh
Last active March 27, 2018 21:27
[Deprecated] Backup all Anaconda environments `bash conda_backup_env.sh <folder path for backup>`
#!/bin/bash
NOW=$(date "+%Y-%m-%d")
DIR=$1
mkdir $DIR/envs-$NOW
ENVS=$(conda env list | grep '^\w' | cut -d' ' -f1)
for env in $ENVS; do
source activate $env
conda env export > $DIR/envs-$NOW/$env.yml
echo "Exporting $env to .yml"
@planetceres
planetceres / adaboost.py
Created September 24, 2016 00:00 — forked from tristanwietsma/adaboost.py
AdaBoost Python implementation of the AdaBoost (Adaptive Boosting) classification algorithm.
from __future__ import division
from numpy import *
class AdaBoost:
def __init__(self, training_set):
self.training_set = training_set
self.N = len(self.training_set)
self.weights = ones(self.N)/self.N
self.RULES = []