<commit_before># -*- coding: utf-8 -*-
""" This module holds the result of some code that was usefull when
interacting with the data on the command line.
"""

def help_find_invalid_chars(company_name, line, column):  # pragma: no cover
    """ The CrunchBase API returns JSON which from time to time
    contains invalid characters. This is especially the case for the
    ``description`` field of comanies. These invalid characters raise
    an error in ``json.loads`` and should be replaced therefor. This
    happens in the ``CrunchBaseFetcherMixin`` class.

    Anyway, the name of the company, the line and the column as raised
    by ``json.loads`` can be fed in this function in order to examine
    them.
    """
    from crawlcrunch.compat import url_open
    from crawlcrunch.model import LocalFilesDir
    from crawlcrunch.model import CrunchBaseFetcherMixin
    root = LocalFilesDir('/tmp')
    company = root.get(company_name)
    resp = url_open(company.query_url())
    s = resp.read().decode('utf-8')
    s = CrunchBaseFetcherMixin.replace_control_chars(s)
    splitted = s.split('\n')
    l = splitted[line - 1]
    c = l[column - g1]
    print('The entire line is:\n{0!r}'.format(l))
    print('The specific character is: {0!r}'.format(c))
    return l, c<commit_msg>removed out-dated code<commit_after># -*- coding: utf-8 -*-
{'fraction_non_alphanumeric': 0.1056547619047619, 'fraction_numerical': 0.005208333333333333, 'mean_word_length': 3.559322033898305, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6240498', 'n_tokens_mistral': 404, 'n_tokens_neox': 405, 'n_words': 145}