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
<!-- | |
Django template snippet that gives the current time, | |
as an "RFC-822 compliant" date-time suitable for RSS feeds. | |
Of course, you will probably never need to use this, since | |
generating RSS feeds via Django templates isn't the best way ... | |
you should use the Django feed syndication framework instead | |
( https://docs.djangoproject.com/en/dev/ref/contrib/syndication/ ) | |
--> |
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/python | |
WhatThisIS=""" | |
This is a hacked together script to connect to all of your running EC2 instances, and to provide a single SSH prompt amongst all of them, and to assist in uploading, splitting, and downloading files. email me at winniningham at and email server called gmail.com :P | |
""" | |
import paramiko | |
from numpy import * |
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
from google.appengine.ext import webapp | |
from google.appengine.ext.webapp import util | |
from django.utils import simplejson as json | |
from google.appengine.ext import db | |
import re | |
import pdb, sys | |
debugger = pdb.Pdb(stdin=sys.__stdin__, stdout=sys.__stdout__) | |
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
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;})() |
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
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 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 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 |
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 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 |
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
# 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) |
OlderNewer