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 bash | |
UBUNTU_RELEASE=$(lsb_release --codename --short) | |
export COMPOSE_VERSION=1.8.0 | |
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
sudo apt-get update | |
sudo apt-get install python-pip apt-transport-https ca-certificates |
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 os | |
import argparse | |
import pandas as pd | |
import gffutils | |
def create_featuredb(gtf_file, output_file=':memory:'): | |
""" |
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 | |
""" | |
Given a list of video files, creates a tiled output video with each | |
input video playing simulutaneously with mixed audio. | |
The result is something like a composite security camera feed, or the | |
"Brady Bunch" opening credits. | |
DISCLAIMER: The author holds no responsibility for your actions if you | |
become criminally insane from watching all nine Puppet Master films | |
simultaneously. You have been warned. |
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
############################################################ | |
# 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 <firmo@biologie.ens.fr> | |
############################################################ | |
# Build: | |
# docker build -t bcl2fastq:2.19.0.316 -t bcl2fastq:2.19 -t bcl2fastq:latest . | |
# |
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
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: |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
# 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 |
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 | |
# For MyTardis 3.7 - YMMV for other versions | |
set USER=ubuntu | |
set MYTARDIS_ADMIN_NAME=admin | |
set MYTARDIS_ADMIN_EMAIL=spam+mytardis@pansapiens.com | |
set MYTARDIS_DATA_DIR=/data/mytardis | |
set SETUP_DYNAMIC_DNS=no | |
set CREATE_DATA_VOLUME=no |
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
# 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 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 |