thebe icon indicating copy to clipboard operation
thebe copied to clipboard

Multiple kernel support

Open vishwesh5 opened this issue 6 years ago • 5 comments

Hi!

I am trying to display codes in two or more different programming languages on the same webpage. Is it possible to use multiple kernels in thebelab?

Thanks

vishwesh5 avatar Aug 24 '18 13:08 vishwesh5

I am trying to display codes in two or more different programming languages on the same webpage. Is it possible to use multiple kernels in thebelab?

At this stage, this is not supported out of the box: all cells are connected to the same kernel (see https://github.com/minrk/thebelab/blob/master/src/thebelab.js#L426). That being said, the code is relatively short, and it sounds like it could be adapted to support several kernels. This would be a nice contribution :-) Of course it would take extending the syntax for configuring kernels, etc.

But @minrk will know better!

nthiery avatar Aug 24 '18 14:08 nthiery

Thanks for the reply @nthiery ! I will wait for @minrk's reply. :smiley: Meanwhile, I think only option is to create separate webpage for the separate programming languages.

vishwesh5 avatar Aug 24 '18 14:08 vishwesh5

One similar issue was posted on thebe github repo. But even there it's one kernel per page :(

vishwesh5 avatar Aug 24 '18 14:08 vishwesh5

This can be done with the ScriptOfScripts kernel. I got it running with Thebelab in a demo Jupyter Book (Octave/Matlab + Python cells, data being transferred between them) by simply switching out the "sos" tags in the markdown that were generated by "python" manually (this might be a Jupyter Book-specific step I think).

Live demo: https://mathieuboudreau.github.io/introML-book/01/mvp_sos.html Repo (contains Dockerfile with all settings for SoS): https://github.com/mathieuboudreau/introML-book

mathieuboudreau avatar Feb 05 '19 03:02 mathieuboudreau

@mathieuboudreau links down !

bionicles avatar May 23 '19 10:05 bionicles