

'''simple docstring'''

from typing import Dict

from .base import GenericTensor, Pipeline





class 							_snake_case (       _a						):
   def     __UpperCamelCase						( self			:      List[Any]     ,SCREAMING_SNAKE_CASE__			:      str=None     ,SCREAMING_SNAKE_CASE__			:      int=None     ,SCREAMING_SNAKE_CASE__			:      int=None     ,**SCREAMING_SNAKE_CASE__			:      Union[str, Any]							):
     if tokenize_kwargs is None:
       SCREAMING_SNAKE_CASE:int						      =					{}

     if truncation is not None:
       if "truncation" in tokenize_kwargs:
         raise ValueError(
             "truncation parameter defined twice (given as keyword argument as well as in tokenize_kwargs)"							)
       SCREAMING_SNAKE_CASE:Union[str, Any]						      =					truncation

     SCREAMING_SNAKE_CASE:Tuple						      =					tokenize_kwargs

     SCREAMING_SNAKE_CASE:Tuple						      =					{}
     if return_tensors is not None:
       SCREAMING_SNAKE_CASE:int						      =					return_tensors

     return preprocess_params, {}, postprocess_params
   def     __UpperCamelCase						( self			:      Optional[int]     ,SCREAMING_SNAKE_CASE__			:      Dict     ,**SCREAMING_SNAKE_CASE__			:      int							):
     SCREAMING_SNAKE_CASE:Union[str, Any]						      =					self.framework
     SCREAMING_SNAKE_CASE:List[str]						      =					self.tokenizer(SCREAMING_SNAKE_CASE__     ,return_tensors=SCREAMING_SNAKE_CASE__     ,**SCREAMING_SNAKE_CASE__							)
     return model_inputs
   def     __UpperCamelCase						( self			:      List[Any]     ,SCREAMING_SNAKE_CASE__			:      Optional[int]							):
     SCREAMING_SNAKE_CASE:str						      =					self.model(**SCREAMING_SNAKE_CASE__							)
     return model_outputs
   def     __UpperCamelCase						( self			:      Dict     ,SCREAMING_SNAKE_CASE__			:      List[Any]     ,SCREAMING_SNAKE_CASE__			:      str=False							):
     # [0] is the first available tensor, logits or last_hidden_state.
     if return_tensors:
       return model_outputs[0]
     if self.framework == "pt":
       return model_outputs[0].tolist()
     elif self.framework == "tf":
       return model_outputs[0].numpy().tolist()







   def __call__( self			:      Any     ,*SCREAMING_SNAKE_CASE__			:      Dict     ,**SCREAMING_SNAKE_CASE__			:      List[str]							):
     return super().__call__(*SCREAMING_SNAKE_CASE__     ,**SCREAMING_SNAKE_CASE__							)









'''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.",
    )






