Skip to content

Instantly share code, notes, and snippets.

@malithj
malithj / sql
Created Feb 7, 2018
slappbooks-database-schema
View sql
CREATE TABLE entity (
id INT AUTO_INCREMENT,
name VARCHAR(255),
currency VARCHAR(10),
type VARCHAR(255),
PRIMARY KEY (id)
);
CREATE TABLE transaction (
id INT AUTO_INCREMENT,
View slope_model.R
#slope model
number <- 1000000
position <- 1:number
data <- data.frame(signal = rep(c(1, 2), c(number/2, number/2))*position + rnorm(number), position=position)
ptm <- proc.time()
res <- postcp(signal ~ 1 , family = gaussian(), data = data, bp = c(number/5), sigma = 1)
proc.time() - ptm
View mean_model.R
#mean model
number <- 1000000
data <- data.frame(signal = rnorm(number) + rep(c(2, 5), each=number/2), position = 1:number)
ptm <- proc.time()
res <- postcp(signal ~ 1 ,family = gaussian(), data = data, bp = c(number/5), sigma = 1)
proc.time() - ptm
You can’t perform that action at this time.