





import numpy as np
from cva import destroyAllWindows, imread, imshow, waitKey

class     snake_case_		:






 '''simple docstring'''





 def __init__(  self,		A_,		A_,		A_		)	->       List[str]:
    if dst_width < 0 or dst_height < 0:
       raise ValueError("Destination width/height should be > 0"		)

    UpperCAmelCase__						=img
    UpperCAmelCase__						=img.shape[1]
    UpperCAmelCase__						=img.shape[0]
    UpperCAmelCase__						=dst_width
    UpperCAmelCase__						=dst_height

    UpperCAmelCase__						=self.src_w / self.dst_w
    UpperCAmelCase__						=self.src_h / self.dst_h

    UpperCAmelCase__						=UpperCAmelCase__						=(
        np.ones((self.dst_h, self.dst_w, 3),		np.uinta		) * 255
    )

 def  __UpperCAmelCase						(  self		)	->       List[Any]:
    for i in range(self.dst_h		):
       for j in range(self.dst_w		):
          UpperCAmelCase__						=self.img[self.get_y(A_		)][self.get_x(A_		)]

 def  __UpperCAmelCase						(  self,		A_		)	->       int:
    return int(self.ratio_x * x		)






 def  __UpperCAmelCase						(  self,		A_		)	->       int:
    return int(self.ratio_y * y		)


if __name__ == "__main__":
    UpperCamelCase_							,						UpperCamelCase_												=	8_00, 6_00
    UpperCamelCase_												=	imread('image_data/lena.jpg', 1)
    UpperCamelCase_												=	NearestNeighbour(im, dst_w, dst_h)
    n.process()

    imshow(
        f"""Image resized from: {im.shape[1]}x{im.shape[0]} to {dst_w}x{dst_h}""", n.output
    )
    waitKey(0)
    destroyAllWindows()










def 				_UpperCAmelCase			(    A     ):




   '''simple docstring'''

   for i in range(len(A     ) - 1				,							0				,							-1     ):
      UpperCAmelCase__						=False

      for j in range(A				,							0				,							-1     ):
         if unsorted[j] < unsorted[j - 1]:
            UpperCAmelCase__			,							UpperCAmelCase__						=unsorted[j - 1], unsorted[j]
            UpperCAmelCase__						=True

      for j in range(A     ):
         if unsorted[j] > unsorted[j + 1]:
            UpperCAmelCase__			,							UpperCAmelCase__						=unsorted[j + 1], unsorted[j]
            UpperCAmelCase__						=True

      if not swapped:
         break
   return unsorted


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    UpperCamelCase_												=	input('Enter numbers separated by a comma:\n').strip()
    UpperCamelCase_												=	[int(item) for item in user_input.split(',')]
    print(f"""{cocktail_shaker_sort(unsorted) = }""")



