This file contains hidden or 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
from sn1.boot import entrypoint | |
import networkx as nx | |
@entrypoint() | |
def solve(graph:dict, terminals:list, cycle:bool = False, **kwargs): | |
graph = nx.node_link_graph(graph, link="links") | |
# check if the terminals are in the graph |
This file contains hidden or 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 sn1 | |
from sn1.boot import entrypoint | |
import networkx as nx | |
@entrypoint() | |
def anything( z:str, y: int = 1 ) -> str: | |
return y * z | |
@entrypoint() | |
def func( x: int = 1 ): |
This file contains hidden or 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 sn1 | |
from sn1.boot import entrypoint | |
import networkx as nx | |
@entrypoint() | |
def anything( z:str, y: int = 1 ) -> str: | |
return y * z | |
@entrypoint() | |
def func( x: int = 1 ): |
This file contains hidden or 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
# !uv add networkx matplotlib numpy scipy umap-learn | |
# Test | |
def mul(x: float, y: float) -> float: | |
return x * y | |
if __name__ == "__main__": | |
a = 10 | |
b = 0.1 | |
print(f'{a=}, {b=}, {mul(a,b)=}') |