<commit_before>"""
Created on: 22-Mar-2018
Created by: <NAME>
"""
Stack = __import__("Stack").Stack


def integer_to_binary_converter(integer: int):
    rem_stack = Stack(100)
    while integer > 0:
        rem = integer % 2
        ret = rem_stack.push(rem)
        if ret is False:
            return "!!! ERROR !!!"
        integer //= 2
<commit_msg>Improved Integer to Binary converter<commit_after>"""
Created on: 22-Mar-2018
Created by: <NAME>
"""
Stack = __import__("Stack").Stack


def integer_to_binary_converter(integer: int):
    if integer == 0 or integer == 1:
        return str(integer)
    elif integer < 0:
        return "! Only supports positive integers !"

    rem_stack = Stack(100)
    while integer > 0:
        rem = integer % 2
        ret = rem_stack.push(rem)
        if ret is False:
            return "!!! ERROR !!!"
        integer //= 2

{'fraction_non_alphanumeric': 0.12528735632183907, 'fraction_numerical': 0.03103448275862069, 'mean_word_length': 2.4701195219123506, 'pattern_counts': {'":': 0, '<': 6, '<?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': '7577491', 'n_tokens_mistral': 294, 'n_tokens_neox': 262, 'n_words': 80}