Skip to content

Instantly share code, notes, and snippets.

View 2danlin's full-sized avatar

LIN Dandan 2danlin

  • Hong Kong University of Science and Technology
  • Hong Kong
View GitHub Profile
@2danlin
2danlin / pprcd.py
Created October 12, 2019 12:35 — forked from dgleich/pprcd.py
Personalized PageRank community detection
import collections
import sys
# setup the graph
G = {
1:set([ 2, 3, 5, 6,]),
2:set([ 1, 4,]),
3:set([ 1, 6, 7,]),
4:set([ 2, 5, 7, 8,]),
5:set([ 1, 4, 6, 8, 9, 10,]),