Gallery

Sample JavaScript Notebooks on Scribbler

Table of Contents

The below JavaScript notebooks are samples/boilerplates to start experimenting/building. Click on each link to play around with the code.

Introductory Notebooks #

  1. Hello-world for JavaScript Notebook. An introductory notebook with a hello-world example.
  2. Using curr_cell function in Scribbler. A special function in Scribbler to identify the dom of current cell.
  3. For-loop vs Reduce Performance Comparision. Compares performance of for-loop in javascript with that of the native function reduce.
  4. Alternating Sequence. Sum of sequences, shows usage of for-loop and simple plotting.

Graphs/Plotting #

  1. Plotly graphs Example in JavaScript. Shows usage of Plotly library for plotting graphs in the browser.
  2. Using DI-Libs for Plots. Plotting graphs suing the library - di-libs.js.
  3. Crypto-Plots. Plotting crypto-currency timeseries with data from API calls.

Financial Computation #

  1. Option Pricing using Black-Scholes. Pricing options using the famous Black-Scholes formula.
  2. Option Pricing using Monte-Carlo Simulation. Pricing options using Monte-Carlo simulation of the underlying price movement.

Simulation #

  1. Monte-Carlo Simulation of AMM - Automated MArket Making. Simulating Automate-Market-Making for assets in a decentralized exchange.
  2. Simple Simulation Example. Simulation of a physical system - a ball bouncing off four walls.
  3. Option Price Simulation.
  4. Monte-Carlo Simulation of Goals. Simulation of football goals and probability of winning.
  5. Dynamic System Simulation - Bouncing Ball on Moving Boundary. Simulation of a physical system - a ball bouncing off four walls but with one of the walls oscillating.

Scientific and Mathematical Computation #

  1. Numerical Recipes in JavaScript. Several numerical methods for solving equations and doing integration.
  2. Regula Falsi Method for Solving Equations. An ancient method for solving equations.
  3. Fibonacci Sequence and Golden Ratio. Convergence of ratio of sebsequent number is Fibonacci series to the Golden Ratio.
  4. Runge-Kutta Method for Differential Equations. A numerical method for solving ordinary differential equations

Functional Programming and Libraries #

  1. Array Functions in JavaScript. Array functions in JavaScript help in functional programming and making succinct code without loops.
  2. Using Underscore.js. Underscore.js is a library with utilities in JavaScript.
  3. Functional Code for Numerical Analysis. Functional code for finding roots, derivative and inverse of functions.

Machine Learning #

  1. Decentralized ML Using Brain.js. Machine learming in the browser using Brain.js and storing the model as JSON in the local system. Can be modified to store the model in IPFS/Torrents.