



UpperCAmelCase							       =    [
    [0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
    [0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
    [0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0],
    [0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0],
]

def 	A_					(		__a   : List[str]       ,						__a   : str       ,						__a   : Tuple       ,						__a   : Dict						):

				"""simple docstring"""
				return 0 <= row < rows and 0 <= col < cols

def 	A_					(		__a   : Optional[int]       ,						__a   : Dict       ,						__a   : str       ,						__a   : Union[str, Any]						):

				"""simple docstring"""
				a__ 					=						len(A__						)
				a__ 					=						len(mat[0]						)
				if is_safe(A__       ,						A__       ,						A__       ,						A__						) and (row, col) not in seen and mat[row][col] == 1:
								seen.add((row, col)						)
								return (
								    1
								    + depth_first_search(row + 1       ,						A__       ,						A__       ,						A__						)
								    + depth_first_search(row - 1       ,						A__       ,						A__       ,						A__						)
								    + depth_first_search(A__       ,						col + 1       ,						A__       ,						A__						)
								    + depth_first_search(A__       ,						col - 1       ,						A__       ,						A__						)
								)
				else:
								return 0

def 	A_					(		__a   : Dict						):

				"""simple docstring"""
				a__ 					=						set()

				a__ 					=						0
				for row, line in enumerate(A__						):
								for col, item in enumerate(A__						):
												if item == 1 and (row, col) not in seen:
																# Maximizing the area
																a__ 					=						max(A__       ,						depth_first_search(A__       ,						A__       ,						A__       ,						A__						)						)
				return max_area


if __name__ == "__main__":
	import doctest

	print(find_max_area(matrix))  # Output -> 6
	doctest.testmod()



import json
import os
import tempfile

import datasets
from utils import generate_example_dataset, get_duration


_A  					= 50_00_00

_A					,  _A  					= os.path.split(__file__)
_A  					= os.path.join(RESULTS_BASEPATH, "results", RESULTS_FILENAME.replace(".py", ".json"))



@get_duration
def 						lowercase_			(   A__		)							->							str:
    """simple docstring"""

    snake_case      =					dataset.select(range(0 ,		len(A__		) ,		2		)		)



@get_duration
def 						lowercase_			(   A__		)							->							int:
    """simple docstring"""

    snake_case      =					dataset.sort("numbers"		)



@get_duration
def 						lowercase_			(   A__		)							->							Optional[int]:
    """simple docstring"""

    snake_case      =					dataset.shuffle()



@get_duration
def 						lowercase_			(   A__		)							->							int:
    """simple docstring"""

    snake_case      =					dataset.train_test_split(0.1		)



@get_duration
def 						lowercase_			(   A__ ,		A__=10		)							->							List[Any]:
    """simple docstring"""

    for shard_id in range(A__		):
        snake_case      =					dataset.shard(A__ ,		A__		)



def 						lowercase_			(   )							->							List[str]:
    """simple docstring"""

    snake_case      =					{"num examples": SPEED_TEST_N_EXAMPLES}
    snake_case      =					(select, sort, shuffle, train_test_split, shard)
    with tempfile.TemporaryDirectory() as tmp_dir:
        print("generating dataset"		)
        snake_case      =					datasets.Features({"text": datasets.Value("string"		), "numbers": datasets.Value("float32"		)}		)
        snake_case      =					generate_example_dataset(
            os.path.join(A__ ,		"dataset.arrow"		) ,		A__ ,		num_examples=A__		)
        print("Functions"		)
        for func in functions:
            print(func.__name__		)
            snake_case      =					func(A__		)

    with open(A__ ,		"wb"		) as f:
        f.write(json.dumps(A__		).encode("utf-8"		)		)


if __name__ == "__main__":  # useful to run the profiler
   benchmark_indices_mapping()

