Skip to content

Instantly share code, notes, and snippets.

View sublee's full-sized avatar
✔️
Hello, world!

Heungsub Lee sublee

✔️
Hello, world!
View GitHub Profile
@playpauseandstop
playpauseandstop / CouchBase
Created October 26, 2012 09:30
CouchBase vs. Memcached vs. Redis vs. Redis Pipelined
$ DRIVER=couchbase THREADS=10 make benchmark
env/bin/python ./benchmark.py
324 operations completed in 2.1607 s
2256 operations completed in 10.7558 s
1068 operations completed in 5.7570 s
2037 operations completed in 9.5393 s
2493 operations completed in 11.0871 s
2910 operations completed in 12.1000 s
2961 operations completed in 12.1318 s
2193 operations completed in 10.3703 s
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@npinto
npinto / cv2_detect.py
Created September 5, 2012 07:13
Simple face detection with OpenCV 'cv2' python bindings from 2.4.x
import cv2
import cv2.cv as cv
def detect(img, cascade_fn='haarcascades/haarcascade_frontalface_alt.xml',
scaleFactor=1.3, minNeighbors=4, minSize=(20, 20),
flags=cv.CV_HAAR_SCALE_IMAGE):
cascade = cv2.CascadeClassifier(cascade_fn)
rects = cascade.detectMultiScale(img, scaleFactor=scaleFactor,
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 8, 2024 17:28
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jboner
jboner / latency.txt
Last active June 8, 2024 14:56
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 12, 2024 15:28 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@alotaiba
alotaiba / google_speech2text.md
Created February 3, 2012 13:20
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English

@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@jongyeol
jongyeol / gmail sender
Created January 5, 2011 21:33
Sample code to send mail with GMail by smtp, python
#!/usr/bin/python
# coding: utf-8
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
import email.Charset
GMAIL_ID = '??????@gmail.com'
GMAIL_PW = 'password'
@jongyeol
jongyeol / gist:745809
Created December 17, 2010 22:18
어떤 수 구하기 (Python) by jong10
# problem: http://club.filltong.net/codingdojo/27611
# coded by jong10
import unittest
# infix to prefix(s-expression)
# modified from http://news.ycombinator.com/item?id=284954
def parse(s):
for operator in ["+-", "*/"]:
depth = 0