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 | |
echo Cluster $cluster | |
echo Process $process | |
echo RunningOn $runningon | |
mkdir $transfer_output_files | |
transfer_output_files=$transfer_output_files/$cluster | |
echo $transfer_output_files | |
mkdir $transfer_output_files |
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
%% Matrix defined by n * m | |
% Want to find k points | |
n = 256; | |
m = 256; | |
k = 5; | |
matrix = zeros(n, m); | |
%% Sample five points | |
[n, m] = size(matrix); | |
found_points_number = 0; |
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/sh | |
git filter-branch --force --env-filter ' | |
OLD_EMAIL="xxx" | |
CORRECT_NAME="chao1224" | |
CORRECT_EMAIL="[email protected]" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" |
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
# create conda virtual env, named xxx | |
conda create -n xxx | |
# enter virtual env | |
source activate xxx | |
conda install nomkl numpy scipy scikit-learn numexpr | |
conda remove mkl mkl-service | |
# quit virtual env |
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 torch.autograd._functions import * | |
from torch.autograd import Variable, Function | |
from sklearn import datasets | |
import numpy as np | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.autograd as auto | |
from torch.autograd import Variable |
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
export HOME=$PWD | |
wget -q –retry-connrefused –waitretry=10 https://repo.continuum.io/archive/Anaconda2-4.3.1-Linux-x86_64.sh | |
chmod 777 * | |
./Anaconda2-4.3.1-Linux-x86_64.sh -b -p ./anaconda > /dev/null | |
export PATH=$PWD/anaconda/bin:$PATH | |
echo 'Done installing anaconda' | |
chmod 777 * | |
conda install -y -c omnia openbabel=2.4.0 > /dev/null |
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
ssh -N -n -L localhost:xxx(local port):localhost:1224(remote port) user@host |
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
alias python='/home/ubuntu(user)/anaconda2/bin/python2.7' |
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
r = 5 | |
c = 10 | |
matrix_ = matrix(0, r, c) | |
assign <- function(matrix_, r, c){ | |
count = 1 | |
for (i in 1:r) { | |
for (j in 1:c) { | |
matrix_[i,j] = count | |
count = count + 1 |
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 | |
export HOME=$PWD | |
wget -q –retry-connrefused –waitretry=10 https://repo.continuum.io/archive/Anaconda2-4.3.1-Linux-x86_64.sh #here I get the anaconda file from squid | |
chmod 777 * #wget does strange things | |
./Anaconda2-4.3.1-Linux-x86_64.sh -b -p ./anaconda > /dev/null #install anaconda, I also add an argument to the directory name | |
export PATH=$PWD/anaconda/bin:$PATH | |
echo 'Done installing anaconda' | |
chmod 777 * |
OlderNewer