This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import networkx as nx | |
from contextlib import contextmanager | |
@contextmanager | |
def hidden(G, nodes=None, edges=None): | |
if nodes is None: | |
nodes = [] | |
if edges is None: | |
edges = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import math | |
from random import randrange, choice, shuffle | |
import networkx as nx | |
from networkx.utils import create_degree_sequence, powerlaw_sequence | |
def std(x): | |
#http://stackoverflow.com/questions/1174984/how-to-efficiently-calculate-a-running-standard-deviation | |
n = float(len(x)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from random import randrange, choice, shuffle | |
import numpy as np | |
import networkx as nx | |
from networkx.algorithms import flow | |
from networkx.utils import create_degree_sequence, powerlaw_sequence | |
flow_funcs = dict( | |
bkolmogorov = flow.boykov_kolmogorov, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Exact Solarized Dark color theme for the color GNU ls utility. | |
# Designed for dircolors (GNU coreutils) 5.97 | |
# | |
# This simple theme was simultaneously designed for these terminal color schemes: | |
# - Solarized dark (best) | |
# - Solarized light | |
# - default dark | |
# - default light | |
# with a slight optimization for Solarized Dark. | |
# |