Group leader:
- Building Spark app.
- Not in production.
- Wants to know more about how people are building apps.
- Currently runs jobs by hand using Spark EC2 scripts. What else is available?
import akka.actor._ | |
import akka.pattern.ask | |
import akka.routing._ | |
import akka.util.Timeout | |
import scala.concurrent._ | |
import scala.concurrent.duration._ | |
import scala.concurrent.ExecutionContext.Implicits.global | |
object Speaker { | |
case class EventuallySay(phrase: String) |
import scala.language.experimental.macros | |
import scala.reflect.macros.blackbox.Context | |
object PrintForMacros { | |
def printFor[A](expr: A): A = | |
macro PrintForMacros.printForMacro[A] | |
} | |
class PrintForMacros(val c: Context) { | |
import c.universe._ |
macro di { | |
case { | |
_(function ($args (,) ...) { | |
$body... | |
}) | |
} => { | |
letstx $names... = _.map( | |
#{ $args... }, | |
function(ident) { | |
return makeValue(ident.token.value, ident); |
trait DatabaseLayer { | |
def dependency: Int | |
} | |
trait ConcreteDatabaseLayer extends DatabaseLayer { | |
def dependency: Int = 100 | |
} | |
trait DatabaseResource1 { | |
this: DatabaseLayer => |
sealed trait PhpValue { | |
def \(field: PhpValue): Seq[PhpValue] = Seq.empty[PhpValue] | |
def \\(field: PhpValue): Seq[PhpValue] = Seq.empty[PhpValue] | |
} | |
sealed trait PhpArrayLike extends PhpValue { | |
def fields: Map[PhpValue, PhpValue] | |
override def \(field: PhpValue): Seq[PhpValue] = | |
fields.toSeq.collect { |
#!/usr/bin/env bash | |
git checkout master | |
git branch -D nohistory | |
for branch in `git branch | cut -c2-` | |
do | |
echo "========== $branch ==========" | |
git checkout $branch | |
git branch -D nohistory |
lazy val chat = project.in(file(".")).enablePlugins(PlayScala) | |
scalaVersion in chat := "2.11.4" | |
libraryDependencies in chat ++= Seq( | |
jdbc, | |
anorm, | |
"org.postgresql" % "postgresql" % "9.3-1101-jdbc4", | |
"org.webjars" % "bootstrap" % "3.0.2", | |
"org.scalatestplus" %% "play" % "1.2.0" % "test" |
def userId(username: String): Option[Int] = | |
Some(1) | |
def mostRecentOrderId(userId: Int): Option[Int] = | |
Some(2) | |
def orderCost(orderId: Int): Option[Int] = | |
Some(3) | |
def mostRecentOrderCost(username: String): Option[Int] = |
scalaVersion := "2.11.2" | |
resolvers += "Underscore Training" at "https://dl.bintray.com/underscoreio/training" | |
libraryDependencies += "underscoreio" %% "doodle" % "0.1.0" | |
initialCommands in console := """ | |
|import doodle.core._ | |
|import doodle.syntax._ | |
|import doodle.jvm._ |