This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# code from http://danieljlewis.org/files/2010/06/Jenks.pdf | |
# described at http://danieljlewis.org/2010/06/07/jenks-natural-breaks-algorithm-in-python/ | |
def getJenksBreaks( dataList, numClass ): | |
dataList.sort() | |
mat1 = [] | |
for i in range(0,len(dataList)+1): | |
temp = [] | |
for j in range(0,numClass+1): | |
temp.append(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
gh_url = 'https://api.github.com' | |
req = urllib2.Request(gh_url) | |
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |