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
#たぶんTkinter.py ってファイルがあって | |
class Tk(): | |
def __init__(self): | |
# なんとかかんとか | |
#外部からはTkinter.Tk Tkオブジェクトにアクセスできます | |
#オブジェクト指向の知識が必要ですね | |
#pythonは引数なしだと関数そのものをコピーしてしまいます。 | |
#たとえば 対話型インタプリタで |
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
path=( /usr/local/bin $path) | |
path=( /opt/local/bin $path) | |
path=( /opt/local/sbin $path) | |
path=( /usr/local/android/tools $path) | |
echo $PATH | |
for file in `find ./ -name "mod*.txt" -print` | |
do | |
echo $file |
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 | |
#-*- encoding:utf-8 -*- | |
#====== options ============= | |
#Oauth用認証トークン 各自取得 | |
ckey = "" | |
csecret = "" | |
atoken ="" | |
atoken_secret = "" | |
#============================ |
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 | |
#-*- encoding:utf-8 -*- | |
__author__="mizchi" | |
""" | |
要: pytyrant | |
KVSのTokyoTytrantを、dict(またはjson)をスキーマにして扱います | |
実際はヘッダーのprefix_searchと末尾のIDによるマッピングのキーバリューです |
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 | |
#-*- encoding:utf-8 -*- | |
from pytyrant import PyTyrant | |
class TScheme(object) : | |
VALUE_MAP={"str":str,"int":int} | |
def __init__(self,scheme,header=""): | |
scheme["++unique++"]="int" | |
self.__scheme = scheme | |
self.quantity = 0 | |
self.header=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
package main | |
import "fmt" | |
//interface | |
type AllowedMethods interface{ | |
produce() | |
set(s string) | |
} | |
func produce(inf AllowedMethods){ inf.produce() } | |
func set(inf AllowedMethods,s string){ inf.set(s) } |
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
;; elisp | |
;;auto-install | |
(require 'auto-install) | |
(setq auto-install-directory "~/.emacs.d/elisp/") | |
;;undo | |
;; (require 'undohist) | |
;; (undohist-initialize) |
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
(setq rcirc-server-alist '( | |
("irc.media.kyoto-u.ac.jp" :channels ("#twitter" "#twitter2" )) | |
;; ("opentig.net" :channels ("console")) | |
)) | |
(setq rcirc-log-flag t) | |
(set-face-foreground 'rcirc-my-nick "red" nil) | |
(dolist (rcirc-face (remove-if-not | |
(lambda (elt) (equal (cadr elt) 'custom-face)) | |
(get 'rcirc-faces 'custom-group))) | |
(set-face-font (car rcirc-face) "verdana-10")) |
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/env python | |
# -*- coding:utf-8 -*- | |
import sys | |
sys.path.append('./gen-py') | |
from thrift import Thrift | |
from thrift.transport import TTransport | |
from thrift.transport import TSocket | |
from thrift.protocol.TBinaryProtocol import TBinaryProtocolAccelerated | |
from cassandra import Cassandra |
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 | |
# -*- encoding:utf-8 -*- | |
from sys import argv | |
import os | |
from lazyboy import * | |
from lazyboy.key import Key | |
class PostKey(Key): | |
def __init__(self, key=None): |