<commit_before>//
//   Copyright 2016  <NAME>
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.
//

package io.warp10.script;

import io.warp10.continuum.geo.GeoDirectoryClient;
import io.warp10.continuum.store.DirectoryClient;
import io.warp10.continuum.store.GTSStore;
import io.warp10.continuum.store.StoreClient;
import io.warp10.warp.sdk.WarpScriptJavaFunction;

import java.util.ArrayList;
import java.util.Collection;
import java.util.EmptyStackException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;

/**
 * The Einstein Geo Time Serie manipulation environment
 * usually uses a stack to operate.
 * 
 * There may be multiple implementations of stacks that
 * Einstein can use, including some that persist to a
 * cache or that may spill to disk.
 * 
 * All those implementations MUST implement this interface.
 *
 */
public interface WarpScriptStack {
  
  public static final int DEFAULT_MAX_RECURSION_LEVEL = 16;
  public static final long DEFAULT_FETCH_LIMIT = 100000L;
  public static final long DEFAULT_GTS_LIMIT = 100000L;
  public static final long DEFAULT_MAX_OPS = 1000L;
  public static final int DEFAULT_MAX_BUCKETS = 1000000;
  public static final int DEFAULT_MAX_DEPTH = 1000;
  public static final long DEFAULT_MAX_LOOP_DURATION = 5000L;
  public static final int DEFAULT_MAX_SYMBOLS = 64;
  public static final int DEFAULT_MAX_WEBCALLS = 4;
  public static final long DEFAULT_MAX_PIXELS = 1000000L;
  public static final long DEFAULT_URLFETCH_LIMIT = 64;
  public static final long DEFAULT_URLFETCH_MAXSIZE = 1000000L;
  
  public static final String MACRO_START = "<%";
  public static final String MACRO_END = "%>";

  public static final String COMMENT_START = "/*";
  public static final String COMMENT_END = "*/";
  
  public static final String MULTILINE_START = "<'";
  public static final String MULTILINE_END = "'>";
  
  public static final String SECURE_SCRIPT_START = "<S";
  public static final String SECURE_SCRIPT_END = "S>";
  
  /**
   * Flag indicating whether or not the stack is currently in documentation mode
   */
  public static final String ATTRIBUTE_DOCMODE = "docmode";
  
  /**
   * Debug depth of the stack. This is the number
   * of elements to return when an error occurs.
   */
  public static final String ATTRIBUTE_DEBUG_DEPTH = "debug.depth";
  
  /**<commit_msg>Added SIGMODE<commit_after>//
//   Copyright 2016  <NAME>
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.
//

package io.warp10.script;

import io.warp10.continuum.geo.GeoDirectoryClient;
import io.warp10.continuum.store.DirectoryClient;
import io.warp10.continuum.store.GTSStore;
import io.warp10.continuum.store.StoreClient;
import io.warp10.warp.sdk.WarpScriptJavaFunction;

import java.util.ArrayList;
import java.util.Collection;
import java.util.EmptyStackException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;

/**
 * The Einstein Geo Time Serie manipulation environment
 * usually uses a stack to operate.
 * 
 * There may be multiple implementations of stacks that
 * Einstein can use, including some that persist to a
 * cache or that may spill to disk.
 * 
 * All those implementations MUST implement this interface.
 *
 */
public interface WarpScriptStack {
  
  public static final int DEFAULT_MAX_RECURSION_LEVEL = 16;
  public static final long DEFAULT_FETCH_LIMIT = 100000L;
  public static final long DEFAULT_GTS_LIMIT = 100000L;
  public static final long DEFAULT_MAX_OPS = 1000L;
  public static final int DEFAULT_MAX_BUCKETS = 1000000;
  public static final int DEFAULT_MAX_DEPTH = 1000;
  public static final long DEFAULT_MAX_LOOP_DURATION = 5000L;
  public static final int DEFAULT_MAX_SYMBOLS = 64;
  public static final int DEFAULT_MAX_WEBCALLS = 4;
  public static final long DEFAULT_MAX_PIXELS = 1000000L;
  public static final long DEFAULT_URLFETCH_LIMIT = 64;
  public static final long DEFAULT_URLFETCH_MAXSIZE = 1000000L;
  
  public static final String MACRO_START = "<%";
  public static final String MACRO_END = "%>";

  public static final String COMMENT_START = "/*";
  public static final String COMMENT_END = "*/";
  
  public static final String MULTILINE_START = "<'";
  public static final String MULTILINE_END = "'>";
  
  public static final String SECURE_SCRIPT_START = "<S";
  public static final String SECURE_SCRIPT_END = "S>";
  
  /**
   * Flag indicating whether or not the stack is currently in documentation mode
   */
  public static final String ATTRIBUTE_DOCMODE = "docmode";
  
  /**
   * Flag indicating whether or not the stack is currently in signature mode
   */
  public static final String ATTRIBUTE_SIGMODE = "sigmode";
  
  /**
   * Debug depth of the stack. This is the number
   * of elements to return when an error occurs.
   */
  public static final String ATTRIBUTE_DEBUG_DEPTH = "debug.depth";
  
  /**
{'fraction_non_alphanumeric': 0.07676767676767676, 'fraction_numerical': 0.024242424242424242, 'mean_word_length': 3.8897119341563786, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4330586', 'n_tokens_mistral': 1852, 'n_tokens_neox': 1703, 'n_words': 635}