





"""simple docstring"""


import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import AutoConfig
from ..clip.configuration_clip import CLIPVisionConfig


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



class      lowercase_				(     __lowerCAmelCase							):
       snake_case__				:							Union[str, Any]											=     """vision-text-dual-encoder"""
       snake_case__				:							Optional[Any]											=     True

       def __init__(			self   ,					__SCREAMING_SNAKE_CASE=512   ,					__SCREAMING_SNAKE_CASE=2.6592   ,					**__SCREAMING_SNAKE_CASE     ):






        '''simple docstring'''

        super().__init__(**__SCREAMING_SNAKE_CASE     )

        if "vision_config" not in kwargs:
         raise ValueError("`vision_config` can not be `None`."     )

        if "text_config" not in kwargs:
         raise ValueError("`text_config` can not be `None`."     )

        snake_case__    							=				kwargs.pop("vision_config"     )
        snake_case__    							=				kwargs.pop("text_config"     )

        snake_case__    							=				vision_config.pop("model_type"     )
        snake_case__    							=				text_config.pop("model_type"     )

        if vision_model_type == "clip":
         snake_case__    							=				AutoConfig.for_model(__SCREAMING_SNAKE_CASE   ,					**__SCREAMING_SNAKE_CASE     ).vision_config
        elif vision_model_type == "clip_vision_model":
         snake_case__    							=				CLIPVisionConfig(**__SCREAMING_SNAKE_CASE     )
        else:
         snake_case__    							=				AutoConfig.for_model(__SCREAMING_SNAKE_CASE   ,					**__SCREAMING_SNAKE_CASE     )

        snake_case__    							=				AutoConfig.for_model(__SCREAMING_SNAKE_CASE   ,					**__SCREAMING_SNAKE_CASE     )

        snake_case__    							=				projection_dim
        snake_case__    							=				logit_scale_init_value

       @classmethod
       def 		_SCREAMING_SNAKE_CASE(			cls   ,					__SCREAMING_SNAKE_CASE   ,					__SCREAMING_SNAKE_CASE   ,					**__SCREAMING_SNAKE_CASE     ):






        '''simple docstring'''

        return cls(vision_config=vision_config.to_dict()   ,					text_config=text_config.to_dict()   ,					**__SCREAMING_SNAKE_CASE     )

       def 		_SCREAMING_SNAKE_CASE(			self     ):






        '''simple docstring'''

        snake_case__    							=				copy.deepcopy(self.__dict__     )
        snake_case__    							=				self.vision_config.to_dict()
        snake_case__    							=				self.text_config.to_dict()
        snake_case__    							=				self.__class__.model_type
        return output








"""simple docstring"""


from math import sqrt





def 							a__			(  _UpperCAmelCase	)    ->  list[int]:

 '''simple docstring'''






 snake_case__    							=				[1]
 for i in range(2	,     int(sqrt(_UpperCAmelCase	)	) + 1	,     1	):
  if number % i == 0:
   values.append(_UpperCAmelCase	)
   if int(number // i	) != i:
    values.append(int(number // i	)	)
 return sorted(_UpperCAmelCase	)





def 							a__			(  _UpperCAmelCase	)    ->  bool:

 '''simple docstring'''






 return sum(factors(_UpperCAmelCase	)	) > n





def 							a__			(  _UpperCAmelCase	)    ->  bool:

 '''simple docstring'''






 snake_case__    							=				factors(_UpperCAmelCase	)
 snake_case__    							=				len(_UpperCAmelCase	)
 snake_case__    							=				[[0 for i in range(number + 1	)] for j in range(r + 1	)]
 for i in range(r + 1	):
  snake_case__    							=				True

 for i in range(1	,     number + 1	):
  snake_case__    							=				False

 for i in range(1	,     r + 1	):
  for j in range(1	,     number + 1	):
   if j < values[i - 1]:
    snake_case__    							=				subset[i - 1][j]
   else:
    snake_case__    							=				subset[i - 1][j] or subset[i - 1][j - values[i - 1]]

 return subset[r][number] != 0





def 							a__			(  _UpperCAmelCase	)    ->  bool:

 '''simple docstring'''






 return abundant(_UpperCAmelCase	) and not semi_perfect(_UpperCAmelCase	)


if __name__ == "__main__":
   import doctest

   doctest.testmod(verbose=True)
   for number in (6_9, 7_0, 7_1):
      print(f'''{number} is {'' if weird(number) else 'not '}weird.''')

