





'''simple docstring'''






import datasets

from .evaluate import evaluate


__lowerCamelCase						: List[Any]		=   '\\n@inproceedings{Rajpurkar2016SQuAD10,\n  title={SQuAD: 100, 000+ Questions for Machine Comprehension of Text},\n  author={Pranav Rajpurkar and Jian Zhang and Konstantin Lopyrev and Percy Liang},\n  booktitle={EMNLP},\n  year={2016}\n}\n'

__lowerCamelCase						: str		=   '\nThis metric wrap the official scoring script for version 1 of the Stanford Question Answering Dataset (SQuAD).\n\nStanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by\ncrowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span,\nfrom the corresponding reading passage, or the question might be unanswerable.\n'

__lowerCamelCase						: Dict		=   '\nComputes SQuAD scores (F1 and EM).\nArgs:\n    predictions: List of question-answers dictionaries with the following key-values:\n        - \'id\': id of the question-answer pair as given in the references (see below)\n        - \'prediction_text\': the text of the answer\n    references: List of question-answers dictionaries with the following key-values:\n        - \'id\': id of the question-answer pair (see above),\n        - \'answers\': a Dict in the SQuAD dataset format\n            {\n                \'text\': list of possible texts for the answer, as a list of strings\n                \'answer_start\': list of start positions for the answer, as a list of ints\n            }\n            Note that answer_start values are not taken into account to compute the metric.\nReturns:\n    \'exact_match\': Exact match (the normalized answer exactly match the gold answer)\n    \'f1\': The F-score of predicted tokens versus the gold answer\nExamples:\n\n    >>> predictions = [{\'prediction_text\': \'1976\', \'id\': \'56e10a3be3433e1400422b22\'}]\n    >>> references = [{\'answers\': {\'answer_start\': [97], \'text\': [\'1976\']}, \'id\': \'56e10a3be3433e1400422b22\'}]\n    >>> squad_metric = datasets.load_metric(\"squad\")\n    >>> results = squad_metric.compute(predictions=predictions, references=references)\n    >>> print(results)\n    {\'exact_match\': 100.0, \'f1\': 100.0}\n'







@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION   ,     _KWARGS_DESCRIPTION)
class 		UpperCAmelCase   (				datasets.Metric):


		"""simple docstring"""







		def   UpperCamelCase__      (				self    :					str  )     ->						Optional[Any]:
				return datasets.MetricInfo(
				    description=_DESCRIPTION							,	citation=_CITATION							,	inputs_description=_KWARGS_DESCRIPTION							,	features=datasets.Features(
				        {
				            '''predictions''': {'''id''': datasets.Value('''string'''  ), '''prediction_text''': datasets.Value('''string'''  )},
				            '''references''': {
				                '''id''': datasets.Value('''string'''  ),
				                '''answers''': datasets.features.Sequence(
				                    {
				                        '''text''': datasets.Value('''string'''  ),
				                        '''answer_start''': datasets.Value('''int32'''  ),
				                    }  ),
				            },
				        }  )							,	codebase_urls=['''https://rajpurkar.github.io/SQuAD-explorer/''']							,	reference_urls=['''https://rajpurkar.github.io/SQuAD-explorer/''']							,	)




		def   UpperCamelCase__      (				self    :					Union[str, Any]							,	UpperCamelCase__    :					int							,	UpperCamelCase__    :					str  )     ->						Union[str, Any]:
				_UpperCamelCase       			={prediction['''id''']: prediction['''prediction_text'''] for prediction in predictions}
				_UpperCamelCase       			=[
				    {
				        '''paragraphs''': [
				            {
				                '''qas''': [
				                    {
				                        '''answers''': [{'''text''': answer_text} for answer_text in ref['''answers''']['''text''']],
				                        '''id''': ref['''id'''],
				                    }
				                    for ref in references
				                ]
				            }
				        ]
				    }
				]
				_UpperCamelCase       			=evaluate(dataset=__lowercase							,	predictions=__lowercase  )
				return score













'''simple docstring'''






import argparse
import datetime


def 					_a   (__SCREAMING_SNAKE_CASE   ):


  """simple docstring"""

  _UpperCamelCase       			={
      '''0''': '''Sunday''',
      '''1''': '''Monday''',
      '''2''': '''Tuesday''',
      '''3''': '''Wednesday''',
      '''4''': '''Thursday''',
      '''5''': '''Friday''',
      '''6''': '''Saturday''',
  }

  _UpperCamelCase       			={0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 0}

  # Validate
  if not 0 < len(__SCREAMING_SNAKE_CASE   ) < 11:
    raise ValueError('''Must be 10 characters long'''   )

  # Get month
  _UpperCamelCase       			=int(date_input[0] + date_input[1]   )
  # Validate
  if not 0 < m < 13:
    raise ValueError('''Month must be between 1 - 12'''   )

  _UpperCamelCase       			=date_input[2]
  # Validate
  if sep_a not in ["-", "/"]:
    raise ValueError('''Date separator must be \'-\' or \'/\''''   )

  # Get day
  _UpperCamelCase       			=int(date_input[3] + date_input[4]   )
  # Validate
  if not 0 < d < 32:
    raise ValueError('''Date must be between 1 - 31'''   )

  # Get second separator
  _UpperCamelCase       			=date_input[5]
  # Validate
  if sep_a not in ["-", "/"]:
    raise ValueError('''Date separator must be \'-\' or \'/\''''   )

  # Get year
  _UpperCamelCase       			=int(date_input[6] + date_input[7] + date_input[8] + date_input[9]   )
  # Arbitrary year range
  if not 45 < y < 8500:
    raise ValueError(
        '''Year out of range. There has to be some sort of limit...right?'''   )

  # Get datetime obj for validation
  _UpperCamelCase       			=datetime.date(int(__SCREAMING_SNAKE_CASE   )  ,      int(__SCREAMING_SNAKE_CASE   )  ,      int(__SCREAMING_SNAKE_CASE   )   )

  # Start math
  if m <= 2:
    _UpperCamelCase       			=y - 1
    _UpperCamelCase       			=m + 12
  # maths var
  _UpperCamelCase       			=int(str(__SCREAMING_SNAKE_CASE   )[:2]   )
  _UpperCamelCase       			=int(str(__SCREAMING_SNAKE_CASE   )[2:]   )
  _UpperCamelCase       			=int(2.6 * m - 5.3_9   )
  _UpperCamelCase       			=int(c / 4   )
  _UpperCamelCase       			=int(k / 4   )
  _UpperCamelCase       			=int(d + k   )
  _UpperCamelCase       			=int(t + u + v + x   )
  _UpperCamelCase       			=int(z - (2 * c)   )
  _UpperCamelCase       			=round(w % 7   )
  # End math

  # Validate math
  if f != convert_datetime_days[dt_ck.weekday()]:
    raise AssertionError('''The date was evaluated incorrectly. Contact developer.'''   )

  # Response
  _UpperCamelCase       			=f'''Your date {date_input}, is a {days[str(__SCREAMING_SNAKE_CASE   )]}!'''
  return response


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      __lowerCamelCase						: List[Any]		=   argparse.ArgumentParser(
          description=(
              'Find out what day of the week nearly any date is or was. Enter '
              'date as a string in the mm-dd-yyyy or mm/dd/yyyy format'
          )
      )
      parser.add_argument(
          'date_input', type=str, help='Date as a string (mm-dd-yyyy or mm/dd/yyyy)'
      )
      __lowerCamelCase						: Union[str, Any]		=   parser.parse_args()
      zeller(args.date_input)






