






"""simple docstring"""





import os






def 							A(    ):
       """simple docstring"""





       lowercase__:							Optional[int]         =     os.path.dirname(os.path.realpath(snake_case_						)						)
       lowercase__:							Dict         =     os.path.join(snake_case_		,  "triangle.txt"						)

       with open(snake_case_						) as in_file:
              lowercase__:							Tuple         =     [[int(snake_case_						) for i in line.split()] for line in in_file]

       while len(snake_case_						) != 1:
              lowercase__:							int         =     triangle.pop()
              lowercase__:							int         =     triangle[-1]
              for j in range(len(snake_case_						) - 1						):
                     curr_row[j] += max(last_row[j]		,  last_row[j + 1]						)
       return triangle[0][0]


if __name__ == "__main__":
  print(solution())














from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier

# Load iris file
A_			:Union[str, Any]	    =		load_iris()
iris.keys()


print(f"Target names: \n {iris.target_names} ")
print(f"\n Features: \n {iris.feature_names}")

# Train set e Test set
A_    ,A_    ,A_    ,A_			:Tuple	    =		train_test_split(
    iris['''data'''], iris['''target'''], random_state=4
)

# KNN

A_			:Any	    =		KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

# new array to test
A_			:Optional[Any]	    =		[[1, 2, 1, 4], [2, 3, 4, 5]]

A_			:Union[str, Any]	    =		knn.predict(X_new)

print(
    f"\nNew array: \n {X_new}\n\nTarget Names Prediction: \n"
    f" {iris['target_names'][prediction]}"
)

