<commit_before><?php
/**
 * @package Graphite
 * @subpackage Graph
 * @author <NAME> <<EMAIL>>
 * @copyright 2011 <NAME> and contributors. All Rights Reserved.
 * @license http://www.opensource.org/licenses/BSD-2-Clause Simplified BSD License
 */

/**
 * Utility for target functions.
 *
 * Functions are used to transform, combine and perform calculations on series
 * data.
 *
 * @package Graphite
 * @subpackage Graph
 * @author <NAME> <<EMAIL>>
 * @copyright 2012 <NAME> and contributors. All Rights Reserved.
 * @license http://www.opensource.org/licenses/BSD-2-Clause Simplified BSD License
 * @link http://readthedocs.org/docs/graphite/en/latest/functions.html
 */
class Graphite_Graph_Functions {

  /**
   * Metric manipulation function sepecifications.
   *
   * Each specification is shorthand for constructing a
   * Graphite_Graph_CallSpec stored as an array. This is a tuple of:
   * (call signature, sort order, alias flag)
   *
   * @var array
   * @see Graphite_Graph_CallSpec::__construct
   */
  static protected $functionSpecs = array(
      'alias'                      => array('"', 99, 1),
      'aliasByNode'                => array('#*', 50, 1),
      'aliasSub'                   => array(array('"', '"'), 50, 1),
      'alpha'                      => array('#', 50, 0),
      'areaBetween'                => array(null, 50, 0),
      'asPercent'                  => array('#?', 50, 0),
      'averageAbove'               => array('#', 50, 0),
      'averageBelow'               => array('#', 50, 0),
      'averageSeries'              => array(null, 50, 0),
      'averageSeriesWithWildcards' => array('#*', 50, 0),
      'cactiStyle'                 => array(null, 100, 0),
      'color'                      => array('"', 98, 0),
      'cumulative'                 => array(null, 50, 0),
      'currentAbove'               => array('#', 50, 0),
      'currentBelow'               => array('#', 50, 0),
      'dashed'                     => array('#?', 50, 0),
      'derivative'                 => array(null, 50, 0),
      'diffSeries'                 => array('-*', 50, 0),
      'divideSeries'               => array('-', 50, 0),
      'drawAsInfinite'             => array(null, 50, 0),
      'events'                     => array('"*', 1, 0),
      'exclude'                    => array('"', 50, 0),
      'group'                      => array('-*', 50, 0),
      'groupByNode'                => array(array('#', '"'), 50, 1),
      'highestAverage'             => array('#', 50, 0),
      'highestCurrent'             => array('#', 50, 0),
      'highestMax'                 => array('#', 50, 0),
      'hitcount'                   => array('"', 50, 0),
      'holtWintersAberration'      => array('#?', 50, 0),
      'holtWintersConfidenceArea'  => array('#?', 50, 0),
      'holtWintersConfidenceBands' => array('#?', 50, 0),
      'holtWintersForecast'        => array(null, 50, 0),
      'integral'                   => array(null, 50, 0),
      'keepLastValue'              => array(null, 50, 0),
      'legendValue'                => array('"', 50, 0),
      'limit'                      => array('#', 50, 0),
      'lineWidth'                  => array('#', 90, 0),
      'logarithm'                  => array('#?', 50, 0),
      'lowestAverage'              => array('#', 50, 0),
      'lowestCurrent'              => array('#', 50, 0),
      'maximumAbove'               => array('#', 50, 0),
      'maximumBelow'               => array('#', 50, 0),
      'maxSeries'                  => array('-*', 50, 0),
      'minimumAbove'               => array('#', 50, 0),
      'minSeries'                  => array('-*', 50, 0),
      'mostDeviant'                => array('#<', 50, 0),
      'movingAverage'              => array('#', 50, 0),
      'movingMedian'               => array('#', 50, 0),
      'multiplySeries'             => array('-*', 50, 0),
      'nonNegativeDerivative'      => array('#?', 50, 0),
      'nPercentile'                => array('#', 50, 0),
      'offset'                     => array('#', 50, 0),
      'percentileOfSeries'         => array(array('#', '-?'), 50, 0),
      'rangeOfSeries'              => array('-*', 50, 0),
      'removeAbovePercentile'      => array('#', 50, 0),
      'removeAboveValue'           => array('#', 50, 0),
      'removeBelowPercentile'      => array('#', 50, 0),
      'removeBelowValue'           => array('#', 50, 0),
      'scale'                      => array('#', 75, 0),
      'scaleToSeconds'             => array('#', 75, 0),
      'secondYAxis'                => array(null, 50, 0),
      'smartSummarize'             => array(array('"', '"?'), 50, 0),
      'sortByMaxima'               => array(null, 50, 0),
      'sortByMinima'               => array(null, 50, 0),
      'stacked'                    => array(null, 50, 0),
      'stdev'                      => array(array('#', '#?'), 50, 0),
      'substr'                     => array(array('#', '#?'), 50, 1),
      'summarize'                  => array(array('"', '"?', '-?'), 50, 0),
      'sumSeries'                  => array('-*', 50, 0),
      'sumSeriesWithWildcards'     => array('#*', 50, 0),
      'timeShift'                  => array('"', 50, 0),
      'transformNull'              => array('#?', 50, 0),
    );

