<commit_before># -*- coding: utf-8 -*-
import time
import locale


class ping:

    def __init__(self, core, client):
        core.addCommandHandler("ping", self, chelp="ping.help")
        core.addCommandHandler("pong", self)
        core.addCommandHandler("pig", self)
        core.addCommandHandler("lag", self, chelp="lag.help")
        core.addHandler("ctcpreply", self, "pingrep")

    def pig(self, bot, cli, event):
        cli.msg(event.target, bot._(event, self, "pog").format(event.source))

    def ping(self, bot, cli, event):
        cli.msg(event.target, event.source + ": pong")

    def pong(self, bot, cli, event):
        cli.msg(event.target, event.source + ": ping")

    def lag(self, bot, cli, event):
        current_milli_time = int(round(time.time() * 1000))
        cli.privmsg(event.source, "\1PING %s\1" % current_milli_time)
        self.chan = event.target

    def pingrep(self, client, event):
        if not event.arguments[0] == "PING":
            return 0
        current_milli_time = int(round(time.time() * 1000))
        diff = current_milli_time - int(event.arguments[1])
        secs = locale.str(diff / 1000)  # milisegudos -> segundos
        client.msg(self.chan, bot._(event, self, "lag").format(event.source, secs))
<commit_msg>Oops! Fixing the lag command.<commit_after># -*- coding: utf-8 -*-
import time
import locale


class ping:

    def __init__(self, core, client):
        core.addCommandHandler("ping", self, chelp="ping.help")
        core.addCommandHandler("pong", self)
        core.addCommandHandler("pig", self)
        core.addCommandHandler("lag", self, chelp="lag.help")
        core.addHandler("ctcpreply", self, "pingrep")
        self.bot = core

    def pig(self, bot, cli, event):
        cli.msg(event.target, bot._(event, self, "pog").format(event.source))

    def ping(self, bot, cli, event):
        cli.msg(event.target, event.source + ": pong")

    def pong(self, bot, cli, event):
        cli.msg(event.target, event.source + ": ping")

    def lag(self, bot, cli, event):
        current_milli_time = int(round(time.time() * 1000))
        cli.privmsg(event.source, "\1PING %s\1" % current_milli_time)
        self.chan = event.target

    def pingrep(self, client, event):
        if not event.arguments[0] == "PING":
            return 0
        current_milli_time = int(round(time.time() * 1000))
        diff = current_milli_time - int(event.arguments[1])
        secs = locale.str(diff / 1000)  # milisegudos -> segundos
        client.msg(self.chan, self.bot._(event, self, "lag").format(event.source, secs))

{'fraction_non_alphanumeric': 0.15452793834296724, 'fraction_numerical': 0.013872832369942197, 'mean_word_length': 2.8804185351270553, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 5, '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': '6846545', 'n_tokens_mistral': 915, 'n_tokens_neox': 854, 'n_words': 188}