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
# | |
# pip install tenacity | |
# Usage: | |
# → py variable-python-decorators.py 4 | |
# The given maximum attempt number is 4 | |
# We want this function to be retried 5 times | |
# We want this function to be retried 5 times | |
# We want this function to be retried 5 times | |
# We want this function to be retried 5 times | |
# We want this function to be retried 5 times |
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 math | |
import Image | |
import Levenshtein | |
class BWImageCompare(object): | |
"""Compares two images (b/w).""" | |
_pixel = 255 |