-
Notifications
You must be signed in to change notification settings - Fork 0
/
basilisp.edn
44 lines (33 loc) · 983 Bytes
/
basilisp.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
(import [IPython.display :as id]
[ipywidgets :as iw])
(def v )
(def )
(comment
(import
[matplotlib.pyplot :as plt])
(type (iw/Output))
;;
)
(defn abc []
(let [v (iw.widgets/IntSlider ** :value 0 :min 0 :max 100 :description "hey there")
output (iw/Output)]
(id/display v output)
))
(def xyz (abc))
(def code-js "
const notebook = document.querySelector('#notebook-container') || document.querySelector('.jp-NotebookPanel-notebook');
if (notebook) {
// For both Classic Notebook and JupyterLab
IPython.notebook.insert_cell_below();
IPython.notebook.select_next();
IPython.notebook.get_selected_cell().set_text("print('This content was injected!')");
IPython.notebook.get_selected_cell().execute();
}
")
(def code-js2
"var cell = IPython.notebook.insert_cell_below('code');
cell.set_text(\"128\");
cell.execute()"
)
(id/display (id/Javascript
code-js2))