






"""simple docstring"""







import math






def    _lowerCAmelCase							(   lowerCAmelCase						,   lowerCAmelCase		):







       '''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(lowerCAmelCase		)
       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_						:     Any							  =   "Enter the base and the power separated by a comma: "
 lowerCAmelCase_						:     Any							  =   map(int, input(prompt).split(''','''))
 lowerCAmelCase_						:     Optional[Any]							  =   map(int, input(prompt).split(''','''))

 # We find the log of each number, using the function res(), which takes two
 # arguments.
 lowerCAmelCase_						:     Union[str, Any]							  =   res(xa, ya)
 lowerCAmelCase_						:     List[str]							  =   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''')






import os
from typing import Dict, List, Union

import tensorflow as tf
from keras_nlp.tokenizers import BytePairTokenizer
from tensorflow_text import pad_model_inputs

from .tokenization_gpta import GPTaTokenizer




class 		__A   (      tf.keras.layers.Layer      ):

						def __init__(		self :Optional[int]     ,			__snake_case :Dict[str, int]     ,			__snake_case :List[str]     ,			__snake_case :int = None     ,			__snake_case :int = None			):
										'''simple docstring'''

										super().__init__()
										__magic_name__						:						Optional[int]										=pad_token_id
										__magic_name__						:						List[Any]										=max_length
										__magic_name__						:						Dict										=vocab
										__magic_name__						:						int										=merges
										__magic_name__						:						Optional[int]										=BytePairTokenizer(__snake_case     ,			__snake_case     ,			sequence_length=__snake_case			)

						@classmethod
						def      A__    (		cls :List[Any]     ,			__snake_case :GPTaTokenizer     ,			*__snake_case :int     ,			**__snake_case :Any			):
										'''simple docstring'''

										__magic_name__						:						List[Any]										=[""" """.join(__snake_case			) for m in tokenizer.bpe_ranks.keys()]
										__magic_name__						:						str										=tokenizer.get_vocab()
										return cls(__snake_case     ,			__snake_case     ,			*__snake_case     ,			**__snake_case			)

						@classmethod
						def      A__    (		cls :Dict     ,			__snake_case :Union[str, os.PathLike]     ,			*__snake_case :Union[str, Any]     ,			**__snake_case :int			):
										'''simple docstring'''

										__magic_name__						:						Dict										=GPTaTokenizer.from_pretrained(__snake_case     ,			*__snake_case     ,			**__snake_case			)
										return cls.from_tokenizer(__snake_case     ,			*__snake_case     ,			**__snake_case			)

						@classmethod
						def      A__    (		cls :Optional[Any]     ,			__snake_case :List[Any]			):
										'''simple docstring'''

										return cls(**__snake_case			)

						def      A__    (		self :Union[str, Any]			):
										'''simple docstring'''

										return {
										    "vocab": self.vocab,
										    "merges": self.merges,
										    "max_length": self.max_length,
										    "pad_token_id": self.pad_token_id,
										}


						def      A__    (		self :List[Any]     ,			__snake_case :Dict     ,			__snake_case :int = None			):
										'''simple docstring'''

										__magic_name__						:						Optional[Any]										=self.tf_tokenizer(__snake_case			)
										__magic_name__						:						Tuple										=tf.ones_like(__snake_case			)

										if self.pad_token_id is not None:
														# pad the tokens up to max length
														__magic_name__						:						Tuple										=max_length if max_length is not None else self.max_length

														if max_length is not None:
																		__magic_name__					,			__magic_name__						:						Tuple										=pad_model_inputs(
																		    __snake_case     ,			max_seq_length=__snake_case     ,			pad_value=self.pad_token_id			)

										return {"attention_mask": attention_mask, "input_ids": input_ids}




