Skip to content

Instantly share code, notes, and snippets.

@drewconway
Created February 25, 2009 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drewconway/70316 to your computer and use it in GitHub Desktop.
Save drewconway/70316 to your computer and use it in GitHub Desktop.
from networkx import core
kcores=core.find_cores(G)
core_items=kcores.items()
two_core=[(a) for (a,b) in core_items if b>1]
K=subgraph(G,two_core)
info(K)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment