<commit_before>import Service, { inject as service } from '@ember/service';
import RSVP from 'rsvp';
import { isEmpty, isPresent } from '@ember/utils';
import { singularize, pluralize } from 'ember-inflector';
import { capitalize, camelize, dasherize } from '@ember/string';
import striptags from 'striptags';

const { filter, resolve, map } = RSVP;

export default class ReportingService extends Service {
  @service store;
  @service currentUser;
  @service intl;
  @service iliosConfig;

  // model: computed('currentUser.currentUserId', async function () {
  //   return this.currentUser.getModel();
  // }),
  //
  // reportsList: computed('model.reports.[]', async function () {
  //   const user = await this.model;
  //   return isEmpty(user) ? [] : await user.reports;
  // }),
  // canViewCourses: computed('currentUser.performsNonLearnerFunction', async function () {
  //   const currentUser = this.currentUser;
  //   return currentUser.get('performsNonLearnerFunction');
  // });
  //
  // canViewPrograms: computed('currentUser.performsNonLearnerFunction', async function () {
  //   const currentUser = this.currentUser;
  //   return currentUser.get('performsNonLearnerFunction');
  // });

  async findResults(report) {
    const store = this.store;
    const subject = report.subject;
    const object = report.prepositionalObject;
    const objectId = report.prepositionalObjectTableRowId;
    const school = await report.school;
    return store.query(this.getModel(subject), this.getQuery(subject, object, objectId, school));
  }

  async getResults(report, year) {
    const subject = report.subject;<commit_msg>rm obsolete CPs.<commit_after>import Service, { inject as service } from '@ember/service';
import RSVP from 'rsvp';
import { isEmpty, isPresent } from '@ember/utils';
import { singularize, pluralize } from 'ember-inflector';
import { capitalize, camelize, dasherize } from '@ember/string';
import striptags from 'striptags';

const { filter, resolve, map } = RSVP;

export default class ReportingService extends Service {
  @service store;
  @service currentUser;
  @service intl;
  @service iliosConfig;

  // canViewCourses: computed('currentUser.performsNonLearnerFunction', async function () {
  //   const currentUser = this.currentUser;
  //   return currentUser.get('performsNonLearnerFunction');
  // });
  //
  // canViewPrograms: computed('currentUser.performsNonLearnerFunction', async function () {
  //   const currentUser = this.currentUser;
  //   return currentUser.get('performsNonLearnerFunction');
  // });

  async findResults(report) {
    const store = this.store;
    const subject = report.subject;
    const object = report.prepositionalObject;
    const objectId = report.prepositionalObjectTableRowId;
    const school = await report.school;
    return store.query(this.getModel(subject), this.getQuery(subject, object, objectId, school));
  }

  async getResults(report, year) {
    const subject = report.subject;
{'fraction_non_alphanumeric': 0.12495801142089352, 'fraction_numerical': 0.0, 'mean_word_length': 4.179130434782609, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4520678', 'n_tokens_mistral': 876, 'n_tokens_neox': 856, 'n_words': 215}