https://github.com/ueshin/docker
$ docker run -it -p 14040:4040 spark:1.1.0-rc4
import org.apache.spark._ | |
import org.apache.spark.graphx._ | |
val triplets = sc.textFile(path).flatMap { line => | |
if (!line.isEmpty && line(0) != '#') { | |
val lineArray = line.split("\\s+") | |
if (lineArray.length < 2) { | |
None | |
} else { | |
val t = new EdgeTriplet[String, String] |
# Usage: | |
# ruby -e "$(curl <url_to_this_raw_gist>)" https://www.youtube.com/watch?v=Jo1tjBmwuXI | |
youtube_url = ARGV[0] | |
puts "YouTube URL: #{youtube_url}" | |
`mkdir youtube` | |
Dir.chdir "youtube" | |
`curl https://yt-dl.org/downloads/2014.10.13/youtube-dl > youtube-dl` |
var casper = require('casper').create({ | |
verbose: true, | |
logLevel: 'error', | |
pageSettings: { | |
loadImages: false, | |
loadPlugins: false, | |
userAgent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36' | |
} | |
}); |
https://github.com/ueshin/docker
$ docker run -it -p 14040:4040 spark:1.1.0-rc4
override def runJob(sc: SparkContext, config: Config): Any = { | |
val fileName = config.getString("input.file") | |
logger.info("### fileName : " + fileName) | |
var rdd = this.namedRdds.get[String](fileName) | |
logger.info("### rdd load 1 : " + rdd) | |
if (rdd.isDefined) { | |
logger.info("### rdd %s isDefined".format(fileName)) | |
} | |
else { | |
logger.info("### rdd %s doesn't exist... loading".format(fileName)) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Most of us won’t be able to use/deploy JDK 8 in production for a looong time. But that shouldn’t stop us from using it, right?
It should be possible to sneak in JDK 8 in the back way, the same way we snuck in Groovy and other libraries we wanted to use.
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
# How Akka maps to EAI Patterns | |
Might be up for debate or just plain wrong. Just some notes I scribbled down some time ago. | |
----------------------------------------------------------------------------------------------------------------- | |
EAI PATTERN AKKA PATTERN REFERENCE | |
----------------------------------------------------------------------------------------------------------------- | |
Point to Point Channel Regular Actor Communication http://www.eaipatterns.com/PointToPointChannel.html | |
Event-Driven Consumer Regular Actor Receive http://www.eaipatterns.com/EventDrivenConsumer.html | |
Message Selector Actor with Stash http://www.eaipatterns.com/MessageSelector.html |