def       __magic_name__(  __UpperCAmelCase ,						__UpperCAmelCase		)						->    bool:



      '''simple docstring'''

      _lowerCamelCase			    =				len(__UpperCAmelCase		)
      _lowerCamelCase			    =				[[False] * (required_sum + 1) for _ in range(arr_len + 1		)]

      # for each arr value, a sum of zero(0) can be formed by not taking any element
      # hence True/1
      for i in range(arr_len + 1		):
            _lowerCamelCase			    =				True

      # sum is not zero and set is empty then false
      for i in range(1 ,						required_sum + 1		):
            _lowerCamelCase			    =				False

      for i in range(1 ,						arr_len + 1		):
            for j in range(1 ,						required_sum + 1		):
                  if arr[i - 1] > j:
                        _lowerCamelCase			    =				subset[i - 1][j]
                  if arr[i - 1] <= j:
                        _lowerCamelCase			    =				subset[i - 1][j] or subset[i - 1][j - arr[i - 1]]

      return subset[arr_len][required_sum]


if __name__ == "__main__":
     import doctest

     doctest.testmod()
import argparse
import json
import subprocess
def       __magic_name__(  __UpperCAmelCase ,						__UpperCAmelCase		)						->    int:



      '''simple docstring'''

      _lowerCamelCase			    =				[]

      _lowerCamelCase			    =				(
          F'curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer {token}"'
          ''' https://api.github.com/repos/huggingface/transformers/actions/runners'''
      )
      _lowerCamelCase			    =				subprocess.run(__UpperCAmelCase ,						shell=__UpperCAmelCase ,						stdout=subprocess.PIPE		)
      _lowerCamelCase			    =				output.stdout.decode('''utf-8'''		)
      _lowerCamelCase			    =				json.loads(__UpperCAmelCase		)

      _lowerCamelCase			    =				status['''runners''']
      for runner in runners:
            if runner["name"] in target_runners:
                  if runner["status"] == "offline":
                        offline_runners.append(__UpperCAmelCase		)

    # save the result so we can report them on Slack
      with open('''offline_runners.txt''' ,						'''w'''		) as fp:
            fp.write(json.dumps(__UpperCAmelCase		)		)

      if len(__UpperCAmelCase		) > 0:
            _lowerCamelCase			    =				'''\n'''.join([x['''name'''] for x in offline_runners]		)
            raise ValueError(F'The following runners are offline:\n{failed}'		)


if __name__ == "__main__":
     def       __magic_name__(  __UpperCAmelCase		)						->    str:



           '''simple docstring'''

           return values.split(''','''		)

     snake_case__				= argparse.ArgumentParser()
     # Required parameters
     parser.add_argument(
         '--target_runners',
         default=None,
         type=list_str,
         required=True,
         help='Comma-separated list of runners to check status.',
     )

     parser.add_argument(
         '--token', default=None, type=str, required=True, help='A token that has actions:read permission.'
     )
     snake_case__				= parser.parse_args()




     get_runner_status(args.target_runners, args.token)