





import math






def 		lowerCAmelCase  (	UpperCamelCase__   :   List[str]       ,			UpperCamelCase__   :   str					)      ->    Union[str, Any]:

						"""simple docstring"""





						if 0 not in (x, y):
												# We use the relation x^y = y*log10(x), where 10 is the base.
												return y * math.logaa(UpperCamelCase__					)
						else:
												if x == 0:  # 0 raised to any number is 0
																		return 0
												elif y == 0:
																		return 1  # any number raised to 0 is 1
						raise AssertionError('''This should never happen'''					)


if __name__ == "__main__":  # Main function
							# Read two numbers from input and typecast them to int using map function.
							# Here x is the base and y is the power.
							lowerCAmelCase							:       Tuple					 =	"""Enter the base and the power separated by a comma: """
							lowerCAmelCase ,	lowerCAmelCase							:       Optional[Any]					 =	map(int, input(prompt).split(""","""))
							lowerCAmelCase ,	lowerCAmelCase							:       Optional[Any]					 =	map(int, input(prompt).split(""","""))

							# We find the log of each number, using the function res(), which takes two
							# arguments.
							lowerCAmelCase							:       Tuple					 =	res(xa, ya)
							lowerCAmelCase							:       Optional[int]					 =	res(xa, ya)

							# We check for the largest number
							if resa > resa:
														print("""Largest number is""", xa, """^""", ya)
							elif resa > resa:
														print("""Largest number is""", xa, """^""", ya)
							else:
														print("""Both are equal""")





from typing import Dict, List, Optional, Union

import numpy as np

from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
from ...image_transforms import center_crop, normalize, rescale, resize, to_channel_dimension_format
from ...image_utils import (
    IMAGENET_STANDARD_MEAN,
    IMAGENET_STANDARD_STD,
    ChannelDimension,
    ImageInput,
    PILImageResampling,
    make_list_of_images,
    to_numpy_array,
    valid_images,
)
from ...utils import TensorType, is_vision_available, logging


if is_vision_available():
		import PIL


lowerCamelCase__						=				logging.get_logger(__name__)







