Skip to content

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.

Hide some code in tutorials! (#508)

Akshay Agrawal334db4a05094
diff --git a/marimo/_smoke_tests/third_party/seaborn.py b/marimo/_smoke_tests/third_party/seaborn.py
index 545b9d1aa4..27bda3b0aa 100644
--- a/marimo/_smoke_tests/third_party/seaborn.py
+++ b/marimo/_smoke_tests/third_party/seaborn.py
@@ -1,3 +1,4 @@
+# Copyright 2024 Marimo. All rights reserved.
import marimo
__generated_with = "0.1.69"
diff --git a/marimo/_tutorials/dataflow.py b/marimo/_tutorials/dataflow.py
index 73ed9ed581..9f51566a22 100644
--- a/marimo/_tutorials/dataflow.py
+++ b/marimo/_tutorials/dataflow.py
@@ -1,36 +1,71 @@
-# Copyright 2023 Marimo. All rights reserved.
+# Copyright 2024 Marimo. All rights reserved.
import marimo
-__generated_with = "0.0.5"
+__generated_with = "0.1.69"
app = marimo.App()
-def __(introduction, mo):
- mo.md(introduction)
[email protected](hide_code=True)
+def __(mo):
+ mo.md(
+ """
+ # How marimo notebooks run
+
+ Reactive execution is based on a single rule: when a cell is run, all other
+ cells that reference any of the global variables it defines run
+ automatically.
+
+ To provide reactive execution, marimo creates a dataflow graph out of your
+ cells.
+ """
+ )
return
-def __(mo, references_and_definitions):
- mo.md(references_and_definitions)
[email protected](hide_code=True)
+def __(mo):
+ mo.md(
+ """
+ ## References and definitions
+
+ A marimo notebook is a directed acyclic graph in which nodes represent
+ cells and edges represent data dependencies. marimo creates this graph by
+ analyzing each cell (without running it) to determine its
+
+ - references ("refs*), the global variables it reads but doesn't define;
+ - definitions ("defs"), the global variables it defines.
+
+ There is an edge from one cell to another if the latter cell references any
+ global variables defined by the former cell.
+
+ The rule for reactive execution can be restated in terms of the graph: when
+ a cell is run, its descendants are run automatically.
+ """
+ )
return
-def __(example, mo):
- mo.md(example)
[email protected](hide_code=True)
+def __(mo):
+ mo.md(
+ """
+ ### Example
+
+ The next four cells plot a sine wave with a given period and amplitude.
+ Each cell is labeled with its refs and defs.
+ """
+ )
return
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
"Tip: inspecting refs and defs": f"""
Use `mo.refs()` and `mo.defs()` to inspect the refs and defs of any
given cell. This can help with debugging complex notebooks.
-
+
For example, here are the refs and defs of this cell:
{mo.as_html({"refs": mo.refs(), "defs": mo.defs()})}
@@ -102,7 +137,6 @@ def __(matplotlib_installed, mo, np, numpy_installed, plt):
plt.gcf().set_size_inches(6.5, 2.4)
return plt.gca()
-
mo.md(
f"""
- `refs: {mo.refs()}`
@@ -112,7 +146,7 @@ def __(matplotlib_installed, mo, np, numpy_installed, plt):
return plot_wave,
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -124,13 +158,37 @@ def __(mo):
return
-def __(dataflow_graph, mo):
- mo.md(dataflow_graph)
[email protected](hide_code=True)
+def __(mo):
+ mo.md(
+ """
+ Here is the dataflow graph for the cells that make the sine wave plot, plus
+ the cells that import libraries. Each cell is labeled with its defs.
+
+ ```
+ +------+ +-----------+
+ +-----------| {mo} |-----------+ | {np, plt} |
+ | +---+--+ | +----+------+
+ | | | |
+ | | | |
+ v v v v
+ +----------+ +-------------+ +--+----------+
+ | {period} | | {amplitude} | | {plot_wave} |
+ +---+------+ +-----+-------+ +------+------+
+ | | |
+ | v |
+ | +----+ |
+ +------------> | {} | <-------------+
+ +----+
+ ```
+
+ The last cell, which doesn't define anything, produces the plot.
+ """
+ )
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -144,7 +202,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -159,7 +217,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -190,18 +248,18 @@ def __():
return planet,
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
- ** 🌊 Try it!** In the previous cell, change the name `planet` to `home`,
+ **🌊 Try it!** In the previous cell, change the name `planet` to `home`,
then run the cell.
"""
)
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -228,7 +286,7 @@ def __():
return count,
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -266,7 +324,7 @@ def __():
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -301,7 +359,7 @@ def __(to_be_deleted):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -325,7 +383,7 @@ def __(one):
return two,
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -363,7 +421,7 @@ def __():
return namespace, state
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -377,7 +435,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -391,23 +449,39 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
- mo.accordion({
- "Tip (advanced): mutable state": (
- """
+ mo.accordion(
+ {
+ "Tip (advanced): mutable state": (
+ """
You can use the fact that marimo does not track attributes or
mutations to implement mutable state in marimo. An example of
this is shown in the `ui` tutorial.
"""
- )
- })
+ )
+ }
+ )
return
-def __(best_practices, mo):
- mo.md(best_practices)
[email protected](hide_code=True)
+def __(mo):
+ mo.md(
+ """
+ ## Best practices
+
+ The constraints marimo puts on your notebooks are all natural consequences
+ of the fact that marimo programs are directed acyclic graphs. As long as
+ you keep this fact in mind, you'll quickly adapt to the marimo way of
+ writing notebooks.
+
+ Ultimately, these constraints will enable you to create powerful notebooks
+ and apps, and they'll encourage you to write clean, reproducible code.
+
+ Follow these tips to stay on the marimo way:
+ """
+ )
return
@@ -417,7 +491,7 @@ def __(mo, tips):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""## What's next?
@@ -432,106 +506,28 @@ def __(mo):
return
[email protected](hide_code=True)
def __():
matplotlib_installed = False
numpy_installed = False
try:
import matplotlib.pyplot as plt
+
matplotlib_installed = True
except ModuleNotFoundError:
pass
try:
import numpy as np
+
numpy_installed = True
except ModuleNotFoundError:
pass
return matplotlib_installed, np, numpy_installed, plt
-def __():
- import marimo as mo
- return mo,
-
-
-def __():
- introduction = """
- # How marimo Apps Run
-
- Reactive execution is based on a single rule: when a cell is run, all other cells that reference any of the global variables it defines run
- automatically.
-
- To provide reactive execution, marimo creates a dataflow graph out of your cells.
- """
-
- references_and_definitions = """
- ## References and definitions
-
- A marimo notebook is a directed acyclic graph in which nodes represent cells and edges represent data dependencies. marimo creates this graph by analyzing each cell (without running it) to determine its
-
- - references ("refs*), the global variables it reads but doesn't define;
- - definitions ("defs"), the global variables it defines.
-
- There is an edge from one cell to another if the latter cell references any global variables defined by the former cell.
-
- The rule for reactive execution can be restated in terms of the graph: when
- a cell is run, its descendants are run automatically.
- """
-
- example = """
- ### Example
-
- The next four cells plot a sine wave with a given period and amplitude.
- Each cell is labeled with its refs and defs.
- """
-
- dataflow_graph = """
- Here is the dataflow graph for the cells that make the sine wave plot,
- plus the cells that import libraries. Each cell is labeled with its defs.
-
- ```
- +------+ +-----------+
- +-----------| {mo} |-----------+ | {np, plt} |
- | +---+--+ | +----+------+
- | | | |
- | | | |
- v v v v
- +----------+ +-------------+ +--+----------+
- | {period} | | {amplitude} | | {plot_wave} |
- +---+------+ +-----+-------+ +------+------+
- | | |
- | v |
- | +----+ |
- +------------> | {} | <-------------+
- +----+
- ```
-
- The last cell, which doesn't define anything, produces the plot.
- """
-
- best_practices = """
- ## Best practices
-
- The constraints marimo puts on your notebooks are all natural consequences of the fact that marimo programs are directed acyclic graphs. As long as you keep this fact in mind, you'll quickly adapt to the marimo way of writing notebooks.
-
- Ultimately, these constraints will enable you to create powerful notebooks and apps, and they'll encourage you to write clean, reproducible code.
-
- Follow these tips to stay on the marimo way:
- """
- return (
- best_practices,
- dataflow_graph,
- example,
- introduction,
- references_and_definitions,
- )
-
-
[email protected](hide_code=True)
def __():
tips = {
"Use global variables sparingly": (
@@ -629,5 +625,11 @@ def __():
return tips,
+def __():
+ import marimo as mo
+ return mo,
+
+
if __name__ == "__main__":
app.run()
diff --git a/marimo/_tutorials/fileformat.py b/marimo/_tutorials/fileformat.py
index c8b0a8ee2e..b925cd3ca0 100644
--- a/marimo/_tutorials/fileformat.py
+++ b/marimo/_tutorials/fileformat.py
@@ -1,17 +1,17 @@
-# Copyright 2023 Marimo. All rights reserved.
+# Copyright 2024 Marimo. All rights reserved.
import marimo
-__generated_with = "0.0.5"
+__generated_with = "0.1.69"
app = marimo.App()
[email protected](hide_code=True)
def __(intro, mo):
mo.md(intro)
return
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -26,42 +26,42 @@ def __(mo):
return
[email protected](hide_code=True)
def __(example_program, mo):
mo.md(example_program)
return
[email protected](hide_code=True)
def __(file_contents, mo):
mo.md(file_contents)
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
## Properties
-
+
marimo's file format was designed to be easy to read and easy
to work with, while also serving the needs of the marimo library. You can
even edit the generated file's cells directly, using your favorite text
editor, and format the file with your favorite code formatter.
-
+
We explain some properties of marimo's file format below.
"""
)
return
[email protected](hide_code=True)
def __(mo, properties):
mo.accordion(properties)
return
[email protected](hide_code=True)
def __():
intro = """
# File Format
@@ -78,7 +78,7 @@ def __():
return intro,
[email protected](hide_code=True)
def __(mo):
file_contents = f"""
For the above example, marimo would generate the following file
@@ -118,7 +118,7 @@ def __(mo):
return file_contents,
[email protected](hide_code=True)
def __():
example_program = """
## Example
@@ -144,7 +144,7 @@ def __():
return example_program,
[email protected](hide_code=True)
def __():
properties = {
"Cells are functions": """
diff --git a/marimo/_tutorials/intro.py b/marimo/_tutorials/intro.py
index dcf2411df2..28ebbba607 100644
--- a/marimo/_tutorials/intro.py
+++ b/marimo/_tutorials/intro.py
@@ -35,7 +35,7 @@ def __(mo, slider):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -56,7 +56,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(changed, mo):
(
mo.md(
@@ -89,7 +89,7 @@ def __():
return changed,
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -107,7 +107,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -119,7 +119,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -134,7 +134,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -149,7 +149,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""## 2. UI elements
@@ -196,7 +196,7 @@ def __(icon, mo, repetitions):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -219,7 +219,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -236,7 +236,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -254,7 +254,7 @@ def __(mo, tips):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""## 6. The `marimo` command-line tool
@@ -317,7 +317,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -330,7 +330,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __():
tips = {
"Saving": (
diff --git a/marimo/_tutorials/layout.py b/marimo/_tutorials/layout.py
index 8a31373b03..4649df4f52 100644
--- a/marimo/_tutorials/layout.py
+++ b/marimo/_tutorials/layout.py
@@ -1,11 +1,11 @@
-# Copyright 2023 Marimo. All rights reserved.
+# Copyright 2024 Marimo. All rights reserved.
import marimo
-__generated_with = "0.0.11"
+__generated_with = "0.1.69"
app = marimo.App()
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -18,7 +18,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -71,7 +71,7 @@ def __(mo):
return grid,
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -142,7 +142,7 @@ def __(mo, size):
return boxes, create_box
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -153,7 +153,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -184,7 +184,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -196,7 +196,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -208,15 +208,7 @@ def __(mo):
return
-def __(mo):
- mo.accordion(
- {"This is an accordion about `mo.accordion`": mo.doc(mo.accordion)}
- )
- return
-
-
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -242,7 +234,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -281,7 +273,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.accordion({"Documentation: `mo.tabs`": mo.doc(mo.tabs)})
return
@@ -308,13 +300,13 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.accordion({"Documentation: `mo.tree`": mo.doc(mo.tree)})
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -349,7 +341,7 @@ def __(callout_kind, mo):
return
[email protected](hide_code=True)
def __(mo):
mo.accordion({"Documentation: `mo.callout`": mo.doc(mo.callout)})
return
diff --git a/marimo/_tutorials/markdown.py b/marimo/_tutorials/markdown.py
index 6b4b02b925..c8a1a696ab 100644
--- a/marimo/_tutorials/markdown.py
+++ b/marimo/_tutorials/markdown.py
@@ -1,11 +1,11 @@
-# Copyright 2023 Marimo. All rights reserved.
+# Copyright 2024 Marimo. All rights reserved.
import marimo
-__generated_with = "0.0.5"
+__generated_with = "0.1.69"
app = marimo.App()
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -34,7 +34,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
r"""
@@ -69,7 +69,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -82,7 +82,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -98,7 +98,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(
matplotlib_installed,
missing_matplotlib_msg,
@@ -108,15 +108,16 @@ def __(
numpy_installed,
plt,
):
- def _sine_plot():
+ def _sine_plot():
if not numpy_installed:
return missing_numpy_msg
if not matplotlib_installed:
return missing_matplotlib_msg
- _x = np.linspace(start=0, stop=2*np.pi)
+ _x = np.linspace(start=0, stop=2 * np.pi)
plt.plot(_x, np.sin(_x))
return plt.gca()
+
mo.md(
f"""
### Plots
@@ -135,7 +136,7 @@ def __(
return
[email protected](hide_code=True)
def __(mo):
leaves = mo.ui.slider(1, 32, label="🍃: ")
@@ -164,7 +165,7 @@ def __(leaves, mo):
return
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -183,16 +184,15 @@ def __(missing_numpy_msg, mo, np, numpy_installed):
try:
import pandas as pd
except ModuleNotFoundError:
- return mo.md(
- "`Oops! Looks like you don't have pandas installed.`"
- )
+ return mo.md("`Oops! Looks like you don't have pandas installed.`")
if not numpy_installed:
return missing_numpy_msg
- x = np.linspace(0, 2*np.pi, 10)
+ x = np.linspace(0, 2 * np.pi, 10)
y = np.sin(x)
- return pd.DataFrame({'x': x, 'sin(x)': y})
+ return pd.DataFrame({"x": x, "sin(x)": y})
+
mo.md(
f"""
@@ -215,7 +215,7 @@ def __(missing_numpy_msg, mo, np, numpy_installed):
return make_dataframe,
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -229,7 +229,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -247,7 +247,12 @@ def __(mo):
def __(math, mo):
amplitude = mo.ui.slider(1, 2, step=0.1, label="amplitude: ")
period = mo.ui.slider(
- math.pi/4, 4*math.pi, value=2*math.pi, step=math.pi/8, label="period: ")
+ math.pi / 4,
+ 4 * math.pi,
+ value=2 * math.pi,
+ step=math.pi / 8,
+ label="period: ",
+ )
return amplitude, period
@@ -262,14 +267,15 @@ def __(
):
import functools
+
@functools.cache
def plotsin(amplitude, period):
if not numpy_installed:
return missing_numpy_msg
elif not matplotlib_installed:
return missing_matplotlib_msg
- x = np.linspace(0, 2*np.pi, 256)
- plt.plot(x, amplitude * np.sin(2*np.pi / period * x))
+ x = np.linspace(0, 2 * np.pi, 256)
+ plt.plot(x, amplitude * np.sin(2 * np.pi / period * x))
plt.ylim(-2.2, 2.2)
return plt.gca()
return functools, plotsin
@@ -277,13 +283,15 @@ def __(
@app.cell
def __(amplitude, mo, period):
- mo.md(f"""
+ mo.md(
+ f"""
**A sin curve.**
- {amplitude}
- {period}
- """)
+ """
+ )
return
@@ -305,23 +313,25 @@ def __(amplitude, mo, period, plotsin):
return
[email protected](hide_code=True)
def __(mo):
matplotlib_installed = False
numpy_installed = False
- missing_numpy_msg = mo.md(
- "`Oops! Looks like you don't have numpy installed.`")
+ missing_numpy_msg = mo.md("`Oops! Looks like you don't have numpy installed.`")
missing_matplotlib_msg = mo.md(
- "`Oops! Looks like you don't have matplotlib installed.`")
+ "`Oops! Looks like you don't have matplotlib installed.`"
+ )
try:
import matplotlib.pyplot as plt
+
matplotlib_installed = True
except ModuleNotFoundError:
pass
try:
import numpy as np
+
numpy_installed = True
except ModuleNotFoundError:
pass
@@ -335,7 +345,7 @@ def __(mo):
)
[email protected](hide_code=True)
def __():
import math
diff --git a/marimo/_tutorials/plots.py b/marimo/_tutorials/plots.py
index 9ca5044dae..7d71396ca4 100644
--- a/marimo/_tutorials/plots.py
+++ b/marimo/_tutorials/plots.py
@@ -1,23 +1,23 @@
-# Copyright 2023 Marimo. All rights reserved.
+# Copyright 2024 Marimo. All rights reserved.
import marimo
-__generated_with = "0.0.5"
+__generated_with = "0.1.69"
app = marimo.App()
-def __(check_dependencies):
- check_dependencies()
[email protected](hide_code=True)
+def __(mo):
+ mo.md("# Plotting")
return
-def __(mo):
- mo.md("# Plotting")
[email protected](hide_code=True)
+def __(check_dependencies):
+ check_dependencies()
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -31,13 +31,13 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md("## Matplotlib")
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -60,7 +60,7 @@ def __(plt):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -85,13 +85,13 @@ def __(plt):
return
[email protected](hide_code=True)
def __(mo, plt_show_explainer):
mo.accordion(plt_show_explainer)
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -122,7 +122,7 @@ def __(plt, x):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -149,7 +149,7 @@ def __(axis, x):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -194,20 +194,20 @@ def __(exponent, mo, plt, x):
f"""
{_tex}
-
+
{mo.as_html(_plot(exponent.value))}
"""
)
return functools,
[email protected](hide_code=True)
def __(mo):
mo.md("## Other libraries")
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -227,7 +227,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(missing_packages, mo):
module_not_found_explainer = mo.md(
"""
@@ -255,7 +255,7 @@ def __(missing_packages, mo):
return check_dependencies, module_not_found_explainer
[email protected](hide_code=True)
def __():
plt_show_explainer = {
"Using `plt.show()`": """
diff --git a/marimo/_tutorials/ui.py b/marimo/_tutorials/ui.py
index ea0b37e445..14b6dd198e 100644
--- a/marimo/_tutorials/ui.py
+++ b/marimo/_tutorials/ui.py
@@ -5,7 +5,7 @@ __generated_with = "0.1.4"
app = marimo.App()
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -19,7 +19,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md("## `marimo.ui`")
return
@@ -46,7 +46,7 @@ def __(mo, slider):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -64,7 +64,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo, slider):
mo.accordion(
{
@@ -93,7 +93,7 @@ def __(mo, slider):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -103,7 +103,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(basic_ui_elements, mo):
mo.md(
f"""
@@ -132,7 +132,7 @@ def __(basic_ui_elements, documentation):
return
[email protected](hide_code=True)
def __(composite_elements, mo):
mo.md(
f"""### Composite elements
@@ -174,7 +174,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -188,7 +188,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -216,7 +216,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -243,7 +243,7 @@ def __(mo):
return get_counter, set_counter
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -277,7 +277,7 @@ def __(get_counter, mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -299,7 +299,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -343,7 +343,7 @@ def __(get_counter, mo):
return
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -360,13 +360,13 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md("### Tied elements")
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -408,7 +408,7 @@ def __(x, x_plus_one):
return
[email protected](hide_code=True)
def __(mo):
mo.accordion(
{
@@ -424,7 +424,7 @@ def __(mo):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""
@@ -513,7 +513,7 @@ def __(mo, task_list):
return
[email protected](hide_code=True)
def __(mo):
mo.md(
"""