
"""simple docstring"""

from __future__ import annotations

from collections.abc import Callable






def 							A						(				snake_case      :int				,					snake_case      :Dict				,					snake_case      :Optional[int]				,					snake_case      :Tuple = 1_0_0				,					)      ->	float:
 __UpperCamelCase				  =       x_start
 __UpperCamelCase				  =       fnc(__lowerCAmelCase		)
 __UpperCamelCase				  =       0.0
 for _ in range(__lowerCAmelCase		):
  # Approximates small segments of curve as linear and solve
  # for trapezoidal area
  __UpperCamelCase				  =       (x_end - x_start) / steps + xa
  __UpperCamelCase				  =       fnc(__lowerCAmelCase		)
  area += abs(fxa + fxa		) * (xa - xa) / 2
  # Increment step
  __UpperCamelCase				  =       xa
  __UpperCamelCase				  =       fxa
 return area


if __name__ == "__main__":






      def 							A						(				snake_case      :Union[str, Any]		)      ->	str:
       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:")
      UpperCamelCase	:				str  	= 1_0
      while i <= 1_0_0_0_0_0:
            print(f'''with {i} steps: {trapezoidal_area(f, -5, 5, i)}''')
            i *= 1_0








from torch import nn


class       a							(			nn.Module				):



		def __init__(     self     :Tuple   ,__lowercase     :Optional[int]   ,__lowercase     :int  ):
						super().__init__()
						snake_case__	:      Optional[Any]     		=	class_size
						snake_case__	:      Dict     		=	embed_size
						# self.mlp1 = nn.Linear(embed_size, embed_size)
						# self.mlp2 = (nn.Linear(embed_size, class_size))
						snake_case__	:      Dict     		=	nn.Linear(__lowercase   ,__lowercase  )






		def 	__lowerCamelCase			(     self     :str   ,__lowercase     :int  ):
						# hidden_state = nn.functional.relu(self.mlp1(hidden_state))
						# hidden_state = self.mlp2(hidden_state)
						snake_case__	:      Optional[Any]     		=	self.mlp(__lowercase  )
						return logits

