Skip to content

Instantly share code, notes, and snippets.

/**
* Kalman Filters
*
* Uses a series of measurements observed over time, containing
* statistical noise and other inaccuracies, and produces a more
* accurate estimate.
*
*
* http://www.cs.unc.edu/~welch/kalman/Levy1997/index.html
*/
### Keybase proof
I hereby claim:
* I am nhunzaker on github.
* I am nhunzaker (https://keybase.io/nhunzaker) on keybase.
* I have a public key ASBfUd8iUn88ILVhWT4YszwRcQdnFkBaambe5RhIYg4jDwo
To claim this, I am signing this object:
(defun nh/today-as-string ()
"Today, as a string."
(format-time-string "%y.%m.%d"))
(defun current-workbook ()
"Location of the current workbook log file."
(concat "~/.org/worklog/" (nh/today-as-string) ".org"))
(defun workbook ()
"Opens up my workbook."

Next Microcosm

I've had a couple of things on my mind with regard to the next version of Microcosm.

A client-side version of GraphQL

I want to be able to build out a Microcosm state tree using GraphQL. A single document would automatically produce a fast, well documented, easily configurable Microcosm setup. For example:

type Author {
@nhunzaker
nhunzaker / react-dom.cjs.js
Last active August 16, 2017 12:30
Current as of 7e297e9b20d75ee9cc39aadf7e83133af1869881
/*
Modernizr 3.0.0pre (Custom Build) | MIT
*/
var aa = require("react"),
ba = require("fbjs/lib/invariant"),
l = require("fbjs/lib/ExecutionEnvironment"),
n = require("object-assign"),
ca = require("fbjs/lib/EventListener"),
w = require("fbjs/lib/emptyFunction"),
da = require("fbjs/lib/emptyObject"),
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Untitled benchmark</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>

Number

  • cellPadding
  • cellSpacing
  • colSpan
  • coords
  • height
  • high
  • low
  • marginHeight

Number

  • cellPadding
  • cellSpacing
  • colSpan
  • coords
  • height
  • high
  • low
  • marginHeight
describe('Jest Electron Runner', function() {
it('has access to the window', function() {
expect(window).toEqual(global)
})
it('has access to the document', function() {
expect(document).toEqual(global.document)
})
@nhunzaker
nhunzaker / index.html
Created December 10, 2016 15:33
Object.create vs shallow clone #jsbench #jsperf (http://jsbench.github.io/#ab0f9152b4a3df689cbfe98062adf36e) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Object.create vs shallow clone #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>