Skip to content

Instantly share code, notes, and snippets.

View arthurwuhoo's full-sized avatar

Arthur Wu arthurwuhoo

  • Dataland
View GitHub Profile
We can't make this file beautiful and searchable because it's too large.
1|Customer#000000001|IVhzIApeRb ot,c,E|15|25-989-741-2988|711.56|BUILDING|to the even, regular platelets. regular, ironic epitaphs nag e
2|Customer#000000002|XSTf4,NCwDVaWNe6tEgvwfmRchLXak|13|23-768-687-3665|121.65|AUTOMOBILE|l accounts. blithely ironic theodolites integrate boldly: caref
3|Customer#000000003|MG9kdTD2WBHm|1|11-719-748-3364|7498.12|AUTOMOBILE| deposits eat slyly ironic, even instructions. express foxes detect slyly. blithely even accounts abov
4|Customer#000000004|XxVSJsLAGtn|4|14-128-190-5944|2866.83|MACHINERY| requests. final, regular ideas sleep final accou
5|Customer#000000005|KvpyuHCplrB84WgAiGV6sYpZq7Tj|3|13-750-942-6364|794.47|HOUSEHOLD|n accounts will have to unwind. foxes cajole accor
6|Customer#000000006|sKZz0CsnMD7mp4Xd0YrBvx,LREYKUWAh yVn|20|30-114-968-4951|7638.57|AUTOMOBILE|tions. even deposits boost according to the slyly bold packages. final accounts cajole requests. furious
7|Customer#000000007|TcGe5gaZNgVePxU5kRrvXBfkasDTea|18|28-190-982-9759|9561.95|AUTOMOBILE|ainst the iron
// ----------------------------------------------------------------------------
// 🚨 STEP 1. 🚨
// Change 'Test' to the name of your table.
let table = base.getTable('Test');
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// 🚨 STEP 2: 🚨
// Change the following url to your Zapier webhook.
// To get a Zapier webhook, click the below link, then choose "Catch Hook" as the trigger event
@arthurwuhoo
arthurwuhoo / gist:ee3a61533ef05253b763b04da2062b09
Last active July 6, 2016 10:04
iXperience Data Science Session 2
[
{
"name": "Andrew Collier",
"birth": "1972-06-16",
"gender": "Male",
"family": ["Claire", "Elizabeth"],
"siblings": 1,
"github": "DataWookie",
"twitter": "@DataWookie",
"favourites": {
# =====================================================================================================================
# TEXT MINING EXERCISES
# =====================================================================================================================
# GRAB SOME TEXT DATA -------------------------------------------------------------------------------------------------
library(rplos)
# Use plosabstract() to query PLoS and gather abstracts relating to a topic of your choice.
# =====================================================================================================================
# VISUALISATION EXERCISES
# =====================================================================================================================
# We'll be using the baseball data from the corrgram package.
# Exercise 1 ----------------------------------------------------------------------------------------------------------
# 1. Install corrgram if necessary.
# 2. Load the library.
# =====================================================================================================================
# REGULAR EXPRESSION EXERCISES
# =====================================================================================================================
# Exercise 1 ----------------------------------------------------------------------------------------------------------
# Match both "manhood" and "hoola hoop" but not "wahoo".
grepl("hoo.+$", c("manhood", "hoola hoop", "wahoo"))
library(readr)
odds <- read_csv("https://www.dropbox.com/s/qmymoyj6jl0owvf/horse-racing.csv?dl=1")
head(odds)
odds$Odds = sapply(odds$Odds, function(ratio) eval(parse(text = ratio)))
# HORSE TABLE ---------------------------------------------------------------------------------------------------------
-- To source this file in a SQLite session run
--
-- sqlite> .read <filename>
-- ==========================================================================================================
-- SETUP
-- ==========================================================================================================
-- Most databases will have FOREIGN KEY support enabled by default. Not so with SQLite.
--
#----------------------------------------------------------------
# Day 1: Programming in R
#----------------------------------------------------------------
# 1) Write a function to calculate Body Mass Index (BMI).
#----------------------------------------------------------------
#height in kg, height in m
bmi <- function(height, weight) {
x <- height/(weight^2)
return(x)
@arthurwuhoo
arthurwuhoo / gist:d60d0eaaf357785ae9eaf7d424e09055
Last active June 23, 2016 06:30
iXperience Data Science S1
[
{
"name": "Connor",
"surname": "Lawless",
"birth": "October 6th, 1996",
"gender": "male",
"nationality": "Canadian",
"favoriteMovie": "Grand Budapest Hotel",
"middlename": "Aram"
},