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
nvidia-smi -q >> /tmp/nvidia-smi.out && grep "Remapping Failure Occurred" /tmp/nvidia-smi.out | grep "Yes" && hostname |
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
#pragma once | |
#include <memory> | |
#include <ATen/ATen.h> | |
#include <c10d/ProcessGroup.hpp> | |
#include <torch/csrc/utils/pybind.h> | |
namespace c10d { |
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
#include <iostream> | |
#include <chrono> | |
class Timer { | |
public: | |
Timer() : beg_(clock_::now()) {} | |
void reset() { beg_ = clock_::now(); } | |
double elapsed() const { | |
return std::chrono::duration_cast<second_> | |
(clock_::now() - beg_).count(); } |
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
sudo apt-get install -y linux-headers-$(uname -r) | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb | |
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
sudo dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb | |
sudo apt-get update | |
sudo apt-get install -y cuda | |
/usr/bin/nvidia-persistenced --verbose | |
sudo apt-get install -y g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev | |
wget http://developer2.download.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/9.0_20171129/Ubuntu16_04-x64/libcudnn7_7.0.5.15-1%2Bcuda9.0_amd64.deb?B6oKBFMYCPOY-7IYUsEd5RXHqo4X7I6Y7Ocbi0HI3sKsDx58Lyrsw921spJrwCNsOaLkJuMGkGsNLqGX6FJRAa0qXMfv5E38ZVCRdEspFRIcz7tYXUm6SGdsC-w4Vm5sxwoxmk1a7j0hNVKnj5uMF7ZMrt80tiOM9MdfjvtSV-RRNdFGmavFjX7pqGvpTcFHFwxdYCYZtvzOvD6t10hltLcrA7tJXRdwkQQGaid2W-yjnx7e4lI |
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
# install protobuf 25 | |
brew install wget | |
wget https://raw.githubusercontent.com/mli/deps/master/build/protobuf-2.5.0.tar.gz | |
tar -xvf protobuf-2.5.0.tar.gz | |
cd protobuf-2.5.0 | |
export CFLAGS=-fPIC | |
export CXXFLAGS=-fPIC | |
./configure | |
make -j 4 | |
make install |
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
sudo apt-get install -y ninja-build ccache | |
# ccache for better cached compilers | |
echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc | |
source ~/.bashrc | |
ccache -F 0 | |
ccache -M 0 | |
# OPTIONAL | |
# llvm-lit for omp build |
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
import networkx as nx | |
import matplotlib.pyplot as plt | |
import pylab | |
import csv | |
from random import random | |
G=nx.Graph() | |
with open('ai3.csv', 'rb') as csvfile: | |
spamreader = csv.reader(csvfile, delimiter=',') | |
for row in spamreader: |
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
# Adding tasks: | |
# m h dom mon dow command | |
59 23 * * 1,2,3,4,5,6 /home/rh/git/useful_scripts/backup/incr_backup.sh | |
59 23 * * 7 /home/rh/git/useful_scripts/backup/full_backup.sh | |
#view cron tasks | |
crontab -l |
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
h1. Sublime Text 2 - Useful Shortcuts (PC) | |
Loosely ordered with the commands I use most towards the top. Sublime also offer "full documentation":http://www.sublimetext.com/docs/2/. | |
h2. Editing | |
| *Ctrl+C* | copy current line (if no selection) | | |
| *Ctrl+X* | cut current line (if no selection) | | |
| *Ctrl+⇧+K*| delete line | | |
| *Ctrl+↩* | insert line after | |