



from __future__ import annotations

from collections.abc import Callable





def 						__lowerCamelCase       (      __magic_name__	:  Callable[[int | float], int | float]     , __magic_name__	:  int | float     , __magic_name__	:  int | float     , __magic_name__	:  int = 100     , ):
							a__:       Any											=x_start
							a__:       Dict											=fnc(__magic_name__						)
							a__:       Tuple											=0.0

							for _ in range(__magic_name__						):
														# Approximates small segments of curve as linear and solve
														# for trapezoidal area
														a__:       int											=(x_end - x_start) / steps + xa
														a__:       Union[str, Any]											=fnc(__magic_name__						)
														area += abs(fxa + fxa						) * (xa - xa) / 2

														# Increment step
														a__:       int											=xa
														a__:       Union[str, Any]											=fxa
							return area


if __name__ == "__main__":





		def 						__lowerCamelCase       (      __magic_name__	:  str						):
									return x**3

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










from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


__UpperCAmelCase						  =     {
    '''configuration_splinter''': ['''SPLINTER_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''SplinterConfig'''],
    '''tokenization_splinter''': ['''SplinterTokenizer'''],
}

try:
		if not is_tokenizers_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__UpperCAmelCase						  =     ['''SplinterTokenizerFast''']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__UpperCAmelCase						  =     [
		    '''SPLINTER_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''SplinterForQuestionAnswering''',
		    '''SplinterForPreTraining''',
		    '''SplinterLayer''',
		    '''SplinterModel''',
		    '''SplinterPreTrainedModel''',
		]


if TYPE_CHECKING:
		from .configuration_splinter import SPLINTER_PRETRAINED_CONFIG_ARCHIVE_MAP, SplinterConfig
		from .tokenization_splinter import SplinterTokenizer

		try:
				if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .tokenization_splinter_fast import SplinterTokenizerFast

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_splinter import (
				    SPLINTER_PRETRAINED_MODEL_ARCHIVE_LIST,
				    SplinterForPreTraining,
				    SplinterForQuestionAnswering,
				    SplinterLayer,
				    SplinterModel,
				    SplinterPreTrainedModel,
				)


else:
		import sys

		__UpperCAmelCase						  =     _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





