Skip to content

Instantly share code, notes, and snippets.

View steffencruz's full-sized avatar

Steffen Cruz steffencruz

View GitHub Profile
@steffencruz
steffencruz / graph.py
Created October 10, 2025 14:55
Agent code
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
@steffencruz
steffencruz / agent.py
Created October 8, 2025 12:02
Agent code
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 ):
@steffencruz
steffencruz / agent.py
Created October 8, 2025 11:57
Agent code
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 ):
@steffencruz
steffencruz / agent.py
Last active September 29, 2025 14:23
Some example agent code
# !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)=}')