Skip to content

Instantly share code, notes, and snippets.

#たぶんTkinter.py ってファイルがあって
class Tk():
def __init__(self):
# なんとかかんとか
#外部からはTkinter.Tk Tkオブジェクトにアクセスできます
#オブジェクト指向の知識が必要ですね
#pythonは引数なしだと関数そのものをコピーしてしまいます。
#たとえば 対話型インタプリタで
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
#/usr/bin/python
#-*- encoding:utf-8 -*-
#====== options =============
#Oauth用認証トークン 各自取得
ckey = ""
csecret = ""
atoken =""
atoken_secret = ""
#============================
#!/usr/bin/python
#-*- encoding:utf-8 -*-
__author__="mizchi"
"""
要: pytyrant
KVSのTokyoTytrantを、dict(またはjson)をスキーマにして扱います
実際はヘッダーのprefix_searchと末尾のIDによるマッピングのキーバリューです
#/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+":"
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) }
;; elisp
;;auto-install
(require 'auto-install)
(setq auto-install-directory "~/.emacs.d/elisp/")
;;undo
;; (require 'undohist)
;; (undohist-initialize)
(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"))
#!/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
#!/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):