<commit_before>import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '.'))

# use block explorer to check balance, block height to check fork

import requests
from config import *
from mnb_misc import *
import simplejson as json


def make_request(url):
    USERAGET = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14'
    headers = {'user-agent': USERAGET}

    try:
        response = requests.get(url, headers=headers, timeout=(5, 5))
        if response.status_code == requests.codes.ok and float(
                response.text) >= 0:
            return response.text

        else:
            return None

    except requests.exceptions.RequestException:
        err_msg = 'requests.exceptions.RequestException'
        print_err_exit(
            get_caller_name(),
            get_function_name(),
            err_msg)

    except Exception as e:
        err_msg = str(e.args)
        print_err_exit(
            get_caller_name(),
            get_function_name(),
            err_msg)


def make_request_version_txt(url):
    USERAGET = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14'
    headers = {'user-agent': USERAGET}

    try:
        response = requests.get(url, headers=headers, timeout=(4, 3))
        if response.status_code == requests.codes.ok and len(
                response.text) > 2:
            return response.json()

        else:
            return None

    except requests.exceptions.RequestException:
        err_msg = 'requests.exceptions.RequestException : error on checking version, use -k to skip version check'
        print_err_exit(
            get_caller_name(),
            get_function_name(),
            err_msg)

    except Exception as e:
        err_msg = str(e.args)
        print_err_exit(
            get_caller_name(),<commit_msg>err_msg only in version check<commit_after>import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '.'))

# use block explorer to check balance, block height to check fork

import requests
from config import *
from mnb_misc import *
import simplejson as json


def make_request(url):
    USERAGET = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14'
    headers = {'user-agent': USERAGET}

    try:
        response = requests.get(url, headers=headers, timeout=(5, 5))
        if response.status_code == requests.codes.ok and float(
                response.text) >= 0:
            return response.text

        else:
            return None

    except requests.exceptions.RequestException:
        err_msg = 'requests.exceptions.RequestException'
        print_err_exit(
            get_caller_name(),
            get_function_name(),
            err_msg)

    except Exception as e:
        err_msg = str(e.args)
        print_err_exit(
            get_caller_name(),
            get_function_name(),
            err_msg)


def make_request_version_txt(url):
    USERAGET = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14'
    headers = {'user-agent': USERAGET}

    try:
        response = requests.get(url, headers=headers, timeout=(4, 3))
        if response.status_code == requests.codes.ok and len(
                response.text) > 2:
            return response.json()

        else:
            return None

    except requests.exceptions.RequestException:
        if get_caller_name() == 'get_version_txt':
            err_msg = 'requests.exceptions.RequestException : error on checking version, use -k to skip version check'
        else:
            err_msg = 'requests.exceptions.RequestException'

        print_err_exit(
            get_caller_name(),
            get_function_name(),
            err_msg)

    except Exception as e:
        err_msg = str(e.args)
        print_err_exit(
            get_caller_name(),
{'fraction_non_alphanumeric': 0.09750678844729696, 'fraction_numerical': 0.02567267341397186, 'mean_word_length': 2.3322368421052633, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '319777', 'n_tokens_mistral': 1313, 'n_tokens_neox': 1223, 'n_words': 301}