


"""simple docstring"""



from collections.abc import Sequence







def   __lowerCAmelCase						(						lowercase  :  Sequence[float]						,							lowercase  :  bool = False			)     ->						float:


    """simple docstring"""





    if not arr:
        return 0

    snake_case   :				Dict				 =   0 if allow_empty_subarrays else float("-inf"			)
    snake_case   :				Optional[Any]				 =   0.0
    for num in arr:
        snake_case   :				int				 =   max(0 if allow_empty_subarrays else num						,							curr_sum + num			)
        snake_case   :				Tuple				 =   max(lowercase						,							lowercase			)

    return max_sum


if __name__ == "__main__":
  from doctest import testmod

  testmod()

  __snake_case             =   [-2, 1, -3, 4, -1, 2, 1, -5, 4]
  print(F'''{max_subarray_sum(nums) = }''')









"""simple docstring"""



import string







def   __lowerCAmelCase						(						lowercase  :  str			)     ->						str:


    """simple docstring"""





    snake_case   :				List[str]				 =   ""
    for i in sequence:
        snake_case   :				Optional[Any]				 =   ord(lowercase			)
        if 65 <= extract <= 90:
            output += chr(155 - extract			)
        elif 97 <= extract <= 122:
            output += chr(219 - extract			)
        else:
            output += i
    return output







def   __lowerCAmelCase						(						lowercase  :  str			)     ->						str:


    """simple docstring"""





    snake_case   :				Dict				 =   string.ascii_letters
    snake_case   :				List[Any]				 =   string.ascii_lowercase[::-1] + string.ascii_uppercase[::-1]
    return "".join(
        letters_reversed[letters.index(lowercase			)] if c in letters else c for c in sequence			)







def   __lowerCAmelCase						(						)     ->						None:


    """simple docstring"""





    from timeit import timeit

    print("Running performance benchmarks..."			)
    snake_case   :				Optional[int]				 =   "from string import printable ; from __main__ import atbash, atbash_slow"
    print(F'> atbash_slow(): {timeit("atbash_slow(printable)"						,							setup=lowercase			)} seconds'			)
    print(F'>      atbash(): {timeit("atbash(printable)"						,							setup=lowercase			)} seconds'			)


if __name__ == "__main__":
  for example in ("ABCDEFGH", "123GGjj", "testStringtest", "with space"):
    print(F'''{example} encrypted in atbash: {atbash(example)}''')
  benchmark()





