
"""simple docstring"""
def 				a__   (   a   :				List[Any]       ,     a   :				str		):

  """simple docstring"""







  _snake_case     :						List[str]						=   len(_snake_case		) + 1
  _snake_case     :						int						=   len(_snake_case		) + 1

  # dp is a 2d matrix where dp[i][j] denotes whether prefix string of
  # length i of input_string matches with prefix string of length j of
  # given pattern.
  # "dp" stands for dynamic programming.
  _snake_case     :						Optional[Any]						=   [[0 for i in range(_snake_case		)] for j in range(_snake_case		)]

  # since string of zero length match pattern of zero length
  _snake_case     :						Tuple						=   1

  # since pattern of zero length will never match with string of non-zero length
  for i in range(1       ,     _snake_case		):
    _snake_case     :						int						=   0

  # since string of zero length will match with pattern where there
  # is at least one * alternatively
  for j in range(1       ,     _snake_case		):
    _snake_case     :						Union[str, Any]						=   dp[0][j - 2] if pattern[j - 1] == "*" else 0

  # now using bottom-up approach to find for all remaining lengths
  for i in range(1       ,     _snake_case		):
    for j in range(1       ,     _snake_case		):
      if input_string[i - 1] == pattern[j - 1] or pattern[j - 1] == ".":
        _snake_case     :						str						=   dp[i - 1][j - 1]

      elif pattern[j - 1] == "*":
        if dp[i][j - 2] == 1:
          _snake_case     :						Any						=   1
        elif pattern[j - 2] in (input_string[i - 1], "."):
          _snake_case     :						int						=   dp[i - 1][j]
        else:
          _snake_case     :						Optional[int]						=   0
      else:
        _snake_case     :						str						=   0

  return bool(dp[-1][-1]		)


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    # inputing the strings
    # input_string = input("input a string :")
    # pattern = input("input a pattern :")

    _a      :			Optional[int]					=							"""aab"""
    _a      :			Optional[Any]					=							"""c*a*b"""

    # using function to check whether given string matches the given pattern
    if match_pattern(input_string, pattern):
        print(f'{input_string} matches the given pattern {pattern}')
    else:
        print(f'{input_string} does not match with the given pattern {pattern}')

"""simple docstring"""
from __future__ import annotations

from numpy import array, cos, cross, floataa, radians, sin
from numpy.typing import NDArray
def 				a__   (   a   :				float       ,     a   :				float       ,     a   :				bool = False		):

  """simple docstring"""







  if radian_mode:
    return [magnitude * cos(a		), magnitude * sin(a		)]
  return [magnitude * cos(radians(a		)		), magnitude * sin(radians(a		)		)]
def 				a__   (   a   :				NDArray[floataa]       ,     a   :				NDArray[floataa]       ,     a   :				float = 10**-1		):

  """simple docstring"""







  _snake_case     :						NDArray[floataa]						=   cross(a       ,     a		)
  _snake_case     :						float						=   sum(a		)
  return abs(a		) < eps


if __name__ == "__main__":
    # Test to check if it works
    _a      :			Tuple					=							array(
        [
            polar_force(718.4, 180 - 30),
            polar_force(879.54, 45),
            polar_force(100, -90),
        ]
    )

    _a      :			NDArray[floataa]					=							array([[0, 0], [0, 0], [0, 0]])

    assert in_static_equilibrium(forces, location)

    # Problem 1 in image_data/2D_problems.jpg
    _a      :			List[Any]					=							array(
        [
            polar_force(30 * 9.81, 15),
            polar_force(215, 180 - 45),
            polar_force(264, 90 - 30),
        ]
    )

    _a      :			List[Any]					=							array([[0, 0], [0, 0], [0, 0]])

    assert in_static_equilibrium(forces, location)

    # Problem in image_data/2D_problems_1.jpg
    _a      :			List[str]					=							array([[0, -2_000], [0, -1_200], [0, 15_600], [0, -12_400]])

    _a      :			Optional[int]					=							array([[0, 0], [6, 0], [10, 0], [12, 0]])

    assert in_static_equilibrium(forces, location)

    import doctest

    doctest.testmod()

