



from __future__ import annotations

from collections.abc import Generator

import requests
from bsa import BeautifulSoup

_lowercase						  = "https://www.indeed.co.in/jobs?q=mobile+app+development&l="



def 		lowerCAmelCase__    (					UpperCamelCase_				:       str = "mumbai"	)->  Generator[tuple[str, str], None, None]:
    A__		 =					BeautifulSoup(requests.get(url + location	).content ,       '''html.parser'''	)
    # This attribute finds out all the specifics listed in a job
    for job in soup.find_all('''div''' ,       attrs={'''data-tn-component''': '''organicJob'''}	):
        A__		 =					job.find('''a''' ,       attrs={'''data-tn-element''': '''jobTitle'''}	).text.strip()
        A__		 =					job.find('''span''' ,       {'''class''': '''company'''}	).text.strip()
        yield job_title, company_name


if __name__ == "__main__":
   for i, job in enumerate(fetch_jobs("Bangalore"), 1):
      print(F"Job {i:>2} is {job[0]} at {job[1]}")





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 		lowerCAmelCase__    (					UpperCamelCase_				:       dict	)->  tuple:
    return (data["data"], data["target"])



def 		lowerCAmelCase__    (					UpperCamelCase_				:       np.ndarray ,       UpperCamelCase_				:       np.ndarray	)->  XGBClassifier:
    A__		 =					XGBClassifier()
    classifier.fit(UpperCamelCase_ ,       UpperCamelCase_	)
    return classifier



def 		lowerCAmelCase__    (					)->  None:
    A__		 =					load_iris()
    A__ ,	A__		 =					data_handling(UpperCamelCase_	)
    A__ ,	A__ ,	A__ ,	A__		 =					train_test_split(
        UpperCamelCase_ ,       UpperCamelCase_ ,       test_size=0.25	)

    A__		 =					iris['''target_names''']

    # Create an XGBoost Classifier from the training data
    A__		 =					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()
