'''simple docstring'''

from pathlib import Path

import cva
import numpy as np
from matplotlib import pyplot as plt
def       __UpperCamelCase	(       UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase					):
 lowercase__    :   Optional[int]						= cva.getAffineTransform(snake_case_		,					snake_case_					)
 return cva.warpAffine(snake_case_		,					snake_case_		,					(rows, cols)					)


if __name__ == "__main__":
       # read original image
       __a:			List[str]	       =       cva.imread(
           str(Path(__file__).resolve().parent.parent / """image_data""" / """lena.jpg""")
       )
       # turn image in gray scale value
       __a:			str	       =       cva.cvtColor(image, cva.COLOR_BGR2GRAY)
       # get image shape
       __a:			int	       =       gray_img.shape

       # set different points to rotate image
       __a:			Union[str, Any]	       =       np.array([[50, 50], [2_00, 50], [50, 2_00]], np.floataa)
       __a:			List[Any]	       =       np.array([[10, 1_00], [2_00, 50], [1_00, 2_50]], np.floataa)
       __a:			Union[str, Any]	       =       np.array([[50, 50], [1_50, 50], [1_20, 2_00]], np.floataa)
       __a:			List[Any]	       =       np.array([[10, 1_00], [80, 50], [1_80, 2_50]], np.floataa)

       # add all rotated images in a list
       __a:			List[str]	       =       [
           gray_img,
           get_rotation(gray_img, ptsa, ptsa, img_rows, img_cols),
           get_rotation(gray_img, ptsa, ptsa, img_rows, img_cols),
           get_rotation(gray_img, ptsa, ptsa, img_rows, img_cols),
       ]

       # plot different image rotations
       __a:			Optional[int]	       =       plt.figure(1)
       __a:			Any	       =       ['Original', 'Rotation 1', 'Rotation 2', 'Rotation 3']
       for i, image in enumerate(images):
              plt.subplot(2, 2, i + 1), plt.imshow(image, """gray""")
              plt.title(titles[i])
              plt.axis("""off""")
              plt.subplots_adjust(left=0.0, bottom=0.05, right=1.0, top=0.95)
       plt.show()


'''simple docstring'''

def       __UpperCamelCase	(       ):
 lowercase__    :   Any						= [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

 lowercase__    :   Any						= 6
 lowercase__    :   Optional[Any]						= 1
 lowercase__    :   int						= 1901

 lowercase__    :   List[str]						= 0

 while year < 2001:
  day += 7

  if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
   if day > days_per_month[month - 1] and month != 2:
    month += 1
    lowercase__    :   List[Any]						= day - days_per_month[month - 2]
   elif day > 29 and month == 2:
    month += 1
    lowercase__    :   Any						= day - 29
  else:
   if day > days_per_month[month - 1]:
    month += 1
    lowercase__    :   List[Any]						= day - days_per_month[month - 2]

  if month > 12:
   year += 1
   lowercase__    :   Dict						= 1

  if year < 2001 and day == 1:
   sundays += 1
 return sundays


if __name__ == "__main__":
  print(solution())

