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 | |
""" | |
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 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 | |
import sys | |
import os | |
import argparse | |
import pandas as pd | |
import gffutils | |
def create_featuredb(gtf_file, output_file=':memory:'): | |
""" |
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 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 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
# This version accepts any number of dictionaries | |
# http://stackoverflow.com/a/26853961 | |
def merge_dicts(*dict_args): | |
""" | |
Given any number of dicts, shallow copy and merge into a new dict, | |
precedence goes to key value pairs in latter dicts. | |
""" | |
result = {} | |
for dictionary in dict_args: | |
result.update(dictionary) |
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 | |
""" | |
Takes a list of CloudStor download page links and turns them | |
into direct download links, suitable for use with wget -i or | |
aria2 -i. | |
$ convert_cloudstor_links.py page_links.txt >direct_links.txt | |
$ wget --content-disposition -c -i direct_links.txt | |
""" | |
import sys |
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
# Tools: | |
# sf-convert: http://sw-tools.pdb.org/apps/SF-CONVERT/doc/V1-0-00/documentation.html | |
# Coot | |
# CCP4 | |
# Pymol | |
# Get mmCIF format structure factors, and PDB coordinates | |
wget http://www.rcsb.org/pdb/files/r4J1Ysf.ent.gz | |
wget http://www.rcsb.org/pdb/files/4J1Y.pdb.gz | |
gunzip r4J1Ysf.ent.gz 4J1Y.pdb.gz |
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 | |
# A simple script to suck up HTML, convert any images to inline Base64 | |
# encoded format and write out the converted file. | |
# | |
# Usage: python standalone_html.py <input_file.html> <output_file.html> | |
# | |
# TODO: Consider MHTML format: https://en.wikipedia.org/wiki/MHTML | |
import os | |
from bs4 import BeautifulSoup |
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
while true; do if host www.example.com | grep "192.168.0.1"; then sleep 3600; else printf "\a"; xmessage -center "Domain propagated"; fi done |
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
javascript:(function(){var%20url_regex=/(https?:\/\/(?:[-\w\.]+)+(?::\d+)?)((?:\/([\w/_\-\.]*(\?\S+)?)?)?)/,url_results=url_regex.exec(document.location),new_url%20=%20url_results[1]+".proxy.com"+url_results[2];window.location=new_url;})() |