Skip to content

Instantly share code, notes, and snippets.

View yeondudad's full-sized avatar

HyunTae Kim yeondudad

View GitHub Profile
@scari
scari / aws_latency.md
Last active November 25, 2020 04:02
AWS Latency

Disclaimer

This is not an official report nor reliable benchmark. The testing environments are vary. These EC2 latencies are measured by http://aws-latency.altaircp.com/ Thanks to my friends!

If you want to add a result from your location, feel free to comment on this gist. Please note that you need to try it several times to get an accurate result.

Seoul, Korea

Asia Pacific (Seoul)	ap-northeast-2	19ms
Asia Pacific (Tokyo)	ap-northeast-1	92ms
@hgfischer
hgfischer / benchmark+go+nginx.md
Last active April 11, 2024 22:09
Benchmarking Nginx with Go

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI
@thom-nic
thom-nic / ImageDownloader.java
Last active December 26, 2015 05:19
Enhanced Android image downloader with persistent local cache based on a hash of the image URL. Cached files are automatically expired based on last access time. First revision shows the original source from http://goo.gl/zUxFD6 so it's clear what I've added.
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@sloria
sloria / bobp-python.md
Last active July 7, 2024 18:13
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
#-*- coding:utf-8 - *-
def load_dataset():
"Load the sample dataset."
return [[1, 3, 4], [2, 3, 5], [1, 2, 3, 5], [2, 5]]
def createC1(dataset):
"Create a list of candidate item sets of size one."