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
all: results.log | |
results.log: benchmark.R Makefile | |
r -p benchmark.R | tee results.log |
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
cut2 <- function (x, breaks, labels = NULL, include.lowest = FALSE, right = TRUE, | |
dig.lab = 3, ordered_result = FALSE, ...) | |
{ | |
if (!is.numeric(x)) | |
stop("'x' must be numeric") | |
if (length(breaks) == 1L) { | |
if (is.na(breaks) || breaks < 2L) | |
stop("invalid number of intervals") | |
nb <- as.integer(breaks + 1) | |
dx <- diff(rx <- range(x, na.rm = TRUE)) |
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
dat <- read.table(text="VARIABLES DATE DATA | |
V1 1/03/2012 1000 | |
V1 1/04/2012 1500 | |
V1 1/12/2012 2600 | |
V2 1/03/2012 900 | |
V2 1/04/2012 1200 | |
V2 1/12/2012 1000 | |
V3 1/03/2012 200", header = TRUE) |
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
# Auto-screen invocation. see: http://taint.org/wk/RemoteLoginAutoScreen | |
# if we're coming from a remote SSH connection, in an interactive session | |
# then automatically put us into a screen(1) session. Only try once | |
# -- if $STARTED_SCREEN is set, don't try it again, to avoid looping | |
# if screen fails for some reason. | |
if [ "$TERM" != screen -a "$PS1" != "" -a "${STARTED_SCREEN:-x}" = x -a "${SSH_TTY:-x}" != x -a "$DISPLAY" == "" ] | |
then | |
echo "Auto-starting screen." | |
# Set the window title to HOSTNAME |
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
!|sh -c "echo $DISPLAY > ~/.display-$(cat /etc/hostname)" | |
screen -t xpra 9 xpra start $DISPLAY --no-daemon |
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
DROP TABLE IF EXISTS ind1_2000 CASCADE; | |
CREATE TABLE ind1_2000 (id integer, ind1 float); | |
ALTER TABLE ind1_2000 ADD PRIMARY KEY (id); | |
INSERT INTO ind1_2000 VALUES (1, 0.0); | |
INSERT INTO ind1_2000 VALUES (2, 0.3); | |
INSERT INTO ind1_2000 VALUES (3, 1.1); | |
VACUUM ANALYZE ind1_2000; | |
DROP TABLE IF EXISTS ind2_2000 CASCADE; | |
CREATE TABLE ind2_2000 (id integer, ind2 float); |
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
.expr_to_fun <- function(x) { | |
expr <- substitute(x) | |
res <- force(x) | |
if (is.function(res)) { | |
list(f = res, val = res()) | |
} else { | |
f <- eval.parent(substitute(function() expr)) | |
list(f = f, val = res) | |
} |
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
# | |
# This is the default configuration file for Xpra | |
# | |
# You can provide default values for most command line | |
# options here. | |
# All options can be overriden on the xpra command line. | |
# See the man page for details. | |
# Options which can be turned on or off will accept | |
# the following values: 1, 0, true, false, yes, no |
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
#!/bin/sh | |
ATTACH_TO=ssh:$1 | |
echo -n "\033]0;xpra $1\007" | |
echo "Attaching to $ATTACH_TO..." >> /dev/stderr | |
xpra attach $ATTACH_TO |
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
screen -t xpra 9 xpra start $DISPLAY --no-daemon |
OlderNewer