<commit_before><?php
class Kwf_Assets_WebpackConfig
{
    public static function getDevServerPort()
    {
        if (!Kwf_Config::getValue('debug.webpackDevServer')) {
            return null;
        }

        if ($port = Kwf_Config::getValue('debug.webpackDevServerPort')) {
            return $port;
        }
        $port = null;
        if (file_exists('cache/webpack-dev-server-port')) {
            $port = file_get_contents('cache/webpack-dev-server-port');
        } else {
            while (true) {
                if ($port) {
                    $r = @socket_create_listen($port);
                    if ($r) {
                        socket_close($r);
                        break;
                    }
                }
                $port = rand(1024, 65535);
            }
            file_put_contents('cache/webpack-dev-server-port', $port);
        }
        return $port;
    }

    public static function getDevServerPublic()
    {
        if ($ret = Kwf_Config::getValue('debug.webpackDevServerPublic')) {
            return $ret;
        } else {
            return Kwf_Config::getValue('server.domain').':'.self::getDevServerPort();
        }<commit_msg>smaller range for webpack dev server ports<commit_after><?php
class Kwf_Assets_WebpackConfig
{
    public static function getDevServerPort()
    {
        if (!Kwf_Config::getValue('debug.webpackDevServer')) {
            return null;
        }

        if ($port = Kwf_Config::getValue('debug.webpackDevServerPort')) {
            return $port;
        }
        $port = null;
        if (file_exists('cache/webpack-dev-server-port')) {
            $port = file_get_contents('cache/webpack-dev-server-port');
        } else {
            while (true) {
                if ($port) {
                    $r = @socket_create_listen($port);
                    if ($r) {
                        socket_close($r);
                        break;
                    }
                }
                $port = rand(11700, 11800);
            }
            file_put_contents('cache/webpack-dev-server-port', $port);
        }
        return $port;
    }

    public static function getDevServerPublic()
    {
        if ($ret = Kwf_Config::getValue('debug.webpackDevServerPublic')) {
            return $ret;
        } else {
            return Kwf_Config::getValue('server.domain').':'.self::getDevServerPort();
        }
{'fraction_non_alphanumeric': 0.12323064113238967, 'fraction_numerical': 0.00791007493755204, 'mean_word_length': 1.5536663124335812, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3716272', 'n_tokens_mistral': 684, 'n_tokens_neox': 640, 'n_words': 110}