See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
package service | |
import java.time.LocalDate | |
import akka.NotUsed | |
import akka.stream.Attributes.LogLevels | |
import akka.stream.alpakka.csv.scaladsl.{CsvFormatting, CsvQuotingStyle} | |
import akka.stream.alpakka.s3.scaladsl.S3 | |
import akka.stream.alpakka.s3.{ListBucketResultContents, MultipartUploadResult} | |
import akka.stream.scaladsl.{Sink, Source} |
def broadcast() = { | |
// source with list, list element contains[(String, Int)] | |
val langs: List[(String, Int)] = List(("Scala", 5), ("Golang", 8), ("Haskell", 7), ("Erlang", 5)) | |
val source = Source(langs) | |
// two flows | |
// 1. to extract name from list element[(String, Int)] | |
// 2. to extract rate from list element[(String, Int)] | |
val nameFlow = Flow[(String, Int)].map(_._1) | |
val rateFlow = Flow[(String, Int)].map(_._2) |
I have improved and packaged the ideas in this gist here:
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x
import java.io.File | |
import akka.http.javadsl.model.headers.ContentDisposition | |
import akka.http.scaladsl.Http | |
import akka.http.scaladsl.client.RequestBuilding | |
import akka.http.scaladsl.model.{HttpResponse, Uri} | |
import akka.stream.scaladsl._ | |
import akka.stream.{Graph, Materializer, SinkShape} | |
import akka.util.ByteString |
package org.apache.mahout.examples | |
import org.apache.mahout.drivers._ | |
import org.apache.mahout.math.cf.SimilarityAnalysis | |
object RecommenderDriver extends MahoutDriver { | |
/** | |
* @param args Command line args, if empty a help message is printed. | |
*/ | |
override def main(args: Array[String]): Unit = { |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"