Skip to content

Commit

Permalink
fix: update execution counts and correct syntax in Python Flask Jupyt…
Browse files Browse the repository at this point in the history
…er notebook
  • Loading branch information
adik1025 committed Dec 19, 2024
1 parent 582bf1e commit 5f9a272
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions _notebooks/2024-12-02-python-flask_in_jupyter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {
"vscode": {
"languageId": "yaml"
}
},
"outputs": [],
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (1488863609.py, line 1)",
"output_type": "error",
"traceback": [
"\u001b[0;36m Cell \u001b[0;32mIn[1], line 1\u001b[0;36m\u001b[0m\n\u001b[0;31m ---\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
]
}
],
"source": [
"---\n",
"toc: true\n",
Expand Down Expand Up @@ -70,7 +79,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -97,11 +106,10 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%python --bg\n",
"\n",
"from flask import Flask, jsonify\n",
"from flask_cors import CORS\n",
Expand Down Expand Up @@ -261,7 +269,7 @@
"# see the the Python process \n",
"echo\n",
"echo \"Python process\"\n",
"lsof -i :5001 | awk '/Python/ {print $2}' | xargs ps\n",
"lsof -i :5001 | awk '/python/ {print $2}' | xargs ps\n",
"# show ontent of the Python server using curl\n",
"echo\n",
"echo \"Content of the Python root endpoint (aka /), using curl\", \n",
Expand All @@ -281,7 +289,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -350,7 +358,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -400,7 +408,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "html"
Expand Down Expand Up @@ -581,7 +589,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "bat"
Expand Down

0 comments on commit 5f9a272

Please sign in to comment.