This is reStructuredText, a simple lighteight markup language that is readable in source form.
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
package net.twonky.demo; | |
import java.util.HashMap; // Always import fully qualified packages | |
import java.util.Map; // The imports should be sorted alphabetically | |
// import third party classes here, e.g. import oracle.jdbc.pool.OracleConnectionCacheImpl; | |
// import you own classes here, e.g. import net.twonky.demo.StringUtil; | |
/** |
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 org.apache.hadoop.conf.Configuration; | |
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.Mapper; | |
import org.apache.hadoop.mapreduce.Reducer; | |
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; | |
import org.apache.hadoop.mapreduce.lib.map.TokenCounterMapper; | |
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; |
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.IOException; | |
import org.apache.hadoop.conf.Configuration; | |
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.Mapper; | |
import org.apache.hadoop.mapreduce.Reducer; | |
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; |
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
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
my $current_word = ""; | |
my $current_count = 0; | |
while (<>) { | |
chomp; |
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
package My::Hadoop::WordCount; | |
use Any::Moose qw(Role); | |
sub map { | |
my ($self, $line) = @_; | |
$self->emit(lc $_ => 1) foreach split /[\s.,:;!?]+/, $line; | |
} | |
sub reduce { |
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
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
while (<>) { | |
chomp; | |
print lc $_,"\t1\n" foreach split /[\s.,:;!?]+/; | |
} |
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
#!/usr/bin/perl -I./lib.jar | |
use My::Hadoop::WordCount; | |
My::Hadoop::WordCount::Mapper->run(); |
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
#!/usr/bin/perl -I./lib.jar | |
use My::Hadoop::WordCount; | |
My::Hadoop::WordCount::Reducer->run(); |
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
; Move Windows by holding Alt and clicking (and holding) the left mouse button anywhere in the window. | |
; You'll need http://www.autohotkey.com to use this script | |
LAlt & LButton:: | |
CoordMode, Mouse ; Switch to screen/absolute coordinates. | |
MouseGetPos, EWD_MouseStartX, EWD_MouseStartY, EWD_MouseWin | |
WinGetPos, EWD_OriginalPosX, EWD_OriginalPosY,,, ahk_id %EWD_MouseWin% | |
WinGet, EWD_WinState, MinMax, ahk_id %EWD_MouseWin% | |
if EWD_WinState = 0 ; Only if the window isn't maximized | |
SetTimer, EWD_WatchMouse, 10 ; Track the mouse as the user drags it. |