


"""simple docstring"""

def lowerCAmelCase_   (					UpperCamelCase__						:			str					, UpperCamelCase__						:			str			):






 """simple docstring"""







 __lowercase						=						len(UpperCamelCase__			)
 __lowercase						=						[]
 for i in range(len(UpperCamelCase__			) - pat_len + 1			):
  __lowercase						=						True
  for j in range(UpperCamelCase__			):
   if s[i + j] != pattern[j]:
    __lowercase						=						False
    break
  if match_found:
   position.append(UpperCamelCase__			)
 return position


if __name__ == "__main__":
       assert naive_pattern_search("ABCDEFG", "DE") == [3]
       print(naive_pattern_search("ABAAABCDBBABCDDEBCABC", "ABC"))




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