'''simple docstring'''






from __future__ import annotations

from collections.abc import Callable






def  UpperCamelCase__					(					_lowercase    :				Dict   ,    _lowercase    :				str   ,    _lowercase    :				Optional[Any]   ,    _lowercase    :				Union[str, Any] = 1_0_0   ,    )							->	float:
  __UpperCAmelCase:					List[str]		= x_start
  __UpperCAmelCase:					Dict		= fnc(_SCREAMING_SNAKE_CASE     )
  __UpperCAmelCase:					str		= 0.0
  for _ in range(_SCREAMING_SNAKE_CASE     ):
    # Approximates small segments of curve as linear and solve
    # for trapezoidal area
    __UpperCAmelCase:					str		= (x_end - x_start) / steps + xa
    __UpperCAmelCase:					Union[str, Any]		= fnc(_SCREAMING_SNAKE_CASE     )
    area += abs(fxa + fxa     ) * (xa - xa) / 2
    # Increment step
    __UpperCAmelCase:					Optional[int]		= xa
    __UpperCAmelCase:					Optional[Any]		= fxa
  return area


if __name__ == "__main__":






    def  UpperCamelCase__					(					_lowercase    :				Any     )							->	Union[str, Any]:
      return x**3 + x**2

    print('f(x) = x^3 + x^2')
    print('The area between the curve, x = -5, x = 5 and the x axis is:')
    SCREAMING_SNAKE_CASE_	   =			10
    while i <= 10_00_00:
        print(F"""with {i} steps: {trapezoidal_area(f, -5, 5, i)}""")
        i *= 10
'''simple docstring'''






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


SCREAMING_SNAKE_CASE_	   =			logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_	   =			{
    'facebook/timesformer': 'https://huggingface.co/facebook/timesformer/resolve/main/config.json',
}




class    a (       __lowerCAmelCase				):



  """simple docstring"""
  __lowerCAmelCase				      =					"""timesformer"""







  def __init__(							self   ,    snake_case_=224   ,    snake_case_=16   ,    snake_case_=3   ,    snake_case_=8   ,    snake_case_=768   ,    snake_case_=12   ,    snake_case_=12   ,    snake_case_=3072   ,    snake_case_="gelu"   ,    snake_case_=0.0   ,    snake_case_=0.0   ,    snake_case_=0.0_2   ,    snake_case_=1e-6   ,    snake_case_=True   ,    snake_case_="divided_space_time"   ,    snake_case_=0   ,    **snake_case_   ,    ):

    '''simple docstring'''







    super().__init__(**snake_case_					)

    __UpperCAmelCase:					Tuple		= image_size
    __UpperCAmelCase:					List[Any]		= patch_size
    __UpperCAmelCase:					Optional[Any]		= num_channels
    __UpperCAmelCase:					int		= num_frames

    __UpperCAmelCase:					List[str]		= hidden_size
    __UpperCAmelCase:					List[str]		= num_hidden_layers
    __UpperCAmelCase:					Dict		= num_attention_heads
    __UpperCAmelCase:					List[str]		= intermediate_size
    __UpperCAmelCase:					Union[str, Any]		= hidden_act
    __UpperCAmelCase:					Dict		= hidden_dropout_prob
    __UpperCAmelCase:					Optional[Any]		= attention_probs_dropout_prob
    __UpperCAmelCase:					Union[str, Any]		= initializer_range
    __UpperCAmelCase:					List[Any]		= layer_norm_eps
    __UpperCAmelCase:					int		= qkv_bias

    __UpperCAmelCase:					str		= attention_type
    __UpperCAmelCase:					Tuple		= drop_path_rate