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
from bokeh.plotting import figure, ColumnDataSource | |
from bokeh.models import HoverTool | |
def scatter_with_hover(df, x, y, | |
fig=None, cols=None, name=None, marker='x', | |
fig_width=500, fig_height=500, **kwargs): | |
""" | |
Plots an interactive scatter plot of `x` vs `y` using bokeh, with automatic | |
tooltips showing columns from `df`. |
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
from bokeh.plotting import figure, ColumnDataSource | |
from bokeh.models import HoverTool | |
def scatter_with_hover(df, x, y, | |
fig=None, cols=None, name=None, marker='x', | |
fig_width=500, fig_height=500, **kwargs): | |
""" | |
Plots an interactive scatter plot of `x` vs `y` using bokeh, with automatic | |
tooltips showing columns from `df`. |
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
import theano | |
import theano.tensor as T | |
from theano.tensor.shared_randomstreams import RandomStreams | |
from theano.sandbox.rng_mrg import MRG_RandomStreams | |
from lasagne.updates import adam | |
from lasagne.utils import collect_shared_vars | |
from sklearn.datasets import fetch_mldata | |
from sklearn.cross_validation import train_test_split | |
from sklearn import preprocessing |
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
[global] | |
mode = FAST_RUN | |
floatX = float32 | |
int_division = floatX | |
exception_verbosity = high | |
warn_float64 = raise | |
allow_gc = False | |
compiledir_format=compiledir-%(platform)s-%(processor)s-%(python_version)s-%(python_bitwidth)s-%(hostname)s | |
linker = cvm | |
openmp = true |
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 | |
# NOTE : This script assumes that the aligments are in the src-tgt format | |
import optparse | |
import pprint | |
import sys | |
import numpy as np | |
optparser = optparse.OptionParser() |
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
# the following two lines give a two-line status, with the current window highlighted | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
# huge scrollback buffer | |
defscrollback 5000 | |
# no welcome message | |
startup_message off |
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
$ cvs -z3 -d:pserver:[email protected]:/sources/screen co screen | |
$ curl http://old.evanmeagher.net/files/gnu-screen-vertsplit.patch > gnu-screen-vertsplit.patch | |
$ cd screen/src | |
$ patch < ../../gnu-screen-vertsplit.patch | |
$ ./configure --enable-locale --enable-telnet --enable-colors256 --enable-rxct_osc | |
$ make | |
$ sudo make install |
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
# set up flags for Numpy C extentions compiling | |
export CFLAGS="-arch i386 -arch x86_64" | |
export FFLAGS="-m32 -m64" | |
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64" | |
export CC=gcc | |
export CXX="g++ -arch i386 -arch x86_64" | |
sudo pip install numpy | |
# success! |
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
OPENFST_VERSION=1.3.4 | |
PYFST_VERSION=0.2.3 | |
export CXX="clang++ -std=c++11 -stdlib=libstdc++" | |
cd ~/Downloads | |
curl -O http://openfst.org/twiki/pub/FST/FstDownload/openfst-$OPENFST_VERSION.tar.gz | |
tar zxf openfst-$OPENFST_VERSION.tar.gz | |
pushd openfst-$OPENFST_VERSION |