<commit_before><?php

class plotComponents extends sfComponents
{
  public function executeParlementaire() {
  }
 
  public function executeGetParlData() {
    static $seuil_invective = 20;
    $this->data = array();
    if (!isset($this->session)) $this->session = 'lastyear';
    if ($this->session === 'lastyear') {
      if (isset($this->parlementaire->fin_mandat) && $this->parlementaire->fin_mandat > $this->parlementaire->debut_mandat) {
        $date = strtotime($this->parlementaire->fin_mandat);
        $this->data['mandat_clos'] = true;
      } else $date = time();
      $annee = date('Y', $date); $sem = date('W', $date);
      $last_year = $date - 32054400*5;
      $date_debut = date('Y-m-d', $last_year);
      $annee0 = date('Y', $last_year); $sem0 = date('W', $last_year);
      if ($sem >= 52 && date('n', $date) == 1) $sem = 0;
      if ($sem0 >= 52 && $sem <= 1) $sem0 = 0;
      $n_weeks = ($annee - $annee0)*53 + $sem - $sem0;
#print "$date ; $annee ; $sem ; $last_year ; $annee0 ; $sem0 ; $date_debut ; $n_weeks";
    } else {<commit_msg>Oups retour vers des plots plus lisibles<commit_after><?php

class plotComponents extends sfComponents
{
  public function executeParlementaire() {
  }
 
  public function executeGetParlData() {
    static $seuil_invective = 20;
    $this->data = array();
    if (!isset($this->session)) $this->session = 'lastyear';
    if ($this->session === 'lastyear') {
      if (isset($this->parlementaire->fin_mandat) && $this->parlementaire->fin_mandat > $this->parlementaire->debut_mandat) {
        $date = strtotime($this->parlementaire->fin_mandat);
        $this->data['mandat_clos'] = true;
      } else $date = time();
      $annee = date('Y', $date); $sem = date('W', $date);
      $last_year = $date - 32054400;
      $date_debut = date('Y-m-d', $last_year);
      $annee0 = date('Y', $last_year); $sem0 = date('W', $last_year);
      if ($sem >= 52 && date('n', $date) == 1) $sem = 0;
      if ($sem0 >= 52 && $sem <= 1) $sem0 = 0;
      $n_weeks = ($annee - $annee0)*53 + $sem - $sem0;
#print "$date ; $annee ; $sem ; $last_year ; $annee0 ; $sem0 ; $date_debut ; $n_weeks";
    } else {
{'fraction_non_alphanumeric': 0.199442119944212, 'fraction_numerical': 0.026499302649930265, 'mean_word_length': 3.3828920570264764, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 35, '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': '1787403', 'n_tokens_mistral': 825, 'n_tokens_neox': 783, 'n_words': 170}