A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
import marimo
__generated_with = "0.0.0"
app = marimo.App(app_title="Casually malicious md")
@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
What happens if I just leave a \"\"\"
" ' ! @ # $ % ^ & * ( ) + = - _ [ ] { } | \ /
# Notebook
<!--
\
""")
@app.cell
def _():
print("Hello, World!")
@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
-->
```marimo run convert document.md```
""")
app._unparsable_cell(
r"""
it's an unparsable cell
""",
name="_",
)
@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
<!-- Actually markdown -->
```python {.marimo} `
print("Hello, World!")
<!-- Disabled code block -->
""")
@app.cell(disabled=True)
def _():
1 + 1
@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
<!-- Hidden code block -->
""")
@app.cell(hide_code=True)
def _():
1 + 1
@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
<!-- Empty code block -->
""")
@app.cell
def _():
return
@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
<!-- Improperly nested code block -->
""")
app._unparsable_cell(
"""
\"\"\"
```python {.marimo}
print(\"Hello, World!\")
""",
name="_",
)
@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
\"\"\"
```
<!-- Improperly nested code block -->
```python {.marimo}
````python {.marimo}
print("Hello, World!")
````
```
-->
<!-- from the notebook, should remain unchanged -->
""")
@app.cell
def _(mo):
mo.md("""
This is a markdown cell with an execution block in it
```python {.marimo}
# To ambiguous to convert
```
""")
if __name__ == "__main__":
app.run()