Skip to content

Instantly share code, notes, and snippets.

View shimizukawa's full-sized avatar

Takayuki SHIMIZUKAWA shimizukawa

View GitHub Profile
@shimizukawa
shimizukawa / pythonstartup.py
Created November 8, 2011 14:39
PYTHONSTARTUP
# -*- encoding: utf-8 -*-
try:
import pyreadline.rlmain
#pyreadline.rlmain.config_path=r"c:\xxx\pyreadlineconfig.ini"
import readline,atexit
import pyreadline.unicode_helper
#
#
#Normally the codepage for pyreadline is set to be sys.stdout.encoding
#if you need to change this uncomment the following line
@shimizukawa
shimizukawa / 27out.txt
Created November 9, 2011 08:39
virtualenvでsys.stdout.encodingが狂う
None
cp932
今日は
@shimizukawa
shimizukawa / hg-2-0-1_win32_pager.py
Created December 9, 2011 15:39
Mercurial HG 2.0.1 PagerExtension for Win32
# pager.py - display output using a pager
#
# Copyright 2008 David Soria Parra <dsp@php.net>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
#
# To load the extension, add it to your configuration file:
#
# [extension]
@shimizukawa
shimizukawa / buildout.cfg
Created December 14, 2011 11:07
sphinx japanese patch ver
[buildout]
parts = app docutils
extensions = gp.vcsdevelop
vcs-extend-develop = hg+http://bitbucket.org/uchida/sphinx/@tip#egg=sphinx
vcs-update = true
[app]
recipe = z3c.recipe.scripts
eggs =
[ui]
username = Takayuki SHIMIZUKAWA
merge = winmergeu
editor = "C:\Program Files\vim72\vim.exe"
[tortoisehg]
vdiff = winmergeu
tabwidth = 4
editor = C:\Program Files\vim72\gvim.exe
@shimizukawa
shimizukawa / requirements.txt
Last active November 19, 2016 08:43
create self signed ssl pem file
pyopenssl
twisted
cherrypy
service_identity
@shimizukawa
shimizukawa / console
Created January 18, 2012 00:04
エキPy読書会2nd #3 スクリーン
>>> a = range(10)
>>> import itertools
>>> b, c = itertools.tee(a)
>>> a2 = iter(a)
>>> b, c = itertools.tee(a2)
>>> next(b)
0
>>> next(b)
1
>>> next(b)
@shimizukawa
shimizukawa / base64-hello.py
Created February 16, 2012 06:36
Pythonコードを任意のエンコーディングに変換。#がコメント行として扱われるエンコーディングなら動作する。
#coding: base64
aW1wb3J0IHN5cwpzeXMuc3Rkb3V0LndyaXRlKCJIYXJ1byBXb3JsZCFcbiIpCg==
@shimizukawa
shimizukawa / .vimrc
Created March 8, 2012 07:14
vim settings for reStructuredText indentation
syntax on
filetype plugin indent on
@shimizukawa
shimizukawa / gist:2028865
Created March 13, 2012 13:48
エキPy読書会2nd #4 スクリーン
$ python
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> int
<type 'int'>
>>> type(10)
<type 'int'>
>>> dir(10)
['__abs__', '__add__', '__and__', '__class__', '__cmp__', '__coerce__', '__delattr__',