Skip to content

Instantly share code, notes, and snippets.

View dennypenta's full-sized avatar
:shipit:

Denis Dvornikov dennypenta

:shipit:
  • Berlin, Germany
  • 09:15 (UTC +02:00)
View GitHub Profile
from aiohttp.test_utils import unittest_run_loop
from main import Model, new_manager
import asyncio
import unittest
class ManagerTestCase(unittest.TestCase):
def setUp(self):
type Model struct {
value []byte
}
func (m *Model) UnmarshalJSON(v []byte) error {
m.value = v
return nil
}
@dennypenta
dennypenta / marshal_custom_key.go
Created February 28, 2020 07:17
Example provides use case marshalling map with custom key as a structure to json
package main
import (
"encoding"
"encoding/json"
"fmt"
)
type key struct {
this string
package com.dennypenta.meme_keker
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.HttpRequest
import akka.http.scaladsl.model.HttpResponse
import scala.concurrent.Future
import scala.util.{Failure, Success}
name := "meme_keker"
version := "0.1"
scalaVersion := "2.13.1"
libraryDependencies += "com.typesafe.akka" % "akka-actor_2.13" % "2.5.23"
libraryDependencies += "com.typesafe.akka" % "akka-http_2.13" % "10.1.8"
libraryDependencies += "com.typesafe.akka" %% "akka-stream" % "2.6.3"