Skip to content

Instantly share code, notes, and snippets.


Nitin Borwankar nborwankar

View GitHub Profile
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
import pandas as pd
app = dash.Dash()
df = pd.read_csv(
nborwankar /
Last active Dec 30, 2015
Free Basics in India - some links (started Dec 2015)
nborwankar / MLBootcampOct2015
Last active Oct 6, 2015
Notes and links for ML Bootcamp at UCB Oct 2015
View MLBootcampOct2015
Session 1
* Intro
* Motivation
* Installation
* Overview of Material
View gist:f5c726d1576701ae47dd
  1. General Background and Overview
View gist:e7f8bbd030186f202fa2
Verifying myself: My Bitcoin username is +nitinb.
View WhyTheJohnsHopkinsDataScienceCertificateProgramIsAWinner
I've had a good look at the new Data Science Certification program from Johns Hopkins on Coursera
and it looks like the first one to crack the code on what is needed for the future.
It gets many things right and they all add up to make it likely to be
a huge success compared to other such programs.
What does it get right?
a) Makes all 9 classes available at once on Cousera
b) Makes each class a uniform 4 weeks long
nborwankar / gist:5208953
Created Mar 20, 2013
two files needed for %pg magic in IPython - and, this is
View gist:5208953
__author__ = 'nitin'
# -*- coding: utf-8 -*-
Magics for interacting with Postgres database server via psycopg2.
nborwankar / gist:5208931
Created Mar 20, 2013
two python files needed for %pg magic in IPython and This is
View gist:5208931
__author__ = 'nitin'
import psycopg2 as pspg2
import sys
# import pandas as pd, then use
db_data = {
'dbname': 'nitin',
View ErrorMeasuresfForAnalysis2.R
# compute error measures for predictive model for activity (act) as dependent variable
# note this is computed for all 6 activities and a total computed which is an aggregate value
errormeasures <- function(orig, pred, act) {
N <- length(orig)
origtrue <-as.vector(NULL)
origfalse <-as.vector(NULL)
predtrue <-as.vector(NULL)
predfalse <-as.vector(NULL)
View RSessionToMADlibPG.txt
> rs <- dbSendQuery(con, statement = paste(
+ "SELECT * FROM", +"MADlib.c45_train('infogain','public.golf_data','trained_tree_infogain',null,'temperature,humidity','outlook,temperature,humidity,windy','id','class',100,'explicit', 5,0.001,0.001,0)"));
> df <- fetch(rs, n = -1)
> df
training_set_size tree_nodes tree_depth training_time split_criterion
14 8 3 00:00:00.311362 infogain