<commit_before>import sum = require('lodash.sum');

const PLAYER_NAME = [
  'John',
  'Thomas',
  'William',
  'Richard',
  'Robert',
  'Edward',
  'James',
  'George',
  'Henry',
  'Francis',
  'Nicholas',
  'Samuel',
  'Joseph',
  'Anthony',
  'Matthew',
  'Edmund',
  'Christopher',
  'Andrew',
  'Ralph',
  'Michael',
  'Peter',
  'Philip',
  'Daniel',
  'Roger',
  'Nathaniel',
  'Charles',
  'Walter',
  'Humphrey',
  'Alexander',
  'Benjamin',
  'Hugh',
  'Stephen',
  'Abraham',
  'Bernard',
  'Simon',
  'Miles',
  'Rowland',
  'Arthur',
  'Jonathan',
  'Mark',
  'Allen',
  'Ellis',
  'Martin',
  'Cuthbert',
  'David',
  'Gabriel',
  'Jonas',
  'Lawrence',
  'Elizabeth',
  'Mary',
  'Anne',
  'Margaret',
  'Alice',
  'Jane',
  'Joan',
  'Agnes',
  'Susanna',
  'Dorothy',
  'Catherine',
  'Sarah',
  'Grace',
  'Isabel',
  'Martha',
  'Elinor',
  'Ellen',
  'Frances',
  'Hannah',
  'Bridget',
  'Margery',
  'Rebecca',
  'Joyce',
  'Barbara',
  'Judith',
  'Joanna',
  'Hester',
  'Thomasin',
  'Cecily',
  'Amy',
  'Rachel',
  'Helen',
  'Janet',
  'Christian',
  'Temperance',
  'Abigail',
  'Charity',
  'Deborah',
  'Patience',
  'Esther',
  'Lucy',
  'Ursula',
  'Mabel',
  'Marion',
  'Millicent',
  'Priscilla',
  'Ruth',
  'Faith',
  'Sybil',
  'Winifred'
]

function randomChoose<T>(a: T[]): T {
  return a[Math.floor(Math.random()*a.length)];
}

export class Player {
  public score: number[] = [];

  constructor(public name?: string) {
    if (typeof name === 'undefined') {
      this.name = randomChoose(PLAYER_NAME);
    }
  }

  get totalScore() {
    return sum(this.score);
  }
}
<commit_msg>FEAT: Remove constructor in player model<commit_after>import sum = require('lodash.sum');

const PLAYER_NAME = [
  'John',
  'Thomas',
  'William',
  'Richard',
  'Robert',
  'Edward',
  'James',
  'George',
  'Henry',
  'Francis',
  'Nicholas',
  'Samuel',
  'Joseph',
  'Anthony',
  'Matthew',
  'Edmund',
  'Christopher',
  'Andrew',
  'Ralph',
  'Michael',
  'Peter',
  'Philip',
  'Daniel',
  'Roger',
  'Nathaniel',
  'Charles',
  'Walter',
  'Humphrey',
  'Alexander',
  'Benjamin',
  'Hugh',
  'Stephen',
  'Abraham',
  'Bernard',
  'Simon',
  'Miles',
  'Rowland',
  'Arthur',
  'Jonathan',
  'Mark',
  'Allen',
  'Ellis',
  'Martin',
  'Cuthbert',
  'David',
  'Gabriel',
  'Jonas',
  'Lawrence',
  'Elizabeth',
  'Mary',
  'Anne',
  'Margaret',
  'Alice',
  'Jane',
  'Joan',
  'Agnes',
  'Susanna',
  'Dorothy',
  'Catherine',
  'Sarah',
  'Grace',
  'Isabel',
  'Martha',
  'Elinor',
  'Ellen',
  'Frances',
  'Hannah',
  'Bridget',
  'Margery',
  'Rebecca',
  'Joyce',
  'Barbara',
  'Judith',
  'Joanna',
  'Hester',
  'Thomasin',
  'Cecily',
  'Amy',
  'Rachel',
  'Helen',
  'Janet',
  'Christian',
  'Temperance',
  'Abigail',
  'Charity',
  'Deborah',
  'Patience',
  'Esther',
  'Lucy',
  'Ursula',
  'Mabel',
  'Marion',
  'Millicent',
  'Priscilla',
  'Ruth',
  'Faith',
  'Sybil',
  'Winifred'
]

function randomChoose<T>(a: T[]): T {
  return a[Math.floor(Math.random()*a.length)];
}

export class Player {
  public score: number[] = [];
  public name: string = randomChoose(PLAYER_NAME);

  constructor() {}

  get totalScore() {
    return sum(this.score);
  }
}

{'fraction_non_alphanumeric': 0.22346716464363522, 'fraction_numerical': 0.0, 'mean_word_length': 3.2910547396528704, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '655073', 'n_tokens_mistral': 1539, 'n_tokens_neox': 1412, 'n_words': 257}