Scroll down to lift top layer; scroll up to stack layers.
This file contains 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
:imap jj <Esc> | |
:nmap f x | |
" NB: must be capital 'S', unlike in .vimrc | |
:map <Space> viw |
This file contains 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
object Karatsuba { | |
def main(args: Array[String]): Unit = { | |
def loop(str1: String, str2: String): BigInt = { | |
val n_digits1 = str1.length | |
val n_digits2 = str2.length | |
if (n_digits1 == 1 || n_digits2 == 1) { | |
BigInt(str1) * BigInt(str2) | |
} else { | |
val min_split = List(n_digits1, n_digits2).map(_ / 2).min |
This file contains 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
.eslintrc.js |
Inspired by a recent report on how cellular automata generates skin color patterns in lizards.
This file contains 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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.cell { | |
height: 10px; | |
width: 10px; | |
} | |
</style> | |
<body> |
The green decision boundary uses momentum, while the grey decision boundary does not. Inspired by a recent article on Distill.
Data are a sample from the S2 dataset of P. Fränti and O. Virmajoki, "Iterative shrinking method for clustering problems", Pattern Recognition, 39 (5), 761-765, May 2006.
Reload to explore local minima.
Drag 'em!
Update of bl.ock to include user-supplied parameters and dragging of data points.
NewerOlder