Last active
October 3, 2022 20:56
Revisions
-
shadaj revised this gist
Aug 20, 2019 . No changes.There are no files selected for viewing
-
shadaj revised this gist
Aug 20, 2019 . 1 changed file with 70 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,17 +28,85 @@ ] }, { "cell_type": "markdown", "metadata": { "id": "up2G8zDbhsEN", "colab_type": "text" }, "source": [ "# Scala in Colab" ] }, { "cell_type": "markdown", "metadata": { "id": "sL1Vq6r6J6dA", "colab_type": "text" }, "source": [ "## Install the Scala Kernel\n", "If you get a \"scala\" kernel not recognized warning when loading up the notebook for the first time, start by running the two cells below. Once you are done **reload the page** to load the notebook in the installed Scala kernel." ] }, { "cell_type": "code", "metadata": { "id": "RoCcdvTCAqeR", "colab_type": "code", "colab": {} }, "source": [ "%%shell\n", "SCALA_VERSION=2.12.8 ALMOND_VERSION=0.3.0+16-548dc10f-SNAPSHOT\n", "curl -Lo coursier https://git.io/coursier-cli\n", "chmod +x coursier\n", "./coursier bootstrap \\\n", " -r jitpack -r sonatype:snapshots \\\n", " -i user -I user:sh.almond:scala-kernel-api_$SCALA_VERSION:$ALMOND_VERSION \\\n", " sh.almond:scala-kernel_$SCALA_VERSION:$ALMOND_VERSION \\\n", " --sources --default=true \\\n", " -o almond-snapshot --embed-files=false\n", "rm coursier\n", "./almond-snapshot --install --global --force\n", "rm almond-snapshot" ], "execution_count": 0, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "BZchIo9sArF4", "colab_type": "code", "colab": {} }, "source": [ "%%shell\n", "echo \"{\n", " \\\"language\\\" : \\\"scala\\\",\n", " \\\"display_name\\\" : \\\"Scala\\\",\n", " \\\"argv\\\" : [\n", " \\\"bash\\\",\n", " \\\"-c\\\",\n", " \\\"env LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libpython3.6m.so:\\$LD_PRELOAD java -jar /usr/local/share/jupyter/kernels/scala/launcher.jar --connection-file {connection_file}\\\"\n", " ]\n", "}\" > /usr/local/share/jupyter/kernels/scala/kernel.json" ], "execution_count": 0, "outputs": [] }, { "cell_type": "markdown", "metadata": { "id": "kQe78pN0OSuq", "colab_type": "text" }, "source": [ "## Hello World!" ] }, { "cell_type": "code", "metadata": { "id": "a9z0PxRg_iOp", "colab_type": "code", @@ -48,7 +116,6 @@ "height": 34 } }, "source": [ "println(\"Hello, world!\")" ], -
shadaj revised this gist
Mar 12, 2019 . No changes.There are no files selected for viewing
-
shadaj revised this gist
Mar 12, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ }, "cell_type": "markdown", "source": [ "# Scala in Colab\n", "## BEFORE YOU BEGIN: [install Scala support](https://colab.research.google.com/gist/shadaj/323ad2393b46c1b71df435728a052c24/install-scala-in-colab.ipynb) into your Collab environment" ] }, -
shadaj revised this gist
Mar 12, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ }, "cell_type": "markdown", "source": [ "# Scala in Colab Template\n", "## BEFORE YOU BEGIN: [install Scala support](https://colab.research.google.com/gist/shadaj/323ad2393b46c1b71df435728a052c24/install-scala-in-colab.ipynb) into your Collab environment" ] }, -
shadaj revised this gist
Mar 12, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,7 +35,7 @@ "cell_type": "markdown", "source": [ "# Scala in Colab\n", "## BEFORE YOU BEGIN: [install Scala support](https://colab.research.google.com/gist/shadaj/323ad2393b46c1b71df435728a052c24/install-scala-in-colab.ipynb) into your Collab environment" ] }, { @@ -52,7 +52,7 @@ "source": [ "println(\"Hello, world!\")" ], "execution_count": 0, "outputs": [ { "output_type": "stream", -
shadaj revised this gist
Mar 11, 2019 . 1 changed file with 12 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,8 @@ "version": "0.3.2", "provenance": [], "collapsed_sections": [], "toc_visible": true, "include_colab_link": true }, "kernelspec": { "display_name": "Scala", @@ -16,6 +17,16 @@ } }, "cells": [ { "cell_type": "markdown", "metadata": { "id": "view-in-github", "colab_type": "text" }, "source": [ "<a href=\"https://colab.research.google.com/gist/shadaj/aaac98b690cfeb0cbd891bfe3ce5725d/scala-in-colab-template.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" ] }, { "metadata": { "id": "up2G8zDbhsEN", -
shadaj created this gist
Mar 11, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,56 @@ { "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "Scala in Colab Template.ipynb", "version": "0.3.2", "provenance": [], "collapsed_sections": [], "toc_visible": true }, "kernelspec": { "display_name": "Scala", "language": "scala", "name": "scala" } }, "cells": [ { "metadata": { "id": "up2G8zDbhsEN", "colab_type": "text" }, "cell_type": "markdown", "source": [ "# Scala in Colab\n", "## BEFORE YOU BEGIN: [install Scala support](https://colab.research.google.com/drive/1pOgj3335awIdZh4qWbYCelYw_VJoBTt6) into your Collab environment" ] }, { "metadata": { "id": "a9z0PxRg_iOp", "colab_type": "code", "outputId": "9c53634c-d938-440e-d22a-808c786226d7", "colab": { "base_uri": "https://localhost:8080/", "height": 34 } }, "cell_type": "code", "source": [ "println(\"Hello, world!\")" ], "execution_count": 1, "outputs": [ { "output_type": "stream", "text": [ "Hello, world!\n" ], "name": "stdout" } ] } ] }