<commit_before>local savegif = {
    func = function(msg)
        local target = msg.reply_to_message.video or msg.reply_to_message.document
        if target and target.mime_type == "video/mp4" then
            if target.file_size <= 20480000 then
                bot.downloadFile(target.file_id, "tmp.mp4")
                os.remove("tmp.gif")
                local factor = tonumber(msg.text:match("([%d%.]+)")) or 1
                os.execute("gifski tmp.mp4 --output tmp.gif --fast-forward " .. factor)
                local fn = os.time() .. ".gif"
                os.execute("mv tmp.gif /var/www/server.sforest.in/" .. fn)
                bot.sendMessage(msg.chat.id, "[Click to download](https://server.sforest.in/" .. fn .. ")", "Markdown", nil, nil, msg.message_id)
            else
                bot.sendMessage(msg.chat.id, "Sorry, size limit is 20M.")
            end
        else
            bot.sendMessage(msg.chat.id, "Not found.")
        end<commit_msg>feat(commands/savegif): send msg before processing<commit_after>local savegif = {
    func = function(msg)
        local target = msg.reply_to_message.video or msg.reply_to_message.document
        if target and target.mime_type == "video/mp4" then
            if target.file_size <= 20480000 then
                local sent_msg = bot.sendMessage{
                    chat_id = msg.chat.id,
                    text = "Roger. Wait a moment ...",
                    parse_mode = "Markdown",
                    reply_to_message_id = msg.message_id
                }
                bot.downloadFile(target.file_id, "tmp.mp4")
                os.remove("tmp.gif")
                local factor = tonumber(msg.text:match("([%d%.]+)")) or 1
                os.execute("gifski tmp.mp4 --output tmp.gif --fast-forward " .. factor)
                local fn = os.time() .. ".gif"
                os.execute("mv tmp.gif /var/www/server.sforest.in/" .. fn)
                bot.editMessage{
                    chat_id = msg.chat.id,
                    message_id = sent_msg.result.message_id,
                    text = "[Click to download](https://server.sforest.in/" .. fn .. ")",
                    parse_mode = "Markdown"
                }
            else
                bot.sendMessage(msg.chat.id, "Sorry, size limit is 20M.")
            end
        else
            bot.sendMessage(msg.chat.id, "Sorry, gif not found.")
        end
{'fraction_non_alphanumeric': 0.12879102617366014, 'fraction_numerical': 0.011632737847943497, 'mean_word_length': 1.5347368421052632, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2610243', 'n_tokens_mistral': 733, 'n_tokens_neox': 679, 'n_words': 148}