Testing / Aug 15 2019

Code editing

Adding code cells

Referencing files

test.csv
# create new R cell and execute:
read.table("include test.csv via ctrl + e")
R
1
write("/results/test.json", """{"test": [1,3,4]}""");
nil
#Insert new python cell with:
import json
f = open("reference above output via ctrl + e", "r")
str = f.read()
f.close()
json.loads(str) # should show `{'test': [1, 3, 4]}` as output
Julia

Autocompletion

run below cell + try autocomplete + docs via shift + tab, tab or the popup menu when selected, for all below languages

print 
print
print

Inline error

function nested_error()
	error("this is an error")
end
nested_error()
def nested_error():
  return 10 * (1/0)
nested_error()

Code Cell insertion

Insert a language (Python, Julia, Bash) below other code cells in this article, make sure they use the runtime from the correct language.

# JUlia second runtime. When inserting below this, make sure it inherits the correct runtime

Colapsing output

# ... <- hide source code
rand(4, 4)
4×4 Array{Float64,2}: 0.47523 0.90063 0.182351 0.561326 0.736587 0.0348363 0.801556 0.485014 0.487145 0.185291 0.862284 0.550047 0.341314 0.352484 0.199725 0.563225
println("stdout output") # ⬇ use button ` ^ ` to hide output  

Run via Keyboard

  • run cell (ctrl + enter)
  • run cell & goto next (shift + enter)
  • run via ▶ button

Assign name to cell

# ... <- assign name