<commit_before>from http.client import CannotSendRequest
import os
import configparser

from selenium.webdriver.support import expected_conditions as ec
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.by import By
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support.wait import WebDriverWait

from . import common


def init_class(config_path: str=''):
    config_file = config_path or get_config_path()
    config = configparser.ConfigParser()

    config.read(config_file)

    site = config['SITE']['SiteUrl'] or r'http://localhost/'
    connection_string = config['SITE']['ConnectionString'] or r"Driver={SQL Server Native Client 11.0}; " \
                                                              "Server=.; Database=cosacs;uid=sa;pwd=;"
    driver_path = config['SITE']['DriverRelPath'] or r'\drivers\chromedriver.exe'

    common.site_url = site
    common.driver_path = get_driver_path(driver_path)
    common.connection_string = connection_string

    common.browser = webdriver.Chrome(common.driver_path)
    common.browser.maximize_window()


def get_config_path():
    dir_path = get_project_path()

    return dir_path + r"\settings.ini"


def get_driver_path(driver_name: str):
    dir_path = get_project_path()<commit_msg>Fix Browser checkinh<commit_after>from http.client import CannotSendRequest
import os
import configparser

from selenium.webdriver.support import expected_conditions as ec
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.by import By
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support.wait import WebDriverWait

from . import common


def init_class(config_path: str=''):
    config_file = config_path or get_config_path()
    config = configparser.ConfigParser()

    config.read(config_file)

    site = config['SITE']['SiteUrl'] or r'http://localhost/'
    connection_string = config['SITE']['ConnectionString'] or r"Driver={SQL Server Native Client 11.0}; " \
                                                              "Server=.; Database=cosacs;uid=sa;pwd=;"
    driver_path = config['SITE']['DriverRelPath'] or r'\drivers\chromedriver.exe'

    common.site_url = site
    common.driver_path = get_driver_path(driver_path)
    common.connection_string = connection_string

    common.browser = webdriver.Chrome(common.driver_path)
    common.browser.maximize_window()
    common.checking = False


def get_config_path():
    dir_path = get_project_path()

    return dir_path + r"\settings.ini"


def get_driver_path(driver_name: str):
    dir_path = get_project_path()
{'fraction_non_alphanumeric': 0.09378407851690294, 'fraction_numerical': 0.0021810250817884407, 'mean_word_length': 4.04954128440367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2682977', 'n_tokens_mistral': 818, 'n_tokens_neox': 763, 'n_words': 175}