# /// script
# dependencies = [
# "matplotlib",
# "networkx",
# ]
# ///
graph_path = '/home/kenkeiras/repos/codigoparallevar/_gen/notes/graph.json'
ignored_nodes = (
# Index
'ea48ec1d-f9d4-4fb7-b39a-faa7b6e2ba95',
'096ddc7b-e98e-40bf-b0d0-0b447d54265c',
# This note
'6eed20c1-d778-4b23-a04e-fc245ad8eccd',
)
import matplotlib.pyplot as plt, json, networkx
data = json.load(open(graph_path))
graph = networkx.DiGraph()
for k, v in data.items():
for l in v['links']:
graph.add_edge(k, l['target'].split(':')[-1])
for node_id in ignored_nodes:
graph.remove_node(node_id)
subgraphs = list(networkx.connected_components(graph.to_undirected()))
centers = []
for subgraph in subgraphs:
sg = networkx.DiGraph()
any_found = False
for k in subgraph:
if k not in data:
continue
v = data[k]
for l in v['links']:
sg.add_edge(k, l['target'].split(':')[-1])
any_found = True
if not any_found:
continue
sg_centers = networkx.center(sg.to_undirected())
if data.get(sg_centers[0], {}).get('title'):
centers.append(f'[[id:{sg_centers[0]}][{data.get(sg_centers[0], {})["title"]}]]')
return '\n'.join(centers)
- [[id:f0daa053-2787-4eb3-98f0-2951ee7e6b8a][Text Indexes]]
- [[id:a546d3f1-7087-4498-bbd7-41f79737fd67][Nix]]
- [[id:4994460c-7ec1-4549-b7d3-49626449279e][Video]]
- [[id:b2d14460-4ac5-4063-9d54-68bbcd7bdf9d][Asynchronous Programming]]
- [[id:71d2dd6c-f559-4591-9fa3-0bbe72066694][NoiseTorch - Noise reduction]]
- [[id:e0d70001-99e1-40c9-a4c6-45914fa8efdc][Tools]]
- [[id:826af88a-7ddf-48ca-bc2f-6e8aa4bea45d][Math note apps]]
- [[id:923355e3-8e39-4262-800f-6fae09f52bcd][Power Management]]
- [[id:c7c499ad-c678-42a7-afce-88b752c5fe06][Nextflow]]
- [[id:ddf1c1ef-ff5a-4b0e-a08c-0faffcaa8c57][Annotation is Now a Web Standard]]
- [[id:a9bdb8e2-0f07-4a6b-a8f3-5efb91885003][Agile]]
- [[id:4393a99c-3f1e-4815-9080-6d5bf167edf6][SinOficina]]
- [[id:e98d92f7-7014-47c4-920a-7ea9af4012f2][2023]]
- [[id:2d01dbbd-2f9c-4df8-b2cb-5f50871b2375][Using SSH_ASKPASS to enter passwords]]
- [[id:fa60ed1c-ba05-4860-b44b-69f3d66143ba][Web Radios]]
- [[id:2f765124-b2af-4c6d-a866-a54b4e2db6aa][interfacelift]]
- [[id:e60d7e74-d928-40aa-a92b-baf498132a7c][Data visualization tools]]
- [[id:ffc5f3aa-853a-4ece-a104-c2348bef66f0][Power]]
- [[id:9e8e6cf4-a5d3-464b-b3c6-00a15fdde8da][OpenCL]]
- [[id:179eaad5-7917-4501-b7ce-9c95f23ef72f][Untangling the Tale of Ada Lovelace]]
- [[id:1e8d9642-ac82-4032-8c6f-832188262baa][Flush Google's public DNS cache]]
- [[id:225fe2a4-d976-4a01-a8e5-8aa87a11b697][Shader school]]
- [[id:e00d4151-70fe-41b3-9898-83025e903880][Quantum Games]]
- [[id:38a63f3b-cab1-44fc-8637-e8d79a4a2eef][Joy.js – make happy little programs]]
- [[id:06a565ca-dccc-4c91-97eb-df88411d8c3b][Alternativas veganas a ingredientes]]
- [[id:2571fba1-f9d7-4e20-b4db-411346de6d94][Toki Pona]]
- [[id:690c9a2c-68f1-47c9-8aaf-9c2e49ab1624][SystemD]]
- [[id:2f74ff0f-b2b6-4c58-9767-fd5bf46a3c6f][Writing an LLM from scratch, part 1]]
- [[id:b05005f6-78b4-4524-bfc7-0adb920b3b08][Sub 2]]