This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Calc { | |
| /* | |
| ------------------------------------------ | |
| | rand:float - returns random float | |
| | | |
| | min:number - minimum value | |
| | max:number - maximum value | |
| | | |
| | Get a random float between two values |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -e | |
| LOOP=false | |
| BG=false | |
| while true; do | |
| case $1 in | |
| -l|--loop) LOOP=true; shift ;; | |
| -b|--background) BG=true; shift ;; | |
| *) break |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| case $# in | |
| 0) | |
| echo "Usage: $0 {start|stop}" | |
| exit 1 | |
| ;; | |
| 1) | |
| case $1 in | |
| start) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sbt> eval new scala.sys.SystemProperties().foreach(x => println(x)) | |
| sbt> eval scala.sys.env.foreach(x => println(x)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // NOTICE 2020-04-18 | |
| // Please see the comments below about why this is not a great PRNG. | |
| // Read summary by @bryc here: | |
| // https://github.com/bryc/code/blob/master/jshash/PRNGs.md | |
| // Have a look at js-arbit which uses Alea: | |
| // https://github.com/blixt/js-arbit | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env ocamlscript | |
| Ocaml.ocamlflags := ["-thread"]; | |
| Ocaml.packs := [ "core" ] | |
| -- | |
| open Core.Std | |
| type term = | |
| | Ident of string | |
| | Lambda of string * term | |
| | Apply of term * term |