In [12]:
2**9 * 3**3


Out[12]:
13824

In [14]:
import os
os.getcwd()
#%run 'compute_edges_connected_components.py'


Out[14]:
'C:\\Users\\chaithcock\\Documents\\repos\\RushHour\\RushHourPy\\analysis_prototypes'

In [15]:
import networkx as nx

In [16]:
g = nx.Graph()
g


Out[16]:
<networkx.classes.graph.Graph at 0x186d0328128>

In [17]:
a = [[1,2,3],[4,5,6],[7,8,9]]

In [18]:
a


Out[18]:
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]

In [19]:
[i for i in range(len(a)-1,-1,-1)]


Out[19]:
[2, 1, 0]

In [20]:
[i for i in range(4,4,-1)]


Out[20]:
[]

In [21]:
x = 5==3
x


Out[21]:
False

In [22]:
g


Out[22]:
<networkx.classes.graph.Graph at 0x186d0328128>

In [23]:
g.add_node(3)

In [27]:
g.nodes()


Out[27]:
NodeView((3, 4, 6))

In [25]:
def add_node(g):
    g.add_node(7)

In [26]:
g.add_edge(4,6)

In [10]:
g.nodes()


Out[10]:
NodeView((3, 4, 6))

In [11]:
g[4]


Out[11]:
AtlasView({6: {}})

In [30]:


In [31]:
g[3]


Out[31]:
AtlasView({4: {}})

In [32]:
g.nodes[3]['attr'] = 'foo'

In [33]:
g[3]


Out[33]:
AtlasView({4: {}})

In [34]:
g.nodes[3]['attr']


Out[34]:
'foo'

In [35]:
g.nodes()


Out[35]:
NodeView((3, 7, 4))

In [ ]:
nx.set_node_attributes(g,)