Skip to content

Instantly share code, notes, and snippets.

Avatar

Nitin Borwankar nborwankar

View GitHub Profile
View dash_crossfilter_example.py
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(
'https://gist.githubusercontent.com/chriddyp/'
@nborwankar
nborwankar / freebasicsInIndia.md
Last active Dec 30, 2015
Free Basics in India - some links (started Dec 2015)
View freebasicsInIndia.md
@nborwankar
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. https://onename.io/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
nborwankar / gist:5208953
Created Mar 20, 2013
two files needed for %pg magic in IPython - pgdb.py and pgmagic.py, this is pgmagic.py
View gist:5208953
__author__ = 'nitin'
# -*- coding: utf-8 -*-
"""
===========
pgmagic
===========
Magics for interacting with Postgres database server via psycopg2.
@nborwankar
nborwankar / gist:5208931
Created Mar 20, 2013
two python files needed for %pg magic in IPython pgdb.py and pgmagic.py. This is pgdb.py
View gist:5208931
# pgdb.py
__author__ = 'nitin'
import psycopg2 as pspg2
import sys
# import pandas as pd, then use pandas.io.sql
db_data = {
'host':'localhost',
'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