This file contains hidden or 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
def left_right_crop(img, size): | |
if isinstance(size, numbers.Number): | |
size = (int(size), int(size)) | |
else: | |
assert len(size) == 2, "Please provide only two dimensions (h, w) for size." | |
w, h = img.size | |
crop_h, crop_w = size | |
if crop_w > w or crop_h > h: | |
raise ValueError("Requested crop size {} is bigger than input size {}".format(size, (h, w))) |
This file contains hidden or 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
# https://www.facebook.com/groups/pythonkorea/permalink/2257134351036380/ | |
class Interface: | |
def __init__(): | |
pass | |
def __method__(): | |
pass | |
class A(Interface): | |
def __init__(para1): |