<commit_before># -*- coding: utf-8 -*-
"""
Created on Feb 14, 2014

@author: Tyranic-Moron
"""

import copy
import re

from IRCMessage import IRCMessage
from IRCResponse import IRCResponse, ResponseType
from CommandInterface import CommandInterface


class Sed(CommandInterface):
    triggers = ['sed']
    acceptedTypes = ['PRIVMSG', 'ACTION']
    help = 's/search/replacement/flags - matches sed-like regex replacement patterns and attempts to execute them on the latest matching line from the last 10\n'\
           'flags are g (global), i (case-insensitive), o (only user messages), v (verbose, ignores whitespace)\n'\
           'Example usage: "I\'d eat some tacos" -> s/some/all the/ -> "I\'d eat all the tacos"'

    historySize = 20

    def onLoad(self):
        #TODO: make these per-channel
        self.messages = {}<commit_msg>[Sed] remove the todo; it's done<commit_after># -*- coding: utf-8 -*-
"""
Created on Feb 14, 2014

@author: Tyranic-Moron
"""

import copy
import re

from IRCMessage import IRCMessage
from IRCResponse import IRCResponse, ResponseType
from CommandInterface import CommandInterface


class Sed(CommandInterface):
    triggers = ['sed']
    acceptedTypes = ['PRIVMSG', 'ACTION']
    help = 's/search/replacement/flags - matches sed-like regex replacement patterns and attempts to execute them on the latest matching line from the last 10\n'\
           'flags are g (global), i (case-insensitive), o (only user messages), v (verbose, ignores whitespace)\n'\
           'Example usage: "I\'d eat some tacos" -> s/some/all the/ -> "I\'d eat all the tacos"'

    historySize = 20

    def onLoad(self):
        self.messages = {}
{'fraction_non_alphanumeric': 0.11471471471471471, 'fraction_numerical': 0.013213213213213212, 'mean_word_length': 3.395778364116095, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4068315', 'n_tokens_mistral': 515, 'n_tokens_neox': 482, 'n_words': 183}