

"""simple docstring"""




import functools
import operator

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


SCREAMING_SNAKE_CASE_  :      List[str]							=      logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_  :      List[Any]							=      {
    '''facebook/hubert-base-ls960''': '''https://huggingface.co/facebook/hubert-base-ls960/resolve/main/config.json''',
    # See all Hubert models at https://huggingface.co/models?filter=hubert
}


class 		_A							(      __a       ):
      __a             =						'hubert'





      def __init__(	self     ,    SCREAMING_SNAKE_CASE__=32     ,    SCREAMING_SNAKE_CASE__=768     ,    SCREAMING_SNAKE_CASE__=12     ,    SCREAMING_SNAKE_CASE__=12     ,    SCREAMING_SNAKE_CASE__=3072     ,    SCREAMING_SNAKE_CASE__="gelu"     ,    SCREAMING_SNAKE_CASE__=0.1     ,    SCREAMING_SNAKE_CASE__=0.1     ,    SCREAMING_SNAKE_CASE__=0.1     ,    SCREAMING_SNAKE_CASE__=True     ,    SCREAMING_SNAKE_CASE__=0.0     ,    SCREAMING_SNAKE_CASE__=0.1     ,    SCREAMING_SNAKE_CASE__=0.1     ,    SCREAMING_SNAKE_CASE__=0.02     ,    SCREAMING_SNAKE_CASE__=1e-5     ,    SCREAMING_SNAKE_CASE__="group"     ,    SCREAMING_SNAKE_CASE__="gelu"     ,    SCREAMING_SNAKE_CASE__=(512, 512, 512, 512, 512, 512, 512)     ,    SCREAMING_SNAKE_CASE__=(5, 2, 2, 2, 2, 2, 2)     ,    SCREAMING_SNAKE_CASE__=(10, 3, 3, 3, 3, 2, 2)     ,    SCREAMING_SNAKE_CASE__=False     ,    SCREAMING_SNAKE_CASE__=128     ,    SCREAMING_SNAKE_CASE__=16     ,    SCREAMING_SNAKE_CASE__=False     ,    SCREAMING_SNAKE_CASE__=True     ,    SCREAMING_SNAKE_CASE__=0.05     ,    SCREAMING_SNAKE_CASE__=10     ,    SCREAMING_SNAKE_CASE__=2     ,    SCREAMING_SNAKE_CASE__=0.0     ,    SCREAMING_SNAKE_CASE__=10     ,    SCREAMING_SNAKE_CASE__=0     ,    SCREAMING_SNAKE_CASE__="sum"     ,    SCREAMING_SNAKE_CASE__=False     ,    SCREAMING_SNAKE_CASE__=False     ,    SCREAMING_SNAKE_CASE__=256     ,    SCREAMING_SNAKE_CASE__=0     ,    SCREAMING_SNAKE_CASE__=1     ,    SCREAMING_SNAKE_CASE__=2     ,    **SCREAMING_SNAKE_CASE__     ,    ) ->       Tuple:
         super().__init__(**SCREAMING_SNAKE_CASE__     ,    pad_token_id=SCREAMING_SNAKE_CASE__     ,    bos_token_id=SCREAMING_SNAKE_CASE__     ,    eos_token_id=SCREAMING_SNAKE_CASE__		)
         lowerCamelCase__						       =      hidden_size
         lowerCamelCase__						       =      feat_extract_norm
         lowerCamelCase__						       =      feat_extract_activation
         lowerCamelCase__						       =      list(SCREAMING_SNAKE_CASE__		)
         lowerCamelCase__						       =      list(SCREAMING_SNAKE_CASE__		)
         lowerCamelCase__						       =      list(SCREAMING_SNAKE_CASE__		)
         lowerCamelCase__						       =      conv_bias
         lowerCamelCase__						       =      num_conv_pos_embeddings
         lowerCamelCase__						       =      num_conv_pos_embedding_groups
         lowerCamelCase__						       =      len(self.conv_dim		)
         lowerCamelCase__						       =      num_hidden_layers
         lowerCamelCase__						       =      intermediate_size
         lowerCamelCase__						       =      hidden_act
         lowerCamelCase__						       =      num_attention_heads
         lowerCamelCase__						       =      hidden_dropout
         lowerCamelCase__						       =      attention_dropout
         lowerCamelCase__						       =      activation_dropout
         lowerCamelCase__						       =      feat_proj_layer_norm
         lowerCamelCase__						       =      feat_proj_dropout
         lowerCamelCase__						       =      final_dropout
         lowerCamelCase__						       =      layerdrop
         lowerCamelCase__						       =      layer_norm_eps
         lowerCamelCase__						       =      initializer_range
         lowerCamelCase__						       =      vocab_size
         lowerCamelCase__						       =      do_stable_layer_norm
         lowerCamelCase__						       =      use_weighted_layer_sum
         lowerCamelCase__						       =      classifier_proj_size

         if (
             (len(self.conv_stride		) != self.num_feat_extract_layers)
             or (len(self.conv_kernel		) != self.num_feat_extract_layers)
             or (len(self.conv_dim		) != self.num_feat_extract_layers)
         ):
            raise ValueError(
                "Configuration for convolutional layers is incorrect. It is required that `len(config.conv_dim)` =="
                " `len(config.conv_stride)` == `len(config.conv_kernel)`, but is `len(config.conv_dim) ="
                f' {len(self.conv_dim		)}`, `len(config.conv_stride) = {len(self.conv_stride		)}`,'
                f' `len(config.conv_kernel) = {len(self.conv_kernel		)}`.'		)

         # fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
         lowerCamelCase__						       =      apply_spec_augment
         lowerCamelCase__						       =      mask_time_prob
         lowerCamelCase__						       =      mask_time_length
         lowerCamelCase__						       =      mask_time_min_masks
         lowerCamelCase__						       =      mask_feature_prob
         lowerCamelCase__						       =      mask_feature_length
         lowerCamelCase__						       =      mask_feature_min_masks

         # ctc loss
         lowerCamelCase__						       =      ctc_loss_reduction
         lowerCamelCase__						       =      ctc_zero_infinity





      @property
      def        _lowerCamelCase	(	self		) ->       Union[str, Any]:
         return functools.reduce(operator.mul     ,    self.conv_stride     ,    1		)







"""simple docstring"""




from __future__ import annotations

import math
from itertools import permutations



def 						UpperCAmelCase__ (					A__ )   ->   bool:




   """simple docstring"""

   if 1 < number < 4:
      # 2 and 3 are primes
      return True
   elif number < 2 or number % 2 == 0 or number % 3 == 0:
      # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
      return False

   # All primes number are in format of 6k +/- 1
   for i in range(5						,     int(math.sqrt(A__ ) + 1 )						,     6 ):
      if number % i == 0 or number % (i + 2) == 0:
         return False
   return True



def 						UpperCAmelCase__ (					A__ = 7 )   ->   int:




   """simple docstring"""
   lowerCamelCase__						       =      "".join(str(A__ ) for i in range(1						,     n + 1 ) )
   lowerCamelCase__						       =      [int("".join(A__ ) ) for i in permutations(A__						,     A__ )]
   lowerCamelCase__						       =      [num for num in perm_list if is_prime(A__ )]
   return max(A__ ) if pandigitals else 0


if __name__ == "__main__":
     print(F'''{solution() = }''')