class 							lowerCAmelCase__   ( __lowercase						):
						UpperCamelCase_				:			str						=		["pixel_values"]

						def __init__(      self							,				a = True							,				a = None							,				a = PIL.Image.BICUBIC							,				a = True							,				a = None							,				a = 1 / 2_55							,				a = True							,				a = True							,				a = None							,				a = None							,				**a							,				)       ->   None:


								'''simple docstring'''

								super().__init__(**a					)
								_UpperCamelCase         =						size if size is not None else {"""height""": 2_56, """width""": 2_56}
								_UpperCamelCase         =						get_size_dict(a					)
								_UpperCamelCase         =						crop_size if crop_size is not None else {"""height""": 2_24, """width""": 2_24}
								_UpperCamelCase         =						get_size_dict(a							,				param_name="""crop_size"""					)

								_UpperCamelCase         =						do_resize
								_UpperCamelCase         =						size
								_UpperCamelCase         =						resample
								_UpperCamelCase         =						do_center_crop
								_UpperCamelCase         =						crop_size
								_UpperCamelCase         =						do_rescale
								_UpperCamelCase         =						rescale_factor
								_UpperCamelCase         =						do_normalize
								_UpperCamelCase         =						image_mean if image_mean is not None else IMAGENET_STANDARD_MEAN
								_UpperCamelCase         =						image_std if image_std is not None else IMAGENET_STANDARD_STD

						def 			A_					(      self							,				a							,				a							,				a = PIL.Image.BICUBIC							,				a = None							,				**a							,				)       ->   np.ndarray:


								'''simple docstring'''

								_UpperCamelCase         =						get_size_dict(a					)
								if "height" not in size or "width" not in size:
										raise ValueError(F'The size dictionary must have keys \'height\' and \'width\'. Got {size.keys()}'					)
								return resize(
								    a							,				size=(size["""height"""], size["""width"""])							,				resample=a							,				data_format=a							,				**a					)

						def 			A_					(      self							,				a							,				a							,				a = None							,				**a							,				)       ->   np.ndarray:


								'''simple docstring'''

								_UpperCamelCase         =						get_size_dict(a					)
								if "height" not in size or "width" not in size:
										raise ValueError(F'The size dictionary must have keys \'height\' and \'width\'. Got {size.keys()}'					)
								return center_crop(a							,				size=(size["""height"""], size["""width"""])							,				data_format=a							,				**a					)

						def 			A_					(      self							,				a							,				a							,				a = None							,				**a							,				)       ->   List[str]:


								'''simple docstring'''

								return rescale(a							,				scale=a							,				data_format=a							,				**a					)

						def 			A_					(      self							,				a							,				a							,				a							,				a = None							,				**a							,				)       ->   np.ndarray:


								'''simple docstring'''

								return normalize(a							,				mean=a							,				std=a							,				data_format=a							,				**a					)







						def 			A_					(      self							,				a							,				a = None							,				a = None							,				a=None							,				a = None							,				a = None							,				a = None							,				a = None							,				a = None							,				a = None							,				a = None							,				a = None							,				a = ChannelDimension.FIRST							,				**a							,				)       ->   PIL.Image.Image:


								'''simple docstring'''

								_UpperCamelCase         =						do_resize if do_resize is not None else self.do_resize
								_UpperCamelCase         =						resample if resample is not None else self.resample
								_UpperCamelCase         =						do_center_crop if do_center_crop is not None else self.do_center_crop
								_UpperCamelCase         =						do_rescale if do_rescale is not None else self.do_rescale
								_UpperCamelCase         =						rescale_factor if rescale_factor is not None else self.rescale_factor
								_UpperCamelCase         =						do_normalize if do_normalize is not None else self.do_normalize
								_UpperCamelCase         =						image_mean if image_mean is not None else self.image_mean
								_UpperCamelCase         =						image_std if image_std is not None else self.image_std

								_UpperCamelCase         =						size if size is not None else self.size
								_UpperCamelCase         =						get_size_dict(a					)
								_UpperCamelCase         =						crop_size if crop_size is not None else self.crop_size
								_UpperCamelCase         =						get_size_dict(a							,				param_name="""crop_size"""					)

								_UpperCamelCase         =						make_list_of_images(a					)

								if not valid_images(a					):
										raise ValueError(
										    """Invalid image type. Must be of type PIL.Image.Image, numpy.ndarray, """
										    """torch.Tensor, tf.Tensor or jax.ndarray."""					)

								if do_resize and size is None or resample is None:
										raise ValueError("""Size and resample must be specified if do_resize is True."""					)

								if do_center_crop and crop_size is None:
										raise ValueError("""Crop size must be specified if do_center_crop is True."""					)

								if do_rescale and rescale_factor is None:
										raise ValueError("""Rescale factor must be specified if do_rescale is True."""					)

								if do_normalize and (image_mean is None or image_std is None):
										raise ValueError("""Image mean and std must be specified if do_normalize is True."""					)

								# All transformations expect numpy arrays.
								_UpperCamelCase         =						[to_numpy_array(a					) for image in images]

								if do_resize:
										_UpperCamelCase         =						[self.resize(image=a							,				size=a							,				resample=a					) for image in images]

								if do_center_crop:
										_UpperCamelCase         =						[self.center_crop(image=a							,				size=a					) for image in images]

								if do_rescale:
										_UpperCamelCase         =						[self.rescale(image=a							,				scale=a					) for image in images]

								if do_normalize:
										_UpperCamelCase         =						[self.normalize(image=a							,				mean=a							,				std=a					) for image in images]

								_UpperCamelCase         =						[to_channel_dimension_format(a							,				a					) for image in images]

								_UpperCamelCase         =						{"""pixel_values""": images}
								return BatchFeature(data=a							,				tensor_type=a					)



