Skip to content

Commit

Permalink
Add instructions for running Java notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
sualeh committed May 8, 2024
1 parent 2c6c40d commit ca9f641
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 6 deletions.
37 changes: 37 additions & 0 deletions Notebooks/2_java_unicode_case_conversions.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"----------\n",
"\n",
"> **How to Run This Notebook**\n",
"\n",
"You can run this notebook in Google Colab. The cell below should be run only once, and then followed by a change of runtime to \"Java (java)\". Refresh the browser before running any subsequent code. You can also run this notebook locally if you have the IJava kernel for Jupyter installed."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#@title Prepare Google Colab for IJava Kernel\n",
"\n",
"%%sh\n",
"# Install java kernel\n",
"wget -q https://github.com/SpencerPark/IJava/releases/download/v1.3.0/ijava-1.3.0.zip\n",
"unzip -q ijava-1.3.0.zip\n",
"python install.py\n",
"\n",
"# Install proxy for the java kernel\n",
"wget -qO- https://gist.github.com/SpencerPark/e2732061ad19c1afa4a33a58cb8f18a9/archive/b6cff2bf09b6832344e576ea1e4731f0fb3df10c.tar.gz | tar xvz --strip-components=1\n",
"python install_ipc_proxy_kernel.py --kernel=java --implementation=ipc_proxy_kernel.py"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"----------"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
45 changes: 39 additions & 6 deletions Notebooks/3_java_unicode_numbers.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"----------\n",
"\n",
"> **How to Run This Notebook**\n",
"\n",
"You can run this notebook in Google Colab. The cell below should be run only once, and then followed by a change of runtime to \"Java (java)\". Refresh the browser before running any subsequent code. You can also run this notebook locally if you have the IJava kernel for Jupyter installed."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#@title Prepare Google Colab for IJava Kernel\n",
"\n",
"%%sh\n",
"# Install java kernel\n",
"wget -q https://github.com/SpencerPark/IJava/releases/download/v1.3.0/ijava-1.3.0.zip\n",
"unzip -q ijava-1.3.0.zip\n",
"python install.py\n",
"\n",
"# Install proxy for the java kernel\n",
"wget -qO- https://gist.github.com/SpencerPark/e2732061ad19c1afa4a33a58cb8f18a9/archive/b6cff2bf09b6832344e576ea1e4731f0fb3df10c.tar.gz | tar xvz --strip-components=1\n",
"python install_ipc_proxy_kernel.py --kernel=java --implementation=ipc_proxy_kernel.py"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"----------"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -19,11 +56,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "java"
}
},
"metadata": {},
"outputs": [],
"source": [
"final String hindiNumber = \"१२३४५६७८९०\";\n",
Expand All @@ -43,7 +76,7 @@
"codemirror_mode": "java",
"file_extension": ".jshell",
"mimetype": "text/x-java-source",
"name": "Java",
"name": "java",
"pygments_lexer": "java",
"version": "17.0.6+9-LTS-190"
}
Expand Down
37 changes: 37 additions & 0 deletions Notebooks/4_java_encoding.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"----------\n",
"\n",
"> **How to Run This Notebook**\n",
"\n",
"You can run this notebook in Google Colab. The cell below should be run only once, and then followed by a change of runtime to \"Java (java)\". Refresh the browser before running any subsequent code. You can also run this notebook locally if you have the IJava kernel for Jupyter installed."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#@title Prepare Google Colab for IJava Kernel\n",
"\n",
"%%sh\n",
"# Install java kernel\n",
"wget -q https://github.com/SpencerPark/IJava/releases/download/v1.3.0/ijava-1.3.0.zip\n",
"unzip -q ijava-1.3.0.zip\n",
"python install.py\n",
"\n",
"# Install proxy for the java kernel\n",
"wget -qO- https://gist.github.com/SpencerPark/e2732061ad19c1afa4a33a58cb8f18a9/archive/b6cff2bf09b6832344e576ea1e4731f0fb3df10c.tar.gz | tar xvz --strip-components=1\n",
"python install_ipc_proxy_kernel.py --kernel=java --implementation=ipc_proxy_kernel.py"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"----------"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
37 changes: 37 additions & 0 deletions Notebooks/5_java_unicode_pattern_matching.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"----------\n",
"\n",
"> **How to Run This Notebook**\n",
"\n",
"You can run this notebook in Google Colab. The cell below should be run only once, and then followed by a change of runtime to \"Java (java)\". Refresh the browser before running any subsequent code. You can also run this notebook locally if you have the IJava kernel for Jupyter installed."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#@title Prepare Google Colab for IJava Kernel\n",
"\n",
"%%sh\n",
"# Install java kernel\n",
"wget -q https://github.com/SpencerPark/IJava/releases/download/v1.3.0/ijava-1.3.0.zip\n",
"unzip -q ijava-1.3.0.zip\n",
"python install.py\n",
"\n",
"# Install proxy for the java kernel\n",
"wget -qO- https://gist.github.com/SpencerPark/e2732061ad19c1afa4a33a58cb8f18a9/archive/b6cff2bf09b6832344e576ea1e4731f0fb3df10c.tar.gz | tar xvz --strip-components=1\n",
"python install_ipc_proxy_kernel.py --kernel=java --implementation=ipc_proxy_kernel.py"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"----------"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit ca9f641

Please sign in to comment.