





from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_snake_case				= logging.get_logger(__name__)

_snake_case				= {
    """nghuyong/ernie-1.0-base-zh""": """https://huggingface.co/nghuyong/ernie-1.0-base-zh/resolve/main/config.json""",
    """nghuyong/ernie-2.0-base-en""": """https://huggingface.co/nghuyong/ernie-2.0-base-en/resolve/main/config.json""",
    """nghuyong/ernie-2.0-large-en""": """https://huggingface.co/nghuyong/ernie-2.0-large-en/resolve/main/config.json""",
    """nghuyong/ernie-3.0-base-zh""": """https://huggingface.co/nghuyong/ernie-3.0-base-zh/resolve/main/config.json""",
    """nghuyong/ernie-3.0-medium-zh""": """https://huggingface.co/nghuyong/ernie-3.0-medium-zh/resolve/main/config.json""",
    """nghuyong/ernie-3.0-mini-zh""": """https://huggingface.co/nghuyong/ernie-3.0-mini-zh/resolve/main/config.json""",
    """nghuyong/ernie-3.0-micro-zh""": """https://huggingface.co/nghuyong/ernie-3.0-micro-zh/resolve/main/config.json""",
    """nghuyong/ernie-3.0-nano-zh""": """https://huggingface.co/nghuyong/ernie-3.0-nano-zh/resolve/main/config.json""",
    """nghuyong/ernie-gram-zh""": """https://huggingface.co/nghuyong/ernie-gram-zh/resolve/main/config.json""",
    """nghuyong/ernie-health-zh""": """https://huggingface.co/nghuyong/ernie-health-zh/resolve/main/config.json""",
}





class 					lowerCAmelCase							(   _lowerCAmelCase					):
  __lowerCamelCase		=			"ernie"







  def __init__(			self  :int    ,							_lowercase  :Dict=3_05_22    ,							_lowercase  :Union[str, Any]=7_68    ,							_lowercase  :Tuple=12    ,							_lowercase  :Optional[int]=12    ,							_lowercase  :List[str]=30_72    ,							_lowercase  :str="gelu"    ,							_lowercase  :Union[str, Any]=0.1    ,							_lowercase  :List[Any]=0.1    ,							_lowercase  :Union[str, Any]=5_12    ,							_lowercase  :Tuple=2    ,							_lowercase  :Dict=3    ,							_lowercase  :str=False    ,							_lowercase  :int=0.02    ,							_lowercase  :List[Any]=1e-12    ,							_lowercase  :Union[str, Any]=0    ,							_lowercase  :List[Any]="absolute"    ,							_lowercase  :List[Any]=True    ,							_lowercase  :str=None    ,							**_lowercase  :List[Any]    ,							):






     '''simple docstring'''





     super().__init__(pad_token_id=A_    ,							**A_					)

     lowercase__    =  vocab_size
     lowercase__    =  hidden_size
     lowercase__    =  num_hidden_layers
     lowercase__    =  num_attention_heads
     lowercase__    =  hidden_act
     lowercase__    =  intermediate_size
     lowercase__    =  hidden_dropout_prob
     lowercase__    =  attention_probs_dropout_prob
     lowercase__    =  max_position_embeddings
     lowercase__    =  type_vocab_size
     lowercase__    =  task_type_vocab_size
     lowercase__    =  use_task_id
     lowercase__    =  initializer_range
     lowercase__    =  layer_norm_eps
     lowercase__    =  position_embedding_type
     lowercase__    =  use_cache
     lowercase__    =  classifier_dropout





class 					lowerCAmelCase							(   _lowerCAmelCase					):







  @property
  def   UpperCAmelCase     (			self  :str					):






     '''simple docstring'''





     if self.task == "multiple-choice":
        lowercase__    =  {0: "batch", 1: "choice", 2: "sequence"}
     else:
        lowercase__    =  {0: "batch", 1: "sequence"}
     return OrderedDict(
         [
             ("input_ids", dynamic_axis),
             ("attention_mask", dynamic_axis),
             ("token_type_ids", dynamic_axis),
             ("task_type_ids", dynamic_axis),
         ]					)











'''simple docstring'''

from __future__ import annotations

from pathlib import Path






def 		_snake_case		(					_SCREAMING_SNAKE_CASE     :						tuple[int, int]							,		_SCREAMING_SNAKE_CASE     :						tuple[int, int]							)			->						int:







	"""simple docstring"""
	return pointa[0] * pointa[1] - pointa[1] * pointa[0]






def 		_snake_case		(					_SCREAMING_SNAKE_CASE     :						int							,		_SCREAMING_SNAKE_CASE     :						int							,		_SCREAMING_SNAKE_CASE     :						int							,		_SCREAMING_SNAKE_CASE     :						int							,		_SCREAMING_SNAKE_CASE     :						int							,		_SCREAMING_SNAKE_CASE     :						int							)			->						bool:







	"""simple docstring"""
	lowerCAmelCase    =	(xa, ya)
	lowerCAmelCase    =	(xa - xa, ya - ya)
	lowerCAmelCase    =	(xa - xa, ya - ya)
	lowerCAmelCase    =	-vector_product(_SCREAMING_SNAKE_CASE							,		_SCREAMING_SNAKE_CASE							) / vector_product(
	    _SCREAMING_SNAKE_CASE							,		_SCREAMING_SNAKE_CASE							)
	lowerCAmelCase    =	+vector_product(_SCREAMING_SNAKE_CASE							,		_SCREAMING_SNAKE_CASE							) / vector_product(
	    _SCREAMING_SNAKE_CASE							,		_SCREAMING_SNAKE_CASE							)

	return a > 0 and b > 0 and a + b < 1






def 		_snake_case		(					_SCREAMING_SNAKE_CASE     :						str = "p102_triangles.txt"							)			->						int:







	"""simple docstring"""
	lowerCAmelCase    =	Path(_SCREAMING_SNAKE_CASE							).parent.joinpath(_SCREAMING_SNAKE_CASE							).read_text(encoding="""utf-8"""							)

	lowerCAmelCase    =	[]
	for line in data.strip().split("""\n"""							):
		triangles.append([int(_SCREAMING_SNAKE_CASE							) for number in line.split(""","""							)]							)

	lowerCAmelCase    =	0
	lowerCAmelCase    =	42

	for triangle in triangles:
		ret += contains_origin(*_SCREAMING_SNAKE_CASE							)

	return ret


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