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/MeCab.py b/MeCab.py | |
index d24acba..a85d135 100644 | |
--- a/MeCab.py | |
+++ b/MeCab.py | |
@@ -226,7 +226,6 @@ class Lattice(_object): | |
def feature_constraint(self, *args): return _MeCab.Lattice_feature_constraint(self, *args) | |
def set_boundary_constraint(self, *args): return _MeCab.Lattice_set_boundary_constraint(self, *args) | |
def set_feature_constraint(self, *args): return _MeCab.Lattice_set_feature_constraint(self, *args) | |
- def set_result(self, *args): return _MeCab.Lattice_set_result(self, *args) | |
def what(self): return _MeCab.Lattice_what(self) |
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
import fileinput | |
import re | |
import sys | |
``` | |
eg. [東京]{とうきょう} -> <ruby>東京<rp>(</rp><rt>とうきょう</rt><rp>)</rp></ruby> | |
``` | |
for line in fileinput.input(sys.argv[1:], inplace=True): | |
line = re.sub(r'\[(.*?)\]\{(.*?)\}', r'<ruby>\1<rp>(</rp><rt>\2</rt><rp>)</rp></ruby>', line.rstrip()) | |
print(line) |
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
アイデア(19)、アイディア(1) | |
アクセサ(8)、アクセッサ(1) | |
アドレスファミリ(16)、アドレスファミリー(3) | |
アプリケーションコード(5)、アプリケーション・コード(1) | |
アポストロフィ(2)、アポストロフィー(1) | |
アンインストーラー(2)、アンインストーラ(1) | |
アンダフロー(2)、アンダーフロー(1) | |
アーカイバ(4)、アーカイバー(2) | |
アーカイブメンバ(6)、アーカイブメンバー(3) | |
イベントハンドラ(4)、イベント・ハンドラ(1) |
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
# Requirements: | |
# - Win7 or Win8.1 x64, 64-bit Python | |
# - pywinauto 0.5.2+ | |
# - UAC is fully disabled | |
from __future__ import print_function | |
import pywinauto | |
pywinauto.Application().Start(r'explorer.exe') | |
explorer = pywinauto.Application().Connect(path='explorer.exe') |
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
# Requirements: | |
# - Win7 or Win8.1 x64, 64-bit Python | |
# - pywinauto 0.5.2+ | |
# - 7z920-x64.msi is in the same folder as the script | |
# - UAC is fully disabled | |
from __future__ import print_function | |
import sys, os | |
os.chdir(os.path.join(os.getcwd(), os.path.dirname(sys.argv[0]))) | |
import pywinauto |
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
// | |
def kana_to_romaji(text): | |
dict={ | |
u'あ':'a',u'い':'i',u'う':'u',u'え':'e',u'お':'o', | |
u'か':'ka',u'き':'ki',u'く':'ku',u'け':'ke',u'こ':'ko', | |
u'さ':'sa',u'し':'si',u'す':'su',u'せ':'se',u'そ':'so', | |
u'た':'ta',u'ち':'ti',u'つ':'tu',u'て':'te',u'と':'to', |
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
## {{{ http://code.activestate.com/recipes/577654/ (r1) | |
#!/usr/bin/env python | |
# Send DDE Execute command to running program | |
import time | |
from ctypes import POINTER, WINFUNCTYPE, c_char_p, c_void_p, c_int, c_ulong, c_char_p | |
from ctypes.wintypes import BOOL, DWORD, BYTE, INT, LPCWSTR, UINT, ULONG | |
# DECLARE_HANDLE(name) typedef void *name; | |
HCONV = c_void_p # = DECLARE_HANDLE(HCONV) | |
HDDEDATA = c_void_p # = DECLARE_HANDLE(HDDEDATA) |
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
import MySQLdb.cursors | |
from twisted.enterprise import adbapi | |
from scrapy.xlib.pydispatch import dispatcher | |
from scrapy import signals | |
from scrapy.utils.project import get_project_settings | |
from scrapy import log | |
SETTINGS = get_project_settings() |
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
package com.itextpdf; | |
import com.itextpdf.text.Rectangle; | |
import com.itextpdf.text.pdf.PdfArray; | |
import com.itextpdf.text.pdf.PdfDictionary; | |
import com.itextpdf.text.pdf.PdfName; | |
import com.itextpdf.text.pdf.PdfReader; | |
import com.itextpdf.text.pdf.PdfString; | |
import com.itextpdf.text.pdf.parser.FilteredTextRenderListener; | |
import com.itextpdf.text.pdf.parser.LocationTextExtractionStrategy; |
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/python2 | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2011 Sebastian Wiesner <[email protected]> | |
# Modifications by Charl Botha <[email protected]> | |
# * customWidgets support (registerCustomWidget() causes segfault in | |
# pyside 1.1.2 on Ubuntu 12.04 x86_64) | |
# * workingDirectory support in loadUi | |
# found this here: | |
# https://github.com/lunaryorn/snippets/blob/master/qt4/designer/pyside_dynamic.py |
OlderNewer