Interface administrators, Administrators (Semantic MediaWiki), Editors (Semantic MediaWiki), Administrators
253
edits
([bot] update of page content) |
([bot] update of page content) Tag: Metadata slot edit |
||
footer | |||
---|---|---|---|
Line 1: | Line 1: | ||
{{#invoke:Entity|footer}} | |||
header | |||
Line 1: | Line 1: | ||
{{#invoke:Entity|header}} | |||
jsondata | |||
Line 1: | Line 1: | ||
{} | { | ||
"uuid": "123e4567-e89b-12d3-a456-426614174000", | |||
"name": "PythonEvaluationFromChatbot202507291734", | |||
"label": [ | |||
{ | |||
"text": "Python Evaluation from Chatbot 2025-07-29_17-34", | |||
"lang": "en" | |||
} | |||
], | |||
"image": "File:OSW07ef97b871ee4cb78b4579f6e53c5d95.png", | |||
"meta": { | |||
"uuid": "8067cdd8-d648-4abf-8b22-4e10de42489d", | |||
"change_id": [ | |||
"fcac22d6-a934-4968-8cac-b93be252767a" | |||
] | |||
}, | |||
"type": [ | |||
"Category:OSW136953ec4cbf49ef80e2343c0e1981c0" | |||
], | |||
"output": [ | |||
"File:OSW07ef97b871ee4cb78b4579f6e53c5d95.png" | |||
], | |||
"python_evaluation_code": "import matplotlib.pyplot as plt\nimport networkx as nx\n\n# Create a directed graph\nG = nx.DiGraph()\n\n# Add nodes for inputs and outputs\nG.add_node(\"Input 1\", color='lightblue')\nG.add_node(\"Input 2\", color='lightblue')\nG.add_node(\"Process\", color='lightgreen')\nG.add_node(\"Output 1\", color='lightcoral')\nG.add_node(\"Output 2\", color='lightcoral')\n\n# Add edges to represent the process flow\nG.add_edges_from([\n (\"Input 1\", \"Process\"),\n (\"Input 2\", \"Process\"),\n (\"Process\", \"Output 1\"),\n (\"Process\", \"Output 2\")\n])\n\n# Define positions of nodes\npos = {\n \"Input 1\": (-1, 1),\n \"Input 2\": (-1, -1),\n \"Process\": (0, 0),\n \"Output 1\": (1, 1),\n \"Output 2\": (1, -1)\n}\n\n# Draw the graph\nplt.figure(figsize=(8, 6))\nnode_colors = [nx.get_node_attributes(G, \"color\")[node] for node in G.nodes()]\n\nnx.draw(G, pos, with_labels=True, node_size=3000, node_color=node_colors, font_size=10, font_weight='bold', arrowsize=20)\nplt.title(\"Process Flow Diagram\")\nplt.savefig(\"/tmp/output.png\")\nplt.show()" | |||
} |