<commit_before><?php
srand(1);

class memcachedTools
{
    public $filename = __DIR__ . '/memcacheData.txt';
    public $fileMode = FILE_APPEND;

    public $host = '127.0.0.1';
    public $port = '11211';

    public $memcached = null;

    public $list  = [];
    public $limit = 10000000000000;


    // internals
    private $slabs;
    private $memcachedSock;
    private $mcEnd = ["END\r\n", "ERROR\r\n", "STORED\r\n", "NOT_STORED\r\n", "EXISTS\r\n", "NOT_FOUND\r\n", "DELETED\r\n"];
    private $lastEnd;


    public function __construct($host = '127.0.0.1:11211')
    {
        $this->memcached = new Memcached('tools_id');
        $this->memcached->setOption(Memcached::OPT_TCP_KEEPALIVE, 200);
        $this->memcached->setOption(Memcached::OPT_TCP_NODELAY, true);
        $this->memcached->setOption(Memcached::OPT_NO_BLOCK, true);

        $hostList = explode(',', $host);
        foreach ($hostList as $host) {
            list($host, $port,) = explode(':', $host);
            if (!$port) {
                $port = $this->port;
            }
            $this->memcached->addServer($host, $port);
        }
    }

    // open tcp connection to server
    // so we can run raw queries like stats cachedump, stats slabs etc...
    // commands cheat-sheet below
    // @link https://lzone.de/cheat-sheet/memcached
    private function initMemcachedSock()
    {
        if (!is_resource($this->memcachedSock)) {
            $this->memcachedSock = fsockopen($this->host, $this->port);<commit_msg>remove session and options<commit_after><?php
srand(1);

class memcachedTools
{
    public $filename = __DIR__ . '/memcacheData.txt';
    public $fileMode = FILE_APPEND;

    public $host = '127.0.0.1';
    public $port = '11211';

    public $memcached = null;

    public $list  = [];
    public $limit = 10000000000000;


    // internals
    private $slabs;
    private $memcachedSock;
    private $mcEnd = ["END\r\n", "ERROR\r\n", "STORED\r\n", "NOT_STORED\r\n", "EXISTS\r\n", "NOT_FOUND\r\n", "DELETED\r\n"];
    private $lastEnd;


    public function __construct($host = '127.0.0.1:11211')
    {
        $this->memcached = new Memcached();
        // $this->memcached->setOption(Memcached::OPT_TCP_KEEPALIVE, 200);
        // $this->memcached->setOption(Memcached::OPT_TCP_NODELAY, true);
        // $this->memcached->setOption(Memcached::OPT_NO_BLOCK, true);

        $hostList = explode(',', $host);
        foreach ($hostList as $host) {
            list($host, $port,) = explode(':', $host);
            if (!$port) {
                $port = $this->port;
            }
            $this->memcached->addServer($host, $port);
        }
    }

    // open tcp connection to server
    // so we can run raw queries like stats cachedump, stats slabs etc...
    // commands cheat-sheet below
    // @link https://lzone.de/cheat-sheet/memcached
    private function initMemcachedSock()
    {
        if (!is_resource($this->memcachedSock)) {
            $this->memcachedSock = fsockopen($this->host, $this->port);
{'fraction_non_alphanumeric': 0.164021164021164, 'fraction_numerical': 0.026455026455026454, 'mean_word_length': 2.52975495915986, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 2, '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': '4676272', 'n_tokens_mistral': 1073, 'n_tokens_neox': 994, 'n_words': 204}