Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
| import bisect | |
| class NFA(object): | |
| EPSILON = object() | |
| ANY = object() | |
| def __init__(self, start_state): | |
| self.transitions = {} | |
| self.final_states = set() | |
| self._start_state = start_state |
| import java.awt.BorderLayout; | |
| import java.awt.Canvas; | |
| import java.awt.Dimension; | |
| import javax.swing.JFrame; | |
| import javax.swing.JPanel; | |
| import org.eclipse.swt.SWT; | |
| import org.eclipse.swt.awt.SWT_AWT; | |
| import org.eclipse.swt.browser.Browser; |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
| # Clean workspace | |
| rm(list=ls()) | |
| # Load MXNet | |
| require(mxnet) | |
| # Loading data and set up | |
| #------------------------------------------------------------------------------- | |
| # Load train and test datasets |
| type 'a parser_t = char list -> ('a * char list) option | |
| let satisfy pred = function [] -> None | x::xs -> if pred x then Some(x,xs) else None;; | |
| let range a b = satisfy (fun x -> x>=a && x <=b);; | |
| let exactly x = satisfy ((=) x);; | |
| let (<|>) p q = fun x -> match p x with Some _ as res -> res | None -> q x;; | |
| let (>>=) m f = fun l -> match m l with | |
| | None -> None | |
| | Some(res, l1) -> f res l1;; | |
| let return x = fun l -> Some(x, l);; |
| /* * * * * * * * * * * * * * | |
| * A simple expression parser | |
| * -------------------------- | |
| * | |
| * The parser can parse a mathematical expression into a simple custom | |
| * expression tree. It can recognise methods and fields/contants which | |
| * are user extensible. It can also contain expression parameters which | |
| * are registrated automatically. An expression tree can be "converted" | |
| * into a delegate. | |
| * |