<commit_before><?php
/**
 * The home page controller.
 */
class HomeController extends SiteController {

	private static $popular_blacklist = array(
		'silverstripe/framework',
		'silverstripe/cms',
		'silverstripe/sqlite3',
		'silverstripe/postgresql',
		'silverstripe-themes/simple'
	);

	public static $allowed_actions = array(
		'index'
	);

	public function index() {
		return $this->renderWith(array('Home', 'Page'));
	}

	public function Title() {
		return 'Home';
	}

	public function Link() {
		return Director::baseURL();
	}

	public function PopularAddons($limit = 10) {
		return Addon::get()
			->sort('Downloads', 'DESC')
			->exclude('Name', $this->config()->popular_blacklist)
			->limit($limit);
	}

	public function NewestAddons($limit = 10) {
		return Addon::get()->sort('Released', 'DESC')->limit($limit);
	}

	public function RandomAddons($limit = 10) {
		return Addon::get()->sort(DB::getConn()->random(), 'DESC')->limit($limit);
	}

	public function NewestVersions($limit = 10) {
		return AddonVersion::get()
			->filter('Development', false)
			->sort('Released', 'DESC')
			->limit($limit);
	}

	public function ChartData() {
		$chartData = array();
		$list = ArrayList::create(array());

		$sqlQuery = new SQLQuery();
		$sqlQuery->setFrom('Addon');
		$sqlQuery->setSelect('Created');
		$sqlQuery->selectField('COUNT(*)', 'CountInOneDay');
		$sqlQuery->addWhere('"Created" >= DATE_SUB(NOW(), INTERVAL 30 DAY)');
		$sqlQuery->addGroupBy('DATE(Created)');

		$result = $sqlQuery->execute();

		if(count($result)) {
			foreach($result as $row) {
				$date = date('j M Y', strtotime($row['Created']));
				if(!isset($chartData[$date])) {
					$chartData[$date] = $row['CountInOneDay'];
				}	
			}
		} 

		if(count($chartData)) {
			foreach($chartData as $x => $y) {
				$list->push(ArrayData::create(array(
					'XValue' => $x,
					'YValue' => $y
				)));
			}
		}
		
		return $list;
	}
}<commit_msg>Return column compatible with ONLY_FULL_GROUP_BY<commit_after><?php
/**
 * The home page controller.
 */
class HomeController extends SiteController {

	private static $popular_blacklist = array(
		'silverstripe/framework',
		'silverstripe/cms',
		'silverstripe/sqlite3',
		'silverstripe/postgresql',
		'silverstripe-themes/simple'
	);

	public static $allowed_actions = array(
		'index'
	);

	public function index() {
		return $this->renderWith(array('Home', 'Page'));
	}

	public function Title() {
		return 'Home';
	}

	public function Link() {
		return Director::baseURL();
	}

	public function PopularAddons($limit = 10) {
		return Addon::get()
			->sort('Downloads', 'DESC')
			->exclude('Name', $this->config()->popular_blacklist)
			->limit($limit);
	}

	public function NewestAddons($limit = 10) {
		return Addon::get()->sort('Released', 'DESC')->limit($limit);
	}

	public function RandomAddons($limit = 10) {
		return Addon::get()->sort(DB::getConn()->random(), 'DESC')->limit($limit);
	}

	public function NewestVersions($limit = 10) {
		return AddonVersion::get()
			->filter('Development', false)
			->sort('Released', 'DESC')
			->limit($limit);
	}

	public function ChartData() {
		$chartData = array();
		$list = ArrayList::create(array());

		$sqlQuery = new SQLQuery();
		$sqlQuery->setFrom('Addon');
		$sqlQuery->selectField('DATE(Created)', 'Created');
		$sqlQuery->selectField('COUNT(*)', 'CountInOneDay');
		$sqlQuery->addWhere('"Created" >= DATE_SUB(NOW(), INTERVAL 30 DAY)');
		$sqlQuery->addGroupBy('DATE(Created)');

		$result = $sqlQuery->execute();

		if(count($result)) {
			foreach($result as $row) {
				$date = date('j M Y', strtotime($row['Created']));
				if(!isset($chartData[$date])) {
					$chartData[$date] = $row['CountInOneDay'];
				}
			}
		}

		if(count($chartData)) {
			foreach($chartData as $x => $y) {
				$list->push(ArrayData::create(array(
					'XValue' => $x,
					'YValue' => $y
				)));
			}
		}

		return $list;
	}
}
{'fraction_non_alphanumeric': 0.1990241397021058, 'fraction_numerical': 0.005649717514124294, 'mean_word_length': 4.394736842105263, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6333812', 'n_tokens_mistral': 1545, 'n_tokens_neox': 1320, 'n_words': 247}