<commit_before>-module(nani_event).

-export([start/0, start_link/0, add_handler/2, delete_handler/2]).

-export([privmsg/4, names/3,
         tcp_receive/1, tcp_send/1, 
         tcp_error/1, tcp_closed/1]).

-define(SERVER, ?MODULE).

start() ->
    gen_event:start({local, ?SERVER}).

start_link() ->
    gen_event:start_link({local, ?SERVER}).

add_handler(Handler, Args) ->
    gen_event:add_handler(?SERVER, Handler, Args).

delete_handler(Handler, Args) ->
    gen_event:delete_handler(?SERVER, Handler, Args).

privmsg(Nick, From, To, Text) ->
    gen_event:notify(?SERVER, {privmsg, Nick, From, To, Text}).

names(Nick, Channel, Names) ->
    gen_event:notify(?SERVER, {names, Nick, Channel, Names}).

tcp_receive(Data) ->
    gen_event:notify(?SERVER, {tcp_receive, Data}).

tcp_send(Data) ->
    gen_event:notify(?SERVER, {send, Data}).

tcp_error(Reason) ->
    gen_event:notify(?SERVER, {tcp_error, Reason}).

tcp_closed(Socket) ->
    gen_event:notify(?SERVER, {tcp_closed, Socket}).<commit_msg>grfrrrr<commit_after>-module(nani_event).

-export([start/0, start_link/0, add_handler/2, delete_handler/2]).

-export([privmsg/4, names/3,
         tcp_receive/1, tcp_send/1, 
         tcp_error/1, tcp_closed/1]).

-define(SERVER, ?MODULE).

start() ->
    gen_event:start({local, ?SERVER}).

start_link() ->
    gen_event:start_link({local, ?SERVER}).

add_handler(Handler, Args) ->
    gen_event:add_handler(?SERVER, Handler, Args).

delete_handler(Handler, Args) ->
    gen_event:delete_handler(?SERVER, Handler, Args).

privmsg(Nick, From, To, Text) ->
    gen_event:notify(?SERVER, {privmsg, Nick, From, To, Text}).

names(Nick, Channel, Names) ->
    gen_event:notify(?SERVER, {names, Nick, Channel, Names}).

tcp_receive(Data) ->
    gen_event:notify(?SERVER, {tcp_receive, Data}).

tcp_send(Data) ->
    gen_event:notify(?SERVER, {tcp_send, Data}).

tcp_error(Reason) ->
    gen_event:notify(?SERVER, {tcp_error, Reason}).

tcp_closed(Socket) ->
    gen_event:notify(?SERVER, {tcp_closed, Socket}).
{'fraction_non_alphanumeric': 0.1775793650793651, 'fraction_numerical': 0.00992063492063492, 'mean_word_length': 4.526027397260274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, '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': '3782677', 'n_tokens_mistral': 756, 'n_tokens_neox': 727, 'n_words': 125}