{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Initialization Cells\n", "\n", "BeakerX supports them by including the [already existing contributed extension](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/master/src/jupyter_contrib_nbextensions/nbextensions/init_cell/main.js). The View -> Cell Toolbar -> Initialization Cell menu item makes the UI visible. It also adds a calculator button icon to the toolbar to run the init cells.\n", "\n", "Initialization cells are not run unless a notebook is trusted. Click on the trust button to enable this feature on a given notebook." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "init_cell": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2017-07-16 22:37\n" ] } ], "source": [ "import time\n", "print(time.strftime(\"%Y-%m-%d %H:%M\"))" ] } ], "metadata": { "beakerx_kernel_parameters": {}, "celltoolbar": "Initialization Cell", "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "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.5.3" } }, "nbformat": 4, "nbformat_minor": 2 }