View lda.sh
#!/bin/bash | |
( | |
set -e | |
set -u | |
export CLASSPATH=.:`echo lib/server/*.jar | sed 's/ /:/g'` | |
cat > ldap.xml <<EOF |
View omero_stats.py
#!/usr/bin/env python | |
import psycopg2 | |
import datetime | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.dates as mdates | |
import matplotlib.cbook as cbook | |
conn = psycopg2.connect("dbname=omerodb user=omerouser host=localhost") |
View dict_of_dict.py
dict1 = {'data1':'Lorem', 'data2':'ipsum', 'data3':'dolor'} | |
dict2 = {'data1':'sit', 'data2':'amet', 'data3':'consectetur'} | |
dict3 = {'data1':'adipisicing', 'data2':'elit', 'data3':'sed'} | |
#Basically just offically names each dictionary to the same as it's variable name, | |
dict_of_dict = {'dict1':dict1, 'dict2':dict2,'dict3':dict3} | |
# To find 'dict1_data2' | |
thing_to_find = 'dict1_data2' |
View fast_lookup_filter.py
test = set([]) | |
keep = 'keep.txt' | |
all = 'input.txt' | |
out = 'output.txt' | |
outputfile = open(out, 'w') | |
with open(keep, 'rb') as file: | |
for line in file: |
View bash_prompt.sh
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch/status of the current git repository | |
# * the return value of the previous command | |
# * the fact you just came from Windows and are used to having newlines in | |
# your prompts. |
View web-dev-runserver
#!/bin/bash | |
export OMERO_PREFIX=~/Checkouts/openmicroscopy/dist # Example server build path | |
# Make sure the Django code etc can be imported | |
#export PYTHONPATH=$OMERO_PREFIX/lib/python/ | |
cd $OMERO_PREFIX | |
# need to remove the built omeroweb code so it doesn't get imported | |
rm -rf lib/python/omeroweb/ |
View ice01.make
dpwrussell@bioch3117 ~ | |
$ cat /Users/dpwrussell/Library/Logs/Homebrew/ice/01.make | |
making all in config | |
echo "" | |
making all in src | |
making all in IceUtil | |
making all in ca | |
cp iceca ../../bin/iceca | |
cp ImportKey.class ../../lib/ImportKey.class |
View test1.py
from functools import update_wrapper | |
from django.utils.decorators import method_decorator | |
class MyDecorator(object): | |
def __init__(self): | |
print 'MyDecorator init' | |
def __call__(self, f): | |
print 'MyDecorator call' |
View .gitignore
email_details.cfg |
View .gitignore
omero_details.cfg | |
*.pyc |
OlderNewer