


"""simple docstring"""


import platform
from argparse import ArgumentParser

import huggingface_hub

from .. import __version__ as version
from ..utils import is_accelerate_available, is_torch_available, is_transformers_available, is_xformers_available
from . import BaseDiffusersCLICommand




def   snake_case		(     UpperCamelCase__       :						Any    )   ->      Optional[Any]:
      return EnvironmentCommand()






class 			A__	(						__lowercase):


     """simple docstring"""

     @staticmethod
     def 		a__						(	__a:						ArgumentParser	)->    Optional[Any]:
           lowerCamelCase					:					Optional[int]        =	parser.add_parser("""env"""	)
           download_parser.set_defaults(func=__a	)

     def 		a__						(	self:						List[Any]	)->    Any:
           lowerCamelCase					:					Any        =	huggingface_hub.__version__

           lowerCamelCase					:					str        =	"""not installed"""
           lowerCamelCase					:					int        =	"""NA"""
           if is_torch_available():
                 import torch

                 lowerCamelCase					:					Optional[int]        =	torch.__version__
                 lowerCamelCase					:					int        =	torch.cuda.is_available()

           lowerCamelCase					:					Any        =	"""not installed"""
           if is_transformers_available():
                 import transformers

                 lowerCamelCase					:					Any        =	transformers.__version__

           lowerCamelCase					:					Optional[int]        =	"""not installed"""
           if is_accelerate_available():
                 import accelerate

                 lowerCamelCase					:					Union[str, Any]        =	accelerate.__version__

           lowerCamelCase					:					int        =	"""not installed"""
           if is_xformers_available():
                 import xformers

                 lowerCamelCase					:					Dict        =	xformers.__version__

           lowerCamelCase					:					Dict        =	{
               """`diffusers` version""": version,
               """Platform""": platform.platform(),
               """Python version""": platform.python_version(),
               """PyTorch version (GPU?)""": f'{pt_version} ({pt_cuda_available})',
               """Huggingface_hub version""": hub_version,
               """Transformers version""": transformers_version,
               """Accelerate version""": accelerate_version,
               """xFormers version""": xformers_version,
               """Using GPU in script?""": """<fill in>""",
               """Using distributed or parallel set-up in script?""": """<fill in>""",
           }

           print("""\nCopy-and-paste the text below in your GitHub issue and FILL OUT the two last points.\n"""	)
           print(self.format_dict(__a	)	)

           return info







     @staticmethod
     def 		a__						(	__a:						int	)->    Optional[Any]:
           return "\n".join([f'- {prop}: {val}' for prop, val in d.items()]	) + "\n"








"""simple docstring"""


import os




def   snake_case		(     )   ->      Optional[Any]:
      with open(os.path.dirname(UpperCamelCase__    ) + """/grid.txt"""    ) as f:
            lowerCamelCase					:					int        =	[]  # noqa: E741
            for _ in range(20    ):
                  l.append([int(UpperCamelCase__    ) for x in f.readline().split()]    )

            lowerCamelCase					:					Union[str, Any]        =	0

            # right
            for i in range(20    ):
                  for j in range(17    ):
                        lowerCamelCase					:					Dict        =	l[i][j] * l[i][j + 1] * l[i][j + 2] * l[i][j + 3]
                        if temp > maximum:
                              lowerCamelCase					:					Tuple        =	temp

        # down
            for i in range(17    ):
                  for j in range(20    ):
                        lowerCamelCase					:					Any        =	l[i][j] * l[i + 1][j] * l[i + 2][j] * l[i + 3][j]
                        if temp > maximum:
                              lowerCamelCase					:					Optional[Any]        =	temp

        # diagonal 1
            for i in range(17    ):
                  for j in range(17    ):
                        lowerCamelCase					:					List[Any]        =	l[i][j] * l[i + 1][j + 1] * l[i + 2][j + 2] * l[i + 3][j + 3]
                        if temp > maximum:
                              lowerCamelCase					:					List[str]        =	temp

        # diagonal 2
            for i in range(17    ):
                  for j in range(3			,				20    ):
                        lowerCamelCase					:					List[str]        =	l[i][j] * l[i + 1][j - 1] * l[i + 2][j - 2] * l[i + 3][j - 3]
                        if temp > maximum:
                              lowerCamelCase					:					List[Any]        =	temp
            return maximum


if __name__ == "__main__":
    print(solution())




