{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "7e32a042",
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"......\n",
"fixed bad single file torrent 4f269d8aefd647ee270842d53ec98aebd23a4afe\n",
"fixed bad single file torrent 7b09ae0b612dafc1744562dccbbe4becf4d633c3\n",
"38021 @ 413.0262871221639 s\n"
]
}
],
"source": [
"from time import monotonic\n",
"from sys import path\n",
"path.append(\"/root/projects/travnik\")\n",
"from travnik import glob\n",
"print(\"......\")\n",
"start = monotonic()\n",
"torrents = glob(\"/root/projects/travnik\")\n",
"print(len(torrents), \"@\", monotonic()-start, \"s\")\n",
"# t = Torrent()\n",
"# t.file(\"/root/projects/travnik/449a38ef7e042bd2d75e8921aa02f6f244165d9d.torrent\")\n",
"# print(t.sha1.hex())\n",
"# for path, length in t.paths():\n",
"# print(path, length)\n",
"# print(t)"
]
},
{
"cell_type": "code",
"execution_count": 30,
"id": "e170de45",
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"application/javascript": [
"/* Put everything inside the global mpl namespace */\n",
"/* global mpl */\n",
"window.mpl = {};\n",
"\n",
"mpl.get_websocket_type = function () {\n",
" if (typeof WebSocket !== 'undefined') {\n",
" return WebSocket;\n",
" } else if (typeof MozWebSocket !== 'undefined') {\n",
" return MozWebSocket;\n",
" } else {\n",
" alert(\n",
" 'Your browser does not have WebSocket support. ' +\n",
" 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
" 'Firefox 4 and 5 are also supported but you ' +\n",
" 'have to enable WebSockets in about:config.'\n",
" );\n",
" }\n",
"};\n",
"\n",
"mpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n",
" this.id = figure_id;\n",
"\n",
" this.ws = websocket;\n",
"\n",
" this.supports_binary = this.ws.binaryType !== undefined;\n",
"\n",
" if (!this.supports_binary) {\n",
" var warnings = document.getElementById('mpl-warnings');\n",
" if (warnings) {\n",
" warnings.style.display = 'block';\n",
" warnings.textContent =\n",
" 'This browser does not support binary websocket messages. ' +\n",
" 'Performance may be slow.';\n",
" }\n",
" }\n",
"\n",
" this.imageObj = new Image();\n",
"\n",
" this.context = undefined;\n",
" this.message = undefined;\n",
" this.canvas = undefined;\n",
" this.rubberband_canvas = undefined;\n",
" this.rubberband_context = undefined;\n",
" this.format_dropdown = undefined;\n",
"\n",
" this.image_mode = 'full';\n",
"\n",
" this.root = document.createElement('div');\n",
" this.root.setAttribute('style', 'display: inline-block');\n",
" this._root_extra_style(this.root);\n",
"\n",
" parent_element.appendChild(this.root);\n",
"\n",
" this._init_header(this);\n",
" this._init_canvas(this);\n",
" this._init_toolbar(this);\n",
"\n",
" var fig = this;\n",
"\n",
" this.waiting = false;\n",
"\n",
" this.ws.onopen = function () {\n",
" fig.send_message('supports_binary', { value: fig.supports_binary });\n",
" fig.send_message('send_image_mode', {});\n",
" if (fig.ratio !== 1) {\n",
" fig.send_message('set_device_pixel_ratio', {\n",
" device_pixel_ratio: fig.ratio,\n",
" });\n",
" }\n",
" fig.send_message('refresh', {});\n",
" };\n",
"\n",
" this.imageObj.onload = function () {\n",
" if (fig.image_mode === 'full') {\n",
" // Full images could contain transparency (where diff images\n",
" // almost always do), so we need to clear the canvas so that\n",
" // there is no ghosting.\n",
" fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
" }\n",
" fig.context.drawImage(fig.imageObj, 0, 0);\n",
" };\n",
"\n",
" this.imageObj.onunload = function () {\n",
" fig.ws.close();\n",
" };\n",
"\n",
" this.ws.onmessage = this._make_on_message_function(this);\n",
"\n",
" this.ondownload = ondownload;\n",
"};\n",
"\n",
"mpl.figure.prototype._init_header = function () {\n",
" var titlebar = document.createElement('div');\n",
" titlebar.classList =\n",
" 'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n",
" var titletext = document.createElement('div');\n",
" titletext.classList = 'ui-dialog-title';\n",
" titletext.setAttribute(\n",
" 'style',\n",
" 'width: 100%; text-align: center; padding: 3px;'\n",
" );\n",
" titlebar.appendChild(titletext);\n",
" this.root.appendChild(titlebar);\n",
" this.header = titletext;\n",
"};\n",
"\n",
"mpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n",
"\n",
"mpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n",
"\n",
"mpl.figure.prototype._init_canvas = function () {\n",
" var fig = this;\n",
"\n",
" var canvas_div = (this.canvas_div = document.createElement('div'));\n",
" canvas_div.setAttribute('tabindex', '0');\n",
" canvas_div.setAttribute(\n",
" 'style',\n",
" 'border: 1px solid #ddd;' +\n",
" 'box-sizing: content-box;' +\n",
" 'clear: both;' +\n",
" 'min-height: 1px;' +\n",
" 'min-width: 1px;' +\n",
" 'outline: 0;' +\n",
" 'overflow: hidden;' +\n",
" 'position: relative;' +\n",
" 'resize: both;' +\n",
" 'z-index: 2;'\n",
" );\n",
"\n",
" function on_keyboard_event_closure(name) {\n",
" return function (event) {\n",
" return fig.key_event(event, name);\n",
" };\n",
" }\n",
"\n",
" canvas_div.addEventListener(\n",
" 'keydown',\n",
" on_keyboard_event_closure('key_press')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'keyup',\n",
" on_keyboard_event_closure('key_release')\n",
" );\n",
"\n",
" this._canvas_extra_style(canvas_div);\n",
" this.root.appendChild(canvas_div);\n",
"\n",
" var canvas = (this.canvas = document.createElement('canvas'));\n",
" canvas.classList.add('mpl-canvas');\n",
" canvas.setAttribute(\n",
" 'style',\n",
" 'box-sizing: content-box;' +\n",
" 'pointer-events: none;' +\n",
" 'position: relative;' +\n",
" 'z-index: 0;'\n",
" );\n",
"\n",
" this.context = canvas.getContext('2d');\n",
"\n",
" var backingStore =\n",
" this.context.backingStorePixelRatio ||\n",
" this.context.webkitBackingStorePixelRatio ||\n",
" this.context.mozBackingStorePixelRatio ||\n",
" this.context.msBackingStorePixelRatio ||\n",
" this.context.oBackingStorePixelRatio ||\n",
" this.context.backingStorePixelRatio ||\n",
" 1;\n",
"\n",
" this.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
"\n",
" var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n",
" 'canvas'\n",
" ));\n",
" rubberband_canvas.setAttribute(\n",
" 'style',\n",
" 'box-sizing: content-box;' +\n",
" 'left: 0;' +\n",
" 'pointer-events: none;' +\n",
" 'position: absolute;' +\n",
" 'top: 0;' +\n",
" 'z-index: 1;'\n",
" );\n",
"\n",
" // Apply a ponyfill if ResizeObserver is not implemented by browser.\n",
" if (this.ResizeObserver === undefined) {\n",
" if (window.ResizeObserver !== undefined) {\n",
" this.ResizeObserver = window.ResizeObserver;\n",
" } else {\n",
" var obs = _JSXTOOLS_RESIZE_OBSERVER({});\n",
" this.ResizeObserver = obs.ResizeObserver;\n",
" }\n",
" }\n",
"\n",
" this.resizeObserverInstance = new this.ResizeObserver(function (entries) {\n",
" var nentries = entries.length;\n",
" for (var i = 0; i < nentries; i++) {\n",
" var entry = entries[i];\n",
" var width, height;\n",
" if (entry.contentBoxSize) {\n",
" if (entry.contentBoxSize instanceof Array) {\n",
" // Chrome 84 implements new version of spec.\n",
" width = entry.contentBoxSize[0].inlineSize;\n",
" height = entry.contentBoxSize[0].blockSize;\n",
" } else {\n",
" // Firefox implements old version of spec.\n",
" width = entry.contentBoxSize.inlineSize;\n",
" height = entry.contentBoxSize.blockSize;\n",
" }\n",
" } else {\n",
" // Chrome <84 implements even older version of spec.\n",
" width = entry.contentRect.width;\n",
" height = entry.contentRect.height;\n",
" }\n",
"\n",
" // Keep the size of the canvas and rubber band canvas in sync with\n",
" // the canvas container.\n",
" if (entry.devicePixelContentBoxSize) {\n",
" // Chrome 84 implements new version of spec.\n",
" canvas.setAttribute(\n",
" 'width',\n",
" entry.devicePixelContentBoxSize[0].inlineSize\n",
" );\n",
" canvas.setAttribute(\n",
" 'height',\n",
" entry.devicePixelContentBoxSize[0].blockSize\n",
" );\n",
" } else {\n",
" canvas.setAttribute('width', width * fig.ratio);\n",
" canvas.setAttribute('height', height * fig.ratio);\n",
" }\n",
" /* This rescales the canvas back to display pixels, so that it\n",
" * appears correct on HiDPI screens. */\n",
" canvas.style.width = width + 'px';\n",
" canvas.style.height = height + 'px';\n",
"\n",
" rubberband_canvas.setAttribute('width', width);\n",
" rubberband_canvas.setAttribute('height', height);\n",
"\n",
" // And update the size in Python. We ignore the initial 0/0 size\n",
" // that occurs as the element is placed into the DOM, which should\n",
" // otherwise not happen due to the minimum size styling.\n",
" if (fig.ws.readyState == 1 && width != 0 && height != 0) {\n",
" fig.request_resize(width, height);\n",
" }\n",
" }\n",
" });\n",
" this.resizeObserverInstance.observe(canvas_div);\n",
"\n",
" function on_mouse_event_closure(name) {\n",
" /* User Agent sniffing is bad, but WebKit is busted:\n",
" * https://bugs.webkit.org/show_bug.cgi?id=144526\n",
" * https://bugs.webkit.org/show_bug.cgi?id=181818\n",
" * The worst that happens here is that they get an extra browser\n",
" * selection when dragging, if this check fails to catch them.\n",
" */\n",
" var UA = navigator.userAgent;\n",
" var isWebKit = /AppleWebKit/.test(UA) && !/Chrome/.test(UA);\n",
" if(isWebKit) {\n",
" return function (event) {\n",
" /* This prevents the web browser from automatically changing to\n",
" * the text insertion cursor when the button is pressed. We\n",
" * want to control all of the cursor setting manually through\n",
" * the 'cursor' event from matplotlib */\n",
" event.preventDefault()\n",
" return fig.mouse_event(event, name);\n",
" };\n",
" } else {\n",
" return function (event) {\n",
" return fig.mouse_event(event, name);\n",
" };\n",
" }\n",
" }\n",
"\n",
" canvas_div.addEventListener(\n",
" 'mousedown',\n",
" on_mouse_event_closure('button_press')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'mouseup',\n",
" on_mouse_event_closure('button_release')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'dblclick',\n",
" on_mouse_event_closure('dblclick')\n",
" );\n",
" // Throttle sequential mouse events to 1 every 20ms.\n",
" canvas_div.addEventListener(\n",
" 'mousemove',\n",
" on_mouse_event_closure('motion_notify')\n",
" );\n",
"\n",
" canvas_div.addEventListener(\n",
" 'mouseenter',\n",
" on_mouse_event_closure('figure_enter')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'mouseleave',\n",
" on_mouse_event_closure('figure_leave')\n",
" );\n",
"\n",
" canvas_div.addEventListener('wheel', function (event) {\n",
" if (event.deltaY < 0) {\n",
" event.step = 1;\n",
" } else {\n",
" event.step = -1;\n",
" }\n",
" on_mouse_event_closure('scroll')(event);\n",
" });\n",
"\n",
" canvas_div.appendChild(canvas);\n",
" canvas_div.appendChild(rubberband_canvas);\n",
"\n",
" this.rubberband_context = rubberband_canvas.getContext('2d');\n",
" this.rubberband_context.strokeStyle = '#000000';\n",
"\n",
" this._resize_canvas = function (width, height, forward) {\n",
" if (forward) {\n",
" canvas_div.style.width = width + 'px';\n",
" canvas_div.style.height = height + 'px';\n",
" }\n",
" };\n",
"\n",
" // Disable right mouse context menu.\n",
" canvas_div.addEventListener('contextmenu', function (_e) {\n",
" event.preventDefault();\n",
" return false;\n",
" });\n",
"\n",
" function set_focus() {\n",
" canvas.focus();\n",
" canvas_div.focus();\n",
" }\n",
"\n",
" window.setTimeout(set_focus, 100);\n",
"};\n",
"\n",
"mpl.figure.prototype._init_toolbar = function () {\n",
" var fig = this;\n",
"\n",
" var toolbar = document.createElement('div');\n",
" toolbar.classList = 'mpl-toolbar';\n",
" this.root.appendChild(toolbar);\n",
"\n",
" function on_click_closure(name) {\n",
" return function (_event) {\n",
" return fig.toolbar_button_onclick(name);\n",
" };\n",
" }\n",
"\n",
" function on_mouseover_closure(tooltip) {\n",
" return function (event) {\n",
" if (!event.currentTarget.disabled) {\n",
" return fig.toolbar_button_onmouseover(tooltip);\n",
" }\n",
" };\n",
" }\n",
"\n",
" fig.buttons = {};\n",
" var buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'mpl-button-group';\n",
" for (var toolbar_ind in mpl.toolbar_items) {\n",
" var name = mpl.toolbar_items[toolbar_ind][0];\n",
" var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
" var image = mpl.toolbar_items[toolbar_ind][2];\n",
" var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
"\n",
" if (!name) {\n",
" /* Instead of a spacer, we start a new button group. */\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
" buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'mpl-button-group';\n",
" continue;\n",
" }\n",
"\n",
" var button = (fig.buttons[name] = document.createElement('button'));\n",
" button.classList = 'mpl-widget';\n",
" button.setAttribute('role', 'button');\n",
" button.setAttribute('aria-disabled', 'false');\n",
" button.addEventListener('click', on_click_closure(method_name));\n",
" button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
"\n",
" var icon_img = document.createElement('img');\n",
" icon_img.src = '_images/' + image + '.png';\n",
" icon_img.srcset = '_images/' + image + '_large.png 2x';\n",
" icon_img.alt = tooltip;\n",
" button.appendChild(icon_img);\n",
"\n",
" buttonGroup.appendChild(button);\n",
" }\n",
"\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
"\n",
" var fmt_picker = document.createElement('select');\n",
" fmt_picker.classList = 'mpl-widget';\n",
" toolbar.appendChild(fmt_picker);\n",
" this.format_dropdown = fmt_picker;\n",
"\n",
" for (var ind in mpl.extensions) {\n",
" var fmt = mpl.extensions[ind];\n",
" var option = document.createElement('option');\n",
" option.selected = fmt === mpl.default_extension;\n",
" option.innerHTML = fmt;\n",
" fmt_picker.appendChild(option);\n",
" }\n",
"\n",
" var status_bar = document.createElement('span');\n",
" status_bar.classList = 'mpl-message';\n",
" toolbar.appendChild(status_bar);\n",
" this.message = status_bar;\n",
"};\n",
"\n",
"mpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\n",
" // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
" // which will in turn request a refresh of the image.\n",
" this.send_message('resize', { width: x_pixels, height: y_pixels });\n",
"};\n",
"\n",
"mpl.figure.prototype.send_message = function (type, properties) {\n",
" properties['type'] = type;\n",
" properties['figure_id'] = this.id;\n",
" this.ws.send(JSON.stringify(properties));\n",
"};\n",
"\n",
"mpl.figure.prototype.send_draw_message = function () {\n",
" if (!this.waiting) {\n",
" this.waiting = true;\n",
" this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
" var format_dropdown = fig.format_dropdown;\n",
" var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
" fig.ondownload(fig, format);\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_resize = function (fig, msg) {\n",
" var size = msg['size'];\n",
" if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\n",
" fig._resize_canvas(size[0], size[1], msg['forward']);\n",
" fig.send_message('refresh', {});\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_rubberband = function (fig, msg) {\n",
" var x0 = msg['x0'] / fig.ratio;\n",
" var y0 = (fig.canvas.height - msg['y0']) / fig.ratio;\n",
" var x1 = msg['x1'] / fig.ratio;\n",
" var y1 = (fig.canvas.height - msg['y1']) / fig.ratio;\n",
" x0 = Math.floor(x0) + 0.5;\n",
" y0 = Math.floor(y0) + 0.5;\n",
" x1 = Math.floor(x1) + 0.5;\n",
" y1 = Math.floor(y1) + 0.5;\n",
" var min_x = Math.min(x0, x1);\n",
" var min_y = Math.min(y0, y1);\n",
" var width = Math.abs(x1 - x0);\n",
" var height = Math.abs(y1 - y0);\n",
"\n",
" fig.rubberband_context.clearRect(\n",
" 0,\n",
" 0,\n",
" fig.canvas.width / fig.ratio,\n",
" fig.canvas.height / fig.ratio\n",
" );\n",
"\n",
" fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_figure_label = function (fig, msg) {\n",
" // Updates the figure title.\n",
" fig.header.textContent = msg['label'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_cursor = function (fig, msg) {\n",
" fig.canvas_div.style.cursor = msg['cursor'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_message = function (fig, msg) {\n",
" fig.message.textContent = msg['message'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_draw = function (fig, _msg) {\n",
" // Request the server to send over a new figure.\n",
" fig.send_draw_message();\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_image_mode = function (fig, msg) {\n",
" fig.image_mode = msg['mode'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_history_buttons = function (fig, msg) {\n",
" for (var key in msg) {\n",
" if (!(key in fig.buttons)) {\n",
" continue;\n",
" }\n",
" fig.buttons[key].disabled = !msg[key];\n",
" fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\n",
" if (msg['mode'] === 'PAN') {\n",
" fig.buttons['Pan'].classList.add('active');\n",
" fig.buttons['Zoom'].classList.remove('active');\n",
" } else if (msg['mode'] === 'ZOOM') {\n",
" fig.buttons['Pan'].classList.remove('active');\n",
" fig.buttons['Zoom'].classList.add('active');\n",
" } else {\n",
" fig.buttons['Pan'].classList.remove('active');\n",
" fig.buttons['Zoom'].classList.remove('active');\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.updated_canvas_event = function () {\n",
" // Called whenever the canvas gets updated.\n",
" this.send_message('ack', {});\n",
"};\n",
"\n",
"// A function to construct a web socket function for onmessage handling.\n",
"// Called in the figure constructor.\n",
"mpl.figure.prototype._make_on_message_function = function (fig) {\n",
" return function socket_on_message(evt) {\n",
" if (evt.data instanceof Blob) {\n",
" var img = evt.data;\n",
" if (img.type !== 'image/png') {\n",
" /* FIXME: We get \"Resource interpreted as Image but\n",
" * transferred with MIME type text/plain:\" errors on\n",
" * Chrome. But how to set the MIME type? It doesn't seem\n",
" * to be part of the websocket stream */\n",
" img.type = 'image/png';\n",
" }\n",
"\n",
" /* Free the memory for the previous frames */\n",
" if (fig.imageObj.src) {\n",
" (window.URL || window.webkitURL).revokeObjectURL(\n",
" fig.imageObj.src\n",
" );\n",
" }\n",
"\n",
" fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
" img\n",
" );\n",
" fig.updated_canvas_event();\n",
" fig.waiting = false;\n",
" return;\n",
" } else if (\n",
" typeof evt.data === 'string' &&\n",
" evt.data.slice(0, 21) === 'data:image/png;base64'\n",
" ) {\n",
" fig.imageObj.src = evt.data;\n",
" fig.updated_canvas_event();\n",
" fig.waiting = false;\n",
" return;\n",
" }\n",
"\n",
" var msg = JSON.parse(evt.data);\n",
" var msg_type = msg['type'];\n",
"\n",
" // Call the \"handle_{type}\" callback, which takes\n",
" // the figure and JSON message as its only arguments.\n",
" try {\n",
" var callback = fig['handle_' + msg_type];\n",
" } catch (e) {\n",
" console.log(\n",
" \"No handler for the '\" + msg_type + \"' message type: \",\n",
" msg\n",
" );\n",
" return;\n",
" }\n",
"\n",
" if (callback) {\n",
" try {\n",
" // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
" callback(fig, msg);\n",
" } catch (e) {\n",
" console.log(\n",
" \"Exception inside the 'handler_\" + msg_type + \"' callback:\",\n",
" e,\n",
" e.stack,\n",
" msg\n",
" );\n",
" }\n",
" }\n",
" };\n",
"};\n",
"\n",
"\n",
"/*\n",
" * return a copy of an object with only non-object keys\n",
" * we need this to avoid circular references\n",
" * https://stackoverflow.com/a/24161582/3208463\n",
" */\n",
"function simpleKeys(original) {\n",
" return Object.keys(original).reduce(function (obj, key) {\n",
" if (typeof original[key] !== 'object') {\n",
" obj[key] = original[key];\n",
" }\n",
" return obj;\n",
" }, {});\n",
"}\n",
"\n",
"mpl.figure.prototype.mouse_event = function (event, name) {\n",
" if (name === 'button_press') {\n",
" this.canvas.focus();\n",
" this.canvas_div.focus();\n",
" }\n",
"\n",
" // from https://stackoverflow.com/q/1114465\n",
" var boundingRect = this.canvas.getBoundingClientRect();\n",
" var x = (event.clientX - boundingRect.left) * this.ratio;\n",
" var y = (event.clientY - boundingRect.top) * this.ratio;\n",
"\n",
" this.send_message(name, {\n",
" x: x,\n",
" y: y,\n",
" button: event.button,\n",
" step: event.step,\n",
" guiEvent: simpleKeys(event),\n",
" });\n",
"\n",
" return false;\n",
"};\n",
"\n",
"mpl.figure.prototype._key_event_extra = function (_event, _name) {\n",
" // Handle any extra behaviour associated with a key event\n",
"};\n",
"\n",
"mpl.figure.prototype.key_event = function (event, name) {\n",
" // Prevent repeat events\n",
" if (name === 'key_press') {\n",
" if (event.key === this._key) {\n",
" return;\n",
" } else {\n",
" this._key = event.key;\n",
" }\n",
" }\n",
" if (name === 'key_release') {\n",
" this._key = null;\n",
" }\n",
"\n",
" var value = '';\n",
" if (event.ctrlKey && event.key !== 'Control') {\n",
" value += 'ctrl+';\n",
" }\n",
" else if (event.altKey && event.key !== 'Alt') {\n",
" value += 'alt+';\n",
" }\n",
" else if (event.shiftKey && event.key !== 'Shift') {\n",
" value += 'shift+';\n",
" }\n",
"\n",
" value += 'k' + event.key;\n",
"\n",
" this._key_event_extra(event, name);\n",
"\n",
" this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\n",
" return false;\n",
"};\n",
"\n",
"mpl.figure.prototype.toolbar_button_onclick = function (name) {\n",
" if (name === 'download') {\n",
" this.handle_save(this, null);\n",
" } else {\n",
" this.send_message('toolbar_button', { name: name });\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n",
" this.message.textContent = tooltip;\n",
"};\n",
"\n",
"///////////////// REMAINING CONTENT GENERATED BY embed_js.py /////////////////\n",
"// prettier-ignore\n",
"var _JSXTOOLS_RESIZE_OBSERVER=function(A){var t,i=new WeakMap,n=new WeakMap,a=new WeakMap,r=new WeakMap,o=new Set;function s(e){if(!(this instanceof s))throw new TypeError(\"Constructor requires 'new' operator\");i.set(this,e)}function h(){throw new TypeError(\"Function is not a constructor\")}function c(e,t,i,n){e=0 in arguments?Number(arguments[0]):0,t=1 in arguments?Number(arguments[1]):0,i=2 in arguments?Number(arguments[2]):0,n=3 in arguments?Number(arguments[3]):0,this.right=(this.x=this.left=e)+(this.width=i),this.bottom=(this.y=this.top=t)+(this.height=n),Object.freeze(this)}function d(){t=requestAnimationFrame(d);var s=new WeakMap,p=new Set;o.forEach((function(t){r.get(t).forEach((function(i){var r=t instanceof window.SVGElement,o=a.get(t),d=r?0:parseFloat(o.paddingTop),f=r?0:parseFloat(o.paddingRight),l=r?0:parseFloat(o.paddingBottom),u=r?0:parseFloat(o.paddingLeft),g=r?0:parseFloat(o.borderTopWidth),m=r?0:parseFloat(o.borderRightWidth),w=r?0:parseFloat(o.borderBottomWidth),b=u+f,F=d+l,v=(r?0:parseFloat(o.borderLeftWidth))+m,W=g+w,y=r?0:t.offsetHeight-W-t.clientHeight,E=r?0:t.offsetWidth-v-t.clientWidth,R=b+v,z=F+W,M=r?t.width:parseFloat(o.width)-R-E,O=r?t.height:parseFloat(o.height)-z-y;if(n.has(t)){var k=n.get(t);if(k[0]===M&&k[1]===O)return}n.set(t,[M,O]);var S=Object.create(h.prototype);S.target=t,S.contentRect=new c(u,d,M,O),s.has(i)||(s.set(i,[]),p.add(i)),s.get(i).push(S)}))})),p.forEach((function(e){i.get(e).call(e,s.get(e),e)}))}return s.prototype.observe=function(i){if(i instanceof window.Element){r.has(i)||(r.set(i,new Set),o.add(i),a.set(i,window.getComputedStyle(i)));var n=r.get(i);n.has(this)||n.add(this),cancelAnimationFrame(t),t=requestAnimationFrame(d)}},s.prototype.unobserve=function(i){if(i instanceof window.Element&&r.has(i)){var n=r.get(i);n.has(this)&&(n.delete(this),n.size||(r.delete(i),o.delete(i))),n.size||r.delete(i),o.size||cancelAnimationFrame(t)}},A.DOMRectReadOnly=c,A.ResizeObserver=s,A.ResizeObserverEntry=h,A}; // eslint-disable-line\n",
"mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis\", \"fa fa-square-o\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o\", \"download\"]];\n",
"\n",
"mpl.extensions = [\"eps\", \"jpeg\", \"pgf\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\", \"webp\"];\n",
"\n",
"mpl.default_extension = \"png\";/* global mpl */\n",
"\n",
"var comm_websocket_adapter = function (comm) {\n",
" // Create a \"websocket\"-like object which calls the given IPython comm\n",
" // object with the appropriate methods. Currently this is a non binary\n",
" // socket, so there is still some room for performance tuning.\n",
" var ws = {};\n",
"\n",
" ws.binaryType = comm.kernel.ws.binaryType;\n",
" ws.readyState = comm.kernel.ws.readyState;\n",
" function updateReadyState(_event) {\n",
" if (comm.kernel.ws) {\n",
" ws.readyState = comm.kernel.ws.readyState;\n",
" } else {\n",
" ws.readyState = 3; // Closed state.\n",
" }\n",
" }\n",
" comm.kernel.ws.addEventListener('open', updateReadyState);\n",
" comm.kernel.ws.addEventListener('close', updateReadyState);\n",
" comm.kernel.ws.addEventListener('error', updateReadyState);\n",
"\n",
" ws.close = function () {\n",
" comm.close();\n",
" };\n",
" ws.send = function (m) {\n",
" //console.log('sending', m);\n",
" comm.send(m);\n",
" };\n",
" // Register the callback with on_msg.\n",
" comm.on_msg(function (msg) {\n",
" //console.log('receiving', msg['content']['data'], msg);\n",
" var data = msg['content']['data'];\n",
" if (data['blob'] !== undefined) {\n",
" data = {\n",
" data: new Blob(msg['buffers'], { type: data['blob'] }),\n",
" };\n",
" }\n",
" // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
" ws.onmessage(data);\n",
" });\n",
" return ws;\n",
"};\n",
"\n",
"mpl.mpl_figure_comm = function (comm, msg) {\n",
" // This is the function which gets called when the mpl process\n",
" // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
"\n",
" var id = msg.content.data.id;\n",
" // Get hold of the div created by the display call when the Comm\n",
" // socket was opened in Python.\n",
" var element = document.getElementById(id);\n",
" var ws_proxy = comm_websocket_adapter(comm);\n",
"\n",
" function ondownload(figure, _format) {\n",
" window.open(figure.canvas.toDataURL());\n",
" }\n",
"\n",
" var fig = new mpl.figure(id, ws_proxy, ondownload, element);\n",
"\n",
" // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
" // web socket which is closed, not our websocket->open comm proxy.\n",
" ws_proxy.onopen();\n",
"\n",
" fig.parent_element = element;\n",
" fig.cell_info = mpl.find_output_cell(\"
\");\n",
" if (!fig.cell_info) {\n",
" console.error('Failed to find cell for figure', id, fig);\n",
" return;\n",
" }\n",
" fig.cell_info[0].output_area.element.on(\n",
" 'cleared',\n",
" { fig: fig },\n",
" fig._remove_fig_handler\n",
" );\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_close = function (fig, msg) {\n",
" var width = fig.canvas.width / fig.ratio;\n",
" fig.cell_info[0].output_area.element.off(\n",
" 'cleared',\n",
" fig._remove_fig_handler\n",
" );\n",
" fig.resizeObserverInstance.unobserve(fig.canvas_div);\n",
"\n",
" // Update the output cell to use the data from the current canvas.\n",
" fig.push_to_output();\n",
" var dataURL = fig.canvas.toDataURL();\n",
" // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
" // the notebook keyboard shortcuts fail.\n",
" IPython.keyboard_manager.enable();\n",
" fig.parent_element.innerHTML =\n",
" '';\n",
" fig.close_ws(fig, msg);\n",
"};\n",
"\n",
"mpl.figure.prototype.close_ws = function (fig, msg) {\n",
" fig.send_message('closing', msg);\n",
" // fig.ws.close()\n",
"};\n",
"\n",
"mpl.figure.prototype.push_to_output = function (_remove_interactive) {\n",
" // Turn the data on the canvas into data in the output cell.\n",
" var width = this.canvas.width / this.ratio;\n",
" var dataURL = this.canvas.toDataURL();\n",
" this.cell_info[1]['text/html'] =\n",
" '';\n",
"};\n",
"\n",
"mpl.figure.prototype.updated_canvas_event = function () {\n",
" // Tell IPython that the notebook contents must change.\n",
" IPython.notebook.set_dirty(true);\n",
" this.send_message('ack', {});\n",
" var fig = this;\n",
" // Wait a second, then push the new image to the DOM so\n",
" // that it is saved nicely (might be nice to debounce this).\n",
" setTimeout(function () {\n",
" fig.push_to_output();\n",
" }, 1000);\n",
"};\n",
"\n",
"mpl.figure.prototype._init_toolbar = function () {\n",
" var fig = this;\n",
"\n",
" var toolbar = document.createElement('div');\n",
" toolbar.classList = 'btn-toolbar';\n",
" this.root.appendChild(toolbar);\n",
"\n",
" function on_click_closure(name) {\n",
" return function (_event) {\n",
" return fig.toolbar_button_onclick(name);\n",
" };\n",
" }\n",
"\n",
" function on_mouseover_closure(tooltip) {\n",
" return function (event) {\n",
" if (!event.currentTarget.disabled) {\n",
" return fig.toolbar_button_onmouseover(tooltip);\n",
" }\n",
" };\n",
" }\n",
"\n",
" fig.buttons = {};\n",
" var buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'btn-group';\n",
" var button;\n",
" for (var toolbar_ind in mpl.toolbar_items) {\n",
" var name = mpl.toolbar_items[toolbar_ind][0];\n",
" var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
" var image = mpl.toolbar_items[toolbar_ind][2];\n",
" var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
"\n",
" if (!name) {\n",
" /* Instead of a spacer, we start a new button group. */\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
" buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'btn-group';\n",
" continue;\n",
" }\n",
"\n",
" button = fig.buttons[name] = document.createElement('button');\n",
" button.classList = 'btn btn-default';\n",
" button.href = '#';\n",
" button.title = name;\n",
" button.innerHTML = '';\n",
" button.addEventListener('click', on_click_closure(method_name));\n",
" button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
" buttonGroup.appendChild(button);\n",
" }\n",
"\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
"\n",
" // Add the status bar.\n",
" var status_bar = document.createElement('span');\n",
" status_bar.classList = 'mpl-message pull-right';\n",
" toolbar.appendChild(status_bar);\n",
" this.message = status_bar;\n",
"\n",
" // Add the close button to the window.\n",
" var buttongrp = document.createElement('div');\n",
" buttongrp.classList = 'btn-group inline pull-right';\n",
" button = document.createElement('button');\n",
" button.classList = 'btn btn-mini btn-primary';\n",
" button.href = '#';\n",
" button.title = 'Stop Interaction';\n",
" button.innerHTML = '';\n",
" button.addEventListener('click', function (_evt) {\n",
" fig.handle_close(fig, {});\n",
" });\n",
" button.addEventListener(\n",
" 'mouseover',\n",
" on_mouseover_closure('Stop Interaction')\n",
" );\n",
" buttongrp.appendChild(button);\n",
" var titlebar = this.root.querySelector('.ui-dialog-titlebar');\n",
" titlebar.insertBefore(buttongrp, titlebar.firstChild);\n",
"};\n",
"\n",
"mpl.figure.prototype._remove_fig_handler = function (event) {\n",
" var fig = event.data.fig;\n",
" if (event.target !== this) {\n",
" // Ignore bubbled events from children.\n",
" return;\n",
" }\n",
" fig.close_ws(fig, {});\n",
"};\n",
"\n",
"mpl.figure.prototype._root_extra_style = function (el) {\n",
" el.style.boxSizing = 'content-box'; // override notebook setting of border-box.\n",
"};\n",
"\n",
"mpl.figure.prototype._canvas_extra_style = function (el) {\n",
" // this is important to make the div 'focusable\n",
" el.setAttribute('tabindex', 0);\n",
" // reach out to IPython and tell the keyboard manager to turn it's self\n",
" // off when our div gets focus\n",
"\n",
" // location in version 3\n",
" if (IPython.notebook.keyboard_manager) {\n",
" IPython.notebook.keyboard_manager.register_events(el);\n",
" } else {\n",
" // location in version 2\n",
" IPython.keyboard_manager.register_events(el);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype._key_event_extra = function (event, _name) {\n",
" // Check for shift+enter\n",
" if (event.shiftKey && event.which === 13) {\n",
" this.canvas_div.blur();\n",
" // select the cell after this one\n",
" var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
" IPython.notebook.select(index + 1);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
" fig.ondownload(fig, null);\n",
"};\n",
"\n",
"mpl.find_output_cell = function (html_output) {\n",
" // Return the cell and output element which can be found *uniquely* in the notebook.\n",
" // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
" // IPython event is triggered only after the cells have been serialised, which for\n",
" // our purposes (turning an active figure into a static one), is too late.\n",
" var cells = IPython.notebook.get_cells();\n",
" var ncells = cells.length;\n",
" for (var i = 0; i < ncells; i++) {\n",
" var cell = cells[i];\n",
" if (cell.cell_type === 'code') {\n",
" for (var j = 0; j < cell.output_area.outputs.length; j++) {\n",
" var data = cell.output_area.outputs[j];\n",
" if (data.data) {\n",
" // IPython >= 3 moved mimebundle to data attribute of output\n",
" data = data.data;\n",
" }\n",
" if (data['text/html'] === html_output) {\n",
" return [cell, data, j];\n",
" }\n",
" }\n",
" }\n",
" }\n",
"};\n",
"\n",
"// Register the function which deals with the matplotlib target/channel.\n",
"// The kernel may be null if the page has been refreshed.\n",
"if (IPython.notebook.kernel !== null) {\n",
" IPython.notebook.kernel.comm_manager.register_target(\n",
" 'matplotlib',\n",
" mpl.mpl_figure_comm\n",
" );\n",
"}\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.22313746600411832 za 67 različnih odjemalcev\n"
]
}
],
"source": [
"s = monotonic()\n",
"def uas(normalize=True, minrepr=0):\n",
" odjemalci = {}\n",
" for sha1, torrent in torrents.items():\n",
" odjemalec = torrent.dict.get(b'source').get(b'v')\n",
" if normalize and odjemalec is not None:\n",
" if b'/' in odjemalec:\n",
" odjemalec = odjemalec.split(b'/')[0]\n",
" elif b' (' in odjemalec:\n",
" odjemalec = odjemalec.split(b' (')[0]\n",
" else:\n",
" odjemalec = odjemalec.split(b' ')[0]\n",
" odjemalec = odjemalec.replace(b'\\xc2\\xb5', b'\\xce\\xbc').decode()\n",
" if odjemalec not in odjemalci.keys():\n",
" odjemalci[odjemalec] = 1\n",
" else:\n",
" odjemalci[odjemalec] += 1\n",
" trueodj = {\"ostali\": 0}\n",
" count = 0\n",
" for key, value in odjemalci.items():\n",
" count += 1\n",
" if value < minrepr:\n",
" trueodj[\"ostali\"] += value\n",
" else:\n",
" trueodj[key] = value\n",
" trueodj = [(v, k) for k, v in trueodj.items()]\n",
" return trueodj, count\n",
"odjemalci, count = uas(True, minrepr=0*len(torrents))\n",
"odjemalci = sorted(odjemalci, reverse=False)\n",
"from matplotlib import pyplot\n",
"%matplotlib notebook\n",
"fig, axes = pyplot.subplots()\n",
"from math import log\n",
"# axes.pie([log(sights) if sights else 0 for sights, name in odjemalci], labels=[name for sights, name in odjemalci])\n",
"axes.barh([name if name is not None else \"neznan\" for sights, name in odjemalci], [sights for sights, name in odjemalci])\n",
"axes.set_title(\"log skala odjemalcev\")\n",
"pyplot.xscale(\"log\")\n",
"fig.show()\n",
"print(monotonic()-s, \"za\", count, \"različnih odjemalcev\")"
]
},
{
"cell_type": "code",
"execution_count": 31,
"id": "52de34d6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.15033814194612205 s 40\n"
]
},
{
"data": {
"application/javascript": [
"/* Put everything inside the global mpl namespace */\n",
"/* global mpl */\n",
"window.mpl = {};\n",
"\n",
"mpl.get_websocket_type = function () {\n",
" if (typeof WebSocket !== 'undefined') {\n",
" return WebSocket;\n",
" } else if (typeof MozWebSocket !== 'undefined') {\n",
" return MozWebSocket;\n",
" } else {\n",
" alert(\n",
" 'Your browser does not have WebSocket support. ' +\n",
" 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
" 'Firefox 4 and 5 are also supported but you ' +\n",
" 'have to enable WebSockets in about:config.'\n",
" );\n",
" }\n",
"};\n",
"\n",
"mpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n",
" this.id = figure_id;\n",
"\n",
" this.ws = websocket;\n",
"\n",
" this.supports_binary = this.ws.binaryType !== undefined;\n",
"\n",
" if (!this.supports_binary) {\n",
" var warnings = document.getElementById('mpl-warnings');\n",
" if (warnings) {\n",
" warnings.style.display = 'block';\n",
" warnings.textContent =\n",
" 'This browser does not support binary websocket messages. ' +\n",
" 'Performance may be slow.';\n",
" }\n",
" }\n",
"\n",
" this.imageObj = new Image();\n",
"\n",
" this.context = undefined;\n",
" this.message = undefined;\n",
" this.canvas = undefined;\n",
" this.rubberband_canvas = undefined;\n",
" this.rubberband_context = undefined;\n",
" this.format_dropdown = undefined;\n",
"\n",
" this.image_mode = 'full';\n",
"\n",
" this.root = document.createElement('div');\n",
" this.root.setAttribute('style', 'display: inline-block');\n",
" this._root_extra_style(this.root);\n",
"\n",
" parent_element.appendChild(this.root);\n",
"\n",
" this._init_header(this);\n",
" this._init_canvas(this);\n",
" this._init_toolbar(this);\n",
"\n",
" var fig = this;\n",
"\n",
" this.waiting = false;\n",
"\n",
" this.ws.onopen = function () {\n",
" fig.send_message('supports_binary', { value: fig.supports_binary });\n",
" fig.send_message('send_image_mode', {});\n",
" if (fig.ratio !== 1) {\n",
" fig.send_message('set_device_pixel_ratio', {\n",
" device_pixel_ratio: fig.ratio,\n",
" });\n",
" }\n",
" fig.send_message('refresh', {});\n",
" };\n",
"\n",
" this.imageObj.onload = function () {\n",
" if (fig.image_mode === 'full') {\n",
" // Full images could contain transparency (where diff images\n",
" // almost always do), so we need to clear the canvas so that\n",
" // there is no ghosting.\n",
" fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
" }\n",
" fig.context.drawImage(fig.imageObj, 0, 0);\n",
" };\n",
"\n",
" this.imageObj.onunload = function () {\n",
" fig.ws.close();\n",
" };\n",
"\n",
" this.ws.onmessage = this._make_on_message_function(this);\n",
"\n",
" this.ondownload = ondownload;\n",
"};\n",
"\n",
"mpl.figure.prototype._init_header = function () {\n",
" var titlebar = document.createElement('div');\n",
" titlebar.classList =\n",
" 'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n",
" var titletext = document.createElement('div');\n",
" titletext.classList = 'ui-dialog-title';\n",
" titletext.setAttribute(\n",
" 'style',\n",
" 'width: 100%; text-align: center; padding: 3px;'\n",
" );\n",
" titlebar.appendChild(titletext);\n",
" this.root.appendChild(titlebar);\n",
" this.header = titletext;\n",
"};\n",
"\n",
"mpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n",
"\n",
"mpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n",
"\n",
"mpl.figure.prototype._init_canvas = function () {\n",
" var fig = this;\n",
"\n",
" var canvas_div = (this.canvas_div = document.createElement('div'));\n",
" canvas_div.setAttribute('tabindex', '0');\n",
" canvas_div.setAttribute(\n",
" 'style',\n",
" 'border: 1px solid #ddd;' +\n",
" 'box-sizing: content-box;' +\n",
" 'clear: both;' +\n",
" 'min-height: 1px;' +\n",
" 'min-width: 1px;' +\n",
" 'outline: 0;' +\n",
" 'overflow: hidden;' +\n",
" 'position: relative;' +\n",
" 'resize: both;' +\n",
" 'z-index: 2;'\n",
" );\n",
"\n",
" function on_keyboard_event_closure(name) {\n",
" return function (event) {\n",
" return fig.key_event(event, name);\n",
" };\n",
" }\n",
"\n",
" canvas_div.addEventListener(\n",
" 'keydown',\n",
" on_keyboard_event_closure('key_press')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'keyup',\n",
" on_keyboard_event_closure('key_release')\n",
" );\n",
"\n",
" this._canvas_extra_style(canvas_div);\n",
" this.root.appendChild(canvas_div);\n",
"\n",
" var canvas = (this.canvas = document.createElement('canvas'));\n",
" canvas.classList.add('mpl-canvas');\n",
" canvas.setAttribute(\n",
" 'style',\n",
" 'box-sizing: content-box;' +\n",
" 'pointer-events: none;' +\n",
" 'position: relative;' +\n",
" 'z-index: 0;'\n",
" );\n",
"\n",
" this.context = canvas.getContext('2d');\n",
"\n",
" var backingStore =\n",
" this.context.backingStorePixelRatio ||\n",
" this.context.webkitBackingStorePixelRatio ||\n",
" this.context.mozBackingStorePixelRatio ||\n",
" this.context.msBackingStorePixelRatio ||\n",
" this.context.oBackingStorePixelRatio ||\n",
" this.context.backingStorePixelRatio ||\n",
" 1;\n",
"\n",
" this.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
"\n",
" var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n",
" 'canvas'\n",
" ));\n",
" rubberband_canvas.setAttribute(\n",
" 'style',\n",
" 'box-sizing: content-box;' +\n",
" 'left: 0;' +\n",
" 'pointer-events: none;' +\n",
" 'position: absolute;' +\n",
" 'top: 0;' +\n",
" 'z-index: 1;'\n",
" );\n",
"\n",
" // Apply a ponyfill if ResizeObserver is not implemented by browser.\n",
" if (this.ResizeObserver === undefined) {\n",
" if (window.ResizeObserver !== undefined) {\n",
" this.ResizeObserver = window.ResizeObserver;\n",
" } else {\n",
" var obs = _JSXTOOLS_RESIZE_OBSERVER({});\n",
" this.ResizeObserver = obs.ResizeObserver;\n",
" }\n",
" }\n",
"\n",
" this.resizeObserverInstance = new this.ResizeObserver(function (entries) {\n",
" var nentries = entries.length;\n",
" for (var i = 0; i < nentries; i++) {\n",
" var entry = entries[i];\n",
" var width, height;\n",
" if (entry.contentBoxSize) {\n",
" if (entry.contentBoxSize instanceof Array) {\n",
" // Chrome 84 implements new version of spec.\n",
" width = entry.contentBoxSize[0].inlineSize;\n",
" height = entry.contentBoxSize[0].blockSize;\n",
" } else {\n",
" // Firefox implements old version of spec.\n",
" width = entry.contentBoxSize.inlineSize;\n",
" height = entry.contentBoxSize.blockSize;\n",
" }\n",
" } else {\n",
" // Chrome <84 implements even older version of spec.\n",
" width = entry.contentRect.width;\n",
" height = entry.contentRect.height;\n",
" }\n",
"\n",
" // Keep the size of the canvas and rubber band canvas in sync with\n",
" // the canvas container.\n",
" if (entry.devicePixelContentBoxSize) {\n",
" // Chrome 84 implements new version of spec.\n",
" canvas.setAttribute(\n",
" 'width',\n",
" entry.devicePixelContentBoxSize[0].inlineSize\n",
" );\n",
" canvas.setAttribute(\n",
" 'height',\n",
" entry.devicePixelContentBoxSize[0].blockSize\n",
" );\n",
" } else {\n",
" canvas.setAttribute('width', width * fig.ratio);\n",
" canvas.setAttribute('height', height * fig.ratio);\n",
" }\n",
" /* This rescales the canvas back to display pixels, so that it\n",
" * appears correct on HiDPI screens. */\n",
" canvas.style.width = width + 'px';\n",
" canvas.style.height = height + 'px';\n",
"\n",
" rubberband_canvas.setAttribute('width', width);\n",
" rubberband_canvas.setAttribute('height', height);\n",
"\n",
" // And update the size in Python. We ignore the initial 0/0 size\n",
" // that occurs as the element is placed into the DOM, which should\n",
" // otherwise not happen due to the minimum size styling.\n",
" if (fig.ws.readyState == 1 && width != 0 && height != 0) {\n",
" fig.request_resize(width, height);\n",
" }\n",
" }\n",
" });\n",
" this.resizeObserverInstance.observe(canvas_div);\n",
"\n",
" function on_mouse_event_closure(name) {\n",
" /* User Agent sniffing is bad, but WebKit is busted:\n",
" * https://bugs.webkit.org/show_bug.cgi?id=144526\n",
" * https://bugs.webkit.org/show_bug.cgi?id=181818\n",
" * The worst that happens here is that they get an extra browser\n",
" * selection when dragging, if this check fails to catch them.\n",
" */\n",
" var UA = navigator.userAgent;\n",
" var isWebKit = /AppleWebKit/.test(UA) && !/Chrome/.test(UA);\n",
" if(isWebKit) {\n",
" return function (event) {\n",
" /* This prevents the web browser from automatically changing to\n",
" * the text insertion cursor when the button is pressed. We\n",
" * want to control all of the cursor setting manually through\n",
" * the 'cursor' event from matplotlib */\n",
" event.preventDefault()\n",
" return fig.mouse_event(event, name);\n",
" };\n",
" } else {\n",
" return function (event) {\n",
" return fig.mouse_event(event, name);\n",
" };\n",
" }\n",
" }\n",
"\n",
" canvas_div.addEventListener(\n",
" 'mousedown',\n",
" on_mouse_event_closure('button_press')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'mouseup',\n",
" on_mouse_event_closure('button_release')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'dblclick',\n",
" on_mouse_event_closure('dblclick')\n",
" );\n",
" // Throttle sequential mouse events to 1 every 20ms.\n",
" canvas_div.addEventListener(\n",
" 'mousemove',\n",
" on_mouse_event_closure('motion_notify')\n",
" );\n",
"\n",
" canvas_div.addEventListener(\n",
" 'mouseenter',\n",
" on_mouse_event_closure('figure_enter')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'mouseleave',\n",
" on_mouse_event_closure('figure_leave')\n",
" );\n",
"\n",
" canvas_div.addEventListener('wheel', function (event) {\n",
" if (event.deltaY < 0) {\n",
" event.step = 1;\n",
" } else {\n",
" event.step = -1;\n",
" }\n",
" on_mouse_event_closure('scroll')(event);\n",
" });\n",
"\n",
" canvas_div.appendChild(canvas);\n",
" canvas_div.appendChild(rubberband_canvas);\n",
"\n",
" this.rubberband_context = rubberband_canvas.getContext('2d');\n",
" this.rubberband_context.strokeStyle = '#000000';\n",
"\n",
" this._resize_canvas = function (width, height, forward) {\n",
" if (forward) {\n",
" canvas_div.style.width = width + 'px';\n",
" canvas_div.style.height = height + 'px';\n",
" }\n",
" };\n",
"\n",
" // Disable right mouse context menu.\n",
" canvas_div.addEventListener('contextmenu', function (_e) {\n",
" event.preventDefault();\n",
" return false;\n",
" });\n",
"\n",
" function set_focus() {\n",
" canvas.focus();\n",
" canvas_div.focus();\n",
" }\n",
"\n",
" window.setTimeout(set_focus, 100);\n",
"};\n",
"\n",
"mpl.figure.prototype._init_toolbar = function () {\n",
" var fig = this;\n",
"\n",
" var toolbar = document.createElement('div');\n",
" toolbar.classList = 'mpl-toolbar';\n",
" this.root.appendChild(toolbar);\n",
"\n",
" function on_click_closure(name) {\n",
" return function (_event) {\n",
" return fig.toolbar_button_onclick(name);\n",
" };\n",
" }\n",
"\n",
" function on_mouseover_closure(tooltip) {\n",
" return function (event) {\n",
" if (!event.currentTarget.disabled) {\n",
" return fig.toolbar_button_onmouseover(tooltip);\n",
" }\n",
" };\n",
" }\n",
"\n",
" fig.buttons = {};\n",
" var buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'mpl-button-group';\n",
" for (var toolbar_ind in mpl.toolbar_items) {\n",
" var name = mpl.toolbar_items[toolbar_ind][0];\n",
" var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
" var image = mpl.toolbar_items[toolbar_ind][2];\n",
" var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
"\n",
" if (!name) {\n",
" /* Instead of a spacer, we start a new button group. */\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
" buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'mpl-button-group';\n",
" continue;\n",
" }\n",
"\n",
" var button = (fig.buttons[name] = document.createElement('button'));\n",
" button.classList = 'mpl-widget';\n",
" button.setAttribute('role', 'button');\n",
" button.setAttribute('aria-disabled', 'false');\n",
" button.addEventListener('click', on_click_closure(method_name));\n",
" button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
"\n",
" var icon_img = document.createElement('img');\n",
" icon_img.src = '_images/' + image + '.png';\n",
" icon_img.srcset = '_images/' + image + '_large.png 2x';\n",
" icon_img.alt = tooltip;\n",
" button.appendChild(icon_img);\n",
"\n",
" buttonGroup.appendChild(button);\n",
" }\n",
"\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
"\n",
" var fmt_picker = document.createElement('select');\n",
" fmt_picker.classList = 'mpl-widget';\n",
" toolbar.appendChild(fmt_picker);\n",
" this.format_dropdown = fmt_picker;\n",
"\n",
" for (var ind in mpl.extensions) {\n",
" var fmt = mpl.extensions[ind];\n",
" var option = document.createElement('option');\n",
" option.selected = fmt === mpl.default_extension;\n",
" option.innerHTML = fmt;\n",
" fmt_picker.appendChild(option);\n",
" }\n",
"\n",
" var status_bar = document.createElement('span');\n",
" status_bar.classList = 'mpl-message';\n",
" toolbar.appendChild(status_bar);\n",
" this.message = status_bar;\n",
"};\n",
"\n",
"mpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\n",
" // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
" // which will in turn request a refresh of the image.\n",
" this.send_message('resize', { width: x_pixels, height: y_pixels });\n",
"};\n",
"\n",
"mpl.figure.prototype.send_message = function (type, properties) {\n",
" properties['type'] = type;\n",
" properties['figure_id'] = this.id;\n",
" this.ws.send(JSON.stringify(properties));\n",
"};\n",
"\n",
"mpl.figure.prototype.send_draw_message = function () {\n",
" if (!this.waiting) {\n",
" this.waiting = true;\n",
" this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
" var format_dropdown = fig.format_dropdown;\n",
" var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
" fig.ondownload(fig, format);\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_resize = function (fig, msg) {\n",
" var size = msg['size'];\n",
" if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\n",
" fig._resize_canvas(size[0], size[1], msg['forward']);\n",
" fig.send_message('refresh', {});\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_rubberband = function (fig, msg) {\n",
" var x0 = msg['x0'] / fig.ratio;\n",
" var y0 = (fig.canvas.height - msg['y0']) / fig.ratio;\n",
" var x1 = msg['x1'] / fig.ratio;\n",
" var y1 = (fig.canvas.height - msg['y1']) / fig.ratio;\n",
" x0 = Math.floor(x0) + 0.5;\n",
" y0 = Math.floor(y0) + 0.5;\n",
" x1 = Math.floor(x1) + 0.5;\n",
" y1 = Math.floor(y1) + 0.5;\n",
" var min_x = Math.min(x0, x1);\n",
" var min_y = Math.min(y0, y1);\n",
" var width = Math.abs(x1 - x0);\n",
" var height = Math.abs(y1 - y0);\n",
"\n",
" fig.rubberband_context.clearRect(\n",
" 0,\n",
" 0,\n",
" fig.canvas.width / fig.ratio,\n",
" fig.canvas.height / fig.ratio\n",
" );\n",
"\n",
" fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_figure_label = function (fig, msg) {\n",
" // Updates the figure title.\n",
" fig.header.textContent = msg['label'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_cursor = function (fig, msg) {\n",
" fig.canvas_div.style.cursor = msg['cursor'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_message = function (fig, msg) {\n",
" fig.message.textContent = msg['message'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_draw = function (fig, _msg) {\n",
" // Request the server to send over a new figure.\n",
" fig.send_draw_message();\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_image_mode = function (fig, msg) {\n",
" fig.image_mode = msg['mode'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_history_buttons = function (fig, msg) {\n",
" for (var key in msg) {\n",
" if (!(key in fig.buttons)) {\n",
" continue;\n",
" }\n",
" fig.buttons[key].disabled = !msg[key];\n",
" fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\n",
" if (msg['mode'] === 'PAN') {\n",
" fig.buttons['Pan'].classList.add('active');\n",
" fig.buttons['Zoom'].classList.remove('active');\n",
" } else if (msg['mode'] === 'ZOOM') {\n",
" fig.buttons['Pan'].classList.remove('active');\n",
" fig.buttons['Zoom'].classList.add('active');\n",
" } else {\n",
" fig.buttons['Pan'].classList.remove('active');\n",
" fig.buttons['Zoom'].classList.remove('active');\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.updated_canvas_event = function () {\n",
" // Called whenever the canvas gets updated.\n",
" this.send_message('ack', {});\n",
"};\n",
"\n",
"// A function to construct a web socket function for onmessage handling.\n",
"// Called in the figure constructor.\n",
"mpl.figure.prototype._make_on_message_function = function (fig) {\n",
" return function socket_on_message(evt) {\n",
" if (evt.data instanceof Blob) {\n",
" var img = evt.data;\n",
" if (img.type !== 'image/png') {\n",
" /* FIXME: We get \"Resource interpreted as Image but\n",
" * transferred with MIME type text/plain:\" errors on\n",
" * Chrome. But how to set the MIME type? It doesn't seem\n",
" * to be part of the websocket stream */\n",
" img.type = 'image/png';\n",
" }\n",
"\n",
" /* Free the memory for the previous frames */\n",
" if (fig.imageObj.src) {\n",
" (window.URL || window.webkitURL).revokeObjectURL(\n",
" fig.imageObj.src\n",
" );\n",
" }\n",
"\n",
" fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
" img\n",
" );\n",
" fig.updated_canvas_event();\n",
" fig.waiting = false;\n",
" return;\n",
" } else if (\n",
" typeof evt.data === 'string' &&\n",
" evt.data.slice(0, 21) === 'data:image/png;base64'\n",
" ) {\n",
" fig.imageObj.src = evt.data;\n",
" fig.updated_canvas_event();\n",
" fig.waiting = false;\n",
" return;\n",
" }\n",
"\n",
" var msg = JSON.parse(evt.data);\n",
" var msg_type = msg['type'];\n",
"\n",
" // Call the \"handle_{type}\" callback, which takes\n",
" // the figure and JSON message as its only arguments.\n",
" try {\n",
" var callback = fig['handle_' + msg_type];\n",
" } catch (e) {\n",
" console.log(\n",
" \"No handler for the '\" + msg_type + \"' message type: \",\n",
" msg\n",
" );\n",
" return;\n",
" }\n",
"\n",
" if (callback) {\n",
" try {\n",
" // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
" callback(fig, msg);\n",
" } catch (e) {\n",
" console.log(\n",
" \"Exception inside the 'handler_\" + msg_type + \"' callback:\",\n",
" e,\n",
" e.stack,\n",
" msg\n",
" );\n",
" }\n",
" }\n",
" };\n",
"};\n",
"\n",
"\n",
"/*\n",
" * return a copy of an object with only non-object keys\n",
" * we need this to avoid circular references\n",
" * https://stackoverflow.com/a/24161582/3208463\n",
" */\n",
"function simpleKeys(original) {\n",
" return Object.keys(original).reduce(function (obj, key) {\n",
" if (typeof original[key] !== 'object') {\n",
" obj[key] = original[key];\n",
" }\n",
" return obj;\n",
" }, {});\n",
"}\n",
"\n",
"mpl.figure.prototype.mouse_event = function (event, name) {\n",
" if (name === 'button_press') {\n",
" this.canvas.focus();\n",
" this.canvas_div.focus();\n",
" }\n",
"\n",
" // from https://stackoverflow.com/q/1114465\n",
" var boundingRect = this.canvas.getBoundingClientRect();\n",
" var x = (event.clientX - boundingRect.left) * this.ratio;\n",
" var y = (event.clientY - boundingRect.top) * this.ratio;\n",
"\n",
" this.send_message(name, {\n",
" x: x,\n",
" y: y,\n",
" button: event.button,\n",
" step: event.step,\n",
" guiEvent: simpleKeys(event),\n",
" });\n",
"\n",
" return false;\n",
"};\n",
"\n",
"mpl.figure.prototype._key_event_extra = function (_event, _name) {\n",
" // Handle any extra behaviour associated with a key event\n",
"};\n",
"\n",
"mpl.figure.prototype.key_event = function (event, name) {\n",
" // Prevent repeat events\n",
" if (name === 'key_press') {\n",
" if (event.key === this._key) {\n",
" return;\n",
" } else {\n",
" this._key = event.key;\n",
" }\n",
" }\n",
" if (name === 'key_release') {\n",
" this._key = null;\n",
" }\n",
"\n",
" var value = '';\n",
" if (event.ctrlKey && event.key !== 'Control') {\n",
" value += 'ctrl+';\n",
" }\n",
" else if (event.altKey && event.key !== 'Alt') {\n",
" value += 'alt+';\n",
" }\n",
" else if (event.shiftKey && event.key !== 'Shift') {\n",
" value += 'shift+';\n",
" }\n",
"\n",
" value += 'k' + event.key;\n",
"\n",
" this._key_event_extra(event, name);\n",
"\n",
" this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\n",
" return false;\n",
"};\n",
"\n",
"mpl.figure.prototype.toolbar_button_onclick = function (name) {\n",
" if (name === 'download') {\n",
" this.handle_save(this, null);\n",
" } else {\n",
" this.send_message('toolbar_button', { name: name });\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n",
" this.message.textContent = tooltip;\n",
"};\n",
"\n",
"///////////////// REMAINING CONTENT GENERATED BY embed_js.py /////////////////\n",
"// prettier-ignore\n",
"var _JSXTOOLS_RESIZE_OBSERVER=function(A){var t,i=new WeakMap,n=new WeakMap,a=new WeakMap,r=new WeakMap,o=new Set;function s(e){if(!(this instanceof s))throw new TypeError(\"Constructor requires 'new' operator\");i.set(this,e)}function h(){throw new TypeError(\"Function is not a constructor\")}function c(e,t,i,n){e=0 in arguments?Number(arguments[0]):0,t=1 in arguments?Number(arguments[1]):0,i=2 in arguments?Number(arguments[2]):0,n=3 in arguments?Number(arguments[3]):0,this.right=(this.x=this.left=e)+(this.width=i),this.bottom=(this.y=this.top=t)+(this.height=n),Object.freeze(this)}function d(){t=requestAnimationFrame(d);var s=new WeakMap,p=new Set;o.forEach((function(t){r.get(t).forEach((function(i){var r=t instanceof window.SVGElement,o=a.get(t),d=r?0:parseFloat(o.paddingTop),f=r?0:parseFloat(o.paddingRight),l=r?0:parseFloat(o.paddingBottom),u=r?0:parseFloat(o.paddingLeft),g=r?0:parseFloat(o.borderTopWidth),m=r?0:parseFloat(o.borderRightWidth),w=r?0:parseFloat(o.borderBottomWidth),b=u+f,F=d+l,v=(r?0:parseFloat(o.borderLeftWidth))+m,W=g+w,y=r?0:t.offsetHeight-W-t.clientHeight,E=r?0:t.offsetWidth-v-t.clientWidth,R=b+v,z=F+W,M=r?t.width:parseFloat(o.width)-R-E,O=r?t.height:parseFloat(o.height)-z-y;if(n.has(t)){var k=n.get(t);if(k[0]===M&&k[1]===O)return}n.set(t,[M,O]);var S=Object.create(h.prototype);S.target=t,S.contentRect=new c(u,d,M,O),s.has(i)||(s.set(i,[]),p.add(i)),s.get(i).push(S)}))})),p.forEach((function(e){i.get(e).call(e,s.get(e),e)}))}return s.prototype.observe=function(i){if(i instanceof window.Element){r.has(i)||(r.set(i,new Set),o.add(i),a.set(i,window.getComputedStyle(i)));var n=r.get(i);n.has(this)||n.add(this),cancelAnimationFrame(t),t=requestAnimationFrame(d)}},s.prototype.unobserve=function(i){if(i instanceof window.Element&&r.has(i)){var n=r.get(i);n.has(this)&&(n.delete(this),n.size||(r.delete(i),o.delete(i))),n.size||r.delete(i),o.size||cancelAnimationFrame(t)}},A.DOMRectReadOnly=c,A.ResizeObserver=s,A.ResizeObserverEntry=h,A}; // eslint-disable-line\n",
"mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis\", \"fa fa-square-o\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o\", \"download\"]];\n",
"\n",
"mpl.extensions = [\"eps\", \"jpeg\", \"pgf\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\", \"webp\"];\n",
"\n",
"mpl.default_extension = \"png\";/* global mpl */\n",
"\n",
"var comm_websocket_adapter = function (comm) {\n",
" // Create a \"websocket\"-like object which calls the given IPython comm\n",
" // object with the appropriate methods. Currently this is a non binary\n",
" // socket, so there is still some room for performance tuning.\n",
" var ws = {};\n",
"\n",
" ws.binaryType = comm.kernel.ws.binaryType;\n",
" ws.readyState = comm.kernel.ws.readyState;\n",
" function updateReadyState(_event) {\n",
" if (comm.kernel.ws) {\n",
" ws.readyState = comm.kernel.ws.readyState;\n",
" } else {\n",
" ws.readyState = 3; // Closed state.\n",
" }\n",
" }\n",
" comm.kernel.ws.addEventListener('open', updateReadyState);\n",
" comm.kernel.ws.addEventListener('close', updateReadyState);\n",
" comm.kernel.ws.addEventListener('error', updateReadyState);\n",
"\n",
" ws.close = function () {\n",
" comm.close();\n",
" };\n",
" ws.send = function (m) {\n",
" //console.log('sending', m);\n",
" comm.send(m);\n",
" };\n",
" // Register the callback with on_msg.\n",
" comm.on_msg(function (msg) {\n",
" //console.log('receiving', msg['content']['data'], msg);\n",
" var data = msg['content']['data'];\n",
" if (data['blob'] !== undefined) {\n",
" data = {\n",
" data: new Blob(msg['buffers'], { type: data['blob'] }),\n",
" };\n",
" }\n",
" // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
" ws.onmessage(data);\n",
" });\n",
" return ws;\n",
"};\n",
"\n",
"mpl.mpl_figure_comm = function (comm, msg) {\n",
" // This is the function which gets called when the mpl process\n",
" // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
"\n",
" var id = msg.content.data.id;\n",
" // Get hold of the div created by the display call when the Comm\n",
" // socket was opened in Python.\n",
" var element = document.getElementById(id);\n",
" var ws_proxy = comm_websocket_adapter(comm);\n",
"\n",
" function ondownload(figure, _format) {\n",
" window.open(figure.canvas.toDataURL());\n",
" }\n",
"\n",
" var fig = new mpl.figure(id, ws_proxy, ondownload, element);\n",
"\n",
" // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
" // web socket which is closed, not our websocket->open comm proxy.\n",
" ws_proxy.onopen();\n",
"\n",
" fig.parent_element = element;\n",
" fig.cell_info = mpl.find_output_cell(\"\");\n",
" if (!fig.cell_info) {\n",
" console.error('Failed to find cell for figure', id, fig);\n",
" return;\n",
" }\n",
" fig.cell_info[0].output_area.element.on(\n",
" 'cleared',\n",
" { fig: fig },\n",
" fig._remove_fig_handler\n",
" );\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_close = function (fig, msg) {\n",
" var width = fig.canvas.width / fig.ratio;\n",
" fig.cell_info[0].output_area.element.off(\n",
" 'cleared',\n",
" fig._remove_fig_handler\n",
" );\n",
" fig.resizeObserverInstance.unobserve(fig.canvas_div);\n",
"\n",
" // Update the output cell to use the data from the current canvas.\n",
" fig.push_to_output();\n",
" var dataURL = fig.canvas.toDataURL();\n",
" // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
" // the notebook keyboard shortcuts fail.\n",
" IPython.keyboard_manager.enable();\n",
" fig.parent_element.innerHTML =\n",
" '';\n",
" fig.close_ws(fig, msg);\n",
"};\n",
"\n",
"mpl.figure.prototype.close_ws = function (fig, msg) {\n",
" fig.send_message('closing', msg);\n",
" // fig.ws.close()\n",
"};\n",
"\n",
"mpl.figure.prototype.push_to_output = function (_remove_interactive) {\n",
" // Turn the data on the canvas into data in the output cell.\n",
" var width = this.canvas.width / this.ratio;\n",
" var dataURL = this.canvas.toDataURL();\n",
" this.cell_info[1]['text/html'] =\n",
" '';\n",
"};\n",
"\n",
"mpl.figure.prototype.updated_canvas_event = function () {\n",
" // Tell IPython that the notebook contents must change.\n",
" IPython.notebook.set_dirty(true);\n",
" this.send_message('ack', {});\n",
" var fig = this;\n",
" // Wait a second, then push the new image to the DOM so\n",
" // that it is saved nicely (might be nice to debounce this).\n",
" setTimeout(function () {\n",
" fig.push_to_output();\n",
" }, 1000);\n",
"};\n",
"\n",
"mpl.figure.prototype._init_toolbar = function () {\n",
" var fig = this;\n",
"\n",
" var toolbar = document.createElement('div');\n",
" toolbar.classList = 'btn-toolbar';\n",
" this.root.appendChild(toolbar);\n",
"\n",
" function on_click_closure(name) {\n",
" return function (_event) {\n",
" return fig.toolbar_button_onclick(name);\n",
" };\n",
" }\n",
"\n",
" function on_mouseover_closure(tooltip) {\n",
" return function (event) {\n",
" if (!event.currentTarget.disabled) {\n",
" return fig.toolbar_button_onmouseover(tooltip);\n",
" }\n",
" };\n",
" }\n",
"\n",
" fig.buttons = {};\n",
" var buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'btn-group';\n",
" var button;\n",
" for (var toolbar_ind in mpl.toolbar_items) {\n",
" var name = mpl.toolbar_items[toolbar_ind][0];\n",
" var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
" var image = mpl.toolbar_items[toolbar_ind][2];\n",
" var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
"\n",
" if (!name) {\n",
" /* Instead of a spacer, we start a new button group. */\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
" buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'btn-group';\n",
" continue;\n",
" }\n",
"\n",
" button = fig.buttons[name] = document.createElement('button');\n",
" button.classList = 'btn btn-default';\n",
" button.href = '#';\n",
" button.title = name;\n",
" button.innerHTML = '';\n",
" button.addEventListener('click', on_click_closure(method_name));\n",
" button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
" buttonGroup.appendChild(button);\n",
" }\n",
"\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
"\n",
" // Add the status bar.\n",
" var status_bar = document.createElement('span');\n",
" status_bar.classList = 'mpl-message pull-right';\n",
" toolbar.appendChild(status_bar);\n",
" this.message = status_bar;\n",
"\n",
" // Add the close button to the window.\n",
" var buttongrp = document.createElement('div');\n",
" buttongrp.classList = 'btn-group inline pull-right';\n",
" button = document.createElement('button');\n",
" button.classList = 'btn btn-mini btn-primary';\n",
" button.href = '#';\n",
" button.title = 'Stop Interaction';\n",
" button.innerHTML = '';\n",
" button.addEventListener('click', function (_evt) {\n",
" fig.handle_close(fig, {});\n",
" });\n",
" button.addEventListener(\n",
" 'mouseover',\n",
" on_mouseover_closure('Stop Interaction')\n",
" );\n",
" buttongrp.appendChild(button);\n",
" var titlebar = this.root.querySelector('.ui-dialog-titlebar');\n",
" titlebar.insertBefore(buttongrp, titlebar.firstChild);\n",
"};\n",
"\n",
"mpl.figure.prototype._remove_fig_handler = function (event) {\n",
" var fig = event.data.fig;\n",
" if (event.target !== this) {\n",
" // Ignore bubbled events from children.\n",
" return;\n",
" }\n",
" fig.close_ws(fig, {});\n",
"};\n",
"\n",
"mpl.figure.prototype._root_extra_style = function (el) {\n",
" el.style.boxSizing = 'content-box'; // override notebook setting of border-box.\n",
"};\n",
"\n",
"mpl.figure.prototype._canvas_extra_style = function (el) {\n",
" // this is important to make the div 'focusable\n",
" el.setAttribute('tabindex', 0);\n",
" // reach out to IPython and tell the keyboard manager to turn it's self\n",
" // off when our div gets focus\n",
"\n",
" // location in version 3\n",
" if (IPython.notebook.keyboard_manager) {\n",
" IPython.notebook.keyboard_manager.register_events(el);\n",
" } else {\n",
" // location in version 2\n",
" IPython.keyboard_manager.register_events(el);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype._key_event_extra = function (event, _name) {\n",
" // Check for shift+enter\n",
" if (event.shiftKey && event.which === 13) {\n",
" this.canvas_div.blur();\n",
" // select the cell after this one\n",
" var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
" IPython.notebook.select(index + 1);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
" fig.ondownload(fig, null);\n",
"};\n",
"\n",
"mpl.find_output_cell = function (html_output) {\n",
" // Return the cell and output element which can be found *uniquely* in the notebook.\n",
" // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
" // IPython event is triggered only after the cells have been serialised, which for\n",
" // our purposes (turning an active figure into a static one), is too late.\n",
" var cells = IPython.notebook.get_cells();\n",
" var ncells = cells.length;\n",
" for (var i = 0; i < ncells; i++) {\n",
" var cell = cells[i];\n",
" if (cell.cell_type === 'code') {\n",
" for (var j = 0; j < cell.output_area.outputs.length; j++) {\n",
" var data = cell.output_area.outputs[j];\n",
" if (data.data) {\n",
" // IPython >= 3 moved mimebundle to data attribute of output\n",
" data = data.data;\n",
" }\n",
" if (data['text/html'] === html_output) {\n",
" return [cell, data, j];\n",
" }\n",
" }\n",
" }\n",
" }\n",
"};\n",
"\n",
"// Register the function which deals with the matplotlib target/channel.\n",
"// The kernel may be null if the page has been refreshed.\n",
"if (IPython.notebook.kernel !== null) {\n",
" IPython.notebook.kernel.comm_manager.register_target(\n",
" 'matplotlib',\n",
" mpl.mpl_figure_comm\n",
" );\n",
"}\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"3 [1, '', '93f549c401bebe4f86ef23626e0fed3d06183b02']\n",
"5555555 [1, '555555555555555555', '93f549c401bebe4f86ef23626e0fed3d06183b02']\n",
"name.utf8 [1, 'Connections', 'a23296ce90328791cb6974cf6f6306da4dd89735']\n",
"unique_torrent [1, 1, '2c3ea79de0771079e41fc25f4cabf23e11041829']\n",
"www.baidu.com [1, 'www.baidu.com', '43b238596c66575e7dfcd4d5b1d0fadb6c393adc']\n",
"entropy [1, 1460043970, '0635e6c7d348c2603501e9fa53e4cf07f9e31b5e']\n",
"license [1, OrderedDict([(b'creative-commons', OrderedDict([(b'attributionAuthor', b'Dave Doobie Aaron'), (b'attributionTitle', b'Doobie'), (b'attributionUrl', b'http://fb.com/doobiebrooklyn'), (b'licenseUrl', b'http://creativecommons.org/licenses/by-nc/4.0/')]))]), '1d670c41fd340c8ee280157400744402740fc1fd']\n",
"还 [1, '百度', '647e1210953d6080f714f0f8dabffe6ee9852800']\n",
" [2, 1, 'fa6fbc7d7796e49fbdf47731fe06a6e20ee74bb5']\n",
"abc [2, 'abc', '9c8047972d058dee41bab8ab68ad5da7c24275ed']\n",
"nnm-club_cool [3, 1, '57f6facb1bcef159b8075b578053fb4790e0c8d5']\n",
"x-amz-bucket [5, 'quranwave', '3af8e25c9eeca9402351820d8681fe0945c63cdb']\n",
"x-amz-key [5, 'torrent/70.zip', '3af8e25c9eeca9402351820d8681fe0945c63cdb']\n",
"tracker [6, '', 'e8ca2609b174df7b5c26538fb6f96d77a367da42']\n",
"attr [11, 'h', 'c9a279c4dff3b38ef806abb98515382798907654']\n",
"comment [11, 'Torrent downloaded from torrent cache at http://torcache.net/', 'e92cd8e1ed1defad6d5211a42d2dbdf1e368b834']\n",
"unique [11, 'fbvPqZTXkKQzRJzy6LXkdIp3iJoTNe', '3a84117d98683bd4a657a37932886d206486c11e']\n",
"sha256 [12, b'\\xfe\\x01\\x01\\xa4\\xf5Z\\xcd\\xa4\\xd9\\t\\x7f\\x8d\\x1c\\x9d\\x1a\\x89\\xdcV\\x9e\\x92\\xd6A\\xbf\\xf9\\x81\\x9a\\xea^\\xc8\\xcfT\\xcf', '1c565cb3249a8da64dbf7a82b3ed39e637e6e239']\n",
"creation date [39, 1400017482, '4488d559d4404875022d53c6039b0025c947ac84']\n",
"md5sum [39, 'e27e7b621f0adbcf072e4f13d78c4fc8', 'ef0c6b03d16457e1134bc63c18d527221639da8e']\n",
"cross_seed_entry [44, '02e940fec782a353d2e767cecde08041', 'b7c0ac4a9834c8e39f543f3f721eb90fbb58e179']\n",
"sha1 [72, b'\\xbe^\\xdc\\xd8\\x99\\x98\\xf0\\xe8_\\x8d\\xcbZ\\xc7\\xd21\\t`\\xec\\x9c\\xee', 'b4bf549d9d48bce1c1e026ff451ee76069b98c00']\n",
"file tree [81, OrderedDict([(b'01 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 306045), (b'pieces root', b'\\xc6\\xaa\\xb3/\\x00\\xb3\\xe8V\\xc8\\xc2\\xa7\\xdd\\xe9\\x1b\\x8c\\xe4\\x80\\x91\\xa6\\x0e\\x9c\\xfe\\x92\\x0eck<\\xca\\x02\\x9b\\xdam')]))])), (b'02 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 11369005), (b'pieces root', b'\\xd9=I\\xd6\\x8cN\\x17tch:Si\\xb1\\x12a9h1\\xf3\\x0b\\x06\\x8f\\xe5q\\xab\\xb7\\x00\\x18O\\xe2\\xac')]))])), (b'03 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 18234404), (b'pieces root', b'3\\xb4\\xf0\\xbc\\x80\\xb5\\xa2\\x14\\xc02\\xf1\\xd4\\xc9\\x95\\xae [\\x07\\x08\\xdc\\x12j\\xcdA\\xa4{\\x9f\\xe3\\xf04g\\x83')]))])), (b'04 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 8120626), (b'pieces root', b'\\xd4\\xbf$\\xadv\\xfb\\xafW\\xa01\\xcf\\xb1\\x83\\xe1\\xecW\\x90\\x01\\xcd\\xd5\\x7f\\xcc\\x02wv\\xcd\\x18\\xda\\xa3\\x00\\x1d\\xdd')]))])), (b'05 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 15192077), (b'pieces root', b'8\\xe3B\\xc5kK\\x18g9\\xaf\\x7f[\\xcf}\\x193\\x8d\\x9d\\xa3\\xdf\\x9c\\xfc\\x04\\x9a5\\x02\\xdf\\xf1\\xc3\\xbd\\xc9\\x02')]))])), (b'06 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 19926721), (b'pieces root', b'\\xb3\\xd90a!a\\x01\\x1aYr\\xf2\\x11\\xb4\\xd5\\xcc\\xe9\\xdb4G\\x8fX9ja\\xf2\\xf8\\x0c\\xb9\\xdbq\\xcdF')]))])), (b'07 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 9389134), (b'pieces root', b'k|\\x0e\\xaf\\n\\xc3&,Z\"\\x95\\xe2\\xa0(\\x83\\xa8\\x91\\x8a\\xdc\\xb3\\xf5\\xebi\\xfbR\\x9b\\xfc\\xe6G.\\xbaC')]))])), (b'08 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 11024608), (b'pieces root', b\"\\xc3,\\xd6/\\xf9F;!'5\\xdbl2\\x94\\xaf\\xf6\\n\\x86\\xc0\\x1b\\x08\\xe5\\t\\x97\\xa7\\x8b\\x04\\xb8\\x82\\xb2\\x87<\")]))])), (b'09 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 18047158), (b'pieces root', b'\\xe1&\\x0f\\x08\\xe4\\xa5|E\\x1e\\x11\\x9a\\xfe\\x9d\\xe5u\\x19\\x86S\\x0b\\x055\\x83\\xfe\\xf0.\\xfd\\xb1\\xf4\\x00\\xaf:\\xd4')]))])), (b'10 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 12329479), (b'pieces root', b'V\\xbf\\x88\\x17\\xb7\\xe3\\xa73\\xfaF-@ut.;\\xf2\\xb0R\\xe7\\xd4J*\\xa6\\xbe\\xa51*\\x8b^\\xc1\\xbd')]))])), (b'11 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 8220520), (b'pieces root', b'\\xd8\\x92bdA]r3&\\x83\\xa1J0\\xc2\\x01,\\x93\\xf6\\xd7\\x1d\\xf5;\\x12\\xfd\\xd5[\\xc9\\x86\\x98\\xa1\\x93\\xc9')]))])), (b'12 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 14647898), (b'pieces root', b\"\\x037\\xe1\\x17\\x02\\xb5\\xe89\\xd1RO\\x94\\t\\x98\\xb7\\x19:\\xbeF\\x13\\x9f\\x88\\xbc\\xbfC\\xdaE\\x82'iD\\xd2\")]))])), (b'13 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 9183082), (b'pieces root', b'\\x1c\\x88\\x18\\x03\\x0e2\\x94\\\\Y\\xb4\\xcb\\x87\\xea\\x9a\\xe9\\xfcj\\xb3z\\xa0\\x1f\"P\\x06*\\xee\\xfa/6\\xb4\\x1eO')]))])), (b'14 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 8584563), (b'pieces root', b\"\\x11\\x88\\xb1\\x80\\xb1\\x9a\\x06t'\\x80\\x15p\\xfa\\x17\\xcf\\xdej\\x93\\x82}%$\\xd49\\xf1\\x7f\\xb1\\x14\\xb1}\\xde\\xe5\")]))])), (b'15 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 8667736), (b'pieces root', b'\\xfb\\x1a\\x130JY\\xc7\\x86\\x07\\x89\\xa8\\xaa\\xc2\\x97\\x0e6(\\xe0\"\\xe7)\\xa0z\\xbb\\x98\\xf2S\\x82\\xd4\\xe1e2')]))])), (b'16 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 8380183), (b'pieces root', b'*\\xe4\\x92\\xc4\\xca.\\xd8\\xc7s\\xa0\\xe7\\x16\\x0f\\xec\\xb5\\xd4\\xc9\\xf8\\x8e,\\x1d\\xc9\\x97\\xad$\\x9d\\xa7\\\\\\x82\\x18\\x80O')]))])), (b'17 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 10952719), (b'pieces root', b'\\xc3s\\x18\\xd5\\xc97\\x19T\\x14[\\xe6\\x98\\x93\\x9b>\\xcb\\x82\\x92\\xa9rgl\\xc2\\xe5ny\\x92\\x0b&]\\xa2\\xcb')]))])), (b'18 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 18408693), (b'pieces root', b'\\xdf\\xe7<\\x94\\x97\\xa5\\x06\\t!\\xc9\\x00I\\\\\\xd9Q\\xffu.u\\xdd\\xae\\xdd\\xe4t\\x04V\\xe9\\xcb\\x84\\xd4\\x0e\\x02')]))])), (b'19 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 17103827), (b'pieces root', b'-\\xda/\\x9e\\xee\\xe50\\xbb\\x8cv\\xdc\\xf99\\xfco;rw\\x9e&\\x13\\xa3\\xd0\\x15\\xd6]\\xbc\\xe6P\\xbd\\xe5\\x95')]))])), (b'20 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 9902808), (b'pieces root', b'J\\xb3\\x7f\\xd1lq\\x8f!\\xce\\xfa\\x9b\\x03\\xb7*\\xbaT\\xfd^\\x83\\xb5\\xd1\\xe1x\\n|I?&\\x7f3\\xf6s')]))])), (b'21 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 16769039), (b'pieces root', b'\"\\xdf\\xf8\\x99&\\xd8\\x81\\xe6HO\\xe2\\xb8L\\xfe\\\\pum\\xca<\\x17\\xd6\\x93\\x9a$\\x989v\\xf3($\\xc4')]))])), (b'22 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 15115177), (b'pieces root', b'n\\xb3+H\\xe9\\xe8b[\\xe7\\xa5\\x18\\x82\\xb1\\x9d49\\xb2 \\x80\\xcb@\\x11\\x9e\\xd0\\xe0\\x10\\x1dx\\x04ki\\xa2')]))])), (b'23 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 11751439), (b'pieces root', b'\\xb8\\x96r\\x8b\\x99\\x08Lc\\xeaa\\n\\xf9m \\xd8\\xd1i\\xc9\\xeb\\xe5=\\xcc\\xbd\\x95\\x86\\x1b~\\x00U\\xa7\\xfe\\xaf')]))])), (b'24 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 10140209), (b'pieces root', b'\\x91\\xdf\\xd9\"\\x9aE1[\\xc4\\xe3;\\xb3\\x13\\x85\\xa0\\xca \\xab\\xf9\\xd6\\xfdG\\xa9\\xeb\\xd4\\xf6Z\\xb5\\xdf\\xad\\x16:')]))])), (b'25 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 9116207), (b'pieces root', b'\\x9c~\\x9c\\x08\\\\f*\\xf85\\xac\\xc8Yh\\xc6\\xdeZ\\xe4\\x85\\xf5l\\x82lc\\xa2\\t\\xdfG\\xc2Isv\\xed')]))])), (b'26 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 16717632), (b'pieces root', b'\\xb7\"1vkY\\xbe\\xcd\\xc6\\xb4Ip\\xb8\\xb1}\\x9e\\x12\\xd9\\x06\\x1d\\xa3b\\x01#\\xbf\\xe3\\xcd\\xea\\xa8\\xb2\\xfc\\xd3')]))])), (b'27 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 12950148), (b'pieces root', b'\\xe3\\x93P\\x959h\\xc1\\xfb\\xa6\\xfe\\xb3\\t\\xc9\\xf96\\xe4\\x93-s\\xd7\\x9cm\\xf6\\x15\\xc4Z\\xddZ4\\xb9\\x97\\\\')]))])), (b'28 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 15921002), (b'pieces root', b'v\\xceh\\x0e\\x9b;\\n\\xb1\\xb0\\xf4\\xf2/7\\xee\\xab\\x9c\\x1boz\\x99y\\xb4\\x1f\\xd0h\\xac\\xdf_ \\xc9\\xc7\\xd1')]))])), (b'29 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 9768641), (b'pieces root', b'\\xc9s}\\xae\\x99S\\xb8\\x83<\\xc6\\xb1\\xd8\\xf7\\xffR\\xa6\\xcbT|\\xeb\\xee\\xdeG\\xfeX*\\xe2\\xc1\\x12\\x90\\xbd\\xd8')]))])), (b'30 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 6324241), (b'pieces root', b'\\x02\\tB\\xed\\x80\\xf9T(\\xd9~\\xed\\xd3(\\xd9\\x90\\xc5\\xac\\xd6\\xc0\\xb0#\\x89O\\x1d\\xcc\\xe2i\\xaa\\xf2\\xa1=|')]))])), (b'31 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 15366368), (b'pieces root', b'm\\xc2\\x90\\x94\\x90\\xf4\\x01\\xef\\xdf\\x82\\xa6\\xc8\\xfe\\xee\\xc7\\x06*1\\xa6\\xc2\\xe1\\x8e9\\xf7\\x10\\xaa\\xf6Ra\\xc6\\x1e\\x06')]))])), (b'32 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 14097446), (b'pieces root', b\"\\xbf\\xe8\\x14\\x15\\x13\\xb1xT\\xef\\x19\\xe5Dmh\\xd48<\\x93$\\xca\\xc9\\x92\\xedX\\x01\\xb4\\xda\\xf1\\xf0\\xd7\\xdc'\")]))])), (b'33 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 8691562), (b'pieces root', b'H\\x12\\x831\\x18MfTp\\xe1!\\xb6\\xaf)3\\xb5\\xfa\\xad\\xaf\\xd6\\xd1\\x94X\\x8a\\xea\\x17\\xc2\\xbb\\xa8\\xda\\xf6\\x16')]))])), (b'34 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 18585492), (b'pieces root', b'\\xd6x\\xafd\\xfc\\xdd\\x9c,\\x95\\xdd>\\xbaE\\x03\\x11\\xbf\\xdb\\x80\\x9a\\x8b?\\x91\\xdf\\xe2o\\xa1\\x7f k3\\xf9}')]))])), (b'35 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 14333175), (b'pieces root', b'\\xe1\\x04\\xa9\\x8ah\\xa6W2\\xd5\\xb7\\xf7\\x11*\\xd0\\x82\\r\\x1b\\x11\\xafq\\\\\\x86C(\\xfa\\x99\\xb3\\xdc]\\xee\\x04\\xf0')]))])), (b'36 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 16783668), (b'pieces root', b'\\x9a\\r\\x10j\\x87Z.g\\x95I+D\\xcd,w\\x83\\xd1F\\x16\\xa7\\xd0\\\\`7\\xfbZ:3\\xa1\\x19%t')]))])), (b'37 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 19032708), (b'pieces root', b'\\x07\\xf9\\xb6\\x9cW\\xbb \\\\0\\xf6B=\\xf74\\xf9\\x1cO\\x0b\\xe6\\x93_\\xe0\\xb1O\\xf2\\x82yL\\xc8\\xdc{\\x8e')]))])), (b'38 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 14793348), (b'pieces root', b'-m\\x9b\\xa0\\x02W,!\\xe2\"Bjb\\xcc\\xe0\\x104\\xb5\\xfen\\xb8\\xed\\xfe\\xda\\xe0\\x1fZr\\x89\\xf5$\\xf6')]))])), (b'39 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 9859340), (b'pieces root', b\"G\\xedO\\x8c\\x80\\xd6\\xf3\\xa1CGP\\x13\\x03\\xc7\\x9fI\\xd7Y\\n\\xf1v\\xd8'\\xb3$9:/a\\tg\\xfa\")]))])), (b'40 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 21681312), (b'pieces root', b' W\\xcd\\xcc\\xb9<\\x11\\xbc\\x0e\\x9e\\xfcm\\x04;\\x98^\\xd8\\xb0QvA\\x1c\\x81&\\xb8\\x16\\xb0+\\x1enB\\xfd')]))])), (b'41 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 13917724), (b'pieces root', b'm\\x7f}\\xbb#\\xb9\\xaf7\\x95\\x94\\x88Y\\xfe<\\x15\\x8a\\x1c\\xa1\\xdd9\\x93nK\\x8b/\\xcchX\\x1d\\xce\\x16\\x95')]))])), (b'42 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 14964290), (b'pieces root', b'Kk]\\xbe\\xef9\\x12\\xe4\\xd4u\\xafaN\\xde\\xfbD\\x80E\\x1a#|o\\xe3\\xb4\\xdd/dvB\\xbd\\xd7u')]))])), (b'43 - King of Alchemy - Simon Archer.mp3', OrderedDict([(b'', OrderedDict([(b'length', 421404), (b'pieces root', b'XE\\xb8\\x05Ih\\x80\\xd2L$j\\xe8\\x88h\\xcd\\x1d\\xafhs\\xa8\\xdd\\xfc\\x08\\xba\\x19\\xb6\\xd4\\xc4I@`\\x92')]))])), (b'Simon Archer - King of Alchemy.m3u', OrderedDict([(b'', OrderedDict([(b'length', 6855), (b'pieces root', b'\\x8e\\x90\\x18t\\x8e\\xe8\\x8f\\x11\\x01EY\\x86\\xac\\xb8\\xa5\\x9d\\xce\\xf0\\xe6\\xf0\\x01k\\xf0\\xcfu]YN\\xf5bv\\x9e')]))]))]), '44b84847f7d829225c788e161017e484526e5259']\n",
"collections [100, [b'org.archive.relaxingsounds'], 'ed7d4e9657cbfcde6baf89ace313ae77a1cefe91']\n",
"meta version [251, 2, '18d35502fca02a30811e4e001809ddd4147167e6']\n",
"filehash [252, b'\\xc9m.\\x93\\xbd\\x18fj:\\xb3${\\x9ak\\x9e\\xdbUI\\xf2\\xb5', '44af4eb9d35b94218b6fe5eb25a30b8e22fa5844']\n",
"ed2k [307, b',\\xf0O\\x9e\\x829\\x8e\\x1b{\\xf58\\xea\\x94\\n\\xe8\\x92', '44af4eb9d35b94218b6fe5eb25a30b8e22fa5844']\n",
"source [737, 'BT世界网 https://www.btsj6.com/', '417ef639eb95fbf68175a6a6b03076f9ee5f5744']\n",
"file-duration [959, [0, 0, 39097], '449a9054916600bc0a395a47c4a2421aa06ad04a']\n",
"file-media [959, [-1, -1, 0], '449a9054916600bc0a395a47c4a2421aa06ad04a']\n",
"profiles [959, [OrderedDict([(b'acodec', b'aac'), (b'height', 0), (b'vcodec', b''), (b'width', 0)])], '449a9054916600bc0a395a47c4a2421aa06ad04a']\n",
"publisher-url.utf-8 [1408, 'http://my155.cc', '4488cffb9ad5afc1174bc96754e9887158ce03eb']\n",
"publisher.utf-8 [1454, '小隻馬', '4488cffb9ad5afc1174bc96754e9887158ce03eb']\n",
"publisher-url [2051, 'http://my155.cc', '4488cffb9ad5afc1174bc96754e9887158ce03eb']\n",
"publisher [2158, '小隻馬', '4488cffb9ad5afc1174bc96754e9887158ce03eb']\n",
"name.utf-8 [2958, '60 Assorted Magazines Collection PDF September 4 2022 Set 3', '449a9e0e7375b6b6b7f55bdd6214f034a2edd4b8']\n",
"private [4420, 0, '449f65629260c258a999e6474f22ae00e83ee47a']\n",
"length [12420, 5209971966, '449a38ef7e042bd2d75e8921aa02f6f244165d9d']\n",
"name [37600, 'Big Buck Bunny', 'dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c']\n",
"piece length [37600, 262144, 'dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c']\n"
]
}
],
"source": [
"s = monotonic()\n",
"keys = {}\n",
"for sha1, torrent in torrents.items():\n",
" for key in torrent.dict.get(b'info').keys():\n",
" if key.decode() not in keys.keys():\n",
" value = torrent.dict.get(b'info').get(key)\n",
" if type(value) is bytes:\n",
" try:\n",
" value = value.decode()\n",
" except UnicodeDecodeError:\n",
" pass\n",
" keys[key.decode()] = [1, value, sha1.hex()]\n",
" else:\n",
" keys[key.decode()][0] += 1\n",
"sort = sorted(keys, key=lambda x: keys[x][0])\n",
"print(monotonic()-s, \"s\", len(keys))\n",
"%matplotlib notebook\n",
"fig, ax = pyplot.subplots();\n",
"ax.barh(sort, [keys[x][0] for x in sort])\n",
"pyplot.xscale(\"log\")\n",
"pyplot.xlabel(\"število pojavitev ključa v slovarju info\")\n",
"fig.show() ## TODO komentiraj\n",
"for i in sort:\n",
" print(i, keys[i])"
]
},
{
"cell_type": "code",
"execution_count": 32,
"id": "fea0f2b6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.07545290817506611 s 92.2872340425532 brez ključa source, publisher ali publisher-url 729 virov\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"PMEDIA | 134 |
\n",
"http://tapochek.net/index.php | 114 |
\n",
"高清下载吧! | 98 |
\n",
"https://FreeCourseWeb.com | 91 |
\n",
"灣搭拉咩拉 | 79 |
\n",
"脫拉庫 | 69 |
\n",
"1024社區最新地址 | 68 |
\n",
"第一會所新片@SIS001 | 64 |
\n",
"大师兄福利网 | 59 |
\n",
"2048 | 56 |
\n",
" | 53 |
\n",
"LostFilm.TV | 50 |
\n",
"[https://tanhuazu.com] 探花族社区 | 37 |
\n",
"RV原创 | 37 |
\n",
"2048核基地 | 37 |
\n",
"https://hjd.tw | 35 |
\n",
"小贾_KTXP | 33 |
\n",
"1024核工厂 | 33 |
\n",
"https://crackshash.com/ | 29 |
\n",
"國產精品 | 28 |
\n",
"https://rh2048.com | 27 |
\n",
"吃雞大神 | 26 |
\n",
"1024社區 | 26 |
\n",
"b48t.com | 25 |
\n",
"麻豆之神 | 24 |
\n",
"欧宝 | 24 |
\n",
"老含及 | 24 |
\n",
"小隻馬 | 20 |
\n",
"@蜂鳥论坛@ | 20 |
\n",
"JAV Torrent 掲示板 | 20 |
\n",
"AV大平台 | 19 |
\n",
"刷刷刷 | 18 |
\n",
"第一會所新片 | 18 |
\n",
"发发发 | 18 |
\n",
"1024 | 17 |
\n",
"1024工厂 | 17 |
\n",
"Weagogo | 16 |
\n",
"hjd.tw | 16 |
\n",
"https://1tors.ru/ | 15 |
\n",
"b'\\xcf\\xeb\\xb7\\xa2\\xc8\\xb4\\xb2\\xbb\\xbb\\xe1' | 14 |
\n",
"olo | 13 |
\n",
"不予 | 13 |
\n",
"老司机论坛 | 13 |
\n",
"小樱 | 12 |
\n",
"xp1024 | 12 |
\n",
"(美女裸聊直播 uur68.com) | 12 |
\n",
"美女裸聊直播 | 11 |
\n",
"發片小王子@18p2p | 11 |
\n",
"b'\\xb3\\xcc\\xb7sAV \\xa4\\xd1\\xaa\\xc5\\xbd\\xd7\\xbe\\xc2 IP' | 11 |
\n",
"BT世界网 https://www.btsj6.com/ | 10 |
\n",
"[animelayer.ru] Animelayer | 10 |
\n",
"nyaa001 | 10 |
\n",
"https://discord.gg/vbJ7RTn | 10 |
\n",
"PiRaX @ TamilBlasters.Net | 10 |
\n",
"orion | 10 |
\n",
"愛在黑夜001 | 10 |
\n",
"b'dioguitar23(\\xb2\\xc4\\xa4\\xbb\\xa4\\xd1\\xc5]\\xa4\\xfd)\\xad\\xec\\xb3\\xd0' | 9 |
\n",
"U6A6磁力搜索---U6A6.COM | 9 |
\n",
"https://infocon.org/ | 9 |
\n",
"约战竞技场 | 9 |
\n",
"xue0117 | 9 |
\n",
"BBVC | 9 |
\n",
"Zelka.ORG | 8 |
\n",
"threesixtyp | 8 |
\n",
"dio88.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 8 |
\n",
"dioguitar23(第六天魔王)@dioguitar23.net | 8 |
\n",
"規懶趴會 | 8 |
\n",
"b'\\xc1\\xf9\\xd4\\xc2\\xc1\\xaa\\xc3\\xcb' | 7 |
\n",
"百撸社区|高清资源 | 7 |
\n",
"Zamunda.NET | 7 |
\n",
"百撸社区 | 7 |
\n",
"www.dio8899.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 7 |
\n",
"K8bet | 6 |
\n",
"cangkong | 6 |
\n",
"[tp.m-team.cc] M-Team - TP | 6 |
\n",
"dioguitar23.co(第六天魔王)@最新AV海量免費播放~魔王在線 | 6 |
\n",
"b'\\xb7\\xf6\\xba~\\xad\\xd1\\xbc\\xd6\\xb3\\xa1 dioguitar23 \\xad\\xec\\xb3\\xd0' | 6 |
\n",
"00armand00 | 6 |
\n",
"6969bt.com | 6 |
\n",
"[https://majomparade.eu] | 6 |
\n",
"鱼香肉丝 | 6 |
\n",
"性吧RV原创 | 5 |
\n",
"Burnbit | 5 |
\n",
"94i88影城-点击跳转 | 5 |
\n",
"♥im520♥ | 5 |
\n",
"arsenal-fan | 5 |
\n",
"[http://x-torrents.org] X-Torrents.org | 5 |
\n",
"1024核工厂/ | 5 |
\n",
"PMEDIA NETWORK | 5 |
\n",
"arsenal-fan@avsp2p.com | 5 |
\n",
"https://www.javhdbbs.com | 5 |
\n",
"dioguitar23(第六天魔王)@mw6.me | 5 |
\n",
"成年人的小游戏 | 5 |
\n",
"Hotaru | 5 |
\n",
"Mp4Ba | 4 |
\n",
"b'\\x9e\\xb3\\xb4\\xee\\xc0\\xad\\xdf\\xe3\\xc0\\xad@kb978.com' | 4 |
\n",
"https://downloadcursos.top/ | 4 |
\n",
"youiv | 4 |
\n",
"rutracker.org | 4 |
\n",
"yoy123 | 4 |
\n",
"olo@SIS001 | 4 |
\n",
"上善若水@www.sexinsex.net | 4 |
\n",
"b'\\xab\\xb0\\xa5\\xab\\xad\\xb7\\xb1\\xa1~\\xc5]\\xa7\\xd9\\xad\\xec\\xb3\\xd0' | 4 |
\n",
"魔王之家 | 4 |
\n",
"杏吧 | 4 |
\n",
"dio66.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 4 |
\n",
"更多精彩!尽在99BT工厂@5120911 | 4 |
\n",
"hotaru | 4 |
\n",
"xueru10405 | 4 |
\n",
"1030社區---1030.ws | 4 |
\n",
"x | 4 |
\n",
"www.crackshash.com | 4 |
\n",
"1stDragon | 4 |
\n",
"buxxa | 4 |
\n",
"www.dio7777.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 4 |
\n",
"BT-btt.com | 4 |
\n",
"kenelm | 4 |
\n",
"HiHBT 精品薈萃 | 4 |
\n",
"m6688.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 3 |
\n",
"杏吧论坛 | 3 |
\n",
"XIU | 3 |
\n",
"atrrea | 3 |
\n",
"1314 | 3 |
\n",
"oldman原創DVD@18p2p.com | 3 |
\n",
"sogood@18p2p | 3 |
\n",
"? nike ? | 3 |
\n",
"https://toonshub.xyz | 3 |
\n",
"https://www.torrentdosfilmes.tv/ | 3 |
\n",
"1024社区 | 3 |
\n",
"dioguitar23(第六天魔王) | 3 |
\n",
"广东雨神 | 3 |
\n",
"RZK | 3 |
\n",
"rxrj | 3 |
\n",
"枫雪动漫 | 3 |
\n",
"YURASUKA | 3 |
\n",
"【神秘巨星CI】 | 3 |
\n",
"GIF出处系列 | 3 |
\n",
"https://www.terralibera.net/ | 3 |
\n",
"dioguitar23@dio66.net | 3 |
\n",
"dioguitar23(第六天魔王)@hotavxxx.com | 3 |
\n",
"萌你一脸@第一会所 | 3 |
\n",
"罗马教皇@草榴社区 luckjam@sexinsex.net | 3 |
\n",
"么么哒 | 3 |
\n",
"XP1024 | 3 |
\n",
"nyaa.si | 3 |
\n",
"uid-346380 | 3 |
\n",
"Download from Sajber.org/blog | 3 |
\n",
"美女裸聊约炮 | 3 |
\n",
"@微信订阅号专注稀有汁源 | 3 |
\n",
"susun=eastv | 3 |
\n",
"M88(明陞) | 3 |
\n",
"rh2048.com/ | 3 |
\n",
"99BT工厂 @ 5120911 | 3 |
\n",
"衣选集团 | 3 |
\n",
"b'\\xc1\\xf9\\xd4\\xc2\\xcc\\xec\\xbf\\xd5' | 3 |
\n",
"【RV原创】【sex8.cc】 | 3 |
\n",
"Gfker@1024核工廠 | 3 |
\n",
"b'99\\xa5\\xfd\\xa5\\xcd' | 3 |
\n",
"漫之学园 | 3 |
\n",
"https://DesignOptimal.com | 3 |
\n",
"9200 | 3 |
\n",
"安西教练 | 3 |
\n",
"尘封追忆+色十八 | 3 |
\n",
"zgome@18p2p | 2 |
\n",
"顶冠文化 | 2 |
\n",
"MN Nambiar @ TamilBlasters.Net | 2 |
\n",
"老司机 | 2 |
\n",
"dioguitar23.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 2 |
\n",
"https://media.defcon.org/ | 2 |
\n",
"https://sexasia.net/feed | 2 |
\n",
"黑色点击 | 2 |
\n",
"http://www.acgyinghua.com/ | 2 |
\n",
"嗨咻阁 | 2 |
\n",
"Lucian2009@第一会所 | 2 |
\n",
"dioguitar23(第六天魔王)@bbs.hotavxxx.com | 2 |
\n",
"roger92402094 | 2 |
\n",
"lxdng1218 | 2 |
\n",
"飘嫖 | 2 |
\n",
"红馆-红人馆-网络红人之家 | 2 |
\n",
"CHANNEL NEO | 2 |
\n",
"ccc32.com | 2 |
\n",
"chikan | 2 |
\n",
"神秘巨星CI | 2 |
\n",
"dioguitar23(第六天魔王)@dio999.com | 2 |
\n",
"注册就送39元,联系:330545486 | 2 |
\n",
"b'\\xb7\\xf6\\xba~\\xad\\xd1\\xbc\\xd6\\xb3\\xa1@\\xb4A\\xab\\xbd\\xa8\\xe0' | 2 |
\n",
"ITELLYOU | 2 |
\n",
"联系TG:yyllzy,fulihuoqu | 2 |
\n",
"強片皇帝999 | 2 |
\n",
"sogclub No.2 | 2 |
\n",
"D2mp4 | 2 |
\n",
"mmklp@第一会所 | 2 |
\n",
"ssss1111@18p2p | 2 |
\n",
"bbvc | 2 |
\n",
"感冒清@sis001 | 2 |
\n",
"afnami@64.78.163.55 | 2 |
\n",
"西門吹水 | 2 |
\n",
"goldpuzjying | 2 |
\n",
"uid=1591117 | 2 |
\n",
"[http://rudub.tv] RuDub.TV | 2 |
\n",
"GF@1024核工廠 | 2 |
\n",
"www.javhdbbs.com | 2 |
\n",
"蜂鸟色区 | 2 |
\n",
"b'\\xb3\\xc7\\xca\\xd0\\xefL\\xc7\\xe9~\\xc4\\xa7\\xbd\\xe4\\xd4\\xad\\x84\\x93' | 2 |
\n",
"[http://energy-torrent.com] Energy-Torrent | 2 |
\n",
"SoushkinBoudera | 2 |
\n",
"[http://bko.baibako.tv] BaibaKo.TV | 2 |
\n",
"Western/HD-Jiggly | 2 |
\n",
"冷月无声 | 2 |
\n",
"奥利给 | 2 |
\n",
"b'\\xab\\xb0\\xa5\\xab\\xad\\xb7\\xb1\\xa1~\\xa4p\\xb9t\\xad\\xec\\xb3\\xd0' | 2 |
\n",
"b'tanw\\xa9\\xceyk3325@www.sogclub.com' | 2 |
\n",
"3Li | 2 |
\n",
"b'giogio99\\xad\\xec\\xb3\\xd0' | 2 |
\n",
"BradPitt | 2 |
\n",
"遁去的壹 | 2 |
\n",
"downloadcursos.top | 2 |
\n",
"KTXP_秋沫 | 2 |
\n",
"xinnian | 2 |
\n",
"18p2p by_UID 1380364 | 2 |
\n",
"https://bbs2048.org/ | 2 |
\n",
"https://www.1024btgc.com | 2 |
\n",
"清雨 | 2 |
\n",
"crazylazy | 2 |
\n",
"感冒清@sis001.com | 2 |
\n",
"MingYSub | 2 |
\n",
"淘宝天猫优惠券秒杀 | 2 |
\n",
"Downloaded from CracksHash.com | 2 |
\n",
"会飞的象@第一会所 | 2 |
\n",
"mule_by_SpeedPluss.ORG | 2 |
\n",
"https://rutor.org | 2 |
\n",
"BT伙计 | 2 |
\n",
"hhd800.com | 2 |
\n",
"gnhyc11@18p2p.com | 1 |
\n",
"fyoulapk@18p2p | 1 |
\n",
"塔卡小爹賽 | 1 |
\n",
"HD一条街论坛 | 1 |
\n",
"dioguitar23原創 | 1 |
\n",
"b'\\xb3\\xce\\xbf\\xd5\\xd1\\xa7\\xd4\\xb0' | 1 |
\n",
"cnmzlwb | 1 |
\n",
"zb77@18p2p | 1 |
\n",
"https://www.asmr.one/work/RJ374870 | 1 |
\n",
"[uid-1591117] | 1 |
\n",
"奈特羅德 | 1 |
\n",
"https://mega.nz/#F!DK4lCSwB!QdwaMCT3SpOxISAgnuX7nQ | 1 |
\n",
"小葫芦@www.sis001.com | 1 |
\n",
"柏林没有梦 | 1 |
\n",
"ls611 | 1 |
\n",
"qqtnt007 | 1 |
\n",
"3E523E31D247_by_FDZone.ORG | 1 |
\n",
"JPopsuki 2.0 626225292 | 1 |
\n",
"https://elamigosedition.com/ | 1 |
\n",
"guroemon | 1 |
\n",
"lyf634041775 | 1 |
\n",
"1234567890 | 1 |
\n",
"https://bitnova.info/ | 1 |
\n",
"asfile@SIS001 | 1 |
\n",
"b'\\xbd\\xad\\xc4\\xcf\\xb7\\xe7\\xd3\\xea' | 1 |
\n",
"mikocon @ bbs.2djgame.net | 1 |
\n",
"http://mm.aayun.cc | 1 |
\n",
"aqcd123 | 1 |
\n",
"维尼 | 1 |
\n",
"iii | 1 |
\n",
"pornolab | 1 |
\n",
"极影字幕 | 1 |
\n",
"b'\\xc9\\xab\\xd6\\xd0\\xc9\\xab@ypzhq\\xd4\\xad\\xb4\\xb4' | 1 |
\n",
"roger92402094(SIS) | 1 |
\n",
"erest | 1 |
\n",
"Baslilon=Baslilon23 | 1 |
\n",
"b'\\xab\\xb0\\xa5\\xab\\xad\\xb7\\xb1\\xa1 dioguitar23 \\xad\\xec\\xb3\\xd0' | 1 |
\n",
"sigma | 1 |
\n",
"寂寞如漫天雪花 | 1 |
\n",
"C:\\Users\\pongphon\\OneDrive\\Desktop\\New folder (2)\\FC2PPV 1218169 [Odorless video] [Leaked] JULIA High image quality BEB-016 JULIA Sweaty Backroom .ts | 1 |
\n",
"JPopsuki 2.0 2131292835 | 1 |
\n",
"不予@暗香阁 | 1 |
\n",
"sogclub No.2 BY sogclub | 1 |
\n",
"uid-1591117 | 1 |
\n",
"b'\\xba\\xda\\xc2\\xfb\\xb0\\xc5' | 1 |
\n",
"微信一夜ONS协会 | 1 |
\n",
"b'KUHO\\xd2\\xd5\\xca\\xf5\\xc1\\xaa\\xc3\\xcb' | 1 |
\n",
"b'\\xb6\\xc0\\xa5i\\xa8\\xe0_by_FDZone.org' | 1 |
\n",
"中文字幕無水印 | 1 |
\n",
"http://www.wozai020.com | 1 |
\n",
"sop168 | 1 |
\n",
"b'SP\\xa7\\xe4\\xbc\\xd6\\xa4l@\\xaa\\xe1\\xa9M\\xa9|' | 1 |
\n",
"tiantianlu186@公仔箱論壇 | 1 |
\n",
"luckyjune | 1 |
\n",
"SK`|yEsMan<sk·> | 1 |
\n",
"b'@aaming2002@\\xa3\\xa2\\xb3\\xd5\\xba\\xba\\xa3\\xa2\\xc9\\xab\\xd6\\xd0\\xc9\\xab\\xa3\\xa2\\xc3\\xce\\xb9\\xab\\xd4\\xb0\\xa3\\xa2MimiP2P\\xa3\\xa2\\xa3\\xc4.\\xa3\\xc3P2P\\xa3\\xa2WaiKeungSite\\xa3\\xa2p2pZONE\\xa3\\xa2Mr.P2P\\xa3\\xa2' | 1 |
\n",
"hkkane@18p2p | 1 |
\n",
"www.4hu.com | 1 |
\n",
"b'\\xaeL\\xaa\\xef\\xacK@99p2p' | 1 |
\n",
"夜蒅星宸@第一会所 | 1 |
\n",
"【更多资源用加手机QQ-17182252050】 | 1 |
\n",
"jjjhn2003@18p2p | 1 |
\n",
"XIEYUXIA | 1 |
\n",
"b'@\\xc0\\xcb\\xb7\\xad\\xd4\\xc6@' | 1 |
\n",
"www.dio889.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 1 |
\n",
"TYBBX2 | 1 |
\n",
"yjs521 | 1 |
\n",
"hhbb_zcm | 1 |
\n",
"twsb.co | 1 |
\n",
"https://downloadcursos.top | 1 |
\n",
"https://www.musicastorrent.com/ | 1 |
\n",
"pandafood#panda1314#gg5123 獨家首發 | 1 |
\n",
"探花族 | 1 |
\n",
"zhoudehua200 | 1 |
\n",
"AV大平台 - 发布页 | 1 |
\n",
"b'tanw\\xa9\\xceyk3325' | 1 |
\n",
"Rivera@18p2p.com | 1 |
\n",
"b'\\xd7\\xcf\\xc3\\xb5\\xb9\\xe5' | 1 |
\n",
"[kp.m-team.cc] M-Team - TP | 1 |
\n",
"www.spankhash.com | 1 |
\n",
"UID 235465@www.mimip2p.net | 1 |
\n",
"草榴社区@MianSheng | 1 |
\n",
"Странник | 1 |
\n",
"hgr168168 | 1 |
\n",
"BJ | 1 |
\n",
"mecaca | 1 |
\n",
"昆仑虚之巅@草榴社區 | 1 |
\n",
"[欧美美@草榴社区] | 1 |
\n",
"没线的风筝 | 1 |
\n",
"尼尼撸-综合网站 | 1 |
\n",
"100%真人激情裸聊 www.78xo.com | 1 |
\n",
"jettej | 1 |
\n",
"Daddy | 1 |
\n",
"diamond | 1 |
\n",
"中文片库 | 1 |
\n",
"https://worldmkv.com | 1 |
\n",
"b'yatsingkoon@\\xa1\\xb9\\xb6q\\xb3c\\xa4\\xc0\\xa8\\xc9\\xbd\\xd7\\xbe\\xc2\\xa1\\xb9' | 1 |
\n",
"入微 | 1 |
\n",
"https://discord.com/invite/wweVHZd6qg | 1 |
\n",
"602@第一会所 | 1 |
\n",
"3484988vikci@第一会所 | 1 |
\n",
"evilzy | 1 |
\n",
"化骨龍 | 1 |
\n",
"https://www.kobo.com/ebook/an-archdemon-s-dilemma-how-to-love-your-elf-bride-volume-13 | 1 |
\n",
"cqkd_czy | 1 |
\n",
"不辣de皮特 | 1 |
\n",
"kaito | 1 |
\n",
"u3c3.com | 1 |
\n",
"☆影视帝国论坛☆ | 1 |
\n",
"aaa23 | 1 |
\n",
"hevcbay.com | 1 |
\n",
"gn7650104 | 1 |
\n",
"老舅电影 | 1 |
\n",
"捕鼠人 | 1 |
\n",
"https://www.gamestorrents.nu/ | 1 |
\n",
"Aidoru-Online | 1 |
\n",
"公主殿下@第一會所 | 1 |
\n",
"MP4BA电影网 | 1 |
\n",
"b'\\xb8\\xb4\\xbb\\xee126' | 1 |
\n",
"微信公众号:卡其影视分享 | 1 |
\n",
"百虎动画 | 1 |
\n",
"425307@癡漢俱樂部 | 1 |
\n",
"avp2p | 1 |
\n",
"GIFchuchushipin | 1 |
\n",
"EndlesSea | 1 |
\n",
"Tanhuazu-探花族 | 1 |
\n",
"推特搞啥呢 | 1 |
\n",
"@K8bet.io@ | 1 |
\n",
"Misfits | 1 |
\n",
"黑暗虫洞 | 1 |
\n",
"magazinesbb.com | 1 |
\n",
"b'\\xc9\\xab\\xd6\\xd0\\xc9\\xab\\xd5\\x93\\x89\\xaf@www.SIS.xxx' | 1 |
\n",
"草榴社区@z10271 | 1 |
\n",
"冰封爱河 | 1 |
\n",
"b'[http://www.uniongang.net] \\xd4\\xe8\\xeb\\xfc\\xec\\xfb \\xee\\xf2 ELEKTRI4KA | \\xdd\\xcb\\xc5\\xca\\xd2\\xd0\\xc8\\xd7\\xca\\xc0 \\xed\\xe0 Uniongang' | 1 |
\n",
"zhangqq789@第一会所 | 1 |
\n",
"wangye6 | 1 |
\n",
"ann@myfun4u.org | 1 |
\n",
"kino9999@18p2p | 1 |
\n",
"b'CHD\\xc1\\xaa\\xc3\\xcb' | 1 |
\n",
"satu@hongfire | 1 |
\n",
"polee | 1 |
\n",
"GM3089@18P2P | 1 |
\n",
"BT工厂 @ 5120911 | 1 |
\n",
"【U6A6.COM】_全网磁力最快更新 | 1 |
\n",
"sklc-P2P101.COM | 1 |
\n",
"b'\\xb0\\xcb\\xd6\\xd8\\xf7\\xec' | 1 |
\n",
"b'\\xcc\\xda\\xb7\\xc9\\xd4\\xda\\xcf\\xdf' | 1 |
\n",
"b'doa_o[\\xb9\\xc5\\xce\\xef\\xce\\xdd]' | 1 |
\n",
"缘聚岛 | 1 |
\n",
"素人辣妹正妹報報 | 1 |
\n",
"b'sweetsmile@CHD\\xc1\\xaa\\xc3\\xcb' | 1 |
\n",
"javtv.me | 1 |
\n",
"zhaochuan99 | 1 |
\n",
"草榴社区 | 1 |
\n",
"四魂制作组 | 1 |
\n",
"动漫花園 | 1 |
\n",
"View my conspiracy torrents at | 1 |
\n",
"春卅娘@18p2p | 1 |
\n",
"1024核工厂最新地址 | 1 |
\n",
"JPopsuki 2.0 904012437 | 1 |
\n",
"wearebest@18P2P | 1 |
\n",
"HTCdesireHD@第一會所 | 1 |
\n",
"11.55 | 1 |
\n",
"shinjico | 1 |
\n",
"得得撸 www.dedelu.com | 1 |
\n",
"Western&HD-Jiggly | 1 |
\n",
"ningchia | 1 |
\n",
"filelist.ro | 1 |
\n",
"dengzhi123_by_FDZone.ORG | 1 |
\n",
"b'\\xab\\xb0\\xa5\\xab\\xad\\xb7\\xb1\\xa1 dioguitar23(\\xb2\\xc4\\xa4\\xbb\\xa4\\xd1\\xc5]\\xa4\\xfd)\\xad\\xec\\xb3\\xd0' | 1 |
\n",
"HZHJS | 1 |
\n",
"Audible | 1 |
\n",
"skyuz | 1 |
\n",
"ever | 1 |
\n",
"El tio WAPILLO :v | 1 |
\n",
"草莓TV | 1 |
\n",
"加菲豆@第一会所 | 1 |
\n",
"yaoshiqiao | 1 |
\n",
"PB | 1 |
\n",
"b'\\xb9\\xda\\xa4\\xbd\\xb6\\xe9\\xaeT\\xbc\\xd6\\xa4u\\xa7{@p16847' | 1 |
\n",
"54CECB5A0EA7_by_FDZone.ORG | 1 |
\n",
"b'\\xc0\\xcb\\xd7\\xd3\\xd0\\xa1\\xb5\\xb6' | 1 |
\n",
"rendell_by_mimip2p.net, rendellxx_by_fdzone.org, rendell@SexInSex! | 1 |
\n",
"https://e-hentai.org | 1 |
\n",
"https://to-url.com/torrent-igruha | 1 |
\n",
"jinzebin86@18p2p.com | 1 |
\n",
"birdmanfocker@18p2p | 1 |
\n",
"GH37DgaBef6rQJyE2nvqb5YpS | 1 |
\n",
"AVdian@126.com | 1 |
\n",
"亞瑟王 | 1 |
\n",
"b'Bianca_Cooper_Touch99.com \\xa6\\xb3\\xa7\\xf3\\xa6h\\xa6n\\xb9\\xcf' | 1 |
\n",
"wT3j6PNrC5aOcD04yJ7xRotF8 | 1 |
\n",
"村花论坛 | 1 |
\n",
"b'\\xc4\\xfa_\\x89\\xf4\\xb9\\xab\\x88@\\x8a\\xca\\x98\\xb7\\xb9\\xa4\\xb7\\xbb' | 1 |
\n",
"FISH321@18P2P | 1 |
\n",
"第一会所 sis001 | 1 |
\n",
"huPE@18P2P | 1 |
\n",
"houlai=biaoqian | 1 |
\n",
"b'qilibi@\\xc1\\xf9\\xd4\\xc2\\xc2\\x93\\xc3\\xcb' | 1 |
\n",
"天池妖尊 | 1 |
\n",
"sing0212000 | 1 |
\n",
"wandy_by_FDZone.org | 1 |
\n",
"XO@kazamis | 1 |
\n",
"百撸社区|高清影片 | 1 |
\n",
"KOOK | 1 |
\n",
"HQC | 1 |
\n",
"mc733 | 1 |
\n",
"爱游戏 | 1 |
\n",
"1158012^@^18p2p | 1 |
\n",
"b'Bianca_Cooper \\xa7\\xf3\\xa6h\\xac\\xfc\\xb9\\xcf\\xa5u\\xa6bTouch99' | 1 |
\n",
"xiaocuitj | 1 |
\n",
"星星不舔屄 | 1 |
\n",
"https://www.crnaberza.com CrnaBerza | 1 |
\n",
"boby@mimip2p | 1 |
\n",
"magnet360@163.com | 1 |
\n",
"Japanadultvideos 論壇 <-----按此瀏覽更多 | 1 |
\n",
"[http://x-torrents.nu] X-Torrents.org | 1 |
\n",
"euphoricer | 1 |
\n",
"2048核基地!! | 1 |
\n",
"zlb273692399@第一会所 | 1 |
\n",
"花和尚 | 1 |
\n",
"b'\\xb4\\xbf\\xb0\\xae\\xc9\\xe7\\xc7\\xf8/wbzt' | 1 |
\n",
"三石@第一会所 | 1 |
\n",
"JackyCheung@草榴社區 | 1 |
\n",
"b'\\xbf\\xe7\\xca\\xa1\\xbe\\xdc\\xb7\\xf1@9999999' | 1 |
\n",
"菜牙电影网 | 1 |
\n",
"mehappy2012 | 1 |
\n",
"https://www.jp.square-enix.com/music/sem/page/chrono/trigger_revival/ | 1 |
\n",
"Scientists used to invent telephones, airplanes, microwave ovens... now all they invent is statistics that say they should get more funding. | 1 |
\n",
"RoxMarty | 1 |
\n",
"rczhi@18p2p.com | 1 |
\n",
"kkk8568 | 1 |
\n",
"kenan2763 | 1 |
\n",
"arthurwarlike@第一会所 | 1 |
\n",
"b'\\xb3\\xc7\\xca\\xd0\\xefL\\xc7\\xe9~~\\xcb\\xba\\xd2\\xb9\\xd4\\xad\\x84\\x93' | 1 |
\n",
"東方明珠=ccvvm | 1 |
\n",
"从小缺钙 | 1 |
\n",
"Jackie | 1 |
\n",
"www.lupola.com | 1 |
\n",
"ashow.cc | 1 |
\n",
"品色影院 | 1 |
\n",
"8400327@草榴社區 | 1 |
\n",
"gamezealot@18p2p | 1 |
\n",
"uhla454@第一会所 | 1 |
\n",
"宅鱼 | 1 |
\n",
"1024核工厂 Bt7086 | 1 |
\n",
"hilllxs | 1 |
\n",
"豺狼也柔情 | 1 |
\n",
"99堂 | 1 |
\n",
"老肥 | 1 |
\n",
"Chikyuji-Animes, 2006 maggle! | 1 |
\n",
"chaorentwo@18p2p | 1 |
\n",
"若無其事@18p2p.com | 1 |
\n",
"hhd000.com | 1 |
\n",
"掠风窃尘 | 1 |
\n",
"b'\\xd3\\xd5\\xbb\\xf3\\xd3\\xe9\\xc0\\xd6\\xcd\\xf8\\xb5\\xe3\\xbb\\xf7\\xbd\\xf8\\xc8\\xeb \\xa8w\\xec\\xe1\\xbf\\xa1\\xc9\\xd9\\xec\\xe1\\xa8w' | 1 |
\n",
"Kura999 from WaikeungBBS | 1 |
\n",
"XFSUB | 1 |
\n",
"huiasd | 1 |
\n",
"b'Rory @ D.C.\\xb8\\xea\\xb0T\\xa5\\xe6\\xacy\\xba\\xf4' | 1 |
\n",
"https://t.me/deletetvwrestling | 1 |
\n",
"dodododo | 1 |
\n",
"Rambo@18p2p | 1 |
\n",
"b'\\xce\\xde\\xd0\\xc4\\xce\\xde\\xb4\\xe6' | 1 |
\n",
"filmplay | 1 |
\n",
"avdian@126.com | 1 |
\n",
"1025 | 1 |
\n",
"956828@18p2p | 1 |
\n",
"夜游神 | 1 |
\n",
"b'\\xb2\\xbb\\xb5\\xc3\\xb2\\xbb\\xc9\\xab' | 1 |
\n",
"vbiukj | 1 |
\n",
"buxxa=bbvc | 1 |
\n",
"jnd16d | 1 |
\n",
"烽火不熄 | 1 |
\n",
"pietro716 | 1 |
\n",
"Lus | 1 |
\n",
"b'\\x98Y\\xd4\\xad\\xa4\\xe6\\x97@' | 1 |
\n",
"國產無碼 | 1 |
\n",
"b'\\xd0\\xc2\\xc7\\xd7\\xc3\\xdc\\xb0\\xae\\xc8\\xcb\\xc2\\xdb\\xcc\\xb3@\\xd6\\xc1\\xd7\\xf0\\xcc\\xec\\xc1\\xfa' | 1 |
\n",
"wangzhifeng@18p2p | 1 |
\n",
"dabohong_by_fdzone.org | 1 |
\n",
"TODO | 1 |
\n",
"b'\\xb7\\xc9\\xd3\\xb0\\xbf\\xcd\\xcd\\xf8' | 1 |
\n",
"yav.me | 1 |
\n",
"http://www.jizhang1.space/?3316427 | 1 |
\n",
"pin0314(1470)@www.mycould.com | 1 |
\n",
"handsomemouse@18p2p | 1 |
\n",
"b'\\xa4\\xc6\\xb0\\xa9\\xc0s@mimip2p' | 1 |
\n",
"面瘫 | 1 |
\n",
"弄死你娃L@2018x.win | 1 |
\n",
"yyyyyuuuuu@18p2p | 1 |
\n",
"狼主@SexInSex.net | 1 |
\n",
"1394130143@第一会所 | 1 |
\n",
"jove | 1 |
\n",
"电骡爱好者 | 1 |
\n",
"westkyo@www.sis001.com | 1 |
\n",
"lzmcmbj@18p2p | 1 |
\n",
"dioguitar23(第六天魔王)@dioguitar23.me | 1 |
\n",
"VISTOR_by_FDZone.ORG | 1 |
\n",
"chris930 | 1 |
\n",
"[WMAN-LorD] [UHD] [4K] [2160p] [REAL4K] [TGx] | 1 |
\n",
"b'A\\xab\\xac\\xa4\\xa3\\xa8}\\xc3\\xc8' | 1 |
\n",
"b'\\xb8\\xfc\\xb6\\xe0\\xb8\\xfc\\xd0\\xc2\\xb5\\xe7\\xd3\\xb0\\xcf\\xc2\\xd4\\xd8\\xc7\\xeb\\xb5\\xe3\\xbb\\xf7\\xd5\\xe2\\xc0\\xef' | 1 |
\n",
"Domaha.tv | 1 |
\n",
"destiny999@18p2p | 1 |
\n",
"水母飄 | 1 |
\n",
"HOUSEKEEPER | 1 |
\n",
"RV原创组 | 1 |
\n",
"月岚星辰520@第一会所 | 1 |
\n",
"b'\\xc3\\xe2\\xb7\\xd1\\xd4\\xda\\xcf\\xdf\\xd2\\xf4\\xc0\\xd6' | 1 |
\n",
"www.1024pk.com | 1 |
\n",
"爱城 | 1 |
\n",
"amge50@www.sogclub.com | 1 |
\n",
"OneStar | 1 |
\n",
"b'Jocky123#\\xb8\\xfc\\xb6\\xe0\\xb5\\xc4\\xbe\\xab\\xb2\\xca\\xd3\\xb0\\xc6\\xac!' | 1 |
\n",
"https://getcomics.info | 1 |
\n",
"点击-海量种子 | 1 |
\n",
"btziyuan | 1 |
\n",
"[http://x-torrents.org] X-Torrents.org (ex X-Torrents.ru) | 1 |
\n",
"https://www.lspback.com | 1 |
\n",
"foxmoder996 | 1 |
\n",
"https://share.dmhy.org/topics/list/user_id/712935 | 1 |
\n",
"玛尔亲王@第一会所 | 1 |
\n",
"rtjhuytu | 1 |
\n",
"淨空法師專集網站 | 1 |
\n",
"b'\\xa1\\xb6\\xbd\\xcc\\xd3\\xfd\\xca\\xd6\\xc0\\xad\\xca\\xd6\\xa1\\xb7' | 1 |
\n",
"mc733+zgome | 1 |
\n",
"Goddess | 1 |
\n",
"NikeのB@第一会所 | 1 |
\n",
"b'dvt\\xb0\\xc9' | 1 |
\n",
"微博:止于影书,公众号:影遇见书,@小鱼 | 1 |
\n",
"free4 | 1 |
\n",
"靜風@sis001 | 1 |
\n",
"kaniuniu | 1 |
\n",
"dcsk_By_FDZone.org | 1 |
\n",
"sigma@www.mimip2p.com | 1 |
\n",
"看翍荭尘 | 1 |
\n",
"bjiok | 1 |
\n",
"lins2b | 1 |
\n",
"小馬克_by_FDZone.ORG | 1 |
\n",
"FSFS555@第一会所 | 1 |
\n",
"flowerff | 1 |
\n",
"lascruces | 1 |
\n",
"?nike? | 1 |
\n",
"SEX8.CC | 1 |
\n",
"b'\\xb3\\xc9\\xc8\\xcb\\xc2\\xdb\\xcc\\xb3\\xbf\\xaa\\xb7\\xc5\\xd7\\xa2\\xb2\\xe1' | 1 |
\n",
"dio889.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 1 |
\n",
"APKMAZA.CO | 1 |
\n",
"13121152@18p2p | 1 |
\n",
"UID 185363@www.mimip2p.com | 1 |
\n",
"b'\\xa4^\\xa4\\xa2\\xb5\\xbe@FDZone.org' | 1 |
\n",
"更多资源联系qq1273288348 | 1 |
\n",
"https://nyaa.si/user/mrshowoff | 1 |
\n",
"https://boards.4channel.org/h/#s=hentai+upscales | 1 |
\n",
"mimu@18P2P | 1 |
\n",
"b'\\xd7\\xd3\\xc7\\xe9 \\xd7\\xa3\\xba\\xd8\\xc9\\xab\\xd6\\xd0\\xc9\\xab \\xcb\\xc4\\xd6\\xdc\\xc4\\xea \\xcc\\xd8\\xb1\\xf0\\xcb\\xae\\xd3\\xa1\\xd1\\xb9\\xd6\\xc6' | 1 |
\n",
"殇情 | 1 |
\n",
"风来西林 | 1 |
\n",
"www.loliba.info | 1 |
\n",
"b'Nike\\xa4\\xce\\xa3\\xc2' | 1 |
\n",
"[www.pttime.org] PT时间 | 1 |
\n",
"QxR | 1 |
\n",
"sunchiua_by_P2Pzone.org | 1 |
\n",
"wazx528 | 1 |
\n",
"popgofansub | 1 |
\n",
"b'\\xc3\\xe2\\xb7\\xd1\\xb5\\xe7\\xd3\\xb0\\xcf\\xc2\\xd4\\xd8\\xbb\\xf9\\xb5\\xd8' | 1 |
\n",
"gremichaem | 1 |
\n",
"b'\\xd0\\xc7\\xb3\\xbd\\xd0\\xa1\\xb7\\xe7\\xa3\\xa6\\xbe\\xab\\xc9\\xf1\\xc9\\xab\\xcb\\xd8\\xa3\\xa6cookiexp\\xa3\\xc0\\xd1\\xb0\\xba\\xfc\\xc9\\xe7\\xc7\\xf8' | 1 |
\n",
"sukebei.nyaa.si | 1 |
\n",
"pademon18p2p | 1 |
\n",
"aaamfk+zgome+bbryans | 1 |
\n",
"cyxy@http://38.114.38.172/forum/ | 1 |
\n",
"b'\\xd3\\xd7\\xc5\\xae\\xbc\\xab\\xc6\\xb7' | 1 |
\n",
"https://e-hentai.org/g/2375721/1b5e081312/ | 1 |
\n",
"18P2P_dioguitar23.co(第六天魔王)@最新AV海量免費播放~魔王在線 | 1 |
\n",
"b'AV\\xce\\xc4\\x99n\\xa3\\xfcADULT INTEGRATED COMMUNITY' | 1 |
\n",
"UID 1357210@18P2P.com | 1 |
\n",
"fuckkkingou | 1 |
\n",
"闲云野鹤 | 1 |
\n",
"LAPUMiA.NeT | 1 |
\n",
"adult_cn | 1 |
\n",
"psoke | 1 |
\n",
"18p2p@liyang8926 | 1 |
\n",
"littlefatbee | 1 |
\n",
"秋叶TV | 1 |
\n",
"msy91 | 1 |
\n",
"Niraya | 1 |
\n",
"https://www.kobo.com/ebook/that-time-i-got-reincarnated-as-a-slime-vol-13-light-novel | 1 |
\n",
"JPopsuki 2.0 941661648 | 1 |
\n",
"yamyedye@18P2P | 1 |
\n",
"dansnow | 1 |
\n",
"H2CO3 | 1 |
\n",
"b'\\x8e\\xf7\\x8e\\xf7@\\x88\\xc3\\x91\\xe9\\x9a\\xa0\\x8c\\xb4\\x91n' | 1 |
\n",
"kamigami | 1 |
\n",
"G@1024核工廠 | 1 |
\n",
"The Seaside Corpse | 1 |
\n",
"b'\\xadw\\xbd\\xde_by_FDZone.ORG' | 1 |
\n",
"fangbayern | 1 |
\n",
"君乐 | 1 |
\n",
"Doctor Who | 1 |
\n",
"第一流氓@18P2P | 1 |
\n",
"Deviloid.net | 1 |
\n",
"b'\\xc1\\xf9\\xd4\\xc2\\xc1\\xaa\\xc3\\xcb hgfhgf' | 1 |
\n",
"wcer@18p2p.com | 1 |
\n",
"https://www.yitarx.com | 1 |
\n",
"wuchengzhou9000@www.SexInSex.net | 1 |
\n",
"nwcd | 1 |
\n",
"p2p_user@mimip2p | 1 |
\n",
"zza@live.com | 1 |
\n",
"清风浪子@草榴社区 | 1 |
\n",
"http://www.zone54.com | 1 |
\n",
"ssan998 | 1 |
\n",
"xxfhd.com | 1 |
\n",
"mybmw320_by_SpeedPluss.ORG | 1 |
\n",
"woaibt@1024核工厂 | 1 |
\n",
"b'[http://www.uniongang.tv] \\xd4\\xe8\\xeb\\xfc\\xec\\xfb \\xee\\xf2 ELEKTRI4KA | \\xdd\\xcb\\xc5\\xca\\xd2\\xd0\\xc8\\xd7\\xca\\xc0 \\xed\\xe0 Uniongang' | 1 |
\n",
"hegongc163 | 1 |
\n",
"bigwai | 1 |
\n",
"t66y | 1 |
\n",
"cctc55 | 1 |
\n",
"tto@18P2P | 1 |
\n",
"Antidot Team | 1 |
\n",
"Torrent Galaxy | 1 |
\n",
"萤火虫IT服务全国连锁 | 1 |
\n",
"葬爱@18p2p | 1 |
\n",
"贴心话 | 1 |
\n",
"xuerui810405 | 1 |
\n",
"SoulSeek | 1 |
\n",
"abbt@18p2p.com | 1 |
\n",
"深深可许@第一会所 | 1 |
\n",
"lixuhua | 1 |
\n",
"b'\\xcc\\x93\\x9fo' | 1 |
\n",
"animekayo.com | 1 |
\n",
"qiupianhao | 1 |
\n",
"173489627 | 1 |
\n",
"wak11110@18P2P | 1 |
\n",
"[http://hdtracker.org] HD TRACKER | 1 |
\n",
"www.eien-acg.com | 1 |
\n",
"index0123 | 1 |
\n",
"hndwje | 1 |
\n",
"http://www.meitubb.com/forum.php | 1 |
\n",
"最新地址 | 1 |
\n",
"https://anidb.net/file/3082403 | 1 |
\n",
"更多精彩 @ 卡卡拉 | 1 |
\n",
"olo@第一会所 | 1 |
\n",
"https://e-hentai.org/g/2255154/778b4d24e6/ | 1 |
\n",
"sujinding@第一会所 | 1 |
\n",
"MKO | 1 |
\n",
"chleicool=fym0624=patpat608 | 1 |
\n",
"撸二九论坛 | 1 |
\n",
"flybird186 | 1 |
\n",
"b'[http://hdclub.org] \\xd2\\xf0\\xe5\\xea\\xe5\\xf0 HDClub - \\xf1\\xea\\xe0\\xf7\\xe0\\xf2\\xfc \\xe1\\xe5\\xf1\\xef\\xeb\\xe0\\xf2\\xed\\xee \\xf4\\xe8\\xeb\\xfc\\xec\\xfb HD, \\xf1\\xea\\xe0\\xf7\\xe0\\xf2\\xfc Blu-ray \\xf4\\xe8\\xeb\\xfc\\xec\\xfb, HD DVD \\xe8 HD audio, HDTV \\xf2\\xee\\xf0\\xf0\\xe5\\xed\\xf2' | 1 |
\n",
"https://www.omgyes.com | 1 |
\n",
"DVD 2008 | 1 |
\n",
"b'[http://uniongang.tv] \\xd4\\xe8\\xeb\\xfc\\xec\\xfb \\xee\\xf2 ELEKTRI4KA | \\xdd\\xcb\\xc5\\xca\\xd2\\xd0\\xc8\\xd7\\xca\\xc0 \\xed\\xe0 Uniongang' | 1 |
\n",
">亞捷視圖< | 1 |
\n",
"b'\\xb9\\xfd\\xc5\\xab\\xd6\\xc6\\xd4\\xec\\xb2\\xa9\\xbf\\xcd' | 1 |
\n",
"3267506 | 1 |
\n",
"中国电信 | 1 |
\n",
"9clonely | 1 |
\n",
"b'\\xd2\\xf9\\xc3\\xf1\\xcd\\xf2\\xcb\\xea' | 1 |
\n",
"幸运流星@四仔论坛 | 1 |
\n",
"Lista Espiritualista | 1 |
\n",
"雪光梦想 | 1 |
\n",
"https://exhentai.org/g/1964478/8ed0a899ca | 1 |
\n",
"olo@sis001 | 1 |
\n",
"3zi@第一會所 | 1 |
\n",
"Andy | 1 |
\n",
"b'\\xb7\\xd6\\xcf\\xed' | 1 |
\n",
"24262830. | 1 |
\n",
"食色性者 | 1 |
\n",
"aj11@mimip2p.net | 1 |
\n",
"srwH | 1 |
\n",
"鴻仔 | 1 |
\n",
"校园迷糊大王 | 1 |
\n",
"WCG | 1 |
\n",
"b'(\\xd3\\xf4\\xc3\\xc6)\\xb0\\xae\\xbf\\xb4\\xb5\\xe7\\xd3\\xb0' | 1 |
\n",
"kiva@18p2p | 1 |
\n",
"b'\\xbb\\xd8\\xbc\\xd2001@18p2p' | 1 |
\n",
"ffxx | 1 |
\n",
"judexkwok(SIS) | 1 |
\n",
"chikan@T66Y | 1 |
\n",
"瑞倪维儿护肤专卖 | 1 |
\n",
"auriga@18p2p | 1 |
\n",
"yinchong818@(sis) | 1 |
\n",
"ntlv0@hotmail.com | 1 |
\n",
"酷安 | 1 |
\n",
"jav20s8.com/ | 1 |
\n",
"JPopsuki 2.0 14486345 | 1 |
\n",
"若無其事@18p2p | 1 |
\n",
"b'stormly+taitan12+zhaoZero41+chinami2002+glen246+faberge@darkeagle-\\xbax\\x84\\xf0\\xaa\\xc0' | 1 |
\n",
"CMCT团队荣誉出品 | 1 |
\n",
"kennyboy | 1 |
\n",
"2AV.COM | 1 |
\n",
"\n",
"
"
],
"text/plain": [
"'\\n\\nPMEDIA | 134 |
\\nhttp://tapochek.net/index.php | 114 |
\\n高清下载吧! | 98 |
\\nhttps://FreeCourseWeb.com | 91 |
\\n灣搭拉咩拉 | 79 |
\\n脫拉庫 | 69 |
\\n1024社區最新地址 | 68 |
\\n第一會所新片@SIS001 | 64 |
\\n大师兄福利网 | 59 |
\\n2048 | 56 |
\\n | 53 |
\\nLostFilm.TV | 50 |
\\n[https://tanhuazu.com] 探花族社区 | 37 |
\\nRV原创 | 37 |
\\n2048核基地 | 37 |
\\nhttps://hjd.tw | 35 |
\\n小贾_KTXP | 33 |
\\n1024核工厂 | 33 |
\\nhttps://crackshash.com/ | 29 |
\\n國產精品 | 28 |
\\nhttps://rh2048.com | 27 |
\\n吃雞大神 | 26 |
\\n1024社區 | 26 |
\\nb48t.com | 25 |
\\n麻豆之神 | 24 |
\\n欧宝 | 24 |
\\n老含及 | 24 |
\\n小隻馬 | 20 |
\\n@蜂鳥论坛@ | 20 |
\\nJAV Torrent 掲示板 | 20 |
\\nAV大平台 | 19 |
\\n刷刷刷 | 18 |
\\n第一會所新片 | 18 |
\\n发发发 | 18 |
\\n1024 | 17 |
\\n1024工厂 | 17 |
\\nWeagogo | 16 |
\\nhjd.tw | 16 |
\\nhttps://1tors.ru/ | 15 |
\\nb'\\\\xcf\\\\xeb\\\\xb7\\\\xa2\\\\xc8\\\\xb4\\\\xb2\\\\xbb\\\\xbb\\\\xe1' | 14 |
\\nolo | 13 |
\\n不予 | 13 |
\\n老司机论坛 | 13 |
\\n小樱 | 12 |
\\nxp1024 | 12 |
\\n(美女裸聊直播 uur68.com) | 12 |
\\n美女裸聊直播 | 11 |
\\n發片小王子@18p2p | 11 |
\\nb'\\\\xb3\\\\xcc\\\\xb7sAV \\\\xa4\\\\xd1\\\\xaa\\\\xc5\\\\xbd\\\\xd7\\\\xbe\\\\xc2 IP' | 11 |
\\nBT世界网 https://www.btsj6.com/ | 10 |
\\n[animelayer.ru] Animelayer | 10 |
\\nnyaa001 | 10 |
\\nhttps://discord.gg/vbJ7RTn | 10 |
\\nPiRaX @ TamilBlasters.Net | 10 |
\\norion | 10 |
\\n愛在黑夜001 | 10 |
\\nb'dioguitar23(\\\\xb2\\\\xc4\\\\xa4\\\\xbb\\\\xa4\\\\xd1\\\\xc5]\\\\xa4\\\\xfd)\\\\xad\\\\xec\\\\xb3\\\\xd0' | 9 |
\\nU6A6磁力搜索---U6A6.COM | 9 |
\\nhttps://infocon.org/ | 9 |
\\n约战竞技场 | 9 |
\\nxue0117 | 9 |
\\nBBVC | 9 |
\\nZelka.ORG | 8 |
\\nthreesixtyp | 8 |
\\ndio88.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 8 |
\\ndioguitar23(第六天魔王)@dioguitar23.net | 8 |
\\n規懶趴會 | 8 |
\\nb'\\\\xc1\\\\xf9\\\\xd4\\\\xc2\\\\xc1\\\\xaa\\\\xc3\\\\xcb' | 7 |
\\n百撸社区|高清资源 | 7 |
\\nZamunda.NET | 7 |
\\n百撸社区 | 7 |
\\nwww.dio8899.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 7 |
\\nK8bet | 6 |
\\ncangkong | 6 |
\\n[tp.m-team.cc] M-Team - TP | 6 |
\\ndioguitar23.co(第六天魔王)@最新AV海量免費播放~魔王在線 | 6 |
\\nb'\\\\xb7\\\\xf6\\\\xba~\\\\xad\\\\xd1\\\\xbc\\\\xd6\\\\xb3\\\\xa1 dioguitar23 \\\\xad\\\\xec\\\\xb3\\\\xd0' | 6 |
\\n00armand00 | 6 |
\\n6969bt.com | 6 |
\\n[https://majomparade.eu] | 6 |
\\n鱼香肉丝 | 6 |
\\n性吧RV原创 | 5 |
\\nBurnbit | 5 |
\\n94i88影城-点击跳转 | 5 |
\\n♥im520♥ | 5 |
\\narsenal-fan | 5 |
\\n[http://x-torrents.org] X-Torrents.org | 5 |
\\n1024核工厂/ | 5 |
\\nPMEDIA NETWORK | 5 |
\\narsenal-fan@avsp2p.com | 5 |
\\nhttps://www.javhdbbs.com | 5 |
\\ndioguitar23(第六天魔王)@mw6.me | 5 |
\\n成年人的小游戏 | 5 |
\\nHotaru | 5 |
\\nMp4Ba | 4 |
\\nb'\\\\x9e\\\\xb3\\\\xb4\\\\xee\\\\xc0\\\\xad\\\\xdf\\\\xe3\\\\xc0\\\\xad@kb978.com' | 4 |
\\nhttps://downloadcursos.top/ | 4 |
\\nyouiv | 4 |
\\nrutracker.org | 4 |
\\nyoy123 | 4 |
\\nolo@SIS001 | 4 |
\\n上善若水@www.sexinsex.net | 4 |
\\nb'\\\\xab\\\\xb0\\\\xa5\\\\xab\\\\xad\\\\xb7\\\\xb1\\\\xa1~\\\\xc5]\\\\xa7\\\\xd9\\\\xad\\\\xec\\\\xb3\\\\xd0' | 4 |
\\n魔王之家 | 4 |
\\n杏吧 | 4 |
\\ndio66.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 4 |
\\n更多精彩!尽在99BT工厂@5120911 | 4 |
\\nhotaru | 4 |
\\nxueru10405 | 4 |
\\n1030社區---1030.ws | 4 |
\\nx | 4 |
\\nwww.crackshash.com | 4 |
\\n1stDragon | 4 |
\\nbuxxa | 4 |
\\nwww.dio7777.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 4 |
\\nBT-btt.com | 4 |
\\nkenelm | 4 |
\\nHiHBT 精品薈萃 | 4 |
\\nm6688.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 3 |
\\n杏吧论坛 | 3 |
\\nXIU | 3 |
\\natrrea | 3 |
\\n1314 | 3 |
\\noldman原創DVD@18p2p.com | 3 |
\\nsogood@18p2p | 3 |
\\n? nike ? | 3 |
\\nhttps://toonshub.xyz | 3 |
\\nhttps://www.torrentdosfilmes.tv/ | 3 |
\\n1024社区 | 3 |
\\ndioguitar23(第六天魔王) | 3 |
\\n广东雨神 | 3 |
\\nRZK | 3 |
\\nrxrj | 3 |
\\n枫雪动漫 | 3 |
\\nYURASUKA | 3 |
\\n【神秘巨星CI】 | 3 |
\\nGIF出处系列 | 3 |
\\nhttps://www.terralibera.net/ | 3 |
\\ndioguitar23@dio66.net | 3 |
\\ndioguitar23(第六天魔王)@hotavxxx.com | 3 |
\\n萌你一脸@第一会所 | 3 |
\\n罗马教皇@草榴社区 luckjam@sexinsex.net | 3 |
\\n么么哒 | 3 |
\\nXP1024 | 3 |
\\nnyaa.si | 3 |
\\nuid-346380 | 3 |
\\nDownload from Sajber.org/blog | 3 |
\\n美女裸聊约炮 | 3 |
\\n@微信订阅号专注稀有汁源 | 3 |
\\nsusun=eastv | 3 |
\\nM88(明陞) | 3 |
\\nrh2048.com/ | 3 |
\\n99BT工厂 @ 5120911 | 3 |
\\n衣选集团 | 3 |
\\nb'\\\\xc1\\\\xf9\\\\xd4\\\\xc2\\\\xcc\\\\xec\\\\xbf\\\\xd5' | 3 |
\\n【RV原创】【sex8.cc】 | 3 |
\\nGfker@1024核工廠 | 3 |
\\nb'99\\\\xa5\\\\xfd\\\\xa5\\\\xcd' | 3 |
\\n漫之学园 | 3 |
\\nhttps://DesignOptimal.com | 3 |
\\n9200 | 3 |
\\n安西教练 | 3 |
\\n尘封追忆+色十八 | 3 |
\\nzgome@18p2p | 2 |
\\n顶冠文化 | 2 |
\\nMN Nambiar @ TamilBlasters.Net | 2 |
\\n老司机 | 2 |
\\ndioguitar23.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 2 |
\\nhttps://media.defcon.org/ | 2 |
\\nhttps://sexasia.net/feed | 2 |
\\n黑色点击 | 2 |
\\nhttp://www.acgyinghua.com/ | 2 |
\\n嗨咻阁 | 2 |
\\nLucian2009@第一会所 | 2 |
\\ndioguitar23(第六天魔王)@bbs.hotavxxx.com | 2 |
\\nroger92402094 | 2 |
\\nlxdng1218 | 2 |
\\n飘嫖 | 2 |
\\n红馆-红人馆-网络红人之家 | 2 |
\\nCHANNEL NEO | 2 |
\\nccc32.com | 2 |
\\nchikan | 2 |
\\n神秘巨星CI | 2 |
\\ndioguitar23(第六天魔王)@dio999.com | 2 |
\\n注册就送39元,联系:330545486 | 2 |
\\nb'\\\\xb7\\\\xf6\\\\xba~\\\\xad\\\\xd1\\\\xbc\\\\xd6\\\\xb3\\\\xa1@\\\\xb4A\\\\xab\\\\xbd\\\\xa8\\\\xe0' | 2 |
\\nITELLYOU | 2 |
\\n联系TG:yyllzy,fulihuoqu | 2 |
\\n強片皇帝999 | 2 |
\\nsogclub No.2 | 2 |
\\nD2mp4 | 2 |
\\nmmklp@第一会所 | 2 |
\\nssss1111@18p2p | 2 |
\\nbbvc | 2 |
\\n感冒清@sis001 | 2 |
\\nafnami@64.78.163.55 | 2 |
\\n西門吹水 | 2 |
\\ngoldpuzjying | 2 |
\\nuid=1591117 | 2 |
\\n[http://rudub.tv] RuDub.TV | 2 |
\\nGF@1024核工廠 | 2 |
\\nwww.javhdbbs.com | 2 |
\\n蜂鸟色区 | 2 |
\\nb'\\\\xb3\\\\xc7\\\\xca\\\\xd0\\\\xefL\\\\xc7\\\\xe9~\\\\xc4\\\\xa7\\\\xbd\\\\xe4\\\\xd4\\\\xad\\\\x84\\\\x93' | 2 |
\\n[http://energy-torrent.com] Energy-Torrent | 2 |
\\nSoushkinBoudera | 2 |
\\n[http://bko.baibako.tv] BaibaKo.TV | 2 |
\\nWestern/HD-Jiggly | 2 |
\\n冷月无声 | 2 |
\\n奥利给 | 2 |
\\nb'\\\\xab\\\\xb0\\\\xa5\\\\xab\\\\xad\\\\xb7\\\\xb1\\\\xa1~\\\\xa4p\\\\xb9t\\\\xad\\\\xec\\\\xb3\\\\xd0' | 2 |
\\nb'tanw\\\\xa9\\\\xceyk3325@www.sogclub.com' | 2 |
\\n3Li | 2 |
\\nb'giogio99\\\\xad\\\\xec\\\\xb3\\\\xd0' | 2 |
\\nBradPitt | 2 |
\\n遁去的壹 | 2 |
\\ndownloadcursos.top | 2 |
\\nKTXP_秋沫 | 2 |
\\nxinnian | 2 |
\\n18p2p by_UID 1380364 | 2 |
\\nhttps://bbs2048.org/ | 2 |
\\nhttps://www.1024btgc.com | 2 |
\\n清雨 | 2 |
\\ncrazylazy | 2 |
\\n感冒清@sis001.com | 2 |
\\nMingYSub | 2 |
\\n淘宝天猫优惠券秒杀 | 2 |
\\nDownloaded from CracksHash.com | 2 |
\\n会飞的象@第一会所 | 2 |
\\nmule_by_SpeedPluss.ORG | 2 |
\\nhttps://rutor.org | 2 |
\\nBT伙计 | 2 |
\\nhhd800.com | 2 |
\\ngnhyc11@18p2p.com | 1 |
\\nfyoulapk@18p2p | 1 |
\\n塔卡小爹賽 | 1 |
\\nHD一条街论坛 | 1 |
\\ndioguitar23原創 | 1 |
\\nb'\\\\xb3\\\\xce\\\\xbf\\\\xd5\\\\xd1\\\\xa7\\\\xd4\\\\xb0' | 1 |
\\ncnmzlwb | 1 |
\\nzb77@18p2p | 1 |
\\nhttps://www.asmr.one/work/RJ374870 | 1 |
\\n[uid-1591117] | 1 |
\\n奈特羅德 | 1 |
\\nhttps://mega.nz/#F!DK4lCSwB!QdwaMCT3SpOxISAgnuX7nQ | 1 |
\\n小葫芦@www.sis001.com | 1 |
\\n柏林没有梦 | 1 |
\\nls611 | 1 |
\\nqqtnt007 | 1 |
\\n3E523E31D247_by_FDZone.ORG | 1 |
\\nJPopsuki 2.0 626225292 | 1 |
\\nhttps://elamigosedition.com/ | 1 |
\\nguroemon | 1 |
\\nlyf634041775 | 1 |
\\n1234567890 | 1 |
\\nhttps://bitnova.info/ | 1 |
\\nasfile@SIS001 | 1 |
\\nb'\\\\xbd\\\\xad\\\\xc4\\\\xcf\\\\xb7\\\\xe7\\\\xd3\\\\xea' | 1 |
\\nmikocon @ bbs.2djgame.net | 1 |
\\nhttp://mm.aayun.cc | 1 |
\\naqcd123 | 1 |
\\n维尼 | 1 |
\\niii | 1 |
\\npornolab | 1 |
\\n极影字幕 | 1 |
\\nb'\\\\xc9\\\\xab\\\\xd6\\\\xd0\\\\xc9\\\\xab@ypzhq\\\\xd4\\\\xad\\\\xb4\\\\xb4' | 1 |
\\nroger92402094(SIS) | 1 |
\\nerest | 1 |
\\nBaslilon=Baslilon23 | 1 |
\\nb'\\\\xab\\\\xb0\\\\xa5\\\\xab\\\\xad\\\\xb7\\\\xb1\\\\xa1 dioguitar23 \\\\xad\\\\xec\\\\xb3\\\\xd0' | 1 |
\\nsigma | 1 |
\\n寂寞如漫天雪花 | 1 |
\\nC:\\\\Users\\\\pongphon\\\\OneDrive\\\\Desktop\\\\New folder (2)\\\\FC2PPV 1218169 [Odorless video] [Leaked] JULIA High image quality BEB-016 JULIA Sweaty Backroom .ts | 1 |
\\nJPopsuki 2.0 2131292835 | 1 |
\\n不予@暗香阁 | 1 |
\\nsogclub No.2 BY sogclub | 1 |
\\nuid-1591117 | 1 |
\\nb'\\\\xba\\\\xda\\\\xc2\\\\xfb\\\\xb0\\\\xc5' | 1 |
\\n微信一夜ONS协会 | 1 |
\\nb'KUHO\\\\xd2\\\\xd5\\\\xca\\\\xf5\\\\xc1\\\\xaa\\\\xc3\\\\xcb' | 1 |
\\nb'\\\\xb6\\\\xc0\\\\xa5i\\\\xa8\\\\xe0_by_FDZone.org' | 1 |
\\n中文字幕無水印 | 1 |
\\nhttp://www.wozai020.com | 1 |
\\nsop168 | 1 |
\\nb'SP\\\\xa7\\\\xe4\\\\xbc\\\\xd6\\\\xa4l@\\\\xaa\\\\xe1\\\\xa9M\\\\xa9|' | 1 |
\\ntiantianlu186@公仔箱論壇 | 1 |
\\nluckyjune | 1 |
\\nSK`|yEsMan<sk·> | 1 |
\\nb'@aaming2002@\\\\xa3\\\\xa2\\\\xb3\\\\xd5\\\\xba\\\\xba\\\\xa3\\\\xa2\\\\xc9\\\\xab\\\\xd6\\\\xd0\\\\xc9\\\\xab\\\\xa3\\\\xa2\\\\xc3\\\\xce\\\\xb9\\\\xab\\\\xd4\\\\xb0\\\\xa3\\\\xa2MimiP2P\\\\xa3\\\\xa2\\\\xa3\\\\xc4.\\\\xa3\\\\xc3P2P\\\\xa3\\\\xa2WaiKeungSite\\\\xa3\\\\xa2p2pZONE\\\\xa3\\\\xa2Mr.P2P\\\\xa3\\\\xa2' | 1 |
\\nhkkane@18p2p | 1 |
\\nwww.4hu.com | 1 |
\\nb'\\\\xaeL\\\\xaa\\\\xef\\\\xacK@99p2p' | 1 |
\\n夜蒅星宸@第一会所 | 1 |
\\n【更多资源用加手机QQ-17182252050】 | 1 |
\\njjjhn2003@18p2p | 1 |
\\nXIEYUXIA | 1 |
\\nb'@\\\\xc0\\\\xcb\\\\xb7\\\\xad\\\\xd4\\\\xc6@' | 1 |
\\nwww.dio889.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 1 |
\\nTYBBX2 | 1 |
\\nyjs521 | 1 |
\\nhhbb_zcm | 1 |
\\ntwsb.co | 1 |
\\nhttps://downloadcursos.top | 1 |
\\nhttps://www.musicastorrent.com/ | 1 |
\\npandafood#panda1314#gg5123 獨家首發 | 1 |
\\n探花族 | 1 |
\\nzhoudehua200 | 1 |
\\nAV大平台 - 发布页 | 1 |
\\nb'tanw\\\\xa9\\\\xceyk3325' | 1 |
\\nRivera@18p2p.com | 1 |
\\nb'\\\\xd7\\\\xcf\\\\xc3\\\\xb5\\\\xb9\\\\xe5' | 1 |
\\n[kp.m-team.cc] M-Team - TP | 1 |
\\nwww.spankhash.com | 1 |
\\nUID 235465@www.mimip2p.net | 1 |
\\n草榴社区@MianSheng | 1 |
\\nСтранник | 1 |
\\nhgr168168 | 1 |
\\nBJ | 1 |
\\nmecaca | 1 |
\\n昆仑虚之巅@草榴社區 | 1 |
\\n[欧美美@草榴社区] | 1 |
\\n没线的风筝 | 1 |
\\n尼尼撸-综合网站 | 1 |
\\n100%真人激情裸聊 www.78xo.com | 1 |
\\njettej | 1 |
\\nDaddy | 1 |
\\ndiamond | 1 |
\\n中文片库 | 1 |
\\nhttps://worldmkv.com | 1 |
\\nb'yatsingkoon@\\\\xa1\\\\xb9\\\\xb6q\\\\xb3c\\\\xa4\\\\xc0\\\\xa8\\\\xc9\\\\xbd\\\\xd7\\\\xbe\\\\xc2\\\\xa1\\\\xb9' | 1 |
\\n入微 | 1 |
\\nhttps://discord.com/invite/wweVHZd6qg | 1 |
\\n602@第一会所 | 1 |
\\n3484988vikci@第一会所 | 1 |
\\nevilzy | 1 |
\\n化骨龍 | 1 |
\\nhttps://www.kobo.com/ebook/an-archdemon-s-dilemma-how-to-love-your-elf-bride-volume-13 | 1 |
\\ncqkd_czy | 1 |
\\n不辣de皮特 | 1 |
\\nkaito | 1 |
\\nu3c3.com | 1 |
\\n☆影视帝国论坛☆ | 1 |
\\naaa23 | 1 |
\\nhevcbay.com | 1 |
\\ngn7650104 | 1 |
\\n老舅电影 | 1 |
\\n捕鼠人 | 1 |
\\nhttps://www.gamestorrents.nu/ | 1 |
\\nAidoru-Online | 1 |
\\n公主殿下@第一會所 | 1 |
\\nMP4BA电影网 | 1 |
\\nb'\\\\xb8\\\\xb4\\\\xbb\\\\xee126' | 1 |
\\n微信公众号:卡其影视分享 | 1 |
\\n百虎动画 | 1 |
\\n425307@癡漢俱樂部 | 1 |
\\navp2p | 1 |
\\nGIFchuchushipin | 1 |
\\nEndlesSea | 1 |
\\nTanhuazu-探花族 | 1 |
\\n推特搞啥呢 | 1 |
\\n@K8bet.io@ | 1 |
\\nMisfits | 1 |
\\n黑暗虫洞 | 1 |
\\nmagazinesbb.com | 1 |
\\nb'\\\\xc9\\\\xab\\\\xd6\\\\xd0\\\\xc9\\\\xab\\\\xd5\\\\x93\\\\x89\\\\xaf@www.SIS.xxx' | 1 |
\\n草榴社区@z10271 | 1 |
\\n冰封爱河 | 1 |
\\nb'[http://www.uniongang.net] \\\\xd4\\\\xe8\\\\xeb\\\\xfc\\\\xec\\\\xfb \\\\xee\\\\xf2 ELEKTRI4KA | \\\\xdd\\\\xcb\\\\xc5\\\\xca\\\\xd2\\\\xd0\\\\xc8\\\\xd7\\\\xca\\\\xc0 \\\\xed\\\\xe0 Uniongang' | 1 |
\\nzhangqq789@第一会所 | 1 |
\\nwangye6 | 1 |
\\nann@myfun4u.org | 1 |
\\nkino9999@18p2p | 1 |
\\nb'CHD\\\\xc1\\\\xaa\\\\xc3\\\\xcb' | 1 |
\\nsatu@hongfire | 1 |
\\npolee | 1 |
\\nGM3089@18P2P | 1 |
\\nBT工厂 @ 5120911 | 1 |
\\n【U6A6.COM】_全网磁力最快更新 | 1 |
\\nsklc-P2P101.COM | 1 |
\\nb'\\\\xb0\\\\xcb\\\\xd6\\\\xd8\\\\xf7\\\\xec' | 1 |
\\nb'\\\\xcc\\\\xda\\\\xb7\\\\xc9\\\\xd4\\\\xda\\\\xcf\\\\xdf' | 1 |
\\nb'doa_o[\\\\xb9\\\\xc5\\\\xce\\\\xef\\\\xce\\\\xdd]' | 1 |
\\n缘聚岛 | 1 |
\\n素人辣妹正妹報報 | 1 |
\\nb'sweetsmile@CHD\\\\xc1\\\\xaa\\\\xc3\\\\xcb' | 1 |
\\njavtv.me | 1 |
\\nzhaochuan99 | 1 |
\\n草榴社区 | 1 |
\\n四魂制作组 | 1 |
\\n动漫花園 | 1 |
\\nView my conspiracy torrents at | 1 |
\\n春卅娘@18p2p | 1 |
\\n1024核工厂最新地址 | 1 |
\\nJPopsuki 2.0 904012437 | 1 |
\\nwearebest@18P2P | 1 |
\\nHTCdesireHD@第一會所 | 1 |
\\n11.55 | 1 |
\\nshinjico | 1 |
\\n得得撸 www.dedelu.com | 1 |
\\nWestern&HD-Jiggly | 1 |
\\nningchia | 1 |
\\nfilelist.ro | 1 |
\\ndengzhi123_by_FDZone.ORG | 1 |
\\nb'\\\\xab\\\\xb0\\\\xa5\\\\xab\\\\xad\\\\xb7\\\\xb1\\\\xa1 dioguitar23(\\\\xb2\\\\xc4\\\\xa4\\\\xbb\\\\xa4\\\\xd1\\\\xc5]\\\\xa4\\\\xfd)\\\\xad\\\\xec\\\\xb3\\\\xd0' | 1 |
\\nHZHJS | 1 |
\\nAudible | 1 |
\\nskyuz | 1 |
\\never | 1 |
\\nEl tio WAPILLO :v | 1 |
\\n草莓TV | 1 |
\\n加菲豆@第一会所 | 1 |
\\nyaoshiqiao | 1 |
\\nPB | 1 |
\\nb'\\\\xb9\\\\xda\\\\xa4\\\\xbd\\\\xb6\\\\xe9\\\\xaeT\\\\xbc\\\\xd6\\\\xa4u\\\\xa7{@p16847' | 1 |
\\n54CECB5A0EA7_by_FDZone.ORG | 1 |
\\nb'\\\\xc0\\\\xcb\\\\xd7\\\\xd3\\\\xd0\\\\xa1\\\\xb5\\\\xb6' | 1 |
\\nrendell_by_mimip2p.net, rendellxx_by_fdzone.org, rendell@SexInSex! | 1 |
\\nhttps://e-hentai.org | 1 |
\\nhttps://to-url.com/torrent-igruha | 1 |
\\njinzebin86@18p2p.com | 1 |
\\nbirdmanfocker@18p2p | 1 |
\\nGH37DgaBef6rQJyE2nvqb5YpS | 1 |
\\nAVdian@126.com | 1 |
\\n亞瑟王 | 1 |
\\nb'Bianca_Cooper_Touch99.com \\\\xa6\\\\xb3\\\\xa7\\\\xf3\\\\xa6h\\\\xa6n\\\\xb9\\\\xcf' | 1 |
\\nwT3j6PNrC5aOcD04yJ7xRotF8 | 1 |
\\n村花论坛 | 1 |
\\nb'\\\\xc4\\\\xfa_\\\\x89\\\\xf4\\\\xb9\\\\xab\\\\x88@\\\\x8a\\\\xca\\\\x98\\\\xb7\\\\xb9\\\\xa4\\\\xb7\\\\xbb' | 1 |
\\nFISH321@18P2P | 1 |
\\n第一会所 sis001 | 1 |
\\nhuPE@18P2P | 1 |
\\nhoulai=biaoqian | 1 |
\\nb'qilibi@\\\\xc1\\\\xf9\\\\xd4\\\\xc2\\\\xc2\\\\x93\\\\xc3\\\\xcb' | 1 |
\\n天池妖尊 | 1 |
\\nsing0212000 | 1 |
\\nwandy_by_FDZone.org | 1 |
\\nXO@kazamis | 1 |
\\n百撸社区|高清影片 | 1 |
\\nKOOK | 1 |
\\nHQC | 1 |
\\nmc733 | 1 |
\\n爱游戏 | 1 |
\\n1158012^@^18p2p | 1 |
\\nb'Bianca_Cooper \\\\xa7\\\\xf3\\\\xa6h\\\\xac\\\\xfc\\\\xb9\\\\xcf\\\\xa5u\\\\xa6bTouch99' | 1 |
\\nxiaocuitj | 1 |
\\n星星不舔屄 | 1 |
\\nhttps://www.crnaberza.com CrnaBerza | 1 |
\\nboby@mimip2p | 1 |
\\nmagnet360@163.com | 1 |
\\nJapanadultvideos 論壇 <-----按此瀏覽更多 | 1 |
\\n[http://x-torrents.nu] X-Torrents.org | 1 |
\\neuphoricer | 1 |
\\n2048核基地!! | 1 |
\\nzlb273692399@第一会所 | 1 |
\\n花和尚 | 1 |
\\nb'\\\\xb4\\\\xbf\\\\xb0\\\\xae\\\\xc9\\\\xe7\\\\xc7\\\\xf8/wbzt' | 1 |
\\n三石@第一会所 | 1 |
\\nJackyCheung@草榴社區 | 1 |
\\nb'\\\\xbf\\\\xe7\\\\xca\\\\xa1\\\\xbe\\\\xdc\\\\xb7\\\\xf1@9999999' | 1 |
\\n菜牙电影网 | 1 |
\\nmehappy2012 | 1 |
\\nhttps://www.jp.square-enix.com/music/sem/page/chrono/trigger_revival/ | 1 |
\\nScientists used to invent telephones, airplanes, microwave ovens... now all they invent is statistics that say they should get more funding. | 1 |
\\nRoxMarty | 1 |
\\nrczhi@18p2p.com | 1 |
\\nkkk8568 | 1 |
\\nkenan2763 | 1 |
\\narthurwarlike@第一会所 | 1 |
\\nb'\\\\xb3\\\\xc7\\\\xca\\\\xd0\\\\xefL\\\\xc7\\\\xe9~~\\\\xcb\\\\xba\\\\xd2\\\\xb9\\\\xd4\\\\xad\\\\x84\\\\x93' | 1 |
\\n東方明珠=ccvvm | 1 |
\\n从小缺钙 | 1 |
\\nJackie | 1 |
\\nwww.lupola.com | 1 |
\\nashow.cc | 1 |
\\n品色影院 | 1 |
\\n8400327@草榴社區 | 1 |
\\ngamezealot@18p2p | 1 |
\\nuhla454@第一会所 | 1 |
\\n宅鱼 | 1 |
\\n1024核工厂 Bt7086 | 1 |
\\nhilllxs | 1 |
\\n豺狼也柔情 | 1 |
\\n99堂 | 1 |
\\n老肥 | 1 |
\\nChikyuji-Animes, 2006 maggle! | 1 |
\\nchaorentwo@18p2p | 1 |
\\n若無其事@18p2p.com | 1 |
\\nhhd000.com | 1 |
\\n掠风窃尘 | 1 |
\\nb'\\\\xd3\\\\xd5\\\\xbb\\\\xf3\\\\xd3\\\\xe9\\\\xc0\\\\xd6\\\\xcd\\\\xf8\\\\xb5\\\\xe3\\\\xbb\\\\xf7\\\\xbd\\\\xf8\\\\xc8\\\\xeb \\\\xa8w\\\\xec\\\\xe1\\\\xbf\\\\xa1\\\\xc9\\\\xd9\\\\xec\\\\xe1\\\\xa8w' | 1 |
\\nKura999 from WaikeungBBS | 1 |
\\nXFSUB | 1 |
\\nhuiasd | 1 |
\\nb'Rory @ D.C.\\\\xb8\\\\xea\\\\xb0T\\\\xa5\\\\xe6\\\\xacy\\\\xba\\\\xf4' | 1 |
\\nhttps://t.me/deletetvwrestling | 1 |
\\ndodododo | 1 |
\\nRambo@18p2p | 1 |
\\nb'\\\\xce\\\\xde\\\\xd0\\\\xc4\\\\xce\\\\xde\\\\xb4\\\\xe6' | 1 |
\\nfilmplay | 1 |
\\navdian@126.com | 1 |
\\n1025 | 1 |
\\n956828@18p2p | 1 |
\\n夜游神 | 1 |
\\nb'\\\\xb2\\\\xbb\\\\xb5\\\\xc3\\\\xb2\\\\xbb\\\\xc9\\\\xab' | 1 |
\\nvbiukj | 1 |
\\nbuxxa=bbvc | 1 |
\\njnd16d | 1 |
\\n烽火不熄 | 1 |
\\npietro716 | 1 |
\\nLus | 1 |
\\nb'\\\\x98Y\\\\xd4\\\\xad\\\\xa4\\\\xe6\\\\x97@' | 1 |
\\n國產無碼 | 1 |
\\nb'\\\\xd0\\\\xc2\\\\xc7\\\\xd7\\\\xc3\\\\xdc\\\\xb0\\\\xae\\\\xc8\\\\xcb\\\\xc2\\\\xdb\\\\xcc\\\\xb3@\\\\xd6\\\\xc1\\\\xd7\\\\xf0\\\\xcc\\\\xec\\\\xc1\\\\xfa' | 1 |
\\nwangzhifeng@18p2p | 1 |
\\ndabohong_by_fdzone.org | 1 |
\\nTODO | 1 |
\\nb'\\\\xb7\\\\xc9\\\\xd3\\\\xb0\\\\xbf\\\\xcd\\\\xcd\\\\xf8' | 1 |
\\nyav.me | 1 |
\\nhttp://www.jizhang1.space/?3316427 | 1 |
\\npin0314(1470)@www.mycould.com | 1 |
\\nhandsomemouse@18p2p | 1 |
\\nb'\\\\xa4\\\\xc6\\\\xb0\\\\xa9\\\\xc0s@mimip2p' | 1 |
\\n面瘫 | 1 |
\\n弄死你娃L@2018x.win | 1 |
\\nyyyyyuuuuu@18p2p | 1 |
\\n狼主@SexInSex.net | 1 |
\\n1394130143@第一会所 | 1 |
\\njove | 1 |
\\n电骡爱好者 | 1 |
\\nwestkyo@www.sis001.com | 1 |
\\nlzmcmbj@18p2p | 1 |
\\ndioguitar23(第六天魔王)@dioguitar23.me | 1 |
\\nVISTOR_by_FDZone.ORG | 1 |
\\nchris930 | 1 |
\\n[WMAN-LorD] [UHD] [4K] [2160p] [REAL4K] [TGx] | 1 |
\\nb'A\\\\xab\\\\xac\\\\xa4\\\\xa3\\\\xa8}\\\\xc3\\\\xc8' | 1 |
\\nb'\\\\xb8\\\\xfc\\\\xb6\\\\xe0\\\\xb8\\\\xfc\\\\xd0\\\\xc2\\\\xb5\\\\xe7\\\\xd3\\\\xb0\\\\xcf\\\\xc2\\\\xd4\\\\xd8\\\\xc7\\\\xeb\\\\xb5\\\\xe3\\\\xbb\\\\xf7\\\\xd5\\\\xe2\\\\xc0\\\\xef' | 1 |
\\nDomaha.tv | 1 |
\\ndestiny999@18p2p | 1 |
\\n水母飄 | 1 |
\\nHOUSEKEEPER | 1 |
\\nRV原创组 | 1 |
\\n月岚星辰520@第一会所 | 1 |
\\nb'\\\\xc3\\\\xe2\\\\xb7\\\\xd1\\\\xd4\\\\xda\\\\xcf\\\\xdf\\\\xd2\\\\xf4\\\\xc0\\\\xd6' | 1 |
\\nwww.1024pk.com | 1 |
\\n爱城 | 1 |
\\namge50@www.sogclub.com | 1 |
\\nOneStar | 1 |
\\nb'Jocky123#\\\\xb8\\\\xfc\\\\xb6\\\\xe0\\\\xb5\\\\xc4\\\\xbe\\\\xab\\\\xb2\\\\xca\\\\xd3\\\\xb0\\\\xc6\\\\xac!' | 1 |
\\nhttps://getcomics.info | 1 |
\\n点击-海量种子 | 1 |
\\nbtziyuan | 1 |
\\n[http://x-torrents.org] X-Torrents.org (ex X-Torrents.ru) | 1 |
\\nhttps://www.lspback.com | 1 |
\\nfoxmoder996 | 1 |
\\nhttps://share.dmhy.org/topics/list/user_id/712935 | 1 |
\\n玛尔亲王@第一会所 | 1 |
\\nrtjhuytu | 1 |
\\n淨空法師專集網站 | 1 |
\\nb'\\\\xa1\\\\xb6\\\\xbd\\\\xcc\\\\xd3\\\\xfd\\\\xca\\\\xd6\\\\xc0\\\\xad\\\\xca\\\\xd6\\\\xa1\\\\xb7' | 1 |
\\nmc733+zgome | 1 |
\\nGoddess | 1 |
\\nNikeのB@第一会所 | 1 |
\\nb'dvt\\\\xb0\\\\xc9' | 1 |
\\n微博:止于影书,公众号:影遇见书,@小鱼 | 1 |
\\nfree4 | 1 |
\\n靜風@sis001 | 1 |
\\nkaniuniu | 1 |
\\ndcsk_By_FDZone.org | 1 |
\\nsigma@www.mimip2p.com | 1 |
\\n看翍荭尘 | 1 |
\\nbjiok | 1 |
\\nlins2b | 1 |
\\n小馬克_by_FDZone.ORG | 1 |
\\nFSFS555@第一会所 | 1 |
\\nflowerff | 1 |
\\nlascruces | 1 |
\\n?nike? | 1 |
\\nSEX8.CC | 1 |
\\nb'\\\\xb3\\\\xc9\\\\xc8\\\\xcb\\\\xc2\\\\xdb\\\\xcc\\\\xb3\\\\xbf\\\\xaa\\\\xb7\\\\xc5\\\\xd7\\\\xa2\\\\xb2\\\\xe1' | 1 |
\\ndio889.net(第六天魔王)@最新AV海量免費播放~魔王在線 | 1 |
\\nAPKMAZA.CO | 1 |
\\n13121152@18p2p | 1 |
\\nUID 185363@www.mimip2p.com | 1 |
\\nb'\\\\xa4^\\\\xa4\\\\xa2\\\\xb5\\\\xbe@FDZone.org' | 1 |
\\n更多资源联系qq1273288348 | 1 |
\\nhttps://nyaa.si/user/mrshowoff | 1 |
\\nhttps://boards.4channel.org/h/#s=hentai+upscales | 1 |
\\nmimu@18P2P | 1 |
\\nb'\\\\xd7\\\\xd3\\\\xc7\\\\xe9 \\\\xd7\\\\xa3\\\\xba\\\\xd8\\\\xc9\\\\xab\\\\xd6\\\\xd0\\\\xc9\\\\xab \\\\xcb\\\\xc4\\\\xd6\\\\xdc\\\\xc4\\\\xea \\\\xcc\\\\xd8\\\\xb1\\\\xf0\\\\xcb\\\\xae\\\\xd3\\\\xa1\\\\xd1\\\\xb9\\\\xd6\\\\xc6' | 1 |
\\n殇情 | 1 |
\\n风来西林 | 1 |
\\nwww.loliba.info | 1 |
\\nb'Nike\\\\xa4\\\\xce\\\\xa3\\\\xc2' | 1 |
\\n[www.pttime.org] PT时间 | 1 |
\\nQxR | 1 |
\\nsunchiua_by_P2Pzone.org | 1 |
\\nwazx528 | 1 |
\\npopgofansub | 1 |
\\nb'\\\\xc3\\\\xe2\\\\xb7\\\\xd1\\\\xb5\\\\xe7\\\\xd3\\\\xb0\\\\xcf\\\\xc2\\\\xd4\\\\xd8\\\\xbb\\\\xf9\\\\xb5\\\\xd8' | 1 |
\\ngremichaem | 1 |
\\nb'\\\\xd0\\\\xc7\\\\xb3\\\\xbd\\\\xd0\\\\xa1\\\\xb7\\\\xe7\\\\xa3\\\\xa6\\\\xbe\\\\xab\\\\xc9\\\\xf1\\\\xc9\\\\xab\\\\xcb\\\\xd8\\\\xa3\\\\xa6cookiexp\\\\xa3\\\\xc0\\\\xd1\\\\xb0\\\\xba\\\\xfc\\\\xc9\\\\xe7\\\\xc7\\\\xf8' | 1 |
\\nsukebei.nyaa.si | 1 |
\\npademon18p2p | 1 |
\\naaamfk+zgome+bbryans | 1 |
\\ncyxy@http://38.114.38.172/forum/ | 1 |
\\nb'\\\\xd3\\\\xd7\\\\xc5\\\\xae\\\\xbc\\\\xab\\\\xc6\\\\xb7' | 1 |
\\nhttps://e-hentai.org/g/2375721/1b5e081312/ | 1 |
\\n18P2P_dioguitar23.co(第六天魔王)@最新AV海量免費播放~魔王在線 | 1 |
\\nb'AV\\\\xce\\\\xc4\\\\x99n\\\\xa3\\\\xfcADULT INTEGRATED COMMUNITY' | 1 |
\\nUID 1357210@18P2P.com | 1 |
\\nfuckkkingou | 1 |
\\n闲云野鹤 | 1 |
\\nLAPUMiA.NeT | 1 |
\\nadult_cn | 1 |
\\npsoke | 1 |
\\n18p2p@liyang8926 | 1 |
\\nlittlefatbee | 1 |
\\n秋叶TV | 1 |
\\nmsy91 | 1 |
\\nNiraya | 1 |
\\nhttps://www.kobo.com/ebook/that-time-i-got-reincarnated-as-a-slime-vol-13-light-novel | 1 |
\\nJPopsuki 2.0 941661648 | 1 |
\\nyamyedye@18P2P | 1 |
\\ndansnow | 1 |
\\nH2CO3 | 1 |
\\nb'\\\\x8e\\\\xf7\\\\x8e\\\\xf7@\\\\x88\\\\xc3\\\\x91\\\\xe9\\\\x9a\\\\xa0\\\\x8c\\\\xb4\\\\x91n' | 1 |
\\nkamigami | 1 |
\\nG@1024核工廠 | 1 |
\\nThe Seaside Corpse | 1 |
\\nb'\\\\xadw\\\\xbd\\\\xde_by_FDZone.ORG' | 1 |
\\nfangbayern | 1 |
\\n君乐 | 1 |
\\nDoctor Who | 1 |
\\n第一流氓@18P2P | 1 |
\\nDeviloid.net | 1 |
\\nb'\\\\xc1\\\\xf9\\\\xd4\\\\xc2\\\\xc1\\\\xaa\\\\xc3\\\\xcb hgfhgf' | 1 |
\\nwcer@18p2p.com | 1 |
\\nhttps://www.yitarx.com | 1 |
\\nwuchengzhou9000@www.SexInSex.net | 1 |
\\nnwcd | 1 |
\\np2p_user@mimip2p | 1 |
\\nzza@live.com | 1 |
\\n清风浪子@草榴社区 | 1 |
\\nhttp://www.zone54.com | 1 |
\\nssan998 | 1 |
\\nxxfhd.com | 1 |
\\nmybmw320_by_SpeedPluss.ORG | 1 |
\\nwoaibt@1024核工厂 | 1 |
\\nb'[http://www.uniongang.tv] \\\\xd4\\\\xe8\\\\xeb\\\\xfc\\\\xec\\\\xfb \\\\xee\\\\xf2 ELEKTRI4KA | \\\\xdd\\\\xcb\\\\xc5\\\\xca\\\\xd2\\\\xd0\\\\xc8\\\\xd7\\\\xca\\\\xc0 \\\\xed\\\\xe0 Uniongang' | 1 |
\\nhegongc163 | 1 |
\\nbigwai | 1 |
\\nt66y | 1 |
\\ncctc55 | 1 |
\\ntto@18P2P | 1 |
\\nAntidot Team | 1 |
\\nTorrent Galaxy | 1 |
\\n萤火虫IT服务全国连锁 | 1 |
\\n葬爱@18p2p | 1 |
\\n贴心话 | 1 |
\\nxuerui810405 | 1 |
\\nSoulSeek | 1 |
\\nabbt@18p2p.com | 1 |
\\n深深可许@第一会所 | 1 |
\\nlixuhua | 1 |
\\nb'\\\\xcc\\\\x93\\\\x9fo' | 1 |
\\nanimekayo.com | 1 |
\\nqiupianhao | 1 |
\\n173489627 | 1 |
\\nwak11110@18P2P | 1 |
\\n[http://hdtracker.org] HD TRACKER | 1 |
\\nwww.eien-acg.com | 1 |
\\nindex0123 | 1 |
\\nhndwje | 1 |
\\nhttp://www.meitubb.com/forum.php | 1 |
\\n最新地址 | 1 |
\\nhttps://anidb.net/file/3082403 | 1 |
\\n更多精彩 @ 卡卡拉 | 1 |
\\nolo@第一会所 | 1 |
\\nhttps://e-hentai.org/g/2255154/778b4d24e6/ | 1 |
\\nsujinding@第一会所 | 1 |
\\nMKO | 1 |
\\nchleicool=fym0624=patpat608 | 1 |
\\n撸二九论坛 | 1 |
\\nflybird186 | 1 |
\\nb'[http://hdclub.org] \\\\xd2\\\\xf0\\\\xe5\\\\xea\\\\xe5\\\\xf0 HDClub - \\\\xf1\\\\xea\\\\xe0\\\\xf7\\\\xe0\\\\xf2\\\\xfc \\\\xe1\\\\xe5\\\\xf1\\\\xef\\\\xeb\\\\xe0\\\\xf2\\\\xed\\\\xee \\\\xf4\\\\xe8\\\\xeb\\\\xfc\\\\xec\\\\xfb HD, \\\\xf1\\\\xea\\\\xe0\\\\xf7\\\\xe0\\\\xf2\\\\xfc Blu-ray \\\\xf4\\\\xe8\\\\xeb\\\\xfc\\\\xec\\\\xfb, HD DVD \\\\xe8 HD audio, HDTV \\\\xf2\\\\xee\\\\xf0\\\\xf0\\\\xe5\\\\xed\\\\xf2' | 1 |
\\nhttps://www.omgyes.com | 1 |
\\nDVD 2008 | 1 |
\\nb'[http://uniongang.tv] \\\\xd4\\\\xe8\\\\xeb\\\\xfc\\\\xec\\\\xfb \\\\xee\\\\xf2 ELEKTRI4KA | \\\\xdd\\\\xcb\\\\xc5\\\\xca\\\\xd2\\\\xd0\\\\xc8\\\\xd7\\\\xca\\\\xc0 \\\\xed\\\\xe0 Uniongang' | 1 |
\\n>亞捷視圖< | 1 |
\\nb'\\\\xb9\\\\xfd\\\\xc5\\\\xab\\\\xd6\\\\xc6\\\\xd4\\\\xec\\\\xb2\\\\xa9\\\\xbf\\\\xcd' | 1 |
\\n3267506 | 1 |
\\n中国电信 | 1 |
\\n9clonely | 1 |
\\nb'\\\\xd2\\\\xf9\\\\xc3\\\\xf1\\\\xcd\\\\xf2\\\\xcb\\\\xea' | 1 |
\\n幸运流星@四仔论坛 | 1 |
\\nLista Espiritualista | 1 |
\\n雪光梦想 | 1 |
\\nhttps://exhentai.org/g/1964478/8ed0a899ca | 1 |
\\nolo@sis001 | 1 |
\\n3zi@第一會所 | 1 |
\\nAndy | 1 |
\\nb'\\\\xb7\\\\xd6\\\\xcf\\\\xed' | 1 |
\\n24262830. | 1 |
\\n食色性者 | 1 |
\\naj11@mimip2p.net | 1 |
\\nsrwH | 1 |
\\n鴻仔 | 1 |
\\n校园迷糊大王 | 1 |
\\nWCG | 1 |
\\nb'(\\\\xd3\\\\xf4\\\\xc3\\\\xc6)\\\\xb0\\\\xae\\\\xbf\\\\xb4\\\\xb5\\\\xe7\\\\xd3\\\\xb0' | 1 |
\\nkiva@18p2p | 1 |
\\nb'\\\\xbb\\\\xd8\\\\xbc\\\\xd2001@18p2p' | 1 |
\\nffxx | 1 |
\\njudexkwok(SIS) | 1 |
\\nchikan@T66Y | 1 |
\\n瑞倪维儿护肤专卖 | 1 |
\\nauriga@18p2p | 1 |
\\nyinchong818@(sis) | 1 |
\\nntlv0@hotmail.com | 1 |
\\n酷安 | 1 |
\\njav20s8.com/ | 1 |
\\nJPopsuki 2.0 14486345 | 1 |
\\n若無其事@18p2p | 1 |
\\nb'stormly+taitan12+zhaoZero41+chinami2002+glen246+faberge@darkeagle-\\\\xbax\\\\x84\\\\xf0\\\\xaa\\\\xc0' | 1 |
\\nCMCT团队荣誉出品 | 1 |
\\nkennyboy | 1 |
\\n2AV.COM | 1 |
\\n\\n
'"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"s = monotonic()\n",
"def sources():\n",
" sources = {}\n",
" for sha1, torrent in torrents.items():\n",
" source = torrent.dict.get(b'info').get(b'source')\n",
" if source is None:\n",
" source = torrent.dict.get(b'info').get(b'publisher')\n",
" if source is None:\n",
" source = torrent.dict.get(b'info').get(b'publisher-url')\n",
" try:\n",
" if type(source) is bytes:\n",
" source = source.decode().strip()\n",
" except UnicodeDecodeError:\n",
" pass\n",
" if source not in sources.keys():\n",
" sources[source] = 1\n",
" else:\n",
" sources[source] += 1\n",
" return sources\n",
"sources = sources()\n",
"sort = sorted(sources, reverse=True, key=lambda x:sources[x])\n",
"sort.remove(None)\n",
"print(monotonic()-s, \"s\", sources[None]/len(torrents)*100, \"brez ključa source, publisher ali publisher-url\", len(sources), \"virov\")\n",
"from tabulate import tabulate\n",
"tabulate([[x, sources[x]] for x in sort], tablefmt=\"html\")"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "4bd1f517",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"...\n",
"8.8120769248344 s 284089 različnih tipov v 2515100 datotekah in 203.7606503055813 TiB\n"
]
}
],
"source": [
"s = monotonic()\n",
"def removeminorities(population, minrepr=0, ostalo=\"ostalo\"):\n",
" true = {ostalo: 0}\n",
" for key, value in population.items():\n",
" if value < minrepr:\n",
" true[ostalo] += value\n",
" else:\n",
" true[key] = value\n",
" return true\n",
"from mimetypes import guess_type\n",
"def ext(mime=False, minreprratio=0):\n",
" bycount = {}\n",
" bysize = {}\n",
" bysizerepresentative = {}\n",
" filescount = 0\n",
" bytescount = 0\n",
" for sha1, torrent in torrents.items():\n",
" try:\n",
" representatives = {}\n",
" for path, size in torrent.paths():\n",
" filescount += 1\n",
" bytescount += size\n",
" if mime:\n",
" ext = guess_type(path.pop().decode(encoding=\"iso-8859-2\"))[0]\n",
" else:\n",
" ext = path.pop().split(b'.').pop().decode(encoding=\"iso-8859-2\").lower()\n",
" if ext not in bycount.keys():\n",
" bycount[ext] = 1\n",
" else:\n",
" bycount[ext] += 1\n",
" if ext not in bysize.keys():\n",
" bysize[ext] = size\n",
" else:\n",
" bysize[ext] += size\n",
" if ext not in representatives.keys():\n",
" representatives[ext] = size\n",
" else:\n",
" representatives[ext] += size\n",
" except AttributeError:\n",
" print(sha1.hex(), torrent)\n",
" raise AttributeError\n",
" try:\n",
" representative = sorted(representatives, key=lambda x:representatives[x]).pop()\n",
" except IndexError:\n",
" print(sha1.hex(), torrent)\n",
" raise IndexError\n",
" if representative not in bysizerepresentative.keys():\n",
" bysizerepresentative[representative] = 1\n",
" else:\n",
" bysizerepresentative[representative] += 1\n",
" truebycount = removeminorities(bycount, minreprratio*filescount, \"ostale\")\n",
" truebysize = removeminorities(bysize, minreprratio*bytescount, \"ostale\")\n",
" truebysizerepresentative = removeminorities(bysizerepresentative, minreprratio*len(torrents), \"ostale\")\n",
" for data in [truebycount, truebysize, truebysizerepresentative]:\n",
" data = [(v, k) for k, v in data.items()]\n",
" return truebycount, truebysize, truebysizerepresentative, len(bycount), filescount, bytescount\n",
"print(\"...\")\n",
"bycount, bysize, bysizerepresentative, kinds, filescount, bytescount = ext(False, 0.0005)\n",
"print(monotonic()-s, \"s\", kinds, \"različnih tipov v\", filescount, \"datotekah in\", bytescount/(1024**4), \"TiB\")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "82ab922a",
"metadata": {},
"outputs": [
{
"data": {
"application/javascript": [
"/* Put everything inside the global mpl namespace */\n",
"/* global mpl */\n",
"window.mpl = {};\n",
"\n",
"mpl.get_websocket_type = function () {\n",
" if (typeof WebSocket !== 'undefined') {\n",
" return WebSocket;\n",
" } else if (typeof MozWebSocket !== 'undefined') {\n",
" return MozWebSocket;\n",
" } else {\n",
" alert(\n",
" 'Your browser does not have WebSocket support. ' +\n",
" 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
" 'Firefox 4 and 5 are also supported but you ' +\n",
" 'have to enable WebSockets in about:config.'\n",
" );\n",
" }\n",
"};\n",
"\n",
"mpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n",
" this.id = figure_id;\n",
"\n",
" this.ws = websocket;\n",
"\n",
" this.supports_binary = this.ws.binaryType !== undefined;\n",
"\n",
" if (!this.supports_binary) {\n",
" var warnings = document.getElementById('mpl-warnings');\n",
" if (warnings) {\n",
" warnings.style.display = 'block';\n",
" warnings.textContent =\n",
" 'This browser does not support binary websocket messages. ' +\n",
" 'Performance may be slow.';\n",
" }\n",
" }\n",
"\n",
" this.imageObj = new Image();\n",
"\n",
" this.context = undefined;\n",
" this.message = undefined;\n",
" this.canvas = undefined;\n",
" this.rubberband_canvas = undefined;\n",
" this.rubberband_context = undefined;\n",
" this.format_dropdown = undefined;\n",
"\n",
" this.image_mode = 'full';\n",
"\n",
" this.root = document.createElement('div');\n",
" this.root.setAttribute('style', 'display: inline-block');\n",
" this._root_extra_style(this.root);\n",
"\n",
" parent_element.appendChild(this.root);\n",
"\n",
" this._init_header(this);\n",
" this._init_canvas(this);\n",
" this._init_toolbar(this);\n",
"\n",
" var fig = this;\n",
"\n",
" this.waiting = false;\n",
"\n",
" this.ws.onopen = function () {\n",
" fig.send_message('supports_binary', { value: fig.supports_binary });\n",
" fig.send_message('send_image_mode', {});\n",
" if (fig.ratio !== 1) {\n",
" fig.send_message('set_device_pixel_ratio', {\n",
" device_pixel_ratio: fig.ratio,\n",
" });\n",
" }\n",
" fig.send_message('refresh', {});\n",
" };\n",
"\n",
" this.imageObj.onload = function () {\n",
" if (fig.image_mode === 'full') {\n",
" // Full images could contain transparency (where diff images\n",
" // almost always do), so we need to clear the canvas so that\n",
" // there is no ghosting.\n",
" fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
" }\n",
" fig.context.drawImage(fig.imageObj, 0, 0);\n",
" };\n",
"\n",
" this.imageObj.onunload = function () {\n",
" fig.ws.close();\n",
" };\n",
"\n",
" this.ws.onmessage = this._make_on_message_function(this);\n",
"\n",
" this.ondownload = ondownload;\n",
"};\n",
"\n",
"mpl.figure.prototype._init_header = function () {\n",
" var titlebar = document.createElement('div');\n",
" titlebar.classList =\n",
" 'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n",
" var titletext = document.createElement('div');\n",
" titletext.classList = 'ui-dialog-title';\n",
" titletext.setAttribute(\n",
" 'style',\n",
" 'width: 100%; text-align: center; padding: 3px;'\n",
" );\n",
" titlebar.appendChild(titletext);\n",
" this.root.appendChild(titlebar);\n",
" this.header = titletext;\n",
"};\n",
"\n",
"mpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n",
"\n",
"mpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n",
"\n",
"mpl.figure.prototype._init_canvas = function () {\n",
" var fig = this;\n",
"\n",
" var canvas_div = (this.canvas_div = document.createElement('div'));\n",
" canvas_div.setAttribute('tabindex', '0');\n",
" canvas_div.setAttribute(\n",
" 'style',\n",
" 'border: 1px solid #ddd;' +\n",
" 'box-sizing: content-box;' +\n",
" 'clear: both;' +\n",
" 'min-height: 1px;' +\n",
" 'min-width: 1px;' +\n",
" 'outline: 0;' +\n",
" 'overflow: hidden;' +\n",
" 'position: relative;' +\n",
" 'resize: both;' +\n",
" 'z-index: 2;'\n",
" );\n",
"\n",
" function on_keyboard_event_closure(name) {\n",
" return function (event) {\n",
" return fig.key_event(event, name);\n",
" };\n",
" }\n",
"\n",
" canvas_div.addEventListener(\n",
" 'keydown',\n",
" on_keyboard_event_closure('key_press')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'keyup',\n",
" on_keyboard_event_closure('key_release')\n",
" );\n",
"\n",
" this._canvas_extra_style(canvas_div);\n",
" this.root.appendChild(canvas_div);\n",
"\n",
" var canvas = (this.canvas = document.createElement('canvas'));\n",
" canvas.classList.add('mpl-canvas');\n",
" canvas.setAttribute(\n",
" 'style',\n",
" 'box-sizing: content-box;' +\n",
" 'pointer-events: none;' +\n",
" 'position: relative;' +\n",
" 'z-index: 0;'\n",
" );\n",
"\n",
" this.context = canvas.getContext('2d');\n",
"\n",
" var backingStore =\n",
" this.context.backingStorePixelRatio ||\n",
" this.context.webkitBackingStorePixelRatio ||\n",
" this.context.mozBackingStorePixelRatio ||\n",
" this.context.msBackingStorePixelRatio ||\n",
" this.context.oBackingStorePixelRatio ||\n",
" this.context.backingStorePixelRatio ||\n",
" 1;\n",
"\n",
" this.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
"\n",
" var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n",
" 'canvas'\n",
" ));\n",
" rubberband_canvas.setAttribute(\n",
" 'style',\n",
" 'box-sizing: content-box;' +\n",
" 'left: 0;' +\n",
" 'pointer-events: none;' +\n",
" 'position: absolute;' +\n",
" 'top: 0;' +\n",
" 'z-index: 1;'\n",
" );\n",
"\n",
" // Apply a ponyfill if ResizeObserver is not implemented by browser.\n",
" if (this.ResizeObserver === undefined) {\n",
" if (window.ResizeObserver !== undefined) {\n",
" this.ResizeObserver = window.ResizeObserver;\n",
" } else {\n",
" var obs = _JSXTOOLS_RESIZE_OBSERVER({});\n",
" this.ResizeObserver = obs.ResizeObserver;\n",
" }\n",
" }\n",
"\n",
" this.resizeObserverInstance = new this.ResizeObserver(function (entries) {\n",
" var nentries = entries.length;\n",
" for (var i = 0; i < nentries; i++) {\n",
" var entry = entries[i];\n",
" var width, height;\n",
" if (entry.contentBoxSize) {\n",
" if (entry.contentBoxSize instanceof Array) {\n",
" // Chrome 84 implements new version of spec.\n",
" width = entry.contentBoxSize[0].inlineSize;\n",
" height = entry.contentBoxSize[0].blockSize;\n",
" } else {\n",
" // Firefox implements old version of spec.\n",
" width = entry.contentBoxSize.inlineSize;\n",
" height = entry.contentBoxSize.blockSize;\n",
" }\n",
" } else {\n",
" // Chrome <84 implements even older version of spec.\n",
" width = entry.contentRect.width;\n",
" height = entry.contentRect.height;\n",
" }\n",
"\n",
" // Keep the size of the canvas and rubber band canvas in sync with\n",
" // the canvas container.\n",
" if (entry.devicePixelContentBoxSize) {\n",
" // Chrome 84 implements new version of spec.\n",
" canvas.setAttribute(\n",
" 'width',\n",
" entry.devicePixelContentBoxSize[0].inlineSize\n",
" );\n",
" canvas.setAttribute(\n",
" 'height',\n",
" entry.devicePixelContentBoxSize[0].blockSize\n",
" );\n",
" } else {\n",
" canvas.setAttribute('width', width * fig.ratio);\n",
" canvas.setAttribute('height', height * fig.ratio);\n",
" }\n",
" /* This rescales the canvas back to display pixels, so that it\n",
" * appears correct on HiDPI screens. */\n",
" canvas.style.width = width + 'px';\n",
" canvas.style.height = height + 'px';\n",
"\n",
" rubberband_canvas.setAttribute('width', width);\n",
" rubberband_canvas.setAttribute('height', height);\n",
"\n",
" // And update the size in Python. We ignore the initial 0/0 size\n",
" // that occurs as the element is placed into the DOM, which should\n",
" // otherwise not happen due to the minimum size styling.\n",
" if (fig.ws.readyState == 1 && width != 0 && height != 0) {\n",
" fig.request_resize(width, height);\n",
" }\n",
" }\n",
" });\n",
" this.resizeObserverInstance.observe(canvas_div);\n",
"\n",
" function on_mouse_event_closure(name) {\n",
" /* User Agent sniffing is bad, but WebKit is busted:\n",
" * https://bugs.webkit.org/show_bug.cgi?id=144526\n",
" * https://bugs.webkit.org/show_bug.cgi?id=181818\n",
" * The worst that happens here is that they get an extra browser\n",
" * selection when dragging, if this check fails to catch them.\n",
" */\n",
" var UA = navigator.userAgent;\n",
" var isWebKit = /AppleWebKit/.test(UA) && !/Chrome/.test(UA);\n",
" if(isWebKit) {\n",
" return function (event) {\n",
" /* This prevents the web browser from automatically changing to\n",
" * the text insertion cursor when the button is pressed. We\n",
" * want to control all of the cursor setting manually through\n",
" * the 'cursor' event from matplotlib */\n",
" event.preventDefault()\n",
" return fig.mouse_event(event, name);\n",
" };\n",
" } else {\n",
" return function (event) {\n",
" return fig.mouse_event(event, name);\n",
" };\n",
" }\n",
" }\n",
"\n",
" canvas_div.addEventListener(\n",
" 'mousedown',\n",
" on_mouse_event_closure('button_press')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'mouseup',\n",
" on_mouse_event_closure('button_release')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'dblclick',\n",
" on_mouse_event_closure('dblclick')\n",
" );\n",
" // Throttle sequential mouse events to 1 every 20ms.\n",
" canvas_div.addEventListener(\n",
" 'mousemove',\n",
" on_mouse_event_closure('motion_notify')\n",
" );\n",
"\n",
" canvas_div.addEventListener(\n",
" 'mouseenter',\n",
" on_mouse_event_closure('figure_enter')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'mouseleave',\n",
" on_mouse_event_closure('figure_leave')\n",
" );\n",
"\n",
" canvas_div.addEventListener('wheel', function (event) {\n",
" if (event.deltaY < 0) {\n",
" event.step = 1;\n",
" } else {\n",
" event.step = -1;\n",
" }\n",
" on_mouse_event_closure('scroll')(event);\n",
" });\n",
"\n",
" canvas_div.appendChild(canvas);\n",
" canvas_div.appendChild(rubberband_canvas);\n",
"\n",
" this.rubberband_context = rubberband_canvas.getContext('2d');\n",
" this.rubberband_context.strokeStyle = '#000000';\n",
"\n",
" this._resize_canvas = function (width, height, forward) {\n",
" if (forward) {\n",
" canvas_div.style.width = width + 'px';\n",
" canvas_div.style.height = height + 'px';\n",
" }\n",
" };\n",
"\n",
" // Disable right mouse context menu.\n",
" canvas_div.addEventListener('contextmenu', function (_e) {\n",
" event.preventDefault();\n",
" return false;\n",
" });\n",
"\n",
" function set_focus() {\n",
" canvas.focus();\n",
" canvas_div.focus();\n",
" }\n",
"\n",
" window.setTimeout(set_focus, 100);\n",
"};\n",
"\n",
"mpl.figure.prototype._init_toolbar = function () {\n",
" var fig = this;\n",
"\n",
" var toolbar = document.createElement('div');\n",
" toolbar.classList = 'mpl-toolbar';\n",
" this.root.appendChild(toolbar);\n",
"\n",
" function on_click_closure(name) {\n",
" return function (_event) {\n",
" return fig.toolbar_button_onclick(name);\n",
" };\n",
" }\n",
"\n",
" function on_mouseover_closure(tooltip) {\n",
" return function (event) {\n",
" if (!event.currentTarget.disabled) {\n",
" return fig.toolbar_button_onmouseover(tooltip);\n",
" }\n",
" };\n",
" }\n",
"\n",
" fig.buttons = {};\n",
" var buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'mpl-button-group';\n",
" for (var toolbar_ind in mpl.toolbar_items) {\n",
" var name = mpl.toolbar_items[toolbar_ind][0];\n",
" var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
" var image = mpl.toolbar_items[toolbar_ind][2];\n",
" var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
"\n",
" if (!name) {\n",
" /* Instead of a spacer, we start a new button group. */\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
" buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'mpl-button-group';\n",
" continue;\n",
" }\n",
"\n",
" var button = (fig.buttons[name] = document.createElement('button'));\n",
" button.classList = 'mpl-widget';\n",
" button.setAttribute('role', 'button');\n",
" button.setAttribute('aria-disabled', 'false');\n",
" button.addEventListener('click', on_click_closure(method_name));\n",
" button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
"\n",
" var icon_img = document.createElement('img');\n",
" icon_img.src = '_images/' + image + '.png';\n",
" icon_img.srcset = '_images/' + image + '_large.png 2x';\n",
" icon_img.alt = tooltip;\n",
" button.appendChild(icon_img);\n",
"\n",
" buttonGroup.appendChild(button);\n",
" }\n",
"\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
"\n",
" var fmt_picker = document.createElement('select');\n",
" fmt_picker.classList = 'mpl-widget';\n",
" toolbar.appendChild(fmt_picker);\n",
" this.format_dropdown = fmt_picker;\n",
"\n",
" for (var ind in mpl.extensions) {\n",
" var fmt = mpl.extensions[ind];\n",
" var option = document.createElement('option');\n",
" option.selected = fmt === mpl.default_extension;\n",
" option.innerHTML = fmt;\n",
" fmt_picker.appendChild(option);\n",
" }\n",
"\n",
" var status_bar = document.createElement('span');\n",
" status_bar.classList = 'mpl-message';\n",
" toolbar.appendChild(status_bar);\n",
" this.message = status_bar;\n",
"};\n",
"\n",
"mpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\n",
" // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
" // which will in turn request a refresh of the image.\n",
" this.send_message('resize', { width: x_pixels, height: y_pixels });\n",
"};\n",
"\n",
"mpl.figure.prototype.send_message = function (type, properties) {\n",
" properties['type'] = type;\n",
" properties['figure_id'] = this.id;\n",
" this.ws.send(JSON.stringify(properties));\n",
"};\n",
"\n",
"mpl.figure.prototype.send_draw_message = function () {\n",
" if (!this.waiting) {\n",
" this.waiting = true;\n",
" this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
" var format_dropdown = fig.format_dropdown;\n",
" var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
" fig.ondownload(fig, format);\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_resize = function (fig, msg) {\n",
" var size = msg['size'];\n",
" if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\n",
" fig._resize_canvas(size[0], size[1], msg['forward']);\n",
" fig.send_message('refresh', {});\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_rubberband = function (fig, msg) {\n",
" var x0 = msg['x0'] / fig.ratio;\n",
" var y0 = (fig.canvas.height - msg['y0']) / fig.ratio;\n",
" var x1 = msg['x1'] / fig.ratio;\n",
" var y1 = (fig.canvas.height - msg['y1']) / fig.ratio;\n",
" x0 = Math.floor(x0) + 0.5;\n",
" y0 = Math.floor(y0) + 0.5;\n",
" x1 = Math.floor(x1) + 0.5;\n",
" y1 = Math.floor(y1) + 0.5;\n",
" var min_x = Math.min(x0, x1);\n",
" var min_y = Math.min(y0, y1);\n",
" var width = Math.abs(x1 - x0);\n",
" var height = Math.abs(y1 - y0);\n",
"\n",
" fig.rubberband_context.clearRect(\n",
" 0,\n",
" 0,\n",
" fig.canvas.width / fig.ratio,\n",
" fig.canvas.height / fig.ratio\n",
" );\n",
"\n",
" fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_figure_label = function (fig, msg) {\n",
" // Updates the figure title.\n",
" fig.header.textContent = msg['label'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_cursor = function (fig, msg) {\n",
" fig.canvas_div.style.cursor = msg['cursor'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_message = function (fig, msg) {\n",
" fig.message.textContent = msg['message'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_draw = function (fig, _msg) {\n",
" // Request the server to send over a new figure.\n",
" fig.send_draw_message();\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_image_mode = function (fig, msg) {\n",
" fig.image_mode = msg['mode'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_history_buttons = function (fig, msg) {\n",
" for (var key in msg) {\n",
" if (!(key in fig.buttons)) {\n",
" continue;\n",
" }\n",
" fig.buttons[key].disabled = !msg[key];\n",
" fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\n",
" if (msg['mode'] === 'PAN') {\n",
" fig.buttons['Pan'].classList.add('active');\n",
" fig.buttons['Zoom'].classList.remove('active');\n",
" } else if (msg['mode'] === 'ZOOM') {\n",
" fig.buttons['Pan'].classList.remove('active');\n",
" fig.buttons['Zoom'].classList.add('active');\n",
" } else {\n",
" fig.buttons['Pan'].classList.remove('active');\n",
" fig.buttons['Zoom'].classList.remove('active');\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.updated_canvas_event = function () {\n",
" // Called whenever the canvas gets updated.\n",
" this.send_message('ack', {});\n",
"};\n",
"\n",
"// A function to construct a web socket function for onmessage handling.\n",
"// Called in the figure constructor.\n",
"mpl.figure.prototype._make_on_message_function = function (fig) {\n",
" return function socket_on_message(evt) {\n",
" if (evt.data instanceof Blob) {\n",
" var img = evt.data;\n",
" if (img.type !== 'image/png') {\n",
" /* FIXME: We get \"Resource interpreted as Image but\n",
" * transferred with MIME type text/plain:\" errors on\n",
" * Chrome. But how to set the MIME type? It doesn't seem\n",
" * to be part of the websocket stream */\n",
" img.type = 'image/png';\n",
" }\n",
"\n",
" /* Free the memory for the previous frames */\n",
" if (fig.imageObj.src) {\n",
" (window.URL || window.webkitURL).revokeObjectURL(\n",
" fig.imageObj.src\n",
" );\n",
" }\n",
"\n",
" fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
" img\n",
" );\n",
" fig.updated_canvas_event();\n",
" fig.waiting = false;\n",
" return;\n",
" } else if (\n",
" typeof evt.data === 'string' &&\n",
" evt.data.slice(0, 21) === 'data:image/png;base64'\n",
" ) {\n",
" fig.imageObj.src = evt.data;\n",
" fig.updated_canvas_event();\n",
" fig.waiting = false;\n",
" return;\n",
" }\n",
"\n",
" var msg = JSON.parse(evt.data);\n",
" var msg_type = msg['type'];\n",
"\n",
" // Call the \"handle_{type}\" callback, which takes\n",
" // the figure and JSON message as its only arguments.\n",
" try {\n",
" var callback = fig['handle_' + msg_type];\n",
" } catch (e) {\n",
" console.log(\n",
" \"No handler for the '\" + msg_type + \"' message type: \",\n",
" msg\n",
" );\n",
" return;\n",
" }\n",
"\n",
" if (callback) {\n",
" try {\n",
" // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
" callback(fig, msg);\n",
" } catch (e) {\n",
" console.log(\n",
" \"Exception inside the 'handler_\" + msg_type + \"' callback:\",\n",
" e,\n",
" e.stack,\n",
" msg\n",
" );\n",
" }\n",
" }\n",
" };\n",
"};\n",
"\n",
"\n",
"/*\n",
" * return a copy of an object with only non-object keys\n",
" * we need this to avoid circular references\n",
" * https://stackoverflow.com/a/24161582/3208463\n",
" */\n",
"function simpleKeys(original) {\n",
" return Object.keys(original).reduce(function (obj, key) {\n",
" if (typeof original[key] !== 'object') {\n",
" obj[key] = original[key];\n",
" }\n",
" return obj;\n",
" }, {});\n",
"}\n",
"\n",
"mpl.figure.prototype.mouse_event = function (event, name) {\n",
" if (name === 'button_press') {\n",
" this.canvas.focus();\n",
" this.canvas_div.focus();\n",
" }\n",
"\n",
" // from https://stackoverflow.com/q/1114465\n",
" var boundingRect = this.canvas.getBoundingClientRect();\n",
" var x = (event.clientX - boundingRect.left) * this.ratio;\n",
" var y = (event.clientY - boundingRect.top) * this.ratio;\n",
"\n",
" this.send_message(name, {\n",
" x: x,\n",
" y: y,\n",
" button: event.button,\n",
" step: event.step,\n",
" guiEvent: simpleKeys(event),\n",
" });\n",
"\n",
" return false;\n",
"};\n",
"\n",
"mpl.figure.prototype._key_event_extra = function (_event, _name) {\n",
" // Handle any extra behaviour associated with a key event\n",
"};\n",
"\n",
"mpl.figure.prototype.key_event = function (event, name) {\n",
" // Prevent repeat events\n",
" if (name === 'key_press') {\n",
" if (event.key === this._key) {\n",
" return;\n",
" } else {\n",
" this._key = event.key;\n",
" }\n",
" }\n",
" if (name === 'key_release') {\n",
" this._key = null;\n",
" }\n",
"\n",
" var value = '';\n",
" if (event.ctrlKey && event.key !== 'Control') {\n",
" value += 'ctrl+';\n",
" }\n",
" else if (event.altKey && event.key !== 'Alt') {\n",
" value += 'alt+';\n",
" }\n",
" else if (event.shiftKey && event.key !== 'Shift') {\n",
" value += 'shift+';\n",
" }\n",
"\n",
" value += 'k' + event.key;\n",
"\n",
" this._key_event_extra(event, name);\n",
"\n",
" this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\n",
" return false;\n",
"};\n",
"\n",
"mpl.figure.prototype.toolbar_button_onclick = function (name) {\n",
" if (name === 'download') {\n",
" this.handle_save(this, null);\n",
" } else {\n",
" this.send_message('toolbar_button', { name: name });\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n",
" this.message.textContent = tooltip;\n",
"};\n",
"\n",
"///////////////// REMAINING CONTENT GENERATED BY embed_js.py /////////////////\n",
"// prettier-ignore\n",
"var _JSXTOOLS_RESIZE_OBSERVER=function(A){var t,i=new WeakMap,n=new WeakMap,a=new WeakMap,r=new WeakMap,o=new Set;function s(e){if(!(this instanceof s))throw new TypeError(\"Constructor requires 'new' operator\");i.set(this,e)}function h(){throw new TypeError(\"Function is not a constructor\")}function c(e,t,i,n){e=0 in arguments?Number(arguments[0]):0,t=1 in arguments?Number(arguments[1]):0,i=2 in arguments?Number(arguments[2]):0,n=3 in arguments?Number(arguments[3]):0,this.right=(this.x=this.left=e)+(this.width=i),this.bottom=(this.y=this.top=t)+(this.height=n),Object.freeze(this)}function d(){t=requestAnimationFrame(d);var s=new WeakMap,p=new Set;o.forEach((function(t){r.get(t).forEach((function(i){var r=t instanceof window.SVGElement,o=a.get(t),d=r?0:parseFloat(o.paddingTop),f=r?0:parseFloat(o.paddingRight),l=r?0:parseFloat(o.paddingBottom),u=r?0:parseFloat(o.paddingLeft),g=r?0:parseFloat(o.borderTopWidth),m=r?0:parseFloat(o.borderRightWidth),w=r?0:parseFloat(o.borderBottomWidth),b=u+f,F=d+l,v=(r?0:parseFloat(o.borderLeftWidth))+m,W=g+w,y=r?0:t.offsetHeight-W-t.clientHeight,E=r?0:t.offsetWidth-v-t.clientWidth,R=b+v,z=F+W,M=r?t.width:parseFloat(o.width)-R-E,O=r?t.height:parseFloat(o.height)-z-y;if(n.has(t)){var k=n.get(t);if(k[0]===M&&k[1]===O)return}n.set(t,[M,O]);var S=Object.create(h.prototype);S.target=t,S.contentRect=new c(u,d,M,O),s.has(i)||(s.set(i,[]),p.add(i)),s.get(i).push(S)}))})),p.forEach((function(e){i.get(e).call(e,s.get(e),e)}))}return s.prototype.observe=function(i){if(i instanceof window.Element){r.has(i)||(r.set(i,new Set),o.add(i),a.set(i,window.getComputedStyle(i)));var n=r.get(i);n.has(this)||n.add(this),cancelAnimationFrame(t),t=requestAnimationFrame(d)}},s.prototype.unobserve=function(i){if(i instanceof window.Element&&r.has(i)){var n=r.get(i);n.has(this)&&(n.delete(this),n.size||(r.delete(i),o.delete(i))),n.size||r.delete(i),o.size||cancelAnimationFrame(t)}},A.DOMRectReadOnly=c,A.ResizeObserver=s,A.ResizeObserverEntry=h,A}; // eslint-disable-line\n",
"mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis\", \"fa fa-square-o\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o\", \"download\"]];\n",
"\n",
"mpl.extensions = [\"eps\", \"jpeg\", \"pgf\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\", \"webp\"];\n",
"\n",
"mpl.default_extension = \"png\";/* global mpl */\n",
"\n",
"var comm_websocket_adapter = function (comm) {\n",
" // Create a \"websocket\"-like object which calls the given IPython comm\n",
" // object with the appropriate methods. Currently this is a non binary\n",
" // socket, so there is still some room for performance tuning.\n",
" var ws = {};\n",
"\n",
" ws.binaryType = comm.kernel.ws.binaryType;\n",
" ws.readyState = comm.kernel.ws.readyState;\n",
" function updateReadyState(_event) {\n",
" if (comm.kernel.ws) {\n",
" ws.readyState = comm.kernel.ws.readyState;\n",
" } else {\n",
" ws.readyState = 3; // Closed state.\n",
" }\n",
" }\n",
" comm.kernel.ws.addEventListener('open', updateReadyState);\n",
" comm.kernel.ws.addEventListener('close', updateReadyState);\n",
" comm.kernel.ws.addEventListener('error', updateReadyState);\n",
"\n",
" ws.close = function () {\n",
" comm.close();\n",
" };\n",
" ws.send = function (m) {\n",
" //console.log('sending', m);\n",
" comm.send(m);\n",
" };\n",
" // Register the callback with on_msg.\n",
" comm.on_msg(function (msg) {\n",
" //console.log('receiving', msg['content']['data'], msg);\n",
" var data = msg['content']['data'];\n",
" if (data['blob'] !== undefined) {\n",
" data = {\n",
" data: new Blob(msg['buffers'], { type: data['blob'] }),\n",
" };\n",
" }\n",
" // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
" ws.onmessage(data);\n",
" });\n",
" return ws;\n",
"};\n",
"\n",
"mpl.mpl_figure_comm = function (comm, msg) {\n",
" // This is the function which gets called when the mpl process\n",
" // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
"\n",
" var id = msg.content.data.id;\n",
" // Get hold of the div created by the display call when the Comm\n",
" // socket was opened in Python.\n",
" var element = document.getElementById(id);\n",
" var ws_proxy = comm_websocket_adapter(comm);\n",
"\n",
" function ondownload(figure, _format) {\n",
" window.open(figure.canvas.toDataURL());\n",
" }\n",
"\n",
" var fig = new mpl.figure(id, ws_proxy, ondownload, element);\n",
"\n",
" // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
" // web socket which is closed, not our websocket->open comm proxy.\n",
" ws_proxy.onopen();\n",
"\n",
" fig.parent_element = element;\n",
" fig.cell_info = mpl.find_output_cell(\"\");\n",
" if (!fig.cell_info) {\n",
" console.error('Failed to find cell for figure', id, fig);\n",
" return;\n",
" }\n",
" fig.cell_info[0].output_area.element.on(\n",
" 'cleared',\n",
" { fig: fig },\n",
" fig._remove_fig_handler\n",
" );\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_close = function (fig, msg) {\n",
" var width = fig.canvas.width / fig.ratio;\n",
" fig.cell_info[0].output_area.element.off(\n",
" 'cleared',\n",
" fig._remove_fig_handler\n",
" );\n",
" fig.resizeObserverInstance.unobserve(fig.canvas_div);\n",
"\n",
" // Update the output cell to use the data from the current canvas.\n",
" fig.push_to_output();\n",
" var dataURL = fig.canvas.toDataURL();\n",
" // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
" // the notebook keyboard shortcuts fail.\n",
" IPython.keyboard_manager.enable();\n",
" fig.parent_element.innerHTML =\n",
" '';\n",
" fig.close_ws(fig, msg);\n",
"};\n",
"\n",
"mpl.figure.prototype.close_ws = function (fig, msg) {\n",
" fig.send_message('closing', msg);\n",
" // fig.ws.close()\n",
"};\n",
"\n",
"mpl.figure.prototype.push_to_output = function (_remove_interactive) {\n",
" // Turn the data on the canvas into data in the output cell.\n",
" var width = this.canvas.width / this.ratio;\n",
" var dataURL = this.canvas.toDataURL();\n",
" this.cell_info[1]['text/html'] =\n",
" '';\n",
"};\n",
"\n",
"mpl.figure.prototype.updated_canvas_event = function () {\n",
" // Tell IPython that the notebook contents must change.\n",
" IPython.notebook.set_dirty(true);\n",
" this.send_message('ack', {});\n",
" var fig = this;\n",
" // Wait a second, then push the new image to the DOM so\n",
" // that it is saved nicely (might be nice to debounce this).\n",
" setTimeout(function () {\n",
" fig.push_to_output();\n",
" }, 1000);\n",
"};\n",
"\n",
"mpl.figure.prototype._init_toolbar = function () {\n",
" var fig = this;\n",
"\n",
" var toolbar = document.createElement('div');\n",
" toolbar.classList = 'btn-toolbar';\n",
" this.root.appendChild(toolbar);\n",
"\n",
" function on_click_closure(name) {\n",
" return function (_event) {\n",
" return fig.toolbar_button_onclick(name);\n",
" };\n",
" }\n",
"\n",
" function on_mouseover_closure(tooltip) {\n",
" return function (event) {\n",
" if (!event.currentTarget.disabled) {\n",
" return fig.toolbar_button_onmouseover(tooltip);\n",
" }\n",
" };\n",
" }\n",
"\n",
" fig.buttons = {};\n",
" var buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'btn-group';\n",
" var button;\n",
" for (var toolbar_ind in mpl.toolbar_items) {\n",
" var name = mpl.toolbar_items[toolbar_ind][0];\n",
" var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
" var image = mpl.toolbar_items[toolbar_ind][2];\n",
" var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
"\n",
" if (!name) {\n",
" /* Instead of a spacer, we start a new button group. */\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
" buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'btn-group';\n",
" continue;\n",
" }\n",
"\n",
" button = fig.buttons[name] = document.createElement('button');\n",
" button.classList = 'btn btn-default';\n",
" button.href = '#';\n",
" button.title = name;\n",
" button.innerHTML = '';\n",
" button.addEventListener('click', on_click_closure(method_name));\n",
" button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
" buttonGroup.appendChild(button);\n",
" }\n",
"\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
"\n",
" // Add the status bar.\n",
" var status_bar = document.createElement('span');\n",
" status_bar.classList = 'mpl-message pull-right';\n",
" toolbar.appendChild(status_bar);\n",
" this.message = status_bar;\n",
"\n",
" // Add the close button to the window.\n",
" var buttongrp = document.createElement('div');\n",
" buttongrp.classList = 'btn-group inline pull-right';\n",
" button = document.createElement('button');\n",
" button.classList = 'btn btn-mini btn-primary';\n",
" button.href = '#';\n",
" button.title = 'Stop Interaction';\n",
" button.innerHTML = '';\n",
" button.addEventListener('click', function (_evt) {\n",
" fig.handle_close(fig, {});\n",
" });\n",
" button.addEventListener(\n",
" 'mouseover',\n",
" on_mouseover_closure('Stop Interaction')\n",
" );\n",
" buttongrp.appendChild(button);\n",
" var titlebar = this.root.querySelector('.ui-dialog-titlebar');\n",
" titlebar.insertBefore(buttongrp, titlebar.firstChild);\n",
"};\n",
"\n",
"mpl.figure.prototype._remove_fig_handler = function (event) {\n",
" var fig = event.data.fig;\n",
" if (event.target !== this) {\n",
" // Ignore bubbled events from children.\n",
" return;\n",
" }\n",
" fig.close_ws(fig, {});\n",
"};\n",
"\n",
"mpl.figure.prototype._root_extra_style = function (el) {\n",
" el.style.boxSizing = 'content-box'; // override notebook setting of border-box.\n",
"};\n",
"\n",
"mpl.figure.prototype._canvas_extra_style = function (el) {\n",
" // this is important to make the div 'focusable\n",
" el.setAttribute('tabindex', 0);\n",
" // reach out to IPython and tell the keyboard manager to turn it's self\n",
" // off when our div gets focus\n",
"\n",
" // location in version 3\n",
" if (IPython.notebook.keyboard_manager) {\n",
" IPython.notebook.keyboard_manager.register_events(el);\n",
" } else {\n",
" // location in version 2\n",
" IPython.keyboard_manager.register_events(el);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype._key_event_extra = function (event, _name) {\n",
" // Check for shift+enter\n",
" if (event.shiftKey && event.which === 13) {\n",
" this.canvas_div.blur();\n",
" // select the cell after this one\n",
" var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
" IPython.notebook.select(index + 1);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
" fig.ondownload(fig, null);\n",
"};\n",
"\n",
"mpl.find_output_cell = function (html_output) {\n",
" // Return the cell and output element which can be found *uniquely* in the notebook.\n",
" // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
" // IPython event is triggered only after the cells have been serialised, which for\n",
" // our purposes (turning an active figure into a static one), is too late.\n",
" var cells = IPython.notebook.get_cells();\n",
" var ncells = cells.length;\n",
" for (var i = 0; i < ncells; i++) {\n",
" var cell = cells[i];\n",
" if (cell.cell_type === 'code') {\n",
" for (var j = 0; j < cell.output_area.outputs.length; j++) {\n",
" var data = cell.output_area.outputs[j];\n",
" if (data.data) {\n",
" // IPython >= 3 moved mimebundle to data attribute of output\n",
" data = data.data;\n",
" }\n",
" if (data['text/html'] === html_output) {\n",
" return [cell, data, j];\n",
" }\n",
" }\n",
" }\n",
" }\n",
"};\n",
"\n",
"// Register the function which deals with the matplotlib target/channel.\n",
"// The kernel may be null if the page has been refreshed.\n",
"if (IPython.notebook.kernel !== null) {\n",
" IPython.notebook.kernel.comm_manager.register_target(\n",
" 'matplotlib',\n",
" mpl.mpl_figure_comm\n",
" );\n",
"}\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"/* Put everything inside the global mpl namespace */\n",
"/* global mpl */\n",
"window.mpl = {};\n",
"\n",
"mpl.get_websocket_type = function () {\n",
" if (typeof WebSocket !== 'undefined') {\n",
" return WebSocket;\n",
" } else if (typeof MozWebSocket !== 'undefined') {\n",
" return MozWebSocket;\n",
" } else {\n",
" alert(\n",
" 'Your browser does not have WebSocket support. ' +\n",
" 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
" 'Firefox 4 and 5 are also supported but you ' +\n",
" 'have to enable WebSockets in about:config.'\n",
" );\n",
" }\n",
"};\n",
"\n",
"mpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n",
" this.id = figure_id;\n",
"\n",
" this.ws = websocket;\n",
"\n",
" this.supports_binary = this.ws.binaryType !== undefined;\n",
"\n",
" if (!this.supports_binary) {\n",
" var warnings = document.getElementById('mpl-warnings');\n",
" if (warnings) {\n",
" warnings.style.display = 'block';\n",
" warnings.textContent =\n",
" 'This browser does not support binary websocket messages. ' +\n",
" 'Performance may be slow.';\n",
" }\n",
" }\n",
"\n",
" this.imageObj = new Image();\n",
"\n",
" this.context = undefined;\n",
" this.message = undefined;\n",
" this.canvas = undefined;\n",
" this.rubberband_canvas = undefined;\n",
" this.rubberband_context = undefined;\n",
" this.format_dropdown = undefined;\n",
"\n",
" this.image_mode = 'full';\n",
"\n",
" this.root = document.createElement('div');\n",
" this.root.setAttribute('style', 'display: inline-block');\n",
" this._root_extra_style(this.root);\n",
"\n",
" parent_element.appendChild(this.root);\n",
"\n",
" this._init_header(this);\n",
" this._init_canvas(this);\n",
" this._init_toolbar(this);\n",
"\n",
" var fig = this;\n",
"\n",
" this.waiting = false;\n",
"\n",
" this.ws.onopen = function () {\n",
" fig.send_message('supports_binary', { value: fig.supports_binary });\n",
" fig.send_message('send_image_mode', {});\n",
" if (fig.ratio !== 1) {\n",
" fig.send_message('set_device_pixel_ratio', {\n",
" device_pixel_ratio: fig.ratio,\n",
" });\n",
" }\n",
" fig.send_message('refresh', {});\n",
" };\n",
"\n",
" this.imageObj.onload = function () {\n",
" if (fig.image_mode === 'full') {\n",
" // Full images could contain transparency (where diff images\n",
" // almost always do), so we need to clear the canvas so that\n",
" // there is no ghosting.\n",
" fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
" }\n",
" fig.context.drawImage(fig.imageObj, 0, 0);\n",
" };\n",
"\n",
" this.imageObj.onunload = function () {\n",
" fig.ws.close();\n",
" };\n",
"\n",
" this.ws.onmessage = this._make_on_message_function(this);\n",
"\n",
" this.ondownload = ondownload;\n",
"};\n",
"\n",
"mpl.figure.prototype._init_header = function () {\n",
" var titlebar = document.createElement('div');\n",
" titlebar.classList =\n",
" 'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n",
" var titletext = document.createElement('div');\n",
" titletext.classList = 'ui-dialog-title';\n",
" titletext.setAttribute(\n",
" 'style',\n",
" 'width: 100%; text-align: center; padding: 3px;'\n",
" );\n",
" titlebar.appendChild(titletext);\n",
" this.root.appendChild(titlebar);\n",
" this.header = titletext;\n",
"};\n",
"\n",
"mpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n",
"\n",
"mpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n",
"\n",
"mpl.figure.prototype._init_canvas = function () {\n",
" var fig = this;\n",
"\n",
" var canvas_div = (this.canvas_div = document.createElement('div'));\n",
" canvas_div.setAttribute('tabindex', '0');\n",
" canvas_div.setAttribute(\n",
" 'style',\n",
" 'border: 1px solid #ddd;' +\n",
" 'box-sizing: content-box;' +\n",
" 'clear: both;' +\n",
" 'min-height: 1px;' +\n",
" 'min-width: 1px;' +\n",
" 'outline: 0;' +\n",
" 'overflow: hidden;' +\n",
" 'position: relative;' +\n",
" 'resize: both;' +\n",
" 'z-index: 2;'\n",
" );\n",
"\n",
" function on_keyboard_event_closure(name) {\n",
" return function (event) {\n",
" return fig.key_event(event, name);\n",
" };\n",
" }\n",
"\n",
" canvas_div.addEventListener(\n",
" 'keydown',\n",
" on_keyboard_event_closure('key_press')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'keyup',\n",
" on_keyboard_event_closure('key_release')\n",
" );\n",
"\n",
" this._canvas_extra_style(canvas_div);\n",
" this.root.appendChild(canvas_div);\n",
"\n",
" var canvas = (this.canvas = document.createElement('canvas'));\n",
" canvas.classList.add('mpl-canvas');\n",
" canvas.setAttribute(\n",
" 'style',\n",
" 'box-sizing: content-box;' +\n",
" 'pointer-events: none;' +\n",
" 'position: relative;' +\n",
" 'z-index: 0;'\n",
" );\n",
"\n",
" this.context = canvas.getContext('2d');\n",
"\n",
" var backingStore =\n",
" this.context.backingStorePixelRatio ||\n",
" this.context.webkitBackingStorePixelRatio ||\n",
" this.context.mozBackingStorePixelRatio ||\n",
" this.context.msBackingStorePixelRatio ||\n",
" this.context.oBackingStorePixelRatio ||\n",
" this.context.backingStorePixelRatio ||\n",
" 1;\n",
"\n",
" this.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
"\n",
" var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n",
" 'canvas'\n",
" ));\n",
" rubberband_canvas.setAttribute(\n",
" 'style',\n",
" 'box-sizing: content-box;' +\n",
" 'left: 0;' +\n",
" 'pointer-events: none;' +\n",
" 'position: absolute;' +\n",
" 'top: 0;' +\n",
" 'z-index: 1;'\n",
" );\n",
"\n",
" // Apply a ponyfill if ResizeObserver is not implemented by browser.\n",
" if (this.ResizeObserver === undefined) {\n",
" if (window.ResizeObserver !== undefined) {\n",
" this.ResizeObserver = window.ResizeObserver;\n",
" } else {\n",
" var obs = _JSXTOOLS_RESIZE_OBSERVER({});\n",
" this.ResizeObserver = obs.ResizeObserver;\n",
" }\n",
" }\n",
"\n",
" this.resizeObserverInstance = new this.ResizeObserver(function (entries) {\n",
" var nentries = entries.length;\n",
" for (var i = 0; i < nentries; i++) {\n",
" var entry = entries[i];\n",
" var width, height;\n",
" if (entry.contentBoxSize) {\n",
" if (entry.contentBoxSize instanceof Array) {\n",
" // Chrome 84 implements new version of spec.\n",
" width = entry.contentBoxSize[0].inlineSize;\n",
" height = entry.contentBoxSize[0].blockSize;\n",
" } else {\n",
" // Firefox implements old version of spec.\n",
" width = entry.contentBoxSize.inlineSize;\n",
" height = entry.contentBoxSize.blockSize;\n",
" }\n",
" } else {\n",
" // Chrome <84 implements even older version of spec.\n",
" width = entry.contentRect.width;\n",
" height = entry.contentRect.height;\n",
" }\n",
"\n",
" // Keep the size of the canvas and rubber band canvas in sync with\n",
" // the canvas container.\n",
" if (entry.devicePixelContentBoxSize) {\n",
" // Chrome 84 implements new version of spec.\n",
" canvas.setAttribute(\n",
" 'width',\n",
" entry.devicePixelContentBoxSize[0].inlineSize\n",
" );\n",
" canvas.setAttribute(\n",
" 'height',\n",
" entry.devicePixelContentBoxSize[0].blockSize\n",
" );\n",
" } else {\n",
" canvas.setAttribute('width', width * fig.ratio);\n",
" canvas.setAttribute('height', height * fig.ratio);\n",
" }\n",
" /* This rescales the canvas back to display pixels, so that it\n",
" * appears correct on HiDPI screens. */\n",
" canvas.style.width = width + 'px';\n",
" canvas.style.height = height + 'px';\n",
"\n",
" rubberband_canvas.setAttribute('width', width);\n",
" rubberband_canvas.setAttribute('height', height);\n",
"\n",
" // And update the size in Python. We ignore the initial 0/0 size\n",
" // that occurs as the element is placed into the DOM, which should\n",
" // otherwise not happen due to the minimum size styling.\n",
" if (fig.ws.readyState == 1 && width != 0 && height != 0) {\n",
" fig.request_resize(width, height);\n",
" }\n",
" }\n",
" });\n",
" this.resizeObserverInstance.observe(canvas_div);\n",
"\n",
" function on_mouse_event_closure(name) {\n",
" /* User Agent sniffing is bad, but WebKit is busted:\n",
" * https://bugs.webkit.org/show_bug.cgi?id=144526\n",
" * https://bugs.webkit.org/show_bug.cgi?id=181818\n",
" * The worst that happens here is that they get an extra browser\n",
" * selection when dragging, if this check fails to catch them.\n",
" */\n",
" var UA = navigator.userAgent;\n",
" var isWebKit = /AppleWebKit/.test(UA) && !/Chrome/.test(UA);\n",
" if(isWebKit) {\n",
" return function (event) {\n",
" /* This prevents the web browser from automatically changing to\n",
" * the text insertion cursor when the button is pressed. We\n",
" * want to control all of the cursor setting manually through\n",
" * the 'cursor' event from matplotlib */\n",
" event.preventDefault()\n",
" return fig.mouse_event(event, name);\n",
" };\n",
" } else {\n",
" return function (event) {\n",
" return fig.mouse_event(event, name);\n",
" };\n",
" }\n",
" }\n",
"\n",
" canvas_div.addEventListener(\n",
" 'mousedown',\n",
" on_mouse_event_closure('button_press')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'mouseup',\n",
" on_mouse_event_closure('button_release')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'dblclick',\n",
" on_mouse_event_closure('dblclick')\n",
" );\n",
" // Throttle sequential mouse events to 1 every 20ms.\n",
" canvas_div.addEventListener(\n",
" 'mousemove',\n",
" on_mouse_event_closure('motion_notify')\n",
" );\n",
"\n",
" canvas_div.addEventListener(\n",
" 'mouseenter',\n",
" on_mouse_event_closure('figure_enter')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'mouseleave',\n",
" on_mouse_event_closure('figure_leave')\n",
" );\n",
"\n",
" canvas_div.addEventListener('wheel', function (event) {\n",
" if (event.deltaY < 0) {\n",
" event.step = 1;\n",
" } else {\n",
" event.step = -1;\n",
" }\n",
" on_mouse_event_closure('scroll')(event);\n",
" });\n",
"\n",
" canvas_div.appendChild(canvas);\n",
" canvas_div.appendChild(rubberband_canvas);\n",
"\n",
" this.rubberband_context = rubberband_canvas.getContext('2d');\n",
" this.rubberband_context.strokeStyle = '#000000';\n",
"\n",
" this._resize_canvas = function (width, height, forward) {\n",
" if (forward) {\n",
" canvas_div.style.width = width + 'px';\n",
" canvas_div.style.height = height + 'px';\n",
" }\n",
" };\n",
"\n",
" // Disable right mouse context menu.\n",
" canvas_div.addEventListener('contextmenu', function (_e) {\n",
" event.preventDefault();\n",
" return false;\n",
" });\n",
"\n",
" function set_focus() {\n",
" canvas.focus();\n",
" canvas_div.focus();\n",
" }\n",
"\n",
" window.setTimeout(set_focus, 100);\n",
"};\n",
"\n",
"mpl.figure.prototype._init_toolbar = function () {\n",
" var fig = this;\n",
"\n",
" var toolbar = document.createElement('div');\n",
" toolbar.classList = 'mpl-toolbar';\n",
" this.root.appendChild(toolbar);\n",
"\n",
" function on_click_closure(name) {\n",
" return function (_event) {\n",
" return fig.toolbar_button_onclick(name);\n",
" };\n",
" }\n",
"\n",
" function on_mouseover_closure(tooltip) {\n",
" return function (event) {\n",
" if (!event.currentTarget.disabled) {\n",
" return fig.toolbar_button_onmouseover(tooltip);\n",
" }\n",
" };\n",
" }\n",
"\n",
" fig.buttons = {};\n",
" var buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'mpl-button-group';\n",
" for (var toolbar_ind in mpl.toolbar_items) {\n",
" var name = mpl.toolbar_items[toolbar_ind][0];\n",
" var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
" var image = mpl.toolbar_items[toolbar_ind][2];\n",
" var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
"\n",
" if (!name) {\n",
" /* Instead of a spacer, we start a new button group. */\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
" buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'mpl-button-group';\n",
" continue;\n",
" }\n",
"\n",
" var button = (fig.buttons[name] = document.createElement('button'));\n",
" button.classList = 'mpl-widget';\n",
" button.setAttribute('role', 'button');\n",
" button.setAttribute('aria-disabled', 'false');\n",
" button.addEventListener('click', on_click_closure(method_name));\n",
" button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
"\n",
" var icon_img = document.createElement('img');\n",
" icon_img.src = '_images/' + image + '.png';\n",
" icon_img.srcset = '_images/' + image + '_large.png 2x';\n",
" icon_img.alt = tooltip;\n",
" button.appendChild(icon_img);\n",
"\n",
" buttonGroup.appendChild(button);\n",
" }\n",
"\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
"\n",
" var fmt_picker = document.createElement('select');\n",
" fmt_picker.classList = 'mpl-widget';\n",
" toolbar.appendChild(fmt_picker);\n",
" this.format_dropdown = fmt_picker;\n",
"\n",
" for (var ind in mpl.extensions) {\n",
" var fmt = mpl.extensions[ind];\n",
" var option = document.createElement('option');\n",
" option.selected = fmt === mpl.default_extension;\n",
" option.innerHTML = fmt;\n",
" fmt_picker.appendChild(option);\n",
" }\n",
"\n",
" var status_bar = document.createElement('span');\n",
" status_bar.classList = 'mpl-message';\n",
" toolbar.appendChild(status_bar);\n",
" this.message = status_bar;\n",
"};\n",
"\n",
"mpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\n",
" // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
" // which will in turn request a refresh of the image.\n",
" this.send_message('resize', { width: x_pixels, height: y_pixels });\n",
"};\n",
"\n",
"mpl.figure.prototype.send_message = function (type, properties) {\n",
" properties['type'] = type;\n",
" properties['figure_id'] = this.id;\n",
" this.ws.send(JSON.stringify(properties));\n",
"};\n",
"\n",
"mpl.figure.prototype.send_draw_message = function () {\n",
" if (!this.waiting) {\n",
" this.waiting = true;\n",
" this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
" var format_dropdown = fig.format_dropdown;\n",
" var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
" fig.ondownload(fig, format);\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_resize = function (fig, msg) {\n",
" var size = msg['size'];\n",
" if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\n",
" fig._resize_canvas(size[0], size[1], msg['forward']);\n",
" fig.send_message('refresh', {});\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_rubberband = function (fig, msg) {\n",
" var x0 = msg['x0'] / fig.ratio;\n",
" var y0 = (fig.canvas.height - msg['y0']) / fig.ratio;\n",
" var x1 = msg['x1'] / fig.ratio;\n",
" var y1 = (fig.canvas.height - msg['y1']) / fig.ratio;\n",
" x0 = Math.floor(x0) + 0.5;\n",
" y0 = Math.floor(y0) + 0.5;\n",
" x1 = Math.floor(x1) + 0.5;\n",
" y1 = Math.floor(y1) + 0.5;\n",
" var min_x = Math.min(x0, x1);\n",
" var min_y = Math.min(y0, y1);\n",
" var width = Math.abs(x1 - x0);\n",
" var height = Math.abs(y1 - y0);\n",
"\n",
" fig.rubberband_context.clearRect(\n",
" 0,\n",
" 0,\n",
" fig.canvas.width / fig.ratio,\n",
" fig.canvas.height / fig.ratio\n",
" );\n",
"\n",
" fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_figure_label = function (fig, msg) {\n",
" // Updates the figure title.\n",
" fig.header.textContent = msg['label'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_cursor = function (fig, msg) {\n",
" fig.canvas_div.style.cursor = msg['cursor'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_message = function (fig, msg) {\n",
" fig.message.textContent = msg['message'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_draw = function (fig, _msg) {\n",
" // Request the server to send over a new figure.\n",
" fig.send_draw_message();\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_image_mode = function (fig, msg) {\n",
" fig.image_mode = msg['mode'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_history_buttons = function (fig, msg) {\n",
" for (var key in msg) {\n",
" if (!(key in fig.buttons)) {\n",
" continue;\n",
" }\n",
" fig.buttons[key].disabled = !msg[key];\n",
" fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\n",
" if (msg['mode'] === 'PAN') {\n",
" fig.buttons['Pan'].classList.add('active');\n",
" fig.buttons['Zoom'].classList.remove('active');\n",
" } else if (msg['mode'] === 'ZOOM') {\n",
" fig.buttons['Pan'].classList.remove('active');\n",
" fig.buttons['Zoom'].classList.add('active');\n",
" } else {\n",
" fig.buttons['Pan'].classList.remove('active');\n",
" fig.buttons['Zoom'].classList.remove('active');\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.updated_canvas_event = function () {\n",
" // Called whenever the canvas gets updated.\n",
" this.send_message('ack', {});\n",
"};\n",
"\n",
"// A function to construct a web socket function for onmessage handling.\n",
"// Called in the figure constructor.\n",
"mpl.figure.prototype._make_on_message_function = function (fig) {\n",
" return function socket_on_message(evt) {\n",
" if (evt.data instanceof Blob) {\n",
" var img = evt.data;\n",
" if (img.type !== 'image/png') {\n",
" /* FIXME: We get \"Resource interpreted as Image but\n",
" * transferred with MIME type text/plain:\" errors on\n",
" * Chrome. But how to set the MIME type? It doesn't seem\n",
" * to be part of the websocket stream */\n",
" img.type = 'image/png';\n",
" }\n",
"\n",
" /* Free the memory for the previous frames */\n",
" if (fig.imageObj.src) {\n",
" (window.URL || window.webkitURL).revokeObjectURL(\n",
" fig.imageObj.src\n",
" );\n",
" }\n",
"\n",
" fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
" img\n",
" );\n",
" fig.updated_canvas_event();\n",
" fig.waiting = false;\n",
" return;\n",
" } else if (\n",
" typeof evt.data === 'string' &&\n",
" evt.data.slice(0, 21) === 'data:image/png;base64'\n",
" ) {\n",
" fig.imageObj.src = evt.data;\n",
" fig.updated_canvas_event();\n",
" fig.waiting = false;\n",
" return;\n",
" }\n",
"\n",
" var msg = JSON.parse(evt.data);\n",
" var msg_type = msg['type'];\n",
"\n",
" // Call the \"handle_{type}\" callback, which takes\n",
" // the figure and JSON message as its only arguments.\n",
" try {\n",
" var callback = fig['handle_' + msg_type];\n",
" } catch (e) {\n",
" console.log(\n",
" \"No handler for the '\" + msg_type + \"' message type: \",\n",
" msg\n",
" );\n",
" return;\n",
" }\n",
"\n",
" if (callback) {\n",
" try {\n",
" // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
" callback(fig, msg);\n",
" } catch (e) {\n",
" console.log(\n",
" \"Exception inside the 'handler_\" + msg_type + \"' callback:\",\n",
" e,\n",
" e.stack,\n",
" msg\n",
" );\n",
" }\n",
" }\n",
" };\n",
"};\n",
"\n",
"\n",
"/*\n",
" * return a copy of an object with only non-object keys\n",
" * we need this to avoid circular references\n",
" * https://stackoverflow.com/a/24161582/3208463\n",
" */\n",
"function simpleKeys(original) {\n",
" return Object.keys(original).reduce(function (obj, key) {\n",
" if (typeof original[key] !== 'object') {\n",
" obj[key] = original[key];\n",
" }\n",
" return obj;\n",
" }, {});\n",
"}\n",
"\n",
"mpl.figure.prototype.mouse_event = function (event, name) {\n",
" if (name === 'button_press') {\n",
" this.canvas.focus();\n",
" this.canvas_div.focus();\n",
" }\n",
"\n",
" // from https://stackoverflow.com/q/1114465\n",
" var boundingRect = this.canvas.getBoundingClientRect();\n",
" var x = (event.clientX - boundingRect.left) * this.ratio;\n",
" var y = (event.clientY - boundingRect.top) * this.ratio;\n",
"\n",
" this.send_message(name, {\n",
" x: x,\n",
" y: y,\n",
" button: event.button,\n",
" step: event.step,\n",
" guiEvent: simpleKeys(event),\n",
" });\n",
"\n",
" return false;\n",
"};\n",
"\n",
"mpl.figure.prototype._key_event_extra = function (_event, _name) {\n",
" // Handle any extra behaviour associated with a key event\n",
"};\n",
"\n",
"mpl.figure.prototype.key_event = function (event, name) {\n",
" // Prevent repeat events\n",
" if (name === 'key_press') {\n",
" if (event.key === this._key) {\n",
" return;\n",
" } else {\n",
" this._key = event.key;\n",
" }\n",
" }\n",
" if (name === 'key_release') {\n",
" this._key = null;\n",
" }\n",
"\n",
" var value = '';\n",
" if (event.ctrlKey && event.key !== 'Control') {\n",
" value += 'ctrl+';\n",
" }\n",
" else if (event.altKey && event.key !== 'Alt') {\n",
" value += 'alt+';\n",
" }\n",
" else if (event.shiftKey && event.key !== 'Shift') {\n",
" value += 'shift+';\n",
" }\n",
"\n",
" value += 'k' + event.key;\n",
"\n",
" this._key_event_extra(event, name);\n",
"\n",
" this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\n",
" return false;\n",
"};\n",
"\n",
"mpl.figure.prototype.toolbar_button_onclick = function (name) {\n",
" if (name === 'download') {\n",
" this.handle_save(this, null);\n",
" } else {\n",
" this.send_message('toolbar_button', { name: name });\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n",
" this.message.textContent = tooltip;\n",
"};\n",
"\n",
"///////////////// REMAINING CONTENT GENERATED BY embed_js.py /////////////////\n",
"// prettier-ignore\n",
"var _JSXTOOLS_RESIZE_OBSERVER=function(A){var t,i=new WeakMap,n=new WeakMap,a=new WeakMap,r=new WeakMap,o=new Set;function s(e){if(!(this instanceof s))throw new TypeError(\"Constructor requires 'new' operator\");i.set(this,e)}function h(){throw new TypeError(\"Function is not a constructor\")}function c(e,t,i,n){e=0 in arguments?Number(arguments[0]):0,t=1 in arguments?Number(arguments[1]):0,i=2 in arguments?Number(arguments[2]):0,n=3 in arguments?Number(arguments[3]):0,this.right=(this.x=this.left=e)+(this.width=i),this.bottom=(this.y=this.top=t)+(this.height=n),Object.freeze(this)}function d(){t=requestAnimationFrame(d);var s=new WeakMap,p=new Set;o.forEach((function(t){r.get(t).forEach((function(i){var r=t instanceof window.SVGElement,o=a.get(t),d=r?0:parseFloat(o.paddingTop),f=r?0:parseFloat(o.paddingRight),l=r?0:parseFloat(o.paddingBottom),u=r?0:parseFloat(o.paddingLeft),g=r?0:parseFloat(o.borderTopWidth),m=r?0:parseFloat(o.borderRightWidth),w=r?0:parseFloat(o.borderBottomWidth),b=u+f,F=d+l,v=(r?0:parseFloat(o.borderLeftWidth))+m,W=g+w,y=r?0:t.offsetHeight-W-t.clientHeight,E=r?0:t.offsetWidth-v-t.clientWidth,R=b+v,z=F+W,M=r?t.width:parseFloat(o.width)-R-E,O=r?t.height:parseFloat(o.height)-z-y;if(n.has(t)){var k=n.get(t);if(k[0]===M&&k[1]===O)return}n.set(t,[M,O]);var S=Object.create(h.prototype);S.target=t,S.contentRect=new c(u,d,M,O),s.has(i)||(s.set(i,[]),p.add(i)),s.get(i).push(S)}))})),p.forEach((function(e){i.get(e).call(e,s.get(e),e)}))}return s.prototype.observe=function(i){if(i instanceof window.Element){r.has(i)||(r.set(i,new Set),o.add(i),a.set(i,window.getComputedStyle(i)));var n=r.get(i);n.has(this)||n.add(this),cancelAnimationFrame(t),t=requestAnimationFrame(d)}},s.prototype.unobserve=function(i){if(i instanceof window.Element&&r.has(i)){var n=r.get(i);n.has(this)&&(n.delete(this),n.size||(r.delete(i),o.delete(i))),n.size||r.delete(i),o.size||cancelAnimationFrame(t)}},A.DOMRectReadOnly=c,A.ResizeObserver=s,A.ResizeObserverEntry=h,A}; // eslint-disable-line\n",
"mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis\", \"fa fa-square-o\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o\", \"download\"]];\n",
"\n",
"mpl.extensions = [\"eps\", \"jpeg\", \"pgf\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\", \"webp\"];\n",
"\n",
"mpl.default_extension = \"png\";/* global mpl */\n",
"\n",
"var comm_websocket_adapter = function (comm) {\n",
" // Create a \"websocket\"-like object which calls the given IPython comm\n",
" // object with the appropriate methods. Currently this is a non binary\n",
" // socket, so there is still some room for performance tuning.\n",
" var ws = {};\n",
"\n",
" ws.binaryType = comm.kernel.ws.binaryType;\n",
" ws.readyState = comm.kernel.ws.readyState;\n",
" function updateReadyState(_event) {\n",
" if (comm.kernel.ws) {\n",
" ws.readyState = comm.kernel.ws.readyState;\n",
" } else {\n",
" ws.readyState = 3; // Closed state.\n",
" }\n",
" }\n",
" comm.kernel.ws.addEventListener('open', updateReadyState);\n",
" comm.kernel.ws.addEventListener('close', updateReadyState);\n",
" comm.kernel.ws.addEventListener('error', updateReadyState);\n",
"\n",
" ws.close = function () {\n",
" comm.close();\n",
" };\n",
" ws.send = function (m) {\n",
" //console.log('sending', m);\n",
" comm.send(m);\n",
" };\n",
" // Register the callback with on_msg.\n",
" comm.on_msg(function (msg) {\n",
" //console.log('receiving', msg['content']['data'], msg);\n",
" var data = msg['content']['data'];\n",
" if (data['blob'] !== undefined) {\n",
" data = {\n",
" data: new Blob(msg['buffers'], { type: data['blob'] }),\n",
" };\n",
" }\n",
" // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
" ws.onmessage(data);\n",
" });\n",
" return ws;\n",
"};\n",
"\n",
"mpl.mpl_figure_comm = function (comm, msg) {\n",
" // This is the function which gets called when the mpl process\n",
" // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
"\n",
" var id = msg.content.data.id;\n",
" // Get hold of the div created by the display call when the Comm\n",
" // socket was opened in Python.\n",
" var element = document.getElementById(id);\n",
" var ws_proxy = comm_websocket_adapter(comm);\n",
"\n",
" function ondownload(figure, _format) {\n",
" window.open(figure.canvas.toDataURL());\n",
" }\n",
"\n",
" var fig = new mpl.figure(id, ws_proxy, ondownload, element);\n",
"\n",
" // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
" // web socket which is closed, not our websocket->open comm proxy.\n",
" ws_proxy.onopen();\n",
"\n",
" fig.parent_element = element;\n",
" fig.cell_info = mpl.find_output_cell(\"\");\n",
" if (!fig.cell_info) {\n",
" console.error('Failed to find cell for figure', id, fig);\n",
" return;\n",
" }\n",
" fig.cell_info[0].output_area.element.on(\n",
" 'cleared',\n",
" { fig: fig },\n",
" fig._remove_fig_handler\n",
" );\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_close = function (fig, msg) {\n",
" var width = fig.canvas.width / fig.ratio;\n",
" fig.cell_info[0].output_area.element.off(\n",
" 'cleared',\n",
" fig._remove_fig_handler\n",
" );\n",
" fig.resizeObserverInstance.unobserve(fig.canvas_div);\n",
"\n",
" // Update the output cell to use the data from the current canvas.\n",
" fig.push_to_output();\n",
" var dataURL = fig.canvas.toDataURL();\n",
" // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
" // the notebook keyboard shortcuts fail.\n",
" IPython.keyboard_manager.enable();\n",
" fig.parent_element.innerHTML =\n",
" '';\n",
" fig.close_ws(fig, msg);\n",
"};\n",
"\n",
"mpl.figure.prototype.close_ws = function (fig, msg) {\n",
" fig.send_message('closing', msg);\n",
" // fig.ws.close()\n",
"};\n",
"\n",
"mpl.figure.prototype.push_to_output = function (_remove_interactive) {\n",
" // Turn the data on the canvas into data in the output cell.\n",
" var width = this.canvas.width / this.ratio;\n",
" var dataURL = this.canvas.toDataURL();\n",
" this.cell_info[1]['text/html'] =\n",
" '';\n",
"};\n",
"\n",
"mpl.figure.prototype.updated_canvas_event = function () {\n",
" // Tell IPython that the notebook contents must change.\n",
" IPython.notebook.set_dirty(true);\n",
" this.send_message('ack', {});\n",
" var fig = this;\n",
" // Wait a second, then push the new image to the DOM so\n",
" // that it is saved nicely (might be nice to debounce this).\n",
" setTimeout(function () {\n",
" fig.push_to_output();\n",
" }, 1000);\n",
"};\n",
"\n",
"mpl.figure.prototype._init_toolbar = function () {\n",
" var fig = this;\n",
"\n",
" var toolbar = document.createElement('div');\n",
" toolbar.classList = 'btn-toolbar';\n",
" this.root.appendChild(toolbar);\n",
"\n",
" function on_click_closure(name) {\n",
" return function (_event) {\n",
" return fig.toolbar_button_onclick(name);\n",
" };\n",
" }\n",
"\n",
" function on_mouseover_closure(tooltip) {\n",
" return function (event) {\n",
" if (!event.currentTarget.disabled) {\n",
" return fig.toolbar_button_onmouseover(tooltip);\n",
" }\n",
" };\n",
" }\n",
"\n",
" fig.buttons = {};\n",
" var buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'btn-group';\n",
" var button;\n",
" for (var toolbar_ind in mpl.toolbar_items) {\n",
" var name = mpl.toolbar_items[toolbar_ind][0];\n",
" var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
" var image = mpl.toolbar_items[toolbar_ind][2];\n",
" var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
"\n",
" if (!name) {\n",
" /* Instead of a spacer, we start a new button group. */\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
" buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'btn-group';\n",
" continue;\n",
" }\n",
"\n",
" button = fig.buttons[name] = document.createElement('button');\n",
" button.classList = 'btn btn-default';\n",
" button.href = '#';\n",
" button.title = name;\n",
" button.innerHTML = '';\n",
" button.addEventListener('click', on_click_closure(method_name));\n",
" button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
" buttonGroup.appendChild(button);\n",
" }\n",
"\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
"\n",
" // Add the status bar.\n",
" var status_bar = document.createElement('span');\n",
" status_bar.classList = 'mpl-message pull-right';\n",
" toolbar.appendChild(status_bar);\n",
" this.message = status_bar;\n",
"\n",
" // Add the close button to the window.\n",
" var buttongrp = document.createElement('div');\n",
" buttongrp.classList = 'btn-group inline pull-right';\n",
" button = document.createElement('button');\n",
" button.classList = 'btn btn-mini btn-primary';\n",
" button.href = '#';\n",
" button.title = 'Stop Interaction';\n",
" button.innerHTML = '';\n",
" button.addEventListener('click', function (_evt) {\n",
" fig.handle_close(fig, {});\n",
" });\n",
" button.addEventListener(\n",
" 'mouseover',\n",
" on_mouseover_closure('Stop Interaction')\n",
" );\n",
" buttongrp.appendChild(button);\n",
" var titlebar = this.root.querySelector('.ui-dialog-titlebar');\n",
" titlebar.insertBefore(buttongrp, titlebar.firstChild);\n",
"};\n",
"\n",
"mpl.figure.prototype._remove_fig_handler = function (event) {\n",
" var fig = event.data.fig;\n",
" if (event.target !== this) {\n",
" // Ignore bubbled events from children.\n",
" return;\n",
" }\n",
" fig.close_ws(fig, {});\n",
"};\n",
"\n",
"mpl.figure.prototype._root_extra_style = function (el) {\n",
" el.style.boxSizing = 'content-box'; // override notebook setting of border-box.\n",
"};\n",
"\n",
"mpl.figure.prototype._canvas_extra_style = function (el) {\n",
" // this is important to make the div 'focusable\n",
" el.setAttribute('tabindex', 0);\n",
" // reach out to IPython and tell the keyboard manager to turn it's self\n",
" // off when our div gets focus\n",
"\n",
" // location in version 3\n",
" if (IPython.notebook.keyboard_manager) {\n",
" IPython.notebook.keyboard_manager.register_events(el);\n",
" } else {\n",
" // location in version 2\n",
" IPython.keyboard_manager.register_events(el);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype._key_event_extra = function (event, _name) {\n",
" // Check for shift+enter\n",
" if (event.shiftKey && event.which === 13) {\n",
" this.canvas_div.blur();\n",
" // select the cell after this one\n",
" var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
" IPython.notebook.select(index + 1);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
" fig.ondownload(fig, null);\n",
"};\n",
"\n",
"mpl.find_output_cell = function (html_output) {\n",
" // Return the cell and output element which can be found *uniquely* in the notebook.\n",
" // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
" // IPython event is triggered only after the cells have been serialised, which for\n",
" // our purposes (turning an active figure into a static one), is too late.\n",
" var cells = IPython.notebook.get_cells();\n",
" var ncells = cells.length;\n",
" for (var i = 0; i < ncells; i++) {\n",
" var cell = cells[i];\n",
" if (cell.cell_type === 'code') {\n",
" for (var j = 0; j < cell.output_area.outputs.length; j++) {\n",
" var data = cell.output_area.outputs[j];\n",
" if (data.data) {\n",
" // IPython >= 3 moved mimebundle to data attribute of output\n",
" data = data.data;\n",
" }\n",
" if (data['text/html'] === html_output) {\n",
" return [cell, data, j];\n",
" }\n",
" }\n",
" }\n",
" }\n",
"};\n",
"\n",
"// Register the function which deals with the matplotlib target/channel.\n",
"// The kernel may be null if the page has been refreshed.\n",
"if (IPython.notebook.kernel !== null) {\n",
" IPython.notebook.kernel.comm_manager.register_target(\n",
" 'matplotlib',\n",
" mpl.mpl_figure_comm\n",
" );\n",
"}\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"/* Put everything inside the global mpl namespace */\n",
"/* global mpl */\n",
"window.mpl = {};\n",
"\n",
"mpl.get_websocket_type = function () {\n",
" if (typeof WebSocket !== 'undefined') {\n",
" return WebSocket;\n",
" } else if (typeof MozWebSocket !== 'undefined') {\n",
" return MozWebSocket;\n",
" } else {\n",
" alert(\n",
" 'Your browser does not have WebSocket support. ' +\n",
" 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
" 'Firefox 4 and 5 are also supported but you ' +\n",
" 'have to enable WebSockets in about:config.'\n",
" );\n",
" }\n",
"};\n",
"\n",
"mpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n",
" this.id = figure_id;\n",
"\n",
" this.ws = websocket;\n",
"\n",
" this.supports_binary = this.ws.binaryType !== undefined;\n",
"\n",
" if (!this.supports_binary) {\n",
" var warnings = document.getElementById('mpl-warnings');\n",
" if (warnings) {\n",
" warnings.style.display = 'block';\n",
" warnings.textContent =\n",
" 'This browser does not support binary websocket messages. ' +\n",
" 'Performance may be slow.';\n",
" }\n",
" }\n",
"\n",
" this.imageObj = new Image();\n",
"\n",
" this.context = undefined;\n",
" this.message = undefined;\n",
" this.canvas = undefined;\n",
" this.rubberband_canvas = undefined;\n",
" this.rubberband_context = undefined;\n",
" this.format_dropdown = undefined;\n",
"\n",
" this.image_mode = 'full';\n",
"\n",
" this.root = document.createElement('div');\n",
" this.root.setAttribute('style', 'display: inline-block');\n",
" this._root_extra_style(this.root);\n",
"\n",
" parent_element.appendChild(this.root);\n",
"\n",
" this._init_header(this);\n",
" this._init_canvas(this);\n",
" this._init_toolbar(this);\n",
"\n",
" var fig = this;\n",
"\n",
" this.waiting = false;\n",
"\n",
" this.ws.onopen = function () {\n",
" fig.send_message('supports_binary', { value: fig.supports_binary });\n",
" fig.send_message('send_image_mode', {});\n",
" if (fig.ratio !== 1) {\n",
" fig.send_message('set_device_pixel_ratio', {\n",
" device_pixel_ratio: fig.ratio,\n",
" });\n",
" }\n",
" fig.send_message('refresh', {});\n",
" };\n",
"\n",
" this.imageObj.onload = function () {\n",
" if (fig.image_mode === 'full') {\n",
" // Full images could contain transparency (where diff images\n",
" // almost always do), so we need to clear the canvas so that\n",
" // there is no ghosting.\n",
" fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
" }\n",
" fig.context.drawImage(fig.imageObj, 0, 0);\n",
" };\n",
"\n",
" this.imageObj.onunload = function () {\n",
" fig.ws.close();\n",
" };\n",
"\n",
" this.ws.onmessage = this._make_on_message_function(this);\n",
"\n",
" this.ondownload = ondownload;\n",
"};\n",
"\n",
"mpl.figure.prototype._init_header = function () {\n",
" var titlebar = document.createElement('div');\n",
" titlebar.classList =\n",
" 'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n",
" var titletext = document.createElement('div');\n",
" titletext.classList = 'ui-dialog-title';\n",
" titletext.setAttribute(\n",
" 'style',\n",
" 'width: 100%; text-align: center; padding: 3px;'\n",
" );\n",
" titlebar.appendChild(titletext);\n",
" this.root.appendChild(titlebar);\n",
" this.header = titletext;\n",
"};\n",
"\n",
"mpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n",
"\n",
"mpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n",
"\n",
"mpl.figure.prototype._init_canvas = function () {\n",
" var fig = this;\n",
"\n",
" var canvas_div = (this.canvas_div = document.createElement('div'));\n",
" canvas_div.setAttribute('tabindex', '0');\n",
" canvas_div.setAttribute(\n",
" 'style',\n",
" 'border: 1px solid #ddd;' +\n",
" 'box-sizing: content-box;' +\n",
" 'clear: both;' +\n",
" 'min-height: 1px;' +\n",
" 'min-width: 1px;' +\n",
" 'outline: 0;' +\n",
" 'overflow: hidden;' +\n",
" 'position: relative;' +\n",
" 'resize: both;' +\n",
" 'z-index: 2;'\n",
" );\n",
"\n",
" function on_keyboard_event_closure(name) {\n",
" return function (event) {\n",
" return fig.key_event(event, name);\n",
" };\n",
" }\n",
"\n",
" canvas_div.addEventListener(\n",
" 'keydown',\n",
" on_keyboard_event_closure('key_press')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'keyup',\n",
" on_keyboard_event_closure('key_release')\n",
" );\n",
"\n",
" this._canvas_extra_style(canvas_div);\n",
" this.root.appendChild(canvas_div);\n",
"\n",
" var canvas = (this.canvas = document.createElement('canvas'));\n",
" canvas.classList.add('mpl-canvas');\n",
" canvas.setAttribute(\n",
" 'style',\n",
" 'box-sizing: content-box;' +\n",
" 'pointer-events: none;' +\n",
" 'position: relative;' +\n",
" 'z-index: 0;'\n",
" );\n",
"\n",
" this.context = canvas.getContext('2d');\n",
"\n",
" var backingStore =\n",
" this.context.backingStorePixelRatio ||\n",
" this.context.webkitBackingStorePixelRatio ||\n",
" this.context.mozBackingStorePixelRatio ||\n",
" this.context.msBackingStorePixelRatio ||\n",
" this.context.oBackingStorePixelRatio ||\n",
" this.context.backingStorePixelRatio ||\n",
" 1;\n",
"\n",
" this.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
"\n",
" var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n",
" 'canvas'\n",
" ));\n",
" rubberband_canvas.setAttribute(\n",
" 'style',\n",
" 'box-sizing: content-box;' +\n",
" 'left: 0;' +\n",
" 'pointer-events: none;' +\n",
" 'position: absolute;' +\n",
" 'top: 0;' +\n",
" 'z-index: 1;'\n",
" );\n",
"\n",
" // Apply a ponyfill if ResizeObserver is not implemented by browser.\n",
" if (this.ResizeObserver === undefined) {\n",
" if (window.ResizeObserver !== undefined) {\n",
" this.ResizeObserver = window.ResizeObserver;\n",
" } else {\n",
" var obs = _JSXTOOLS_RESIZE_OBSERVER({});\n",
" this.ResizeObserver = obs.ResizeObserver;\n",
" }\n",
" }\n",
"\n",
" this.resizeObserverInstance = new this.ResizeObserver(function (entries) {\n",
" var nentries = entries.length;\n",
" for (var i = 0; i < nentries; i++) {\n",
" var entry = entries[i];\n",
" var width, height;\n",
" if (entry.contentBoxSize) {\n",
" if (entry.contentBoxSize instanceof Array) {\n",
" // Chrome 84 implements new version of spec.\n",
" width = entry.contentBoxSize[0].inlineSize;\n",
" height = entry.contentBoxSize[0].blockSize;\n",
" } else {\n",
" // Firefox implements old version of spec.\n",
" width = entry.contentBoxSize.inlineSize;\n",
" height = entry.contentBoxSize.blockSize;\n",
" }\n",
" } else {\n",
" // Chrome <84 implements even older version of spec.\n",
" width = entry.contentRect.width;\n",
" height = entry.contentRect.height;\n",
" }\n",
"\n",
" // Keep the size of the canvas and rubber band canvas in sync with\n",
" // the canvas container.\n",
" if (entry.devicePixelContentBoxSize) {\n",
" // Chrome 84 implements new version of spec.\n",
" canvas.setAttribute(\n",
" 'width',\n",
" entry.devicePixelContentBoxSize[0].inlineSize\n",
" );\n",
" canvas.setAttribute(\n",
" 'height',\n",
" entry.devicePixelContentBoxSize[0].blockSize\n",
" );\n",
" } else {\n",
" canvas.setAttribute('width', width * fig.ratio);\n",
" canvas.setAttribute('height', height * fig.ratio);\n",
" }\n",
" /* This rescales the canvas back to display pixels, so that it\n",
" * appears correct on HiDPI screens. */\n",
" canvas.style.width = width + 'px';\n",
" canvas.style.height = height + 'px';\n",
"\n",
" rubberband_canvas.setAttribute('width', width);\n",
" rubberband_canvas.setAttribute('height', height);\n",
"\n",
" // And update the size in Python. We ignore the initial 0/0 size\n",
" // that occurs as the element is placed into the DOM, which should\n",
" // otherwise not happen due to the minimum size styling.\n",
" if (fig.ws.readyState == 1 && width != 0 && height != 0) {\n",
" fig.request_resize(width, height);\n",
" }\n",
" }\n",
" });\n",
" this.resizeObserverInstance.observe(canvas_div);\n",
"\n",
" function on_mouse_event_closure(name) {\n",
" /* User Agent sniffing is bad, but WebKit is busted:\n",
" * https://bugs.webkit.org/show_bug.cgi?id=144526\n",
" * https://bugs.webkit.org/show_bug.cgi?id=181818\n",
" * The worst that happens here is that they get an extra browser\n",
" * selection when dragging, if this check fails to catch them.\n",
" */\n",
" var UA = navigator.userAgent;\n",
" var isWebKit = /AppleWebKit/.test(UA) && !/Chrome/.test(UA);\n",
" if(isWebKit) {\n",
" return function (event) {\n",
" /* This prevents the web browser from automatically changing to\n",
" * the text insertion cursor when the button is pressed. We\n",
" * want to control all of the cursor setting manually through\n",
" * the 'cursor' event from matplotlib */\n",
" event.preventDefault()\n",
" return fig.mouse_event(event, name);\n",
" };\n",
" } else {\n",
" return function (event) {\n",
" return fig.mouse_event(event, name);\n",
" };\n",
" }\n",
" }\n",
"\n",
" canvas_div.addEventListener(\n",
" 'mousedown',\n",
" on_mouse_event_closure('button_press')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'mouseup',\n",
" on_mouse_event_closure('button_release')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'dblclick',\n",
" on_mouse_event_closure('dblclick')\n",
" );\n",
" // Throttle sequential mouse events to 1 every 20ms.\n",
" canvas_div.addEventListener(\n",
" 'mousemove',\n",
" on_mouse_event_closure('motion_notify')\n",
" );\n",
"\n",
" canvas_div.addEventListener(\n",
" 'mouseenter',\n",
" on_mouse_event_closure('figure_enter')\n",
" );\n",
" canvas_div.addEventListener(\n",
" 'mouseleave',\n",
" on_mouse_event_closure('figure_leave')\n",
" );\n",
"\n",
" canvas_div.addEventListener('wheel', function (event) {\n",
" if (event.deltaY < 0) {\n",
" event.step = 1;\n",
" } else {\n",
" event.step = -1;\n",
" }\n",
" on_mouse_event_closure('scroll')(event);\n",
" });\n",
"\n",
" canvas_div.appendChild(canvas);\n",
" canvas_div.appendChild(rubberband_canvas);\n",
"\n",
" this.rubberband_context = rubberband_canvas.getContext('2d');\n",
" this.rubberband_context.strokeStyle = '#000000';\n",
"\n",
" this._resize_canvas = function (width, height, forward) {\n",
" if (forward) {\n",
" canvas_div.style.width = width + 'px';\n",
" canvas_div.style.height = height + 'px';\n",
" }\n",
" };\n",
"\n",
" // Disable right mouse context menu.\n",
" canvas_div.addEventListener('contextmenu', function (_e) {\n",
" event.preventDefault();\n",
" return false;\n",
" });\n",
"\n",
" function set_focus() {\n",
" canvas.focus();\n",
" canvas_div.focus();\n",
" }\n",
"\n",
" window.setTimeout(set_focus, 100);\n",
"};\n",
"\n",
"mpl.figure.prototype._init_toolbar = function () {\n",
" var fig = this;\n",
"\n",
" var toolbar = document.createElement('div');\n",
" toolbar.classList = 'mpl-toolbar';\n",
" this.root.appendChild(toolbar);\n",
"\n",
" function on_click_closure(name) {\n",
" return function (_event) {\n",
" return fig.toolbar_button_onclick(name);\n",
" };\n",
" }\n",
"\n",
" function on_mouseover_closure(tooltip) {\n",
" return function (event) {\n",
" if (!event.currentTarget.disabled) {\n",
" return fig.toolbar_button_onmouseover(tooltip);\n",
" }\n",
" };\n",
" }\n",
"\n",
" fig.buttons = {};\n",
" var buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'mpl-button-group';\n",
" for (var toolbar_ind in mpl.toolbar_items) {\n",
" var name = mpl.toolbar_items[toolbar_ind][0];\n",
" var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
" var image = mpl.toolbar_items[toolbar_ind][2];\n",
" var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
"\n",
" if (!name) {\n",
" /* Instead of a spacer, we start a new button group. */\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
" buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'mpl-button-group';\n",
" continue;\n",
" }\n",
"\n",
" var button = (fig.buttons[name] = document.createElement('button'));\n",
" button.classList = 'mpl-widget';\n",
" button.setAttribute('role', 'button');\n",
" button.setAttribute('aria-disabled', 'false');\n",
" button.addEventListener('click', on_click_closure(method_name));\n",
" button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
"\n",
" var icon_img = document.createElement('img');\n",
" icon_img.src = '_images/' + image + '.png';\n",
" icon_img.srcset = '_images/' + image + '_large.png 2x';\n",
" icon_img.alt = tooltip;\n",
" button.appendChild(icon_img);\n",
"\n",
" buttonGroup.appendChild(button);\n",
" }\n",
"\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
"\n",
" var fmt_picker = document.createElement('select');\n",
" fmt_picker.classList = 'mpl-widget';\n",
" toolbar.appendChild(fmt_picker);\n",
" this.format_dropdown = fmt_picker;\n",
"\n",
" for (var ind in mpl.extensions) {\n",
" var fmt = mpl.extensions[ind];\n",
" var option = document.createElement('option');\n",
" option.selected = fmt === mpl.default_extension;\n",
" option.innerHTML = fmt;\n",
" fmt_picker.appendChild(option);\n",
" }\n",
"\n",
" var status_bar = document.createElement('span');\n",
" status_bar.classList = 'mpl-message';\n",
" toolbar.appendChild(status_bar);\n",
" this.message = status_bar;\n",
"};\n",
"\n",
"mpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\n",
" // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
" // which will in turn request a refresh of the image.\n",
" this.send_message('resize', { width: x_pixels, height: y_pixels });\n",
"};\n",
"\n",
"mpl.figure.prototype.send_message = function (type, properties) {\n",
" properties['type'] = type;\n",
" properties['figure_id'] = this.id;\n",
" this.ws.send(JSON.stringify(properties));\n",
"};\n",
"\n",
"mpl.figure.prototype.send_draw_message = function () {\n",
" if (!this.waiting) {\n",
" this.waiting = true;\n",
" this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
" var format_dropdown = fig.format_dropdown;\n",
" var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
" fig.ondownload(fig, format);\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_resize = function (fig, msg) {\n",
" var size = msg['size'];\n",
" if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\n",
" fig._resize_canvas(size[0], size[1], msg['forward']);\n",
" fig.send_message('refresh', {});\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_rubberband = function (fig, msg) {\n",
" var x0 = msg['x0'] / fig.ratio;\n",
" var y0 = (fig.canvas.height - msg['y0']) / fig.ratio;\n",
" var x1 = msg['x1'] / fig.ratio;\n",
" var y1 = (fig.canvas.height - msg['y1']) / fig.ratio;\n",
" x0 = Math.floor(x0) + 0.5;\n",
" y0 = Math.floor(y0) + 0.5;\n",
" x1 = Math.floor(x1) + 0.5;\n",
" y1 = Math.floor(y1) + 0.5;\n",
" var min_x = Math.min(x0, x1);\n",
" var min_y = Math.min(y0, y1);\n",
" var width = Math.abs(x1 - x0);\n",
" var height = Math.abs(y1 - y0);\n",
"\n",
" fig.rubberband_context.clearRect(\n",
" 0,\n",
" 0,\n",
" fig.canvas.width / fig.ratio,\n",
" fig.canvas.height / fig.ratio\n",
" );\n",
"\n",
" fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_figure_label = function (fig, msg) {\n",
" // Updates the figure title.\n",
" fig.header.textContent = msg['label'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_cursor = function (fig, msg) {\n",
" fig.canvas_div.style.cursor = msg['cursor'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_message = function (fig, msg) {\n",
" fig.message.textContent = msg['message'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_draw = function (fig, _msg) {\n",
" // Request the server to send over a new figure.\n",
" fig.send_draw_message();\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_image_mode = function (fig, msg) {\n",
" fig.image_mode = msg['mode'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_history_buttons = function (fig, msg) {\n",
" for (var key in msg) {\n",
" if (!(key in fig.buttons)) {\n",
" continue;\n",
" }\n",
" fig.buttons[key].disabled = !msg[key];\n",
" fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\n",
" if (msg['mode'] === 'PAN') {\n",
" fig.buttons['Pan'].classList.add('active');\n",
" fig.buttons['Zoom'].classList.remove('active');\n",
" } else if (msg['mode'] === 'ZOOM') {\n",
" fig.buttons['Pan'].classList.remove('active');\n",
" fig.buttons['Zoom'].classList.add('active');\n",
" } else {\n",
" fig.buttons['Pan'].classList.remove('active');\n",
" fig.buttons['Zoom'].classList.remove('active');\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.updated_canvas_event = function () {\n",
" // Called whenever the canvas gets updated.\n",
" this.send_message('ack', {});\n",
"};\n",
"\n",
"// A function to construct a web socket function for onmessage handling.\n",
"// Called in the figure constructor.\n",
"mpl.figure.prototype._make_on_message_function = function (fig) {\n",
" return function socket_on_message(evt) {\n",
" if (evt.data instanceof Blob) {\n",
" var img = evt.data;\n",
" if (img.type !== 'image/png') {\n",
" /* FIXME: We get \"Resource interpreted as Image but\n",
" * transferred with MIME type text/plain:\" errors on\n",
" * Chrome. But how to set the MIME type? It doesn't seem\n",
" * to be part of the websocket stream */\n",
" img.type = 'image/png';\n",
" }\n",
"\n",
" /* Free the memory for the previous frames */\n",
" if (fig.imageObj.src) {\n",
" (window.URL || window.webkitURL).revokeObjectURL(\n",
" fig.imageObj.src\n",
" );\n",
" }\n",
"\n",
" fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
" img\n",
" );\n",
" fig.updated_canvas_event();\n",
" fig.waiting = false;\n",
" return;\n",
" } else if (\n",
" typeof evt.data === 'string' &&\n",
" evt.data.slice(0, 21) === 'data:image/png;base64'\n",
" ) {\n",
" fig.imageObj.src = evt.data;\n",
" fig.updated_canvas_event();\n",
" fig.waiting = false;\n",
" return;\n",
" }\n",
"\n",
" var msg = JSON.parse(evt.data);\n",
" var msg_type = msg['type'];\n",
"\n",
" // Call the \"handle_{type}\" callback, which takes\n",
" // the figure and JSON message as its only arguments.\n",
" try {\n",
" var callback = fig['handle_' + msg_type];\n",
" } catch (e) {\n",
" console.log(\n",
" \"No handler for the '\" + msg_type + \"' message type: \",\n",
" msg\n",
" );\n",
" return;\n",
" }\n",
"\n",
" if (callback) {\n",
" try {\n",
" // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
" callback(fig, msg);\n",
" } catch (e) {\n",
" console.log(\n",
" \"Exception inside the 'handler_\" + msg_type + \"' callback:\",\n",
" e,\n",
" e.stack,\n",
" msg\n",
" );\n",
" }\n",
" }\n",
" };\n",
"};\n",
"\n",
"\n",
"/*\n",
" * return a copy of an object with only non-object keys\n",
" * we need this to avoid circular references\n",
" * https://stackoverflow.com/a/24161582/3208463\n",
" */\n",
"function simpleKeys(original) {\n",
" return Object.keys(original).reduce(function (obj, key) {\n",
" if (typeof original[key] !== 'object') {\n",
" obj[key] = original[key];\n",
" }\n",
" return obj;\n",
" }, {});\n",
"}\n",
"\n",
"mpl.figure.prototype.mouse_event = function (event, name) {\n",
" if (name === 'button_press') {\n",
" this.canvas.focus();\n",
" this.canvas_div.focus();\n",
" }\n",
"\n",
" // from https://stackoverflow.com/q/1114465\n",
" var boundingRect = this.canvas.getBoundingClientRect();\n",
" var x = (event.clientX - boundingRect.left) * this.ratio;\n",
" var y = (event.clientY - boundingRect.top) * this.ratio;\n",
"\n",
" this.send_message(name, {\n",
" x: x,\n",
" y: y,\n",
" button: event.button,\n",
" step: event.step,\n",
" guiEvent: simpleKeys(event),\n",
" });\n",
"\n",
" return false;\n",
"};\n",
"\n",
"mpl.figure.prototype._key_event_extra = function (_event, _name) {\n",
" // Handle any extra behaviour associated with a key event\n",
"};\n",
"\n",
"mpl.figure.prototype.key_event = function (event, name) {\n",
" // Prevent repeat events\n",
" if (name === 'key_press') {\n",
" if (event.key === this._key) {\n",
" return;\n",
" } else {\n",
" this._key = event.key;\n",
" }\n",
" }\n",
" if (name === 'key_release') {\n",
" this._key = null;\n",
" }\n",
"\n",
" var value = '';\n",
" if (event.ctrlKey && event.key !== 'Control') {\n",
" value += 'ctrl+';\n",
" }\n",
" else if (event.altKey && event.key !== 'Alt') {\n",
" value += 'alt+';\n",
" }\n",
" else if (event.shiftKey && event.key !== 'Shift') {\n",
" value += 'shift+';\n",
" }\n",
"\n",
" value += 'k' + event.key;\n",
"\n",
" this._key_event_extra(event, name);\n",
"\n",
" this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\n",
" return false;\n",
"};\n",
"\n",
"mpl.figure.prototype.toolbar_button_onclick = function (name) {\n",
" if (name === 'download') {\n",
" this.handle_save(this, null);\n",
" } else {\n",
" this.send_message('toolbar_button', { name: name });\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n",
" this.message.textContent = tooltip;\n",
"};\n",
"\n",
"///////////////// REMAINING CONTENT GENERATED BY embed_js.py /////////////////\n",
"// prettier-ignore\n",
"var _JSXTOOLS_RESIZE_OBSERVER=function(A){var t,i=new WeakMap,n=new WeakMap,a=new WeakMap,r=new WeakMap,o=new Set;function s(e){if(!(this instanceof s))throw new TypeError(\"Constructor requires 'new' operator\");i.set(this,e)}function h(){throw new TypeError(\"Function is not a constructor\")}function c(e,t,i,n){e=0 in arguments?Number(arguments[0]):0,t=1 in arguments?Number(arguments[1]):0,i=2 in arguments?Number(arguments[2]):0,n=3 in arguments?Number(arguments[3]):0,this.right=(this.x=this.left=e)+(this.width=i),this.bottom=(this.y=this.top=t)+(this.height=n),Object.freeze(this)}function d(){t=requestAnimationFrame(d);var s=new WeakMap,p=new Set;o.forEach((function(t){r.get(t).forEach((function(i){var r=t instanceof window.SVGElement,o=a.get(t),d=r?0:parseFloat(o.paddingTop),f=r?0:parseFloat(o.paddingRight),l=r?0:parseFloat(o.paddingBottom),u=r?0:parseFloat(o.paddingLeft),g=r?0:parseFloat(o.borderTopWidth),m=r?0:parseFloat(o.borderRightWidth),w=r?0:parseFloat(o.borderBottomWidth),b=u+f,F=d+l,v=(r?0:parseFloat(o.borderLeftWidth))+m,W=g+w,y=r?0:t.offsetHeight-W-t.clientHeight,E=r?0:t.offsetWidth-v-t.clientWidth,R=b+v,z=F+W,M=r?t.width:parseFloat(o.width)-R-E,O=r?t.height:parseFloat(o.height)-z-y;if(n.has(t)){var k=n.get(t);if(k[0]===M&&k[1]===O)return}n.set(t,[M,O]);var S=Object.create(h.prototype);S.target=t,S.contentRect=new c(u,d,M,O),s.has(i)||(s.set(i,[]),p.add(i)),s.get(i).push(S)}))})),p.forEach((function(e){i.get(e).call(e,s.get(e),e)}))}return s.prototype.observe=function(i){if(i instanceof window.Element){r.has(i)||(r.set(i,new Set),o.add(i),a.set(i,window.getComputedStyle(i)));var n=r.get(i);n.has(this)||n.add(this),cancelAnimationFrame(t),t=requestAnimationFrame(d)}},s.prototype.unobserve=function(i){if(i instanceof window.Element&&r.has(i)){var n=r.get(i);n.has(this)&&(n.delete(this),n.size||(r.delete(i),o.delete(i))),n.size||r.delete(i),o.size||cancelAnimationFrame(t)}},A.DOMRectReadOnly=c,A.ResizeObserver=s,A.ResizeObserverEntry=h,A}; // eslint-disable-line\n",
"mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis\", \"fa fa-square-o\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o\", \"download\"]];\n",
"\n",
"mpl.extensions = [\"eps\", \"jpeg\", \"pgf\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\", \"webp\"];\n",
"\n",
"mpl.default_extension = \"png\";/* global mpl */\n",
"\n",
"var comm_websocket_adapter = function (comm) {\n",
" // Create a \"websocket\"-like object which calls the given IPython comm\n",
" // object with the appropriate methods. Currently this is a non binary\n",
" // socket, so there is still some room for performance tuning.\n",
" var ws = {};\n",
"\n",
" ws.binaryType = comm.kernel.ws.binaryType;\n",
" ws.readyState = comm.kernel.ws.readyState;\n",
" function updateReadyState(_event) {\n",
" if (comm.kernel.ws) {\n",
" ws.readyState = comm.kernel.ws.readyState;\n",
" } else {\n",
" ws.readyState = 3; // Closed state.\n",
" }\n",
" }\n",
" comm.kernel.ws.addEventListener('open', updateReadyState);\n",
" comm.kernel.ws.addEventListener('close', updateReadyState);\n",
" comm.kernel.ws.addEventListener('error', updateReadyState);\n",
"\n",
" ws.close = function () {\n",
" comm.close();\n",
" };\n",
" ws.send = function (m) {\n",
" //console.log('sending', m);\n",
" comm.send(m);\n",
" };\n",
" // Register the callback with on_msg.\n",
" comm.on_msg(function (msg) {\n",
" //console.log('receiving', msg['content']['data'], msg);\n",
" var data = msg['content']['data'];\n",
" if (data['blob'] !== undefined) {\n",
" data = {\n",
" data: new Blob(msg['buffers'], { type: data['blob'] }),\n",
" };\n",
" }\n",
" // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
" ws.onmessage(data);\n",
" });\n",
" return ws;\n",
"};\n",
"\n",
"mpl.mpl_figure_comm = function (comm, msg) {\n",
" // This is the function which gets called when the mpl process\n",
" // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
"\n",
" var id = msg.content.data.id;\n",
" // Get hold of the div created by the display call when the Comm\n",
" // socket was opened in Python.\n",
" var element = document.getElementById(id);\n",
" var ws_proxy = comm_websocket_adapter(comm);\n",
"\n",
" function ondownload(figure, _format) {\n",
" window.open(figure.canvas.toDataURL());\n",
" }\n",
"\n",
" var fig = new mpl.figure(id, ws_proxy, ondownload, element);\n",
"\n",
" // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
" // web socket which is closed, not our websocket->open comm proxy.\n",
" ws_proxy.onopen();\n",
"\n",
" fig.parent_element = element;\n",
" fig.cell_info = mpl.find_output_cell(\"\");\n",
" if (!fig.cell_info) {\n",
" console.error('Failed to find cell for figure', id, fig);\n",
" return;\n",
" }\n",
" fig.cell_info[0].output_area.element.on(\n",
" 'cleared',\n",
" { fig: fig },\n",
" fig._remove_fig_handler\n",
" );\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_close = function (fig, msg) {\n",
" var width = fig.canvas.width / fig.ratio;\n",
" fig.cell_info[0].output_area.element.off(\n",
" 'cleared',\n",
" fig._remove_fig_handler\n",
" );\n",
" fig.resizeObserverInstance.unobserve(fig.canvas_div);\n",
"\n",
" // Update the output cell to use the data from the current canvas.\n",
" fig.push_to_output();\n",
" var dataURL = fig.canvas.toDataURL();\n",
" // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
" // the notebook keyboard shortcuts fail.\n",
" IPython.keyboard_manager.enable();\n",
" fig.parent_element.innerHTML =\n",
" '';\n",
" fig.close_ws(fig, msg);\n",
"};\n",
"\n",
"mpl.figure.prototype.close_ws = function (fig, msg) {\n",
" fig.send_message('closing', msg);\n",
" // fig.ws.close()\n",
"};\n",
"\n",
"mpl.figure.prototype.push_to_output = function (_remove_interactive) {\n",
" // Turn the data on the canvas into data in the output cell.\n",
" var width = this.canvas.width / this.ratio;\n",
" var dataURL = this.canvas.toDataURL();\n",
" this.cell_info[1]['text/html'] =\n",
" '';\n",
"};\n",
"\n",
"mpl.figure.prototype.updated_canvas_event = function () {\n",
" // Tell IPython that the notebook contents must change.\n",
" IPython.notebook.set_dirty(true);\n",
" this.send_message('ack', {});\n",
" var fig = this;\n",
" // Wait a second, then push the new image to the DOM so\n",
" // that it is saved nicely (might be nice to debounce this).\n",
" setTimeout(function () {\n",
" fig.push_to_output();\n",
" }, 1000);\n",
"};\n",
"\n",
"mpl.figure.prototype._init_toolbar = function () {\n",
" var fig = this;\n",
"\n",
" var toolbar = document.createElement('div');\n",
" toolbar.classList = 'btn-toolbar';\n",
" this.root.appendChild(toolbar);\n",
"\n",
" function on_click_closure(name) {\n",
" return function (_event) {\n",
" return fig.toolbar_button_onclick(name);\n",
" };\n",
" }\n",
"\n",
" function on_mouseover_closure(tooltip) {\n",
" return function (event) {\n",
" if (!event.currentTarget.disabled) {\n",
" return fig.toolbar_button_onmouseover(tooltip);\n",
" }\n",
" };\n",
" }\n",
"\n",
" fig.buttons = {};\n",
" var buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'btn-group';\n",
" var button;\n",
" for (var toolbar_ind in mpl.toolbar_items) {\n",
" var name = mpl.toolbar_items[toolbar_ind][0];\n",
" var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
" var image = mpl.toolbar_items[toolbar_ind][2];\n",
" var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
"\n",
" if (!name) {\n",
" /* Instead of a spacer, we start a new button group. */\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
" buttonGroup = document.createElement('div');\n",
" buttonGroup.classList = 'btn-group';\n",
" continue;\n",
" }\n",
"\n",
" button = fig.buttons[name] = document.createElement('button');\n",
" button.classList = 'btn btn-default';\n",
" button.href = '#';\n",
" button.title = name;\n",
" button.innerHTML = '';\n",
" button.addEventListener('click', on_click_closure(method_name));\n",
" button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
" buttonGroup.appendChild(button);\n",
" }\n",
"\n",
" if (buttonGroup.hasChildNodes()) {\n",
" toolbar.appendChild(buttonGroup);\n",
" }\n",
"\n",
" // Add the status bar.\n",
" var status_bar = document.createElement('span');\n",
" status_bar.classList = 'mpl-message pull-right';\n",
" toolbar.appendChild(status_bar);\n",
" this.message = status_bar;\n",
"\n",
" // Add the close button to the window.\n",
" var buttongrp = document.createElement('div');\n",
" buttongrp.classList = 'btn-group inline pull-right';\n",
" button = document.createElement('button');\n",
" button.classList = 'btn btn-mini btn-primary';\n",
" button.href = '#';\n",
" button.title = 'Stop Interaction';\n",
" button.innerHTML = '';\n",
" button.addEventListener('click', function (_evt) {\n",
" fig.handle_close(fig, {});\n",
" });\n",
" button.addEventListener(\n",
" 'mouseover',\n",
" on_mouseover_closure('Stop Interaction')\n",
" );\n",
" buttongrp.appendChild(button);\n",
" var titlebar = this.root.querySelector('.ui-dialog-titlebar');\n",
" titlebar.insertBefore(buttongrp, titlebar.firstChild);\n",
"};\n",
"\n",
"mpl.figure.prototype._remove_fig_handler = function (event) {\n",
" var fig = event.data.fig;\n",
" if (event.target !== this) {\n",
" // Ignore bubbled events from children.\n",
" return;\n",
" }\n",
" fig.close_ws(fig, {});\n",
"};\n",
"\n",
"mpl.figure.prototype._root_extra_style = function (el) {\n",
" el.style.boxSizing = 'content-box'; // override notebook setting of border-box.\n",
"};\n",
"\n",
"mpl.figure.prototype._canvas_extra_style = function (el) {\n",
" // this is important to make the div 'focusable\n",
" el.setAttribute('tabindex', 0);\n",
" // reach out to IPython and tell the keyboard manager to turn it's self\n",
" // off when our div gets focus\n",
"\n",
" // location in version 3\n",
" if (IPython.notebook.keyboard_manager) {\n",
" IPython.notebook.keyboard_manager.register_events(el);\n",
" } else {\n",
" // location in version 2\n",
" IPython.keyboard_manager.register_events(el);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype._key_event_extra = function (event, _name) {\n",
" // Check for shift+enter\n",
" if (event.shiftKey && event.which === 13) {\n",
" this.canvas_div.blur();\n",
" // select the cell after this one\n",
" var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
" IPython.notebook.select(index + 1);\n",
" }\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
" fig.ondownload(fig, null);\n",
"};\n",
"\n",
"mpl.find_output_cell = function (html_output) {\n",
" // Return the cell and output element which can be found *uniquely* in the notebook.\n",
" // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
" // IPython event is triggered only after the cells have been serialised, which for\n",
" // our purposes (turning an active figure into a static one), is too late.\n",
" var cells = IPython.notebook.get_cells();\n",
" var ncells = cells.length;\n",
" for (var i = 0; i < ncells; i++) {\n",
" var cell = cells[i];\n",
" if (cell.cell_type === 'code') {\n",
" for (var j = 0; j < cell.output_area.outputs.length; j++) {\n",
" var data = cell.output_area.outputs[j];\n",
" if (data.data) {\n",
" // IPython >= 3 moved mimebundle to data attribute of output\n",
" data = data.data;\n",
" }\n",
" if (data['text/html'] === html_output) {\n",
" return [cell, data, j];\n",
" }\n",
" }\n",
" }\n",
" }\n",
"};\n",
"\n",
"// Register the function which deals with the matplotlib target/channel.\n",
"// The kernel may be null if the page has been refreshed.\n",
"if (IPython.notebook.kernel !== null) {\n",
" IPython.notebook.kernel.comm_manager.register_target(\n",
" 'matplotlib',\n",
" mpl.mpl_figure_comm\n",
" );\n",
"}\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"sortcount = sorted(bycount, reverse=False, key=lambda x: bycount[x])\n",
"sortsize = sorted(bysize, reverse=False, key=lambda x: bysize[x])\n",
"sortsizerepresentative = sorted(bysizerepresentative, reverse=False, key=lambda x: bysizerepresentative[x])\n",
"from matplotlib import pyplot\n",
"%matplotlib notebook\n",
"for desc, data in {\"po številu datotek\": (sortcount, bycount), \"po velikosti datotek\": (sortsize, bysize), \"po številu po velikosti največjih datotek torrentov\": (sortsizerepresentative, bysizerepresentative)}.items():\n",
" fig, axes = pyplot.subplots()\n",
" # axes.pie([data[1][key] for key in data[0]], labels=data[0])\n",
" axes.barh(data[0], [data[1][key] for key in data[0]])\n",
" pyplot.xscale(\"log\")\n",
" axes.set_title(desc)\n",
" fig.show()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.10.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}