






'''simple docstring'''
import re
import string

import numpy as np

import datasets


__snake_case											=					'''
Returns the rate at which the input predicted strings exactly match their references, ignoring any strings input as part of the regexes_to_ignore list.
'''

__snake_case											=					'''
Args:
    predictions: List of predicted texts.
    references: List of reference texts.
    regexes_to_ignore: List, defaults to None. Regex expressions of characters to
        ignore when calculating the exact matches. Note: these regexes are removed
        from the input data before the changes based on the options below (e.g. ignore_case,
        ignore_punctuation, ignore_numbers) are applied.
    ignore_case: Boolean, defaults to False. If true, turns everything
        to lowercase so that capitalization differences are ignored.
    ignore_punctuation: Boolean, defaults to False. If true, removes all punctuation before
        comparing predictions and references.
    ignore_numbers: Boolean, defaults to False. If true, removes all punctuation before
        comparing predictions and references.
Returns:
    exact_match: Dictionary containing exact_match rate. Possible values are between 0.0 and 100.0, inclusive.
Examples:
    >>> exact_match = datasets.load_metric("exact_match")
    >>> refs = ["the cat", "theater", "YELLING", "agent007"]
    >>> preds = ["cat?", "theater", "yelling", "agent"]
    >>> results = exact_match.compute(references=refs, predictions=preds)
    >>> print(round(results["exact_match"], 1))
    25.0

    >>> exact_match = datasets.load_metric("exact_match")
    >>> refs = ["the cat", "theater", "YELLING", "agent007"]
    >>> preds = ["cat?", "theater", "yelling", "agent"]
    >>> results = exact_match.compute(references=refs, predictions=preds, regexes_to_ignore=["the ", "yell"], ignore_case=True, ignore_punctuation=True)
    >>> print(round(results["exact_match"], 1))
    50.0


    >>> exact_match = datasets.load_metric("exact_match")
    >>> refs = ["the cat", "theater", "YELLING", "agent007"]
    >>> preds = ["cat?", "theater", "yelling", "agent"]
    >>> results = exact_match.compute(references=refs, predictions=preds, regexes_to_ignore=["the ", "yell", "YELL"], ignore_case=True, ignore_punctuation=True)
    >>> print(round(results["exact_match"], 1))
    75.0

    >>> exact_match = datasets.load_metric("exact_match")
    >>> refs = ["the cat", "theater", "YELLING", "agent007"]
    >>> preds = ["cat?", "theater", "yelling", "agent"]
    >>> results = exact_match.compute(references=refs, predictions=preds, regexes_to_ignore=["the ", "yell", "YELL"], ignore_case=True, ignore_punctuation=True, ignore_numbers=True)
    >>> print(round(results["exact_match"], 1))
    100.0

    >>> exact_match = datasets.load_metric("exact_match")
    >>> refs = ["The cat sat on the mat.", "Theaters are great.", "It\'s like comparing oranges and apples."]
    >>> preds = ["The cat sat on the mat?", "Theaters are great.", "It\'s like comparing apples and oranges."]
    >>> results = exact_match.compute(references=refs, predictions=preds)
    >>> print(round(results["exact_match"], 1))
    33.3

'''

