This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sphinx version: 1.1.2 | |
# Python version: 2.6.6 | |
# Docutils version: 0.8.1 release | |
# Jinja2 version: 2.5.5 | |
Traceback (most recent call last): | |
File "***/lib/python2.6/site-packages/Sphinx-1.1.2-py2.6.egg/sphinx/cmdline.py", line 189, in main | |
app.build(force_all, filenames) | |
File "***/lib/python2.6/site-packages/Sphinx-1.1.2-py2.6.egg/sphinx/application.py", line 204, in build | |
self.builder.build_update() | |
File "***/lib/python2.6/site-packages/Sphinx-1.1.2-py2.6.egg/sphinx/builders/__init__.py", line 196, in build_update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import os | |
import re | |
import csv | |
import urllib | |
from StringIO import StringIO | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ui] | |
username = Nozomu Kaneko <nozom.kaneko@gmail.com> | |
merge = internal:merge | |
[extensions] | |
graphlog = | |
mq = | |
color = | |
rebase = | |
transplant = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
======================================== | |
In defense of zope libraries 翻訳 | |
======================================== | |
Pyramid が Zope ライブラリを使っていることについての非常に長い defence | |
---------------------------------------------------------------------- | |
freenode の #pyramid IRC チャンネルで、以下のような質問に私は | |
うんざりするほど多くの時間を割いてきた。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
from mako.template import Template | |
from mako.lookup import TemplateLookup | |
def generate_source_mako(): | |
with open("source.mako", "w") as w: | |
w.write(""" | |
<div id="header"> | |
<%block name="header"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import sqrt, floor | |
__all__ = ['is_prime', 'Prime'] | |
class Prime(object): | |
def __init__(self): | |
self._primes = [2, 3, 5] | |
def is_prime(self, n): | |
if n < 2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
formail -c -x Date | python -c 'import sys, datetime; from rfc822 import parsedate; print datetime.datetime(*parsedate(sys.stdin.readline())[:6])' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: mmap.h | |
=================================================================== | |
--- mmap.h (リビジョン 16) | |
+++ mmap.h (作業コピー) | |
@@ -112,7 +112,11 @@ | |
CHECK_CLOSE_FALSE(false) << "unknown open mode:" << filename; | |
} | |
- hFile = CreateFile(filename, mode1, FILE_SHARE_READ, 0, | |
+ size_t len = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to get a remote branch on my local git repository: | |
$ git checkout origin/branch-1 | |
$ git checkout -b branch-1 | |
Or, is it a better way? | |
$ git checkout --track -b branch-1 origin/branch-1 | |
How to add an upstream repository and get it: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/include/kytea/general-io.h b/src/include/kytea/general-io.h | |
index bf167cc..c1caadf 100644 | |
--- a/src/include/kytea/general-io.h | |
+++ b/src/include/kytea/general-io.h | |
@@ -101,7 +101,7 @@ public: | |
void openFile(const char* file, bool out, bool bin) { | |
std::fstream::openmode mode = (out?std::fstream::out:std::fstream::in); | |
- if(bin) out = out | std::fstream::binary; | |
+ if(bin) mode = mode | std::fstream::binary; |