





import sys

UpperCAmelCase     :     Any							=	(
    """73167176531330624919225119674426574742355349194934"""
    """96983520312774506326239578318016984801869478851843"""
    """85861560789112949495459501737958331952853208805511"""
    """12540698747158523863050715693290963295227443043557"""
    """66896648950445244523161731856403098711121722383113"""
    """62229893423380308135336276614282806444486645238749"""
    """30358907296290491560440772390713810515859307960866"""
    """70172427121883998797908792274921901699720888093776"""
    """65727333001053367881220235421809751254540594752243"""
    """52584907711670556013604839586446706324415722155397"""
    """53697817977846174064955149290862569321978468622482"""
    """83972241375657056057490261407972968652414535100474"""
    """82166370484403199890008895243450658541227588666881"""
    """16427171479924442928230863465674813919123162824586"""
    """17866458359124566529476545682848912883142607690042"""
    """24219022671055626321111109370544217506941658960408"""
    """07198403850962455444362981230987879927244284909188"""
    """84580156166097919133875499200524063689912560717606"""
    """05886116467109405077541002256983155200055935729725"""
    """71636269561882670428252483600823257530420752963450"""
)
def 					_A	(		SCREAMING_SNAKE_CASE					:       str = N						):





  """simple docstring"""



  a__     : Dict  =-sys.maxsize - 1
  for i in range(len(SCREAMING_SNAKE_CASE						) - 12						):
    a__     : Union[str, Any]  =1
    for j in range(13						):
      product *= int(n[i + j]						)
    if product > largest_product:
      a__     : Optional[Any]  =product
  return largest_product


if __name__ == "__main__":
     print(F"""{solution() = }""")













import argparse
import json
import os
import time
import zipfile

from get_ci_error_statistics import download_artifact, get_artifacts_links

from transformers import logging


UpperCAmelCase     :     Union[str, Any]							=	logging.get_logger(__name__)
def 					_A	(		SCREAMING_SNAKE_CASE					:       Optional[int]	,	SCREAMING_SNAKE_CASE					:       List[Any]						):





  """simple docstring"""



  a__     : Tuple  =set()
  a__     : Optional[Any]  =[]

  def parse_line(SCREAMING_SNAKE_CASE					:       Optional[int]						):
    for line in fp:
      if isinstance(SCREAMING_SNAKE_CASE	,	SCREAMING_SNAKE_CASE						):
        a__     : str  =line.decode("UTF-8"						)
      if "warnings summary (final)" in line:
        continue
      # This means we are outside the body of a warning
      elif not line.startswith(" "						):
        # process a single warning and move it to `selected_warnings`.
        if len(SCREAMING_SNAKE_CASE						) > 0:
          a__     : Union[str, Any]  ="\n".join(SCREAMING_SNAKE_CASE						)
          # Only keep the warnings specified in `targets`
          if any(f''': {x}: ''' in warning for x in targets						):
            selected_warnings.add(SCREAMING_SNAKE_CASE						)
          buffer.clear()
        continue
      else:
        a__     : Optional[Any]  =line.strip()
        buffer.append(SCREAMING_SNAKE_CASE						)

  if from_gh:
    for filename in os.listdir(SCREAMING_SNAKE_CASE						):
      a__     : str  =os.path.join(SCREAMING_SNAKE_CASE	,	SCREAMING_SNAKE_CASE						)
      if not os.path.isdir(SCREAMING_SNAKE_CASE						):
        # read the file
        if filename != "warnings.txt":
          continue
        with open(SCREAMING_SNAKE_CASE						) as fp:
          parse_line(SCREAMING_SNAKE_CASE						)
  else:
    try:
      with zipfile.ZipFile(SCREAMING_SNAKE_CASE						) as z:
        for filename in z.namelist():
          if not os.path.isdir(SCREAMING_SNAKE_CASE						):
            # read the file
            if filename != "warnings.txt":
              continue
            with z.open(SCREAMING_SNAKE_CASE						) as fp:
              parse_line(SCREAMING_SNAKE_CASE						)
    except Exception:
      logger.warning(
          f'''{artifact_path} is either an invalid zip file or something else wrong. This file is skipped.'''						)

  return selected_warnings
def 					_A	(		SCREAMING_SNAKE_CASE					:       List[Any]	,	SCREAMING_SNAKE_CASE					:       Optional[Any]						):





  """simple docstring"""



  a__     : Optional[int]  =set()

  a__     : Any  =[os.path.join(SCREAMING_SNAKE_CASE	,	SCREAMING_SNAKE_CASE						) for p in os.listdir(SCREAMING_SNAKE_CASE						) if (p.endswith(".zip"						) or from_gh)]
  for p in paths:
    selected_warnings.update(extract_warnings_from_single_artifact(SCREAMING_SNAKE_CASE	,	SCREAMING_SNAKE_CASE						)						)

  return selected_warnings


if __name__ == "__main__":
     def 					_A	(		SCREAMING_SNAKE_CASE					:       Optional[int]						):





       """simple docstring"""



       return values.split(","						)

     UpperCAmelCase     :     Any							=	argparse.ArgumentParser()
     # Required parameters
     parser.add_argument("""--workflow_run_id""", type=str, required=True, help="""A GitHub Actions workflow run id.""")
     parser.add_argument(
         """--output_dir""",
         type=str,
         required=True,
         help="""Where to store the downloaded artifacts and other result files.""",
     )
     parser.add_argument("""--token""", default=None, type=str, help="""A token that has actions:read permission.""")
     # optional parameters
     parser.add_argument(
         """--targets""",
         default="""DeprecationWarning,UserWarning,FutureWarning""",
         type=list_str,
         help="""Comma-separated list of target warning(s) which we want to extract.""",
     )
     parser.add_argument(
         """--from_gh""",
         action="""store_true""",
         help="""If running from a GitHub action workflow and collecting warnings from its artifacts.""",
     )

     UpperCAmelCase     :     List[Any]							=	parser.parse_args()

     UpperCAmelCase     :     str							=	args.from_gh
     if from_gh:
          # The artifacts have to be downloaded using `actions/download-artifact@v3`
          pass
     else:
          os.makedirs(args.output_dir, exist_ok=True)

          # get download links
          UpperCAmelCase     :     Dict							=	get_artifacts_links(args.workflow_run_id, token=args.token)
          with open(os.path.join(args.output_dir, """artifacts.json"""), """w""", encoding="""UTF-8""") as fp:
               json.dump(artifacts, fp, ensure_ascii=False, indent=4)

          # download artifacts
          for idx, (name, url) in enumerate(artifacts.items()):
               print(name)
               print(url)
               print("""=""" * 80)
               download_artifact(name, url, args.output_dir, args.token)
               # Be gentle to GitHub
               time.sleep(1)

    # extract warnings from artifacts
     UpperCAmelCase     :     Tuple							=	extract_warnings(args.output_dir, args.targets)
     UpperCAmelCase     :     Optional[Any]							=	sorted(selected_warnings)
     with open(os.path.join(args.output_dir, """selected_warnings.json"""), """w""", encoding="""UTF-8""") as fp:
          json.dump(selected_warnings, fp, ensure_ascii=False, indent=4)






