



"""simple docstring"""
def 			_SCREAMING_SNAKE_CASE						(__lowerCAmelCase							) ->						list[int]:







  '''simple docstring'''


  if num <= 0:
    raise ValueError("""Input must be a positive integer"""							)

  lowercase_								= [True] * (num + 1)

  lowercase_								= 2
  while p * p <= num:
    if primes[p]:
      for i in range(p * p ,  num + 1 ,  __lowerCAmelCase							):
        lowercase_								= False
    p += 1

  return [prime for prime in range(2 ,  num + 1							) if primes[prime]]


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       UpperCAmelCase						:		Optional[int]			= int(input("Enter a positive integer: ").strip())
       print(prime_sieve_eratosthenes(user_num))






"""simple docstring"""
import numpy as np
from sklearn.datasets import fetch_california_housing
from sklearn.metrics import mean_absolute_error, mean_squared_error
from sklearn.model_selection import train_test_split
from xgboost import XGBRegressor


def 			_SCREAMING_SNAKE_CASE						(__lowerCAmelCase							) ->						tuple:







  '''simple docstring'''


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


def 			_SCREAMING_SNAKE_CASE						(__lowerCAmelCase ,  __lowerCAmelCase ,  __lowerCAmelCase							) ->						np.ndarray:







  '''simple docstring'''


  lowercase_								= XGBRegressor(verbosity=0 ,  random_state=42							)
  xgb.fit(__lowerCAmelCase ,  __lowerCAmelCase							)
  # Predict target for test data
  lowercase_								= xgb.predict(__lowerCAmelCase							)
  lowercase_								= predictions.reshape(len(__lowerCAmelCase							) ,  1							)
  return predictions


def 			_SCREAMING_SNAKE_CASE						() ->						None:







  '''simple docstring'''


  lowercase_								= fetch_california_housing()
  lowercase_					,    lowercase_								= data_handling(__lowerCAmelCase							)
  lowercase_					,    lowercase_					,    lowercase_					,    lowercase_								= train_test_split(
      __lowerCAmelCase ,  __lowerCAmelCase ,  test_size=0.25 ,  random_state=1							)
  lowercase_								= xgboost(__lowerCAmelCase ,  __lowerCAmelCase ,  __lowerCAmelCase							)
  # Error printing
  print(F'''Mean Absolute Error : {mean_absolute_error(__lowerCAmelCase ,  __lowerCAmelCase							)}'''							)
  print(F'''Mean Square Error  : {mean_squared_error(__lowerCAmelCase ,  __lowerCAmelCase							)}'''							)


if __name__ == "__main__":
       import doctest

       doctest.testmod(verbose=True)
       main()

