Skip to content

Instantly share code, notes, and snippets.

View santhoshtr's full-sized avatar
👷‍♂️
Work in progress

Santhosh Thottingal santhoshtr

👷‍♂️
Work in progress
View GitHub Profile
@santhoshtr
santhoshtr / levenshtein.js
Created August 10, 2012 08:59 — forked from IgorInger/levenshtein.js
Levenshtein distance- Javascript
var levenshteinDistance = function(u, v) {
var m = u.length;
var n = v.length;
var D = [];
for(var i = 0; i <= m; i++) {
D.push([]);
for(var j = 0; j <= n; j++) {
D[i][j] = 0;
}
}
@santhoshtr
santhoshtr / 0_urllib2.py
Created August 17, 2011 06:33 — forked from kennethreitz/0_urllib2.py
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()