Skip to content

Instantly share code, notes, and snippets.

Harit Himanshu harit-sunrun

Block or report user

Report or block harit-sunrun

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
harit-sunrun /
Created Jun 10, 2013
Tributary inlet
harit-sunrun / flask
Created Mar 23, 2013
Registering multiple modules with flask blueprints. This will help to separate a project into multiple modules
View flask
# Project Structure
harit-sunrun / Sublime: Preferences.sublime-settings
Last active Dec 11, 2015
Make you Sublime look beautiful
View Sublime: Preferences.sublime-settings
Install this theme
and font
then make changes in your Sublime Text -> Preferences -> Settings - User as following
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
"font_face": "Inconsolata-dz",
"font_size": 12.0,
harit-sunrun / PackageYourApp.xslt
Created Sep 18, 2012
Package Java Module as jar with dependencies included
View PackageYourApp.xslt
harit-sunrun /
Created Aug 2, 2012
This is basic template you would usually need to write a Map reduce program. Most part would remain same, except Job related inputs and input/output type classes
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.Tool;
harit-sunrun /
Created Jul 30, 2012
Build the count of counts for cited patents from patent dataset
package com.hadoop.patent;
* This program collect data about how many times a patent has been cited
* input data -
* use the citation data set cite75_99.txt and the patent description data set apat63_99.txt.
import org.apache.hadoop.conf.Configuration;
harit-sunrun /
Created Jun 27, 2012
Find inOrder successor and inOrder predecessor in binary search tree (BST)
Node predecessor(Node node) {
if ((node.left == null) && (node.right==null)) {
return node;
if (node.right != null) {
return predecessor(node.right);
if (node.left != null) {
return predecessor(node.left);
harit-sunrun /
Created May 9, 2012
Query CDYNE Advanced Address Verification web service using Python
This Gist will show you how to verify a postal address using CDYNE advanced address verification web service
The following code assumes that you have a valid license key
Document Reference :
import json
import urllib2
import urllib
View ajax based suggestion
var ajaxSuggest = false
function submitSuggestion() {
url = '/suggest/'
ajaxSuggest = false;
if (window.XMLHttpRequest) { // if we're on Gecko (Firefox etc.), KHTML/WebKit (Safari/Konqueror) and IE7
ajaxSuggest = new XMLHttpRequest(); // create our new Ajax object
if (ajaxSuggest.overrideMimeType) { // older Mozilla-based browsers need some extra help
You can’t perform that action at this time.