This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.charset.StandardCharsets._ | |
import akka.{Done, NotUsed} | |
import akka.actor.ActorSystem | |
import akka.http.scaladsl.Http.HostConnectionPool | |
import akka.http.scaladsl._ | |
import akka.http.scaladsl.model.{HttpRequest, HttpResponse} | |
import akka.stream.ActorMaterializer | |
import akka.stream.scaladsl.{Flow, Sink, Source} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cats.data.Coproduct | |
import cats.free.{Free, Inject} | |
import cats.{Id, ~>} | |
// See [[http://underscore.io/blog/posts/2017/03/29/free-inject.html]] | |
sealed trait FOp[A] | |
object FOp { | |
case object One extends FOp[Int] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Gettable<A> { | |
fn run(&self) -> A; | |
} | |
#[derive(Debug)] | |
struct Request { | |
a: String, | |
} | |
#[derive(Debug)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sandbox | |
import java.time.Instant | |
import java.time.format.{DateTimeFormatter, DateTimeFormatterBuilder} | |
import java.util.concurrent._ | |
import cats.instances.future._ | |
import cats.syntax.cartesian._ | |
import monix.eval.{Callback, Task} | |
import monix.execution.{Ack, Cancelable, Scheduler} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import gzip | |
from itertools import islice | |
class FileSpliter: | |
def __init__(self, from_file, to_file_prefix): | |
self.from_file = from_file | |
self.to_file_prefix = to_file_prefix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%{ | |
package main | |
import ( | |
"text/scanner" | |
"strconv" | |
"strings" | |
"fmt" | |
) | |
type Expression interface{} | |
type ParenExpr struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.ByteBuffer | |
import java.util.concurrent.TimeUnit | |
import org.openjdk.jmh.annotations._ | |
@State(Scope.Thread) | |
@BenchmarkMode(Array(Mode.Throughput)) | |
@Warmup(iterations = 10, time = 1) | |
@Measurement(iterations = 10, time = 1) | |
@OutputTimeUnit(TimeUnit.SECONDS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::cell::RefCell; | |
use std::io; | |
use std::io::ErrorKind; | |
use std::io::Write; | |
use std::net::TcpStream; | |
use std::thread; | |
use std::time::Duration; | |
fn main() { | |
let mut writer = ReconnectableWriter::connect("127.0.0.1:24224".to_string()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"compress/gzip" | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"jmhVersion" : "1.21", | |
"benchmark" : "bench.Case1.decodeArgonaut", | |
"mode" : "thrpt", | |
"threads" : 1, | |
"forks" : 2, | |
"jvm" : "/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/bin/java", | |
"jvmArgs" : [ | |
"-XX:+UseG1GC", |