






import math
import os

import cva
import numpy as np

_snake_case					   =     255.0

def     lowerCAmelCase__  (  UpperCamelCase__  ,     UpperCamelCase__       ):



  '''simple docstring'''
  _a						: int    =			np.mean((original - contrast) ** 2       )
  if mse == 0:
    return 1_0_0

  return 2_0 * math.logaa(PIXEL_MAX / math.sqrt(UpperCamelCase__       )       )

def     lowerCAmelCase__  (  ):



  '''simple docstring'''
  _a						: str    =			os.path.dirname(os.path.realpath(UpperCamelCase__       )       )
  # Loading images (original image and compressed image)
  _a						: Optional[int]    =			cva.imread(os.path.join(UpperCamelCase__  ,     """image_data/original_image.png"""       )       )
  _a						: Any    =			cva.imread(os.path.join(UpperCamelCase__  ,     """image_data/compressed_image.png"""       )  ,     1       )

  _a						: Optional[Any]    =			cva.imread(os.path.join(UpperCamelCase__  ,     """image_data/PSNR-example-base.png"""       )       )
  _a						: Optional[Any]    =			cva.imread(
      os.path.join(UpperCamelCase__  ,     """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(UpperCamelCase__  ,     UpperCamelCase__       )} dB"""       )

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


if __name__ == "__main__":
 main()









"""simple docstring"""




from __future__ import annotations

import sys

def     lowerCAmelCase__  (  UpperCamelCase__       ):



  '''simple docstring'''
  if n < 0:
    raise ValueError("""Negative arguments are not supported"""       )
  return _fib(UpperCamelCase__       )[0]

def     lowerCAmelCase__  (  UpperCamelCase__       ):



  '''simple docstring'''
  if n == 0:  # (F(0), F(1))
    return (0, 1)

  # F(2n) = F(n)[2F(n+1) − F(n)]
  # F(2n+1) = F(n+1)^2+F(n)^2
  _a   ,						_a						: Dict    =			_fib(n // 2       )
  _a						: Dict    =			a * (b * 2 - a)
  _a						: Optional[Any]    =			a * a + b * b
  return (d, c + d) if n % 2 else (c, d)


if __name__ == "__main__":
 _snake_case					   =     int(sys.argv[1])
 print(F'''fibonacci({n}) is {fibonacci(n)}''')

