Skip to content

Instantly share code, notes, and snippets.

🦑
Tappity tap tap

Mark MarkEdmondson1234

🦑
Tappity tap tap
Block or report user

Report or block MarkEdmondson1234

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View AWS-furrr.R
# This example demonstrates running furrr code distributed on 2 AWS instances ("nodes").
# The instances have already been created.
library(future)
library(furrr)
# Two t2.micro AWS instances
# Created from http://www.louisaslett.com/RStudio_AMI/
public_ip <- c("34.205.155.182", "34.201.26.217")
@MarkEdmondson1234
MarkEdmondson1234 / month_start_end.R
Created Mar 9, 2018
Create month start and end dates for a date range you pass in
View month_start_end.R
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")
View AdobeAnalytics-GovernanceExport.R
library("RSiteCatalyst")
library("dplyr")
SCAuth("peter.meyer@xxx.com:xxx", "xxx")
reportSuites <- GetReportSuites()
evar <- GetEvars(reportSuites$rsid) #%>%
# reportSuite <- reportSuites$rsid
@MarkEdmondson1234
MarkEdmondson1234 / global.R
Created Dec 1, 2017 — forked from raymondben/global.R
gauth shiny example
View global.R
library(googleAuthR)
library(shiny)
library(shinyjs)
@MarkEdmondson1234
MarkEdmondson1234 / google_calendar_demo.R
Last active Oct 2, 2017
A demo of calling Google Calendar API
View google_calendar_demo.R
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 / app.R
Last active Nov 13, 2018 — forked from jcheng5/app.R
Using OAuth2 with Shiny
View app.R
library(shiny)
# WARNING: This sketch does not make proper use of the "state" parameter.
# Doing so usually involves using cookies, which can be done with the
# Rook package but I have not done that here. If you choose to use this
# approach in production, please check the state parameter properly!
APP_URL <- if (interactive()) {
# This might be useful for local development. If not, just hardcode APP_URL
# to the deployed URL that you'll provide a few lines below.
@MarkEdmondson1234
MarkEdmondson1234 / massiveCPUonGCE.R
Last active Apr 22, 2018
Run massive parallel R jobs cheaply on Google Compute Engine with googleComputeEngineR and future
View massiveCPUonGCE.R
## 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
@MarkEdmondson1234
MarkEdmondson1234 / knit_cloudstorage.rmd
Created Apr 21, 2017 — forked from mwhitaker/knit_cloudstorage.rmd
Use googleCloudStorageR to automatically upload to Cloud Storage
View knit_cloudstorage.rmd
---
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}
View job-spec-iihnordic.txt
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 / google-natural-language-js-sample.htlml
Last active Jun 5, 2019
Authenticate to Google Natural Language API via client side javascript
View google-natural-language-js-sample.htlml
<html>
<head>
<script src="https://apis.google.com/js/api.js"></script>
<script>
function start() {
gapi.client.init({
'apiKey': 'XXXX',
'discoveryDocs': ['https://language.googleapis.com/$discovery/rest?version=v1beta1']
}).then(function() {
return gapi.client.language.documents.analyzeSentiment({
You can’t perform that action at this time.