This file contains hidden or 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
| "use strict"; | |
| // need: prototype.js | |
| GlobalOption = Class.create(); | |
| GlobalOption.prototype = { | |
| //設定オプション | |
| initialize:function(){ | |
| this.fps = 24; |
This file contains hidden or 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 -*- | |
| """ | |
| OSXのマウスイベントを操作するスクリプトのサンプル | |
| require : PyObjC | |
| v{CGPoint=dd}は環境によってddだったりffだったりした | |
| """ | |
| import objc | |
| from AppKit import NSScreen |
This file contains hidden or 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
| #!/opt/local/bin/python | |
| # -*- encoding:utf-8 -*- | |
| """ | |
| require: PyObjC opencv | |
| This program based on OpenCV sample, facedetect.py. | |
| 対象には haarcascade_mcs_nose を使っている。 鼻は他のオブジェクトと誤認しにくい | |
| """ | |
| import sys | |
| import cv | |
| from optparse import OptionParser |
This file contains hidden or 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
| #!/opt/local/bin/python | |
| # -*- encoding:utf-8 -*- | |
| """ | |
| encodingを判別してutf-8で返すだけ | |
| 要 pykf | |
| """ | |
| import pykf | |
| import urllib2 | |
| def get_utf8(text): |
This file contains hidden or 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
| #howmを使っているならhowm_dirが定義されているはず | |
| let howm_dir="~/Dropbox/memo" | |
| let s:unite_howm = { | |
| \ 'name': 'howm', | |
| \ 'howm_dir': howm_dir, | |
| \ } | |
| function! s:unite_howm.gather_candidates(args, context) | |
| let lines = split(system("grep ^= " . s:unite_howm.howm_dir . "/*/*/*" ), "\n") | |
| " let lines = split(system("grep ^= " . "~/Dropbox/memo/*/*/*" ), "\n") |
This file contains hidden or 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/local/bin/python | |
| # -*- encoding:utf8 -*- | |
| """ | |
| 要:mecab-python bindings | |
| before こんな朝にすごい幸せそうなギャルとギャル男がいたので多分事後だろうな | |
| after こんな意識の高い朝にすごい意識の高い幸せそうな意識の高いギャルと意識の高いギャル男がいたので多分意識の高い事後だろうな | |
| """ | |
| import MeCab | |
| m = MeCab.Tagger("-Ochasen") |
This file contains hidden or 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/local/bin/python | |
| #-*- encoding:utf8 -*- | |
| LIVEDOOR_ID = "" | |
| PASSWORD = "" | |
| """ | |
| require: Growl simplejson | |
| """ |
This file contains hidden or 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
| var doc = new GLGE.Document(); | |
| doc.onLoad=function(){ | |
| //context init | |
| var gameRenderer=new GLGE.Renderer(document.getElementById('canvas')); | |
| gameScene=new GLGE.Scene(); | |
| gameScene=doc.getElement("mainscene"); | |
| gameRenderer.setScene(gameScene); | |
| //interface init |
This file contains hidden or 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 | |
| # -*- encoding:utf8 -*- | |
| import sys | |
| import pykf | |
| import urllib2 | |
| from pyquery import PyQuery as pq | |
| reload(sys) | |
| sys.setdefaultencoding('utf-8') | |
| BBS_LIST = "http://www.zonubbs.net/bbsmenu.html" |
This file contains hidden or 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
| "[~/.vim/bundle/errormaker/ftplugin/python] | |
| " pip install pyflakes | |
| setlocal makeprg=/usr/local/bin/pyflakes\ % | |
| setlocal errorformat=%f:%l:%m | |
| if !exists("g:python_flyquickfixmake") | |
| let g:python_flyquickfixmake = 1 | |
| au BufWritePost *.py make | |
| endif |