Skip to content

Instantly share code, notes, and snippets.

##################################################################
# This is benchmark code for using titanic
# Use this as starter code for titanic competition
# Author: taposh roy
##################################################################
#This will load data and help create a output function
#attaching titanic data
attach("/titanic/input/titanic.RData")
@taposh
taposh / gist:6804098
Created October 3, 2013 02:57
Convert JSON to Csv utility:
import urllib2
import json
import csv
#URL
#j = urllib2.urlopen('http://www.test.com/test')
#File
j = open('/Users/taposhdr/testJson.txt')
js = json.load(j)
@taposh
taposh / sepc_baseline.R
Last active December 20, 2015 15:19
Baseline code, converted in R from python with learning & comments. https://www.kaggle.com/c/ams-2014-solar-energy-prediction-contest/data
#NetCDF is a set of software libraries and self-describing, machine-independent data formats that support the creation, #access, and sharing of array-oriented scientific data.
#http://www.unidata.ucar.edu/software/netcdf/
loadMesonetData <- function(filename, stationFilename = "~/kaggle/solar/data/station_info.csv")
{
data <- read.csv(filename)
dates <- data[["Date"]]
data <- data[names(data) != "Date"]
stationData <- read.csv(stationFilename)
structure(list(data, dates, stationData),
@taposh
taposh / nodejs-mysqlconnect.js
Created August 1, 2013 20:46
Nodejs- Connect to mysql
// Include http module,
var http = require('http'),
// And mysql module you've just installed.
mysql = require("mysql");
// Create the connection.
var connection = mysql.createConnection({
user: "root",
password: "password",
@taposh
taposh / prime.js
Last active December 20, 2015 05:19
Node.js code for generating prime numbers and print out in text file.
var firstkfib = function(k) {
var i =3;
var arr =[];
//2 is prime
if(k>2){arr.push(2);}
for (var i=3; i<=k; i+=2){

Unofficial OpenTable API

This project was created for one purpose — to make OpenTable data easily accesible to developers. No longer do you have to download XLS file, parse it and insert into your app's database. That shit is annoying.

It is absolutely free and open for everyone to use.

Created by @dan_sosedoff while drinking beers with @alwaysunday in Austin, TX.

Usage