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
| google.charts.load('current', {'packages':['geochart']}); | |
| google.charts.setOnLoadCallback(drawRegionsMap); | |
| function drawRegionsMap() { | |
| var data = google.visualization.arrayToDataTable([ | |
| ['State', 'Value'], | |
| ['CA', 780], | |
| ['MI', 300], | |
| ['NY', 400], |
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
| # assume that job1.sh is already running | |
| # we want to start jab2.sh right after job1.sh finishes | |
| pid=$(ps -o pid= -C job1.sh) | |
| while [ -d /proc/$pid ]; do | |
| echo "process $pid still running" | |
| sleep 60 | |
| done && ./job2.sh |
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
| $if Bash | |
| # Search history back and forward using page-up and page-down | |
| "\e[5~": history-search-backward | |
| "\e[6~": history-search-forward | |
| ## arrow up | |
| "\e[A":history-search-backward | |
| ## arrow down | |
| "\e[B":history-search-forward |
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
| alias cp='cp -i' | |
| alias rm='rm -i' | |
| alias mv='mv -i' | |
| alias ls='ls --color=auto ' | |
| alias grep='grep --color -E ' | |
| echo -e " \e[0;30m \\\e[0;30m \e[0;34m \\\e[0;34m \e[0;32m \\\e[0;32m \e[0;36m \\\e[0;36m \e[0;31m \\\e[0;31m \e[0;35m \\\e[0;35m \e[0;35m \\\e[0;35m \e[0;37m \\\e[0;37m \e[0m" | |
| green='\e[0;32m' # '\e[1;32m' is too bright for white bg. |
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
| awk '{ | |
| printf "%s\n", substr($3,1,1) | |
| }' amber/heat7.chm.pdb | awk '{ | |
| if ($1=="H") {print "Sfj(",NR,")=0.85"} | |
| else if ($1 == "C") {print "Sfj(",NR,")=0.72"} | |
| else if($1 == "N") {print "Sfj(",NR,")=0.79"} | |
| else if($1 == "O"){print "Sfj(",NR,")=0.85"} | |
| else if($1=="P"){print "Sfj(",NR,")=0.86"} | |
| else if($1=="S"){print "Sfj(",NR,")=0.96"} | |
| }' |
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
| awk 'BEGIN {srand()} !/^$/ {printf "%s %f\n",$0, rand()}' merged.arff | sort -n -k2 | | |
| awk '{ | |
| if(NR<=10) {printf "%s\n", $1 >> "t01.csv"} | |
| if(NR<=20) {printf "%s\n", $1 >> "t02.csv"} | |
| if(NR<=40) {printf "%s\n", $1 >> "t03.csv"} | |
| if(NR<=80) {printf "%s\n", $1 >> "t04.csv"} | |
| if(NR<=160) {printf "%s\n", $1 >> "t05.csv"} | |
| if(NR<=320) {printf "%s\n", $1 >> "t06.csv"} | |
| if(NR>320) {printf "%s\n", $1 >> "test.csv"} |
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
| # this R code, will read all the result files found in the specified directory, | |
| # and plot the membrane thickness as a function of time | |
| f.list <- list.files("run_05_rad8t6_den0.2/", pattern="res.tknss.*", full.names=T) | |
| d.list <- lapply(f.list, read.table) | |
| d <- do.call(rbind, d.list) | |
| d$V1=as.numeric(rownames(d))/500 |
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
| awk ' | |
| function prpdb(anum, aname, rnum, x,y,z) { | |
| if(rnum<1000) { | |
| printf "ATOM %5d %-3s TIPT0%4d %8.3f%8.3f%8.3f 1.00 0.00 WT00\n",anum, aname, rnum, x, y, z | |
| }else{ | |
| printf "ATOM %5d %-3s TIPT0%5d %8.3f%8.3f%8.3f 1.00 0.00 WT00\n",anum, aname, rnum, x, y, z | |
| } | |
| } | |
| BEGIN { srand() } |