From a3c5c657fbed445841188eb305e72b644e3f538a Mon Sep 17 00:00:00 2001 From: Sualeh Fatehi Date: Tue, 7 May 2024 20:13:14 -0400 Subject: [PATCH] Created using Colab --- Notebooks/3_java_unicode_numbers.ipynb | 194 ++++++++++++++----------- 1 file changed, 110 insertions(+), 84 deletions(-) diff --git a/Notebooks/3_java_unicode_numbers.ipynb b/Notebooks/3_java_unicode_numbers.ipynb index f2027de..fe388d2 100644 --- a/Notebooks/3_java_unicode_numbers.ipynb +++ b/Notebooks/3_java_unicode_numbers.ipynb @@ -1,86 +1,112 @@ { - "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." - ] + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "mNLXOg88iW9A" + }, + "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": { + "id": "DialDW_qiW9B" + }, + "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": { + "id": "OZwKmiHpiW9C" + }, + "source": [ + "----------" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "SsrPAvDfiW9C" + }, + "source": [ + "# Parsing Numbers" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "FxpsAUd5iW9C" + }, + "source": [ + "## Handle Unicode Numbers\n", + "\n", + "Demonstrates number parsing functions can handle numeric values from other (non-English) languages." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "5TwVJqWPiW9C" + }, + "outputs": [], + "source": [ + "final String hindiNumber = \"१२३४५६७८९०\";\n", + "final int number = Integer.parseInt(hindiNumber);\n", + "\n", + "System.out.printf(\"%s = %d%n\", hindiNumber, number);" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Java", + "language": "java", + "name": "java" + }, + "language_info": { + "codemirror_mode": "java", + "file_extension": ".jshell", + "mimetype": "text/x-java-source", + "name": "java", + "pygments_lexer": "java", + "version": "17.0.6+9-LTS-190" + }, + "colab": { + "provenance": [], + "include_colab_link": true + } }, - { - "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": {}, - "source": [ - "# Parsing Numbers" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Handle Unicode Numbers\n", - "\n", - "Demonstrates number parsing functions can handle numeric values from other (non-English) languages." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "final String hindiNumber = \"१२३४५६७८९०\";\n", - "final int number = Integer.parseInt(hindiNumber);\n", - "\n", - "System.out.printf(\"%s = %d%n\", hindiNumber, number);" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Java", - "language": "java", - "name": "java" - }, - "language_info": { - "codemirror_mode": "java", - "file_extension": ".jshell", - "mimetype": "text/x-java-source", - "name": "java", - "pygments_lexer": "java", - "version": "17.0.6+9-LTS-190" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file