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
from scipy import interpolate | |
def crop_and_resample_2darray(arr, x_crop, y_crop, resample, *args, **kwargs): | |
"""Crop a 2darray and resize the data""" | |
len_x_crop = x_crop[1]-x_crop[0] | |
len_y_crop = y_crop[1]-y_crop[0] | |
arr_crop = arr[x_crop[0]:x_crop[1], y_crop[0]:y_crop[1]] | |
f = interpolate.interp2d(np.arange(len_y_crop), |
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
# Dutch zip code matcher | |
r"[\bNL-]*(?P<pc4>\d{4})\s*(?P<pc6>[A-Za-z]{2})\b" | |
# Email matcher | |
r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)" |
NewerOlder