diff --git a/jupyter/Makefile b/jupyter/Makefile index 19aa589..8fd5a88 100644 --- a/jupyter/Makefile +++ b/jupyter/Makefile @@ -1,4 +1,7 @@ -all: +all: The\ Art\ of\ Memory\ Loss.ipynb jupyter nbconvert --to html "The Art of Memory Loss.ipynb" --config jupyter_nbconvert_config.py sed -i '2 a ' "The Art of Memory Loss.html" +upload: all + scp rise.css The\ Art\ of\ Memory\ Loss.html oreburgh:www/forschungstage + diff --git a/jupyter/The Art of Memory Loss.html b/jupyter/The Art of Memory Loss.html index 0a151ee..3b6be49 100644 --- a/jupyter/The Art of Memory Loss.html +++ b/jupyter/The Art of Memory Loss.html @@ -15864,7 +15864,7 @@ $$ -
aus. Hierbei ist $\lambda != 0$ eine Zahl, die man auch Eigenwert
from numpy import array
@@ -16013,7 +16013,6 @@ Wie können wir aus den 7 Fröschen fair einen auswählen?
])
v = array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ])
v @ M
-# v @ matrix_power(M, 3*1)
import matplotlib as mpl
-import matplotlib.pyplot as plt
-import networkx as nx
-
-seed = 13649 # Seed random number generators for reproducibility
-G = nx.random_k_out_graph(10, 3, 0.5, seed=seed)
-pos = nx.spring_layout(G, seed=seed)
-
-node_sizes = [3 + 10 * i for i in range(len(G))]
-M = G.number_of_edges()
-edge_colors = range(2, M + 2)
-edge_alphas = [(5 + i) / (M + 4) for i in range(M)]
-cmap = plt.cm.plasma
-
-nodes = nx.draw_networkx_nodes(G, pos, node_size=node_sizes, node_color="indigo")
-edges = nx.draw_networkx_edges(
- G,
- pos,
- node_size=node_sizes,
- arrowstyle="->",
- arrowsize=10,
- edge_color=edge_colors,
- edge_cmap=cmap,
- width=2,
-)
-# set alpha value for each edge
-for i in range(M):
- edges[i].set_alpha(edge_alphas[i])
-
-pc = mpl.collections.PatchCollection(edges, cmap=cmap)
-pc.set_array(edge_colors)
-
-ax = plt.gca()
-ax.set_axis_off()
-plt.colorbar(pc, ax=ax)
-plt.show()
-