Skip to content

Instantly share code, notes, and snippets.

@hadim
Created December 26, 2019 14:09
Show Gist options
  • Save hadim/4850df5b588692376fe52a3e1fb24b58 to your computer and use it in GitHub Desktop.
Save hadim/4850df5b588692376fe52a3e1fb24b58 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 21:52:21) \n",
"[GCC 7.3.0]\n",
"4.40.0\n",
"1.2.3\n",
"6.0.1\n"
]
}
],
"source": [
"import sys\n",
"import time\n",
"\n",
"import tqdm\n",
"import jupyterlab\n",
"import notebook\n",
"\n",
"print(sys.version)\n",
"print(tqdm.__version__)\n",
"print(jupyterlab.__version__)\n",
"print(notebook.__version__)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Start\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "bb0dab6c9832491a946e5c1a7a11fdc9",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=5.0), HTML(value='')))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=10.0), HTML(value='')))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=10.0), HTML(value='')))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=10.0), HTML(value='')))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=10.0), HTML(value='')))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=10.0), HTML(value='')))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Done\n"
]
}
],
"source": [
"from tqdm.auto import tqdm\n",
"\n",
"print(\"Start\")\n",
"\n",
"for _ in tqdm(range(5)):\n",
" for _ in tqdm(range(10), leave=False):\n",
" time.sleep(0.05)\n",
" \n",
"print(\"Done\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:ws]",
"language": "python",
"name": "conda-env-ws-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.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment