SHARE
TWEET

Untitled

a guest Apr 21st, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.  "cells": [
  3.   {
  4.    "cell_type": "markdown",
  5.    "metadata": {},
  6.    "source": [
  7.     "## DatePicker"
  8.    ]
  9.   },
  10.   {
  11.    "cell_type": "code",
  12.    "execution_count": 1,
  13.    "metadata": {},
  14.    "outputs": [
  15.     {
  16.      "data": {
  17.       "application/vnd.jupyter.widget-view+json": {
  18.        "model_id": "c5018754ae9744f28db37453ef00c7b4",
  19.        "version_major": 2,
  20.        "version_minor": 0
  21.       },
  22.       "text/plain": [
  23.        "DatePicker(value=None, description='Next WMM:')"
  24.       ]
  25.      },
  26.      "metadata": {},
  27.      "output_type": "display_data"
  28.     }
  29.    ],
  30.    "source": [
  31.     "import ipywidgets as widgets\n",
  32.     "from IPython.display import display\n",
  33.     "\n",
  34.     "next_wmm_date = widgets.DatePicker(\n",
  35.     "    description='Next WMM:'\n",
  36.     ")\n",
  37.     "display(next_wmm_date)"
  38.    ]
  39.   },
  40.   {
  41.    "cell_type": "code",
  42.    "execution_count": 2,
  43.    "metadata": {},
  44.    "outputs": [
  45.     {
  46.      "name": "stdout",
  47.      "output_type": "stream",
  48.      "text": [
  49.       "2020 Tokyo Marathon will be hosted on 2020-03-01.\n"
  50.      ]
  51.     }
  52.    ],
  53.    "source": [
  54.     "wmm_msg = \"2020 Tokyo Marathon will be hosted on {}.\".format(next_wmm_date.value)\n",
  55.     "print(wmm_msg)"
  56.    ]
  57.   }
  58.  ],
  59.  "metadata": {
  60.   "kernelspec": {
  61.    "display_name": "Python 3",
  62.    "language": "python",
  63.    "name": "python3"
  64.   },
  65.   "language_info": {
  66.    "codemirror_mode": {
  67.     "name": "ipython",
  68.     "version": 3
  69.    },
  70.    "file_extension": ".py",
  71.    "mimetype": "text/x-python",
  72.    "name": "python",
  73.    "nbconvert_exporter": "python",
  74.    "pygments_lexer": "ipython3",
  75.    "version": "3.7.1"
  76.   }
  77.  },
  78.  "nbformat": 4,
  79.  "nbformat_minor": 2
  80. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top