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
| __author__ = 'arenduchintala' | |
| import sys | |
| import codecs | |
| """ | |
| The following sys setup fixes a lot of issues with writing and reading in utf-8 chars. | |
| WARNING: pdb does not seem to work if you do reload(sys) | |
| """ | |
| reload(sys) | |
| sys.setdefaultencoding('utf-8') | |
| sys.stdin = codecs.getreader('utf-8')(sys.stdin) |
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 boto.mturk.connection | |
| import boto.mturk.question | |
| sandbox_host = 'mechanicalturk.sandbox.amazonaws.com' | |
| mturk = boto.mturk.connection.MTurkConnection( | |
| aws_access_key_id = 'my aws_access_key_id' | |
| aws_secret_access_key = 'my aws_secret_access_key', | |
| host = sandbox_host, | |
| debug = 2 # debug = 2 prints out all requests. but we'll just keep it at 1 |
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
| var assert = function (condition, message) { | |
| if (! condition) | |
| throw Error("Assert failed" + (typeof message !== "undefined" ? ": " + message : "")); | |
| } |
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
| __author__ = 'arenduchintala' | |
| import json | |
| class MyNode(dict): | |
| def __init__(self, d1, d2, children=None): | |
| dict.__init__(self) | |
| self.__dict__ = self | |
| self.a1 = d1 | |
| self.a2 = d2 |
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
| sudo apt-get update | |
| sudo apt-get install default-jre | |
| sudo apt-get install default-jdk |
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
| wget -O - http://kheafield.com/code/kenlm.tar.gz |tar xz | |
| pushd kenlm | |
| ./bjam -j4 | |
| popd kenlm |
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
| curl http://giza-pp.googlecode.com/files/giza-pp-v1.0.7.tar.gz -o giza-pp-v1.0.7.tar.gz | |
| tar -xzvf giza-pp-v1.0.7.tar.gz | |
| cd giza-pp | |
| perl -pi -w -e 's/<tr1\//</g;' GIZA++-v2/* mkcls-v2/* | |
| perl -pi -w -e 's/using namespace std::tr1;//g;' GIZA++-v2/* mkcls-v2/* | |
| perl -pi -w -e 's/std::tr1:://g;' GIZA++-v2/* mkcls-v2/* | |
| sed '36d' mkcls-v2/mystl.h > mkcls-v2/mystl.h.tmp | |
| sed '50d' mkcls-v2/mystl.h.tmp > mkcls-v2/mystl.h | |
| rm mkcls-v2/mystl.h.tmp | |
| make |
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
| curl -o install_superpack.sh https://raw.githubusercontent.com/fonnesbeck/ScipySuperpack/master/install_superpack.sh | |
| sh install_superpack.sh | |
| #see here for more details http://fonnesbeck.github.io/ScipySuperpack/ |
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
| wget http://serv.menzns.de/blog/downloads/screen.osx.latest | |
| sudo cp screen.osx.latest /usr/bin/screen |