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
| #!/bin/bash | |
| # Get and install openblas | |
| mkdir -p ~/bin/openblas | |
| cd ~/bin/openblas | |
| wget https://github.com/xianyi/OpenBLAS/archive/v0.2.9.rc1.zip | |
| unzip v0.2.9.rc1 | |
| cd OpenBLAS-0.2.9.rc1/ | |
| make |
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
| #!/bin/sh | |
| #rule: {job} | |
| #input: {job.input} | |
| #output: {job.output} | |
| #threads: {job.threads} | |
| {self.workflow.snakemakepath} --snakefile {self.workflow.snakefile} \ | |
| --force -j{self.cores} \ | |
| --directory {workdir} --nocolor --notemp --quiet --nolock {job.output} \ | |
| > /dev/null && touch "{jobfinished}" || touch "{jobfailed}" | |
| exit 0 |
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
| #!/bin/sh | |
| # | |
| # Adopts and submit a snakemake cluster job script to SGE queue | |
| # | |
| # by Hyeshik Chang | |
| # | |
| JOBSCRIPT_SNAKEMAKE=$1 | |
| JOBSCRIPT_SGE="`dirname $1`/sge`basename $1`" |
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
| # set this to your head node hostname (run hostname) | |
| HEAD_NODE_NAME=master | |
| if [ `hostname` = $HEAD_NODE_NAME ]; then | |
| NODES=`qconf -sel | grep -v $HEAD_NODE_NAME` | |
| for NODE in $NODES; do | |
| SCRIPT_PATH=$(dirname `which $0`) | |
| qsub -l h=$NODE $SCRIPT_PATH | |
| done |
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
| Improve the log (https://coderwall.com/p/euwpig?i=3&p=1&t=git) | |
| git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" | |
| Enable color in git: | |
| git config --global --add color.ui true | |
| Make git push only push the current branch | |
| git config --global push.default current |
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
| # Reset | |
| Color_Off="\[\033[0m\]" # Text Reset | |
| # Regular Colors | |
| Black="\[\033[0;30m\]" # Black | |
| Red="\[\033[0;31m\]" # Red | |
| Green="\[\033[0;32m\]" # Green | |
| Yellow="\[\033[0;33m\]" # Yellow | |
| Blue="\[\033[0;34m\]" # Blue | |
| Purple="\[\033[0;35m\]" # Purple |
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
| // WARNING: Requires C99 compatible compiler | |
| #include <unistd.h> | |
| #include <stdlib.h> | |
| #include "heap.h" | |
| #define CMP(a, b) ((a) >= (b)) | |
| static const unsigned int base_size = 4; |