






'''simple docstring'''







import unittest
from timeit import timeit


def 						_UpperCamelCase							(     snake_case__							,			snake_case__							):
      __A		   =      first_num if first_num >= second_num else second_num
      __A		   =      max_num
      while (common_mult % first_num > 0) or (common_mult % second_num > 0):
            common_mult += max_num
      return common_mult


def 						_UpperCamelCase							(     snake_case__							,			snake_case__							):
      return b if a == 0 else greatest_common_divisor(b % a							,			snake_case__							)


def 						_UpperCamelCase							(     snake_case__							,			snake_case__							):
      return first_num // greatest_common_divisor(snake_case__							,			snake_case__							) * second_num


def 						_UpperCamelCase							(     ):
      __A		   =      (
          "from __main__ import least_common_multiple_slow, least_common_multiple_fast"
      )
      print(
          "least_common_multiple_slow():"							,			timeit("least_common_multiple_slow(1000, 999)"							,			setup=snake_case__							)							,			)
      print(
          "least_common_multiple_fast():"							,			timeit("least_common_multiple_fast(1000, 999)"							,			setup=snake_case__							)							,			)






class 					a__    (			unittest.TestCase						):
     '''simple docstring'''







     _snake_case             =  (
         (10, 20),
         (13, 15),
         (4, 31),
         (10, 42),
         (43, 34),
         (5, 12),
         (12, 25),
         (10, 25),
         (6, 9),
     )
     _snake_case             =  (20, 195, 124, 210, 1_462, 60, 300, 50, 18)






     def     _UpperCamelCase   (self    :	Tuple					)  ->       List[Any]:
           for i, (first_num, second_num) in enumerate(self.test_inputs					):
                 __A		   =      least_common_multiple_slow(lowercase__				,				lowercase__					)
                 __A		   =      least_common_multiple_fast(lowercase__				,				lowercase__					)
                 with self.subTest(i=lowercase__					):
                       self.assertEqual(lowercase__				,				self.expected_results[i]					)
                       self.assertEqual(lowercase__				,				self.expected_results[i]					)


if __name__ == "__main__":
      benchmark()
      unittest.main()










'''simple docstring'''







from cva import destroyAllWindows, imread, imshow, waitKey


def 						_UpperCamelCase							(     snake_case__							,			snake_case__							):
      __A   ,				__A		   =      img.shape[0], img.shape[1]

      def to_grayscale(snake_case__							,			snake_case__							,			snake_case__							):
            return 0.2126 * red + 0.587 * green + 0.114 * blue

      def normalize(snake_case__							):
            return min(snake_case__							,			255							)

      for i in range(snake_case__							):
            for j in range(snake_case__							):
                  __A		   =      int(to_grayscale(*img[i][j]							)							)
                  __A		   =      [
                      normalize(snake_case__							),
                      normalize(greyscale + factor							),
                      normalize(greyscale + 2 * factor							),
                  ]

      return img


if __name__ == "__main__":
       # read original image
       __A      :       Dict      =	{
           percentage: imread('image_data/lena.jpg', 1) for percentage in (1_0, 2_0, 3_0, 4_0)
       }

       for percentage, img in images.items():
              make_sepia(img, percentage)

       for percentage, img in images.items():
              imshow(F"""Original image with sepia (factor: {percentage})""", img)

       waitKey(0)
       destroyAllWindows()


