

"""simple docstring"""





import argparse
import math
import traceback

import dateutil.parser as date_parser
import requests

def   __SCREAMING_SNAKE_CASE  (      A_ ):
	lowerCAmelCase__	:						int  				=	{}

	lowerCAmelCase__	:						int  				=	job['''started_at''']
	lowerCAmelCase__	:						Dict  				=	job['''completed_at''']

	lowerCAmelCase__	:						Optional[Any]  				=	date_parser.parse(A_ )
	lowerCAmelCase__	:						str  				=	date_parser.parse(A_ )

	lowerCAmelCase__	:						int  				=	round((end_datetime - start_datetime).total_seconds() / 60.0 )

	lowerCAmelCase__	:						Optional[Any]  				=	start
	lowerCAmelCase__	:						Dict  				=	end
	lowerCAmelCase__	:						Optional[int]  				=	duration_in_min

	return job_info

def   __SCREAMING_SNAKE_CASE  (      A_						,     A_=None ):
	lowerCAmelCase__	:						Optional[int]  				=	None
	if token is not None:
		lowerCAmelCase__	:						str  				=	{'''Accept''': '''application/vnd.github+json''', '''Authorization''': f'Bearer {token}'}

	lowerCAmelCase__	:						str  				=	f'https://api.github.com/repos/huggingface/transformers/actions/runs/{workflow_run_id}/jobs?per_page=100'
	lowerCAmelCase__	:						List[Any]  				=	requests.get(A_						,     headers=A_ ).json()
	lowerCAmelCase__	:						Any  				=	{}

	try:
		job_time.update({job['''name''']: extract_time_from_single_job(A_ ) for job in result['''jobs''']} )
		lowerCAmelCase__	:						Dict  				=	math.ceil((result['''total_count'''] - 1_00) / 1_00 )

		for i in range(A_ ):
			lowerCAmelCase__	:						List[str]  				=	requests.get(url + f'&page={i + 2}'						,     headers=A_ ).json()
			job_time.update({job['''name''']: extract_time_from_single_job(A_ ) 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__":
							__UpperCamelCase  :      Union[str, Any]							      =		argparse.ArgumentParser()
							# Required parameters
							parser.add_argument('''--workflow_run_id''', type=str, required=True, help='''A GitHub Actions workflow run id.''')
							__UpperCamelCase  :      List[str]							      =		parser.parse_args()

							__UpperCamelCase  :      Optional[int]							      =		get_job_time(args.workflow_run_id)
							__UpperCamelCase  :      str							      =		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']}''')







"""simple docstring"""





from collections import defaultdict
from math import ceil, sqrt

def   __SCREAMING_SNAKE_CASE  (      A_ = 1_00_00_00						,     A_ = 10 ):
	lowerCAmelCase__	:						defaultdict  				=	defaultdict(A_ )

	for outer_width in range(3						,     (t_limit // 4) + 2 ):
		if outer_width * outer_width > t_limit:
			lowerCAmelCase__	:						int  				=	max(
			    ceil(sqrt(outer_width * outer_width - t_limit ) )						,     1 )
		else:
			lowerCAmelCase__	:						Tuple  				=	1

		hole_width_lower_bound += (outer_width - hole_width_lower_bound) % 2

		for hole_width in range(A_						,     outer_width - 1						,     2 ):
			count[outer_width * outer_width - hole_width * hole_width] += 1

	return sum(1 for n in count.values() if 1 <= n <= 10 )


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




