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 | |
''' | |
must intall PyObjC, pyobjc-framework-DictionaryServices | |
source from http://sakito.jp/mac/dictionary.html | |
''' | |
import sys | |
from DictionaryServices import * |
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 | |
import os, os.path | |
import glob | |
import shutil | |
def build(target, output_dir): | |
"builds tracker for device or simulator" | |
t = target.lower() |
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
;; python setup | |
(setq python-check-command "pyflakes") | |
;; python-mode setup | |
(autoload 'python-mode "python-mode" "Python editing mode." t) | |
;; load pymacs | |
(eval-after-load "python-mode" | |
'(progn | |
(require 'pymacs) |
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 | |
def create_data_from_csv(file_name): | |
arr = [] | |
with open('0209.csv', 'rb') as f: | |
r = csv.reader(f) | |
for row in r: | |
t = [] | |
for i in row: | |
t.append(int(i)) |
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
try | |
do shell script "open -a `/usr/local/bin/brew --prefix emacs`/Emacs.app --args --debug-init" | |
on error errMsg | |
display dialog "homebrew or emacs not installed" | |
end try |
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
# Configuration file for ipython. | |
c = get_config() | |
# set editor to emacs | |
c.InteractiveShell.editor = 'emacsclient -c' | |
c.IPythonWidget.editor = 'emacsclient -c' | |
# Dont' confirm when exit | |
c.TerminalInteractiveShell.confirm_exit = False |
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 | |
import cv | |
import cv2 | |
window_name = "preview" | |
load_model = "haarcascade_frontalface_default.xml" | |
cv2.namedWindow(window_name) | |
vc = cv2.VideoCapture(0) |
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 | |
load_model = "haarcascade_frontalface_default.xml" | |
import sys | |
image_path = sys.argv[1] | |
# cv api 1 | |
import cv | |
img = cv.LoadImage(image_path) |
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
try | |
mount volume "smb://account@host/folderOnHost" | |
end try |