{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Magics to Access the JVM Kernels from Python\n", "\n", "BeakerX has magics for Python so you can run cells in the other languages.\n", "The first few cells below show how complete the implementation is with Groovy, then we have just one cell in each other language.\n", "\n", "## Groovy" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%groovy\n", "println(\"stdout works\")\n", "f = {it + \" work\"}\n", "f(\"results\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%groovy\n", "%classpath add mvn com.github.fommil.netlib core 1.1.2\n", "new org.netlib.blas.Daxpy()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%groovy\n", "[a:\"tables\", b:\"work\"]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%groovy\n", "\"errors work\"/1" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%groovy\n", "HTML(\"