Skip to content

Instantly share code, notes, and snippets.


Anton Parkhomenko chuwy

View GitHub Profile
chuwy / iglu-violation.json
Created Mar 18, 2019
Iglu Client error format
View iglu-violation.json
"anyOf": [
"description": "Resolution error - schema could not be found on specified repositories, defined by ResolutionError ADT in Iglu Client",
"properties": {
"repositories": {
"description": "Defined by LookupHistory ADT in Iglu Client",
"properties": {
"name": {
"type": "string",
chuwy / BreakReferentialTransparency.scala
Created Mar 1, 2018
Interleaving lazy and eager evaluation to break referential transparency
View BreakReferentialTransparency.scala
import cats._
import cats.implicits._
import cats.effect._
import cats.effect.implicits._
object Db {
private val cache = collection.mutable.Map.empty[String, String]
def expensiveIO(input: String): IO[String] =
IO { Thread.sleep(1000); println("Executed expensive action"); input ++ input }
chuwy / diff_hosted_repo.txt
Created Feb 12, 2018
diff -r hosted repo
View diff_hosted_repo.txt
Only in hosted: com.admo-analytics
Only in hosted: com.adxtracking
Only in hosted: com.angelrush
Only in hosted: com.calltracks
Only in hosted: com.certivox
Only in repo: com.convertro
Only in hosted: com.duproprio
Only in hosted: com.duproprio_comfree
Only in hosted: com.findly
Only in hosted: com.finerylondon

Keybase proof

I hereby claim:

  • I am chuwy on github.
  • I am chuwy ( on keybase.
  • I have a public key ASC4yihj3aD9BK2glw6wm-sUNqbq9Qj8uWYJMcb3KhGjrQo

To claim this, I am signing this object:

chuwy / Validator.scala
Created Feb 23, 2017
Json Schema Validator
View Validator.scala
package jsonschemavalidator
import scala.language.implicitConversions
import cats.syntax.either._
import cats.syntax.semigroup._
import cats.syntax.semigroupk._
import cats.syntax.validated._
import cats.instances.all._
chuwy / interval.scala
Created Feb 4, 2017
Simple FS2 interval implementation
View interval.scala
import fs2._
import scala.concurrent.duration._
* Stream of signals with pauses
object Interval {
private implicit val strategy = Strategy.fromFixedDaemonPool(3)
private implicit val scheduler = Scheduler.fromFixedDaemonPool(3)
chuwy /
Last active Apr 4, 2016
Webserver printing headers
#!/usr/bin/env python
Webserver printing headers
import SimpleHTTPServer
import SocketServer
import logging
import sys
chuwy /
Last active Mar 1, 2016
Script for looking unmentioned commits
#!/usr/bin/env python3
Script for looking unmentioned commits in milesone comparing with specified PR
Usage: user password company/repository milestone_pattern pull_id
import sys
import itertools
import re
View akka-fail.log
java.util.concurrent.TimeoutException: Futures timed out after [3 seconds]
java.util.concurrent.TimeoutException: Futures timed out after [3 seconds]
java.util.concurrent.TimeoutException: Futures timed out after [3 seconds]
View akka-fail.scala
import akka.http.scaladsl.Http
import akka.http.scaladsl.model._
import{ Sink, Source, Flow }
import com.typesafe.config.ConfigFactory
import scala.concurrent.{ Future, Await, ExecutionContext }
import scala.concurrent.duration._