import cv2 import numpy as np from matplotlib import pyplot as plt img = cv2 . imread ( 'messi5.jpg' , 0 ) f = np . fft . fft2 ( img ) fshift = np . fft . fftshift ( f ) magnitude_spectrum = 20 * np . log ( np . abs ( fshift )) plt . subplot ( 121 ), plt . imshow ( img , cmap = 'gray' ) plt . title ( 'Input Image' ), plt . xticks ([]), plt . yticks ([]) plt . subplot ( 122 ), plt . imshow ( magnitude_spectrum , cmap = 'gray' ) plt . title ( 'Magnitude Spectrum' ), plt . xticks ([]), plt . yticks ([]) plt . show () rows , cols = img . shape crow , ccol = rows / 2 , cols / 2 fshift [ crow - 30 : crow + 30 , ccol - 30 : ccol + 30 ] = 0 f_ishift = np . fft . ifftshift ( fshift ) img_back = np . fft . ifft2 ( f_ishift ) img_back = np . abs ( img_back ) plt . subplot ( 131 ), plt . imshow ( img , cmap = 'gray' ) plt . title ( 'Input Image' ), plt . xticks ([]), ...
시스템에 부하주기
답글삭제$ 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