python from threading import Thread import time def long_running(): print("Thread starting:") i = 0 while True: print(f"Loop {i}...") i += 1 time.sleep(1) print("Thread exiting.") t = Thread(target=long_running) t.start()
localhost
and exposing it via ngrok to a public address. The issue could be related to ngrok but in my personnal experience it is quite stable (when used to expose other services, such as web servers).from catboost import CatBoostClassifier, Pool
train_data = [[1, 3], [0, 4], [1, 7], [0, 3]]
train_labels = [1, 0, 1, 1]
model = CatBoostClassifier(learning_rate=0.03)
model.fit(train_data,
train_labels,
verbose=False,
plot=True)
➜ ~/projects/nbs git:(lcr-mer-772) ✗ VPN ✓ $ head -n 2 zon.py 16:21:45 # /// script # requires-python = ">=3.11" ➜ ~/projects/nbs git:(lcr-mer-772) ✗ VPN ✓ $ uv run marimo run --sandbox zon.py 16:21:47 warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`.
uv run
before the marimo call?server = marimo.create_asgi_app() apps_dir = os.path.join(os.path.dirname(__file__), "apps") for filename in sorted(os.listdir(apps_dir)): if filename.endswith(".py"): app_name = os.path.splitext(filename)[0] app_path = os.path.join(apps_dir, filename) server = server.with_app(path=f"/{app_name}", root=app_path) app = FastAPI() app.add_middleware(SessionMiddleware, secret_key="test") app.add_middleware(auth_middleware) labs_app.mount("/", server.build())
import marimo app = marimo.App(width="medium") access_token = context["access_token"] @app.cell def _(): import marimo as mo mo.md(access_token) # Trying to use the access_token from above but fails return mo if __name__ == "__main__": app.run()
websockets.exceptions.InvalidURI: http://localhost:2918/copilot isn't a valid URI: scheme isn't ws or wss
.a = []
b = mo.ui.text()
.a
to keep appending b.value
every time I enter new text into b
.mo.state()
.mo.state()
.marimo run --sandbox
and have each app have its own process and port that i have to forward tosrc/my_proj/processors/simple_processor.py notebooks/nb1.py
src/proj
and, from notebook nb1.py
, importfrom processors.simple_processor import SimpleProcessor
marimo run my_notebook.py
the matlib plots are not shown anymore.plotly
and I get the same problem, the plots are only visible when the notebook is in edit mode.altair
plots seem to be fine though ( they are also visible when I switch to view mode).marimo export html-wasm notebook.py -o notebook.wasm.html
uv init
uv venv
source .venv/bin/activate
uv add marimo
(same problem if using ipykernel or jupyterlab)ImportError: Cannot import 'TreeArgumentsWrapper' from 'jedi.inference.arguments' due to circular import.