Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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

You can’t perform that action at this time.