This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE IF NOT EXISTS `movies`; | |
USE `movies`; | |
CREATE TABLE IF NOT EXISTS `movies` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`title` varchar(255) NOT NULL DEFAULT '', | |
`year` int(11) unsigned, | |
PRIMARY KEY (`id`), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
'movieId', | |
'movieTitle', | |
'movieYear', | |
'genreName', | |
'imdbId', | |
'tmdbId', | |
'rating', | |
'ratingTimestamp', | |
'ratingUserId' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Running spark from the command line | |
// | |
// Built with scala 2.11: | |
// mvn -Pyarn -Phadoop-2.4 -Dscala-2.11 -DskipTests clean package | |
// in /Users/mrcsparker/Downloads/spark-1.4.1 | |
// | |
// scala -classpath ~/Downloads/spark-1.4.1/assembly/target/scala-2.11/spark-assembly-1.4.1-hadoop2.6.0.jar pi.scala 1000 | |
import org.apache.spark._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
println(args.mkString(" ")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// This was Modified from a function at http://en.wikipedia.org/wiki/Hexavigesimal | |
// Pass in the base 26 string, get back integer | |
var fromBase26 = function (number) { | |
"use strict"; | |
number = number.toUpperCase(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// based on https://github.com/mrjgreen/xhr/blob/master/xhr.js | |
var xhr = function($q) { | |
var x = function() { | |
try { | |
return new XMLHttpRequest(); | |
} catch (e) {} | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
require 'bencode' | |
require 'securerandom' | |
module Loader | |
class NRepl | |
def self.connect(server, port) | |
new(server, port) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Brewfile | |
# `brew bundle` | |
install openssl | |
install emacs | |
install node | |
install unrar | |
install leiningen | |
install readline | |
install ruby-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedWriter; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.sql.*; | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
import java.util.Calendar; | |
import java.util.HashMap; | |
class TeradataDump { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Sample = (function (Sample) { | |
"use strict"; | |
var SampleColumn = (function () { | |
var SampleColumn = {}; | |
SampleColumn.parseColumns = function () { | |
var columns = [], |