<button>Let's Go !</button>
This file contains 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
import cv2 | |
import sys | |
import os | |
def simple_threshold(path, thresh): | |
# read in the image | |
img = cv2.imread(path) | |
# display the image and wait for key press |
This file contains 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
import cv2 | |
import sys | |
import os | |
# usage: python ex_001.py path/to/image.jpg | |
imgPath = sys.argv[1] | |
if not os.path.isfile(imgPath): | |
print("Image file not found.") | |
sys.exit() |
This file contains 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
#!/bin/bash | |
brew_command=/usr/local/bin/brew | |
brew_cask_command="$brew_command cask" | |
echo '#!/bin/bash' | |
echo '' | |
echo 'trap ctrl_c INT' | |
echo 'function ctrl_c() {' | |
echo 'echo "** Trapped CTRL-C"' |
This file contains 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
extension NSUserDefaults { | |
func colorForKey(key: String) -> UIColor? { | |
var color: UIColor? | |
if let colorData = dataForKey(key) { | |
color = NSKeyedUnarchiver.unarchiveObjectWithData(colorData) as? UIColor | |
} | |
return color | |
} |
Ref: https://gist.github.com/vertexclique/9839383
Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).
Common step after enter run the patch command:
- After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
NewerOlder