  /**
   * @var array
   */
  static protected $generators = array(
      'constantLine'       => array('#', 1, false),
      'randomWalkFunction' => array('"', 1, false),
      'sinFunction'        => array(array('"', '-?'), 1, false),
      'threshold'          => array(array(1, '"', '"'), 1, true),
      'timeFunction'       => array('"', 1, false),
    );


  /**
   * Function name aliases.
   *
   * @param array
   */
  static protected $functionAliases = array(
      'avg'        => 'averageSeries',
      'cacti'      => 'cactiStyle',
      'centile'    => 'nPercentile',
      'counter'    => 'nonNegativeDerivative',
      'impulse'    => 'drawAsInfinite',
      'line'       => 'drawAsInfinite',
      'max'        => 'maxSeries',<commit_msg>Fixed spec for threshold.<commit_after><?php
/**
 * @package Graphite
 * @subpackage Graph
 * @author <NAME> <<EMAIL>>
 * @copyright 2011 <NAME> and contributors. All Rights Reserved.
 * @license http://www.opensource.org/licenses/BSD-2-Clause Simplified BSD License
 */

/**
 * Utility for target functions.
 *
 * Functions are used to transform, combine and perform calculations on series
 * data.
 *
 * @package Graphite
 * @subpackage Graph
 * @author <NAME> <<EMAIL>>
 * @copyright 2012 <NAME> and contributors. All Rights Reserved.
 * @license http://www.opensource.org/licenses/BSD-2-Clause Simplified BSD License
 * @link http://readthedocs.org/docs/graphite/en/latest/functions.html
 */
class Graphite_Graph_Functions {

  /**
   * Metric manipulation function sepecifications.
   *
   * Each specification is shorthand for constructing a
   * Graphite_Graph_CallSpec stored as an array. This is a tuple of:
   * (call signature, sort order, alias flag)
   *
   * @var array
   * @see Graphite_Graph_CallSpec::__construct
   */
  static protected $functionSpecs = array(
      'alias'                      => array('"', 99, 1),
      'aliasByNode'                => array('#*', 50, 1),
      'aliasSub'                   => array(array('"', '"'), 50, 1),
      'alpha'                      => array('#', 50, 0),
      'areaBetween'                => array(null, 50, 0),
      'asPercent'                  => array('#?', 50, 0),
      'averageAbove'               => array('#', 50, 0),
      'averageBelow'               => array('#', 50, 0),
      'averageSeries'              => array(null, 50, 0),
      'averageSeriesWithWildcards' => array('#*', 50, 0),
      'cactiStyle'                 => array(null, 100, 0),
      'color'                      => array('"', 98, 0),
      'cumulative'                 => array(null, 50, 0),
      'currentAbove'               => array('#', 50, 0),
      'currentBelow'               => array('#', 50, 0),
      'dashed'                     => array('#?', 50, 0),
      'derivative'                 => array(null, 50, 0),
      'diffSeries'                 => array('-*', 50, 0),
      'divideSeries'               => array('-', 50, 0),
      'drawAsInfinite'             => array(null, 50, 0),
      'events'                     => array('"*', 1, 0),
      'exclude'                    => array('"', 50, 0),
      'group'                      => array('-*', 50, 0),
      'groupByNode'                => array(array('#', '"'), 50, 1),
      'highestAverage'             => array('#', 50, 0),
      'highestCurrent'             => array('#', 50, 0),
      'highestMax'                 => array('#', 50, 0),
      'hitcount'                   => array('"', 50, 0),
      'holtWintersAberration'      => array('#?', 50, 0),
      'holtWintersConfidenceArea'  => array('#?', 50, 0),
      'holtWintersConfidenceBands' => array('#?', 50, 0),
      'holtWintersForecast'        => array(null, 50, 0),
      'integral'                   => array(null, 50, 0),
      'keepLastValue'              => array(null, 50, 0),
      'legendValue'                => array('"', 50, 0),
      'limit'                      => array('#', 50, 0),
      'lineWidth'                  => array('#', 90, 0),
      'logarithm'                  => array('#?', 50, 0),
      'lowestAverage'              => array('#', 50, 0),
      'lowestCurrent'              => array('#', 50, 0),
      'maximumAbove'               => array('#', 50, 0),
      'maximumBelow'               => array('#', 50, 0),
      'maxSeries'                  => array('-*', 50, 0),
      'minimumAbove'               => array('#', 50, 0),
      'minSeries'                  => array('-*', 50, 0),
      'mostDeviant'                => array('#<', 50, 0),
      'movingAverage'              => array('#', 50, 0),
      'movingMedian'               => array('#', 50, 0),
      'multiplySeries'             => array('-*', 50, 0),
      'nonNegativeDerivative'      => array('#?', 50, 0),
      'nPercentile'                => array('#', 50, 0),
      'offset'                     => array('#', 50, 0),
      'percentileOfSeries'         => array(array('#', '-?'), 50, 0),
      'rangeOfSeries'              => array('-*', 50, 0),
      'removeAbovePercentile'      => array('#', 50, 0),
      'removeAboveValue'           => array('#', 50, 0),
      'removeBelowPercentile'      => array('#', 50, 0),
      'removeBelowValue'           => array('#', 50, 0),
      'scale'                      => array('#', 75, 0),
      'scaleToSeconds'             => array('#', 75, 0),
      'secondYAxis'                => array(null, 50, 0),
      'smartSummarize'             => array(array('"', '"?'), 50, 0),
      'sortByMaxima'               => array(null, 50, 0),
      'sortByMinima'               => array(null, 50, 0),
      'stacked'                    => array(null, 50, 0),
      'stdev'                      => array(array('#', '#?'), 50, 0),
      'substr'                     => array(array('#', '#?'), 50, 1),
      'summarize'                  => array(array('"', '"?', '-?'), 50, 0),
      'sumSeries'                  => array('-*', 50, 0),
      'sumSeriesWithWildcards'     => array('#*', 50, 0),
      'timeShift'                  => array('"', 50, 0),
      'transformNull'              => array('#?', 50, 0),
    );

  /**
   * @var array
   */
  static protected $generators = array(
      'constantLine'       => array('#', 1, false),
      'randomWalkFunction' => array('"', 1, false),
      'sinFunction'        => array(array('"', '-?'), 1, false),
      'threshold'          => array(array('#', '"?', '"?'), 1, true),
      'timeFunction'       => array('"', 1, false),
    );


  /**
   * Function name aliases.
   *
   * @param array
   */
  static protected $functionAliases = array(
      'avg'        => 'averageSeries',
      'cacti'      => 'cactiStyle',
      'centile'    => 'nPercentile',
      'counter'    => 'nonNegativeDerivative',
      'impulse'    => 'drawAsInfinite',
      'line'       => 'drawAsInfinite',
      'max'        => 'maxSeries',
{'fraction_non_alphanumeric': 0.19320244184128033, 'fraction_numerical': 0.038195017323873946, 'mean_word_length': 1.6360078277886496, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 187, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '1189149', 'n_tokens_mistral': 4163, 'n_tokens_neox': 3540, 'n_words': 868}