
"""simple docstring"""



import os


def lowerCamelCase_				(     _lowerCamelCase			:	List[Any]				):
       lowerCamelCase_       							=		len(grid[0]				)
       lowerCamelCase_       							=		len(SCREAMING_SNAKE_CASE__				)

       lowerCamelCase_       							=		0
       lowerCamelCase_       							=		0
       lowerCamelCase_       							=		0

       # Check vertically, horizontally, diagonally at the same time (only works
       # for nxn grid)
       for i in range(SCREAMING_SNAKE_CASE__				):
              for j in range(n_rows - 3				):
                     lowerCamelCase_       							=		grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
                     lowerCamelCase_       							=		grid[i][j] * grid[i][j + 1] * grid[i][j + 2] * grid[i][j + 3]

                     # Left-to-right diagonal (\) product
                     if i < n_columns - 3:
                            lowerCamelCase_       							=		(
                                grid[i][j]
                                * grid[i + 1][j + 1]
                                * grid[i + 2][j + 2]
                                * grid[i + 3][j + 3]
                            )

                     # Right-to-left diagonal(/) product
                     if i > 2:
                            lowerCamelCase_       							=		(
                                grid[i][j]
                                * grid[i - 1][j + 1]
                                * grid[i - 2][j + 2]
                                * grid[i - 3][j + 3]
                            )

                     lowerCamelCase_       							=		max(
                         SCREAMING_SNAKE_CASE__					,				SCREAMING_SNAKE_CASE__					,				SCREAMING_SNAKE_CASE__					,				SCREAMING_SNAKE_CASE__				)
                     if max_product > largest:
                            lowerCamelCase_       							=		max_product

       return largest


def lowerCamelCase_				(     ):
       lowerCamelCase_       							=		[]
       with open(os.path.dirname(SCREAMING_SNAKE_CASE__				) + '''/grid.txt'''				) as file:
              for line in file:
                     grid.append(line.strip('''\n'''				).split(''' '''				)				)

       lowerCamelCase_       							=		[[int(SCREAMING_SNAKE_CASE__				) for i in grid[j]] for j in range(len(SCREAMING_SNAKE_CASE__				)				)]

       return largest_product(SCREAMING_SNAKE_CASE__				)


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



import numpy as np




def       a_ (       SCREAMING_SNAKE_CASE__   : np.ndarray						,     SCREAMING_SNAKE_CASE__   : float	):
       '''simple docstring'''





       return np.where(vector > 0						,     SCREAMING_SNAKE_CASE__						,     (alpha * (np.exp(SCREAMING_SNAKE_CASE__	) - 1))	)


if __name__ == "__main__":
 import doctest

 doctest.testmod()


