Skip to content

Instantly share code, notes, and snippets.

View sidharthbolar's full-sized avatar
🏠
Working from home

Sidharth Bolar sidharthbolar

🏠
Working from home
View GitHub Profile
@luerhard
luerhard / BokehGraph.py
Last active April 16, 2021 18:45
The BokehGraph class creates super easy to use interactive plots for one-mode networkx graphs. Hover over nodes to see their attributes and color nodes by communities as shown in the docstring.
import networkx as nx
from collections import namedtuple
from math import sqrt
import bokeh
from bokeh import models, plotting, io
from bokeh.colors import RGB
import random
#corresponding package on pypi is confusingly called python-louvain