<commit_before>import { Component, Inject } from '@angular/core';
import { Router } from '@angular/router';
import { DOCUMENT } from '@angular/platform-browser';
import { MdSnackBar, MdSnackBarConfig } from '@angular/material';

import { ErrorSubject } from './core/services';
import { CurrentAccountService } from './accounts/services';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  public title = 'The Nexus';
  public token: string;

  constructor(
    errorSubject: ErrorSubject,
    snackBar: MdSnackBar,
    @Inject(DOCUMENT) private document,
    private currentAccount: CurrentAccountService,
    private router: Router
  ) {
    const snackBarDefaultConfig = new MdSnackBarConfig();
    snackBarDefaultConfig.duration = 1500;

    errorSubject
      .getObservable()
      .subscribe(x => snackBar.open('😿 We are sorry, but an error has occured.', null, snackBarDefaultConfig))
    ;

    currentAccount
      .get()
      .subscribe(token => this.token = token)
    ;
  }

  toggleTheme() {
    this.document.querySelector('body').classList.toggle('dark');
  }

  logOut() {
    this.currentAccount.clear();
    this.router.navigateByUrl('/');
  }
}
<commit_msg>Update title<commit_after>import { Component, Inject } from '@angular/core';
import { Router } from '@angular/router';
import { DOCUMENT } from '@angular/platform-browser';
import { MdSnackBar, MdSnackBarConfig } from '@angular/material';

import { ErrorSubject } from './core/services';
import { CurrentAccountService } from './accounts/services';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  public title = 'The Nexus 2';
  public token: string;

  constructor(
    errorSubject: ErrorSubject,
    snackBar: MdSnackBar,
    @Inject(DOCUMENT) private document,
    private currentAccount: CurrentAccountService,
    private router: Router
  ) {
    const snackBarDefaultConfig = new MdSnackBarConfig();
    snackBarDefaultConfig.duration = 1500;

    errorSubject
      .getObservable()
      .subscribe(x => snackBar.open('😿 We are sorry, but an error has occured.', null, snackBarDefaultConfig))
    ;

    currentAccount
      .get()
      .subscribe(token => this.token = token)
    ;
  }

  toggleTheme() {
    this.document.querySelector('body').classList.toggle('dark');
  }

  logOut() {
    this.currentAccount.clear();
    this.router.navigateByUrl('/');
  }
}

{'fraction_non_alphanumeric': 0.13417026284817576, 'fraction_numerical': 0.003530796390741467, 'mean_word_length': 3.7842401500938085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '785940', 'n_tokens_mistral': 794, 'n_tokens_neox': 758, 'n_words': 176}