

'''simple docstring'''

from ...processing_utils import ProcessorMixin





class 							_snake_case (       _UpperCamelCase						):
   _A       :     Any       =					'''WhisperFeatureExtractor'''
   _A       :     Any       =					'''WhisperTokenizer'''
   def __init__( self			:      int     ,SCREAMING_SNAKE_CASE__			:      int     ,SCREAMING_SNAKE_CASE__			:      Any							):
     super().__init__(_UpperCAmelCase     ,_UpperCAmelCase							)
     SCREAMING_SNAKE_CASE:Dict						      =					self.feature_extractor
     SCREAMING_SNAKE_CASE:Optional[Any]						      =					False
   def     __UpperCamelCase						( self			:      Tuple     ,SCREAMING_SNAKE_CASE__			:      int=None     ,SCREAMING_SNAKE_CASE__			:      Union[str, Any]=None     ,SCREAMING_SNAKE_CASE__			:      Optional[Any]=True							):
     return self.tokenizer.get_decoder_prompt_ids(task=_UpperCAmelCase     ,language=_UpperCAmelCase     ,no_timestamps=_UpperCAmelCase							)
   def __call__( self			:      Tuple     ,*SCREAMING_SNAKE_CASE__			:      Dict     ,**SCREAMING_SNAKE_CASE__			:      str							):
     # For backward compatibility
     if self._in_target_context_manager:
       return self.current_processor(*_UpperCAmelCase     ,**_UpperCAmelCase							)

     SCREAMING_SNAKE_CASE:int						      =					kwargs.pop("audio"     ,_UpperCAmelCase							)
     SCREAMING_SNAKE_CASE:Union[str, Any]						      =					kwargs.pop("sampling_rate"     ,_UpperCAmelCase							)
     SCREAMING_SNAKE_CASE:List[str]						      =					kwargs.pop("text"     ,_UpperCAmelCase							)
     if len(_UpperCAmelCase							) > 0:
       SCREAMING_SNAKE_CASE:int						      =					args[0]
       SCREAMING_SNAKE_CASE:List[Any]						      =					args[1:]

     if audio is None and text is None:
       raise ValueError("You need to specify either an `audio` or `text` input to process."							)

     if audio is not None:
       SCREAMING_SNAKE_CASE:int						      =					self.feature_extractor(_UpperCAmelCase     ,*_UpperCAmelCase     ,sampling_rate=_UpperCAmelCase     ,**_UpperCAmelCase							)
     if text is not None:
       SCREAMING_SNAKE_CASE:Any						      =					self.tokenizer(_UpperCAmelCase     ,**_UpperCAmelCase							)

     if text is None:
       return inputs

     elif audio is None:
       return encodings
     else:
       SCREAMING_SNAKE_CASE:str						      =					encodings['''input_ids''']
       return inputs
   def     __UpperCamelCase						( self			:      List[str]     ,*SCREAMING_SNAKE_CASE__			:      Optional[int]     ,**SCREAMING_SNAKE_CASE__			:      Tuple							):
     return self.tokenizer.batch_decode(*_UpperCAmelCase     ,**_UpperCAmelCase							)
   def     __UpperCamelCase						( self			:      Tuple     ,*SCREAMING_SNAKE_CASE__			:      List[Any]     ,**SCREAMING_SNAKE_CASE__			:      Dict							):
     return self.tokenizer.decode(*_UpperCAmelCase     ,**_UpperCAmelCase							)







   def     __UpperCamelCase						( self			:      Any     ,SCREAMING_SNAKE_CASE__			:      Dict     ,SCREAMING_SNAKE_CASE__			:      Any="np"							):
     return self.tokenizer.get_prompt_ids(_UpperCAmelCase     ,return_tensors=_UpperCAmelCase							)









'''simple docstring'''

from math import factorial





def    A_  ( snake_case      ,       snake_case ):

  # If either of the conditions are true, the function is being asked
  # to calculate a factorial of a negative number, which is not possible
  if n < k or k < 0:
    raise ValueError("Please enter positive integers for n and k where n >= k" )
  return factorial(snake_case ) // (factorial(snake_case ) * factorial(n - k ))


if __name__ == "__main__":
    print(
        "The number of five-card hands possible from a standard",
        f'''fifty-two card deck is: {combinations(52, 5)}\n''',
    )

    print(
        "If a class of 40 students must be arranged into groups of",
        f'''4 for group projects, there are {combinations(40, 4)} ways''',
        "to arrange them.\n",
    )

    print(
        "If 10 teams are competing in a Formula One race, there",
        f'''are {combinations(10, 3)} ways that first, second and''',
        "third place can be awarded.",
    )






