This file contains hidden or 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
package ex64; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.conf.Configured; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.io.IntWritable; | |
import org.apache.hadoop.io.Text; | |
import org.apache.hadoop.mapreduce.Job; | |
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; | |
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; |
This file contains hidden or 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
sibu:u0 1.3140335416894755;sibu:u199,sibu:u10,sibu:u5,sibu:u165,sibu:u115,sibu:u80,sibu:u6,sibu:u116,sibu:u170,sibu:u89,sibu:u26,sibu:u73,sibu:u50,sibu:u68,sibu:u149,sibu:u129,sibu:u137,sibu:u40,sibu:u186,sibu:u110,sibu:u46,sibu:u142,sibu:u84,sibu:u166,sibu:u17,sibu:u145,sibu:u30,sibu:u39,sibu:u37,sibu:u29,sibu:u59,sibu:u180,sibu:u36,sibu:u106,sibu:u172,sibu:u125,sibu:u185,sibu:u107,sibu:u23,sibu:u144,sibu:u63,sibu:u108,sibu:u136,sibu:u24,sibu:u18 | |
sibu:u1 0.856162601347669;sibu:u174,sibu:u158,sibu:u105,sibu:u98,sibu:u100,sibu:u93,sibu:u11,sibu:u192,sibu:u112,sibu:u96,sibu:u180,sibu:u46,sibu:u16,sibu:u97,sibu:u195,sibu:u156,sibu:u199,sibu:u110,sibu:u72,sibu:u6 | |
sibu:u10 1.8135326489523118;sibu:u67,sibu:u83,sibu:u94,sibu:u184,sibu:u170,sibu:u52,sibu:u38,sibu:u166,sibu:u19,sibu:u99,sibu:u82,sibu:u12,sibu:u81,sibu:u25,sibu:u41,sibu:u177,sibu:u157,sibu:u92,sibu:u34,sibu:u7,sibu:u165,sibu:u0,sibu:u116,sibu:u76,sibu:u62,sibu:u103,sibu:u14,sibu:u125,sibu:u190,sibu:u64,sibu:u32,sibu:u149,sibu:u158,sibu:u24,sibu:u192,si |
This file contains hidden or 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
package ex31; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.conf.Configured; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.io.IntWritable; | |
import org.apache.hadoop.io.Text; | |
import org.apache.hadoop.mapreduce.Job; | |
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; | |
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; |
This file contains hidden or 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
/* | |
$input_file = file <'/home/cloudera/Downloads/input/sibdataset200.nt'> | |
$output_file = file | |
*/ | |
REGISTER RDFStorage.jar ; | |
indata = LOAD '$input_file' USING RDFStorage() AS (s,p,o) ; |
This file contains hidden or 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
/* Load additional file */ | |
REGISTER RDFStorage.jar ; | |
/* Load the input file */ | |
/* /home/cloudera/Downloads/input/sibdataset200.nt */ | |
indata = LOAD '$input_file' USING RDFStorage() AS (s,p,o) ; | |
/* Filter that we only have birthdays in our set */ | |
birthday = FILTER indata BY p == 'foaf:birthday'; |
This file contains hidden or 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
\section{Task 1} | |
{ | |
\renewcommand{\arraystretch}{1.4} | |
\begin{table}[!h] | |
\begin{center} | |
\begin{tabular}{|l|p{0.5\textwidth}|} | |
\hline | |
name & Open Window completely \\\hline | |
goal & The user wants to open the window completely \\\hline | |
pre-condition & power is supplied, window is not completely open \\\hline |
This file contains hidden or 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
INSERT OVERWRITE LOCAL DIRECTORY '${hiveconf:output_file}' | |
ROW FORMAT DELIMITED | |
FIELDS TERMINATED BY ',' | |
SELECT hashtag.object, COUNT(*) as amount | |
FROM | |
${hiveconf:table} t1 | |
JOIN | |
${hiveconf:table} t2 | |
ON |
This file contains hidden or 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
# file formatter for csv files | |
import os | |
ctr = 6 | |
cctr = 0 | |
for f in os.listdir('to import'): | |
print 'Processing file %s' % f | |
with open('to import/' + f, 'r') as h: |
This file contains hidden or 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
# file combiner | |
# combines csv files into one | |
import os | |
for f in os.listdir('export'): | |
print 'Processing file %s' % f | |
with open('export/' + f, 'r') as h: | |
filename = str() | |
if f.endswith('electricityrates.csv'): |
This file contains hidden or 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
// | |
// BeaconDetector.h | |
// WMWallet | |
// | |
// Created by Friedrich Ewald on 18.02.16. | |
// Copyright © 2016 fewald. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
@import CoreLocation; |
OlderNewer