Skip to content

Commit eb61160

Browse files
committed
Fix example notebook
1 parent 99275d8 commit eb61160

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Jupyter
2+
.ipynb_checkpoints/
3+
14
# Prerequisites
25
*.d
36

notebooks/intensely_edgy_cat.ipynb

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
"// for displaying images (see xtensor-io and xeus-cling demos)\n",
2727
"#include <string>\n",
2828
"#include <fstream>\n",
29-
"#include <xtl/xbase64.hpp>"
29+
"#include <xtl/xbase64.hpp>\n",
30+
"\n",
31+
"#include \"nlohmann/json.hpp\"\n",
32+
"\n",
33+
"namespace nl = nlohmann;"
3034
]
3135
},
3236
{
@@ -43,16 +47,16 @@
4347
" std::stringstream buffer;\n",
4448
" buffer << fin.rdbuf();\n",
4549
"\n",
46-
" xeus::xjson mime;\n",
50+
" nl::json mime;\n",
4751
" mime[\"image/png\"] = xtl::base64encode(buffer.str());\n",
48-
" xeus::xjson transient;\n",
52+
" nl::json transient;\n",
4953
"\n",
5054
" if (update)\n",
5155
" {\n",
5256
" transient[\"display_id\"] = id;\n",
5357
" xeus::get_interpreter().update_display_data(\n",
5458
" std::move(mime),\n",
55-
" xeus::xjson::object(),\n",
59+
" nl::json::object(),\n",
5660
" std::move(transient));\n",
5761
" return id;\n",
5862
" }\n",
@@ -62,7 +66,7 @@
6266
" transient[\"display_id\"] = id;\n",
6367
" xeus::get_interpreter().display_data(\n",
6468
" std::move(mime),\n",
65-
" xeus::xjson::object(),\n",
69+
" nl::json::object(),\n",
6670
" std::move(transient));\n",
6771
" return id;\n",
6872
" }\n",
@@ -419,16 +423,16 @@
419423
],
420424
"metadata": {
421425
"kernelspec": {
422-
"display_name": "xeus C++14",
423-
"language": "",
424-
"name": "xeus-cling-cpp14"
426+
"display_name": "C++14",
427+
"language": "C++14",
428+
"name": "xcpp14"
425429
},
426430
"language_info": {
427431
"codemirror_mode": "text/x-c++src",
428432
"file_extension": ".cpp",
429433
"mimetype": "text/x-c++src",
430434
"name": "c++",
431-
"version": ""
435+
"version": "14"
432436
}
433437
},
434438
"nbformat": 4,

0 commit comments

Comments
 (0)