





'''simple docstring'''


import math
import os

import cva
import numpy as np

_SCREAMING_SNAKE_CASE			=							255.0


def 		__a(SCREAMING_SNAKE_CASE_					:   float						,    SCREAMING_SNAKE_CASE_					:   float      ):



    '''simple docstring'''





    _lowerCAmelCase		     = np.mean((original - contrast) ** 2      )
    if mse == 0:
        return 100

    return 20 * math.logaa(PIXEL_MAX / math.sqrt(SCREAMING_SNAKE_CASE_      )      )


def 		__a():



    '''simple docstring'''





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

    _lowerCAmelCase		     = cva.imread(os.path.join(SCREAMING_SNAKE_CASE_						,    "image_data/PSNR-example-base.png"      )      )
    _lowerCAmelCase		     = cva.imread(
        os.path.join(SCREAMING_SNAKE_CASE_						,    "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(SCREAMING_SNAKE_CASE_						,    SCREAMING_SNAKE_CASE_      )} dB'''      )

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


if __name__ == "__main__":
       main()









'''simple docstring'''


def 		__a(SCREAMING_SNAKE_CASE_					:   int = 1000      ):



    '''simple docstring'''





    return sum(i for i in range(SCREAMING_SNAKE_CASE_      ) if i % 3 == 0 or i % 5 == 0      )


if __name__ == "__main__":
       print(f'''{solution() = }''')


