I hereby claim:
- I am rishabhjain on github.
- I am rishabhjain (https://keybase.io/rishabhjain) on keybase.
- I have a public key ASAu67_la9sQs2dA4Q_MOGOp2CSMTdXY_BoWn_lG_FFTZQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Keep searching; in data, tech, arts, startups, world, love, and life.
I am a Python developer, specializing in data and natural language analysis. My professional experiences ranges across API development, natural language processing, business intelligence dashboard, and machine learning. I also have strong interests in search engines and data visualization.
##Table of Content
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure("2") do |config| | |
| # All Vagrant configuration is done here. The most common configuration | |
| # options are documented and commented below. For a complete reference, | |
| # please see the online documentation at vagrantup.com. | |
| # Every Vagrant virtual environment requires a box to build off of. | |
| config.vm.box = "precise32" |
| sudo apt-get update | |
| sudo apt-get -y install ruby1.9.1 ruby1.9.1-dev rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 build-essential libopenssl-ruby1.9.1 libssl-dev zlib1g-dev libxslt-dev libxml2-dev libmysqlclient-dev curl git | |
| sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 --slave /usr/share/man/man1/ruby.1.gz ruby.1.gz /usr/share/man/man1/ruby1.9.1.1.gz --slave /usr/bin/ri ri /usr/bin/ri1.9.1 --slave /usr/bin/irb irb /usr/bin/irb1.9.1 --slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1 | |
| git clone git://github.com/cantino/huginn.git | |
| cd huginn | |
| sudo gem install rake bundle | |
| #bundle | |
| echo mysql-server mysql-server/root_password password password | sudo debconf-set-selections | |
| echo mysql-server mysql-server/root_password_again password password | sudo debconf-set-selections | |
| sudo apt-get -y install mysql-server |
| require 'matrix' | |
| require 'debugger' | |
| def online_gradient_descent(sample,label,weight,learning_rate=0.1) | |
| # debugger | |
| # Expecting Sample and Weight to be a Vector | |
| # Expecting label to be from {1,-1} and learning_rate to be float | |
| # Single epoch, updates weight vector using a single sample | |
| weight -= (-1)*(learning_rate)*label*sample/(1+Math.exp(label*(sample.inner_product(weight)))) | |
| end |
| #!/usr/bin/python | |
| # Adapted from http://kutuma.blogspot.com/2007/08/sending-emails-via-gmail-with-python.html | |
| import getpass | |
| import smtplib | |
| from email.MIMEMultipart import MIMEMultipart | |
| from email.MIMEBase import MIMEBase | |
| from email.MIMEText import MIMEText | |
| from email import Encoders | |
| import os |
| import codecs,tarfile,os | |
| from sklearn.feature_extraction.text import CountVectorizer,TfidfTransformer | |
| from ipdb import set_trace as l | |
| # Put this script in folder having 20news-bydate.tar.gz and run main() | |
| def extract(): | |
| f = tarfile.open('20news-bydate.tar.gz', 'r:gz') #extracts tarballs | |
| f.extractall() | |
| trainpath = os.path.join(os.path.realpath('.'), '20news-bydate-train/') |
| from __future__ import division | |
| import tarfile, os | |
| import nltk | |
| from collections import Counter,defaultdict | |
| from math import log | |
| from ipdb import set_trace as l | |
| from nltk.corpus import wordnet | |
| from itertools import count | |
| class hashabledict(Counter): |
| from __future__ import division | |
| import numpy as np | |
| from functools import partial | |
| from itertools import product | |
| from collections import Counter,defaultdict | |
| from sklearn import svm | |
| from sklearn import linear_model | |
| from sklearn.ensemble import RandomForestClassifier | |
| from sklearn.decomposition import PCA | |
| from sklearn import neighbors |