Skip to content

Instantly share code, notes, and snippets.

Adil Akhter adilakhter

View GitHub Profile
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

#Haskell, Stack and Intellij IDEA IDE setup tutorial how to get started Upon completion you will have a sane, productive Haskell environment adhering to best practices.


  • Haskell is a programming language.
  • Stack is tool for Haskell projects. (similar tools for other languages include Maven, Gradle, npm, RubyGems etc)
  • Intellij IDEA IDE is a popular IDE.

Download and extract Stack

Don't install Haskell, Stack, Cabal or any other Haskell tool or library using your OS package manager or using Cabal.

adilakhter /
Created Oct 8, 2016 — forked from ikhoon/
Must watch talks - reddit /r/scala
View freemusic.scala
#!/usr/bin/env amm
load.ivy("org.typelevel" %% "cats" % "0.7.0")
import cats.{Id, ~>}
You can’t perform that action at this time.