




def 		_lowerCamelCase				(					UpperCamelCase							)			->		Any:





  """simple docstring"""





  _lowercase: Optional[int]						     =    len(UpperCamelCase							)
  for i in range(length - 1							):
    _lowercase: Dict						     =    False
    for j in range(length - 1 - i							):
      if collection[j] > collection[j + 1]:
        _lowercase: Optional[Any]						     =    True
        _lowercase     ,					_lowercase: Any						     =    collection[j + 1], collection[j]
    if not swapped:
      break  # Stop iteration if the collection is sorted.
  return collection


if __name__ == "__main__":
   import doctest
   import time

   doctest.testmod()

   UpperCAmelCase__						:       int							=    input('Enter numbers separated by a comma:').strip()
   UpperCAmelCase__						:       Optional[int]							=    [int(item) for item in user_input.split(',')]
   UpperCAmelCase__						:       Optional[Any]							=    time.process_time()
   print(*bubble_sort(unsorted), sep=',')
   print(f'''Processing time: {(time.process_time() - start)%1E9 + 7}''')






from cva import destroyAllWindows, imread, imshow, waitKey


def 		_lowerCamelCase				(					UpperCamelCase					,     UpperCamelCase							)			->		List[str]:





  """simple docstring"""





  _lowercase     ,					_lowercase: Tuple						     =    img.shape[0], img.shape[1]

  def to_grayscale(UpperCamelCase					,     UpperCamelCase					,     UpperCamelCase							):
    return 0.2_126 * red + 0.587 * green + 0.114 * blue

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

  for i in range(UpperCamelCase							):
    for j in range(UpperCamelCase							):
      _lowercase: Any						     =    int(to_grayscale(*img[i][j]							)							)
      _lowercase: str						     =    [
          normalize(UpperCamelCase							),
          normalize(greyscale + factor							),
          normalize(greyscale + 2 * factor							),
      ]

  return img


if __name__ == "__main__":
   # read original image
   UpperCAmelCase__						:       Optional[Any]							=    {
       percentage: imread('image_data/lena.jpg', 1) for percentage in (10, 20, 30, 40)
   }

   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()
