Skip to content

Instantly share code, notes, and snippets.

@ramjoshi
ramjoshi / keybase.md
Last active August 28, 2017 00:35
Keybase

Keybase proof

I hereby claim:

  • I am ramjoshi on github.
  • I am ramjoshi (https://keybase.io/ramjoshi) on keybase.
  • I have a public key whose fingerprint is FB3A E5A3 09A7 1DFF 20E0 1346 1A7A 577C AF54 634A

To claim this, I am signing this object:

@ramjoshi
ramjoshi / laststats.py
Created March 5, 2014 05:45
Python script to get the top 100 songs scrobbled on Last.fm in all the metros in U.S and associated stats and track info.
#Fetches the top 100 songs scrobbled in all the metros in U.S and associated stats and track info.
import urllib
import urllib2
from lxml import etree
import os
try:
import cpickle as pickle
except:
import pickle
@ramjoshi
ramjoshi / rdp.js
Created July 26, 2012 16:55 — forked from rhyolight/rdp.js
Ramer-Douglas-Peucker line filtering algorithm in JavaScript
function findPerpendicularDistance(point, line) {
var pointX = point[0],
pointY = point[1],
lineStart = {
x: line[0][0],
y: line[0][1]
},
lineEnd = {
x: line[1][0],
y: line[1][1]