Skip to content

Instantly share code, notes, and snippets.

@olga-gorun
olga-gorun / bulk.py
Created June 4, 2018 15:48
mxnet - docker performance results
import argparse, os, cv2
import mxnet as mx, numpy as np
from collections import namedtuple
IMAGE_SIZE=224
def resize_min(img, msize = 224):
old_size = img.shape[:2] # old_size is in (height, width) format
ratio = float(msize)/max(old_size)
@olga-gorun
olga-gorun / akka-http: 2.4.11
Last active October 8, 2016 18:08
spray and akka-http performance decreased on static response length change
package com.anyclip.benchmark_akka_http
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.server.Route
import akka.stream.scaladsl.Sink
import akka.http.scaladsl.server.Directives._
import akka.stream.ActorMaterializer
import com.anyclip.openrtb.BidRequest
import com.typesafe.config.{Config, ConfigFactory}
Configuration:
spray.can {
server {
idle-timeout = 5 s
request-timeout = 85 ms
timeout-timeout = 5 ms
pipelining-limit = 1
}
}