



'''simple docstring'''



def 							__UpperCAmelCase				(				UpperCamelCase__				:list   ,				UpperCamelCase__				:list   ,				UpperCamelCase__				:list   ,				UpperCamelCase__				:int   ,				UpperCamelCase__				:int			)		->						None:
				if target == 0:
								answer.append(path.copy()			)
				else:
								for index in range(UpperCamelCase__   ,				len(UpperCamelCase__			)			):
												if target >= candidates[index]:
																path.append(candidates[index]			)
																backtrack(UpperCamelCase__   ,				UpperCamelCase__   ,				UpperCamelCase__   ,				target - candidates[index]   ,				UpperCamelCase__			)
																path.pop(len(UpperCamelCase__			) - 1			)


def 							__UpperCAmelCase				(				UpperCamelCase__				:list   ,				UpperCamelCase__				:int			)		->						list:
				snake_case__      :   Union[str, Any]      =    []  # type: list[int]
				snake_case__      :   Optional[int]      =    []  # type: list[int]
				backtrack(UpperCamelCase__   ,				UpperCamelCase__   ,				UpperCamelCase__   ,				UpperCamelCase__   ,				0			)
				return answer


def 							__UpperCAmelCase				(				)		->						None:
				print(combination_sum([-8, 2.3, 0]   ,				1			)			)


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				main()








"""simple docstring"""






import math
import os

import cva
import numpy as np

__snake_case												=							255.0
def    A_ ( _lowerCAmelCase  :       float,  _lowerCAmelCase  :       float							):






     """simple docstring"""

     _a     						=					np.mean((original - contrast) ** 2							)
     if mse == 0:
          return 1_00

     return 20 * math.logaa(PIXEL_MAX / math.sqrt(_lowerCAmelCase							)							)
def    A_ ( ):






     """simple docstring"""

     _a     						=					os.path.dirname(os.path.realpath(_lowerCAmelCase							)							)
     # Loading images (original image and compressed image)
     _a     						=					cva.imread(os.path.join(_lowerCAmelCase,  '''image_data/original_image.png'''							)							)
     _a     						=					cva.imread(os.path.join(_lowerCAmelCase,  '''image_data/compressed_image.png'''							),  1							)

     _a     						=					cva.imread(os.path.join(_lowerCAmelCase,  '''image_data/PSNR-example-base.png'''							)							)
     _a     						=					cva.imread(
         os.path.join(_lowerCAmelCase,  '''image_data/PSNR-example-comp-10.jpg'''							),  1							)

     # Value expected: 29.73dB
     print('''-- First Test --'''							)
     print(f'PSNR value is {peak_signal_to_noise_ratio(_lowerCAmelCase,  _lowerCAmelCase							)} dB'							)

     # # Value expected: 31.53dB (Wikipedia Example)
     print('''\n-- Second Test --'''							)
     print(f'PSNR value is {peak_signal_to_noise_ratio(_lowerCAmelCase,  _lowerCAmelCase							)} dB'							)


if __name__ == "__main__":
   main()