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 | |
import sys | |
if len(sys.argv) > 1: | |
file_name = sys.argv[1] | |
else: | |
print "no input file name" | |
exit() | |
from swf.movie import SWF |
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
[core] | |
pager = less -R | |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold |
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
# We won't worry about sending C-\ to any programs | |
# bind-key C-\ send-prefix | |
# hit C-\ twice to go to last window | |
bind-key C-\ last-window | |
bind-key b set-option status | |
# C-b is not acceptable, due to emacs, bash, and vim | |
unbind-key C-b | |
set -g prefix 'C-\' |
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 |
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
#!/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
# 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
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
#!/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
;; 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) |