<commit_before>import { Component, OnInit } from '@angular/core';
import { CardsService } from './cards.service';
import { InfosService } from './infos.service';
import { Card } from './card';
import { Infos } from './infos';
import { StatsComponent} from './stats/stats.component';
import {CardFinderComponent} from './card-finder/card-finder.component'




@Component({
  moduleId: module.id,
  selector: 'hs-stats-app',
  templateUrl: 'hs-stats.component.html',
  styleUrls: ['hs-stats.component.css'],
  directives: [StatsComponent,CardFinderComponent],
  providers: [
    CardsService,InfosService
  ]
})
export class HSStatsAppComponent  implements OnInit{
  title = 'hs-stats works!';
  allCards = []
  sets : Object[] = [];
  infos : Infos;
  error: any;

  public query = '';
  public countries = [];
    public filteredList = [];
    public elementRef;

  constructor( private cardsService: CardsService,  private infosService: InfosService) {}

  getCardsBySet(set) {
    this.cardsService
        .getCardsBySet(set)
        .then(response => this.test2(response, set) );
  }
  test2(response, set){
    this.sets = [...this.sets, {"name" : set, "cards" :response}];

    response.forEach(function(element){
      this.countries.push(element.name);
      this.allCards = [...this.allCards, element];
    }.bind(this));
  }
  getInfos(){
    this.infosService
        .getInfos()
        .then(res => this.test(res));
  }

  test(res){
    this.infos = res;
    this.infos.sets.forEach(function(element, index, array) {
      if(element !== "Slush" && element !== "Promo"){
          this.getCardsBySet(element);
      }

    }.bind(this));
  }

  ngOnInit() {
    this.getInfos();
  }
  filter() {
      if (this.query !== ""){
          this.filteredList = this.countries.filter(function(el){
              return el.toLowerCase().indexOf(this.query.toLowerCase()) > -1;
          }.bind(this));
      }else{
          this.filteredList = [];
      }
  }

  select(item){
      this.query = item;
      this.filteredList = [];
  }

  handleClick(event){
   var clickedComponent = event.target;
   var inside = false;
   do {
       if (clickedComponent === this.elementRef.nativeElement) {
           inside = true;
       }
      clickedComponent = clickedComponent.parentNode;
   } while (clickedComponent);
    if(!inside){
        this.filteredList = [];
    }
  }

}
<commit_msg>Removing non playable card<commit_after>import { Component, OnInit } from '@angular/core';
import { CardsService } from './cards.service';
import { InfosService } from './infos.service';
import { Card } from './card';
import { Infos } from './infos';
import { StatsComponent} from './stats/stats.component';
import {CardFinderComponent} from './card-finder/card-finder.component'




@Component({
  moduleId: module.id,
  selector: 'hs-stats-app',
  templateUrl: 'hs-stats.component.html',
  styleUrls: ['hs-stats.component.css'],
  directives: [StatsComponent,CardFinderComponent],
  providers: [
    CardsService,InfosService
  ]
})
export class HSStatsAppComponent  implements OnInit{
  title = 'hs-stats works!';
  allCards = []
  sets : Object[] = [];
  infos : Infos;
  error: any;

  public query = '';
  public countries = [];
    public filteredList = [];
    public elementRef;

  constructor( private cardsService: CardsService,  private infosService: InfosService) {}

  getCardsBySet(set) {
    this.cardsService
        .getCardsBySet(set)
        .then(response => this.test2(response, set) );
  }
  test2(response, set){
    this.sets = [...this.sets, {"name" : set, "cards" :response}];

    response.forEach(function(element){
      this.countries.push(element.name);
      this.allCards = [...this.allCards, element];
    }.bind(this));
  }
  getInfos(){
    this.infosService
        .getInfos()
        .then(res => this.test(res));
  }

  test(res){
    this.infos = res;
    this.infos.sets.forEach(function(element, index, array) {
      if(element !== "Slush" && element !== "Promo" && element !== "Missions" && element !== "Credits" && element !== "System" && element !== "Hero Skins" && element !== "Tavern Brawl"){
          this.getCardsBySet(element);
      }

    }.bind(this));
  }

  ngOnInit() {
    this.getInfos();
  }
  filter() {
      if (this.query !== ""){
          this.filteredList = this.countries.filter(function(el){
              return el.toLowerCase().indexOf(this.query.toLowerCase()) > -1;
          }.bind(this));
      }else{
          this.filteredList = [];
      }
  }

  select(item){
      this.query = item;
      this.filteredList = [];
  }

  handleClick(event){
   var clickedComponent = event.target;
   var inside = false;
   do {
       if (clickedComponent === this.elementRef.nativeElement) {
           inside = true;
       }
      clickedComponent = clickedComponent.parentNode;
   } while (clickedComponent);
    if(!inside){
        this.filteredList = [];
    }
  }

}

{'fraction_non_alphanumeric': 0.15890688259109312, 'fraction_numerical': 0.0012145748987854252, 'mean_word_length': 2.884433962264151, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3719234', 'n_tokens_mistral': 1586, 'n_tokens_neox': 1561, 'n_words': 305}