Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import groovy.lang.Binding; | |
import groovy.lang.GroovyShell; | |
import org.codehaus.groovy.control.CompilerConfiguration; | |
import org.codehaus.groovy.control.MultipleCompilationErrorsException; | |
import java.io.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Properties; |
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
@Grab('org.apache.spark:spark-core_2.10:1.5.2') | |
import org.apache.spark.SparkConf | |
import org.apache.spark.api.java.JavaSparkContext | |
def conf = new SparkConf().setMaster("local[2]").setAppName("WordCount") | |
println conf | |
def ctx = new JavaSparkContext(conf) |
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
import org.apache.spark.api.java.JavaSparkContext | |
def ctx = new JavaSparkContext("local", "GroovySparkPi") | |
def slices = 1000 | |
def n = 10000 * slices | |
def l = 0..n | |
def dataSet = ctx.parallelize(l, slices) | |
def count = dataSet.map({ | |
def x = Math.random() * 2 - 1 |
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
toggy:incubator-zeppelin tog$ git pull | |
Already up-to-date. | |
toggy:incubator-zeppelin tog$ mvn -e -DskipTests clean package | |
[INFO] Error stacktraces are turned on. | |
[INFO] Scanning for projects... | |
[WARNING] | |
[WARNING] Some problems were encountered while building the effective model for org.apache.zeppelin:zeppelin-spark:jar:0.6.0-incubating-SNAPSHOT | |
[WARNING] 'build.plugins.plugin.version' for org.scala-tools:maven-scala-plugin is missing. @ line 916, column 15 | |
[WARNING] | |
[WARNING] Some problems were encountered while building the effective model for org.apache.zeppelin:zeppelin-flink:jar:0.6.0-incubating-SNAPSHOT |
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
import wordcloud.PolarWordCloud | |
import wordcloud.CollisionMode | |
import wordcloud.PolarBlendMode | |
import wordcloud.bg.CircleBackground | |
import wordcloud.bg.PixelBoundryBackground | |
import wordcloud.bg.RectangleBackground | |
import wordcloud.font.CloudFont | |
import wordcloud.font.FontWeight | |
import wordcloud.font.scale.LinearFontScalar | |
import wordcloud.font.scale.SqrtFontScalar |
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
curl -XPOST "http://localhost:9200/myindex/" | |
curl -XPOST "http://localhost:9200/myindex/travel/_mapping" -d ' | |
{ | |
"travel": { | |
"properties": { | |
"end_date": { | |
"format": "dateOptionalTime", | |
"type": "date" | |
}, |
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
==> Downloading http://www.vtk.org/files/release/5.10/vtk-5.10.1.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/vtk-5.10.1.tar.gz | |
tar xf /Library/Caches/Homebrew/vtk-5.10.1.tar.gz | |
==> Patching | |
/usr/bin/patch -f -p1 -i 000-homebrew.diff | |
patching file Wrapping/Python/setup_install_paths.py | |
brew: Appending to PYTHONPATH: /usr/local/Cellar/vtk/5.10.1/lib/python2.7/site-packages | |
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/vtk/5.10.1 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DVTK_REQUIRED_OBJCXX_FLAGS='' -DVTK_USE_CARBON=OFF -DVTK_USE_TK=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON -DIOKit:FILEPATH=/System/Library/Frameworks/IOKit.framework -DCMAKE_INSTALL_RPATH:STRING=/usr/local/Cellar/vtk/5.10.1/lib/vtk-5.10 -DCMAKE_INSTALL_NAME_DIR:STRING=/usr/local/Cellar/vtk/5.10.1/lib/vtk-5.10 -DBUILD_EXAMPLES=OFF -DVTK_USE_GUISUPPORT=ON -DVTK_USE_QT=ON -DVTK_USE_QVTK=ON -DVTK_USE_COCOA=ON -DVTK_WRAP_PYTHON=ON -DPYTHON_INCLUDE_DIR='/System/Library/Frameworks/Python.framework/Versions/2.7/Head |
NewerOlder