


"""simple docstring"""

def lowerCAmelCase_   (					UpperCamelCase__						:			list			):






 """simple docstring"""







 for i in range(len(UpperCamelCase__			) - 1					, 0					, -1			):
  __lowercase						=						False

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

  for j in range(UpperCamelCase__			):
   if unsorted[j] > unsorted[j + 1]:
    __lowercase				,		__lowercase						=						unsorted[j + 1], unsorted[j]
    __lowercase						=						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) = }""")




"""simple docstring"""

from PIL import Image


def lowerCAmelCase_   (					UpperCamelCase__						:			Image					, UpperCamelCase__						:			int			):






 """simple docstring"""







 __lowercase						=						(259 * (level + 255)) / (255 * (259 - level))

 def contrast(UpperCamelCase__						:			int			) -> int:
  return int(128 + factor * (c - 128)			)

 return img.point(UpperCamelCase__			)


if __name__ == "__main__":
       # Load image
       with Image.open("image_data/lena.jpg") as img:
              # Change contrast to 170
              UpperCAmelCase__					=change_contrast(img, 170)
              cont_img.save("image_data/lena_high_contrast.png", format="png")
