gzuidhof / starboard-notebook Goto Github PK
View Code? Open in Web Editor NEWIn-browser literate notebooks
License: Mozilla Public License 2.0
In-browser literate notebooks
License: Mozilla Public License 2.0
I do not see a discussions tab, but wanted to understand any thoughts towards a SQL Cell? I am still working towards understanding the plugin system, however, I did create a sample notebook using starboard-editor and wa-sqlite here
I am accustomed to the Jupyter Shift+Enter shortcut, which I'm very glad is supported in Starboard. When editing Markdown cells, it seems this shortcut does render the MD, but it doesn't "stop editing". If you go to edit another cell after nothing shows up - it will still be typing it in the already-rendered md cell being previously edited. I also typically edit MD cells by double clicking. From some crude testing I think it's only an issue if all of these conditions are met:
When it happens it seems there's no way to stop editing the cell, even if you delete the glitch cell. I end up saving and re-loading the whole notebook.
With gzuidhof/starboard-python#5 , Starboard-Python is going to run in a web worker. Furthermore, it has been designed with the ability to run more kernels for different cell types in the same web worker.
The kernel manager code is still in the starboard-python repository but should eventually be moved to starboard-notebook. Potential features that could be added to it would be
I'm not sure if that's the correct place to report the issue - but when I open https://starboard.gg/#visualization on an iPad the notebook remains empty. On console I saw the error TypeError: Illegal constructor
Everytime I click the run button of the last cell in a v0.8.0 notebook a new cell is appended.
I'm wondering if that's intentional?
Would be nice if it worked. My expectation is that the editor is initially expanded vertically to accomodate the whole cell contents even if in "advanced editor" mode.
I noticed that with release 0.4.0 that insertCell and removeCell throw errors:
TypeError: undefined is not an object (evaluating 'this.insertCell')
and
TypeError: undefined is not an object (evaluating 'this.removeCell')
Insert cell does seem to work if you are inserting a cell at the bottom of the notebook.
These errors still exist in the 0.4.1 release as well.
Reproduce via: js cell. type 1, press alt+enter. type 2, press alt+enter. type 3, press alt+enter, etc.,
What you end up with is this notebook:
12
34
56
Starboard notebooks look super interesting! If things go nicely, I might end up contributing to this project, since it seems like it could be pretty useful for some of my university course tools.
I wanted to ask if you're open to the idea of "reactive" notebooks. Basically, a notebook where cells can depend on other cells and auto-update. (Preferably running the entire user-code in a worker that can easily be killed) This would be extremely useful for more math-oriented notebooks.
Furthermore, I noticed your pull request to pyodide, which I find pretty cool. Since you're already have pyodide, loading sympy is pretty easy. Thus, I wanted to ask if you're also open to adding a mathematical formula editor (probably mathlive) and a fair bit of magic along those lines. Maybe the mathematical formula editor should be done as a plugin or something.
I do have a bit of experience with the math stuff, since I hacked together this.
Hi Guido,
I have been disconnected from starboard.gg a few times today while I was editing notebooks. That was silent as far as I can tell: I only noticed it when I tried to save my notebook (I couldn't). Since you support the export of notebooks (👍) and given that starboard-cli enables to work locally with notebooks with pretty much that same interface (👍), that was only a minor inconvenience!
At this stage, is there a way to push my locally edited notebooks back to starboard.gg?
Cheers,
SB
Microsoft Windows [版本 10.0.19043.1288]
clela@AIYC C:\Users\clela\Downloads\starboard-notebook-0.14.2
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
added 620 packages from 313 contributors and audited 620 packages in 14.579s
found 7 moderate severity vulnerabilities
run npm audit fix
to fix them, or npm audit
for details
clela@AIYC C:\Users\clela\Downloads\starboard-notebook-0.14.2
[email protected] build C:\Users\clela\Downloads\starboard-notebook-0.14.2
lerna run build
lerna notice cli v4.0.0
lerna info Executing command in 3 packages: "npm run build"
lerna ERR! npm run build exited 1 in 'starboard-rich-editor'
lerna ERR! npm run build stdout:
[email protected] build C:\Users\clela\Downloads\starboard-notebook-0.14.2\packages\starboard-rich-editor
tsc -b
lerna ERR! npm run build stderr:
'tsc' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: tsc -b
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\clela\AppData\Roaming\npm-cache_logs\2021-11-10T03_34_55_249Z-debug.log
lerna ERR! npm run build exited 1 in 'starboard-rich-editor'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: lerna run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\clela\AppData\Roaming\npm-cache_logs\2021-11-10T03_34_55_325Z-debug.log
clela@AIYC C:\Users\clela\Downloads\starboard-notebook-0.14.2
Windows 8.1 64
npm 6.14.4
I cloned the repository and executed the npm install
.
npm does his magic but at some point during installation I received the following error:
16269 error premature close
16270 verbose exit [ 1, true ]
I tried building the project in an attempt to hack in the mathlive editor.
However, while doing so, I ran into a fair number of issues and am still not sure if I got it to compile properly. This is what it looks like on my side:
The issues I ran into were the following:
minify-lit-html-loader
caused a ton of issues, so I ended up having to remove it.PS C:\Users\Stefnotch\Documents\GitHub\Tools\starboard-notebook> npm i
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\Stefnotch\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --cache=C:\Users\Stefnotch\AppData\Local\npm-cache\_cacache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! > [email protected] prepublish
npm ERR! > yarn run clean && yarn run build
npm ERR! npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! npm WARN deprecated [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm ERR! npm WARN deprecated [email protected]: Package no longer supported. Contact [email protected] for more info.
npm ERR! npm WARN deprecated [email protected]: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm ERR! npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
y-js` as of v3.13.0
npm ERR! npm WARN deprecated [email protected]: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
npm ERR! npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even i a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! 'yarn' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! npm notice
npm ERR! npm notice New minor version of npm available! 7.0.15 -> 7.11.2
npm ERR! npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.11.2>
npm ERR! npm notice Run `npm install -g [email protected]` to update!
npm ERR! npm notice
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\Stefnotch\AppData\Local\npm-cache\_cacache\tmp\git-clone-b17f82b8
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\Windows\system32\cmd.exe /d /s /c yarn run clean && yarn run build
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\Stefnotch\AppData\Local\npm-cache\_cacache\_logs\2021-04-30T13_58_14_869Z-debug.log
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Stefnotch\AppData\Local\npm-cache\_logs\2021-04-30T13_58_23_042Z-debug.log
PS C:\Users\Stefnotch\Documents\GitHub\Tools\starboard-notebook> npm i
up to date, audited 1951 packages in 4s
found 0 vulnerabilities
PS C:\Users\Stefnotch\Documents\GitHub\Tools\starboard-notebook>
node-sass
depends on node-gyp
, which wants me to have Python installed. After some quick google-fu, it turns out that node-sass
is deprecated in favour of sass
.PS C:\Users\Stefnotch\Documents\GitHub\Tools\starboard-notebook> npm i
npm ERR! code 1
npm ERR! path C:\Users\Stefnotch\Documents\GitHub\Tools\starboard-notebook\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\Users\Stefnotch\Documents\GitHub\Tools\starboard-notebook\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Stefnotch\Documents\GitHub\Tools\starboard-notebook\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at callback (C:\Users\Stefnotch\Documents\GitHub\Tools\starboard-notebook\node_modules\graceful-fs\polyfills.js:295:20)
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:194:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Stefnotch\\Documents\\GitHub\\Tools\\starboard-notebook\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\Stefnotch\Documents\GitHub\Tools\starboard-notebook\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.0.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Stefnotch\AppData\Local\npm-cache\_logs\2021-04-30T14_04_23_933Z-debug.log
Replacing node-sass
with sass
doesn't work, because sass
wants Webpack 5. So I had to update to Webpack 5 and upgrade nearly all dependencies...which I suppose should be done anyways.
Here are the changes I made on my side. I probably missed a fair number of things that should be done. Also, is there a recommended code formatting style? I'm currently using Prettier, which tends to be rather aggressive.
Upon opening the website, it took me way too long to find the teensy tiny "add cell" icon
When I try linking to a section, e.g., [link to section](#section)
, the link generated goes to the notebook's host rather than the current page. Is there a workaround? Or if not, could you implement this?
I am wondering if you can add a copyfree license also along with MPL.
In https://starboard.gg/nb/ntZSsIp, I have the warning:
Could not set localStorage (key = starboard_notebook_text_editor_preference).
Not a big deal, but any solution / explanation for it?
Cheers,
SB
Is it possible to configure the notebook so that, for example, you disallow js cells, or default new cells to python?
I try to embed starboard as a widget in a property view and I managed to move the <starboard-notebook>
element from body to the wanted dom position:
let starboardElement = document.queryselector('starboard-notebook');
mycontainer.append(starboardElement)
However, I have an issue with the checks from crossOriginIsolated.ts
.
I import starboard-notebook from
http://localhost:8888/tree/treezjs/node_moduels/starboard-notebook/dist/starboard-notebook.js
and the current url of my app is
Therefore:
location.pathname ="/lab"
scope.pathname = "/tree/treezjs/node_moduels/starboard-notebook/dist/"
and location.pathname.startsWith(scope.pathname)
is false, causing an error.
=> How can I disable the cross origin check to avoid following error?
On Windows npm run build
throw an error because Windows doesn't have the rm
command natively.
However, I've managed to build the application running the commands separately, without the rm
(I deleted the dist
directory manually):
npm run build:notebook
tsc
It is disappearing on hover, but simply moving the mouse over to the menu is often interpreted as moving the mouse off of the menu, so it disappears before user can interact with it. I suspect it may be better to simply disappear on toggle or menu item selection
Just documenting this issue for gh- https://community.starboard.gg/t/pyodide-is-not-defined-error-in-the-example-python-notebook/117
Starboard Notebook looks like a very exciting project!
Are there any plans to create completely independent stand-alone HTML notebook files?
I've played with starboard-cli
, but I'm looking to create completely portable stand-alone reports, with bring-your-own data functionality.
e.g. perhaps an "Export as HTML" button would download a stand-alone HTML file which could be emailed to other people.
Perhaps a subcommand could be added to starboard-cli
? Something like starboard build
.
I'm imagining a situation where different people have a CSV file on their computer.
I would create a report using Starboard, and send it without the data.
Then, a user could open the Starboard file in their browser, and click a button to load in their local CSV file, and it would automatically generate the report.
At the moment I'm doing this using R Markdown and Shiny, but it's not particularly convenient to create a portable stand-alone R Shiny app.
Is this sort of thing in scope for Starboard?
Hello,
I have noticed that if the page is refreshed several times (to reset my workspace), web assembly runs out of memory and is not able to load Pyodide. I think part of this is that I load a 5 MB dataset to the notebook via JavaScript, then copy it to Python. I can improve that on my side, but also clearing selectively clearing the cache on reload so the the Pyodide executable isn't lost would improve this. I'm not very familiar with this so I'm not much help without some research.
Thanks!
Only just found this but I love it. I believe pyodide released 0.16 and was wondering if there's a way to incorporate this instead of 0.15 into a notebook.
ctrl + enter does still work to insert a new cell below.
In my opinion shift + enter should just move you into the next cell so that the user doesn't shift+enter a few cells of code and then get stuck because they hit a markdown cell.
The cell switching currently doesn't support prosemirror #29
Prosemirror itself doesn't have a concept of line numbers, instead it's tree shaped (like the browser dom) and leaves most arrow key navigation things to the browser. Prosemirror uses contenteditable under the hood.
This makes figuring out if the user is at the top of the document rather tricky. For example, imagine the cursor being placed after the <br>a
. Then, while the cursor is in the topmost element, it's not at the top of the document. There is still a <br>
before it.
With some work, we might be able to cover all possible cases and implement arrow key navigation. One other approach would be to add a zero-height div at the top of the document. When it gets selected, the cell switching gets invoked.
One alternative approach would be to, when the user presses the up arrow key
Hi Guido,
Any idea why getUserMedia
wouldn't work out of the box in the context of starboard.gg hosting?
I end up with a NotAllowedError
for https://starboard.gg/nb/nI3Psrm while the same notebook hosted on github pages (https://boisgera.github.io/webcam/starboard.html) works as expected (I am asked for permissions and once granted, I get the stream).
I have the same behavior with Firefox and Chrome (Linux). As far I can tell (but I may be wrong) I have no specific setting in these browsers that would deny automatically the access to the webcam from the starboard.gg domain.
Cheers,
SB
If the user click on "Change Cell Type" button, and after that click on "Cancel" button, the "Change Cell Type" button doesn't work anymore.
I'll take a stab at it when I get the chance (but it may be a little while)
Dear,
I tried matplotlib animation in starboard-notebook, but encountered the following error:
Python exception:
Traceback (most recent call last):
File "/lib/python3.8/site-packages/pyodide/_base.py", line 70, in eval_code
eval(compile(mod, "", mode="exec"), ns, ns)
File "", line 22, in
File "/lib/python3.8/site-packages/matplotlib/animation.py", line 1484, in init
TimedAnimation.init(self, fig, *args, **kwargs)
File "/lib/python3.8/site-packages/matplotlib/animation.py", line 1414, in init
event_source = fig.canvas.new_timer(interval=self._interval)
File "/lib/python3.8/site-packages/matplotlib/backends/wasm_backend.py", line 452, in new_timer
return TimerWasm(*args, **kwargs)
File "/lib/python3.8/site-packages/matplotlib/backend_bases.py", line 1093, in init
self.interval = 1000 if interval is None else interval
File "/lib/python3.8/site-packages/matplotlib/backend_bases.py", line 1135, in interval
self._timer_set_interval()
File "/lib/python3.8/site-packages/matplotlib/backends/wasm_backend.py", line 581, in _timer_set_interval
if self._timer is not None:
AttributeError: 'TimerWasm' object has no attribute '_timer'
Could you please help me advise this? Thanks!
Attached the sample code for your reference:
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
fig, ax = plt.subplots()
def f(x, y):
return np.sin(x) + np.cos(y)
x = np.linspace(0, 2 * np.pi, 120)
y = np.linspace(0, 2 * np.pi, 100).reshape(-1, 1)
ims = []
for i in range(60):
x += np.pi / 15.
y += np.pi / 20.
im = ax.imshow(f(x, y), animated = True)
if i == 0:
ax.imshow(f(x, y))
ims.append([im])
ani = animation.ArtistAnimation(fig = fig, artists = ims, interval = 200, repeat_delay = 0, blit = True, repeat = False)
plt.show()
For example, if you run python: print('Hello world') it will run the cell but the cell contents will become print('Hello world')\n; This happens wherever the cursor is when shift+enter is pressed.
Is there a reason why the release commits aren't tagged (nor published as GitHub releases, for that matter)?
Great project.
I'd like to make a 'plugin' on top of the starboard notebook. However, for this I'd like to run Python code without interacting and displaying it in the notebook cells. So when e.g. a notebook cell contains python code 'x=1' and has been normally run I'd like to access these variables. I know that in Pyodide this is possible by just running running seperate runPython commands to write and read variables ,e.g.:
let pyodide = await loadPyodide({
indexURL : "https://cdn.jsdelivr.net/pyodide/v0.18.0/full/"
});
console.log(pyodide.runPython("x = 9 + 1"));
console.log(pyodide.runPython("print(x)"));
I know when using the barebones demo it is hard to do this due to the iFrame restrictions. I'm now running StarBoard Notebook without an iFrame and I can access the variable 'runtime' to control StarBoard (I'm aware of the security risks).
So ideally I would run Python code - to extract data from the notebook cells - outside the notebook cells from javascript.
Either directly through Pyodide or through the Notebook's runtime.
When for example using the Python Pandas library in the notebook cells I can extract in the background the column names of a Pandas Dataframe, and display those in a sidebar.
I've been trying to find how to do this from the starboard-python and starboard-notebook source code.
I guess it can be done through 'runPythonAsync' or 'runPython', but I don't know how to access these function from a js script in the browser. (Sorry I'm strong Python and a bit of an JS/TS noob).
I guess to directly access the Pyodide variable it depends also if Pyodide is running in the maintread or in a web worker. Today I was able to access the 'pyodide' variable in the Chrome Console, but somehow I cannot replicate it. I think the notebook was initialized to run python in the maintread.
I guess if the runPython
functionality can be exposed through the 'runtime' it would make it possible to create a lof of other creative plugins/ applications on top of this.
When the user hits the escape key Esc
, Starboard should focus on the current cell and then enter a "command mode"
Jupyter has a quite well made command mode:
https://towardsdatascience.com/jypyter-notebook-shortcuts-bf0101a98330
https://www.edureka.co/blog/wp-content/uploads/2018/10/Jupyter_Notebook_CheatSheet_Edureka.pdf
How can I interact with a starboard to
a) observe its cells,
b) run some cells and
c) retrieve info about updated cell output?
What I have so far (includes some out commented pseudo-code to illustrated what I would like to do):
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Starboard Notebook</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="https://unpkg.com/[email protected]/dist/starboard-notebook.css" rel="stylesheet">
</head>
<body>
<script type="application/vnd.starboard.nb">
# %% [markdown]
# Hello World
# %% [javascript]
a=1
a
</script>
<script src="https://unpkg.com/[email protected]/dist/starboard-notebook.js"></script>
<script>
window.addEventListener('DOMContentLoaded', function() {
const el = document.querySelector("starboard-notebook");
var cells = runtime.content.cells;
//cells.onchange = () => { console.log("cells changed")}
var codeCell = cells[1];
//codeCell.onchange = () =>{ console.log("code cell changed")}
//codeCell.run();
//let outputExpression = codeCell.output.expression() //=>should yield "a"
//let outputValue = codeCell.output.value() //=>should yield "1"
})
</script>
</body>
</html>
Related questions about JupyterLab Notebooks and reactive programming:
https://stackoverflow.com/questions/69657393/how-to-use-events-in-jupyterlab-extensions/69658573#69658573
https://discourse.jupyter.org/t/how-to-get-output-model-for-a-given-cell-in-a-jupyterlab-extension/11342
https://stackoverflow.com/questions/69539309/how-to-monitor-state-of-observales-in-reactive-calculations/69554070#69554070
=> I am wondering if starboard provides a JavaScript API that better serves my needs.
My aim is to embed some observable notebooks in my application to model scientific data flow pipelines.
If parts of the workflow changes, only the required parts should be updated automatically.
After playing around w/ your codebase, I found that it's not very complicated to convert the parser to use the standard code block marks (```
) instead of a custom %%
.
All text outside of a code block is considered markdown, and (even though I haven't had a use for it yet) front matter could be its own code block syntax.
``` frontmatter title: this notes' title ``` # Here's my example I'm writing markdown - it's default syntax so it's more universal - it's about as easy to parse ``` js autoRun // even though not strictly correct, adding properties after the syntax type doesn't break most parsers ```
So what am I not seeing?
The Pyodide version has released some newer versions. Could we update the default Pyodide release that is included in Starboard Notebook? This is currently still on 0.17.0 if I'm correct.
I'm willing to help to achieve this, and maybe submit a PR.
Somewhat related to this: what would be the recommended way of changing the artifactsUrl
/ indexUrl
for Pyodide when hosting a notebook?
An example is rxjs, when importing:
await import("https://cdn.jsdelivr.net/npm/[email protected]/bundles/rxjs.umd.js");
TypeError: global is undefined @https://cdn.jsdelivr.net/npm/[email protected]/bundles/rxjs.umd.js:416:1
The code around that line is:
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define('rxjs', ['exports'], factory) :
(factory((global.rxjs = {})));
}(this, (function (exports) { 'use strict';
Behavior can be seen by adding a new cell at bottom and selecting menu to change cell type or properties.
Workaround is to add extra newlines to cell or to add many extra cells to be able to make the notebook large enough to see.
Perhaps if the iframe size is too small, call iframe resize to make the iframe large enough to display the menu?
This might be a Pyodide issue, but it seems that Starboard works incorrectly on my new Macbook Pro M1 (Apple ARM sillcon).
In Chrome I get an Error 11 (Crash).
It happens for the normal Python pandas matplotlib demo.
I asked a friend on a non-M1 and it worked all fine (except giving warnings).
Notebook:
https://starboard.gg/#python
It runs until: # x = df.loc[:, ['mpg']]
Then the object turns gray and crashes the Chrome tab.
Tested with Safari, Chrome, and version 12.3
The proxy only listens for changes on the root Cell object, but properties is a child object. Should be an easy fix by making the properties
object also a proxy.
When I try to show two matplotlib plots in a page with python kernels, they clash with one another, and a second call draws into the original plot, not in the old plot as expected.
Some libraries, in particular mathjs, can be imported via require
but not via import
(example usage). Unfortunately, require
is not built in. I've tried to load require
via import, but that doesn't work. I've also tried to load it via a <script src
in an HTML cell, also fails. I've resorted to copying and pasting the entire source of requirejs into a cell so I can then require mathjs - inelegant but it does work. Can we have easier access to require
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.