Skip to content

Instantly share code, notes, and snippets.

View hagberg's full-sized avatar

Aric Hagberg hagberg

View GitHub Profile
@hagberg
hagberg / gist:4591198
Last active December 11, 2015 11:08 — forked from jtorrents/gist:4586874
import time
import networkx as nx
from contextlib import contextmanager
@contextmanager
def hidden_nodes(G, nodes=None):
import types
if nodes is None:
nodes = []
def successors_iter(G,n):