Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One-click run #1

Merged
merged 4 commits into from Mar 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions graf.gnu
@@ -0,0 +1,17 @@
set datafile separator ","
set terminal png size 800,600
set output 'plot.png'

set multiplot

unset key

plot 'naiveBayes.csv' u 1:2 w l lw 3, \
'naiveBayesMultinominal.csv' u 1:2 w l lw 3, \
'perceptron.csv'u 1:2 w l lw 3

set key; unset tics; unset border; unset xlabel; unset ylabel

plot [][0:1] 2 title 'NAIVE BAYES' lw 3, \
2 title 'NAIVE BAYES MULTINOMINAL' lw 3, \
2 title 'PERCEPTRON' lw 3
17 changes: 17 additions & 0 deletions grafEps.gnu
@@ -0,0 +1,17 @@
set datafile separator ","
set terminal postscript enhanced eps solid colour "Helvetica" 22
set output 'plot.eps'

set multiplot

unset key

plot 'naiveBayes.csv' u 1:2 w l lw 3, \
'naiveBayesMultinominal.csv' u 1:2 w l lw 3, \
'perceptron.csv'u 1:2 w l lw 3

set key; unset tics; unset border; unset xlabel; unset ylabel

plot [][0:1] 2 title 'NAIVE BAYES' lw 3, \
2 title 'NAIVE BAYES MULTINOMINAL' lw 3, \
2 title 'PERCEPTRON' lw 3
69 changes: 69 additions & 0 deletions pom.xml
@@ -0,0 +1,69 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>storm.dra</groupId>
<artifactId>distributedRedditAnalyser</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Distributed Reddit Analyser</name>
<url>https://github.com/majcn/DistributedRedditAnalyser</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>clojars.org</id>
<url>http://clojars.org/repo</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>storm</groupId>
<artifactId>storm</artifactId>
<version>0.8.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>nz.ac.waikato.cms.weka</groupId>
<artifactId>weka-dev</artifactId>
<version>3.7.7</version>
</dependency>
<dependency>
<groupId>nz.ac.waikato.cms.moa</groupId>
<artifactId>moa</artifactId>
<version>2012.08</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/distributedRedditAnalyser</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass></mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

28 changes: 28 additions & 0 deletions run.sh
@@ -0,0 +1,28 @@
if [ ! -d "storm-0.8.1" ]; then
echo "Downloading storm"
curl https://dl.dropbox.com/u/133901206/storm-0.8.1.zip > /tmp/storm.zip
echo "Download done"
if zipinfo /tmp/storm.zip > /dev/null; then
echo "Unziping storm"
unzip /tmp/storm.zip > /dev/null
echo "Unzip done"
rm /tmp/storm.zip
else
rm /tmp/storm.zip
exit
fi
fi

if [ -d "results" ]; then
mv "results" "results("$(date +%F-%T)")"
fi
mkdir results

rm -rf target
echo "Compiling"
nohup mvn package > results/maven.log 2>&1
cp target/*-jar-with-dependencies.jar results/uberjar.jar
rm -rf target
echo "Compiled. Trying to run"

storm-0.8.1/bin/storm jar results/uberjar.jar distributedRedditAnalyser.Main $@