






"""simple docstring"""





from ... import PretrainedConfig


__lowerCamelCase							=  {
    'sijunhe/nezha-cn-base': 'https://huggingface.co/sijunhe/nezha-cn-base/resolve/main/config.json',
}



class       __A		(   SCREAMING_SNAKE_CASE_			):
					UpperCAmelCase__								=				NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP
					UpperCAmelCase__								=				"nezha"

					def __init__(			self  :      Optional[Any]     ,		__snake_case  :      Union[str, Any]=2_1_1_2_8     ,		__snake_case  :      Optional[int]=7_6_8     ,		__snake_case  :      Dict=1_2     ,		__snake_case  :      Union[str, Any]=1_2     ,		__snake_case  :      Tuple=3_0_7_2     ,		__snake_case  :      List[str]="gelu"     ,		__snake_case  :      Union[str, Any]=0.1     ,		__snake_case  :      List[Any]=0.1     ,		__snake_case  :      Tuple=5_1_2     ,		__snake_case  :      str=6_4     ,		__snake_case  :      Optional[Any]=2     ,		__snake_case  :      List[Any]=0.02     ,		__snake_case  :      List[str]=1E-12     ,		__snake_case  :      List[Any]=0.1     ,		__snake_case  :      Optional[int]=0     ,		__snake_case  :      Any=2     ,		__snake_case  :      int=3     ,		__snake_case  :      Any=True     ,		**__snake_case  :      Tuple     ,		)			->							List[Any]:
											super().__init__(pad_token_id=__snake_case     ,		bos_token_id=__snake_case     ,		eos_token_id=__snake_case     ,		**__snake_case					)

											__magic_name__:	List[str]							=       vocab_size
											__magic_name__:	Optional[int]							=       hidden_size
											__magic_name__:	Optional[Any]							=       num_hidden_layers
											__magic_name__:	Union[str, Any]							=       num_attention_heads
											__magic_name__:	str							=       hidden_act
											__magic_name__:	Optional[int]							=       intermediate_size
											__magic_name__:	Dict							=       hidden_dropout_prob
											__magic_name__:	Dict							=       attention_probs_dropout_prob
											__magic_name__:	List[Any]							=       max_position_embeddings
											__magic_name__:	Any							=       max_relative_position
											__magic_name__:	Tuple							=       type_vocab_size
											__magic_name__:	Optional[Any]							=       initializer_range
											__magic_name__:	str							=       layer_norm_eps
											__magic_name__:	Tuple							=       classifier_dropout
											__magic_name__:	Tuple							=       use_cache







from __future__ import annotations

import matplotlib.pyplot as plt  # type: ignore
import numpy

# initial triangle of Koch snowflake
lowerCamelCase		   =			numpy.array([0, 0])
lowerCamelCase		   =			numpy.array([0.5, 0.866_0254])
lowerCamelCase		   =			numpy.array([1, 0])
lowerCamelCase		   =			[VECTOR_1, VECTOR_2, VECTOR_3, VECTOR_1]




def       a_ (       SCREAMING_SNAKE_CASE__   : list[numpy.ndarray]						,     SCREAMING_SNAKE_CASE__   : int	):
       '''simple docstring'''





       _lowerCamelCase			:						List[Any]            =initial_vectors
       for _ in range(SCREAMING_SNAKE_CASE__	):
              _lowerCamelCase			:						List[str]            =iteration_step(SCREAMING_SNAKE_CASE__	)
       return vectors




def       a_ (       SCREAMING_SNAKE_CASE__   : list[numpy.ndarray]	):
       '''simple docstring'''





       _lowerCamelCase			:						Dict            =[]
       for i, start_vector in enumerate(vectors[:-1]	):
              _lowerCamelCase			:						Tuple            =vectors[i + 1]
              new_vectors.append(SCREAMING_SNAKE_CASE__	)
              _lowerCamelCase			:						Tuple            =end_vector - start_vector
              new_vectors.append(start_vector + difference_vector / 3	)
              new_vectors.append(
                  start_vector + difference_vector / 3 + rotate(difference_vector / 3						,     60	)	)
              new_vectors.append(start_vector + difference_vector * 2 / 3	)
       new_vectors.append(vectors[-1]	)
       return new_vectors




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





       _lowerCamelCase			:						Union[str, Any]            =numpy.radians(SCREAMING_SNAKE_CASE__	)
       _lowerCamelCase      ,	_lowerCamelCase			:						List[Any]            =numpy.cos(SCREAMING_SNAKE_CASE__	), numpy.sin(SCREAMING_SNAKE_CASE__	)
       _lowerCamelCase			:						str            =numpy.array(((c, -s), (s, c))	)
       return numpy.dot(SCREAMING_SNAKE_CASE__						,     SCREAMING_SNAKE_CASE__	)




def       a_ (       SCREAMING_SNAKE_CASE__   : list[numpy.ndarray]	):
       '''simple docstring'''





       _lowerCamelCase			:						Optional[Any]            =plt.gca()
       axes.set_aspect('equal'	)

       # matplotlib.pyplot.plot takes a list of all x-coordinates and a list of all
       # y-coordinates as inputs, which are constructed from the vector-list using
       # zip()
       _lowerCamelCase      ,	_lowerCamelCase			:						Tuple            =zip(*SCREAMING_SNAKE_CASE__	)
       plt.plot(SCREAMING_SNAKE_CASE__						,     SCREAMING_SNAKE_CASE__	)
       plt.show()


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 lowerCamelCase		   =			iterate(INITIAL_VECTORS, 5)
 plot(processed_vectors)


