import cv2 # For OpenCV modules (For Image I/O and Contour Finding) import numpy as np # For general purpose array manipulation import scipy . fftpack # For FFT2 #### imclearborder definition def imclearborder ( imgBW , radius ): # Given a black and white image, first find all of its contours imgBWcopy = imgBW . copy () contours , hierarchy = cv2 . findContours ( imgBWcopy . copy (), cv2 . RETR_LIST , cv2 . CHAIN_APPROX_SIMPLE ) # Get dimensions of image imgRows = imgBW . shape [ 0 ] imgCols = imgBW . shape [ 1 ] contourList = [] # ID list of contours that touch the border # For each contour... for idx in np . arange ( len ( contours )): # Get the i'th contour cnt = contours [ idx ] # Look at each point in the contour for pt in cnt : rowCnt = pt [ 0 ][ 1 ] colCnt = pt [ 0 ][ 0 ] # If this is within the radius of th...
시스템에 부하주기
답글삭제$ stress -c 4
$ brew install stress
맥 터미널에서 beep음 내기
답글삭제$ tput bel
소리가 작거나 맘에 안들면
시스템설정에서 경고음을 바꾼다.
터미널에서 클립보드 로
답글삭제$ ls ~ | pbcopy
$ pbcopy < blogpost.txt
$ curl http://www.google.com/doodles#oodles/archive | grep -A5 'latest-doodle on' | grep 'img src' | sed s/.*'<img src="\/\/'/''/ | sed s/'" alt=".*'/''/ | pbcopy
$ pbpaste >> tasklist.txt
답글삭제$ mdfind -onlyin ~/Documents essay
답글삭제$ say "Never trust a computer you can't lift."
답글삭제$ say -f mynovel.txt -o myaudiobook.aiff
http://ss64.com/osx/
답글삭제기타 명령어 모음.
diskutil list
답글삭제sips -z 32 32 *.jpeg
답글삭제일괄 영상 전처리
brew install rename
답글삭제디렉토리내 모든 파일 파일명 변경 테스트
rename -nvs jpeg png *
디렉토리내 모든 파일 파일명 변경
rename -vs jpeg png *
curl -O http://192.168.0.7:8888/projA/logo.png
답글삭제brew install rename
답글삭제rename -vs aaa bbb *
brew install pass
답글삭제pass init email_address
pass insert test/www.apple.com
pass edit test/www.apple.com
실시간 날씨 정보:
답글삭제curl wttr.in/seoul
$ brew install homebrew/games/c2048
답글삭제$ 2048
brew install homebrew/games/yetris
답글삭제yetris
curl wttr/Moon
답글삭제brew install ctorrent
답글삭제ctorrent *.torrent
sublime text3 패키지 콘트롤러 설치
답글삭제cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
git clone git://github.com/wbond/sublime_package_control.git Package\ Control
cd Package\ Control
git checkout python3
# restart Sublime Text 3 and you should have Package Control working
brew install slurm
답글삭제slurm -i en0
알람기능:
답글삭제sleep 600s && mplayer path/to/mp3