Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
'''
See also:
- Scrapy: framework
- lxml (faster parsing)
- BeautifulSoup: broken HTML
- html5lib
- xpath (alt. to CSS selectors)
To the Citizens of Seoul,
I am not a citizen of your city, but I write you today out of urgency and dire concern for the future of your city’s education system.
My name is Candy Koh, once known as Hee Kyung Koh (고희경) during my residence in South Korea from the year 1991 to 1998. I am the first of two children between Yooah Park and Seung Duk Koh, a candidate for Seoul’s Superintendent of Education in the current elections. When his candidacy came to my attention recently, I could not, in good conscience, stay silent as his child. Seoul’s citizens deserve know the truth about the person they may be choosing to represent and be in charge of Seoul’s education system: Seung Duk Koh never partook in the education of his own children.
I was born in Cambridge, Massachusetts in 1987 while my mother and Koh were still married. After my brother was born in New Jersey in 1991, we all moved to Korea. I have next to no memories of his being present to teach me or my brother anything, even when I was old enough to have s
# tmux config by Cheol Kang (kang@cheol.net)
# Set copy-mode as vi mode
set-window-option -g mode-keys vi
# Re-bind split-window
bind s split-window -v # horizontal
bind v split-window -h # vertical
# Re-bind select-pane
@cornchz
cornchz / clipimage.js
Created September 19, 2011 02:47
clipImage
/**
* Clip images, given as jQuery objects.
* @param img_obj jQuery Object
*/
window.clipImage = (function() {
return function (img_obj) {
function setViewport(img, x, y, width, height) {
img.style.left = "-" + parseInt(x) + 'px';
img.style.top = "-" + parseInt(y) + 'px';
img.style.width = width === 'auto' ? width : parseInt(width) + 'px';
@cornchz
cornchz / helloworld.py
Created April 16, 2012 12:21
GA version "Hello World!" in Python
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from itertools import izip
from random import randint
from random import random as rand
GA_POPSIZE = 2048
GA_MAXITER = 16384
GA_ELITERATE = 0.1
#!/usr/bin/
# -*- encoding:utf-8 -*-
from itertools import count, islice, takewhile, imap
import time
def primes1(candidates = count(2)):
# Pick a prime and yield.
prime = candidates.next()
yield prime
@cornchz
cornchz / generator_inside_with.md
Created April 25, 2012 07:29
return generator inside a with statement

generator에 대한 뭔가를 쓰다가 발견했다.

만들고 싶었던 함수는 이거.

def readlines(filename):
    with open(filename, 'r') as f:
        for line in f:
            yield line

print ''.join(readlines('test.txt'))

  1. 인상깊게 읽은 컴퓨터 관련 도서, 블로그 글 또는 에세이 등이 있다면 무엇인지, 그리고 어떤 면에서 인상이 깊었는지를 총 세 가지 이상의 대상(예컨대 책 두 권, 블로그 글 하나, 혹은 책 세 권 등)에 대해 적으시오.
  2. 주로 보는 블로그, 잡지, 커뮤니티 사이트나 뉴스 사이트가 있다면 무엇인지, 그리고 그걸 주로 보는 이유를 적으시오.
  3. IT 쪽에서 자신에게 큰 영향을 준 사람(프로그래머 등)의 이름(복수 가능)과 그 사람에게서 본인은 어떤 영향을 받았는지 간단히 적으시오.
  4. 읽어 본 코드나 사용해 본 라이브러리, 프로그램 중에서 프로그래머로서의 성장에 도움이 된 경우가 있다면, 그것의 명칭과 이유를 적으시오.
  5. 본인이 자기 자신, 친구, 가족 등 가까운 사람을 위해서 만들었고 지금도 사용하는 프로그램이 있다면 어떤 것인지 적으시오.
  6. 자신이 개발한 프로그램 중에 실제 사용자가 만족해서 좋은 피드백을 받았던 경우가 있다면 어떤 프로그램인지 그리고 구체적으로 어떤 피드백이었는지 적으시오.
  7. 프로그래밍 외의 다른 관심사와 프로그래밍을 연계해서 해본 프로젝트가 있다면 그에 대해 설명하시오. (예컨대 별자리에 관심이 있어서 관련 프로그램을 만들어 봤다던지)
  8. 후배나 주변 사람에게 프로그래밍을 가르친 일이 있다면 어떤 상황에서 무엇을 가르쳤는지 적으시오. (발표 자료나 교육 자료의 URL이 있으면 함께 적으시오 -- 웹 공간이 필요하다면 http://www.slideshare.net 에 올리고 URL을 보내면 됩니다)
  9. 팀으로 개발할 때 수동적인 멤버를 적극적으로 만들기 위한 시도를 해 본 적이 있다면 구체적으로 어떤 시도를 했는지, 그리고 어떤 결과가 있었는지, 또 어떤 교훈을 얻었는지 적으시오.
  10. 작년이나 올해 새롭게 공부한 프로그래밍 언어, 프레임워크, 소프트웨어 기술 등이 있다면 무엇인지 적으시오.
@cornchz
cornchz / usage.md
Last active December 11, 2015 18:28
ucat() {
cat $@ | native2ascii -encoding UTF-8 -reverse
}
uhead() {
head $@ | native2ascii -encoding UTF-8 -reverse
}
@cornchz
cornchz / README.md
Created February 23, 2013 11:27 — forked from teampopong/README.md

서로 다른 stance에 서서 토론하는 것을 시각적으로 잘 표현한 댓글 시스템을 만들려는 시도.
첫 프로토타입으로 나왔으나 관심을 못 받아서 묻힘-_-;