Skip to content

Instantly share code, notes, and snippets.

@Schnouki
Schnouki / movmd.py
Created January 12, 2011 00:57
A small metadata parser for MP4 containers, designed to edit dates saved by digital cameras on .mov videos.
#!/usr/bin/env python3
# -*- mode: python -*-
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law. You can redistribute it and/or modify it under
# the terms of the Do What The Fuck You Want To Public License, Version 2, as
# published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
# details.
# Some useful resources:
@andreisavu
andreisavu / cassandra-on-ec2.sh
Created January 18, 2012 12:57
Deploying Cassandra on EC2 with Whirr
# Cassandra on EC2 using Apache Whirr trunk (18 January 2012)
# Clone the repo from the Apache servers
git clone git://git.apache.org/whirr.git
cd whirr
# build binary artefacts on your machine
mvn clean install
@emaxerrno
emaxerrno / Working.java
Created February 16, 2012 19:43
Working full example of a working composite type for row keys.
import java.util.Arrays;
import me.prettyprint.cassandra.model.HColumnImpl;
import me.prettyprint.cassandra.serializers.CompositeSerializer;
import me.prettyprint.cassandra.serializers.StringSerializer;
import me.prettyprint.cassandra.utils.TimeUUIDUtils;
import me.prettyprint.hector.api.Cluster;
import me.prettyprint.hector.api.Keyspace;
import me.prettyprint.hector.api.beans.Composite;
import me.prettyprint.hector.api.ddl.ColumnFamilyDefinition;
@mugenen
mugenen / wn.py
Created March 4, 2012 11:48 — forked from yanbe/wn.py
A frontend of WordNet-Ja database file (sqlite3 format) which is available on http://nlpwww.nict.go.jp/wn-ja/
#!/usr/bin/env python
# encoding: utf-8
import sys
import sqlite3
from collections import namedtuple
conn = sqlite3.connect("wnjpn.db")
Word = namedtuple('Word', 'wordid lang lemma pron pos')
@j5ik2o
j5ik2o / gist:2156447
Created March 22, 2012 05:41
Play framework 2.0でデーモン化する方法

commons-daemonの依存関係を追加する

次のようにproject/Build.scala を編集する。

object ApplicationBuild extends Build {
    // ...
    val appDependencies = Seq(
      "commons-daemon" % "commons-daemon" % "1.0.10"
    )

// ...

@matope
matope / NoSQLデータモデリング技法.markdown
Created April 16, 2012 03:35
NoSQLデータモデリング技法

#NoSQLデータモデリング技法

原文:NoSQL Data Modeling Techniques « Highly Scalable Blog

I translated this article for study. contact matope[dot]ono[gmail] if any problem.

NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。

本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う

@7shi
7shi / xml7shi.py
Created June 30, 2012 02:00
Pythonの簡易XMLパーサとC++高速版
# public domain
from StringIO import *
def replaces(s, args):
for key, value in args.iteritems():
s = s.replace(key, value)
return s
def from_entity(s):
return replaces(s, {
@voluntas
voluntas / gist:73efe2f36ac1513c02a8
Created August 5, 2012 16:13
レビューのススメ?

レビューのススメ?

typo 死ぬほど多いので突っ込みまってます

バージョン:0.2.3
作者:@voluntas

考え方はコロコロ変わるタイプなのですが、最近はレビューが実はとても大事でとにもかくにもレビューなのでは?と思い始めてきています。

@neubig
neubig / string-rewriting-kernel.py
Created September 10, 2012 02:41
An example implementation of the String Rewriting Kernel in python
#!/usr/bin/python
# A python implementation of the string rewriting kernel
# by Graham Neubig
#
# Reference:
# Fan Bu, Hang Li, Xiaoyan Zhu. "String Rewriting Kernel". ACL 2012
# http://aclweb.org/anthology-new/P/P12/P12-1047.pdf
from math import factorial
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)