Skip to content

Instantly share code, notes, and snippets.

View conceptofmind's full-sized avatar
💭
The ghost in the machine - 从石头挤水

Enrico Shippole conceptofmind

💭
The ghost in the machine - 从石头挤水
View GitHub Profile
@conceptofmind
conceptofmind / topological_sort.py
Created January 17, 2025 14:53
Toplogical Sort
def topological_sort_nx(files):
graphs = nx.DiGraph()
for file in files:
graphs.add_node(file)
for fileA in files:
for fileB in files:
if has_dependency(fileA, fileB):
graphs.add_edge(fileB, fileA)