File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -6,16 +6,11 @@ import { nord } from 'react-syntax-highlighter/dist/cjs/styles/prism'
66//TODO: We could remove xarrray installation step by requesting xarray to be added to the Pyodide standard lib
77//TODO: Or wait until jupyterlite has streamlined the installation process of user-specified packages
88
9- // use for install xarray via micropip
10- const preRun =
11- 'import%20micropip%0Aawait%20micropip.install%28%5B%27xarray%27%2C%20%27matplotlib%27%5D%29'
12-
139// See: https://github.com/jupyterlite/jupyterlite/issues/151
14- const preRunCode = `%23%20Import%20packages%0Aimport%20xarray%20as%20xr%0Aimport%20numpy%20as%20np%0Aimport%20pandas%20as%20pd%0A%25matplotlib%20inline `
10+ const preRunCode = `%23%20Import%20packages%0Aimport%20xarray%20as%20xr%0Aimport%20numpy%20as%20np%0Aimport%20pandas%20as%20pd`
1511
1612// https://github.com/jobovy/jupyterlite-repl-prerun
17- const jupyterliteInstance =
18- 'https://jupyterlite-repl-prerun.readthedocs.io/en/latest/lite/repl'
13+ const jupyterliteInstance = 'https://jupyterlite.github.io/demo/repl'
1914
2015const sampleCode = `"""
2116To try Xarray in the browser,
@@ -91,7 +86,7 @@ export const Repl = () => {
9186 < AspectRatio ratio = { 4 / 3 } >
9287 < iframe
9388 title = 'repl'
94- src = { `${ jupyterliteInstance } /?toolbar=1&kernel=python&prerun= ${ preRun } &prerun- code=${ preRunCode } ` }
89+ src = { `${ jupyterliteInstance } /?toolbar=1&kernel=python&code=${ preRunCode } ` }
9590 alt = 'demo'
9691 />
9792 </ AspectRatio >
You can’t perform that action at this time.
0 commit comments