




import argparse
import json

from tqdm import tqdm





def        __UpperCAmelCase						(							)       ->  List[Any]:







			"""simple docstring"""





			SCREAMING_SNAKE_CASE_   : Dict					  =      argparse.ArgumentParser()

			# Required parameters
			parser.add_argument(
			    '--src_path'  ,							type=lowerCamelCase_  ,							default='biencoder-nq-dev.json'  ,							help='Path to raw DPR training data'  ,							)
			parser.add_argument(
			    '--evaluation_set'  ,							type=lowerCamelCase_  ,							help='where to store parsed evaluation_set file'  ,							)
			parser.add_argument(
			    '--gold_data_path'  ,							type=lowerCamelCase_  ,							help='where to store parsed gold_data_path file'  ,							)
			SCREAMING_SNAKE_CASE_   : List[str]					  =      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:
						SCREAMING_SNAKE_CASE_   : Union[str, Any]					  =      json.load(lowerCamelCase_  )
						for dpr_record in tqdm(lowerCamelCase_  ):
									SCREAMING_SNAKE_CASE_   : Optional[Any]					  =      dpr_record['question']
									SCREAMING_SNAKE_CASE_   : List[Any]					  =      [context['title'] for context in dpr_record['positive_ctxs']]
									eval_file.write(question + '\n'  )
									gold_file.write('\t'.join(lowerCamelCase_  ) + '\n'  )


if __name__ == "__main__":
						main()








"""simple docstring"""

def  __snake_case							(	__A      :						int							,		__A      :						int     )     ->       float:






				'''simple docstring'''
				return base * power(__A							,		(exponent - 1)     ) if exponent else 1


if __name__ == "__main__":
							print('Raise base to the power of exponent using recursion...')
							A_						:    str				=      int(input('Enter the base: ').strip())
							A_						:    Dict				=      int(input('Enter the exponent: ').strip())
							A_						:    List[str]				=      power(base, abs(exponent))
							if exponent < 0:  # power() does not properly deal w/ negative exponents
														A_						:    Any				=      1 / result
							print(f'''{base} to the power of {exponent} is {result}''')





