{ "cells": [ { "cell_type": "markdown", "metadata": { "run_control": { "frozen": false, "read_only": false } }, "source": [ "#### Installation from pypi:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [], "source": [ "# !pip install --user nbmultitask" ] }, { "cell_type": "markdown", "metadata": { "run_control": { "frozen": false, "read_only": false } }, "source": [ "## multithreading with a log queue and button controls" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [], "source": [ "from nbmultitask import ThreadWithLogAndControls" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [], "source": [ "import builtins\n", "from time import sleep\n", "def print(x):\n", " builtins.print(2*x)\n", "\n", "# the target function will be passed a function called `thread_print`\n", "def fn(thread_print):\n", " i = 1\n", " # be careful with loops... (in order for the stop button to work)\n", " while i <= 5:\n", " thread_print('%i...' % i)\n", " sleep(1.5)\n", " i+=1\n", "\n", "task = ThreadWithLogAndControls(target=fn, name=\"do some stuff\")" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "95eafb6ccc95414fa41ec343bfe02143", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(button_style='success', description='start', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "17f75b90908645e2ae21ef064bed352c", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(button_style='primary', description='watch', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "665b7da79ec44da590080ce36772aafe", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(description='clear log', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "06d83af2b1dd48ee9d4479e59d04d0a6", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Output.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "task.control_panel()" ] }, { "cell_type": "markdown", "metadata": { "run_control": { "frozen": false, "read_only": false } }, "source": [ "## looping, working with a shared variable" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [], "source": [ "from nbmultitask import ThreadWithLogAndControls" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [], "source": [ "from time import sleep\n", "\n", "# this function will be looped when we pass `loop=True` to the constructor below\n", "def fn(x, thread_print):\n", " thread_print(x['value'])\n", " x['value'] = x['value']**1.01\n", " sleep(0.1)\n", "\n", "x = {'value': 2} # using shared memory\n", "task = ThreadWithLogAndControls(target=fn, args=(x,), loop=True, name=\"exponential growth\")" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "68b3c2c6c85445df88d4d7fb28f64c66", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(button_style='success', description='start', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a3dab10a29474d58ad05b11c859974ad", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(button_style='primary', description='watch', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c83e6e1e76844e519f699fdb8482e72b", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(description='clear log', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d1d2e2cda79340748218e12802816ad9", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Output.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "task.control_panel()" ] }, { "cell_type": "markdown", "metadata": { "run_control": { "frozen": false, "read_only": false } }, "source": [ "## multiprocessing" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [], "source": [ "from nbmultitask import ProcessWithLogAndControls\n", "from IPython.display import clear_output" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [], "source": [ "from time import sleep\n", "\n", "def fn(x):\n", " while True:\n", " print(x.value)\n", " x.value = x.value**1.01\n", " sleep(0.1)\n", "\n", "from multiprocessing import Value\n", "x = Value('f',2)\n", "task = ProcessWithLogAndControls(target=fn, args=(x,), name=\"exponential growth\")" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "4afc7442bcd34af285193b81640502fd", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(button_style='success', description='start', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d8487367842847229b2062244814d1d3", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(button_style='primary', description='watch', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "ed514c6244f04d38a1f40dfce6b62740", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(description='clear log', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a1a5b4e0ad93484eb0fcae79845ceef4", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Output.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "task.control_panel()" ] }, { "cell_type": "markdown", "metadata": { "run_control": { "frozen": false, "read_only": false } }, "source": [ "## subclassing `multiprocessing.Process` with a `work` function" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [], "source": [ "from nbmultitask import withLogAndControls\n", "from threading import Thread\n", "from multiprocessing import Event, Queue, Process\n", "from ipywidgets import Button, Layout\n", "from IPython.display import display\n", "from time import sleep\n", "import random\n", "\n", "class Snoozer(Process):\n", " def __init__(self, *args, **kwargs):\n", " super().__init__(*args,**kwargs)\n", " # add state and buttons\n", " self.snoozing = Event()\n", " self.snooze_button = Button(description='SNOOZE...')\n", " self.snooze_button.layout = layout=Layout(width='50%', height='80px')\n", " self.snooze_button.style.button_color = 'darkslateblue'\n", " self.snooze_button.style.font_weight = 'bold'\n", " self.snooze_button.button_style = 'primary'\n", " self.snooze_button.on_click(lambda evt: self.snoozing.set())\n", " \n", " def show_snooze_button(self):\n", " display(self.snooze_button)\n", " \n", " # this function will be called as though it were passed via `target=`,\n", " # except that it will also have access to the Process Snoozer instance\n", " # (i.e. the `self.snoozing` Event)\n", " def work(self):\n", " if self.snoozing.is_set():\n", " snooze_time = random.random()*5\n", " print('Snoozing for %s seconds!' % snooze_time)\n", " sleep(snooze_time)\n", " self.snoozing.clear()\n", " sleep(0.01) # no need to spin the wheels\n" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "fc9dc6cea47e46d4a3bb021d3516ed32", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(button_style='success', description='start', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "2046b9aec8f344f9977d088a278da91b", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(button_style='primary', description='watch', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "8abb32f68aac459a849363e4bf05fc5b", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(description='clear log', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c6e45ba5a43a43a49e9cfbeff23129e7", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Output.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# `withLogAndControls` can be passed any subclass of `multiprocessing.Process` or `threading.Thread`\n", "snoozer = withLogAndControls(Snoozer)(loop=True)\n", "snoozer.control_panel()" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a0ca0575ce5a4b018a5376949f8c1960", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(button_style='primary', description='SNOOZE...', layout=Layout(height='80px', width='50%'), style=ButtonStyle(button_color='darkslateblue', font_weight='bold'))" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "snoozer.show_snooze_button()" ] }, { "cell_type": "markdown", "metadata": { "run_control": { "frozen": false, "read_only": false } }, "source": [ "## starting/stopping a Flask server" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "run_control": { "frozen": false, "read_only": false } }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "51edd24b27c84d84a1601c1611932969", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(button_style='success', description='start', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "79e82f7165cf410694c04d045f22bc1e", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(button_style='primary', description='watch', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "8d0858ebb00f459c87d9efcad9e4f1bb", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Button.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Button(description='clear log', style=ButtonStyle())" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "73e297fcd4aa4628b541b0e7da4054ae", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type Output.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import flask\n", "from nbmultitask import ProcessWithLogAndControls\n", "\n", "class Server(ProcessWithLogAndControls):\n", " def __init__(self,app,*args,**kwargs):\n", " self.app = app\n", " ProcessWithLogAndControls.__init__(self,*args,**kwargs)\n", "\n", " def work(self):\n", " print('starting server')\n", "# with self.output:\n", " self.app.run()\n", "\n", "app = flask.Flask('myapp')\n", "\n", "server = Server(app)\n", "server.control_panel()" ] } ], "metadata": { "kernelspec": { "display_name": "nbmultitask-dev", "language": "python", "name": "nbmultitask-dev" }, "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.6.2" }, "latex_envs": { "LaTeX_envs_menu_present": true, "autocomplete": true, "bibliofile": "biblio.bib", "cite_by": "apalike", "current_citInitial": 1, "eqLabelWithNumbers": true, "eqNumInitial": 1, "hotkeys": { "equation": "Ctrl-E", "itemize": "Ctrl-I" }, "labels_anchors": false, "latex_user_defs": false, "report_style_numbering": false, "user_envs_cfg": false }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "06d83af2b1dd48ee9d4479e59d04d0a6": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.1.0", "model_name": "OutputModel", "state": { "_model_module_version": "1.1.0", "_view_module_version": "1.1.0", "layout": "IPY_MODEL_806e516ca574436196a1a5e6889d22fc" } }, "073acb3c9d8d454397f1529629629e82": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "height": "80px", "width": "50%" } }, "1082705f82574b4f8730db0ccdc83c33": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "132fa78e1c4042d7826ced5c99996858": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "refresh log", "layout": "IPY_MODEL_96043282f6ae48f1be78e94685f0a32d", "style": "IPY_MODEL_696b4e330a63412098e43209c5f2725b" } }, "153810174c034613bdc6fbda72c0edef": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "154caf1708074e1ca375957f56ebf016": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "1595887275124793b0f53586ffd0a846": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "success", "description": "start", "layout": "IPY_MODEL_71e8e11454f243ce881d6a2ce000c34b", "style": "IPY_MODEL_443f5770651e4c18a291956775679941" } }, "17f75b90908645e2ae21ef064bed352c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "primary", "description": "watch", "layout": "IPY_MODEL_1cafe49a44d741afa6ec3014440ff898", "style": "IPY_MODEL_b27d05d1bb1141fda2a56d3ca13e3919" } }, "181e1d72b0de49b099dbfe53c6d1e934": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "18bc8436704e48319ddcd676735d681e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "194315225a36406aa76fc10d8fff27eb": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "primary", "description": "watch", "layout": "IPY_MODEL_3bb304aa5dd444b8b68655d0d8f396e9", "style": "IPY_MODEL_153810174c034613bdc6fbda72c0edef" } }, "19e8fc0f0c70420785eb97d31fa16375": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "1a27868be4364431a611b30f47522d90": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "1bb26744c9b54c0b9ff8a8183e7be424": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "1cafe49a44d741afa6ec3014440ff898": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "1e51712c8ffd479d87b9112e006ea7ad": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "1ea7f6f8956f4b3b8cf045b82badffab": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "1f255a82e7e142cfbd23540c4b939602": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "2046b9aec8f344f9977d088a278da91b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "primary", "description": "watch", "layout": "IPY_MODEL_5a68e7ba48ce429aaa6bad905a47b3e0", "style": "IPY_MODEL_1a27868be4364431a611b30f47522d90" } }, "2382693a5aa14c0b8b258ad783fa6358": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.1.0", "model_name": "OutputModel", "state": { "_model_module_version": "1.1.0", "_view_module_version": "1.1.0", "layout": "IPY_MODEL_7396bed15a724460b99a62eaaa55d372" } }, "25dda164a40f463882fd9d290431a91e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "primary", "description": "SNOOZE...", "layout": "IPY_MODEL_c77b8dacd9ae4226b3fe8d8a87d91180", "style": "IPY_MODEL_b61dcaf29c334ae0bf29666b782d2cc5" } }, "2937a7842b5c4e6ab94e2a3e6a2bf30e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "2d337c22a13a407a88d39920a2b14deb": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "2e97373be4ae4c9598c0a8de09b7eb62": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "2ef989652b8346fcb3dc3be885ee7a26": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "2f429c4a48fc48fc8b54dbd625534187": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "301f9ea959014e7dae02d879e164d781": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "primary", "description": "watch", "layout": "IPY_MODEL_602824329d164a31a78d22bfb8430246", "style": "IPY_MODEL_3f54cb3db55e40b4956c964e7fa7cb5c" } }, "332169407c894a5c9f07ed6e22f3d65c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "334f7997a5aa4c71894fa245397e0388": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "refresh log", "layout": "IPY_MODEL_b45b1de544f54f4da904678ac60d48e3", "style": "IPY_MODEL_68ae5a63fd4f403e93926a2301e25454" } }, "372565a73e054abd8f97c53e883bd5b9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "3bb304aa5dd444b8b68655d0d8f396e9": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "3d4eb96e4484466da1110db393e8eb3b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "3f54cb3db55e40b4956c964e7fa7cb5c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "3f8b407810ad42baa1a5ede1ec7476e5": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.1.0", "model_name": "OutputModel", "state": { "_model_module_version": "1.1.0", "_view_module_version": "1.1.0", "layout": "IPY_MODEL_2937a7842b5c4e6ab94e2a3e6a2bf30e" } }, "4405d1424d9e4c52a3f3ea503a2fded7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "443f5770651e4c18a291956775679941": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "449a250867cc42c59a4593275e786627": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "465200f4de644996ae722924d2f03d2b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "refresh log", "layout": "IPY_MODEL_9a335a62097a4ac5a2c42efd158bc018", "style": "IPY_MODEL_1ea7f6f8956f4b3b8cf045b82badffab" } }, "48541f31087542d5a51da0cba5aca24d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "49018f8e769e496cb195b09bf42840cc": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "4afc7442bcd34af285193b81640502fd": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "success", "description": "start", "layout": "IPY_MODEL_aff4a8bf07c84726b0075674647a79f6", "style": "IPY_MODEL_e161f250ba1e4991bfb29a3be963ae5b" } }, "4b22fbffed9142bba442f23d414df48f": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "4dab3d2cab4546d6b4702aa48c4f1d54": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "clear log", "layout": "IPY_MODEL_701d3d1356204aa881f84fc8e4ea6266", "style": "IPY_MODEL_daee13c4d1214dd7b67e5e5dd286b423" } }, "4e0d7958abfe4c3fb1132c5b0fceb59e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "success", "description": "start", "layout": "IPY_MODEL_b578d03b223f40ebbbfccd4f60037f79", "style": "IPY_MODEL_3d4eb96e4484466da1110db393e8eb3b" } }, "4ebfd6493d69405d86d85e037d42141a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "4f684b3e0dd64936afe2c1cd1244a536": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "51b3805615ea46d6a796f031e135a5dc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "primary", "description": "watch", "layout": "IPY_MODEL_8cea6c5ff43241a8a4e48399253bbb71", "style": "IPY_MODEL_449a250867cc42c59a4593275e786627" } }, "51edd24b27c84d84a1601c1611932969": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "success", "description": "start", "layout": "IPY_MODEL_e071635eead24387a7574b0bebd3ff67", "style": "IPY_MODEL_5bb2eb3af54b4582901f330127e0997d" } }, "59c52d1cfae54200a980530e4617c424": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "5a68e7ba48ce429aaa6bad905a47b3e0": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "5bb2eb3af54b4582901f330127e0997d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "5c1648a752cf4391a116d822dfb50910": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "5f2faacdef10464498d220a920e7d6fa": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "602824329d164a31a78d22bfb8430246": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "6226272402da4d2f81398a28272dcb07": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "643c94f315a349e3ad548cb6e1baa18a": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.1.0", "model_name": "OutputModel", "state": { "_model_module_version": "1.1.0", "_view_module_version": "1.1.0", "layout": "IPY_MODEL_2d337c22a13a407a88d39920a2b14deb" } }, "665b7da79ec44da590080ce36772aafe": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "clear log", "layout": "IPY_MODEL_c08cf159db884bbaa4fbfab7dc3f88b3", "style": "IPY_MODEL_4b22fbffed9142bba442f23d414df48f" } }, "68ae5a63fd4f403e93926a2301e25454": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "68b3c2c6c85445df88d4d7fb28f64c66": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "success", "description": "start", "layout": "IPY_MODEL_8a010f2b43c4467bb89df813efb23992", "style": "IPY_MODEL_855a316fcdc642f3b3c13ffe6e5900e3" } }, "696b4e330a63412098e43209c5f2725b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "6d61e85609b1475f973429e56a50056c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "701d3d1356204aa881f84fc8e4ea6266": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "718685b361824c938d1c4aec02168083": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.1.0", "model_name": "OutputModel", "state": { "_model_module_version": "1.1.0", "_view_module_version": "1.1.0", "layout": "IPY_MODEL_2f429c4a48fc48fc8b54dbd625534187" } }, "71e8e11454f243ce881d6a2ce000c34b": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "7396bed15a724460b99a62eaaa55d372": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "73b5994622f94582a82043749ebbab82": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "73e297fcd4aa4628b541b0e7da4054ae": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.1.0", "model_name": "OutputModel", "state": { "_model_module_version": "1.1.0", "_view_module_version": "1.1.0", "layout": "IPY_MODEL_73b5994622f94582a82043749ebbab82" } }, "776e83f9f5f5413c85e0d917578f70ae": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "79e82f7165cf410694c04d045f22bc1e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "primary", "description": "watch", "layout": "IPY_MODEL_1082705f82574b4f8730db0ccdc83c33", "style": "IPY_MODEL_1f255a82e7e142cfbd23540c4b939602" } }, "7f49db097e944d21aa532cfc66c5f9da": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "refresh log", "layout": "IPY_MODEL_2e97373be4ae4c9598c0a8de09b7eb62", "style": "IPY_MODEL_776e83f9f5f5413c85e0d917578f70ae" } }, "80465838e16045d6a0e334c4051bf938": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "clear log", "layout": "IPY_MODEL_95100a24c361402a8290bb970947dbcd", "style": "IPY_MODEL_4405d1424d9e4c52a3f3ea503a2fded7" } }, "806e516ca574436196a1a5e6889d22fc": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "80cd466800d441c38b1d390424f5ede2": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "836c8d1986ff4f1d8088dd6cc59e38d5": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "838e617582d743319aa554297b229d6d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "refresh log", "layout": "IPY_MODEL_1bb26744c9b54c0b9ff8a8183e7be424", "style": "IPY_MODEL_a8934f0ac93d48b2bccbfdbfc49c5996" } }, "855a316fcdc642f3b3c13ffe6e5900e3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "86d36b099ada410d9b36dd58aeb14486": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "refresh log", "layout": "IPY_MODEL_f9a9a9e52d414f07bbc54a8586cf06e2", "style": "IPY_MODEL_b785abc13d40496d9c201aa6d58928d4" } }, "8a010f2b43c4467bb89df813efb23992": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "8abb32f68aac459a849363e4bf05fc5b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "clear log", "layout": "IPY_MODEL_332169407c894a5c9f07ed6e22f3d65c", "style": "IPY_MODEL_372565a73e054abd8f97c53e883bd5b9" } }, "8cea6c5ff43241a8a4e48399253bbb71": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "8d0858ebb00f459c87d9efcad9e4f1bb": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "clear log", "layout": "IPY_MODEL_59c52d1cfae54200a980530e4617c424", "style": "IPY_MODEL_48541f31087542d5a51da0cba5aca24d" } }, "8e7b8b8c6d524fdc9e605b0f762b2f80": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "refresh log", "layout": "IPY_MODEL_f390e89c586b4f9093b40ebb82e977c0", "style": "IPY_MODEL_aa026657045d474ca5aba6d6d7c6cb44" } }, "8ed2ad2197c449eaa73ef4a964edd0f1": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "8f535e76bdfb44e38937160764dd70a8": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "8fc818fc17744f2085730462d771faa4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "92f3174b278e40f1bcbdff545fde14d0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "94b26647fb054cf39d9a409b78ce05c7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "refresh log", "layout": "IPY_MODEL_18bc8436704e48319ddcd676735d681e", "style": "IPY_MODEL_b41afffc4e1f45afbca6d4cc5e1b2d69" } }, "94f1c4c4ecbb438eb52834066f0cd490": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "clear log", "layout": "IPY_MODEL_181e1d72b0de49b099dbfe53c6d1e934", "style": "IPY_MODEL_4ebfd6493d69405d86d85e037d42141a" } }, "95100a24c361402a8290bb970947dbcd": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "95eafb6ccc95414fa41ec343bfe02143": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "success", "description": "start", "layout": "IPY_MODEL_49018f8e769e496cb195b09bf42840cc", "style": "IPY_MODEL_d72b1dfd28574b03bf3583f315dc11da" } }, "96043282f6ae48f1be78e94685f0a32d": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "96dff3fe401540519a7e491383a6a098": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "97b0b363548a4321a8e951dc91ef4c48": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": { "button_color": "darkslateblue", "font_weight": "bold" } }, "9a335a62097a4ac5a2c42efd158bc018": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "9b0bf682445540fd8cc42a06f027bf67": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "a0ca0575ce5a4b018a5376949f8c1960": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "primary", "description": "SNOOZE...", "layout": "IPY_MODEL_073acb3c9d8d454397f1529629629e82", "style": "IPY_MODEL_97b0b363548a4321a8e951dc91ef4c48" } }, "a1392bf9431c40258c60332f6bc3ab91": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "a1a5b4e0ad93484eb0fcae79845ceef4": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.1.0", "model_name": "OutputModel", "state": { "_model_module_version": "1.1.0", "_view_module_version": "1.1.0", "layout": "IPY_MODEL_d6c5e258ac944218b311fd81beb095fb" } }, "a3b9e05f261940b2b9480493fe85370e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "a3dab10a29474d58ad05b11c859974ad": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "primary", "description": "watch", "layout": "IPY_MODEL_fffbebead6dd4b25b15d981137a2ae12", "style": "IPY_MODEL_c68e85689926430e929d22297205eb10" } }, "a8934f0ac93d48b2bccbfdbfc49c5996": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "aa026657045d474ca5aba6d6d7c6cb44": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "aadf0fcf43cb4360b9b29248915a63fb": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "primary", "description": "watch", "layout": "IPY_MODEL_2ef989652b8346fcb3dc3be885ee7a26", "style": "IPY_MODEL_d786f4d683fd4fc6a8f2be04b622a817" } }, "aff4a8bf07c84726b0075674647a79f6": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "b27d05d1bb1141fda2a56d3ca13e3919": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "b41afffc4e1f45afbca6d4cc5e1b2d69": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "b45b1de544f54f4da904678ac60d48e3": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "b578d03b223f40ebbbfccd4f60037f79": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "b61dcaf29c334ae0bf29666b782d2cc5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": { "button_color": "darkslateblue", "font_weight": "bold" } }, "b785abc13d40496d9c201aa6d58928d4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "b9b66a7e200145d6971b36ce2e211ed1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "success", "description": "start", "layout": "IPY_MODEL_80cd466800d441c38b1d390424f5ede2", "style": "IPY_MODEL_4f684b3e0dd64936afe2c1cd1244a536" } }, "bbd485a71a734ff987560057c49f01c1": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "c08cf159db884bbaa4fbfab7dc3f88b3": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "c0dd8ca3bbf94f4da8e7e8c421d1c41b": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "c36ceab2b1f2490fb7c9b54c6fecf137": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "c4d92d44e575484899f8e6c829c5f1a3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "primary", "description": "watch", "layout": "IPY_MODEL_96dff3fe401540519a7e491383a6a098", "style": "IPY_MODEL_8fc818fc17744f2085730462d771faa4" } }, "c68e85689926430e929d22297205eb10": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "c6e45ba5a43a43a49e9cfbeff23129e7": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.1.0", "model_name": "OutputModel", "state": { "_model_module_version": "1.1.0", "_view_module_version": "1.1.0", "layout": "IPY_MODEL_f1af24a04e2d48bc97babe0a5b12ef9e" } }, "c77b8dacd9ae4226b3fe8d8a87d91180": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": { "height": "80px", "width": "50%" } }, "c83e6e1e76844e519f699fdb8482e72b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "clear log", "layout": "IPY_MODEL_cce9ea06c9e94d58b2f05917f415c29a", "style": "IPY_MODEL_ee1796a04b4444478073ebbc474f5806" } }, "cce9ea06c9e94d58b2f05917f415c29a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "cf71559f09c147ef92e6caae0bacdadd": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "success", "description": "start", "layout": "IPY_MODEL_154caf1708074e1ca375957f56ebf016", "style": "IPY_MODEL_5c1648a752cf4391a116d822dfb50910" } }, "d1d2e2cda79340748218e12802816ad9": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.1.0", "model_name": "OutputModel", "state": { "_model_module_version": "1.1.0", "_view_module_version": "1.1.0", "layout": "IPY_MODEL_d8ea387d6162415ab561b0b027e1a464" } }, "d6c5e258ac944218b311fd81beb095fb": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "d72b1dfd28574b03bf3583f315dc11da": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "d786f4d683fd4fc6a8f2be04b622a817": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "d7b2c1293bef439d8205f3dfed3b9637": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "d8487367842847229b2062244814d1d3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "primary", "description": "watch", "layout": "IPY_MODEL_8f535e76bdfb44e38937160764dd70a8", "style": "IPY_MODEL_92f3174b278e40f1bcbdff545fde14d0" } }, "d8ea387d6162415ab561b0b027e1a464": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "daee13c4d1214dd7b67e5e5dd286b423": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "deb8521ee8954749b6186d455bf301ae": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "success", "description": "start", "layout": "IPY_MODEL_6226272402da4d2f81398a28272dcb07", "style": "IPY_MODEL_5f2faacdef10464498d220a920e7d6fa" } }, "e071635eead24387a7574b0bebd3ff67": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "e161f250ba1e4991bfb29a3be963ae5b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "e94e0d624f8d480890c9f26ab2391654": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.1.0", "model_name": "OutputModel", "state": { "_model_module_version": "1.1.0", "_view_module_version": "1.1.0", "layout": "IPY_MODEL_8ed2ad2197c449eaa73ef4a964edd0f1" } }, "ed514c6244f04d38a1f40dfce6b62740": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "clear log", "layout": "IPY_MODEL_6d61e85609b1475f973429e56a50056c", "style": "IPY_MODEL_a1392bf9431c40258c60332f6bc3ab91" } }, "edec8b3133004cb69efcb7c446fe07e5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "clear log", "layout": "IPY_MODEL_a3b9e05f261940b2b9480493fe85370e", "style": "IPY_MODEL_fca6eff41e10444f90553bcab202c9b4" } }, "ee000a0f42b34895a40fa55b5157db69": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "ee1796a04b4444478073ebbc474f5806": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "f1af24a04e2d48bc97babe0a5b12ef9e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "f20f4b225e0b44b881a167b746269857": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "clear log", "layout": "IPY_MODEL_c0dd8ca3bbf94f4da8e7e8c421d1c41b", "style": "IPY_MODEL_9b0bf682445540fd8cc42a06f027bf67" } }, "f390e89c586b4f9093b40ebb82e977c0": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "f72cfa0257de4346b827d7d8c15d2829": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "refresh log", "layout": "IPY_MODEL_d7b2c1293bef439d8205f3dfed3b9637", "style": "IPY_MODEL_ee000a0f42b34895a40fa55b5157db69" } }, "f9a9a9e52d414f07bbc54a8586cf06e2": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "fb2a803377514092b52af99fab74196f": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} }, "fc9dc6cea47e46d4a3bb021d3516ed32": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "button_style": "success", "description": "start", "layout": "IPY_MODEL_c36ceab2b1f2490fb7c9b54c6fecf137", "style": "IPY_MODEL_19e8fc0f0c70420785eb97d31fa16375" } }, "fca6eff41e10444f90553bcab202c9b4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonStyleModel", "state": {} }, "ff9d19fb75fa4f56b52dd21a7a43cb10": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.1.0", "model_name": "ButtonModel", "state": { "description": "refresh log", "layout": "IPY_MODEL_836c8d1986ff4f1d8088dd6cc59e38d5", "style": "IPY_MODEL_1e51712c8ffd479d87b9112e006ea7ad" } }, "fffbebead6dd4b25b15d981137a2ae12": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.0.0", "model_name": "LayoutModel", "state": {} } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 2 }