次のようにproject/Build.scala を編集する。
object ApplicationBuild extends Build {
// ...
val appDependencies = Seq(
"commons-daemon" % "commons-daemon" % "1.0.10"
)
// ...
#!/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: |
# 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 |
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; |
#!/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') |
#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に感謝したいと思う
# 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, { |
#!/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 |