<commit_before><?php
/**
 * ownCloud - clockwork
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author <NAME> <<EMAIL>>
 * @copyright <NAME> 2014
 */

namespace OCA\Clockwork\AppInfo;

use Clockwork\Clockwork;
use Clockwork\DataSource\PhpDataSource;
use Clockwork\Storage\FileStorage;
use OCA\Clockwork\Controller\ClockworkController;
use OCA\Clockwork\DataSource;
use \OCP\AppFramework\App;
use \OCP\IContainer;

class Application extends App {
	public function __construct(array $urlParams = array()) {
		parent::__construct('clockwork', $urlParams);

		$container = $this->getContainer();

		/**
		 * Controllers
		 */
		$container->registerService('ClockworkController', function (IContainer $c) {
			return new ClockworkController(
				$c->query('AppName'),
				$c->query('Request'),
				$c->query('Storage')
			);
		});

		/**
		 * Core
		 */
		$container->registerService('Storage', function (IContainer $c) {
			return new FileStorage('/srv/http/xdebug');
		});
<commit_msg>store in oc data dir<commit_after><?php
/**
 * ownCloud - clockwork
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author <NAME> <<EMAIL>>
 * @copyright <NAME> 2014
 */

namespace OCA\Clockwork\AppInfo;

use Clockwork\Clockwork;
use Clockwork\DataSource\PhpDataSource;
use Clockwork\Storage\FileStorage;
use OCA\Clockwork\Controller\ClockworkController;
use OCA\Clockwork\DataSource;
use \OCP\AppFramework\App;
use \OCP\IContainer;

class Application extends App {
	public function __construct(array $urlParams = array()) {
		parent::__construct('clockwork', $urlParams);

		$container = $this->getContainer();

		/**
		 * Controllers
		 */
		$container->registerService('ClockworkController', function (IContainer $c) {
			return new ClockworkController(
				$c->query('AppName'),
				$c->query('Request'),
				$c->query('Storage')
			);
		});

		/**
		 * Core
		 */
		$container->registerService('Storage', function (IContainer $c) {
			$config = \OC::$server->getConfig();
			$dataDir = $config->getSystemValue("datadirectory", \OC::$SERVERROOT . '/data');
			return new FileStorage($dataDir . '/clockwork');
		});

{'fraction_non_alphanumeric': 0.15048975957257346, 'fraction_numerical': 0.004452359750667854, 'mean_word_length': 4.287058823529412, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 25, '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': '3271195', 'n_tokens_mistral': 770, 'n_tokens_neox': 692, 'n_words': 161}