<commit_before><commit_msg>Initial commit<commit_after># -*- coding: utf-8 -*-
"""
Jednostavan modul koji služi za ispis osnovnih informacija o sustavu i instaliranim python paketima.
"""
from platform import python_version, python_compiler, architecture
from platform import system as platform_system
from multiprocessing import cpu_count
from pkg_resources import get_distribution
from IPython.display import HTML

def info_packages(pkgs):
    """Koje verzije paketa"""
    out ="<table>"
    packages = pkgs.split(',')
    for p in packages:
        out += "<tr><td><strong>{}</strong> verzija</td><td>{}</td></tr>".format(p, get_distribution(p).version)
    out += "</table>"
    return out
def print_sysinfo():
    """Osnovne informacije o Pythonu i računalu"""
    out ="<table>"
    out += "<tr><td><strong>Python verzija</strong></td><td>{}</td></tr>".format(python_version())
    out += "<tr><td><strong>kompajler</strong></td><td>{}</td></tr>".format(python_compiler())
    out += "<tr><td><strong>sustav</strong></td><td>{}</td></tr>".format(platform_system())
    out += "<tr><td><strong>broj CPU-a</strong></td><td>{}</td></tr>".format(cpu_count())
    out += "<tr><td><strong>interpreter</strong></td><td>{}</td></tr>".format(architecture()[0])
    out += "</table>"
    return out
{'fraction_non_alphanumeric': 0.20694980694980694, 'fraction_numerical': 0.0015444015444015444, 'mean_word_length': 5.084507042253521, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, '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': '3037948', 'n_tokens_mistral': 437, 'n_tokens_neox': 436, 'n_words': 89}