Skip to content

Instantly share code, notes, and snippets.

View rishabhbhardwaj's full-sized avatar

Rishabh rishabhbhardwaj

View GitHub Profile
@rishabhbhardwaj
rishabhbhardwaj / titanic_rf_kaggle.py
Created December 11, 2016 02:59
Random Forest classification using sklearn Python for Titanic Dataset
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 7 14:22:57 2016
@author: rishabh
"""
import pandas as pd
import numpy as np
@rishabhbhardwaj
rishabhbhardwaj / titanic_dt_kaggle.py
Last active July 17, 2018 13:35
Decision Tree classification using sklearn Python for Titanic Dataset
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 28 13:51:26 2016
@author: rishabh
"""
import pandas as pd
import numpy as np
@rishabhbhardwaj
rishabhbhardwaj / SampleElectron_main.json
Last active November 20, 2016 18:44
SampleElectron_main.js
const electron = require('electron')
// Module to control application life.
const app = electron.app
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow
let mainWindow
function createWindow () {
// This will create the browser window.Change the height/width according to th need.
mainWindow = new BrowserWindow({width: 800, height: 600})
@rishabhbhardwaj
rishabhbhardwaj / SampleElectron_package.json
Last active November 20, 2016 18:52
SampleElectron package.json desc
{
"name": "Electron_HelloWorld",
"version": "1.0.0",
"description": "Sample Application",
"main": "main.js",
"scripts": {
"start": "electron .",
"pack": "build --dir",
"dist": "build -mwl"
},
@rishabhbhardwaj
rishabhbhardwaj / wotd.py
Last active October 9, 2016 15:36
CommandLine-WordOfTheDay
#!/usr/bin/env python
"""
Gives you Word of the Day with its meanings and partOfSpeech.
Uses Wordnik.
"""
import requests, time, json
api_key="YOUR_WORDNIK_API_KEY" #Get Here: http://developer.wordnik.com/
date = time.strftime("%Y-%m-%d")
@rishabhbhardwaj
rishabhbhardwaj / parseGitLogsJson.py
Last active July 6, 2016 04:57
Parse Git Logs to Json
import os
import sys
args = sys.argv
l = len(args)
if l == 1:
repoPath = "."
elif l == 2:
repoPath = args[1]
else: