Skip to content

Instantly share code, notes, and snippets.

View TiwaryAyush's full-sized avatar

Ayush Tiwari TiwaryAyush

  • Noida, India
View GitHub Profile
/**
* CRUD
**/
def put(employee : Employee) : Future[Option[Either[DynamoReadError, Employee]]] =
ScanamoAlpakka.put[Employee](client)(TableName)(employee)
def get(name : String, id : Long) : Future[Option[Either[DynamoReadError, Employee]]] =
ScanamoAlpakka.get[Employee](client)(TableName)('name -> name and 'id -> id)
@TiwaryAyush
TiwaryAyush / dataset.txt
Created September 19, 2017 18:26
Dataset Description
Dataset Description
Column1: Movie ID,
Column2: Movie name,
Column3: Year of release,
Column4: Rating of the movie,
Column5: Movie duration in seconds
We can't make this file beautiful and searchable because it's too large.
1,The Nightmare Before Christmas,1993,3.9,4568
2,The Mummy,1932,3.5,4388
3,Orphans of the Storm,1921,3.2,9062
4,The Object of Beauty,1991,2.8,6150
5,Night Tide,1963,2.8,5126
6,One Magic Christmas,1985,3.8,5333
7,Muriel's Wedding,1994,3.5,6323
8,Mother's Boys,1994,3.4,5733
9,Nosferatu: Original Version,1929,3.5,5651
10,Nick of Time,1995,3.4,5333
@TiwaryAyush
TiwaryAyush / ImplicitSenderTest.scala
Created August 14, 2017 09:25 — forked from mguillermin/ImplicitSenderTest.scala
Sample showing basic usage of Akka TestKit and TestActorRef
package sample.akka.testkit
import akka.actor.ActorSystem
import akka.actor.Actor
import akka.testkit.{TestKit, TestActorRef}
import org.scalatest.matchers.MustMatchers
import org.scalatest.WordSpec
class ImplicitSenderTest extends TestKit(ActorSystem("testSystem"))
// Using the ImplicitSender trait will automatically set `testActor` as the sender