Skip to content

Instantly share code, notes, and snippets.

View hamdikavak's full-sized avatar
🤞

Hamdi Kavak hamdikavak

🤞
View GitHub Profile
@dheerajrajagopal
dheerajrajagopal / WeightedPageRank.py
Created June 12, 2012 05:51
Weighted PageRank Python (PageRank courtesy: diogojc)
import numpy as np
from scipy.sparse import csc_matrix
import random
def column(matrix, i):
return [row[i] for row in matrix]
def pageRank(G, s = 0.85, maxerr = .001):
"""
Computes the pagerank for each of the n states.
@urschrei
urschrei / basemap_descartes.py
Last active November 6, 2020 02:49
How to plot Shapely Points using Matplotlib, Basemap, and Descartes
"""
required packages:
numpy
matplotlib
basemap: http://matplotlib.org/basemap/users/installing.html
shapely: https://pypi.python.org/pypi/Shapely
descartes: https://pypi.python.org/pypi/descartes
random