


import math




def      a_				(   SCREAMING_SNAKE_CASE__ :				int					):
       '''simple docstring'''





       if 1 < number < 4:
              # 2 and 3 are primes
              return True
       elif number < 2 or number % 2 == 0 or number % 3 == 0:
              # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
              return False

       # All primes number are in format of 6k +/- 1
       for i in range(5		,      int(math.sqrt(SCREAMING_SNAKE_CASE__					) + 1					)		,      6					):
              if number % i == 0 or number % (i + 2) == 0:
                     return False
       return True




def      a_				(   SCREAMING_SNAKE_CASE__ :				int = 600_851_475_143					):
       '''simple docstring'''





       try:
              _lowerCamelCase	:		Dict          =int(SCREAMING_SNAKE_CASE__					)
       except (TypeError, ValueError):
              raise TypeError('Parameter n must be int or castable to int.'					)
       if n <= 0:
              raise ValueError('Parameter n must be greater than or equal to one.'					)
       _lowerCamelCase	:		Optional[Any]          =0
       if is_prime(SCREAMING_SNAKE_CASE__					):
              return n
       while n % 2 == 0:
              n //= 2
       if is_prime(SCREAMING_SNAKE_CASE__					):
              return n
       for i in range(3		,      int(math.sqrt(SCREAMING_SNAKE_CASE__					)					) + 1		,      2					):
              if n % i == 0:
                     if is_prime(n // i					):
                            _lowerCamelCase	:		Optional[Any]          =n // i
                            break
                     elif is_prime(SCREAMING_SNAKE_CASE__					):
                            _lowerCamelCase	:		List[Any]          =i
       return max_number


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






import numpy as np
from cva import COLOR_BGR2GRAY, cvtColor, imread, imshow, waitKey

from digital_image_processing.filters.convolve import img_convolve




def      a_				(   SCREAMING_SNAKE_CASE__ :				Optional[Any]					):
       '''simple docstring'''





       _lowerCamelCase	:		List[str]          =np.array([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]					)
       _lowerCamelCase	:		Dict          =np.array([[1, 2, 1], [0, 0, 0], [-1, -2, -1]]					)

       _lowerCamelCase	:		Optional[Any]          =np.abs(img_convolve(SCREAMING_SNAKE_CASE__		,      SCREAMING_SNAKE_CASE__					)					)
       _lowerCamelCase	:		Optional[int]          =np.abs(img_convolve(SCREAMING_SNAKE_CASE__		,      SCREAMING_SNAKE_CASE__					)					)
       # modify the pix within [0, 255]
       _lowerCamelCase	:		Optional[int]          =dst_x * 255 / np.max(SCREAMING_SNAKE_CASE__					)
       _lowerCamelCase	:		Any          =dst_y * 255 / np.max(SCREAMING_SNAKE_CASE__					)

       _lowerCamelCase	:		Tuple          =np.sqrt((np.square(SCREAMING_SNAKE_CASE__					)) + (np.square(SCREAMING_SNAKE_CASE__					))					)
       _lowerCamelCase	:		int          =dst_xy * 255 / np.max(SCREAMING_SNAKE_CASE__					)
       _lowerCamelCase	:		int          =dst_xy.astype(np.uinta					)

       _lowerCamelCase	:		Optional[int]          =np.arctana(SCREAMING_SNAKE_CASE__		,      SCREAMING_SNAKE_CASE__					)
       return dst, theta


if __name__ == "__main__":
 # read original image
 lowerCamelCase						 =	imread('../image_data/lena.jpg')
 # turn image in gray scale value
 lowerCamelCase						 =	cvtColor(img, COLOR_BGR2GRAY)

 lowerCamelCase ,    lowerCamelCase						 =	sobel_filter(gray)

 # show result images
 imshow('sobel filter', sobel_grad)
 imshow('sobel theta', sobel_theta)
 waitKey(0)


