<commit_before>import {Component,EventEmitter, For, If, View, bootstrap} from 'angular2/angular2';

@Component({
  selector: 'city-selector',
  events: ['andres']
})
@View({
  template: `
    <div class="city-selector">
      Choose a city: {{currentCity}}
      <select name="city" id="city" class="form-control"
          (change)="cityChanged($event)">
        <option *for="var city of cities"
            [selected]="city == currentCity">{{city}}</option>
      </select>
    </div>
  `,
  directives: [For]
})
class CitySelector {
  cities: string[];
  currentCity: string;
  andres: any;

  constructor() {
    this.cities = [
      'Berlin',
      'Buenos Aires',
      'Cairo',
      'New York',
      'Sydney',
      'Tokyo'
    ];
    this.currentCity = 'New York';
    this.andres = new EventEmitter();
  }

  cityChanged(event) {
    this.currentCity = event.target.value;
    this.andres.next();
  }
}

@Component({
  selector: 'weather-card',
  properties: {
    hourly: 'hourly'
  }
})
@View({
  templateUrl: 'weather-card.html'
})
class WeatherCard {
  hourly: any;

  constructor() {
    this.hourly = {};
  }

  celsius() {
    //debugger;
    return this.hourly.main.celsius;
  }

  time() {
    return this.hourly.dateTime.dt
  }
}

class DateAndTime {
  localDate: string;
  localTime: string;
  dt: string;

  constructor(utcDate: string) {
    var date = new Date(utcDate + ' UTC');
    this.localDate = date.toLocaleDateString();
    this.localTime = date.toLocaleTimeString();
    this.dt = this.localDate + ' ' + this.localTime;
  }
}

@Component({
  selector: 'weather-app'
})
@View({
  template: `
    <div>
      <div> {{cityName}}  </div>
      <city-selector (andres)="cityChanged()"></city-selector><commit_msg>Rename andres -> cityselected<commit_after>import {Component,EventEmitter, For, If, View, bootstrap} from 'angular2/angular2';

@Component({
  selector: 'city-selector',
  events: ['cityselected']
})
@View({
  template: `
    <div class="city-selector">
      Choose a city: {{currentCity}}
      <select name="city" id="city" class="form-control"
          (change)="cityChanged($event)">
        <option *for="var city of cities"
            [selected]="city == currentCity">{{city}}</option>
      </select>
    </div>
  `,
  directives: [For]
})
class CitySelector {
  cities: string[];
  currentCity: string;
  cityselected: any;

  constructor() {
    this.cities = [
      'Berlin',
      'Buenos Aires',
      'Cairo',
      'New York',
      'Sydney',
      'Tokyo'
    ];
    this.currentCity = 'New York';
    this.cityselected = new EventEmitter();
  }

  cityChanged(event) {
    this.currentCity = event.target.value;
    this.cityselected.next();
  }
}

@Component({
  selector: 'weather-card',
  properties: {
    hourly: 'hourly'
  }
})
@View({
  templateUrl: 'weather-card.html'
})
class WeatherCard {
  hourly: any;

  constructor() {
    this.hourly = {};
  }

  celsius() {
    //debugger;
    return this.hourly.main.celsius;
  }

  time() {
    return this.hourly.dateTime.dt
  }
}

class DateAndTime {
  localDate: string;
  localTime: string;
  dt: string;

  constructor(utcDate: string) {
    var date = new Date(utcDate + ' UTC');
    this.localDate = date.toLocaleDateString();
    this.localTime = date.toLocaleTimeString();
    this.dt = this.localDate + ' ' + this.localTime;
  }
}

@Component({
  selector: 'weather-app'
})
@View({
  template: `
    <div>
      <div> {{cityName}}  </div>
      <city-selector (cityselected)="cityChanged()"></city-selector>
{'fraction_non_alphanumeric': 0.16751556310130164, 'fraction_numerical': 0.0011318619128466328, 'mean_word_length': 2.958566629339306, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 26, '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': '1800486', 'n_tokens_mistral': 1238, 'n_tokens_neox': 1211, 'n_words': 241}