{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from time import sleep\n", "from tqdm import tqdm_notebook\n", "from ipypb import track, irange, ipb" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "100%\n", "3/3\n", "[00:04<00:01, 1.22s/it]
" ], "text/plain": [ "\u001b[A\u001b[A\u001b[2K\r", " [████████████████████████████████████████████████████████████] 3/3 [00:04<00:01, 1.22s/it]\u001b[B" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
New Level\n", "\n", "100%\n", "3/3\n", "[00:01<00:00, 0.40s/it]
" ], "text/plain": [ "\u001b[A\u001b[2K\r", " New Level [██████████████████████████████████████████████████] 3/3 [00:01<00:00, 0.40s/it]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
New Level\n", "\n", "100%\n", "3/3\n", "[00:01<00:00, 0.40s/it]
" ], "text/plain": [ "\u001b[A\u001b[2K\r", " New Level [██████████████████████████████████████████████████] 3/3 [00:01<00:00, 0.40s/it]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
New Level\n", "\n", "100%\n", "3/3\n", "[00:01<00:00, 0.40s/it]
" ], "text/plain": [ "\u001b[A\u001b[2K\r", " New Level [██████████████████████████████████████████████████] 3/3 [00:01<00:00, 0.40s/it]" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for i in track(range(3)):\n", " for j in track(range(3), label='New Level'):\n", " sleep(0.4)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "100%\n", "3/3\n", "[00:04<00:01, 1.22s/it]
" ], "text/plain": [ "\u001b[A\u001b[A\u001b[2K\r", " [████████████████████████████████████████████████████████████] 3/3 [00:04<00:01, 1.22s/it]\u001b[B" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
New Level\n", "\n", "100%\n", "3/3\n", "[00:01<00:00, 0.41s/it]
" ], "text/plain": [ "\u001b[A\u001b[2K\r", " New Level [██████████████████████████████████████████████████] 3/3 [00:01<00:00, 0.41s/it]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
New Level\n", "\n", "100%\n", "3/3\n", "[00:01<00:00, 0.40s/it]
" ], "text/plain": [ "\u001b[A\u001b[2K\r", " New Level [██████████████████████████████████████████████████] 3/3 [00:01<00:00, 0.40s/it]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
New Level\n", "\n", "100%\n", "3/3\n", "[00:01<00:00, 0.40s/it]
" ], "text/plain": [ "\u001b[A\u001b[2K\r", " New Level [██████████████████████████████████████████████████] 3/3 [00:01<00:00, 0.40s/it]" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for i in irange(3):\n", " for j in irange(3, label='New Level'):\n", " sleep(0.4)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "22b48f05146d4648984834239e1366f5", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type HBox.

\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": [ "HBox(children=(IntProgress(value=0, max=3), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d551f399efc147b6b9bb04193c3a6ae9", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type HBox.

\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": [ "HBox(children=(IntProgress(value=0, description='New Level', max=3), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "2da7671af3714f6b94e9263e9e113a1c", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type HBox.

\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": [ "HBox(children=(IntProgress(value=0, description='New Level', max=3), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "973d11256e3a4b9391eadca4c2bf6cc8", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type HBox.

\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": [ "HBox(children=(IntProgress(value=0, description='New Level', max=3), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n" ] } ], "source": [ "for i in tqdm_notebook(range(3)):\n", " for j in tqdm_notebook(range(3), desc='New Level'):\n", " sleep(0.4)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "tqdm_notebook = ipb" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "100%\n", "3/3\n", "[00:04<00:01, 1.22s/it]
" ], "text/plain": [ "\u001b[A\u001b[A\u001b[2K\r", " [████████████████████████████████████████████████████████████] 3/3 [00:04<00:01, 1.22s/it]\u001b[B" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
New Level\n", "\n", "100%\n", "3/3\n", "[00:01<00:00, 0.41s/it]
" ], "text/plain": [ "\u001b[A\u001b[2K\r", " New Level [██████████████████████████████████████████████████] 3/3 [00:01<00:00, 0.41s/it]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
New Level\n", "\n", "100%\n", "3/3\n", "[00:01<00:00, 0.41s/it]
" ], "text/plain": [ "\u001b[A\u001b[2K\r", " New Level [██████████████████████████████████████████████████] 3/3 [00:01<00:00, 0.41s/it]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
New Level\n", "\n", "100%\n", "3/3\n", "[00:01<00:00, 0.40s/it]
" ], "text/plain": [ "\u001b[A\u001b[2K\r", " New Level [██████████████████████████████████████████████████] 3/3 [00:01<00:00, 0.40s/it]" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for i in tqdm_notebook(range(3)):\n", " for j in tqdm_notebook(range(3), desc='New Level'):\n", " sleep(0.4)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "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.6.4" } }, "nbformat": 4, "nbformat_minor": 2 }