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
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^.*$ proxy.php |
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
# test runner generator from a file with R functions | |
# some grey magic, <hannes@cwi.nl>, 2015-04-14 | |
test_runner <- function(fname) { | |
invisible(tryCatch ({ | |
conn <- textConnection("out", "w") | |
dput(do.call(fname, envir=test_ns, args=list()), file=conn) | |
close(conn) | |
out | |
}, error=function(e) { |
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
#include <assert.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <errno.h> | |
#include <stdio.h> | |
#include <signal.h> | |
#include <unistd.h> | |
#include <math.h> | |
#include <stdlib.h> |
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
# Test runner generator from a file with R functions | |
# Hannes Muehleisen, <hannes@muehleisen.org>, 2015-04-14 | |
test_runner <- function(fname) { | |
invisible(tryCatch ({ | |
conn <- textConnection("out", "w") | |
dput(do.call(fname, envir=test_ns, args=list()), file=conn) | |
close(conn) | |
out | |
}, error=function(e) { |
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(MonetDB.R) | |
files <- dir("/Users/hannes/Desktop/PAMAP2_Dataset/Protocol/", pattern="*.dat", full.names=T) | |
tnames <- paste0("pamap2_", sub("^([^.]*).*", "\\1", basename(files))) | |
snames <- sub(".*(\\d{3})$", "\\1", tnames) | |
loadsql <- c("DROP VIEW pamap2", paste0("DROP TABLE ",tnames,"; "), paste0("CREATE TABLE ",tnames," (timestamp float, activityID int, heart_rate int, hand_temp float, hand_acc_16_1 float, hand_acc_16_2 float, hand_acc_16_3 float, hand_acc_6_1 float, hand_acc_6_2 float, hand_acc_6_3 float, hand_gyro_1 float, hand_gyro_2 float, hand_gyro_3 float, hand_mag_1 float, hand_mag_2 float, hand_mag_3 float, hand_or_1 float, hand_or_2 float, hand_or_3 float, hand_or_4 float, chest_temp float, chest_acc_16_1 float, chest_acc_16_2 float, chest_acc_16_3 float, chest_acc_6_1 float, chest_acc_6_2 float, chest_acc_6_3 float, chest_gyro_1 float, chest_gyro_2 float, chest_gyro_3 float, chest_mag_1 float, chest_mag_2 float, chest_mag_3 float, chest_or_1 float, chest_or_2 float, chest_or_3 float, chest |
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
# Obsolete, See https://www.monetdb.org/blog/monetdblite-r |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>Hello, Mark</title> | |
</head> | |
<body><h1>fuuu</h1></body></html> |
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
# rm -r /tmp/hmda | |
install.packages("MonetDBLite") | |
library(DBI) | |
dbdir <- "/tmp/hmda" | |
con <- dbConnect(MonetDBLite::MonetDBLite(), dbdir) | |
# download at http://homepages.cwi.nl/~hannes/hmda.rds | |
dd <- readRDS("/tmp/hmda.rds") |
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.packages("MonetDBLite") | |
# install.packages("dbplot") | |
# install.packages("nycflights13") | |
# install.packages("ggplot2") | |
# install.packages("dplyr") | |
library("ggplot2") | |
library("dplyr") | |
library("dbplot") |
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("DBI") | |
library("ggplot2") | |
con <- dbConnect(RSQLite::SQLite(), dbname="~/Library/Mail/V5/MailData/Envelope Index", flags=RSQLite::SQLITE_RO) | |
# messages per month | |
msg_per_month <- dbGetQuery(con, "SELECT MIN(DATETIME(date_sent, 'unixepoch')) as start, STRFTIME('%m', DATETIME(date_sent, 'unixepoch')) AS month, STRFTIME('%Y', DATETIME(date_sent, 'unixepoch')) AS year, COUNT(*) AS n FROM messages WHERE mailbox IN (SELECT ROWID FROM mailboxes WHERE url LIKE '%Sent') GROUP BY year, month ORDER BY year, month") | |
msg_per_month$start <- as.Date(msg_per_month$start) | |
ggplot(msg_per_month, aes(x=start, y=n, group=1)) + geom_line() |
OlderNewer