


snake_case							:       int     			=      """Alexander Joslin"""

import operator as op

from .stack import Stack






def 							__lowercase   ( __lowerCAmelCase							:				str   ):
							a__             =     {"*": op.mul, "/": op.truediv, "+": op.add, "-": op.sub}

							a__             =     Stack()
							a__             =     Stack()

							for i in equation:
														if i.isdigit():
																					# RULE 1
																					operand_stack.push(int(_UpperCAmelCase   )   )
														elif i in operators:
																					# RULE 2
																					operator_stack.push(_UpperCAmelCase   )
														elif i == ")":
																					# RULE 4
																					a__             =     operator_stack.peek()
																					operator_stack.pop()
																					a__             =     operand_stack.peek()
																					operand_stack.pop()
																					a__             =     operand_stack.peek()
																					operand_stack.pop()

																					a__             =     operators[opr](_UpperCAmelCase					,    _UpperCAmelCase   )
																					operand_stack.push(_UpperCAmelCase   )

    # RULE 5
							return operand_stack.peek()


if __name__ == "__main__":
						snake_case							:       List[str]     			=      """(5 + ((4 * 2) * (2 + 3)))"""
						# answer = 45
						print(f"""{equation} = {dijkstras_two_stack_algorithm(equation)}""")





'''simple docstring'''




import numpy as np
from matplotlib import pyplot as plt
from sklearn.datasets import load_iris
from sklearn.metrics import ConfusionMatrixDisplay
from sklearn.model_selection import train_test_split
from xgboost import XGBClassifier

def 	UpperCamelCase_							(					_UpperCAmelCase  :      dict    )    ->    tuple:


       """simple docstring"""







       return (data["data"], data["target"])

def 	UpperCamelCase_							(					_UpperCAmelCase  :      np.ndarray			,	_UpperCAmelCase  :      np.ndarray    )    ->    XGBClassifier:


       """simple docstring"""







       _UpperCAmelCase     :  Any							      =    XGBClassifier()
       classifier.fit(_UpperCAmelCase			,	_UpperCAmelCase    )
       return classifier

def 	UpperCamelCase_							(					)    ->    None:


       """simple docstring"""







       _UpperCAmelCase     :  List[str]							      =    load_iris()
       _UpperCAmelCase      ,  _UpperCAmelCase     :  Dict							      =    data_handling(_UpperCAmelCase    )
       _UpperCAmelCase      ,  _UpperCAmelCase      ,  _UpperCAmelCase      ,  _UpperCAmelCase     :  str							      =    train_test_split(
           _UpperCAmelCase			,	_UpperCAmelCase			,	test_size=0.2_5    )

       _UpperCAmelCase     :  Optional[Any]							      =    iris["target_names"]

       # Create an XGBoost Classifier from the training data
       _UpperCAmelCase     :  Tuple							      =    xgboost(_UpperCAmelCase			,	_UpperCAmelCase    )

       # Display the confusion matrix of the classifier with both training and test sets
       ConfusionMatrixDisplay.from_estimator(
           _UpperCAmelCase			,	_UpperCAmelCase			,	_UpperCAmelCase			,	display_labels=_UpperCAmelCase			,	cmap="Blues"			,	normalize="true"			,	)
       plt.title("Normalized Confusion Matrix - IRIS Dataset"    )
       plt.show()


if __name__ == "__main__":
  import doctest

  doctest.testmod(verbose=True)
  main()

