A new version of Solaris VM for R is available from https://github.com/jeroenooms/solarisvm
This file contains hidden or 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(dygraphs) | |
| lungDeaths <- cbind(ldeaths, mdeaths, fdeaths) | |
| dygraph(lungDeaths, main = "Deaths from Lung Disease (UK)") %>% | |
| dyHighlight(highlightSeriesOpts = list(strokeWidth = 3)) -> d1 | |
| #this is a hack to set css directly | |
| # dyCSS designed to read a text css file | |
| d1$x$css = " |
This file contains hidden or 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
| # RSelenium + 2048 demo on Budapest RUG (BURN) meetup - Laszlo Szakacs, 2015-01-14 | |
| # Commented and updated on 2015-01-18 | |
| # Selenium: http://www.seleniumhq.org | |
| # RSelenium: http://ropensci.github.io/RSelenium | |
| # 2048: http://gabrielecirulli.github.io/2048 | |
| # 2048 + R: http://decisionsandr.blogspot.hu/2014/04/play-2048-using-r.html | |
| # Strategies: http://stackoverflow.com/questions/22342854/what-is-the-optimal-algorithm-for-the-game-2048 |
This file contains hidden or 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/bash | |
| # Start an AWS instance with one of the AMIs provided by: | |
| # http://www.louisaslett.com/RStudio_AMI/ | |
| # | |
| # Get this script. | |
| # wget https://gist.githubusercontent.com/JoshData/615aa18cecb8a6596f59/raw/1b43765552862af98cb16d95dd236a81f6c5b464/build_logins.sh | |
| # chmod +x build_logins.sh | |
| # | |
| # Then use this script to create many logins on the system. |
This file contains hidden or 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
| ;; based on http://emacsredux.com/blog/2013/04/03/delete-file-and-buffer/ | |
| (defun delete-file-and-buffer () | |
| "Kill the current buffer and deletes the file it is visiting." | |
| (interactive) | |
| (let ((filename (buffer-file-name))) | |
| (if filename | |
| (if (y-or-n-p (concat "Do you really want to delete file " filename " ?")) | |
| (progn | |
| (delete-file filename) | |
| (message "Deleted file %s." filename) |
This file contains hidden or 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
| height_ratio <- c(0.924324324, 1.081871345, 1, 0.971098266, 1.029761905, | |
| 0.935135135, 0.994252874, 0.908163265, 1.045714286, 1.18404908, | |
| 1.115606936, 0.971910112, 0.97752809, 0.978609626, 1, | |
| 0.933333333, 1.071428571, 0.944444444, 0.944444444, 1.017142857, | |
| 1.011111111, 1.011235955, 1.011235955, 1.089285714, 0.988888889, | |
| 1.011111111, 1.032967033, 1.044444444, 1, 1.086705202, | |
| 1.011560694, 1.005617978, 1.005617978, 1.005494505, 1.072222222, | |
| 1.011111111, 0.983783784, 0.967213115, 1.04519774, 1.027777778, | |
| 1.086705202, 1, 1.005347594, 0.983783784, 0.943005181, 1.057142857) |
This file contains hidden or 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
| msg <- function(..., prob = 0.25) { | |
| if (runif(1) > prob) { | |
| return(invisible()) | |
| } | |
| messages <- c(...) | |
| message(sample(messages, 1)) | |
| } | |
| encourage <- function() { |
This file contains hidden or 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
| ## transform the input to the output using rubiks-cube transformations and dplyr | |
| require(dplyr) | |
| ## provided input | |
| input <- data.frame(matrix(c("h","a","t","t","i","v","i","g","k","s","g","n","n","g","n","i"), | |
| 4, | |
| 4, | |
| byrow=TRUE, | |
| dimnames=list(NULL,paste0("col",1:4))), | |
| stringsAsFactors=FALSE) |
This file contains hidden or 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
| node { | |
| echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
| echo 'No quotes, pipeline command in single quotes' | |
| sh 'echo $BUILD_NUMBER' // 1 | |
| echo 'Double quotes are silently dropped' | |
| sh 'echo "$BUILD_NUMBER"' // 1 | |
| echo 'Even escaped with a single backslash they are dropped' | |
| sh 'echo \"$BUILD_NUMBER\"' // 1 | |
| echo 'Using two backslashes, the quotes are preserved' | |
| sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
This file contains hidden or 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
| FROM ubuntu:15.10 | |
| RUN apt-get clean && \ | |
| apt-get update && \ | |
| apt-get -y install \ | |
| libsoup2.4-dev \ | |
| libgtk-3-dev \ | |
| libjson-glib-dev \ | |
| valac \ | |
| make \ |