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
#!/usr/bin/bash | |
awk '{ if ((NR>1)&&($0~/^>/)) { printf("\n%s", $0); } else if (NR==1) { printf("%s", $0); } else { printf("\t%s", $0); } }' \ | |
| grep -vwf $1 - \ | |
| tr "\t" "\n" |
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
awk '{OFS="\t"; print ">"$1"\n"$10}' |
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
python3 -m http.server $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
conda install -c anaconda ipykernel | |
python -m ipykernel install --user --name=$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
:e ++ff=dos | |
:set ff=unix |
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
sudo xcode-select -switch /Library/Developer/CommandLineTools/ |
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
# USAGE: jq -R -s -f sacct2json.jq | |
# objectify/1 takes an array of string values as inputs, converts | |
# numeric values to numbers, and packages the results into an object | |
# with keys specified by the "headers" array | |
def objectify(headers): | |
# For jq 1.4, replace the following line by: def tonumberq: .; | |
def tonumberq: tonumber? // .; | |
. as $in | |
| reduce range(0; headers|length) as $i ({}; .[headers[$i]] = ($in[$i] | tonumberq) ); |
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
awk -F ' ' '{ if(/^>/){F=sprintf("%s.fasta", substr($1,2)); print > F;next;} else {print >> F}}' |
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
#!/usr/bin/env perl | |
$string=$ARGV[0]; | |
$cnt=0; | |
$found=1; | |
while(<STDIN>){ | |
if( $cnt%4==0){ | |
if( /$string/i ){ | |
$found=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/sh | |
awk '$0~/^>/{print $0;next}; {gsub("U","T");print $0}' |
NewerOlder