Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as test from 'https://www.npmjs.com/package/test' | |
export function renderMime({node, data}) { | |
const widget = test.render(node, data); | |
return { | |
onData(newData) { | |
widget.update(newData); | |
}, | |
onCleanup() { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Plot lines and/or markers to the | |
:class:`~matplotlib.axes.Axes`. *args* is a variable length | |
argument, allowing for multiple *x*, *y* pairs with an | |
optional format string. For example, each of the following is | |
legal:: | |
plot(x, y) # plot x and y using default line style and color | |
plot(x, y, 'bo') # plot x and y using blue circle markers | |
plot(y) # plot y using x as index array 0..N-1 | |
plot(y, 'r+') # ditto, but with red plusses |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
async function waitForElement(page, selector) { | |
while (true) { | |
const element = await page.$(selector); | |
if (element) { | |
return element; | |
} | |
await new Promise((resolve) => setTimeout(resolve, 100)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getCurrentScript(callback) { | |
if (document.currentScript) { | |
callback(document.currentScript); | |
return; | |
} | |
var scripts = document.scripts; | |
function onLoad() { | |
for (var i = 0; i < scripts.length; ++i) { | |
scripts[i].removeEventListener('load', onLoad, false); | |
} |