{ "cells": [ { "cell_type": "markdown", "metadata": { "toc": true }, "source": [ "
Failed to display Jupyter Widget of type HBox
.
\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=1, bar_style='info', max=1), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "1000\n", "2000\n", "3000\n", "4000\n", "5000\n", "6000\n", "7000\n", "8000\n", "9000\n", "10000\n", "11000\n", "12000\n", "13000\n", "14000\n", "15000\n", "16000\n", "17000\n", "18000\n", "19000\n", "\n", "CPU times: user 49.3 s, sys: 13.8 s, total: 1min 3s\n", "Wall time: 1min 7s\n" ] }, { "data": { "text/plain": [ "True" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%time Count_References()" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "10000\n", "peak memory: 8153.01 MiB, increment: 836.18 MiB\n" ] } ], "source": [ "# memory usage See Chapter 1 of the handbook\n", "\n", "%load_ext memory_profiler\n", "%memit Count_References()" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "10000\n", " " ] } ], "source": [ "%prun Count_References()" ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " | Number_of_references | \n", "
---|---|
count | \n", "19848.000000 | \n", "
mean | \n", "20.653819 | \n", "
std | \n", "38.809875 | \n", "
min | \n", "0.000000 | \n", "
25% | \n", "0.000000 | \n", "
50% | \n", "5.000000 | \n", "
75% | \n", "23.000000 | \n", "
max | \n", "559.000000 | \n", "
\n", " | Number_of_references | \n", "
---|---|
12 | \n", "199 | \n", "
25 | \n", "141 | \n", "
39 | \n", "15 | \n", "
290 | \n", "8 | \n", "
303 | \n", "141 | \n", "