<commit_before>module Hermes
  module Plugin
    ##
    # Evaluates code using <http://eval.in/>.
    #
    class Eval
      include Cinch::Plugin

      set :help => 'eval [LANGUAGE] [CODE] - Evaluates the given code ' \
        'using http://eval.in',
        :plugin_name => 'eval'

      ##
      # The URL of the "API".
      #
      # @return [String]
      #
      URL = 'http://eval.in/'

      ##
      # Shortcuts for common languages.
      #
      # @return [Hash]
      #
      LANGUAGES = {
        'ruby'    => 'ruby/mri-2.0.0',
        'ruby19'  => 'ruby/mri-1.9.3',
        'ruby18'  => 'ruby/mri-1.8.7',
        'python'  => 'python/cpython-3.2.3',
        'python2' => 'python/cpython-2.7.3'
      }

      match(/eval\s+(\S+)\s+(.+)/)

      ##
      # Submits the code and displays the output + URL in the IRC channel.
      #
      # @param [Cinch::Message] message
      # @param [String] language
      # @param [String] code
      #
      def execute(message, language, code)
        if LANGUAGES.key?(language)
          language = LANGUAGES[language]
        else
          message.reply(<commit_msg>Use the SSL hostname for eval.in<commit_after>module Hermes
  module Plugin
    ##
    # Evaluates code using <http://eval.in/>.
    #
    class Eval
      include Cinch::Plugin

      set :help => 'eval [LANGUAGE] [CODE] - Evaluates the given code ' \
        'using http://eval.in',
        :plugin_name => 'eval'

      ##
      # The URL of the "API".
      #
      # @return [String]
      #
      URL = 'https://eval.in/'

      ##
      # Shortcuts for common languages.
      #
      # @return [Hash]
      #
      LANGUAGES = {
        'ruby'    => 'ruby/mri-2.0.0',
        'ruby19'  => 'ruby/mri-1.9.3',
        'ruby18'  => 'ruby/mri-1.8.7',
        'python'  => 'python/cpython-3.2.3',
        'python2' => 'python/cpython-2.7.3'
      }

      match(/eval\s+(\S+)\s+(.+)/)

      ##
      # Submits the code and displays the output + URL in the IRC channel.
      #
      # @param [Cinch::Message] message
      # @param [String] language
      # @param [String] code
      #
      def execute(message, language, code)
        if LANGUAGES.key?(language)
          language = LANGUAGES[language]
        else
          message.reply(
{'fraction_non_alphanumeric': 0.15611257695690414, 'fraction_numerical': 0.01759014951627089, 'mean_word_length': 1.6361529548088065, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 1, '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': '1846817', 'n_tokens_mistral': 815, 'n_tokens_neox': 765, 'n_words': 170}