__snake_case											=					'''
'''
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION     ,		_KWARGS_DESCRIPTION )
class        lowercase     (							datasets.Metric ):

		"""simple docstring"""

		def    lowerCAmelCase__    (		self							):

							'''simple docstring'''


							return datasets.MetricInfo(
							    description=_DESCRIPTION   ,       citation=_CITATION   ,       inputs_description=_KWARGS_DESCRIPTION   ,       features=datasets.Features(
							        {
							            '''predictions''': datasets.Value('''string'''   ,       id='''sequence'''							),
							            '''references''': datasets.Value('''string'''   ,       id='''sequence'''							),
							        }							)   ,       reference_urls=[]   ,       )




		def    lowerCAmelCase__    (		self   ,       UpperCamelCase_   ,       UpperCamelCase_   ,       UpperCamelCase_=None   ,       UpperCamelCase_=False   ,       UpperCamelCase_=False   ,       UpperCamelCase_=False   ,       ):

							'''simple docstring'''


							if regexes_to_ignore is not None:
												for s in regexes_to_ignore:
																	UpperCamelCase__       :Dict							 =			np.array([re.sub(lowerCAmelCase__   ,       ''''''   ,       lowerCAmelCase__							) for x in predictions]							)
																	UpperCamelCase__       :Union[str, Any]							 =			np.array([re.sub(lowerCAmelCase__   ,       ''''''   ,       lowerCAmelCase__							) for x in references]							)
							else:
												UpperCamelCase__       :Any							 =			np.asarray(lowerCAmelCase__							)
												UpperCamelCase__       :List[Any]							 =			np.asarray(lowerCAmelCase__							)

							if ignore_case:
												UpperCamelCase__       :Union[str, Any]							 =			np.char.lower(lowerCAmelCase__							)
												UpperCamelCase__       :Any							 =			np.char.lower(lowerCAmelCase__							)

							if ignore_punctuation:
												UpperCamelCase__       :str							 =			string.punctuation.maketrans(''''''   ,       ''''''   ,       string.punctuation							)
												UpperCamelCase__       :List[str]							 =			np.char.translate(lowerCAmelCase__   ,       table=lowerCAmelCase__							)
												UpperCamelCase__       :Any							 =			np.char.translate(lowerCAmelCase__   ,       table=lowerCAmelCase__							)

							if ignore_numbers:
												UpperCamelCase__       :List[str]							 =			string.digits.maketrans(''''''   ,       ''''''   ,       string.digits							)
												UpperCamelCase__       :Any							 =			np.char.translate(lowerCAmelCase__   ,       table=lowerCAmelCase__							)
												UpperCamelCase__       :Any							 =			np.char.translate(lowerCAmelCase__   ,       table=lowerCAmelCase__							)

							UpperCamelCase__       :List[Any]							 =			predictions == references

							return {"exact_match": np.mean(lowerCAmelCase__							) * 100}



'''simple docstring'''
from __future__ import annotations

import math


def       a				(      __a       )  ->     bool:



					'''simple docstring'''






					if 1 < number < 4:
										# 2 and 3 are primes
										return True
					elif number < 2 or number % 2 == 0 or number % 3 == 0:
										# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
										return False

					# All primes number are in format of 6k +/- 1
					for i in range(5			, int(math.sqrt(__a       ) + 1       )			, 6       ):
										if number % i == 0 or number % (i + 2) == 0:
															return False
					return True


def       a				(      __a       )  ->     list[int]:



					'''simple docstring'''






					UpperCamelCase__       :List[Any]							 =			str(__a       )
					UpperCamelCase__       :Dict							 =			[n]
					for i in range(1			, len(__a       )       ):
										list_nums.append(int(str_num[i:]       )       )
										list_nums.append(int(str_num[:-i]       )       )
					return list_nums


def       a				(      __a       )  ->     bool:



					'''simple docstring'''






					if len(str(__a       )       ) > 3:
										if not is_prime(int(str(__a       )[-3:]       )       ) or not is_prime(int(str(__a       )[:3]       )       ):
															return False
					return True


def       a				(      __a = 11       )  ->     list[int]:



					'''simple docstring'''






					UpperCamelCase__       :list[int]							 =			[]
					UpperCamelCase__       :int							 =			13
					while len(__a       ) != count:
										if validate(__a       ):
															UpperCamelCase__       :Optional[int]							 =			list_truncated_nums(__a       )
															if all(is_prime(__a       ) for i in list_nums       ):
																				list_truncated_primes.append(__a       )
										num += 2
					return list_truncated_primes


def       a				(      )  ->     int:



					'''simple docstring'''






					return sum(compute_truncated_primes(11       )       )


if __name__ == "__main__":
		print(F"""{sum(compute_truncated_primes(11)) = }""")