






"""simple docstring"""





from cva import destroyAllWindows, imread, imshow, waitKey






def     A(  snake_case_						,       snake_case_		):
       """simple docstring"""





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

       def to_grayscale(snake_case_						,       snake_case_						,       snake_case_		):
              return 0.21_26 * red + 0.5_87 * green + 0.1_14 * blue

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

       for i in range(snake_case_		):
              for j in range(snake_case_		):
                     lowercase__:    Tuple        =      int(to_grayscale(*img[i][j]		)		)
                     lowercase__:    Any        =      [
                         normalize(snake_case_		),
                         normalize(greyscale + factor		),
                         normalize(greyscale + 2 * factor		),
                     ]

       return img


if __name__ == "__main__":
  # read original image
  UpperCamelCase			=      {
      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()














"""simple docstring"""





class 		_a       :





   '''simple docstring'''






   def __init__(   self			,				UpperCAmelCase_=None)	-> List[Any]:




          '''simple docstring'''




          lowercase__:    str        =      data
          lowercase__:    Any        =      None





   def __repr__(   self)	-> Optional[Any]:




          '''simple docstring'''




          lowercase__:    Any        =      ""
          lowercase__:    Dict        =      self
          while temp:
                 string_rep += F"""<{temp.data}> ---> """
                 lowercase__:    Tuple        =      temp.next
          string_rep += "<END>"
          return string_rep







def     A(  snake_case_		):
       """simple docstring"""





       if not elements_list:
              raise Exception("The Elements List is empty"		)

       # Set first element as Head
       lowercase__:    Any        =      Node(elements_list[0]		)
       lowercase__:    Optional[int]        =      head
       # Loop through elements from position 1
       for data in elements_list[1:]:
              lowercase__:    Dict        =      Node(snake_case_		)
              lowercase__:    Dict        =      current.next
       return head


UpperCamelCase			=      [1, 3, 5, 32, 44, 12, 43]
print(F"List: {list_data}")
print("""Creating Linked List from List.""")
UpperCamelCase			=      make_linked_list(list_data)
print("""Linked List:""")







print(linked_list)






