Returns a serializable hash with all the details of the error.
192585
def deflate(err, fei, fexp=nil)

      return err unless err.respond_to?(:backtrace)

      fexp ||=
        Ruote::Exp::FlowExpression.dummy('fei' => fei, 'original_tree' => nil)

      fexp.deflate(err)
    end
119259
def to_hash arr
      return {}   if arr.nil?
      return arr  if arr.kind_of?(Hash)
      arr = [ arr.to_sym ]  unless arr.kind_of?(Array)
      ret = {}
      arr.each { |key| ret[key.to_sym] = {} }
      ret
    end
848046
def to_h(with_errors: false, with_value: true)
      hash = {
        name: name,
        label: label,
        type: type,
        description: description,
        default: default,
        from: from.reject { |k,_| k == :default},
        to: to
      }.merge(type_options).reject { |_,v| v.nil? }
      hash[:skip_if] = skip_if if skip_if
      hash[:only_if] = only_if if only_if
      hash[:errors]  = errors  if with_errors
      if with_value
        if type == 'group'
          hash[:value]   = value.to_h(with_values: true, with_errors: with_errors)
        else
          hash[:value] = value
        end
      end
      hash
    end
211990
def error_info(hash)      
      if hash && (e = hash["Error"]) && (e["ErrorNumber"] || e["ErrorMessage"])
        return OpenStruct.new(:number => e["ErrorNumber"], :message => e["ErrorMessage"])
      end

      # Or wait! Some API's have a totally different way of reporting errors, great!
      if hash && (e = hash["Authentication"]) && e["Problem"] 
        return OpenStruct.new(:number => e["Problem"]["Code"], :message => e["Problem"]["Message"])
      end

      # And one more for Auth errors! With no error number, hooray. 
      if hash && (e = hash["AuthorizationState"]) && e["State"] == "failed"
        return OpenStruct.new(:number => nil, :message => "AuthorizationState: State: failed")
      end

      # And yet another way!
      if hash && (e = hash["Problem"])
        # Code/Message appear unpredictably at different keys? 
        return OpenStruct.new(:number => e["ErrorCode"] || e["Code"], :message => e["ErrorMessage"] || e["Message"])
      end

      return nil    
    end
221335
def to_hash
            index_hash = Hash.new
            index_hash["json_claz"] = self.class.name
            index_hash["id"] = id
            index_hash["account_id"] = account_id
            index_hash["model"] = model
            index_hash["license"] = license
            index_hash["trial_ends"] = trial_ends
            index_hash["created_at"] = created_at
            index_hash
        end
1263910
def hash(self):
        """"""
        data_str = ';'.join(
            [str(repr(var)) for var in
             [self.N, self.K, self.X, self.L,
              self.stat, self.cutoff, self.pval,
              self.pval_thresh, self.escore_pval_thresh]])
        data_str += ';'
        data = data_str.encode('UTF-8') + self.indices.tobytes()
        return str(hashlib.md5(data).hexdigest())
1166627
def create_hash(response)
      begin
        JSON.parse response
      rescue JSON::ParserError
        response
      rescue StandardError
        response
      end
    end
615603
def dump_error(error)
			error_message = [
				"#{Time.now.strftime('%Y-%m-%d %H:%M:%S')} - " \
				"#{error.class} - #{error.message}:",
				*error.backtrace
			].join("\n\t")
			@env[Rack::RACK_ERRORS].puts(error_message)
		end
428685
def to_hash
      ret = {}
      @hash.dup.each_pair do |key, val|
        ret[key] = self.convert_value_from_ostruct(val)
      end
      ret
    end
458734
def _hash(self):
        
        dump = dumps(self.query, sort_keys=True)
        if isinstance(dump, str):
            dump = dump.encode('utf-8')
        return md5(dump).hexdigest()
470987
def to_hash
            index_hash = {}
            index_hash['json_claz'] = self.class.name
            index_hash['id'] = id

            index_hash['sensor_type'] = sensor_type
            index_hash['payload'] = payload
            index_hash['created_at'] = created_at
            index_hash
        end
1326278
def info_hash(self):
        """"""
        info = self._struct.get('info')

        if not info:
            return None

        return sha1(Bencode.encode(info)).hexdigest()
1084416
def json_error(code, message):
    """"""
    # Message can be an unserializable object.
    message = repr(message)
    return jsonify(dict(request=request.path, message=message)), code
1090081
def hash(self):
        '''
        
        '''
        hashed = super(Dynamic, self).hash()
        return khash(hashed, self._key, self._length)
968602
def to_hash
      result = { }

      # id
      result['_id'] = @_id if @_id

      # timestamp
      result['at'] = @at

      # kind
      result['kind'] = kind.to_s

      # entities
      @entities.each do |entity_name, entity|
        result[entity_name.to_s] = entity.model_id
      end

      # meta
      result['meta'] = @meta.stringify_keys unless @meta.blank?

      result
    end
691504
def to_output_hash
      HASH_SCHEMA.schema(
        map { |attr| [attr.key, attr.to_read_type] }.to_h
      )
    end
15776
def hash(self):
        
        hash_request = etcdrpc.HashRequest()
        return self.maintenancestub.Hash(hash_request).hash