<commit_before>import { observable } from 'mobx';
import * as Parse from 'parse';
import { City } from '../api';

class CityStore {

  @observable cities: City[] = [];

  @observable currentChat: City = null;

  constructor() {
    (new Parse.Query(City)).find().then((cities: City[]) => {
      this.cities = cities;
    });
  }

}

export default CityStore;<commit_msg>Filter empty cities<commit_after>import { observable } from 'mobx';
import * as Parse from 'parse';
import { City, Person } from '../api';

class CityStore {

  @observable cities: City[] = [];

  constructor() {
    (new Parse.Query(Person)).find().then((people: Person[]) => {
      return people.map(person => person.get('city'));
    }).then((cities: City[]) => {
      return (new Parse.Query(City))
        .ascending('name')
        .containedIn('objectId', cities.map(city => city.id))
        .find();
    }).then((cities: City[]) => {
      this.cities = cities;
    });
  }

}

export default CityStore;
{'fraction_non_alphanumeric': 0.18680203045685279, 'fraction_numerical': 0.0, 'mean_word_length': 3.2317596566523603, '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': '5257028', 'n_tokens_mistral': 312, 'n_tokens_neox': 302, 'n_words': 75}