-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotebook.json
19 lines (19 loc) · 1.36 KB
/
notebook.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"code_prettify": {
"kernel_config_map_json": "{\n \"python\": {\n \"library\": \"import json\\ndef yapf_reformat(cell_text):\\n import yapf.yapflib.yapf_api\\n import re\\n cell_text = re.sub('^%', '#%#', cell_text, flags=re.M)\\n reformated_text = yapf.yapflib.yapf_api.FormatCode(cell_text)[0]\\n return re.sub('^#%#', '%', reformated_text, flags=re.M)\",\n \"prefix\": \"print(json.dumps(yapf_reformat(u\",\n \"postfix\": \")))\"\n },\n \"ocaml\": {\n \"library\": \"#require \\\"bos\\\";; #require \\\"jupyter.notebook\\\";; let __jupyter__format txt = let cmd = Bos.Cmd.(v \\\"ocamlformat\\\" % \\\"--name\\\" % \\\"jupyter.mlt\\\" % \\\"-\\\") in Bos.OS.Cmd.(in_string txt |> run_io cmd |> out_string) |> function | Ok (x,_) -> let out_s = Yojson.to_string (`String x) in Stdlib.Printf.printf \\\"%s\\n\\\" out_s; Stdlib.Pervasives.flush Stdlib.Pervasives.stdout | _ -> failwith \\\"failure\\\";;\",\n \"prefix\": \"__jupyter__format \",\n \"postfix\": \" \"\n }\n}\n"
},
"load_extensions": {
"nbextensions_configurator/config_menu/main": true,
"code_prettify/code_prettify": true,
"contrib_nbextensions_help_item/main": true,
"code_font_size/code_font_size": true
},
"Notebook": {
"Toolbar": true
},
"Cell": {
"cm_config": {
"lineNumbers": true
}
}
}