<commit_before>from genpy.keyval import ElephantDB

from thrift import Thrift
from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol
from thrift.Thrift import TException
from thrift.transport.TTransport import TTransportException
from thrift.TSerialization import serialize, deserialize
import socket

class ElephantDBClient:
    def __init__(self, host, port, timeout=None):
        self._host = host
        self._port = port
        self._timeout = timeout
        self._reset()
        self._connect()

    def get(self, domain, key):
        return self._exec(lambda client: client.get(domain, key))

    def getString(self, domain, key):
        return self._exec(lambda client: client.getString(domain, key))

    def getInt(self, domain, key):
        return self._exec(lambda client: client.getInt(domain, key))

    def getLong(self, domain, key):<commit_msg>changed 'ElephantDBClient' class to be a current-style python class<commit_after>from genpy.keyval import ElephantDB

from thrift import Thrift
from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol
from thrift.Thrift import TException
from thrift.transport.TTransport import TTransportException
from thrift.TSerialization import serialize, deserialize
import socket

class ElephantDBClient(object):
    def __init__(self, host, port, timeout=None):
        self._host = host
        self._port = port
        self._timeout = timeout
        self._reset()
        self._connect()

    def get(self, domain, key):
        return self._exec(lambda client: client.get(domain, key))

    def getString(self, domain, key):
        return self._exec(lambda client: client.getString(domain, key))

    def getInt(self, domain, key):
        return self._exec(lambda client: client.getInt(domain, key))

    def getLong(self, domain, key):
{'fraction_non_alphanumeric': 0.08126293995859213, 'fraction_numerical': 0.0, 'mean_word_length': 3.9060913705583755, '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': '3278540', 'n_tokens_mistral': 529, 'n_tokens_neox': 523, 'n_words': 169}