Do the whole thing:
PYTHONPATH='.' luigi --module small Small --local-scheduler
#!/usr/bin/env python | |
from sys import stdin, stdout | |
import csv | |
rdr = csv.reader(stdin, delimiter='\t') | |
wrt = csv.writer(stdout, delimiter='\t') | |
vals = [] | |
rows = [] | |
for row in rdr: |
Do the whole thing:
PYTHONPATH='.' luigi --module small Small --local-scheduler
model_G = nn.Sequential() | |
model_G:add(nn.JoinTable(2, 2)) | |
model_G:add(cudnn.SpatialConvolutionUpsample(3+1, 64, 7, 7, 1, 1)):add(cudnn.ReLU(true)) | |
model_G:add(nn.SpatialBatchNormalization(64, nil, nil, false)) | |
model_G:add(cudnn.SpatialConvolutionUpsample(64, 368, 7, 7, 1, 4)):add(cudnn.ReLU(true)) | |
model_G:add(nn.SpatialBatchNormalization(368, nil, nil, false)) | |
model_G:add(nn.SpatialDropout(0.5)) | |
model_G:add(cudnn.SpatialConvolutionUpsample(368, 128, 7, 7, 1, 4)):add(cudnn.ReLU(true)) | |
model_G:add(nn.SpatialBatchNormalization(128, nil, nil, false)) | |
model_G:add(nn.FeatureLPPooling(2,2,2,true)) |
#!/usr/bin/env bash | |
# mostly from http://word.bitly.com/post/31921713978/static-analysis | |
function cfmt { | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: cfmt <file>" | |
else | |
astyle \ | |
--style=1tbs \ | |
--lineend=linux \ | |
--convert-tabs \ |
Some useful Python one-liners taken from http://www.reddit.com/r/Python/comments/fofan/suggestion_for_a_python_blogger_figure_out_what/ | |
All modules listed are part of the standard library and should work with Python 2.6+ | |
How to use: | |
$ python -m [module] [arguments] | |
calendar - does default to displaying a yearly calendar, but it has a bunch of options (args are year or year month, options are HTML output, calendar locale, encoding, and some type-specific stuff, see python -m calendar -h) | |
cgi, dumps a bunch of information as HTML to stdout |
#! /bin/bash | |
# Description: show dependency tree | |
# Author: damphat | |
if [ $# -lt 1 ]; then | |
echo 'Usage: apt-rdepends-tree [-r] <package>' | |
echo 'Required packages: apt-rdepends' | |
exit 1 | |
fi |
#!/usr/bin/env sh | |
curl "http://vlib.sub.uni-goettingen.de/pazpar2/search.pz2?command=init&service=vlib" | grep init | sed -e 's/.*<session>//' | sed -e 's/<\/session>.*//' > /tmp/sessionID ; curl "http://vlib.sub.uni-goettingen.de/pazpar2/search.pz2?command=search&query=gaga&session=`cat /tmp/sessionID`" ; curl "http://vlib.sub.uni-goettingen.de/pazpar2/search.pz2?command=show&session=`cat /tmp/sessionID`" ; curl "http://vlib.sub.uni-goettingen.de/pazpar2/search.pz2?command=show&session=`cat /tmp/sessionID`" ; curl "http://vlib.sub.uni-goettingen.de/pazpar2/search.pz2?command=show&session=`cat /tmp/sessionID`" ; curl "http://vlib.sub.uni-goettingen.de/pazpar2/search.pz2?command=show&session=`cat /tmp/sessionID`" ; curl "http://vlib.sub.uni-goettingen.de/pazpar2/search.pz2?command=show&session=`cat /tmp/sessionID`" ; curl "http://vlib.sub.uni-goettingen.de/pazpar2/search.pz2?command=show&session=`cat /tmp/sessionID`" ; curl "http://vlib.sub.uni-goettingen.de/pazpar2/search.pz2?command=show&session=`cat /tmp/se |