Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Avatar for KuCalc : devops.
Download
50655 views
1
jupyter = require('../jupyter')
2
3
DEBUG = !! process.env['DEBUG']
4
if DEBUG
5
console.log "DEBUG =", DEBUG
6
7
exports.kernel = (name, path='') ->
8
return jupyter.kernel(name: name, verbose: DEBUG, path:path)
9
10
exports.output = (v, f) ->
11
s = ''
12
for x in v
13
if x.content?.data?
14
return x.content.data
15
if x.content?.text?
16
s += x.content.text
17
if x.content?.ename?
18
return x.content
19
return s
20
21