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. These magics give access to Python from the JVM.
There are also Groovy Magics magics for accessing the JVM from Python.
You can communicate between languages with Autotranslation.
For example, even though this is a Groovy notebook, you can run Python code:
In [ ]:
%%python
print("regular")
{"output": "works"}
In [ ]:
%%python
import ipywidgets as widgets
w = widgets.IntSlider()
w
In [ ]:
%%python
w.value
In [ ]:
%%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)))
In [ ]:
%%kernel ir
x <- rnorm(1000)
plot(x)
In [ ]:
%%kernel julia-0.6
(1 + 1im) * (1 - 1im)