


"""simple docstring"""


from collections.abc import Sequence



def   snake_case						(				_a:     Sequence[int] | None = None							)->		int:
      '''simple docstring'''


      if nums is None or not nums:
            raise ValueError('Input sequence should not be empty'							)

      lowerCamelCase__           =		nums[0]
      for i in range(1		,   len(_a							)							):
            lowerCamelCase__           =		nums[i]
            lowerCamelCase__           =		max(_a		,   ans + num		,   _a							)

      return ans


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   # Try on a sample input from the user
   _snake_case          =							int(input("Enter number of elements : ").strip())
   _snake_case          =							list(map(int, input("\nEnter the numbers : ").strip().split()))[:n]
   print(max_subsequence_sum(array))







"""simple docstring"""


import argparse
import json

from tqdm import tqdm



def   snake_case						(				)->		List[Any]:
      '''simple docstring'''


      lowerCamelCase__           =		argparse.ArgumentParser()

      # Required parameters
      parser.add_argument(
          '--src_path'		,   type=_a		,   default='biencoder-nq-dev.json'		,   help='Path to raw DPR training data'		,   )
      parser.add_argument(
          '--evaluation_set'		,   type=_a		,   help='where to store parsed evaluation_set file'		,   )
      parser.add_argument(
          '--gold_data_path'		,   type=_a		,   help='where to store parsed gold_data_path file'		,   )
      lowerCamelCase__           =		parser.parse_args()

      with open(args.src_path		,   'r'							) as src_file, open(args.evaluation_set		,   'w'							) as eval_file, open(
          args.gold_data_path		,   'w'							) as gold_file:
            lowerCamelCase__           =		json.load(_a							)
            for dpr_record in tqdm(_a							):
                  lowerCamelCase__           =		dpr_record['question']
                  lowerCamelCase__           =		[context['title'] for context in dpr_record['positive_ctxs']]
                  eval_file.write(question + '\n'							)
                  gold_file.write('\t'.join(_a							) + '\n'							)


if __name__ == "__main__":
   main()



