Skip to content

Instantly share code, notes, and snippets.

View MarkEdmondson1234's full-sized avatar
🦑
Tappity tap tap

Mark Edmondson MarkEdmondson1234

🦑
Tappity tap tap
View GitHub Profile
sudo: required
dist: trusty
group: edge
language: ruby
services:
- docker
cache:
@MarkEdmondson1234
MarkEdmondson1234 / job-spec-iihnordic.txt
Last active April 12, 2017 15:34
IIH job description
I am looking for an enthusiastic self-motivated junior data programmer or student to help with my projects.
You are needed to work on an exciting backlog of innovation projects with me and the rest of the team at IIH Nordic.
Ideally you will be knowledgeable in R, Python, JS, Google Cloud and experience working with digital marketing APIs,
but if you only know one of those and are willing to learn that's a good start - that’s how I started.
Please be ready to show some practical experience, thoughts or projects based on the above.
IIH Nordic offers a 4 day workweek and exciting prospects.
Will consider remote or based out of our office in Copenhagen, Denmark.
@MarkEdmondson1234
MarkEdmondson1234 / knit_cloudstorage.rmd
Created April 21, 2017 07:53 — forked from mwhitaker/knit_cloudstorage.rmd
Use googleCloudStorageR to automatically upload to Cloud Storage
---
title: "Host image files on Google Cloud storage"
author: "Michael Whitaker"
date: "January 12, 2017"
output:
html_document:
self_contained: false
---
```{r setup, include=FALSE}
@MarkEdmondson1234
MarkEdmondson1234 / dygraph_plot.r
Last active May 31, 2017 08:53
An example of rendering a Dygraph plot in Shiny
## in server.r
output$null_plot <- renderDygraph({
## don't output anything unless you have the data ready
validate(
need(casualImpactData(), "Model Working")
)
## the data for the plot is in here
ci <- casualImpactData()$series
@MarkEdmondson1234
MarkEdmondson1234 / google_calendar_demo.R
Last active October 2, 2017 23:30
A demo of calling Google Calendar API
library(googleAuthR)
## set scopes for calendar
options(googleAuthR.scopes.selected = "https://www.googleapis.com/auth/calendar.readonly",
googleAuthR.client_id = "XXXX", ## add your Google project client Id
googleAuthR.client_secret = "XXXX") ## add your Google project client secret
## make sure calendar API is activated for your Google Project at below URL:
# https://console.cloud.google.com/apis/api/calendar-json.googleapis.com/overview
@MarkEdmondson1234
MarkEdmondson1234 / global.R
Created December 1, 2017 16:39 — forked from raymondben/global.R
gauth shiny example
library(googleAuthR)
library(shiny)
library(shinyjs)
# devtools::install_github("hrbrmstr/vegalite")
library(vegalite)
library(htmltools)
dat <- jsonlite::fromJSON('[
{"a": "A","b": 28}, {"a": "B","b": 55}, {"a": "C","b": 43},
{"a": "D","b": 91}, {"a": "E","b": 81}, {"a": "F","b": 53},
{"a": "G","b": 19}, {"a": "H","b": 87}, {"a": "I","b": 52}
]')
library("RSiteCatalyst")
library("dplyr")
SCAuth("peter.meyer@xxx.com:xxx", "xxx")
reportSuites <- GetReportSuites()
evar <- GetEvars(reportSuites$rsid) #%>%
# reportSuite <- reportSuites$rsid
@MarkEdmondson1234
MarkEdmondson1234 / month_start_end.R
Created March 9, 2018 10:56
Create month start and end dates for a date range you pass in
add_months <- function(date, n){
seq(date, by = paste (n, "months"), length = 2)[2]
}
make_date_ranges <- function(start, end){
starts <- seq(from = start,
to = Sys.Date()-1 ,
by = "1 month")
@MarkEdmondson1234
MarkEdmondson1234 / massiveCPUonGCE.R
Last active April 22, 2018 23:46
Run massive parallel R jobs cheaply on Google Compute Engine with googleComputeEngineR and future
## see also http://blog.revolutionanalytics.com/2017/06/doazureparallel-updated.html on how to run on Azure
## and cloudyr project for AWS https://github.com/cloudyr/aws.ec2
# now also in docs: https://cloudyr.github.io/googleComputeEngineR/articles/massive-parallel.html
library(googleComputeEngineR)
library(future)
## auto auth to GCE via environment file arguments