{"id":19482364,"url":"https://github.com/shiroinekotfs/jupyter-cpp-header-template","last_synced_at":"2025-04-15T11:19:46.848Z","repository":{"id":202617910,"uuid":"707693610","full_name":"shiroinekotfs/jupyter-cpp-header-template","owner":"shiroinekotfs","description":"C++ kernel for Jupyter headers template. Used to provide additional abilities for the kernel.","archived":false,"fork":false,"pushed_at":"2023-11-09T00:13:19.000Z","size":19,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T11:19:40.571Z","etag":null,"topics":["cpp","jupyter","jupyter-kernels"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shiroinekotfs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-20T13:00:59.000Z","updated_at":"2024-08-02T10:40:21.000Z","dependencies_parsed_at":"2025-01-08T07:24:17.697Z","dependency_job_id":"2f583444-eeee-4a95-b743-ba17143c7475","html_url":"https://github.com/shiroinekotfs/jupyter-cpp-header-template","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"7c979d10908c5a99a0e252bfe0f73678314a70d9"},"previous_names":["shiroinekotfs/jupyter-cpp-header-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiroinekotfs%2Fjupyter-cpp-header-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiroinekotfs%2Fjupyter-cpp-header-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiroinekotfs%2Fjupyter-cpp-header-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiroinekotfs%2Fjupyter-cpp-header-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shiroinekotfs","download_url":"https://codeload.github.com/shiroinekotfs/jupyter-cpp-header-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249058388,"owners_count":21205911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","jupyter","jupyter-kernels"],"created_at":"2024-11-10T20:09:52.505Z","updated_at":"2025-04-15T11:19:46.825Z","avatar_url":"https://github.com/shiroinekotfs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C++ Header template for Jupyter C++ kernel\n\nC++ kernel for Jupyter headers template. Used to provide additional abilities for the kernel.\n\n## Getting started\n\nYou can fork, import, or clone this template freely.\n\n### Designing C++ header extension\n\nYou may note these requirements in designing a C++ header for Jupyter.\n\n* **DO NOT USE** `using namespace std;` in the HEADER. It may raise additional errors, including conflict with other headers, resulting in undefined states of the whole kernel. It is also causing some **security** issues on the Enterprise deployment, such as [Research Labs](https://github.com/TheFlightSims/research-labs)\n\n* No `stdin`. It includes these commands that are banned and cannot be executed generally once the external header is used:\n\n```C++\nstd::cin \u003e\u003e some_variables_1;\ncin \u003e\u003e some_variables_2;\nstd::getline(std::cin, some_string_1);\ngetline(cin, some_string_2);\n```\n\nIt is because the C++ kernel uses pre-processing to add the I/O for user interactive, which means it can only process on the pre-compile `.cpp` file on each cell, not headers.\n\n* Using namespace for your header. We do recommend not requiring it. However, if you want a user to use the code globally, save the code as you usually do.\n\n* Include guard is **RECOMMENDED** to prevent any conflict while importing, declaring and using functions in C++ headers. To know what the guard is, check out this [Wikipedia page](https://en.wikipedia.org/wiki/Include_guard)\n\n### Versioning headers\n\nThe version of headers must match the installed C++ kernel.\n\nIn the file `setup.cfg`, you can edit the version in the line 4:\n\n```python\n4 version = 1.0.0a5\n```\n\nAlso, you can manipulate `setup.py` at the line 5:\n\n```python\n5       version='1.0.0a5',\n```\n\n### Include header files into\n\nThe C++ kernel can only interpret headers under the `{environment_path}/share/cpp_header`, but not in the sub-folders. If you want to include headers that are also in the subfolder (for example, in this repo, in the `sample/res` folder), your master header (in this example the `sample.hpp`) must include these headers with your property path.\n\nOnce it's completed, add all your headers in `setup.py` at line 22:\n\n```python\n22       data_files = [\n23           (\"share/cpp_header\", ['sample/sample.hpp']),\n24           (\"share/cpp_header/res\", ['sample/res/legacy.c', 'sample/res/linker.hpp'])\n25       ]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiroinekotfs%2Fjupyter-cpp-header-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshiroinekotfs%2Fjupyter-cpp-header-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiroinekotfs%2Fjupyter-cpp-header-template/lists"}