


"""simple docstring"""





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


snake_case__		:     Any    				=				logging.get_logger(__name__)

snake_case__		:     str    				=				{
    '''bigcode/gpt_bigcode-santacoder''': '''https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json''',
}



class 		snake_case_(       a__			):
     __UpperCamelCase  =					'''gpt_bigcode'''
     __UpperCamelCase  =					['''past_key_values''']
     __UpperCamelCase  =					{
         '''hidden_size''': '''n_embd''',
         '''max_position_embeddings''': '''n_positions''',
         '''num_attention_heads''': '''n_head''',
         '''num_hidden_layers''': '''n_layer''',
     }






     def __init__(	self  :					Optional[int]					,				UpperCamelCase_  :					Dict=5_0_2_5_7					,				UpperCamelCase_  :					Union[str, Any]=1_0_2_4					,				UpperCamelCase_  :					List[str]=7_6_8					,				UpperCamelCase_  :					Union[str, Any]=1_2					,				UpperCamelCase_  :					Optional[int]=1_2					,				UpperCamelCase_  :					Any=None					,				UpperCamelCase_  :					Optional[int]="gelu_pytorch_tanh"					,				UpperCamelCase_  :					Union[str, Any]=0.1					,				UpperCamelCase_  :					Optional[int]=0.1					,				UpperCamelCase_  :					Tuple=0.1					,				UpperCamelCase_  :					Optional[Any]=1E-5					,				UpperCamelCase_  :					str=0.02					,				UpperCamelCase_  :					Union[str, Any]=True					,				UpperCamelCase_  :					Union[str, Any]=True					,				UpperCamelCase_  :					Optional[int]=5_0_2_5_6					,				UpperCamelCase_  :					str=5_0_2_5_6					,				UpperCamelCase_  :					List[Any]=True					,				UpperCamelCase_  :					int=True					,				UpperCamelCase_  :					Optional[int]=True					,				**UpperCamelCase_  :					Tuple					,				):
           lowerCAmelCase					:	Optional[int]       =   vocab_size
           lowerCAmelCase					:	Any       =   n_positions
           lowerCAmelCase					:	int       =   n_embd
           lowerCAmelCase					:	str       =   n_layer
           lowerCAmelCase					:	List[Any]       =   n_head
           lowerCAmelCase					:	Optional[Any]       =   n_inner
           lowerCAmelCase					:	List[Any]       =   activation_function
           lowerCAmelCase					:	Any       =   resid_pdrop
           lowerCAmelCase					:	Optional[int]       =   embd_pdrop
           lowerCAmelCase					:	int       =   attn_pdrop
           lowerCAmelCase					:	Union[str, Any]       =   layer_norm_epsilon
           lowerCAmelCase					:	Union[str, Any]       =   initializer_range
           lowerCAmelCase					:	List[Any]       =   scale_attn_weights
           lowerCAmelCase					:	Optional[int]       =   use_cache
           lowerCAmelCase					:	List[str]       =   attention_softmax_in_fpaa
           lowerCAmelCase					:	Dict       =   scale_attention_softmax_in_fpaa
           lowerCAmelCase					:	Union[str, Any]       =   multi_query

           lowerCAmelCase					:	Any       =   bos_token_id
           lowerCAmelCase					:	int       =   eos_token_id

           super().__init__(bos_token_id=UpperCamelCase_					,				eos_token_id=UpperCamelCase_					,				**UpperCamelCase_				)






"""simple docstring"""





# using dfs for finding eulerian path traversal


def      _snake_case						(						_snake_case				:			Optional[Any] ,   _snake_case				:			List[Any] ,   _snake_case				:			str ,   _snake_case				:			List[Any]=None			):
      lowerCAmelCase					:	Any       =   (path or []) + [u]
      for v in graph[u]:
            if visited_edge[u][v] is False:
                  lowerCAmelCase,      lowerCAmelCase					:	Union[str, Any]       =   True, True
                  lowerCAmelCase					:	int       =   dfs(_snake_case ,   _snake_case ,   _snake_case ,   _snake_case			)
      return path


def      _snake_case						(						_snake_case				:			Optional[int] ,   _snake_case				:			Dict			):
      lowerCAmelCase					:	Tuple       =   0
      lowerCAmelCase					:	Optional[Any]       =   -1
      for i in range(_snake_case			):
            if i not in graph.keys():
                  continue
            if len(graph[i]			) % 2 == 1:
                  odd_degree_nodes += 1
                  lowerCAmelCase					:	Optional[Any]       =   i
      if odd_degree_nodes == 0:
            return 1, odd_node
      if odd_degree_nodes == 2:
            return 2, odd_node
      return 3, odd_node


def      _snake_case						(						_snake_case				:			Tuple ,   _snake_case				:			List[Any]			):
      lowerCAmelCase					:	Any       =   [[False for _ in range(max_node + 1			)] for _ in range(max_node + 1			)]
      lowerCAmelCase,      lowerCAmelCase					:	Optional[int]       =   check_circuit_or_path(_snake_case ,   _snake_case			)
      if check == 3:
            print('''graph is not Eulerian'''			)
            print('''no path'''			)
            return
      lowerCAmelCase					:	Dict       =   1
      if check == 2:
            lowerCAmelCase					:	int       =   odd_node
            print('''graph has a Euler path'''			)
      if check == 1:
            print('''graph has a Euler cycle'''			)
      lowerCAmelCase					:	List[str]       =   dfs(_snake_case ,   _snake_case ,   _snake_case			)
      print(_snake_case			)


def      _snake_case						(						):
      lowerCAmelCase					:	Optional[Any]       =   {1: [2, 3, 4], 2: [1, 3], 3: [1, 2], 4: [1, 5], 5: [4]}
      lowerCAmelCase					:	Union[str, Any]       =   {1: [2, 3, 4, 5], 2: [1, 3], 3: [1, 2], 4: [1, 5], 5: [1, 4]}
      lowerCAmelCase					:	List[Any]       =   {1: [2, 3, 4], 2: [1, 3, 4], 3: [1, 2], 4: [1, 2, 5], 5: [4]}
      lowerCAmelCase					:	Optional[Any]       =   {1: [2, 3], 2: [1, 3], 3: [1, 2]}
      lowerCAmelCase					:	Any       =   {
          1: [],
          2: []
          # all degree is zero
      }
      lowerCAmelCase					:	List[str]       =   10
      check_euler(_snake_case ,   _snake_case			)
      check_euler(_snake_case ,   _snake_case			)
      check_euler(_snake_case ,   _snake_case			)
      check_euler(_snake_case ,   _snake_case			)
      check_euler(_snake_case ,   _snake_case			)


if __name__ == "__main__":
 main()


