http://jerluc.com/files/hadoop-in-a-box.tgz
tar xf hadoop-in-a-box.tgz
date | team_1 | team_1_score | team_2 | team_2_score | |
---|---|---|---|---|---|
2014-06-12 | Brazil | 3 | Croatia | 1 | |
2014-06-13 | Mexico | 1 | Cameroon | 0 | |
2014-06-17 | Brazil | 0 | Mexico | 0 | |
2014-06-18 | Cameroon | 0 | Croatia | 4 | |
2014-06-23 | Cameroon | 1 | Brazil | 4 | |
2014-06-23 | Croatia | 1 | Mexico | 3 | |
2014-06-13 | Spain | 1 | Netherlands | 5 | |
2014-06-13 | Chile | 3 | Australia | 1 | |
2014-06-18 | Spain | 0 | Chile | 2 |
package my.cool.app; | |
import android.content.Context; | |
import com.urx.android.AndroidClient; | |
import com.urx.android.resolve.AndroidResolver; | |
import com.urx.core.ClientConfig; | |
import com.urx.core.resolution.UriResolve; | |
public class Resolve { |
def turtle(name, num): | |
for n in range(num): | |
if n < num-1: | |
print(name + ",") | |
else: | |
print(name) | |
turtle("Lacey Leeder", 10) |
public class ExactMatchPOC { | |
private static final String TOKEN_DELIMITER = " "; | |
private static final String PHRASE_DELIMITER = ","; | |
public static void main(String[] args) { | |
String[] phraseTokens = buildTokenHashArray(args[0]); | |
String[][] labelTokens = buildMultiTokenHashArray(args[1]); | |
int i; |
import com.twitter.scalding._ | |
import scala.util.matching.Regex | |
class BrandRecommandation(args : Args) extends Job(args) { | |
val brandData = Tsv(args("input"), ('userId, 'brandId, 'interactions)) | |
val brandIncidence = brandData.groupBy('brandId) { _.size } rename { 'size -> 'brandIncidence } | |
val brandDataWithIncidence = brandData.joinWithSmaller('brandId -> 'brandId, brandIncidence) |
hello { | |
// Create our simple function | |
sum(a, b) => a + b | |
// Create a function to defer the computation | |
deferredSum(a, b) => => sum(a, b) | |
// Bind the evaluation of the computation in "myThread" to variable "a" | |
a := deferredSum(10, 20) @ myThread | |
// Print out the value once it's available | |
print(a) | |
} |
import util.Random | |
object Markov extends App { | |
// Just some long plain-text sources from Project Gutenberg | |
val sherlockHolmes = "http://www.gutenberg.org/cache/epub/1661/pg1661.txt" | |
val kingJamesBible = "http://www.gutenberg.org/cache/epub/10/pg10.txt" |
http://jerluc.com/files/hadoop-in-a-box.tgz
tar xf hadoop-in-a-box.tgz
By now, you should have the following prerequisites installed and configured on your machine:
$JAVA_HOME
is set)After successful installation, you should be setup for running:
/* | |
Copyright 2012 Viktor Klang | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |