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
kview = function(df) { | |
fn = paste0(tempfile(), ".tsv") | |
write_tsv(df, fn, na="") | |
system(sprintf("libreoffice --calc %s", fn)) | |
} |
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 | |
set -xe | |
mkdir -p ~/.local/opt | |
cd ~/.local/opt | |
wget -O git-annex-standalone-amd64.tar.gz https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz | |
rm -rf git-annex.linux | |
tar xvf git-annex-standalone-amd64.tar.gz | |
mkdir -p ~/.local/bin | |
ln -sf $PWD/git-annex.linux/{git,git-annex,git-annex-shell,git-receive-pack,git-upload-pack,git-shell} ~/.local/bin | |
set +x |
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
as.numeric.verbose = function(x) { | |
# this code will parse german-style comma-as-decimal numbers or | |
# english-style dot-as-decimal numbers. | |
x = ifelse(grepl('^\\d+,\\d+$', x, perl=T), sub(',', '.', x, fixed=T), x) | |
x.num = as.numeric(x) | |
# Find which values got coerced to NA | |
coerced = which(!is.na(x) & is.na(x.num)) | |
if (length(coerced) > 0) { | |
cat("Following values coerced to NA:\n") | |
print(paste(coerced, x[coerced])) |
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 "This is the Chromosome 4 finder script" | |
grep '^Chr2' data/genes.bed > data/chr4.bed | |
wc -l data/chr4.bed |
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
dpkg-checkbuilddeps: error: Unmet build dependencies: python3-pytools | |
[1;33mW: Unmet build-dependency in source[0m | |
dpkg-buildpackage: info: source package snakemake | |
dpkg-buildpackage: info: source version 3.9.0+dfsg-1 | |
dpkg-buildpackage: info: source distribution UNRELEASED | |
dpkg-buildpackage: info: source changed by Kevin Murray <kdmfoss@gmail.com> | |
dpkg-source --before-build snakemake | |
dpkg-source: info: applying 0001-Use-the-inbuild-sphinx.ext.napoleon.patch | |
dpkg-source: info: applying 0003-Use-debian-s-mathjax-package.patch | |
dpkg-source: info: applying 0003-Compat-fix.patch |
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 | |
declare -A urls | |
urls[0.5]='https://s3.amazonaws.com/julialang/bin/linux/x64/0.5/julia-0.5-latest-linux-x86_64.tar.gz' | |
urls[nightly]='https://s3.amazonaws.com/julianightlies/bin/linux/x64/julia-latest-linux64.tar.gz' | |
set -xeuo pipefail | |
MAINVER=0.5 | |
PREFIX=${PREFIX:-$HOME} |
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
tara init af2573173e19a6ada1ab4a3486468336e05607e9 | |
Wed Jun 8 15:26:44 2016 +1000 |
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
template<typename Data> | |
class concurrent_queue | |
{ | |
private: | |
std::queue<Data> the_queue; | |
mutable std::mutex the_mutex; | |
std::condition_variable the_condition_variable; | |
public: | |
void push(Data const& 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 | |
if [ $# -lt 1 ] | |
then | |
echo "USAGE: run-debci-test <PKG.changes> [<outdir>]" | |
exit 1 | |
fi | |
if [ $# -eq 2 ] | |
then |
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
for pkg in $(cat allpkgs) | |
do | |
mkdir -p "${pkg}" | |
wget -nv -O "${pkg}/upstream_metadata" \ | |
"http://anonscm.debian.org/cgit/debian-med/${pkg}.git/plain/debian/upstream/metadata" \ | |
|| rm -f "${pkg}/upstream_metadata" | |
done | |
NewerOlder