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 | |
set -e | |
# Downloads the lastet release of Uniprot, putting it in a release-specific directory. | |
# Creates associated BLAST databases. | |
# We need makeblastdb on our PATH, somehow | |
# module load blast | |
# Better to use a stable DOWNLOAD_TMP name to support resuming downloads |
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
## | |
# Update - no longer works. You need to also: | |
# edit: /lib/systemd/system/docker.service | |
# then run: sudo systemctl daemon-reload | |
# see, https://medium.com/@ibrahimgunduz34/how-to-change-docker-data-folder-configuration-33d372669056 | |
# | |
# TODO: Fix this to use sed or similar to edit /lib/systemd/system/docker.service | |
## | |
# From: https://forums.docker.com/t/how-do-i-change-the-docker-image-installation-directory/1169 |
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
import requests | |
from cashier import cache | |
""" | |
TO ALL MY INTELLIGENT FRIENDS: WHAT DO THESE 7 WORDS HAVE IN COMMON? | |
I am sending this only to my smart friends. I could not figure it out. See if you can figure out what these seven words all have in common | |
1. Banana | |
2. Dresser |
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
# Lightly modified from: https://gist.github.com/kjpgit/ceab4fc029c778dd1675bea8592e3bc1 | |
# Useful to ensure two copies of a script aren't running concurrently (assuming they use | |
# the same lock file, trying to lock it twice will raise IOError). | |
import fcntl | |
def _lock_file_exclusively(path): | |
""" | |
Open @path and lock it exlusively. | |
Return: file object, which you must maintain a reference to | |
(if it is closed, the lock is released). |
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 | |
# For MyTardis 3.7 - YMMV for other versions | |
set USER=ubuntu | |
set MYTARDIS_ADMIN_NAME=admin | |
set [email protected] | |
set MYTARDIS_DATA_DIR=/data/mytardis | |
set SETUP_DYNAMIC_DNS=no | |
set CREATE_DATA_VOLUME=no |
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
#!/usr/bin/env python | |
# Creates a PDF from a set of images in a directory (one image per page, alphanumeric ordering). | |
# | |
# Usage: | |
# python images2pdf.py output_file.pdf | |
# | |
# Requires: | |
# pip install fpdf | |
from fpdf import FPDF |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
friend = {'}':'{', ']':'[', ')':'('} | |
close = friend.keys() | |
open = friend.values() | |
def check(input): | |
stack = [] | |
for c in input: | |
if c in open: | |
stack.append(c) | |
elif c in close: |
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
############################################################ | |
# Dockerfile to build bcl2fastq container images | |
# Based on CentOS images made by fatherlinux | |
# fatherlinux is a RedHat developer | |
# http://developerblog.redhat.com/2014/05/15/practical-introduction-to-docker-containers/ | |
# Fork from version by: Cyril Firmo <[email protected]> | |
############################################################ | |
# Build: | |
# docker build -t bcl2fastq:2.19.0.316 -t bcl2fastq:2.19 -t bcl2fastq:latest . | |
# |