Skip to content

Instantly share code, notes, and snippets.

Adil Akhter adilakhter

Block or report user

Report or block adilakhter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View haskell_getting_started.md
@adilakhter
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.api.java.utils.ParameterTool
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
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
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.map._
import scalaz.std.list._
View keybase.md

Keybase proof

I hereby claim:

  • I am adilakhter on github.
  • I am adilakhter (https://keybase.io/adilakhter) on keybase.
  • I have a public key ASD6P7AcPLIIXV4C08q7BvryfkizCfnJejXOlBYaDWDhCAo

To claim this, I am signing this object:

@adilakhter
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: https://stackoverflow.com/questions/44159203/shapeless-checking-of-the-type-constraints-of-polymorphic-functions-lifted-ty
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
View haskell_stack_and_intellij_idea_ide_setup_tutorial_how_to_get_started.md

#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.

Basics

  • 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
adilakhter / must-watch-talks.md
Created Oct 8, 2016 — forked from ikhoon/must-watch-talks.md
Must watch talks - reddit /r/scala
View must-watch-talks.md
View freemusic.scala
#!/usr/bin/env amm
load.ivy("org.typelevel" %% "cats" % "0.7.0")
@
import cats.{Id, ~>}
import cats.data.State
import cats.free._
import cats.free.Free._
You can’t perform that action at this time.