Skip to content

Instantly share code, notes, and snippets.

require 'csv'
require 'json'
require 'pp'
i = 0
features = []
start_line = []
end_line = []
## Loop through each row of the data
## Code for subsetting and formatting open paths data for Mapbox
## Miles Grimshaw
## December 26th 2013
## Set working directory and load required packages
getwd()
setwd("~/Dropbox/Personal/Mapbox/OpenPaths/")
library(stringr)
library(lubridate)
# library(ggplot2)
library(stringr)
library(lubridate)
library(ggplot2)
library(scales)
getwd()
setwd("~/Desktop/Personal_Projects/Immersion/")
i <- read.csv("./immersion.csv", header=TRUE, as.is=TRUE)
## Only get those emails that I sent
@milesgrimshaw
milesgrimshaw / inbox_count
Created September 25, 2014 15:33
Google Apps Script to save the count of emails in your inbox
function processInbox() {
// get all threads in inbox
var threads = GmailApp.getInboxThreads();
data_id = '1t70IDdWcaJzCIIaNWm2nHSPKzetHfTxhkKc9jKkAlpA'
var dataSs = SpreadsheetApp.openById(data_id);
var sheet = dataSs.getSheets()[0];
var current_date = new Date();
sheet.appendRow([current_date, current_date.toISOString(),threads.length]);
};
@milesgrimshaw
milesgrimshaw / gist:8941929
Created February 11, 2014 19:13
Analysis of personal Evernote notes archive
# Load packages
library(ggplot2)
library(lubridate)
library(stringr)
library(scales)
# Set the working directory
getwd()
setwd("~/Dropbox/Personal/Projects/Evernote_Analysis/files/")
@milesgrimshaw
milesgrimshaw / tech_reading.md
Last active August 19, 2021 19:07
Startup Reading