View Shell log.sh
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
brew install rds-command-line-tools | |
rds-create-db-parameter-group mysql-utf8 -f mysql5.1 -d "MySQL 5.1 configured for UTF-8" | |
rds-modify-db-parameter-group mysql-utf8 \ | |
--parameters="name=character_set_server, value=utf8, method=immediate" \ | |
--parameters="name=character_set_client, value=utf8, method=immediate" \ | |
--parameters="name=character_set_results,value=utf8,method=immediate" \ | |
--parameters="name=collation_server, value=utf8_general_ci, method=immediate" \ | |
--parameters="name=collation_connection, value=utf8_general_ci, method=immediate" |
View server.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
library(shiny) | |
library(datasets) | |
library(ggplot2) | |
tg <- ToothGrowth | |
tg$dose <- factor(tg$dose) | |
# Define server logic | |
shinyServer(function(input, output) { | |
View server.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
library(shiny) | |
shinyServer(function(input, output) { | |
re <- reactive(function(){ | |
cat("re called\n",file=stderr()) | |
input$n | |
}) | |
output$ntext <- reactiveText(function() { | |
cat("output$ntext called\n",file=stderr()) |
View server.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
# Some pre-computed stuff in R. In this example, just assign values to a var | |
# data_sets <- c("mtcars", "morley", "rock") | |
data_sets <- c("mymtcars","mtcars", "morley", "rock") | |
mymtcars <- mtcars[,1:4] | |
shinyServer(function(input, output) { | |
mymtcars <- mymtcars |
View lr.js
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
<script src="https://github.com/livereload/livereload-js/raw/master/dist/livereload.js?host=localhost"></script> |
View server.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
library(shiny) | |
shinyServer(function(input, output) { | |
output$intense <- reactivePrint(function() { | |
if(input$panel==2){ | |
Sys.sleep(10) | |
return('Finished') | |
}else({return(NULL)}) | |
}) |
View global.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
############################################### | |
## | |
## Attempt no 2 at building a shiny web app | |
## for AB Testing use - using global.R | |
## | |
## global.R - loading and defining variables for the global environment | |
## | |
############################################### | |
# Pallette used in some charts as a general indicator color for better or worse that the control group |
View pest.tech.functions.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
#StrategicPestTechnologies: Functions | |
#~~~~~~~~~~~Calc trap info~~~~~~~~~~~~ | |
trap.info.func<-function(file){ | |
#Take file | |
#Return: traps, n.traps, ylims, xlims, total.area | |
traps<-read.table(file, header=FALSE) | |
colnames(traps)<-c("ID","X","Y") | |
n.traps<-dim(traps)[1] |
View Global.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
library(chron) | |
library(shiny) | |
energy1=c(76.1,77,78.1,78.2,78.8,79.7,79.9,81.1,81.2,81.8,82.8,83.5) | |
cost1=c(7.1,7,7.1,7.2,7.8,7.7,7.9,8.1,8.2,8.8,8.8,8.5) | |
time1=c(20130301,20130401,20130501,20130601,20130701,20130801,20130901,20131001,20131101,20131201,20140101,20140201) | |
time1=as.Date(as.character(time1),format="%Y%m%d") | |
shinymonth=data.frame(time=time1,energy=energy1,cost=cost1) |
OlderNewer