




def    UpperCAmelCase_				( __UpperCAmelCase		:      int = 10     ,     __UpperCAmelCase		:      int = 10_00     ,     __UpperCAmelCase		:      bool = True				)   ->					int:
      assert (
          isinstance(__UpperCAmelCase     ,     __UpperCAmelCase				)
          and isinstance(__UpperCAmelCase     ,     __UpperCAmelCase				)
          and isinstance(__UpperCAmelCase     ,     __UpperCAmelCase				)
      ), "Invalid type of value(s) specified to function!"

      if min_val > max_val:
            raise ValueError('Invalid value for min_val or max_val (min_value < max_value)'				)
      return min_val if option else max_val

def    UpperCAmelCase_				( __UpperCAmelCase		:      int     ,     __UpperCAmelCase		:      int				)   ->					int:
      return int((number_a + number_a) / 2				)

def    UpperCAmelCase_				( __UpperCAmelCase		:      int     ,     __UpperCAmelCase		:      int     ,     __UpperCAmelCase		:      int				)   ->					None:
      assert (
          isinstance(__UpperCAmelCase     ,     __UpperCAmelCase				) and isinstance(__UpperCAmelCase     ,     __UpperCAmelCase				) and isinstance(__UpperCAmelCase     ,     __UpperCAmelCase				)
      ), 'argument values must be type of "int"'

      if lower > higher:
            raise ValueError('argument value for lower and higher must be(lower > higher)'				)

      if not lower < to_guess < higher:
            raise ValueError(
                'guess value must be within the range of lower and higher value'				)

      def answer(__UpperCAmelCase		:      int				) -> str:
            if number > to_guess:
                  return "high"
            elif number < to_guess:
                  return "low"
            else:
                  return "same"

      print('started...'				)

      SCREAMING_SNAKE_CASE_      		=     lower
      SCREAMING_SNAKE_CASE_      		=     higher

      SCREAMING_SNAKE_CASE_      		=     []

      while True:
            SCREAMING_SNAKE_CASE_      		=     get_avg(__UpperCAmelCase     ,     __UpperCAmelCase				)
            last_numbers.append(__UpperCAmelCase				)

            if answer(__UpperCAmelCase				) == "low":
                  SCREAMING_SNAKE_CASE_      		=     number
            elif answer(__UpperCAmelCase				) == "high":
                  SCREAMING_SNAKE_CASE_      		=     number
            else:
                  break

      print(f"guess the number : {last_numbers[-1]}"				)
      print(f"details : {last_numbers!s}"				)

def    UpperCAmelCase_				( )   ->					None:
      SCREAMING_SNAKE_CASE_      		=     int(input('Enter lower value : '				).strip()				)
      SCREAMING_SNAKE_CASE_      		=     int(input('Enter high value : '				).strip()				)
      SCREAMING_SNAKE_CASE_      		=     int(input('Enter value to guess : '				).strip()				)
      guess_the_number(__UpperCAmelCase     ,     __UpperCAmelCase     ,     __UpperCAmelCase				)


if __name__ == "__main__":
   main()




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


UpperCAmelCase_		 =					logging.get_logger(__name__)

UpperCAmelCase_		 =					{"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/config.json"""}


class 	lowerCamelCase__	(       _A):



 """simple docstring"""

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

 def __init__(    self					:					Union[str, Any]			,						__lowerCAmelCase					:					int=4_04_78			,						__lowerCAmelCase					:					Tuple=5_12			,						__lowerCAmelCase					:					str=7_68			,						__lowerCAmelCase					:					List[Any]=12			,						__lowerCAmelCase					:					Any=12			,						__lowerCAmelCase					:					Dict="gelu"			,						__lowerCAmelCase					:					Union[str, Any]=0.1			,						__lowerCAmelCase					:					Optional[int]=0.1			,						__lowerCAmelCase					:					Any=0.1			,						__lowerCAmelCase					:					List[str]=1E-5			,						__lowerCAmelCase					:					Optional[int]=0.02			,						__lowerCAmelCase					:					Optional[Any]="cls_index"			,						__lowerCAmelCase					:					str=True			,						__lowerCAmelCase					:					int=None			,						__lowerCAmelCase					:					Optional[int]=True			,						__lowerCAmelCase					:					Optional[Any]=0.1			,						**__lowerCAmelCase					:					Tuple			,						)   ->	Optional[Any]:
    _A      =       vocab_size
    _A      =       n_positions
    _A      =       n_embd
    _A      =       n_layer
    _A      =       n_head
    _A      =       afn
    _A      =       resid_pdrop
    _A      =       embd_pdrop
    _A      =       attn_pdrop
    _A      =       layer_norm_epsilon
    _A      =       initializer_range
    _A      =       summary_type
    _A      =       summary_use_proj
    _A      =       summary_activation
    _A      =       summary_first_dropout
    _A      =       summary_proj_to_labels
    super().__init__(**__lowerCAmelCase      )



