





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


snake_case    :						Optional[Any]  =						logging.get_logger(__name__)

snake_case    :						Optional[int]  =						{
    'microsoft/swinv2-tiny-patch4-window8-256': (
        'https://huggingface.co/microsoft/swinv2-tiny-patch4-window8-256/resolve/main/config.json'
    ),
}




class 							lowerCAmelCase__  (	__lowercase						):
					__A     :    int           =						'swinv2'

					__A     :    Any           =						{
					    'num_attention_heads': 'num_heads',
					    'num_hidden_layers': 'num_layers',
					}







					def __init__(       self      :     Union[str, Any]			,		_A      :     Dict=224			,		_A      :     Dict=4			,		_A      :     List[Any]=3			,		_A      :     Optional[Any]=96			,		_A      :     int=[2, 2, 6, 2]			,		_A      :     int=[3, 6, 12, 24]			,		_A      :     Tuple=7			,		_A      :     List[Any]=4.0			,		_A      :     Union[str, Any]=True			,		_A      :     Optional[Any]=0.0			,		_A      :     int=0.0			,		_A      :     str=0.1			,		_A      :     str="gelu"			,		_A      :     List[str]=False			,		_A      :     Dict=0.02			,		_A      :     Dict=1e-5			,		_A      :     Optional[int]=32			,		**_A      :     Optional[Any]			,		):
											super().__init__(**_A)

											A__	:							List[str]						    = image_size
											A__	:							Dict						    = patch_size
											A__	:							List[str]						    = num_channels
											A__	:							Any						    = embed_dim
											A__	:							Dict						    = depths
											A__	:							Dict						    = len(_A)
											A__	:							Dict						    = num_heads
											A__	:							Tuple						    = window_size
											A__	:							int						    = mlp_ratio
											A__	:							Optional[Any]						    = qkv_bias
											A__	:							Optional[Any]						    = hidden_dropout_prob
											A__	:							str						    = attention_probs_dropout_prob
											A__	:							List[Any]						    = drop_path_rate
											A__	:							Optional[int]						    = hidden_act
											A__	:							List[Any]						    = use_absolute_embeddings
											A__	:							List[str]						    = layer_norm_eps
											A__	:							Tuple						    = initializer_range
											A__	:							Any						    = encoder_stride
											# we set the hidden_size attribute in order to make Swinv2 work with VisionEncoderDecoderModel
											# this indicates the channel dimension after the last stage of the model
											A__	:							Dict						    = int(embed_dim * 2 ** (len(_A) - 1))
											A__	:							Tuple						    = (0, 0, 0, 0)




from collections import Counter
from timeit import timeit
def 	snake_case__       (					__lowercase = ""							,     )		->		bool:







						"""simple docstring"""

						return sum(c % 2 for c in Counter(input_str.replace(" "							,     ""       ).lower()       ).values()       ) < 2
def 	snake_case__       (					__lowercase = ""       )		->		bool:







						"""simple docstring"""

						if len(__lowercase       ) == 0:
												return True
						A__	:							Any						    = input_str.replace(" "							,     ""       ).lower()
						# character_freq_dict: Stores the frequency of every character in the input string
						A__	:							dict[str, int]						    = {}

						for character in lower_case_input_str:
												A__	:							Optional[int]						    = character_freq_dict.get(__lowercase							,     0       ) + 1
						A__	:							List[Any]						    = 0

						for character_count in character_freq_dict.values():
												if character_count % 2:
																		odd_char += 1
						if odd_char > 1:
												return False
						return True
def 	snake_case__       (					__lowercase = ""       )		->		None:







						"""simple docstring"""

						print("\nFor string = "							,     __lowercase							,     ":"       )
						print(
						    "> can_string_be_rearranged_as_palindrome_counter()"							,     "\tans ="							,     can_string_be_rearranged_as_palindrome_counter(__lowercase       )							,     "\ttime ="							,     timeit(
						        "z.can_string_be_rearranged_as_palindrome_counter(z.check_str)"							,     setup="import __main__ as z"							,     )							,     "seconds"							,     )
						print(
						    "> can_string_be_rearranged_as_palindrome()"							,     "\tans ="							,     can_string_be_rearranged_as_palindrome(__lowercase       )							,     "\ttime ="							,     timeit(
						        "z.can_string_be_rearranged_as_palindrome(z.check_str)"							,     setup="import __main__ as z"							,     )							,     "seconds"							,     )


if __name__ == "__main__":
		snake_case    :						Dict  =						input(
		    'Enter string to determine if it can be rearranged as a palindrome or not: '
		).strip()
		benchmark(check_str)
		snake_case    :						Dict  =						can_string_be_rearranged_as_palindrome_counter(check_str)
		print(f"""{check_str} can {'' if status else 'not '}be rearranged as a palindrome""")