Notes and examples of Transducers and Reducers
-
Used on collections
-
Eager evaluation only. (not lazy)
{-# LANGUAGE TypeSynonymInstances #-} | |
data Dual d = D Float d deriving Show | |
type Float' = Float | |
diff :: (Dual Float' -> Dual Float') -> Float -> Float' | |
diff f x = y' | |
where D y y' = f (D x 1) | |
class VectorSpace v where | |
zero :: v |
(defpackage bo | |
(:use :common-lisp :alexandria :serapeum :trivia)) | |
(in-package :bo) | |
;;;; Bayesian Optimization based on Tree-structured Parzen Estimator and naive-Bayes. | |
;;; | |
;;; based on Rust code at https://docs.rs/tpe/0.1.1/tpe/ | |
;;; which is inspired by https://optuna.org/ | |
;;; which is inspired by http://hyperopt.github.io/hyperopt/ | |
;;; which is described in https://proceedings.neurips.cc/paper/2011/file/86e8f7ab32cfd12577bc2619bc635690-Paper.pdf |
import numpy as np | |
import pandas as pd | |
from pandas_datareader import data as web | |
from sklearn import linear_model | |
class ScikitBacktest(object): | |
def __init__(self,sys): | |
self.lags = 5 | |
self.symbol = sys | |
self.get_data() |
package main | |
import ( | |
"log" | |
"syscall" | |
"unsafe" | |
) | |
var ( | |
kernel32 = syscall.NewLazyDLL("kernel32.dll") |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://gist.github.com/dillera/8108813/raw/ed65b97d3b910cb3536c3e522d4baebd442ff512/hack.sh | sh | |
# |