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 | |
#SBATCH --job-name=bwaindex | |
#SBATCH --output=bwaindex.out | |
#SBATCH --ntasks=1 | |
#SBATCH --cpus-per-task=1 | |
#SBATCH --time=01:00:00 | |
#SBATCH --mem-per-cpu=20000 | |
SIF=/shared/containers/dnazoo-uwa-20191106.sif |
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
import urllib.parse | |
TEMPLATEURL = "https://portal.azure.com/#create/Microsoft.Template/uri/" | |
def toraw(ghurl): | |
# convert github url to its raw equivalent, if needed | |
ghbase = "https://github.com" | |
ghrawbase = "https://raw.githubusercontent.com" | |
if ghbase in ghurl and "/blob/" in ghurl: | |
return ghurl.replace(ghbase, ghrawbase).replace("/blob/", "/") |
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
// modify the following two values as needed | |
DECLARE @dataVersion string = "mag-YYYY-MM-DD"; | |
DECLARE @blobAccount string = "XXX"; | |
DECLARE @uriPrefix string = "wasb://" + @dataVersion + "@" + @blobAccount + "/"; | |
DECLARE @outFile string = "/Output/patent_languages.tsv"; | |
@Papers = Papers(@uriPrefix); | |
@PaperLanguages = PaperLanguages(@uriPrefix); |
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 python | |
import sys | |
import json | |
DEF_PRIO = 'M' | |
added_task = json.loads(sys.stdin.readline()) | |
if 'priority' not in added_task: | |
sys.stderr.write("Adding default priority: {}\n".format(DEF_PRIO)) | |
added_task['priority'] = DEF_PRIO |
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
DECLARE @dataVersion string = "mag-2019-03-22"; | |
DECLARE @blobAccount string = "<PLACEHOLDER>"; | |
DECLARE @uriPrefix string = "wasb://" + @dataVersion + "@" + @blobAccount + "/"; | |
DECLARE @typeCounts string = "/Output/TypeCounts.tsv"; | |
@Papers = Papers(@uriPrefix); | |
@Types = SELECT | |
DocType, COUNT(1) AS cnt | |
FROM |
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/env python | |
import csv | |
import sys | |
import numpy | |
trace = sys.argv[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
# https://www.sylabs.io/guides/3.0/user-guide/quick_start.html#quick-installation-steps | |
# https://unix.stackexchange.com/questions/1338/what-is-the-fedora-equivalent-of-the-debian-build-essential-package | |
sudo yum install make automake gcc gcc-c++ kernel-devel | |
sudo yum install openssl-devel libuuid-devel | |
# install go | |
export VERSION=1.11 OS=linux ARCH=amd64 | |
cd /tmp | |
wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz |
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
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/raid-config.html | |
nvmes=$(sudo lsblk | awk '/^nvme/ {printf "/dev/%s ", $1}') | |
sudo mdadm --create --verbose /dev/md0 --level=0 --name=my_raid --raid-devices=$(echo $nvmes | wc -w) $nvmes | |
sleep 10# crutch | |
sudo mkfs.ext4 -L my_raid /dev/md0 | |
sudo mdadm --detail --scan | sudo tee -a /etc/mdadm.conf | |
sudo dracut -H -f /boot/initramfs-$(uname -r).img $(uname -r) | |
sudo mkdir /data | |
sudo mount LABEL=my_raid /data | |
sudo chown ec2-user:ec2-user /data/ |
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 | |
csv=$1 | |
test -z "$csv" && exit 1 | |
test -e "$csv" || exit 1 | |
grep -q '^AccessKeyId' $csv || exit 1 | |
test $(cat "$csv" | wc -l) -eq 2 || exit 1 | |
akid=$(tail -n1 $csv | cut -d',' -f 2) | |
sak=$(tail -n1 $csv | cut -d',' -f 2) |
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
import hts | |
var b: BGZ | |
open(b, "example.txt.gz", mode="rb") | |
set_threads(b, 2) | |
var kstr: kstring_t | |
kstr.l = 0 | |
kstr.m = 0 | |
kstr.s = nil |
NewerOlder