<commit_before>#!/usr/bin/env python

import socket

network = "irc.rizon.net"
port = 6660
username = "sadpy"
ident = username
nick = username
ident1 = "USER " + ident + " 0 1 :" + username
ident2 = "NICK " + nick

def init(servname, servport):
    global s
    s = socket.socket(
        socket.AF_INET, socket.SOCK_STREAM)
    s.connect((servname, servport)) #server name and port
    s.send('NICK %s\n' %nick)
    s.send('USER %s 0 1 : %s\n' %(nick, nick))
    mainloop()
def mainloop():
    while 1:
        global data
        data = s.recv(1024)
        print data

#def parse():


if __name__ == '__main__':
    init(network,port)<commit_msg>added joining, working on parsing like the type seen in sadbot<commit_after>#!/usr/bin/env python

import socket

network = "irc.rizon.net"
port = 6660
username = "sadpy"

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((network, port)) #server name and port

s.send('NICK sadpy\r\n')
s.send('USER sadpy sadpy sadpy :sadpy sadpy\r\n')
s.send('JOIN #sadbot-dev \r\n')

while 1:
  global data
  data = s.recv(1024)
  print data
  nick = data.split('!')[0]
  nick = nick.replace(":", "")
  print nick
{'fraction_non_alphanumeric': 0.14888123924268504, 'fraction_numerical': 0.021514629948364887, 'mean_word_length': 3.33955223880597, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, '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': '2570892', 'n_tokens_mistral': 458, 'n_tokens_neox': 431, 'n_words': 118}