51 lines
1.7 KiB
Python
51 lines
1.7 KiB
Python
import logging
|
|
from rules_processing import processing
|
|
|
|
# Configure logging
|
|
logging.basicConfig(
|
|
level=logging.INFO,
|
|
format="%(asctime)s [%(levelname)s] %(name)s - %(message)s",
|
|
)
|
|
logger = logging.getLogger(__name__)
|
|
|
|
def __main__(
|
|
hd_score_m1: float,
|
|
hd_score_g1: float,
|
|
cluster_size_users_v2: int,
|
|
target_connected_30_sum: float,
|
|
email_cnt: int,
|
|
rejected_app_count: float,
|
|
app_dt_day_cnt: int,
|
|
hd_score_iso_m2: float,
|
|
hd_score_g2: float,
|
|
application_customer_type: str = None,
|
|
input_ip_address: str = None,
|
|
input_ip_connection_type: str = None,
|
|
input_ip_isp: str = None,
|
|
input_ip_distinct_ssn_24h: float = None,
|
|
input_ip_distinct_zip_24h: float = None
|
|
) -> dict:
|
|
# Create a dictionary instead of using pandas DataFrame
|
|
data = {
|
|
"hd_score_m1": hd_score_m1,
|
|
"hd_score_g1": hd_score_g1,
|
|
"cluster_size_users_v2": cluster_size_users_v2,
|
|
"target_connected_30_sum": target_connected_30_sum,
|
|
"email_cnt": email_cnt,
|
|
"rejected_app_count": rejected_app_count,
|
|
"app_dt_day_cnt": app_dt_day_cnt,
|
|
"hd_score_iso_m2": hd_score_iso_m2,
|
|
"hd_score_g2": hd_score_g2,
|
|
"application_customer_type": application_customer_type,
|
|
"input_ip_address": input_ip_address,
|
|
"input_ip_connection_type": input_ip_connection_type,
|
|
"input_ip_isp": input_ip_isp,
|
|
"input_ip_distinct_ssn_24h": input_ip_distinct_ssn_24h,
|
|
"input_ip_distinct_zip_24h": input_ip_distinct_zip_24h
|
|
}
|
|
|
|
final = processing(data)
|
|
logger.info(f"scores of application: {final}")
|
|
|
|
return final
|