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 bash | |
| cat <<EOF | |
| { | |
| "cells": [], | |
| "metadata": {}, | |
| "nbformat": 4, | |
| "nbformat_minor": 2 | |
| } | |
| EOF |
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 | |
| import sys | |
| from pdb import set_trace | |
| import sympy as ss | |
| from mpmath import * | |
| import matplotlib.pyplot as plt | |
| from matplotlib import cm | |
| import numpy as np | |
| import argparse | |
| from sympy.abc import x,y |
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
| # remap prefix from 'C-b' to 'C-o' | |
| unbind C-b | |
| set-option -g prefix C-o | |
| bind-key C-o send-prefix | |
| bind-key A rename-session | |
| unbind , | |
| # split panes using | and - | |
| bind | split-window -h | |
| bind - split-window -v | |
| unbind '"' |
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 python3 | |
| import subprocess, os | |
| import sys | |
| ERR1 = 'Latexmk: Errors, so I did not complete making targets' | |
| ERR2 = 'pdflatex: Command for \'pdflatex\' gave return code 256' | |
| def main(): | |
| proc = subprocess.Popen(['latexmk', '-pvc'] + sys.argv[1:], | |
| stdin=subprocess.PIPE, | |
| stdout=subprocess.PIPE, | |
| stderr=subprocess.STDOUT, |
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
| -- Usecase for a script runner. | |
| -- Author: Pushpendre Rastogi | |
| -- Date: 8 July 2017 | |
| -- Multiple small changes in code are a norm when developing machine learning software | |
| -- in dynamic languages, such as lua, python, because of a large number of hyper-parameters | |
| -- in machine learning code, and large number of typos because of lack of compile time | |
| -- type checking. For example, lua does not even enforce the number of arguments to a | |
| -- function to be the same as its signature. Because of this ML code typically needs to be | |
| -- run multiple times during development with small changes/fixes. | |
| -- ML code also commonly has costly processing that must be done on a dataset. |
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
| diff --git a/mtrand/mtrand.pyx b/mtrand/mtrand.pyx | |
| index 65c1954..79d0d70 100755 | |
| --- a/mtrand/mtrand.pyx | |
| +++ b/mtrand/mtrand.pyx | |
| @@ -71,6 +71,7 @@ cdef extern from "randomkit.h": | |
| rk_error rk_altfill(void *buffer, size_t size, int strong, | |
| rk_state *state) nogil | |
| double rk_gauss(rk_state *state) nogil | |
| + float rk_gauss_32bit(rk_state *state) nogil | |
| void rk_random_uint64(npy_uint64 off, npy_uint64 rng, npy_intp cnt, |
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
| COMCAST: Thank you for patiently waiting. I can certainly understand your | |
| concern regarding the price increase in monthly statement. The promotional price | |
| of service has ended and now you are paying regular charges for the current | |
| services. I have checked that you are currently paying $49.99 + taxes. | |
| _Customer_: Yes, that is correct | |
| COMCAST: I have a wonderful deal for you where you will be getting 20 + cable | |
| channels . Along with this , you will be getting 25 MBPS of internet speed along | |
| with one cable box (at no monthly rental ). By bundling the deal you will get |
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
| """Information Retrieval metrics | |
| Useful Resources: | |
| http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt | |
| http://www.nii.ac.jp/TechReports/05-014E.pdf | |
| http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf | |
| http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf | |
| Learning to Rank for Information Retrieval (Tie-Yan Liu) | |
| """ | |
| import numpy as np |
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
| # -*- coding: utf-8 -*- | |
| ''' | |
| | Filename : adaptive_inference.py | |
| | Description : Implementation of core concepts from "Learning Adaptive Value of Information for Structured Prediction" | |
| | Author : Pushpendre Rastogi | |
| | Created : Wed Sep 16 12:29:09 2015 (-0400) | |
| | Last-Updated: Thu Sep 17 03:13:58 2015 (-0400) | |
| | By: Pushpendre Rastogi | |
| | Update #: 73 | |
| ''' |
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
| ''' | |
| | Filename : shift-reduce-ppda.py | |
| | Description : A shift Reduce PPDA generator | |
| | Author : Pushpendre Rastogi | |
| | Created : Tue Sep 8 20:42:22 2015 (-0400) | |
| | Last-Updated: Tue Sep 8 23:09:28 2015 (-0400) | |
| | By: Pushpendre Rastogi | |
| | Update #: 33 | |
| The paper "Relating Probabilistic Grammar and Automata" compare PCFGs and PPDAs. | |
| They also explain how a PPDA produces a sentence. This class implements a PPDA |