
"""simple docstring"""







from math import isclose, sqrt
def 					__lowerCAmelCase       (_UpperCamelCase ,						_UpperCamelCase ,						_UpperCamelCase	):
	__lowerCAmelCase    :		List[str]		    =   point_y / 4 / point_x
	__lowerCAmelCase    :		str		    =   2 * normal_gradient / (1 + normal_gradient * normal_gradient)
	__lowerCAmelCase    :		Any		    =   (1 - normal_gradient * normal_gradient) / (
	    1 + normal_gradient * normal_gradient
	)
	__lowerCAmelCase    :		Optional[int]		    =   (sa - ca * incoming_gradient) / (ca + sa * incoming_gradient)

	# to find the next point, solve the simultaeneous equations:
	# y^2 + 4x^2 = 100
	# y - b = m * (x - a)
	# ==> A x^2 + B x + C = 0
	__lowerCAmelCase    :		Tuple		    =   outgoing_gradient**2 + 4
	__lowerCAmelCase    :		Any		    =   2 * outgoing_gradient * (point_y - outgoing_gradient * point_x)
	__lowerCAmelCase    :		Optional[Any]		    =   (point_y - outgoing_gradient * point_x) ** 2 - 100

	__lowerCAmelCase    :		Optional[int]		    =   (
	    -linear_term - sqrt(linear_term**2 - 4 * quadratic_term * constant_term	)
	) / (2 * quadratic_term)
	__lowerCAmelCase    :		Optional[Any]		    =   (
	    -linear_term + sqrt(linear_term**2 - 4 * quadratic_term * constant_term	)
	) / (2 * quadratic_term)

	# two solutions, one of which is our input point
	__lowerCAmelCase    :		Union[str, Any]		    =   x_minus if isclose(__UpperCamelCase ,						__UpperCamelCase	) else x_plus
	__lowerCAmelCase    :		Any		    =   point_y + outgoing_gradient * (next_x - point_x)

	return next_x, next_y, outgoing_gradient
def 					__lowerCAmelCase       (_UpperCamelCase = 1.4 ,						_UpperCamelCase = -9.6	):
	__lowerCAmelCase    :		str		    =   0
	__lowerCAmelCase    :		Optional[int]		    =   first_x_coord
	__lowerCAmelCase    :		Optional[int]		    =   first_y_coord
	__lowerCAmelCase    :		Dict		    =   (10.1 - point_y) / (0.0 - point_x)

	while not (-0.01 <= point_x <= 0.01 and point_y > 0):
		__lowerCAmelCase    ,     __lowerCAmelCase    ,     __lowerCAmelCase    :		List[str]		    =   next_point(__UpperCamelCase ,						__UpperCamelCase ,						__UpperCamelCase	)
		num_reflections += 1

	return num_reflections


if __name__ == "__main__":
					print(f'{solution() = }')

"""simple docstring"""







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


lowerCamelCase__           =	logging.get_logger(__name__)

lowerCamelCase__           =	{
    """speechbrain/m-ctc-t-large""": """https://huggingface.co/speechbrain/m-ctc-t-large/resolve/main/config.json""",
    # See all M-CTC-T models at https://huggingface.co/models?filter=mctct
}




class 				A__ (			_lowerCamelCase):
		A_		: Any            =			'mctct'

		def __init__(   self ,	_SCREAMING_SNAKE_CASE=80_65 ,	_SCREAMING_SNAKE_CASE=15_36 ,	_SCREAMING_SNAKE_CASE=36 ,	_SCREAMING_SNAKE_CASE=61_44 ,	_SCREAMING_SNAKE_CASE=4 ,	_SCREAMING_SNAKE_CASE=3_84 ,	_SCREAMING_SNAKE_CASE=9_20 ,	_SCREAMING_SNAKE_CASE=1E-5 ,	_SCREAMING_SNAKE_CASE=0.3 ,	_SCREAMING_SNAKE_CASE="relu" ,	_SCREAMING_SNAKE_CASE=0.02 ,	_SCREAMING_SNAKE_CASE=0.3 ,	_SCREAMING_SNAKE_CASE=0.3 ,	_SCREAMING_SNAKE_CASE=1 ,	_SCREAMING_SNAKE_CASE=0 ,	_SCREAMING_SNAKE_CASE=2 ,	_SCREAMING_SNAKE_CASE=1 ,	_SCREAMING_SNAKE_CASE=0.3 ,	_SCREAMING_SNAKE_CASE=1 ,	_SCREAMING_SNAKE_CASE=(7,) ,	_SCREAMING_SNAKE_CASE=(3,) ,	_SCREAMING_SNAKE_CASE=80 ,	_SCREAMING_SNAKE_CASE=1 ,	_SCREAMING_SNAKE_CASE=None ,	_SCREAMING_SNAKE_CASE="sum" ,	_SCREAMING_SNAKE_CASE=False ,	**_SCREAMING_SNAKE_CASE ,	):
			super().__init__(**_SCREAMING_SNAKE_CASE ,	pad_token_id=_SCREAMING_SNAKE_CASE ,	bos_token_id=_SCREAMING_SNAKE_CASE ,	eos_token_id=_SCREAMING_SNAKE_CASE				)
			__lowerCAmelCase    :		str		    =   vocab_size
			__lowerCAmelCase    :		Any		    =   hidden_size
			__lowerCAmelCase    :		int		    =   num_hidden_layers
			__lowerCAmelCase    :		Any		    =   intermediate_size
			__lowerCAmelCase    :		Optional[int]		    =   num_attention_heads
			__lowerCAmelCase    :		str		    =   attention_head_dim
			__lowerCAmelCase    :		int		    =   max_position_embeddings
			__lowerCAmelCase    :		List[Any]		    =   layer_norm_eps
			__lowerCAmelCase    :		Tuple		    =   layerdrop
			__lowerCAmelCase    :		Dict		    =   hidden_act
			__lowerCAmelCase    :		Dict		    =   initializer_range
			__lowerCAmelCase    :		Any		    =   hidden_dropout_prob
			__lowerCAmelCase    :		Dict		    =   attention_probs_dropout_prob
			__lowerCAmelCase    :		List[str]		    =   pad_token_id
			__lowerCAmelCase    :		Union[str, Any]		    =   bos_token_id
			__lowerCAmelCase    :		int		    =   eos_token_id
			__lowerCAmelCase    :		Optional[int]		    =   conv_glu_dim
			__lowerCAmelCase    :		List[Any]		    =   conv_dropout
			__lowerCAmelCase    :		Tuple		    =   num_conv_layers
			__lowerCAmelCase    :		Tuple		    =   input_feat_per_channel
			__lowerCAmelCase    :		Optional[int]		    =   input_channels
			__lowerCAmelCase    :		str		    =   conv_channels
			__lowerCAmelCase    :		str		    =   ctc_loss_reduction
			__lowerCAmelCase    :		Tuple		    =   ctc_zero_infinity

			# prevents config testing fail with exporting to json
			__lowerCAmelCase    :		List[str]		    =   list(_SCREAMING_SNAKE_CASE				)
			__lowerCAmelCase    :		Dict		    =   list(_SCREAMING_SNAKE_CASE				)

			if len(self.conv_kernel				) != self.num_conv_layers:
				raise ValueError(
				    'Configuration for convolutional module is incorrect. '
				    'It is required that `len(config.conv_kernel)` == `config.num_conv_layers` '
				    f"but is `len(config.conv_kernel) = {len(self.conv_kernel				)}`, "
				    f"`config.num_conv_layers = {self.num_conv_layers}`."				)