




def 					a__				(       snake_case__ ,				snake_case__       )		->      float:

			def get_matched_characters(snake_case__ ,				snake_case__       ) -> str:
						lowerCamelCase       =      []
						lowerCamelCase       =      min(len(_stra       ) ,				len(_stra       )       ) // 2
						for i, l in enumerate(_stra       ):
									lowerCamelCase       =      int(max(0 ,				i - limit       )       )
									lowerCamelCase       =      int(min(i + limit + 1 ,				len(_stra       )       )       )
									if l in _stra[left:right]:
												matched.append(lowerCamelCase__       )
												lowerCamelCase       =      F'{_stra[0:_stra.index(lowerCamelCase__       )]} {_stra[_stra.index(lowerCamelCase__       ) + 1:]}'

						return "".join(lowerCamelCase__       )

			# matching characters
			lowerCamelCase       =      get_matched_characters(lowerCamelCase__ ,				lowerCamelCase__       )
			lowerCamelCase       =      get_matched_characters(lowerCamelCase__ ,				lowerCamelCase__       )
			lowerCamelCase       =      len(lowerCamelCase__       )

			# transposition
			lowerCamelCase       =      (
			    len([(ca, ca) for ca, ca in zip(lowerCamelCase__ ,				lowerCamelCase__       ) if ca != ca]       ) // 2
			)

			if not match_count:
						lowerCamelCase       =      0.0
			else:
						lowerCamelCase       =      (
						    1
						    / 3
						    * (
						        match_count / len(lowerCamelCase__       )
						        + match_count / len(lowerCamelCase__       )
						        + (match_count - transpositions) / match_count
						    )
						)

			# common prefix up to 4 characters
			lowerCamelCase       =      0
			for ca, ca in zip(stra[:4] ,				stra[:4]       ):
						if ca == ca:
									prefix_len += 1
						else:
									break

			return jaro + 0.1 * prefix_len * (1 - jaro)


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					print(jaro_winkler("""hello""", """world"""))









"""simple docstring"""




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


lowerCAmelCase							:    Dict  							=							logging.get_logger(__name__)

lowerCAmelCase							:    Optional[Any]  							=							{
    """MIT/ast-finetuned-audioset-10-10-0.4593""": (
        """https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593/resolve/main/config.json"""
    ),
}






class 					__magic_name__							( UpperCAmelCase__       ):






				'''simple docstring'''
				__UpperCamelCase    						=		"audio-spectrogram-transformer"





				def __init__( self	,				_a=768	,				_a=12	,				_a=12	,				_a=3_072	,				_a="gelu"	,				_a=0.0	,				_a=0.0	,				_a=0.02	,				_a=1e-1_2	,				_a=16	,				_a=True	,				_a=10	,				_a=10	,				_a=1_024	,				_a=128	,				**_a	,				):





							"""simple docstring"""
							super().__init__(**_a				)

							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       =      patch_size
							lowerCamelCase       =      qkv_bias
							lowerCamelCase       =      frequency_stride
							lowerCamelCase       =      time_stride
							lowerCamelCase       =      max_length
							lowerCamelCase       =      num_mel_bins



