






from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


lowerCamelCase      :       List[Any]    =						logging.get_logger(__name__)

lowerCamelCase      :       Tuple    =						{
    '''facebook/deit-base-distilled-patch16-224''': (
        '''https://huggingface.co/facebook/deit-base-patch16-224/resolve/main/config.json'''
    ),
    # See all DeiT models at https://huggingface.co/models?filter=deit
}



class 				_UpperCamelCase      (a_      ):
      snake_case_	=				"""deit"""


      def __init__(						self       ,    __UpperCamelCase=7_6_8       ,    __UpperCamelCase=1_2       ,    __UpperCamelCase=1_2       ,    __UpperCamelCase=3_0_7_2       ,    __UpperCamelCase="gelu"       ,    __UpperCamelCase=0.0       ,    __UpperCamelCase=0.0       ,    __UpperCamelCase=0.0_2       ,    __UpperCamelCase=1e-12       ,    __UpperCamelCase=2_2_4       ,    __UpperCamelCase=1_6       ,    __UpperCamelCase=3       ,    __UpperCamelCase=True       ,    __UpperCamelCase=1_6       ,    **__UpperCamelCase       ,    )->						Optional[int]:
           super().__init__(**__UpperCamelCase						)

           __lowerCAmelCase             =       hidden_size
           __lowerCAmelCase             =       num_hidden_layers
           __lowerCAmelCase             =       num_attention_heads
           __lowerCAmelCase             =       intermediate_size
           __lowerCAmelCase             =       hidden_act
           __lowerCAmelCase             =       hidden_dropout_prob
           __lowerCAmelCase             =       attention_probs_dropout_prob
           __lowerCAmelCase             =       initializer_range
           __lowerCAmelCase             =       layer_norm_eps
           __lowerCAmelCase             =       image_size
           __lowerCAmelCase             =       patch_size
           __lowerCAmelCase             =       num_channels
           __lowerCAmelCase             =       qkv_bias
           __lowerCAmelCase             =       encoder_stride



class 				_UpperCamelCase      (a_      ):
      snake_case_	=				version.parse("""1.11"""      )


      @property
      def 			__UpperCAmelCase		(						self						)->						Mapping[str, Mapping[int, str]]:
           return OrderedDict(
               [
                   ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
               ]						)


      @property
      def 			__UpperCAmelCase		(						self						)->						float:
           return 1e-4














from __future__ import annotations

import os
from typing import Any

import requests

lowerCamelCase      :       Tuple    =						'''https://api.github.com'''

# https://docs.github.com/en/free-pro-team@latest/rest/reference/users#get-the-authenticated-user
lowerCamelCase      :       int    =						BASE_URL + '''/user'''

# https://github.com/settings/tokens
lowerCamelCase      :       Any    =						os.environ.get('''USER_TOKEN''', '''''')





def    __lowerCAmelCase   (    __snake_case							):
     __lowerCAmelCase             =       {
         "Authorization": F"""token {auth_token}""",
         "Accept": "application/vnd.github.v3+json",
     }
     return requests.get(__snake_case       ,			headers=__snake_case							).json()


if __name__ == "__main__":  # pragma: no cover
 if USER_TOKEN:
  for key, value in fetch_github_info(USER_TOKEN).items():
   print(F'''{key}: {value}''')
 else:
  raise ValueError('''\'USER_TOKEN\' field cannot be empty.''')






