<commit_before>import { Injectable } from '@angular/core';

import 'rxjs/Rx';
import { Observable } from 'rxjs/Observable';
import { of } from 'rxjs/observable/of';
import { Http } from '@angular/http';
import { OnInit } from '@angular/core/src/metadata/lifecycle_hooks';
import { setInterval } from 'timers';

@Injectable()
export class TmService implements OnInit {

  serverName: string;
  track: string;
  times: any;

  constructor(private http: Http) {
    Observable.interval(2000)
    .switchMap(() => http.get('http://192.168.1.104:8000/GetServerName')).map((data) => data.json())
    .subscribe((data) => {
      this.serverName = data;
    });

    Observable.interval(2000)
    .switchMap(() => http.get('http://192.168.1.104:8000/GetCurrentRanking')).map((data) => data.json())
    .subscribe((data) => {
      this.times = data;
      console.log(data);
    });

    Observable.interval(2000)
    .switchMap(() => http.get('http://192.168.1.104:8000/GetCurrentChallengeInfo')).map((data) => data.json())
    .subscribe((data) => {
      this.track = data["Name"];
      console.log(this.track);
    });
  }

  ngOnInit(): void {

  }
<commit_msg>changed ip to localhost for use on zimon<commit_after>import { Injectable } from '@angular/core';

import 'rxjs/Rx';
import { Observable } from 'rxjs/Observable';
import { of } from 'rxjs/observable/of';
import { Http } from '@angular/http';
import { OnInit } from '@angular/core/src/metadata/lifecycle_hooks';
import { setInterval } from 'timers';

@Injectable()
export class TmService implements OnInit {

  serverName: string;
  track: string;
  times: any;

  constructor(private http: Http) {
    Observable.interval(2000)
    .switchMap(() => http.get('http://localhost:8000/GetServerName')).map((data) => data.json())
    .subscribe((data) => {
      this.serverName = data;
    });

    Observable.interval(2000)
    .switchMap(() => http.get('http://localhost:8000/GetCurrentRanking')).map((data) => data.json())
    .subscribe((data) => {
      this.times = data;
      console.log(data);
    });

    Observable.interval(2000)
    .switchMap(() => http.get('http://localhost:8000/GetCurrentChallengeInfo')).map((data) => data.json())
    .subscribe((data) => {
      this.track = data["Name"];
      console.log(this.track);
    });
  }

  ngOnInit(): void {

  }

{'fraction_non_alphanumeric': 0.18458244111349037, 'fraction_numerical': 0.03340471092077088, 'mean_word_length': 3.625742574257426, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, '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': '4480812', 'n_tokens_mistral': 813, 'n_tokens_neox': 758, 'n_words': 139}