




'''simple docstring'''


import os
def 		snake_case_   (UpperCamelCase	:  str				):





							'''simple docstring'''


							_a     					=    len(grid[0]				)
							_a     					=    len(UpperCamelCase				)

							_a     					=    0
							_a     					=    0
							_a     					=    0

							# Check vertically, horizontally, diagonally at the same time (only works
							# for nxn grid)
							for i in range(UpperCamelCase				):
														for j in range(n_rows - 3				):
																					_a     					=    grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
																					_a     					=    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:
																												_a     					=    (
																												    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:
																												_a     					=    (
																												    grid[i][j]
																												    * grid[i - 1][j + 1]
																												    * grid[i - 2][j + 2]
																												    * grid[i - 3][j + 3]
																												)

																					_a     					=    max(
																					    UpperCamelCase			,						UpperCamelCase			,						UpperCamelCase			,						UpperCamelCase				)
																					if max_product > largest:
																												_a     					=    max_product

							return largest
def 		snake_case_   ():





							'''simple docstring'''


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

							_a     					=    [[int(UpperCamelCase				) for i in grid[j]] for j in range(len(UpperCamelCase				)				)]

							return largest_product(UpperCamelCase				)


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







'''simple docstring'''


import argparse
import math
import traceback

import dateutil.parser as date_parser
import requests
def 		snake_case_   (UpperCamelCase	:  Dict				):





							'''simple docstring'''


							_a     					=    {}

							_a     					=    job['''started_at''']
							_a     					=    job['''completed_at''']

							_a     					=    date_parser.parse(UpperCamelCase				)
							_a     					=    date_parser.parse(UpperCamelCase				)

							_a     					=    round((end_datetime - start_datetime).total_seconds() / 60.0				)

							_a     					=    start
							_a     					=    end
							_a     					=    duration_in_min

							return job_info
def 		snake_case_   (UpperCamelCase	:  int			,						UpperCamelCase	:  int=None				):





							'''simple docstring'''


							_a     					=    None
							if token is not None:
														_a     					=    {'''Accept''': '''application/vnd.github+json''', '''Authorization''': f'Bearer {token}'}

							_a     					=    f'https://api.github.com/repos/huggingface/transformers/actions/runs/{workflow_run_id}/jobs?per_page=100'
							_a     					=    requests.get(UpperCamelCase			,						headers=UpperCamelCase				).json()
							_a     					=    {}

							try:
														job_time.update({job['''name''']: extract_time_from_single_job(UpperCamelCase				) for job in result['''jobs''']}				)
														_a     					=    math.ceil((result['''total_count'''] - 100) / 100				)

														for i in range(UpperCamelCase				):
																					_a     					=    requests.get(url + f'&page={i + 2}'			,						headers=UpperCamelCase				).json()
																					job_time.update({job['''name''']: extract_time_from_single_job(UpperCamelCase				) for job in result['''jobs''']}				)

														return job_time
							except Exception:
														print(f'Unknown error, could not fetch links:\n{traceback.format_exc()}'				)

							return {}


if __name__ == "__main__":
				_snake_case				:				int       							=		argparse.ArgumentParser()
				# Required parameters
				parser.add_argument('--workflow_run_id', type=str, required=True, help='A GitHub Actions workflow run id.')
				_snake_case				:				Tuple       							=		parser.parse_args()

				_snake_case				:				int       							=		get_job_time(args.workflow_run_id)
				_snake_case				:				int       							=		dict(sorted(job_time.items(), key=lambda item: item[1]["duration"], reverse=True))

				for k, v in job_time.items():
								print(F'''{k}: {v['duration']}''')

