

from __future__ import annotations

def 							__SCREAMING_SNAKE_CASE							(				lowerCAmelCase:  float  ,      lowerCAmelCase:  float  ,      lowerCAmelCase:  float )   ->       float:
				if days_between_payments <= 0:
								raise ValueError("days_between_payments must be > 0" )
				if daily_interest_rate < 0:
								raise ValueError("daily_interest_rate must be >= 0" )
				if principal <= 0:
								raise ValueError("principal must be > 0" )
				return principal * daily_interest_rate * days_between_payments

def 							__SCREAMING_SNAKE_CASE							(				lowerCAmelCase:  float  ,      lowerCAmelCase:  float  ,      lowerCAmelCase:  float  ,      )   ->       float:
				if number_of_compounding_periods <= 0:
								raise ValueError("number_of_compounding_periods must be > 0" )
				if nominal_annual_interest_rate_percentage < 0:
								raise ValueError("nominal_annual_interest_rate_percentage must be >= 0" )
				if principal <= 0:
								raise ValueError("principal must be > 0" )

				return principal * (
				    (1 + nominal_annual_interest_rate_percentage) ** number_of_compounding_periods
				    - 1
				)

def 							__SCREAMING_SNAKE_CASE							(				lowerCAmelCase:  float  ,      lowerCAmelCase:  float  ,      lowerCAmelCase:  float  ,      )   ->       float:
				if number_of_years <= 0:
								raise ValueError("number_of_years must be > 0" )
				if nominal_annual_percentage_rate < 0:
								raise ValueError("nominal_annual_percentage_rate must be >= 0" )
				if principal <= 0:
								raise ValueError("principal must be > 0" )

				return compound_interest(
				    lowerCAmelCase  ,      nominal_annual_percentage_rate / 365  ,      number_of_years * 365 )


if __name__ == "__main__":
					import doctest

					doctest.testmod()





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


SCREAMING_SNAKE_CASE_        =      logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_        =      {'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}

class 				a  (	UpperCAmelCase				):
						_lowercase    						=			"openai-gpt"
						_lowercase    						=			{
						    "max_position_embeddings": "n_positions",
						    "hidden_size": "n_embd",
						    "num_attention_heads": "n_head",
						    "num_hidden_layers": "n_layer",
						}


						def __init__(       self						,					A_=40478						,					A_=512						,					A_=768						,					A_=12						,					A_=12						,					A_="gelu"						,					A_=0.1						,					A_=0.1						,					A_=0.1						,					A_=1e-5						,					A_=0.02						,					A_="cls_index"						,					A_=True						,					A_=None						,					A_=True						,					A_=0.1						,					**A_						,					):







										'''simple docstring'''


										_UpperCAmelCase       :		Any 		=    vocab_size
										_UpperCAmelCase       :		str 		=    n_positions
										_UpperCAmelCase       :		List[Any] 		=    n_embd
										_UpperCAmelCase       :		Dict 		=    n_layer
										_UpperCAmelCase       :		Any 		=    n_head
										_UpperCAmelCase       :		int 		=    afn
										_UpperCAmelCase       :		int 		=    resid_pdrop
										_UpperCAmelCase       :		Tuple 		=    embd_pdrop
										_UpperCAmelCase       :		Optional[Any] 		=    attn_pdrop
										_UpperCAmelCase       :		Any 		=    layer_norm_epsilon
										_UpperCAmelCase       :		List[str] 		=    initializer_range
										_UpperCAmelCase       :		Union[str, Any] 		=    summary_type
										_UpperCAmelCase       :		List[Any] 		=    summary_use_proj
										_UpperCAmelCase       :		Optional[Any] 		=    summary_activation
										_UpperCAmelCase       :		int 		=    summary_first_dropout
										_UpperCAmelCase       :		List[str] 		=    summary_proj_to_labels
										super().__init__(**A_	)


