<commit_before># -*- coding: utf-8 -*-

import socket
from escpos import printer
import threading
import time
# TCP_PORT = 9100


class ReceiptDirectJetDriver( printer.Network ):
	connected = False
	
	def __init__(self, host, port=9100, timeout=10):
		""" escrito aqui solo para tener bien en claro las variables iniciales"""
		try:
			printer.Network.__init__(self,host,port, timeout)	
			self.connected = True
		except Exception:
			self.connected = False


	def reconnect(self):<commit_msg>soporte para acentos y eñes<commit_after># -*- coding: utf-8 -*-

import socket
from escpos import printer
import threading
import time
# TCP_PORT = 9100


class ReceiptDirectJetDriver( printer.Network ):
	connected = False
	
	#default a codepage latino con acentos y eñes
	codepage = "cp858"

	def __init__(self, host, port=9100, timeout=10):
		""" escrito aqui solo para tener bien en claro las variables iniciales"""
		try:
			printer.Network.__init__(self,host,port, timeout)	
			self.connected = True
		except Exception:
			self.connected = False


	def reconnect(self):
{'fraction_non_alphanumeric': 0.09550561797752809, 'fraction_numerical': 0.023408239700374533, 'mean_word_length': 4.318407960199005, 'pattern_counts': {'":': 0, '<': 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': '2248636', 'n_tokens_mistral': 380, 'n_tokens_neox': 332, 'n_words': 107}