Linux aries.aptans.com 4.18.0-348.20.1.lve.1.el8.x86_64 #1 SMP Wed Mar 16 08:45:39 EDT 2022 x86_64
Apache
: 135.181.142.107 | : 172.69.59.197
Cant Read [ /etc/named.conf ]
7.4.33
aja
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
aja /
public_html /
ead /
analytics /
classes /
[ HOME SHELL ]
Name
Size
Permission
Action
local
[ DIR ]
drwxr-xr-x
privacy
[ DIR ]
drwxr-xr-x
action.php
3.39
KB
-rw-r--r--
admin_setting_predictor.php
2.55
KB
-rw-r--r--
analysable.php
1.87
KB
-rw-r--r--
analysis.php
37.08
KB
-rw-r--r--
bulk_action.php
2.45
KB
-rw-r--r--
calculable.php
10.32
KB
-rw-r--r--
calculation_info.php
6.43
KB
-rw-r--r--
classifier.php
2.26
KB
-rw-r--r--
course.php
17.7
KB
-rw-r--r--
dataset_manager.php
14.28
KB
-rw-r--r--
default_bulk_actions.php
4.29
KB
-rw-r--r--
insights_generator.php
9.79
KB
-rw-r--r--
manager.php
36.32
KB
-rw-r--r--
model.php
71.19
KB
-rw-r--r--
model_config.php
11.05
KB
-rw-r--r--
packable.php
2
KB
-rw-r--r--
prediction.php
7.59
KB
-rw-r--r--
prediction_action.php
3.43
KB
-rw-r--r--
predictor.php
2.62
KB
-rw-r--r--
regressor.php
2.26
KB
-rw-r--r--
requirements_exception.php
1.22
KB
-rw-r--r--
site.php
2.47
KB
-rw-r--r--
stats.php
2.38
KB
-rw-r--r--
user.php
4.73
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : calculation_info.php
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Extra information generated during the analysis by calculable elements. * * @package core_analytics * @copyright 2019 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace core_analytics; defined('MOODLE_INTERNAL') || die(); /** * Extra information generated during the analysis by calculable elements. * * The main purpose of this request cache is to allow calculable elements to * store data during their calculations for further use at a later stage efficiently. * * @package core_analytics * @copyright 2019 David Monllao {@link http://www.davidmonllao.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class calculation_info { /** * @var array */ private $info = []; /** * @var mixed[] */ private $samplesinfo = []; /** * Adds info related to the current calculation for later use when generating insights. * * Note that the data in $info array is reused across multiple samples, if you want to add data just for this * sample you can use the sample id as key. * * We store two different arrays so objects that appear multiple times for different samples * appear just once in memory. * * @param int $sampleid The sample id this data is associated with * @param array $info The data. Indexed by an id unique across the site. E.g. an activity id. * @return null */ public function add_shared(int $sampleid, array $info) { // We can safely overwrite the existing keys because the provided info is supposed to be unique // for the indicator. $this->info = $info + $this->info; // We also need to store the association between the info provided and the sample. $this->samplesinfo[$sampleid] = array_keys($info); } /** * Stores in MUC the previously added data and it associates it to the provided $calculable. * * @param \core_analytics\calculable $calculable * @param \core_analytics\local\time_splitting\base $timesplitting * @param int $rangeindex * @return null */ public function save(\core_analytics\calculable $calculable, \core_analytics\local\time_splitting\base $timesplitting, int $rangeindex) { $calculableclass = get_class($calculable); $cache = \cache::make('core', 'calculablesinfo'); foreach ($this->info as $key => $value) { $datakey = self::get_data_key($calculableclass, $key); // We do not overwrite existing data. if (!$cache->has($datakey)) { $cache->set($datakey, $value); } } foreach ($this->samplesinfo as $sampleid => $infokeys) { $uniquesampleid = $timesplitting->append_rangeindex($sampleid, $rangeindex); $samplekey = self::get_sample_key($uniquesampleid); // Update the cached data adding the new indicator data. $cacheddata = $cache->get($samplekey); $cacheddata[$calculableclass] = $infokeys; $cache->set($samplekey, $cacheddata); } // Empty the in-memory arrays now that it is in the cache. $this->info = []; $this->samplesinfo = []; } /** * Pulls the info related to the provided records out from the cache. * * Note that this function purges 'calculablesinfo' cache. * * @param \stdClass[] $predictionrecords * @return array|false */ public static function pull_info(array $predictionrecords) { $cache = \cache::make('core', 'calculablesinfo'); foreach ($predictionrecords as $uniquesampleid => $predictionrecord) { $sampleid = $predictionrecord->sampleid; $sampleinfo = $cache->get(self::get_sample_key($uniquesampleid)); // MUC returns (or should return) copies of the data and we want a single copy of it so // we store the data here and reference it from each sample. Samples data should not be // changed afterwards. $data = []; if ($sampleinfo) { foreach ($sampleinfo as $calculableclass => $infokeys) { foreach ($infokeys as $infokey) { // We don't need to retrieve data back from MUC if we already have it. if (!isset($data[$calculableclass][$infokey])) { $datakey = self::get_data_key($calculableclass, $infokey); $data[$calculableclass][$infokey] = $cache->get($datakey); } $samplesdatakey = $calculableclass . ':extradata'; $samplesdata[$sampleid][$samplesdatakey][$infokey] = & $data[$calculableclass][$infokey]; } } } } // Free memory ASAP. We can replace the purge call by a delete_many if we are interested on allowing // multiple calls to pull_info passing in different $sampleids. $cache->purge(); if (empty($samplesdata)) { return false; } return $samplesdata; } /** * Gets the key used to store data. * * @param string $calculableclass * @param string|int $key * @return string */ private static function get_data_key(string $calculableclass, $key): string { return 'data:' . $calculableclass . ':' . $key; } /** * Gets the key used to store samples. * * @param string $uniquesampleid * @return string */ private static function get_sample_key(string $uniquesampleid): string { return 'sample:' . $uniquesampleid; } }
Close