<commit_before><?php

class darwinStatsTask extends sfBaseTask
{
  /* Add your requests in the array $request_array
     - title : is the title of the statistic displayed
     - description : will appear in our help icon 
     - fields : set yours fields here they MUST be the same as the fields name in the query 
     - request : the request which will be executed
     - expandable : set it to true if your request return too much record, the expandable option will add a "+" button in the widget to avoid having a too big widget
     - level : is level on wich a user is allowed to see or not the stat ( 1 : everybody, 2 : encoder and more, 4 : collection manager ans more, 8 : admin only)
  */
  private $request_array = array(
  "req1" => array(    
    "title" => "All types and the record count associated",
    "description" => "",
    "fields" => array("Type","Count"),
    "request" => "SELECT individual_type as Type, count(DISTINCT individual_ref) as Count FROM darwin_flat Group by individual_type Order by individual_type",
    "expandable" => true,
    "level" => 2,
    ),
  "req2" => array(    
    "title" => "All objects in DaRWIN",
    "description" => "An average result of all objects already stored in our database",
    "fields" => array("Total"),    
    "request" => "SELECT sum((specimen_part_count_min+specimen_part_count_max)/2) as total FROM specimen_parts",
    "expandable" => false,
    "level" => 1, 
    ),   
  ) ;
  protected function configure()
  {
    $this->addOptions(array(
      new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name'),
      new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'),
      new sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'doctrine')
      ));<commit_msg>modif a request in flat asked by B in order to earn time<commit_after><?php

class darwinStatsTask extends sfBaseTask
{
  /* Add your requests in the array $request_array
     - title : is the title of the statistic displayed
     - description : will appear in our help icon 
     - fields : set yours fields here they MUST be the same as the fields name in the query 
     - request : the request which will be executed
     - expandable : set it to true if your request return too much record, the expandable option will add a "+" button in the widget to avoid having a too big widget
     - level : is level on wich a user is allowed to see or not the stat ( 1 : everybody, 2 : encoder and more, 4 : collection manager ans more, 8 : admin only)
  */
  private $request_array = array(
  "req1" => array(    
    "title" => "All types and the record count associated",
    "description" => "",
    "fields" => array("Type","Count"),
    "request" => "SELECT Type, count(id) AS Count FROM specimen_individuals GROUP BY Type ORDER BY Type",
    "expandable" => true,
    "level" => 2,
    ),
  "req2" => array(    
    "title" => "All objects in DaRWIN",
    "description" => "An average result of all objects already stored in our database",
    "fields" => array("Total"),    
    "request" => "SELECT sum((specimen_part_count_min+specimen_part_count_max)/2) as total FROM specimen_parts",
    "expandable" => false,
    "level" => 1, 
    ),   
  ) ;
  protected function configure()
  {
    $this->addOptions(array(
      new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name'),
      new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'),
      new sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'doctrine')
      ));
{'fraction_non_alphanumeric': 0.10675965665236052, 'fraction_numerical': 0.004828326180257511, 'mean_word_length': 3.547560975609756, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '5275106', 'n_tokens_mistral': 1049, 'n_tokens_neox': 1036, 'n_words': 417}