<commit_before><?php

namespace app\modules\admin\controllers;

use app\api\core\API;
use app\helpers\Page;
use app\helpers\RegUser;
use app\modules\admin\models\ApiVisitorDetail;
use yii\data\ArrayDataProvider;
use yii\helpers\ArrayHelper;
use yii\web\Response;
use app\modules\admin\models\VisitsDetails;

class StatController extends \yii\web\Controller
{


    public function actionTest($user,$type,$ref){
        var_dump(RegUser::get($user,$type,$ref));
    }
    public function actionOTest($user,$type,$ref){
        var_dump(RegUser::getUserData($user,$type,$ref));
    }

    public function actionUpdateRegUser(){
        $params['filter_offset'] = max(0,\yii::$app->request->get('filter_offset',0));
        $params['filter_limit'] = 20;
        $params['segment'] = 'userId!=';
        if(!empty($visitorId)){
            $params['segment'] = 'visitorId=='.$visitorId;
        }
        $data = API::run('Live.getLastVisitsDetails',$params);
        $this->format($data);
        $this->redirect(['reg-user','filter_offset'=>$params['filter_offset']]);
    }

    public function actionRegUserLebao(){
        $model  = new VisitsDetails();
        $model->load(\yii::$app->request->queryParams);

        $data = $model->search(1);

        $dataProvider = new ArrayDataProvider([
            'allModels' => $data,
            'pagination' => [
                'pageSize' => $model->filter_limit,
            ],
        ]);
<commit_msg>zzzzzzzzzzzzzz<commit_after><?php

namespace app\modules\admin\controllers;

use app\api\core\API;
use app\helpers\Page;
use app\helpers\RegUser;
use app\modules\admin\models\ApiVisitorDetail;
use yii\data\ArrayDataProvider;
use yii\helpers\ArrayHelper;
use yii\web\Response;
use app\modules\admin\models\VisitsDetails;

class StatController extends \yii\web\Controller
{


    public function actionTest($user,$type,$ref){
        print_r(RegUser::get($user,$type,$ref));
    }
    public function actionOTest($user,$type,$ref){
        print_r(RegUser::getUserData($user,$type,$ref));
    }

    public function actionUpdateRegUser(){
        $params['filter_offset'] = max(0,\yii::$app->request->get('filter_offset',0));
        $params['filter_limit'] = 20;
        $params['segment'] = 'userId!=';
        if(!empty($visitorId)){
            $params['segment'] = 'visitorId=='.$visitorId;
        }
        $data = API::run('Live.getLastVisitsDetails',$params);
        $this->format($data);
        $this->redirect(['reg-user','filter_offset'=>$params['filter_offset']]);
    }

    public function actionRegUserLebao(){
        $model  = new VisitsDetails();
        $model->load(\yii::$app->request->queryParams);

        $data = $model->search(1);

        $dataProvider = new ArrayDataProvider([
            'allModels' => $data,
            'pagination' => [
                'pageSize' => $model->filter_limit,
            ],
        ]);

{'fraction_non_alphanumeric': 0.1709755256807997, 'fraction_numerical': 0.003447087211306446, 'mean_word_length': 3.1875901875901875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '518340', 'n_tokens_mistral': 905, 'n_tokens_neox': 904, 'n_words': 128}