Skip to content

Instantly share code, notes, and snippets.

@feyderm
feyderm / .DS_Store
Last active February 3, 2023 22:29
Scatter plot + Brush
@feyderm
feyderm / index.html
Last active June 4, 2020 09:22
D3 v4 single axis jitterplot pan and zoom
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v4.min.js"></script>
</head>
<body>
<div id="block"></div>
<script>
// dimensions
@feyderm
feyderm / .gitignore
Last active April 26, 2019 06:25
Concurrent temporal data (pan and zoom)
.eslintrc.js
@feyderm
feyderm / index.html
Last active April 26, 2019 06:25
Geographic, interactive hexbin
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src = "https://feyderm.github.io/d3/d3.js"></script>
<script src = "https://feyderm.github.io/d3/hexbin/hexbin.js"></script>
<script src = "https://feyderm.github.io/d3/d3-legend-master/d3-legend.js"></script>
<script src = "https://feyderm.github.io/js/viridis_colors.js"></script>
</head>
@feyderm
feyderm / rstudio_vim_keymappings.txt
Created April 13, 2018 00:57
RStudio Vim keymappings
:imap jj <Esc>
:nmap f x
" NB: must be capital 'S', unlike in .vimrc
:map <Space> viw
@feyderm
feyderm / Karatsuba.scala
Created March 4, 2018 16:27
Karatsuba multiplication algorithm
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
@feyderm
feyderm / README.md
Last active February 19, 2018 12:59
Exploring Gradient Decent Parameters for Linear Regression
@feyderm
feyderm / README.md
Last active May 9, 2017 13:48
A change of perspective...

Scroll down to lift top layer; scroll up to stack layers.

@feyderm
feyderm / README.md
Last active April 23, 2017 22:24
Cellular automata
@feyderm
feyderm / index.html
Last active April 21, 2017 15:23
I made a mistake...
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.cell {
height: 10px;
width: 10px;
}
</style>
<body>