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


_SCREAMING_SNAKE_CASE     =     logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE     =     {
    """MCG-NJU/videomae-base""": """https://huggingface.co/MCG-NJU/videomae-base/resolve/main/config.json""",
}







class        UpperCAmelCase_					(				_a     ):
    UpperCAmelCase_      :							str    			=				'videomae'




    def __init__(       self	: List[str]   ,   lowerCAmelCase	: Optional[int]=224   ,   lowerCAmelCase	: Optional[int]=16   ,   lowerCAmelCase	: Union[str, Any]=3   ,   lowerCAmelCase	: str=16   ,   lowerCAmelCase	: Union[str, Any]=2   ,   lowerCAmelCase	: Any=768   ,   lowerCAmelCase	: Any=12   ,   lowerCAmelCase	: List[str]=12   ,   lowerCAmelCase	: str=3072   ,   lowerCAmelCase	: Optional[Any]="gelu"   ,   lowerCAmelCase	: str=0.0   ,   lowerCAmelCase	: int=0.0   ,   lowerCAmelCase	: List[str]=0.02   ,   lowerCAmelCase	: Union[str, Any]=1e-1_2   ,   lowerCAmelCase	: Tuple=True   ,   lowerCAmelCase	: Union[str, Any]=True   ,   lowerCAmelCase	: List[str]=6   ,   lowerCAmelCase	: Optional[Any]=384   ,   lowerCAmelCase	: int=4   ,   lowerCAmelCase	: Optional[int]=1536   ,   lowerCAmelCase	: Any=True   ,   **lowerCAmelCase	: int   ,   )						->			str:
      super().__init__(**lowerCAmelCase )

      a__  		=  image_size
      a__  		=  patch_size
      a__  		=  num_channels
      a__  		=  num_frames
      a__  		=  tubelet_size

      a__  		=  hidden_size
      a__  		=  num_hidden_layers
      a__  		=  num_attention_heads
      a__  		=  intermediate_size
      a__  		=  hidden_act
      a__  		=  hidden_dropout_prob
      a__  		=  attention_probs_dropout_prob
      a__  		=  initializer_range
      a__  		=  layer_norm_eps
      a__  		=  qkv_bias
      a__  		=  use_mean_pooling

      a__  		=  decoder_num_attention_heads
      a__  		=  decoder_hidden_size
      a__  		=  decoder_num_hidden_layers
      a__  		=  decoder_intermediate_size
      a__  		=  norm_pix_loss


from __future__ import annotations

from statistics import mean
def 					__lowercase						(    lowerCamelCase__       )					->list[int]:

  '''simple docstring'''




  a__  		=  2
  a__  		=  list(lowerCamelCase__       )
  a__  		=  [0] * len(lowerCamelCase__       )
  a__  		=  0
  while True:
    a__  		=  True
    for i, burst_time in enumerate(lowerCamelCase__       ):
      if rem_burst_times[i] > 0:
        a__  		=  False
        if rem_burst_times[i] > quantum:
          t += quantum
          rem_burst_times[i] -= quantum
        else:
          t += rem_burst_times[i]
          a__  		=  t - burst_time
          a__  		=  0
    if done is True:
      return waiting_times
def 					__lowercase						(    lowerCamelCase__			,					lowerCamelCase__       )					->list[int]:

  '''simple docstring'''




  return [burst + waiting for burst, waiting in zip(lowerCamelCase__			,					lowerCamelCase__       )]


if __name__ == "__main__":
     _SCREAMING_SNAKE_CASE     =     [3, 5, 7]
     _SCREAMING_SNAKE_CASE     =     calculate_waiting_times(burst_times)
     _SCREAMING_SNAKE_CASE     =     calculate_turn_around_times(burst_times, waiting_times)
     print("""Process ID \tBurst Time \tWaiting Time \tTurnaround Time""")
     for i, burst_time in enumerate(burst_times):
          print(
              F"""  {i + 1}\t\t  {burst_time}\t\t  {waiting_times[i]}\t\t  """
              F"""{turn_around_times[i]}"""
          )
     print(F"""\nAverage waiting time = {mean(waiting_times):.5f}""")
     print(F"""Average turn around time = {mean(turn_around_times):.5f}""")

