{"id":47756233,"url":"https://github.com/gnu-octave/pkg-jupyter-notebook","last_synced_at":"2026-04-03T04:22:26.308Z","repository":{"id":43795175,"uuid":"372223056","full_name":"gnu-octave/pkg-jupyter-notebook","owner":"gnu-octave","description":"A package to run and fill Jupyter Notebooks within GNU Octave.","archived":false,"fork":false,"pushed_at":"2025-03-22T20:20:29.000Z","size":1374,"stargazers_count":7,"open_issues_count":3,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-22T20:29:27.333Z","etag":null,"topics":["gnu-octave","octave","octave-packages"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gnu-octave.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-30T13:35:58.000Z","updated_at":"2025-03-22T20:20:33.000Z","dependencies_parsed_at":"2022-08-19T07:30:38.830Z","dependency_job_id":null,"html_url":"https://github.com/gnu-octave/pkg-jupyter-notebook","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"gnu-octave/pkg-example","purl":"pkg:github/gnu-octave/pkg-jupyter-notebook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnu-octave%2Fpkg-jupyter-notebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnu-octave%2Fpkg-jupyter-notebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnu-octave%2Fpkg-jupyter-notebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnu-octave%2Fpkg-jupyter-notebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnu-octave","download_url":"https://codeload.github.com/gnu-octave/pkg-jupyter-notebook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnu-octave%2Fpkg-jupyter-notebook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31333234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T03:20:36.090Z","status":"ssl_error","status_checked_at":"2026-04-03T03:20:35.133Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["gnu-octave","octave","octave-packages"],"created_at":"2026-04-03T04:22:25.729Z","updated_at":"2026-04-03T04:22:26.303Z","avatar_url":"https://github.com/gnu-octave.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Octave Jupyter Notebook package\n\n\u003e **This package is already included into Octave core.**\n\u003e The function of this package `jupyter_notebook` exists in Octave version 7 and newer: \u003chttps://octave.org/NEWS-7.html#general-improvements\u003e.\n\n\u003cimg src=\"doc/icon.png\" alt=\"logo\" width=\"65%\" style=\"margin-left:auto; margin-right:auto; display:block;\"/\u003e\n\nA package to run and fill Jupyter Notebooks within GNU Octave.\n\nThe package supports filling both textual and graphical outputs.\n\n## Installation\nFrom the Octave command-line:\n```\npkg install \"https://github.com/gnu-octave/pkg-jupyter-notebook/archive/v1.3.0.tar.gz\"\n```\n\n## jupyter_notebook\n\n```\nnotebook_object = jupyter_notebook (notebook_filename, options)\n```\n\nRun and fill the Jupyter Notebook in file `notebook_filename` from\nwithin GNU Octave.\n\nBoth text and graphical Octave outputs are supported.\n\nThis class has a public property `notebook` which is a structure\nrepresenting the JSON-decoded Jupyter Notebook.  This property is\nintentionally public to enable advanced notebook manipulations.\n\n**Note:** Jupyter Notebook versions (`nbformat`) lower than 4.0 are not\nsupported.\n\nThe optional second argument `options` is a struct with fields:\n\n* `tmpdir` to set the temporary working directory.\n\n## plot magic\n\n`%plot` magic is supported with the following settings:\n\n* `%plot -f \u003cformat\u003e` or `%plot --format \u003cformat\u003e`: specifies the\n  image storage format.  Supported formats are:\n    * PNG (default)\n    * SVG (Note: If SVG images do not appear in the notebook,\n           it is most related to the Jupyter Notebook security\n           mechanism and explicitly \"trusting\" them is necessary).\n    * JPG\n\n* `%plot -r \u003cnumber\u003e` or `%plot --resolution \u003cnumber\u003e`: specifies the image resolution.\n\n* `%plot -w \u003cnumber\u003e` or `%plot --width \u003cnumber\u003e`: specifies the image width.\n\n* `%plot -h \u003cnumber\u003e` or `%plot --height \u003cnumber\u003e`: specifies the image height.\n\n## Methods\n\nThe `jupyter_notebook` class supports the following methods.\n\n### `run (cell_index)`\n\nRun the Jupyter Notebook cell with index `cell_index`\nand eventually replace previous output cells in the object.\n\nThe first Jupyter Notebook cell has the index 1.\n\n**Note:** The code evaluation of the Jupyter Notebook cells is done\nin a separate Jupyter Notebook context.  Thus, currently open\nfigures and workspace variables won't be affected by executing\nthis function.  However, current workspace variables cannot be\naccessed either.\n\n### `run_all ()`\n\nRun all Jupyter Notebook cells and eventually replace previous\noutput cells in the object.\n\n**Note:** The code evaluation of the Jupyter Notebook cells is done\nin a separate Jupyter Notebook context.  Thus, currently open\nfigures and workspace variables won't be affected by executing\nthis function.  However, current workspace variables cannot be\naccessed either.\n\n### `generate_notebook (notebook_file_name)`\n\nWrite the Jupyter Notebook stored in the `notebook`\nattribute to `notebook_file_name`.\n\nThe `notebook` attribute is encoded to JSON text.\n\n### `generate_octave_script (script_file_name)`\n\nWrite an Octave script that has the contents of the Jupyter Notebook\nstored in the `notebook` attribute to `script_file_name`.\n\nNon-code cells are generated as block comments.\n\n## Examples:\n\nThe outputs of the following examples are shown using this notebook:\n\u003cimg src=\"doc/before-running.png\" alt=\"example-notebook\" width=\"100%\" /\u003e\n\n### Run all cells and generate the filled notebook\n\n```\n## Instantiate an object from the notebook file\nnotebook = jupyter_notebook (\"myNotebook.ipynb\")\n=\u003e notebook =\n\n    \u003cobject jupyter_notebook\u003e\n\n## Run the code and embed the results in the notebook attribute\nnotebook.run_all()\n\n## Generate the new notebook by overwriting the original notebook\nnotebook.generate_notebook (\"myNotebook.ipynb\")\n```\n\nThis is the generated notebook:\n\u003cimg src=\"doc/runAll.png\" alt=\"example-1\" width=\"100%\" /\u003e\n\n### Run the third cell and generate the filled notebook\n\n```\n## Instantiate an object from the notebook file\nnotebook = jupyter_notebook (\"myNotebook.ipynb\")\n=\u003e notebook =\n\n    \u003cobject jupyter_notebook\u003e\n\n## Run the code and embed the results in the notebook attribute\nnotebook.run(3)\n\n## Generate the new notebook in a new file\nnotebook.generate_notebook (\"myNewNotebook.ipynb\")\n```\n\nThis is the generated notebook:\n\u003cimg src=\"doc/run.png\" alt=\"example-2\" width=\"100%\" /\u003e\n\n### Generate an Octave script from a notebook\n\n```\n## Instantiate an object from the notebook file\nnotebook = jupyter_notebook (\"myNotebook.ipynb\")\n=\u003e notebook =\n\n    \u003cobject jupyter_notebook\u003e\n\n## Generate the octave script\nnotebook.generate_octave_script (\"myScript.m\")\n```\n\nThis is the generated script:\n\u003cimg src=\"doc/octaveScript.png\" alt=\"example-3\" width=\"100%\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnu-octave%2Fpkg-jupyter-notebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnu-octave%2Fpkg-jupyter-notebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnu-octave%2Fpkg-jupyter-notebook/lists"}