




from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCamelCase__					:  Union[str, Any]      							=				logging.get_logger(__name__)

lowerCamelCase__					:  Optional[int]      							=				{'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}





class 			lowerCamelCase_				( _SCREAMING_SNAKE_CASE   ):


 '''simple docstring'''







 lowercase_							       =       "openai-gpt"
 lowercase_							       =       {
     "max_position_embeddings": "n_positions",
     "hidden_size": "n_embd",
     "num_attention_heads": "n_head",
     "num_hidden_layers": "n_layer",
 }



 def __init__(				self    :						Optional[int]							,							_lowerCAmelCase    :						Union[str, Any]=40_478							,							_lowerCAmelCase    :						Union[str, Any]=512							,							_lowerCAmelCase    :						int=768							,							_lowerCAmelCase    :						str=12							,							_lowerCAmelCase    :						Optional[int]=12							,							_lowerCAmelCase    :						List[Any]="gelu"							,							_lowerCAmelCase    :						List[str]=0.1							,							_lowerCAmelCase    :						int=0.1							,							_lowerCAmelCase    :						Optional[int]=0.1							,							_lowerCAmelCase    :						Tuple=1E-5							,							_lowerCAmelCase    :						Union[str, Any]=0.02							,							_lowerCAmelCase    :						Any="cls_index"							,							_lowerCAmelCase    :						List[str]=True							,							_lowerCAmelCase    :						Dict=None							,							_lowerCAmelCase    :						List[Any]=True							,							_lowerCAmelCase    :						List[str]=0.1							,							**_lowerCAmelCase    :						Optional[int]							,							):
       SCREAMING_SNAKE_CASE_      		=     vocab_size
       SCREAMING_SNAKE_CASE_      		=     n_positions
       SCREAMING_SNAKE_CASE_      		=     n_embd
       SCREAMING_SNAKE_CASE_      		=     n_layer
       SCREAMING_SNAKE_CASE_      		=     n_head
       SCREAMING_SNAKE_CASE_      		=     afn
       SCREAMING_SNAKE_CASE_      		=     resid_pdrop
       SCREAMING_SNAKE_CASE_      		=     embd_pdrop
       SCREAMING_SNAKE_CASE_      		=     attn_pdrop
       SCREAMING_SNAKE_CASE_      		=     layer_norm_epsilon
       SCREAMING_SNAKE_CASE_      		=     initializer_range
       SCREAMING_SNAKE_CASE_      		=     summary_type
       SCREAMING_SNAKE_CASE_      		=     summary_use_proj
       SCREAMING_SNAKE_CASE_      		=     summary_activation
       SCREAMING_SNAKE_CASE_      		=     summary_first_dropout
       SCREAMING_SNAKE_CASE_      		=     summary_proj_to_labels
       super().__init__(**_lowerCAmelCase		)





import operator as op

def    UpperCAmelCase_				( __UpperCAmelCase		:      str				)   ->					Any:
      SCREAMING_SNAKE_CASE_      		=     []
      SCREAMING_SNAKE_CASE_      		=     lambda __UpperCAmelCase     ,     __UpperCAmelCase				: int(x / y				)  # noqa: E731 integer division operation
      SCREAMING_SNAKE_CASE_      		=     {
          '^': op.pow,
          '*': op.mul,
          '/': div,
          '+': op.add,
          '-': op.sub,
      }  # operators & their respective operation

      # print table header
      print('Symbol'.center(8				)     ,     'Action'.center(12				)     ,     'Stack'     ,     sep=' | '				)
      print('-' * (30 + len(__UpperCAmelCase				))				)

      for x in post_fix:
            if x.isdigit():  # if x in digit
                  stack.append(__UpperCAmelCase				)  # append x to stack
                  # output in tabular format
                  print(x.rjust(8				)     ,     ('push(' + x + ')').ljust(12				)     ,     ','.join(__UpperCAmelCase				)     ,     sep=' | '				)
            else:
                  SCREAMING_SNAKE_CASE_      		=     stack.pop()  # pop stack
                  # output in tabular format
                  print(''.rjust(8				)     ,     ('pop(' + b + ')').ljust(12				)     ,     ','.join(__UpperCAmelCase				)     ,     sep=' | '				)

                  SCREAMING_SNAKE_CASE_      		=     stack.pop()  # pop stack
                  # output in tabular format
                  print(''.rjust(8				)     ,     ('pop(' + a + ')').ljust(12				)     ,     ','.join(__UpperCAmelCase				)     ,     sep=' | '				)

                  stack.append(
                      str(opr[x](int(__UpperCAmelCase				)     ,     int(__UpperCAmelCase				)				)				)				)  # evaluate the 2 values popped from stack & push result to stack
                  # output in tabular format
                  print(
                      x.rjust(8				)     ,     ('push(' + a + x + b + ')').ljust(12				)     ,     ','.join(__UpperCAmelCase				)     ,     sep=' | '     ,     )

      return int(stack[0]				)


if __name__ == "__main__":
   lowerCamelCase__					:  Tuple      							=				input('\n\nEnter a Postfix Equation (space separated) = ').split(' ')
   print('\n\tResult = ', solve(Postfix))