





'''simple docstring'''

class     __lowerCAmelCase					:






       """simple docstring"""





       def __init__(							self       :		Any	,			lowerCAmelCase__       :		Optional[Any]	,			lowerCAmelCase__       :		Dict	,			lowerCAmelCase__       :		Dict					)   ->					Union[str, Any]:

            '''simple docstring'''




            _UpperCamelCase       =	name
            _UpperCamelCase       =	value
            _UpperCamelCase       =	weight





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

            '''simple docstring'''




            return f"""{self.__class__.__name__}({self.name}, {self.value}, {self.weight})"""





       def snake_case__						(							self       :		Any					)   ->					str:

            '''simple docstring'''




            return self.value





       def snake_case__						(							self       :		Optional[int]					)   ->					List[Any]:

            '''simple docstring'''




            return self.name





       def snake_case__						(							self       :		str					)   ->					Dict:

            '''simple docstring'''




            return self.weight







       def snake_case__						(							self       :		Union[str, Any]					)   ->					Tuple:

            '''simple docstring'''




            return self.value / self.weight







def  a__    (    lowercase :					Optional[int], lowercase :					Tuple, lowercase :					Optional[int]				)		->		List[Any]:





     """simple docstring"""

     _UpperCamelCase       =	[]
     for i in range(len(lowercase				)				):
          menu.append(Things(name[i], value[i], weight[i]				)				)
     return menu







def  a__    (    lowercase :					Tuple, lowercase :					Union[str, Any], lowercase :					Any				)		->		List[str]:





     """simple docstring"""

     _UpperCamelCase       =	sorted(lowercase, key=lowercase, reverse=lowercase				)
     _UpperCamelCase       =	[]
     _UpperCamelCase   ,    _UpperCamelCase       =	0.0, 0.0
     for i in range(len(lowercase				)				):
          if (total_cost + items_copy[i].get_weight()) <= max_cost:
               result.append(items_copy[i]				)
               total_cost += items_copy[i].get_weight()
               total_value += items_copy[i].get_value()
     return (result, total_value)







def  a__    (    )		->		int:





     """simple docstring"""



if __name__ == "__main__":
   import doctest

   doctest.testmod()










'''simple docstring'''

from cva import destroyAllWindows, imread, imshow, waitKey







def  a__    (    lowercase :					str				)		->		Optional[int]:





     """simple docstring"""

     _UpperCamelCase   ,    _UpperCamelCase       =	img.shape[0], img.shape[1]

     # converting each pixel's color to its negative
     for i in range(lowercase				):
          for j in range(lowercase				):
               _UpperCamelCase       =	[255, 255, 255] - img[i][j]

     return img


if __name__ == "__main__":
   # read original image
   lowercase__						:      Optional[int]	=    imread('image_data/lena.jpg', 1)

   # convert to its negative
   lowercase__						:      Union[str, Any]	=    convert_to_negative(img)

   # show result image
   imshow('negative of original image', img)
   waitKey(0)
   destroyAllWindows()



