In [1]:
// @UIService ui
ui.setHeadless(true)
Out[1]:
In [2]:
println "Basic print"
Out[2]:
In [3]:
#!groovy
// @LogService log
log.info("Test the script parameter")
Out[3]:
The below cells are disabled because Travis fails to run them...
In [7]:
// @NotebookService nb
a_groovy_dict = [a_string: 'Hello', a_number: 87]
nb.display(a_groovy_dict)
Out[7]:
In [8]:
#!python
import sys
print("Test python language")
print(sys.version)
Out[8]:
In [9]:
#!groovy
Out[9]:
In [10]:
println "This is groovy code"
In [11]:
#!python
print(a_groovy_dict["a_string"])
print(a_groovy_dict["a_number"])
assert(a_groovy_dict["a_string"] == "Hello")
assert(a_groovy_dict["a_number"] == 87)
Out[11]:
In [12]:
#!clojure
{:a 4, :e nil}
Out[12]:
In [13]:
#!groovy
[a:4, e: null]
Out[13]:
In [14]:
#!groovy
[["Salutation":"hello", "Valediction":"goodbye"], ["Salutation":"hi", "Valediction":"bye"],
["Salutation":"hey", "Valediction":null]]
Out[14]: