-
Publish documentation created with sphinx to github. Note that you don’t need to install the extra package. You can bypass Jekyll by adding a
.nojekyll
file to the repo -
Miniconda: Quick Installing full scientific python on a new unix machine. Instructions for setting it up on Travis-CI
-
python subprocess example in a unittest class
def setUp(self): self.server_log_file = open('.tsdb_server.log.test','w') self.server_proc = subprocess.Popen(['python', 'go_server.py'] ,stdout=self.server_log_file,stderr=subprocess.STDOUT) time.sleep(1) def tearDown(self): self.server_proc.terminate() self.server_log_file.close() time.sleep(1)
- Check if any python jobs are running in the background (of course this doesn’t have to be python)
jobs ps aux | grep 'python'
-
End-to-End Memory Networks for Question Answering in Python with very nice visualizations
-
nngraph resources
-
Sample Code (harvardnlp) here and here and some more that I wrote. Important thing that I found was that there is little to no thought given to the initial values of model params and gradParams. Set them yourself.
-
Convert .dot files (graphviz) between formats:
- PDF
dot -Tpdf filename.dot -o filename.pdf
-
PostScript
dot -Tps filename.dot -o filename.ps
#!/bin/bash if [ $1 == "-h" ]; then echo "Syntax::sh scriptname output-file classifer-name num-epochs" exit fi # check outputfile if [ -z $1 ]; then echo "Output file not specified. Using 'output.all' " OUTFILE="output.all" else OUTFILE=$1 if [ -e $OUTFILE ]; then echo "Emptying " $OUTFILE rm $OUTFILE fi echo "Output File = " $OUTFILE fi
- Get a specific file from a different branch on git
git checkout branch2 file.py
- Get a specific file from a different branch on git and check changes line by line
git checkout --patch branch2 file.py