


'''simple docstring'''






class        __snake_case	:







    """simple docstring"""



    def __init__(       self   :  int   ,						lowerCamelCase   :  list[int]		)       ->  None:
      lowerCAmelCase_      :				Optional[Any]      =       len(lowerCamelCase		)
      lowerCAmelCase_      :				Optional[int]      =       [0] * len_array

      if len_array > 0:
        lowerCAmelCase_      :				List[str]      =       array[0]

      for i in range(1   ,						lowerCamelCase		):
        lowerCAmelCase_      :				Any      =       self.prefix_sum[i - 1] + array[i]

    def __lowercase       (       self   :  str   ,						lowerCamelCase   :  int   ,						lowerCamelCase   :  int		)       ->  int:
      if start == 0:
        return self.prefix_sum[end]

      return self.prefix_sum[end] - self.prefix_sum[start - 1]





    def __lowercase       (       self   :  str   ,						lowerCamelCase   :  int		)       ->  bool:
      lowerCAmelCase_      :				Optional[Any]      =       {0}
      for sum_item in self.prefix_sum:
        if sum_item - target_sum in sums:
          return True

        sums.add(lowerCamelCase		)

      return False


if __name__ == "__main__":
  import doctest

  doctest.testmod()







'''simple docstring'''






import requests







def     UpperCamelCase_      (   A__ :       str							,   A__ :       str ):
  '''simple docstring'''





  lowerCAmelCase_      :				Optional[Any]      =       {"""Content-Type""": """application/json"""}
  lowerCAmelCase_      :				Union[str, Any]      =       requests.post(A__							,   json={"""text""": message_body}							,   headers=A__ )
  if response.status_code != 2_00:
    lowerCAmelCase_      :				Dict      =       (
        """Request to slack returned an error """
        f'{response.status_code}, the response is:\n{response.text}'
    )
    raise ValueError(A__ )


if __name__ == "__main__":
  # Set the slack url to the one provided by Slack when you create the webhook at
  # https://my.slack.com/services/new/incoming-webhook/
  send_slack_message("<YOUR MESSAGE BODY>", "<SLACK CHANNEL URL>")



