An implementation of Skiba et al. (2012)'s W′ model in Haskell.
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
################################################################## | |
# A rolling average function for non-uniform time-sampled data. # | |
################################################################## | |
# Create some awkward time sampled data. | |
time <- cumsum(round(runif(1000, 0, 2), 2)) | |
x <- runif(1000, 300, 400) | |
df <- data.frame(t = time, x) | |
# Rcpp, otherwise R would take all day... |
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
/* | |
Package fan is a little concurrent io experiment. | |
Example Use Case | |
---------------- | |
You have a function that takes a single io.Reader as an argument. You would like | |
to pass that reader to several processing functions. You could just make the | |
function accept an io.ReadSeeker, invoke each function serially in a for loop, | |
seeking after each call. But that's not cool. |
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
/* ==================================== | |
* sheets.css | |
* Author: Jordan Mackie | |
* License: none (public domain) | |
* | |
* | |
* USAGE | |
* ----- | |
* | |
* <body class="sheets" size="A4"> |
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
module Main where | |
import Prelude | |
import Control.Monad.Eff (Eff) | |
import Data.List (List(..), (:), fromFoldable) | |
import Data.Maybe (Maybe(..)) | |
import Data.Newtype (class Newtype, unwrap, over, over2) | |
import Data.Ord (abs) |
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
var url = | |
'https://gist.githubusercontent.com/jmackie/' + | |
'1b147dd1ab5fb4484515bfbf82eef249/raw/' + | |
'661eb53afa3ac392967db4a1d4cb32906603cfba/search.xml'; | |
window.external.AddSearchProvider(url); |
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
module Main | |
-- data List a = (::) a (List a) | Nil | |
quicksort : Ord a => List a -> List a | |
quicksort [] = [] | |
quicksort (x :: xs) = (sort lower) ++ [x] ++ (sort upper) | |
where lower = filter (<x) xs | |
upper = filter (>=x) xs |
A friendly cheatsheet that answers the questions I find myself asking embarrassingly often...
git fetch origin # update everything you're not working on
git diff master origin/master # see what's changed
git merge origin/master # update what you're working on
Rebuild all the things (worse case scenario):
[ReallyBigProject](master)$ find client/elm -type f -exec touch {} +
[ReallyBigProject](master)$ elm-make +RTS -N4 -s -RTS client/elm/Main.elm --output $(mktemp --suffix .js)
Here's the output (with some overhead from profiling stuff in the build):
OlderNewer