Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages
| { | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "## Importing Packages" | |
| ] | |
| }, | |
| { |
| # -*- coding: utf-8 -*- | |
| """ | |
| LICENSE: BSD (same as pandas) | |
| example use of pandas with oracle mysql postgresql sqlite | |
| - updated 9/18/2012 with better column name handling; couple of bug fixes. | |
| - used ~20 times for various ETL jobs. Mostly MySQL, but some Oracle. | |
| to do: | |
| save/restore index (how to check table existence? just do select count(*)?), | |
| finish odbc, |
| # go to 'https://developers.facebook.com/tools/explorer' to get your access token | |
| access_token <- "******************* INPUT YOUR ACCESS TOKEN ******************************" | |
| require(RCurl) | |
| require(rjson) | |
| # Facebook json function copied from original (Romain Francois) post | |
| facebook <- function( path = "me", access_token, options){ | |
| if( !missing(options) ){ | |
| options <- sprintf( "?%s", paste( names(options), "=", unlist(options), collapse = "&", sep = "" ) ) |
| # Requirements | |
| #sudo apt-get install libcurl4-gnutls-dev # for RCurl on linux | |
| #install.packages('RCurl') | |
| #install.packages('RJSONIO') | |
| library('RCurl') | |
| library('RJSONIO') | |
| query <- function(querystring) { | |
| h = basicTextGatherer() |
Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages