import numpy as np def hist_match ( source , template ): """ Adjust the pixel values of a grayscale image such that its histogram matches that of a target image Arguments: ----------- source: np.ndarray Image to transform; the histogram is computed over the flattened array template: np.ndarray Template image; can have different dimensions to source Returns: ----------- matched: np.ndarray The transformed output image """ oldshape = source . shape source = source . ravel () template = template . ravel () # get the set of unique pixel values and their corresponding indices and # counts s_values , bin_idx , s_counts = np . unique ( source , return_inverse = True , return_counts = True ) t_values , t_counts = np . unique ( template , return_counts = True ) ...
시스템에 부하주기
답글삭제$ 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