<commit_before><?php

/**
 * Maestrano Service used to access all maestrano config variables
 *
 * These settings need to be filled in by the user prior to being used.
 */
class Maestrano extends Maestrano_Util_PresetObject
{
  // Maestrano PHP API Version
  const VERSION = '0.11.2';

  /* Internal Config Map */
  protected static $config = array();

  /**
   * Check if the pair api_id/api_key is valid
   * for authentication purpose
   * @return whether the pair is valid or not
   */
  public static function authenticateWithPreset($preset,$api_id, $api_key) {
    return !is_null($api_id) && !is_null($api_key) &&
      self::param('api.id',$preset) == $api_id && self::param('api.key',$preset) == $api_key;
  }<commit_msg>fix fetching config with presets during authentication<commit_after><?php

/**
 * Maestrano Service used to access all maestrano config variables
 *
 * These settings need to be filled in by the user prior to being used.
 */
class Maestrano extends Maestrano_Util_PresetObject
{
  // Maestrano PHP API Version
  const VERSION = '0.11.2';

  /* Internal Config Map */
  protected static $config = array();

  /**
   * Check if the pair api_id/api_key is valid
   * for authentication purpose
   * @return whether the pair is valid or not
   */
  public static function authenticateWithPreset($preset,$api_id, $api_key) {
    return !is_null($api_id) && !is_null($api_key) &&
      Maestrano::with($preset)->param('api.id') == $api_id && Maestrano::with($preset)->param('api.key') == $api_key;
  }
{'fraction_non_alphanumeric': 0.1219672131147541, 'fraction_numerical': 0.005245901639344262, 'mean_word_length': 3.9067524115755625, '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': '4303477', 'n_tokens_mistral': 485, 'n_tokens_neox': 479, 'n_words': 150}