Skip to content

Instantly share code, notes, and snippets.


Adil Akhter adilakhter

View GitHub Profile
View NaiveParMapN.scala
object Ex11 extends IOApp {
def naiveParMapN[A, B] (io1: IO[A], io2: IO[B]): IO[(A, B)] = {
io1.start.bracket { f1 =>
io2.start.bracket { f2 =>
for {
a <- f1.join
b <- f2.join
} yield (a, b)
adilakhter /
Created Oct 8, 2016 — forked from ikhoon/
Must watch talks - reddit /r/scala
adilakhter / KafkaReadAndWriteExample.scala
Last active Sep 21, 2018
Flink Kafka read and write example
View KafkaReadAndWriteExample.scala
package org.xiaon
import grizzled.slf4j.Logging
import org.apache.flink.api.common.typeinfo.TypeInformation
import org.apache.flink.streaming.api.TimeCharacteristic
import org.apache.flink.streaming.api.functions.sink.SinkFunction
import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment
import org.apache.flink.streaming.connectors.kafka.{FlinkKafkaConsumer011, FlinkKafkaProducer011}
adilakhter / typeclass.scala
Last active Sep 3, 2018
refactoring to typeclass
View typeclass.scala
object typeclass extends App {
// Note: This domain model was given
// Simplified version is as follows:
sealed trait Attribute
case class PageLoad (e: String) extends Attribute
case class AdobeSinkableItem(e: String) extends Attribute
case class WebtrekkSinkableItem(e: Int) extends Attribute
adilakhter / Json.scala
Created Dec 28, 2017 — forked from pchiusano/Json.scala
Simple JSON parser combinator library that does not use zippers
View Json.scala
// WARNING! totally untested, I have only compiled the code! :)
package json
import collection.immutable.Map
import scalaz.{\/, MonadPlus}
import scalaz.\/._
import scalaz.std.vector._
import scalaz.std.list._

Keybase proof

I hereby claim:

  • I am adilakhter on github.
  • I am adilakhter ( on keybase.
  • I have a public key ASD6P7AcPLIIXV4C08q7BvryfkizCfnJejXOlBYaDWDhCAo

To claim this, I am signing this object:

adilakhter / shapeless_example.scala
Last active May 24, 2017
Shapeless : Checking of the Type Constraints of Polymorphic Functions (lifted types)
View shapeless_example.scala
// details:
import shapeless._
import ops.hlist._
import ops.function._
import syntax.std.function._
object ShapelessExample {
case class Place[A](a: A) extends AnyVal
View Source.scala
package test
import scala.collection.mutable
import scala.reflect.ClassTag
* A Source of elements of type [[A]].
* [[Source]] is basically the inverse of
* a `scala.Iterator`: instead of the core functionality being the pull-based
You can’t perform that action at this time.