{"id":7551,"date":"2022-08-08T00:00:00","date_gmt":"2022-08-08T00:00:00","guid":{"rendered":"https:\/\/academy.deepsim.caawesome-features-of-jupyter-notebook-2-different-methods-to-run-python-files-792310f6e8b1\/"},"modified":"2022-11-25T03:55:08","modified_gmt":"2022-11-25T03:55:08","slug":"awesome-features-of-jupyter-notebook-2-different-methods-to-run-python-files-792310f6e8b1","status":"publish","type":"post","link":"https:\/\/academy.deepsim.ca\/zh\/awesome-features-of-jupyter-notebook-2-different-methods-to-run-python-files-792310f6e8b1\/","title":{"rendered":"Jupyter Notebook\u521b\u5efaPython\u6587\u4ef6\u7684\u65b9\u6cd5"},"content":{"rendered":"\n<p id=\"7a24\">The Jupyter notebook is also a very handy Python Web IDE, in which, besides creating and running .ipynb files, one can create <a href=\"https:\/\/academy.deepsim.caawesome-features-of-jupyter-notebook-1-different-methods-to-create-python-files-949bf31c2c53\/\">Python (.py) files<\/a>, display and run them very conveniently. I showed how to create a Python (.py) file in the Jupyter notebook using different methods in <a data-wplink-edit=\"true\" href=\"https:\/\/academy.deepsim.caawesome-features-of-jupyter-notebook-1-different-methods-to-create-python-files-949bf31c2c53\/\">a previous post<\/a>. I will continue to show to how to display, edit, run Python (.py) file and an external .ipynb file in Jupyter note in this post.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3fb4\">1. How to Display a&nbsp;<code class=\"markup--code markup--h3-code\">.py<\/code> file in Jupyter Notebook<\/h3>\n\n\n\n<p>There are three commands, namely <code class=\"markup--code markup--p-code\">!cat<\/code>, <code class=\"markup--code markup--p-code\">%cat<\/code>, <code class=\"markup--code markup--p-code\">cat<\/code> to show a Python code snippet in a code cell in Jupyter notebook on the Linux system, while we use <code class=\"markup--code markup--p-code\">!type<\/code> on the Widows&#8217; system to do the same work. For example, let&#8217;s create\u00a0a <code>hello.py<\/code> file first and put the following code snippet in the file. If you are not sure how to create it, please read <a href=\"https:\/\/academy.deepsim.caawesome-features-of-jupyter-notebook-1-different-methods-to-create-python-files-949bf31c2c53\/\">the post<\/a>.\u00a0Then put the file in the working directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def hello(name):\n  print(f\"Hello, {name}!\")<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"92ff\">On Linux System<\/h4>\n\n\n\n<p id=\"a104\">Type one of the following codes in a code cell of Jupyter notebook and then run it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>!cat hello.py<\/code><\/pre>\n\n\n\n<pre id=\"c018\" class=\"wp-block-preformatted\">Or <\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>%cat hello.py<\/code><\/pre>\n\n\n\n<pre id=\"a432\" class=\"wp-block-preformatted\">&nbsp;Or<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>cat hello.py<\/code><\/pre>\n\n\n\n<pre id=\"a1b6\" class=\"wp-block-preformatted\">The output looks as follows:<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/academy.deepsim.cawp-content\/uploads\/2022\/10\/screenshot_pyrun-1024x230.png\" alt=\"\" class=\"wp-image-8637\" width=\"1065\" height=\"239\" srcset=\"https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/screenshot_pyrun-1024x230.png 1024w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/screenshot_pyrun-600x135.png 600w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/screenshot_pyrun-300x67.png 300w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/screenshot_pyrun-768x172.png 768w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/screenshot_pyrun-18x4.png 18w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/screenshot_pyrun.png 1180w\" sizes=\"(max-width: 1065px) 100vw, 1065px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"37cf\">For Windows Sytem:<\/h4>\n\n\n\n<pre id=\"cf8f\" class=\"wp-block-preformatted\">Just use the following command code instead, we will get the similar output as above.<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>!type hello.py<\/code><\/pre>\n\n\n\n<p id=\"ebf1\">Besides, there is another magic command <code class=\"markup--code markup--p-code\">%pycat<\/code>, which works for both Linux and Windows. Whereas, Jupyter opens a <strong class=\"markup--strong markup--p-strong\">pager<\/strong> and prints the output there.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"183\" src=\"https:\/\/academy.deepsim.cawp-content\/uploads\/2022\/10\/Screenshot_pager-1024x183.png\" alt=\"\" class=\"wp-image-8638\" srcset=\"https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_pager-1024x183.png 1024w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_pager-600x107.png 600w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_pager-300x54.png 300w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_pager-768x137.png 768w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_pager-18x3.png 18w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_pager.png 1325w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p id=\"e09d\">It is good to know all these commands; but I suggest you using <code class=\"markup--code markup--p-code\">%cat<\/code> on Linux and&nbsp;<code class=\"markup--code markup--p-code\">!type<\/code> on Windows.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"94d9\">2. Load&nbsp;<code class=\"markup--code markup--h3-code\">.py<\/code>&nbsp;File<\/h3>\n\n\n\n<p id=\"e616\">The magics <code class=\"markup--code markup--p-code\">%load<\/code> and <code class=\"markup--code markup--p-code\">%loadpy<\/code> are used to load a&nbsp;<code class=\"markup--code markup--p-code\">.py<\/code> file into the current code cell, and then you can edit and run it.<\/p>\n\n\n\n<p id=\"2936\">For example, let\u2019s load the \u201chello.py\u201d file in the working directory, just run either of the following commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>%load hello.py<\/code><\/pre>\n\n\n\n<pre id=\"b258\" class=\"wp-block-preformatted\"><strong class=\"markup--strong markup--pre-strong\">or<\/strong><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>%loadpy hello<\/code><\/pre>\n\n\n\n<pre id=\"6b0e\" class=\"wp-block-preformatted\">After running the command, Jupyter notebook loads python code immediately in the cell as follows, and then you edit it. <\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/academy.deepsim.cawp-content\/uploads\/2022\/10\/Screenshot_load-1024x166.png\" alt=\"\" class=\"wp-image-8640\" width=\"948\" height=\"154\" srcset=\"https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_load-1024x166.png 1024w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_load-600x97.png 600w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_load-300x49.png 300w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_load-768x124.png 768w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_load-18x3.png 18w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_load.png 1144w\" sizes=\"(max-width: 948px) 100vw, 948px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"73da\">3. Append to&nbsp;<code class=\"markup--code markup--h3-code\">.py<\/code>&nbsp;File<\/h3>\n\n\n\n<p id=\"c9a1\">The magic command <code class=\"markup--code markup--p-code\">%%writefile -a<\/code> can be used to append codes to the end of the code in an existing file. For example, we want to add <code class=\"markup--code markup--p-code\">hello(\"Sigmund\")<\/code> at the end of the function.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/academy.deepsim.cawp-content\/uploads\/2022\/10\/Screenshot_append.png\" alt=\"\" class=\"wp-image-8641\" width=\"959\" height=\"155\" srcset=\"https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_append.png 860w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_append-600x97.png 600w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_append-300x48.png 300w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_append-768x124.png 768w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_append-18x3.png 18w\" sizes=\"(max-width: 959px) 100vw, 959px\" \/><\/figure>\n\n\n\n<p id=\"58bc\">The above output of <strong class=\"markup--strong markup--p-strong\">Appending to hello.py<\/strong> indicates code appending is successful. We can check the code by <code class=\"markup--code markup--p-code\">%cat<\/code>, !cat (Linux) or&nbsp;<code class=\"markup--code markup--p-code\">!type<\/code>(Windows).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"773\" height=\"129\" src=\"https:\/\/academy.deepsim.cawp-content\/uploads\/2022\/10\/Screenshot_check.png\" alt=\"\" class=\"wp-image-8642\" srcset=\"https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_check.png 773w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_check-600x100.png 600w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_check-300x50.png 300w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_check-768x128.png 768w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_check-18x3.png 18w\" sizes=\"(max-width: 773px) 100vw, 773px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1f43\">4. Update&nbsp;<code class=\"markup--code markup--h3-code\">.py<\/code>&nbsp;File<\/h3>\n\n\n\n<p id=\"f5a3\">If you would like to add code or edit the code in the file rather than to append code to the end, you can run <code class=\"markup--code markup--p-code\">%%writefile<\/code> again, which will update your code by overwriting the old file. For example,<\/p>\n\n\n\n<pre id=\"6c0c\" class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"688\" height=\"163\" src=\"https:\/\/academy.deepsim.cawp-content\/uploads\/2022\/10\/Screenshot_overwriting-1.png\" alt=\"\" class=\"wp-image-8645\" srcset=\"https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_overwriting-1.png 688w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_overwriting-1-600x142.png 600w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_overwriting-1-300x71.png 300w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_overwriting-1-18x4.png 18w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4d61\">5. Run&nbsp;<code class=\"markup--code markup--h3-code\">.py<\/code>&nbsp;File<\/h3>\n\n\n\n<p>To run the Python file, we use <code>%run filename.py<\/code>. For example, let\u2019s run \u201chello.py\u201d by:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>%run hello.py<\/code><\/pre>\n\n\n\n<p id=\"447f\">or <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>run hello.py<\/code><\/pre>\n\n\n\n<p>The output looks as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/academy.deepsim.cawp-content\/uploads\/2022\/10\/Screenshot_run.png\" alt=\"\" class=\"wp-image-8646\" width=\"709\" height=\"131\" srcset=\"https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_run.png 612w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_run-600x111.png 600w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_run-300x55.png 300w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_run-18x3.png 18w\" sizes=\"(max-width: 709px) 100vw, 709px\" \/><\/figure>\n\n\n\n<p id=\"447f\">For a function, there are other two convenient ways to run it.<\/p>\n\n\n\n<p id=\"f836\"><strong class=\"markup--strong markup--p-strong\">Method 1: run the function, and then call it<\/strong><\/p>\n\n\n\n<pre id=\"3a54\" class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># run the function\n%run greeting.py<\/code><\/pre>\n\n\n\n<p id=\"71d1\">Then<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># call the function\nhello(\"Sigmund\")<\/code><\/pre>\n\n\n\n<p id=\"ca1d\"><strong class=\"markup--strong markup--p-strong\">Method 2: run the function as module<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># import the function as a module\nimport greeting\n\n# call the function\ngreeting.hello(\"Sigmund\")<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"eba7\">6. Run External Jupyter Notebook&nbsp;<code class=\"markup--code markup--h3-code\">.ipynb<\/code>&nbsp;files<\/h3>\n\n\n\n<p id=\"8da8\">Besides, we can also run another Jupyter notebook inside the current working on using<br><code class=\"markup--code markup--p-code\">%run filename.ipynb<\/code><br>For example, let&#8217;s create a Jupyter notebook named &#8220;myname.ipynb&#8221; and run it in a new Jupyter notebook.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/academy.deepsim.cawp-content\/uploads\/2022\/10\/Screenshot_runipynp.png\" alt=\"\" class=\"wp-image-8647\" width=\"704\" height=\"122\" srcset=\"https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_runipynp.png 730w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_runipynp-600x104.png 600w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_runipynp-300x52.png 300w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_runipynp-18x3.png 18w\" sizes=\"(max-width: 704px) 100vw, 704px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"0878\">7. Run Codes from a Python or IPython Shell&nbsp;Session<\/h3>\n\n\n\n<p id=\"68ac\">Another awesome feature of the Jupyter Notebook is that you can run scripts directly copied from a Python shell or IPython shell session. For example:<\/p>\n\n\n\n<p>(1) Code from a Python Shell session: <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.python.org\/3\/tutorial\/interpreter.html\" target=\"_blank\">https:\/\/docs.python.org\/3\/tutorial\/interpreter.html<\/a><br>(2) Code from a IPython Shell session: <a rel=\"noreferrer noopener\" href=\"https:\/\/jakevdp.github.io\/PythonDataScienceHandbook\/01.02-shell-keyboard-shortcuts.html\" target=\"_blank\">https:\/\/jakevdp.github.io\/PythonDataScienceHandbook\/01.02-shell-keyboard-shortcuts.html<\/a><\/p>\n\n\n\n<p id=\"68ac\">It need not remove these prompts, <strong class=\"markup--strong markup--p-strong\">>>><\/strong> and <strong class=\"markup--strong markup--p-strong\">In [ ]<\/strong>, whereas it has to remove them in other IDEs, or it will produce errors.<\/p>\n\n\n\n<p>For example, a code snippet is taken from Python Shell session:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"189\" src=\"https:\/\/academy.deepsim.cawp-content\/uploads\/2022\/10\/Screenshot_prompt1-1024x189.png\" alt=\"\" class=\"wp-image-8648\" srcset=\"https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_prompt1-1024x189.png 1024w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_prompt1-600x111.png 600w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_prompt1-300x55.png 300w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_prompt1-768x142.png 768w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_prompt1-18x3.png 18w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_prompt1.png 1143w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>For example, a code snippet is taken from IPython Shell session:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"238\" src=\"https:\/\/academy.deepsim.cawp-content\/uploads\/2022\/10\/Screenshot_prompt2-1024x238.png\" alt=\"\" class=\"wp-image-8656\" srcset=\"https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_prompt2-1024x238.png 1024w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_prompt2-600x140.png 600w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_prompt2-300x70.png 300w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_prompt2-768x179.png 768w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_prompt2-18x4.png 18w, https:\/\/academy.deepsim.ca\/wp-content\/uploads\/2022\/10\/Screenshot_prompt2.png 1160w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p id=\"370b\">This feature of Jupyter notebook is very helpful for us to have a quick test for some codes online from a Python shell or IPython shell session.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">8. Brief Summary<\/h3>\n\n\n\n<p>This article presents how to edit and run Python&nbsp;files in Jupyter Notebook, which includes how to display a&nbsp;<code class=\"markup--code markup--h3-code\">.py<\/code> file in Jupyter Notebook, load&nbsp;<code class=\"markup--code markup--h3-code\">.py<\/code>&nbsp;file in Jupyter Notebook, append&nbsp;<code class=\"markup--code markup--h3-code\">.py<\/code>&nbsp;file in Jupyter Notebook, update&nbsp;<code class=\"markup--code markup--h3-code\">.py<\/code>&nbsp;file in Jupyter Notebook, run&nbsp;<code class=\"markup--code markup--h3-code\">.py<\/code>&nbsp;file in Jupyter Notebook, run an external Jupyter Notebook&nbsp;<code class=\"markup--code markup--h3-code\">.ipynb<\/code>&nbsp;file in a new Jupyter notebook as well run a Python scripts directly copied from a Python shell or IPython shell session.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Jupyter notebook is also a very handy Python Web IDE, in which, besides creating and running .ipynb files, one<\/p>","protected":false},"author":2,"featured_media":8650,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66,65],"tags":[63,62],"class_list":["post-7551","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jupyter-notebook","category-python","tag-jupyter-notebook","tag-python"],"_links":{"self":[{"href":"https:\/\/academy.deepsim.ca\/zh\/wp-json\/wp\/v2\/posts\/7551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/academy.deepsim.ca\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/academy.deepsim.ca\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/academy.deepsim.ca\/zh\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/academy.deepsim.ca\/zh\/wp-json\/wp\/v2\/comments?post=7551"}],"version-history":[{"count":0,"href":"https:\/\/academy.deepsim.ca\/zh\/wp-json\/wp\/v2\/posts\/7551\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/academy.deepsim.ca\/zh\/wp-json\/wp\/v2\/media\/8650"}],"wp:attachment":[{"href":"https:\/\/academy.deepsim.ca\/zh\/wp-json\/wp\/v2\/media?parent=7551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/academy.deepsim.ca\/zh\/wp-json\/wp\/v2\/categories?post=7551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/academy.deepsim.ca\/zh\/wp-json\/wp\/v2\/tags?post=7551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}