Skip to content

Instantly share code, notes, and snippets.

View andyczerwonka's full-sized avatar

Andy Czerwonka andyczerwonka

View GitHub Profile
import io.fury.Fury
import io.fury.config.Language
import org.junit.Test
import org.scalatest.Assertions._
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.util.Base64
import java.util.zip.GZIPInputStream
import java.util.zip.GZIPOutputStream
import scala.util.Try
/**
* Type-safe UUID wrapper that encodes the type it relates to. This class explicitly hides its
* UUID value to prevent converting it between types.
*/
class UUID[A] private(private val uuid: UUID.Raw) {
override def toString = uuid.toString
}
<!DOCTYPE html>
<html lang="en-us">
<head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<title>Picking Up the Camera with a Gallery</title>
import java.io.{InputStream, OutputStream}
import com.amazonaws.services.lambda.runtime.{Context, RequestStreamHandler}
import com.softwaremill.sttp._
import io.circe.Json
import io.circe.generic.auto._
import io.circe.parser._
import io.circe.syntax._
class JiraDiscord extends RequestStreamHandler with Helpers {
override def handleRequest(input: InputStream, output: OutputStream, context: Context): Unit = {
val logger = context.getLogger
@andyczerwonka
andyczerwonka / TransformationTest.scala
Last active December 15, 2020 19:43
Chimney Coproduct Case
import io.scalaland.chimney.dsl._
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.matchers.should.Matchers
class TransformationTest extends AnyFunSuite with Matchers {
sealed trait A extends Product with Serializable
object A {
case class Foo(s: String) extends A
case class Bar(kvs: Map[String, Int]) extends A
@andyczerwonka
andyczerwonka / BusinessRuleThoughts.scala
Created June 13, 2020 14:25
Discussion around an API that could collect failures and success
package io.citrine.orion.core.domain
import io.citrine.testing.BaseUnitTest
import scala.collection.mutable.ListBuffer
class BusinessRuleTest extends BaseUnitTest {
trait StatusInfo {
def write(msg: String)
@andyczerwonka
andyczerwonka / solver.py
Created July 19, 2018 22:27
Errors with the submit process
import subprocess
def solve_it(input_data):
cmd = "java -jar ./anyint-scala/target/scala-2.12/anyint.jar " + input_data
p = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True)

Keybase proof

I hereby claim:

  • I am andyczerwonka on github.
  • I am andyczerwonka (https://keybase.io/andyczerwonka) on keybase.
  • I have a public key whose fingerprint is EFC2 5E51 4624 1F09 9816 4206 8E6B 8028 281F 91B1

To claim this, I am signing this object:

@andyczerwonka
andyczerwonka / R_Github_Api.R
Created January 20, 2018 13:59 — forked from mGalarnyk/R_Github_Api.R
Reading Data From GitHub API Using R. This code was originally for the John Hopkins Data Science Specialization. Blog on it https://medium.com/@GalarnykMichael/accessing-data-from-github-api-using-r-3633fb62cb08#.toufbbjgd
#install.packages("jsonlite")
library(jsonlite)
#install.packages("httpuv")
library(httpuv)
#install.packages("httr")
library(httr)
# Can be github, linkedin etc depending on application
oauth_endpoints("github")

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets