Skip to content

Instantly share code, notes, and snippets.

View shimizukawa's full-sized avatar

Takayuki SHIMIZUKAWA shimizukawa

View GitHub Profile
sample.py:6: undefined name 'h'
sample.py:9: undefined name 'z'
@shimizukawa
shimizukawa / extractword.py
Last active June 6, 2023 02:59 — forked from yono/extractword.py
MeCabの出力結果を基に接頭辞や接尾辞を連結する。fork元のコードと機能は同じ。リファクタリングしました。
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import re
from collections import OrderedDict #python2.7 or later
import MeCab
class DetermineDescriptor(object):
@shimizukawa
shimizukawa / PIL_build.rst
Last active June 26, 2016 14:32 — forked from adrianer/PIL_build.rst
PIL(Pillow) build on Windows (32bit & 64bit)

PIL(Pillow) build on Windows (32bit & 64bit)

If you want to build PIL on Windows, you need to prepare few external libraries. Although some libraries did not provide static library for windows 32/64 bits then you need to build these libraries by your hand too. Also, PIL will load by python at last then you are recommended to use same compiler with python to build libraries.

Target PIL and versions

Pillow:1.7.8 for Python 2.7: src
# -*- mode: ruby -*-
# vi: set ft=ruby :
require "./fabric_provisioner.rb"
Vagrant::Config.run do |config|
# snip
config.vm.provision Vagrant::Provisioners::Fabric do |fab|
@shimizukawa
shimizukawa / conf.py
Created September 13, 2012 23:52 — forked from tk0miya/conf.py
Define original roles and styles in Sphinx docs
sys.path += ['.']
extensions += ['sphinxcontrib_roles']
# configuration case.1: define roles as list (define only roles)
roles = ['strike', 'red']
# configuration case.2: define roles as dict (define roles and its style on HTML)
roles = {'strike': "text-decoration: line-through;",
'red': "color: red;" }