From 51b000ca88fc256b4112ad0ded1d2195bd3801f2 Mon Sep 17 00:00:00 2001 From: killian <63927363+KillianLucas@users.noreply.github.com> Date: Sat, 3 Feb 2024 17:37:41 -0800 Subject: [PATCH] Computer docstring --- OS/01/computer/kernel_watcher.py | 4 ++++ OS/01/computer/run.py | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/OS/01/computer/kernel_watcher.py b/OS/01/computer/kernel_watcher.py index e69de29..a4bc2a2 100644 --- a/OS/01/computer/kernel_watcher.py +++ b/OS/01/computer/kernel_watcher.py @@ -0,0 +1,4 @@ +""" +Watches the kernel. When it sees something that passes a filter, +it sends POST request with that to /computer. +""" \ No newline at end of file diff --git a/OS/01/computer/run.py b/OS/01/computer/run.py index e69de29..7a41a1e 100644 --- a/OS/01/computer/run.py +++ b/OS/01/computer/run.py @@ -0,0 +1,9 @@ +""" +Exposes a SSE streaming server endpoint at /run, which recieves language and code, +and streams the output. +""" + +from interpreter import interpreter + +for chunk in interpreter.run(language, code, stream=True): + stream(chunk) \ No newline at end of file