


"""simple docstring"""





import math





def      lowercase__						(	lowerCamelCase  :	Optional[Any]					,						lowerCamelCase  :	List[Any]					)       ->  List[str]:

  if initial_intensity < 0:
    raise ValueError("The value of intensity cannot be negative"					)
    # handling of negative values of initial intensity
  if angle < 0 or angle > 3_6_0:
    raise ValueError("In Malus Law, the angle is in the range 0-360 degrees"					)
    # handling of values out of allowed range
  return initial_intensity * (math.cos(math.radians(lowerCamelCase					)					) ** 2)


if __name__ == "__main__":
   import doctest

   doctest.testmod(name="malus_law")

"""simple docstring"""



import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin
class 						__UpperCAmelCase    (unittest.TestCase							,   __A     ):







			'''simple docstring'''





			def 		lowerCamelCase					(			self							):







										'''simple docstring'''


										A__       :     List[Any]								=			load_tool("""text-classification"""							)
										self.tool.setup()
										A__       :     Any								=			load_tool("""text-classification"""   ,      remote=snake_case_							)





			def 		lowerCamelCase					(			self							):







										'''simple docstring'''


										A__       :     int								=			self.tool("""That's quite cool"""   ,      ["""positive""", """negative"""]							)
										self.assertEqual(snake_case_   ,      """positive"""							)





			def 		lowerCamelCase					(			self							):







										'''simple docstring'''


										A__       :     Optional[Any]								=			self.remote_tool("""That's quite cool"""   ,      ["""positive""", """negative"""]							)
										self.assertEqual(snake_case_   ,      """positive"""							)





			def 		lowerCamelCase					(			self							):







										'''simple docstring'''


										A__       :     str								=			self.tool(text="""That's quite cool"""   ,      labels=["""positive""", """negative"""]							)
										self.assertEqual(snake_case_   ,      """positive"""							)





			def 		lowerCamelCase					(			self							):







										'''simple docstring'''


										A__       :     int								=			self.remote_tool(text="""That's quite cool"""   ,      labels=["""positive""", """negative"""]							)
										self.assertEqual(snake_case_   ,      """positive"""							)





