Skip to content

Latest commit

 

History

History
55 lines (46 loc) · 1.22 KB

File metadata and controls

55 lines (46 loc) · 1.22 KB

Jupyter

Jupyter notebook clear cell output in code

See https://stackoverflow.com/a/24818304/2268280

from IPython.display import clear_output

for i in range(10):
    clear_output(wait=True)
    print("Hello World!")

Save jupyter notebook command

%%javascript
IPython.notebook.save_notebook()

Important extensions

Widgets

pip install ipywidgets jupyterlab_widgets

Example

radiobutton = widgets.RadioButtons(
    options=[True, False],
    value=False, # Defaults to 'pineapple'
#    layout={'width': 'max-content'}, # If the items' names are long
    description='New letter?',
    disabled=False
)
output_radiobutton = widgets.Output()

which can be used inside a jupyter notebook as:

radiobutton.description = "Load Body?"
radiobutton.value = True
display(radiobutton,output_radiobutton)

image Once selected, store with `LOAD_BODY = radiobutton.get_interact_value()

MyST

pip install jupyterlab_myst

Example

:label: my-fig
:align: center

My **bold** mountain 🏔🚠.

Check out !!