Giter VIP home page Giter VIP logo

jwls_2's Introduction

JWLX

Jupyter notebooks for Wolfram Language on Linux.

Installation

  1. Copy JWLX_kernel folder where jupyter expects custom kernels to be, typically in ~/miniconda3/lib/python3.7/site-packages/
  2. Run the installation script python JWLX_kernel/install.py
  3. Check if JWLS.sh points the actual wolframscript executable, then make it globally available: sudo cp JWLX.sh /usr/local/bin/JWLX

Usage

Run JWLX.

Features

  • Autocompletion of WL Symbols
  • WL syntax highlighting
  • Graphics and interactive objects handled by the browser
  • Neat separation of Jupyter Notebook interface and Wolfram Kernel; similarly to Mathematica, you can run multiple notebooks on the same Wolfram Kernel.

Graphics and Interactivity

There are 3 custom functions to deal with graphics and dynamical outputs:

  1. show returns a URL of the pdf export of any expression, except for images that are exported to PNG. By clicking the URL, graphics gets rendered by the browser PDF reader or, in case of images, by the Jupyter file viewer.

  2. manipulate mimics Manipuate and it returns a dynamic HTML page with a single slider (no multiple sliders or different types of controllers yet). Valid expressions are manipulate[Hold @ expr, {u, u_min, u_max, du}] or manipulate[Hold @ exp, {u, u_min, u_max}] with a default value of du=1/10 or the interval. Note: To wrap expr in Hold is necessary in most cases.
    At every change of the slider value, the JS script sends a POST request to the Wolfram Engine that provides an HTTPResponse.

  3. refresh works similarly to manipulate there is no slider; the JS script automatically sends POST requests at regular intervals. Valid syntax is refresh[expr, dt] or refresh[expr] with a default update interval dt= 1s.

  4. listanimate mimics ListAnimate and it gives the smoothest experience insofar all outputs are preemptively saved in RAM. Valid syntax is listanimate[{e_1, e_2, .., e_N}].

Remote Notebooks

In order to use it on a cloud compute virtual machine, edit the JWLX script at the nbAddrF function definition by adding jupyter notebook --no-browser --port=7000 . Then screen a session, run JWLX and detach it (Ctrl A + Ctrl D). Go back to your local machine and ssh -N -f -L localhost:6001:localhost:7000 <IP>". For AWS instances also add the pem. For Google Cloud follow their instructions about remote jupyter notebooks.

Additional Functions

  • ExportList

jwls_2's People

Contributors

ludwiggle avatar agbgmilano avatar

Watchers

James Cloos avatar

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.