• Gamma code

    http://borame.cs.pusan.ac.kr/ai_home/lecture/MG/mg03.ppt (그렇다.. 또 managing gigabytes란 책이다. 대체 저 책에 안나온건 뭐란 말인가..) Inverted Index등에서 Compression으로 사용할 수 있는 인코딩 방법에 대한 설명. 먼저 Variable Length로 어떤 수를 저장하는 가장 간단한 방법은 1을 0, 2를 10, 3을 110, 4를 1110, 5를 11110, … 과 같이 1의 갯수를 사용해 어떤 수를 표현하는 것이다. 그러나 이 인코딩 방법은…

    Tags:

  • Computing Jaccard index with random permutation

    Jaccard index에 대한 언급은 여기에서 앞서서 했음. Jaccard Index는 두개 셋간의 유사성을 계산하므로.. 예를들면 두 집합(bag of words라던가)간의 유사성 평가에 사용할 수 있음. 아래는 http://en.wikipedia.org/wiki/Locality-sensitive_hashing 에서 퍼온 내용. (ACM Communication에도 실려있음.) Suppose is composed of subsets of some ground set of enumerable items and the similarity function of interest is the [[Jaccard index| Jaccard index]]…

    Tags:

  • ipod touch 참 재밌는 물건이군요…

    이건 openssh 띄우고 putty로 접속한 모습입니다. 그러게 bsd subsystem 이라든지, 뭐 python이라든지 이런게 있더니만 그대로 mac os x를 접속가능하군요… 이정도라면 이것저것 참 많이 해볼 수 있을거 같군요… 가령 귀찮은 기능을 개선하는 apps를 개발하던가같이.. 하지만 일단은 apple이 2월에 어떤 sdk를 내놓을지 기다려봐야할 듯.

    Tags:

  • EPIC 2015

    What will happen in year 2015?

    Tags:

  • 맥북 Air, 살빼라 노트북!

    Tags:

  • Never use find and rm in your crontab.

    http://seclists.org/bugtraq/1996/May/0046.html 예를들어, 는 /tmp/etc/passwd로 링크를 건 파일하나 생성하는 것으로 /etc/passwd를 삭제하는데 악용될 수 있다.

    Tags:

  • Column oriented database

    Column oriented database 위키외에 어디선가 본 이야기는 다음과 같습니다. 요즘 시대엔 row하나에도 attribute가 정말 많은 데다가, 조인이 예전처럼 한두개도 아니고 10여개까지 발생한다. 그러면 그에 맞게 join 을 편하게 하면서, 압축도 잘 되고, 뭔가 denormalization 한것같으면서도 normalization의 구조를 유지하면 좋지 않겠느냐.. 하는 것.

    Tags:

  • Factorization

    어떤수 x가 Prime인지 확인하는 방법: 1. Trial Division: sqrt(x) 까지의 모든 prime으로 나눠본다. 2. Sieve of Erathosthenes: x뿐만 아니라 x+1, x+2, … x+n과 같이 연속된 정수의 경우에 좋은 방법. 2부터 시작해서 2의 배수를 지움, 남은 수에서 가장 작은 odd number 남기고 그 배수를 지우는 것의 반복. 3. Wheel Factorization: 몇개의 prime number를 취한다. 예를들면 2와…

    Tags:

  • Tanimoto coefficient

    http://en.wikipedia.org/wiki/Jaccard_index Jaccard index(Jaccard similarity coefficient)는 샘플 셋간의 유사성 측정. 두개의 셋 A, B가 있다고하면, 다음과 같이 정의. A와 B가 binary attribute를 가진 object에 대한 벡터라면 다음과 같이 정해짐. 여기서 은 A가 n, B가 m을 가진 attribute의 개수. 주의할점은 는 분모에 포함 안된다는 거.. Tanimoto Coffecient는 Jaccard 의 continuous, count attribute를 위한 확장으로, binary attribute에 적용하면…

    Tags:

  • Scope Guard idiom

    Transactional Programming More C++ Idioms/Scope Guard 예외가 발생했을 때 자동 원상 복구가 가능할까… 아래는 ScopeGuard idiom. #include #include using namespace std; class ScopeGuard { char *mem; bool dismissed; public: ScopeGuard(char *m):mem(m), dismissed(false) { } ~ScopeGuard() { if (!dismissed) { cout

    Tags: