





from __future__ import annotations

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

# initial triangle of Koch snowflake
_a     :    Optional[int]         =						numpy.array([0, 0])
_a     :    str         =						numpy.array([0.5, 0.8_66_02_54])
_a     :    Dict         =						numpy.array([1, 0])
_a     :    str         =						[VECTOR_1, VECTOR_2, VECTOR_3, VECTOR_1]
def 							a_	(    __magic_name__		,     __magic_name__   )				->			list[numpy.ndarray]:




				"""simple docstring"""






				snake_case   :					int    						=				initial_vectors
				for _ in range(__a   ):
								snake_case   :					Dict    						=				iteration_step(__a   )
				return vectors
def 							a_	(    __magic_name__   )				->			list[numpy.ndarray]:




				"""simple docstring"""






				snake_case   :					Optional[Any]    						=				[]
				for i, start_vector in enumerate(vectors[:-1]   ):
								snake_case   :					List[str]    						=				vectors[i + 1]
								new_vectors.append(__a   )
								snake_case   :					Optional[Any]    						=				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_	(    __magic_name__		,     __magic_name__   )				->			numpy.ndarray:




				"""simple docstring"""






				snake_case   :					Optional[Any]    						=				numpy.radians(__a   )
				snake_case   :					List[Any]    						=				numpy.cos(__a   ), numpy.sin(__a   )
				snake_case   :					Optional[Any]    						=				numpy.array(((c, -s), (s, c))   )
				return numpy.dot(__a		,     __a   )
def 							a_	(    __magic_name__   )				->			None:




				"""simple docstring"""






				snake_case   :					Union[str, 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()
				snake_case   :					List[Any]    						=				zip(*__a   )
				plt.plot(__a		,     __a   )
				plt.show()


if __name__ == "__main__":
			import doctest

			doctest.testmod()

			_a     :    Union[str, Any]         =						iterate(INITIAL_VECTORS, 5)
			plot(processed_vectors)




'''simple docstring'''
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


__snake_case				 =	{
    '''configuration_convbert''': ['''CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ConvBertConfig''', '''ConvBertOnnxConfig'''],
    '''tokenization_convbert''': ['''ConvBertTokenizer'''],
}

try:
		if not is_tokenizers_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__snake_case				 =	['''ConvBertTokenizerFast''']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__snake_case				 =	[
		    '''CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''ConvBertForMaskedLM''',
		    '''ConvBertForMultipleChoice''',
		    '''ConvBertForQuestionAnswering''',
		    '''ConvBertForSequenceClassification''',
		    '''ConvBertForTokenClassification''',
		    '''ConvBertLayer''',
		    '''ConvBertModel''',
		    '''ConvBertPreTrainedModel''',
		    '''load_tf_weights_in_convbert''',
		]


try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__snake_case				 =	[
		    '''TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''TFConvBertForMaskedLM''',
		    '''TFConvBertForMultipleChoice''',
		    '''TFConvBertForQuestionAnswering''',
		    '''TFConvBertForSequenceClassification''',
		    '''TFConvBertForTokenClassification''',
		    '''TFConvBertLayer''',
		    '''TFConvBertModel''',
		    '''TFConvBertPreTrainedModel''',
		]


if TYPE_CHECKING:
		from .configuration_convbert import CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, ConvBertConfig, ConvBertOnnxConfig
		from .tokenization_convbert import ConvBertTokenizer

		try:
				if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .tokenization_convbert_fast import ConvBertTokenizerFast

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_convbert import (
				    CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    ConvBertForMaskedLM,
				    ConvBertForMultipleChoice,
				    ConvBertForQuestionAnswering,
				    ConvBertForSequenceClassification,
				    ConvBertForTokenClassification,
				    ConvBertLayer,
				    ConvBertModel,
				    ConvBertPreTrainedModel,
				    load_tf_weights_in_convbert,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_convbert import (
				    TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFConvBertForMaskedLM,
				    TFConvBertForMultipleChoice,
				    TFConvBertForQuestionAnswering,
				    TFConvBertForSequenceClassification,
				    TFConvBertForTokenClassification,
				    TFConvBertLayer,
				    TFConvBertModel,
				    TFConvBertPreTrainedModel,
				)


else:
		import sys

		__snake_case				 =	_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)