<commit_before>from tcpgecko import TCPGecko
from textwrap import wrap
from struct   import pack
from binascii import hexlify, unhexlify
import sys

def pokecolor(pos, string):
    color = textwrap.wrap(string, 4)
    tcp.pokemem(pos, struct.unpack(">I", color[0])[0])
    tcp.pokemem(pos + 4, struct.unpack(">I", color[1])[0])
    tcp.pokemem(pos + 8, struct.unpack(">I", color[2])[0])
    tcp.pokemem(pos + 12, struct.unpack(">I", color[3])[0])

tcp = TCPGecko("192.168.137.3")
Colors = b""
for i in range(1, 4): #Ignores Alpha since it doesn't use it
    Color = wrap(sys.argv[i], 2) #Split it into 2 character chunks
    for j in range(3):
        Colors += pack(">f", ord(unhexlify(Color[j])) / 256)
    Colors += pack(">f", 1.0)
tcp.writestr(0x12D14F64, Colors) #Only overwrites currently loaded color
                                 #You need to figure out timing to apply
tcp.s.close()
print("Done.")<commit_msg>Update ColorHax to 2.3.0 address<commit_after>from tcpgecko import TCPGecko
from textwrap import wrap
from struct   import pack
from binascii import unhexlify
import sys

tcp = TCPGecko("192.168.0.8") #Wii U IP address
Colors = b""
for i in range(1, 4): #Ignores Alpha since it doesn't use it
    Color = wrap(sys.argv[i], 2) #Split it into 2 character chunks
    for j in range(3): #Create the RGB floats
        Colors += pack(">f", ord(unhexlify(Color[j])) / 256)
    Colors += pack(">f", 1.0) #Alpha
tcp.writestr(0x12D18F64, Colors) #Only overwrites currently loaded color
                                 #Run a command right after the lobby is "ready"
tcp.s.close()
print("Done!")
{'fraction_non_alphanumeric': 0.13690105787181084, 'fraction_numerical': 0.042314872433105166, 'mean_word_length': 3.5168539325842696, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6901160', 'n_tokens_mistral': 614, 'n_tokens_neox': 565, 'n_words': 177}