Code Monkey home page Code Monkey logo

liuderchi / learn-js-in-jupyter Goto Github PK

View Code? Open in Web Editor NEW
24.0 2.0 6.0 1.49 MB

๐Ÿ“™ Interactive, cross-platform JavaScript ES6 / Python 3,2 notebook powered by JupyterLab and Docker

Home Page: https://hub.docker.com/r/liuderchi/learn-js-in-jupyter/

License: MIT License

JavaScript 25.87% Jupyter Notebook 63.30% Dockerfile 6.81% Shell 4.02%
jupyter-notebook jupyter-nodejs jupyter notebook-jupyter javascript-learning nodejs-playground jupyterlab ijavascript

learn-js-in-jupyter's Introduction

Learn JS in Jupyter

๐Ÿ“™ Your interactive learning notebook for JavaScript ES6 / Python 3 / Python 2
Powered by Awesome JupyterLab and docker ๐Ÿณ . Fun to use; Easy to install ๐Ÿ‘ฉโ€๐Ÿ’ป ๐Ÿ‘จโ€๐Ÿ’ป.



demo-1

Run Online with Play With Docker in 5 min (free)

  1. Click Try in PWD to launch a new container.
    After the stack builder is finished, close the dialog.
  • pwd-run-1
  1. Get Access Token by running this command in the terminal prompt:
docker exec $(docker container list | awk 'FNR==2{print $1}') sh -c 'jupyter notebook list' \
  | awk 'FNR==2{print $1}' | grep -E 'token=(.*)' -o | cut -c7-54
  1. Click the link above to access Jupyter page:
  • pwd-run-2
  1. In page paste the token in the input field to login
  • pwd-run-3
  1. ๐ŸŽ‰ Congrats! Now you can create a Notebook with JavaScript, Python 3 or Python 2 Environment!
    Type some code and press shift + enter to run it!
  • pwd-run-4
  • pwd-run-5

Running Locally with Docker

  1. Run Following command in your terminal:
docker run -d -p 8888:8888 liuderchi/learn-js-in-jupyter:latest
  1. Run following command to get Jupyter token. Then Copy it.
docker exec $(docker container list | awk 'FNR==2{print $1}') sh -c 'jupyter notebook list' \
    | awk 'FNR==2{print $1}' | grep -E 'token=(.*)' -o | cut -c7-54
  1. In browser go to localhost:8888?token=PASTE_JUPYTER_TOKEN_HERE

Alternatively, use this One Liner for step 2 and step 3:

python -mwebbrowser $(docker exec $(docker container list | awk 'FNR==2{print $1}') sh -c 'jupyter notebook list' | awk 'FNR==2{print $1}')

Running and Saving Changes Locally

$ git clone https://github.com/liuderchi/learn-js-in-jupyter.git
$ cd learn-js-in-jupyter
$ docker run -d -p 8888:8888 \
  -v $PWD/notebooks:/root/learn-js-in-jupyter \
  -v $PWD/jupyterlab-settings:/root/.jupyter/lab/user-settings/@jupyterlab \
  liuderchi/learn-js-in-jupyter:latest

# open in browser with token in url
$ python -mwebbrowser $(docker exec $(docker container list | awk 'FNR==2{print $1}') \
  sh -c 'jupyter notebook list' | awk 'FNR==2{print $1}')

License

MIT License

learn-js-in-jupyter's People

Contributors

dependabot[bot] avatar liuderchi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

learn-js-in-jupyter's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.