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
BALADA - A MAIOR MENTIRA DA TERRA | |
(Relato postado pelo Realista Ermac do Fórum Legado Realista) | |
Já trabalhei como barman e observando bastante a vida dos que estavam do outro lado do balcão, tudo o que já falaram é verdade. | |
Entradas para as mulheres são sempre cortesias. Os homens pagam caro. E não se enganem achando que as mulheres não pagam a entrada, quem paga são os homens. Se a entrada na noite custa R$ 30,00 pra um homem, a verdade é que é R$ 15,00 masculino (a dele). e R$ 15,00 feminino (de alguma menina que entrou "free"). Os donos de bares jamais levam prejuízos e nada é de graça. No bar que eu trabalhava, o dono fazia "descontos" para os amigos, e usava esse argumento. | |
Nos bares sempre tem as bebidas originais bem guardadas, que são destinadas aos Vips. Geralmente os alfa$ ricos chegam, as bebidas de qualidade vão todos para eles, e pegam mulher a rodo. Já os pobres coitados que não são ricos, consomem bebidas falsificadas e não pegam ninguém. | |
Nesses lugares, o que mais vi mandar em tudo é o din |
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
object CollectionUtils { | |
implicit class PairRDDLikeOps[K, V](iterable: Iterable[(K, V)]) { | |
def groupByKey(): List[(K, Iterable[V])] = { | |
iterable | |
.groupBy { case (k, _) => k } | |
.mapValues(_.map { case (_, v) => v }) | |
.toList | |
} | |
def reduceByKey(fn: (V, V) => V): List[(K, V)] = { |
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
object PeriodDirectorActor { | |
// Events received from other actors or generated internally | |
object Events { | |
sealed abstract trait EventType | |
// Public events | |
case class Start(conf: FullConfiguration) extends EventType | |
case object Stop extends EventType | |
// Called by StreamReaders | |
case class ReaderWorkAvailable(work: CartView) extends EventType |
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 scala.collection.mutable | |
object C { | |
case class CSet(s: Set[String]) | |
case class CLis(s: List[String]) | |
case class CVec(s: Vector[String]) | |
case class CSeq(s: Seq[String]) | |
case class CArr(s: Array[String]) | |
} |
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
/* | |
For lines: | |
15/08/23 23:29:02 INFO cluster.SparkDeploySchedulerBackend: Registered executor: Actor[akka.tcp://[email protected]:58026/user/Executor#1085281150] with ID 11 | |
15/08/23 23:29:02 INFO scheduler.TaskSetManager: Starting task 4.0 in stage 0.0 (TID 4, ip-172-24-20-154.ec2.internal, PROCESS_LOCAL, 1314 bytes) | |
15/08/23 23:29:02 INFO scheduler.TaskSetManager: Starting task 5.0 in stage 0.0 (TID 5, ip-172-24-20-154.ec2.internal, PROCESS_LOCAL, 1314 bytes) | |
returns 1314 + 1314 = 2628 | |
Note: this is a simplified example, | |
it won't work for malformed lines or if there are no matching lines |
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
val monthySharkReport = observations | |
.filter(_.family == "Sharks") | |
.map { o => | |
val year = o.observationTimestamp.getYear | |
val month = o.observationTimestamp.getMonthOfYear | |
(year, month) -> o.numAnimals | |
} | |
.reduceByKey(_ + _) | |
.collect() |
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
git clone --recursive https://github.com/chaordic/ignition-template | |
cd ignition-template | |
./sbt tests |
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
============================ | |
O que ESB e SOA são, afinal? | |
============================ | |
A sigla ESB, e outra relacionada - SOA - podem ser uma fonte de confusão. ESB se expande para Enterprise Service Bus. SOA significa Arquitetura Orientada a Serviços. | |
Isso ainda não explica muito por isso damos aqui mais informações em linguagem simples, sem demasiado jargão corporativo. | |
-------------- | |
Toda a verdade |