The BeakerX kernels have magics to run other kernels, including %%python
. There are magics for each BeakerX langage: %%groovy
, %%java
, %%scala
, %%sql
, %%clojure
, and %%kotlin
. There is also a %%kernel
magic to access any kernel available to Jupyter. Widgets work through these magics.
For example, even though this is a Groovy notebook, you can run Python code:
%%python
print("regular")
{"output": "works"}
%%python
import ipywidgets as widgets
w = widgets.IntSlider()
w
%%python
w.value
%%scala
new TableDisplay(Seq(Map("a" -> 1, "b" -> 2, "c" -> 3),
Map("a" -> 4, "b" -> 5, "c" -> 6),
Map("a" -> 7, "b" -> 8, "c" -> 8)))
Access any kernel available to Jupyter by name:
%%kernel ir
x <- rnorm(1000)
plot(x)
%%kernel julia-0.6
(1 + 1im) * (1 - 1im)