skip to main content

@tonyfast s notebooks

site navigation
notebook summary
title
semantic notebook structure
description
sketches of semantic notebook structures considering cells as form inputs.
cells
4 total
3 code
state
executed out of order
kernel
Python [conda env:root] *
language
python
name
conda-root-py
lines of code
68
outputs
3
table of contents
{"kernelspec": {"display_name": "Python [conda env:root] *", "language": "python", "name": "conda-root-py"}, "language_info": {"codemirror_mode": {"name": "ipython", "version": 3}, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.13"}, "widgets": {"application/vnd.jupyter.widget-state+json": {"state": {}, "version_major": 2, "version_minor": 0}}, "title": "semantic notebook structure", "description": "sketches of semantic notebook structures considering cells as form inputs."}
notebook toolbar
Activate
cell ordering
1

semantic notebook structure

sketches of semantic notebook structures considering cells as form inputs.

2 1 outputs.
3 1 outputs.
def jade(body):
    lines = body.splitlines(True)
    if body.startswith("```"):
        lines.pop(0)
    if body.rstrip().endswith("```"):
        lines.pop()
    return __import__("pyjade").process("".join(lines))
4 1 outputs.
shape =\
main
    head
    section(role="feed")
        article(aria-posinset=1, aria-setsize=12)
            form(id, aria)
                fieldset(name=cell)
                    legend input
                    label(for="cell-input")
                    div.source(id="cell-input", contenteditable="false", role="textbox").
                        some code that we will 
                        compute with
                    fieldset(name="commands", form)
                        legend commands
                        button                        button ⏹️
                        button ▶️
                        button                    fieldset(name="metadata", form)
                        legend information
                        label in
                        input(type="number", disabled="", value=2)
                        label start
                        input(type="time", disabled="", value="14:32")
                        label stop
                        input(type="time", disabled="", value="14:33")
                        fieldset(name="tags")
                            legend tags
                            label  slide

                    fieldset(name="outputs", form)
                        legend outputs
                        fieldset.stderr
                            label                            output.warning 
                                samp warning
                        fieldset.stderr
                            label                            output.error
                                samp error
                        fieldset.stdout
                            label                            output.stdout
                                samp "hello world"
                        fieldset.display-data
                            fieldset(name="metadata")
                                label out
                                input(type="number", disabled="", value=2)
                            output(markdown="true").
                                # some markdown 
                                to remember
...
<main>
  <head></head>
  <section role="feed">
    <article aria-posinset="1" aria-setsize="12">
      <form id="id" aria="aria">
        <fieldset>
          <legend>input</legend>
          <label for="cell-input"></label>
          <div id="cell-input" contenteditable="false" role="textbox" class="source">some code that we will 
compute with
          </div>
          <fieldset name="commands" form="form">
            <legend>commands</legend>
            <button></button>
            <button>⏹️</button>
            <button>▶️</button>
            <button></button>
          </fieldset>
          <fieldset name="metadata" form="form">
            <legend>information</legend>
            <label>in</label>
            <input type="number" disabled="" value="2"/>
            <label>start</label>
            <input type="time" disabled="" value="14:32"/>
            <label>stop</label>
            <input type="time" disabled="" value="14:33"/>
            <fieldset name="tags">
              <legend>tags</legend>
              <label>slide</label>
            </fieldset>
          </fieldset>
          <fieldset name="outputs" form="form">
            <legend>outputs</legend>
            <fieldset class="stderr">
              <label></label>
              <output class="warning"><samp>warning</samp>
              </output>
            </fieldset>
            <fieldset class="stderr">
              <label></label>
              <output class="error"><samp>error</samp>
              </output>
            </fieldset>
            <fieldset class="stdout">
              <label></label>
              <output class="stdout"><samp>"hello world"</samp>
              </output>
            </fieldset>
            <fieldset class="display-data">
              <fieldset name="metadata">
                <label>out</label>
                <input type="number" disabled="" value="2"/>
              </fieldset>
              <output markdown="true"># some markdown 
to remember
              </output>
            </fieldset>
          </fieldset>
        </fieldset>
      </form>
    </article>
  </section>
</main>
input
some code that we will compute with
commands
information
tags
outputs
warning
error
"hello world"
# some markdown to remember