A Pen by Jason Yamada-Hanff on CodePen.
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
import pytest | |
import hypothesis as hyp | |
import hypothesis.strategies as st | |
@st.composite | |
def st_intervals(draw, min_value=None, max_value=None): | |
lo = draw(st.integers(min_value, max_value)) | |
hi = draw(st.integers(lo, max_value)) | |
return (lo, hi) |
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
def myzip(*args): | |
iters = [iter(a) for a in args] | |
while True: | |
try: | |
yield tuple([next(it) for it in iters]) | |
except StopIteration: | |
return |
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
function mergeData(...arrs) { | |
const getKey = el => el.affId + ',' + el.offId | |
const full = concat(arrs) | |
const groupedObj = groupBy(full, getKey) | |
const grouped = Object.values(groupedObj) | |
const merged = grouped.map(mergeObjects) | |
return merged | |
} | |
function concat(arrs) { |
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
Install `benchmark` (https://benchmarkjs.com/) and run: | |
npm install --save benchmark | |
node loopperf.js |
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
library(tidyverse) | |
## Confidence Interval simulation | |
## ------------------------------ | |
## | |
## Demonstrate properties of (95%) confidence intervals and how to | |
## calculate them. Note that some confidence intervals _will not_ | |
## contain the true value. | |
## | |
## |
A Pen by Jason Yamada-Hanff on CodePen.
I hereby claim:
- I am yamad on github.
- I am jyamad (https://keybase.io/jyamad) on keybase.
- I have a public key whose fingerprint is D92C 5315 0AFD B339 4FE9 9324 5B13 0E57 4A12 2A3D
To claim this, I am signing this object:
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
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
new file mode 100644 | |
index 0000000..0f6b475 | |
--- /dev/null | |
+++ b/CMakeLists.txt | |
@@ -0,0 +1,52 @@ | |
+cmake_minimum_required(VERSION 2.8.4) # >= 2.8.4 needed for CYGWIN behavior | |
+project(yaml C) | |
+ | |
+# package version numbers |