<commit_before># MIT License
# Copyright (c) 2017 MassChallenge, Inc.

from django.core.exceptions import FieldDoesNotExist
from django.utils.text import camel_case_to_spaces

LABEL_LENGTH = 255


def is_managed(db_table):
    return False


def model_has_field(model, field_name):
    try:
        model._meta.get_field(field_name)
        return True
    except FieldDoesNotExist:
        return False


def model_name_to_snake(value):
    original_model_string = camel_case_to_spaces(value)
    new_model_string = original_model_string.replace(" ", "_")
    return new_model_string


def snake_to_model_name(value):
    return "".join(map(str.title, value.split("_")))


def is_int(s):
    try:
        int(s)
    except ValueError:
        return False
    return True
<commit_msg>[AC-5087] fix `is_int`'s behaviour for non string input.<commit_after># MIT License
# Copyright (c) 2017 MassChallenge, Inc.

from django.core.exceptions import FieldDoesNotExist
from django.utils.text import camel_case_to_spaces

LABEL_LENGTH = 255


def is_managed(db_table):
    return False


def model_has_field(model, field_name):
    try:
        model._meta.get_field(field_name)
        return True
    except FieldDoesNotExist:
        return False


def model_name_to_snake(value):
    original_model_string = camel_case_to_spaces(value)
    new_model_string = original_model_string.replace(" ", "_")
    return new_model_string


def snake_to_model_name(value):
    return "".join(map(str.title, value.split("_")))


def is_int(s):
    try:
        int(str(s))
    except ValueError:
        return False
    return

{'fraction_non_alphanumeric': 0.08741475511469311, 'fraction_numerical': 0.011159330440173589, 'mean_word_length': 3.7610619469026547, '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': '2471230', 'n_tokens_mistral': 558, 'n_tokens_neox': 522, 'n_words': 118}