Return the response as a hash
484275
def to_hash
      doc = ::Nokogiri::XML( self.response )
      hash = {}
      doc.at_css("Response").element_children.each do |attribute|
        hash[attribute.name.underscore.to_sym] = attribute.inner_text
      end
      hash[:valid] = doc.at_css("Response")['valid']
      hash
    end
1264438
def hash(self):
        """"""
        content = json.dumps(self.data, sort_keys=True, separators=(",", ":"))
        return hashlib.sha256(content.encode("utf8")).hexdigest()
979888
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["asm_id"] = asm_id
            index_hash["org_id"] = org_id
            index_hash["labels"] = labels
            index_hash["tosca_type"] = tosca_type
            index_hash["inputs"] = inputs
            index_hash["outputs"] = outputs
            index_hash["name"] = name
            index_hash["status"] = status
            index_hash["image_id"] = image_id
            index_hash["created_at"] = created_at
            index_hash["some_msg"] = some_msg
            index_hash
        end
691504
def to_output_hash
      HASH_SCHEMA.schema(
        map { |attr| [attr.key, attr.to_read_type] }.to_h
      )
    end
129811
def to_hash
      Hash[instance_variables.map { |name| [name.to_s.delete('@').to_sym, instance_variable_get(name)] }]
    end
387890
def to_hash
      {
        :name    => repository.name,
        :status  => status,
        :sha1    => (current_build && current_build.sha1),
        :compare => (current_build && current_build.compare)
      }
    end
1090081
def hash(self):
        '''
        
        '''
        hashed = super(Dynamic, self).hash()
        return khash(hashed, self._key, self._length)
1129591
def to_hash(obj=nil, methods:[], recursive: false, check: false, compact: false)
			return {} if obj.nil?
			obj||=self
			stack=[*obj]
			processed=[]
			klass=stack.first.class
			h={}
			while !stack.empty?
				obj=stack.shift
				next if processed.include?(obj)
				processed << obj
				attributes={}
				methods.each do |m|
					next if check and !obj.respond_to? m
					v=obj.public_send(m)
					attributes[m]=v
					if recursive
						vals=v.kind_of?(Enumerable) ? v.to_a.flatten : [v]
						vals.select! {|v| v.kind_of?(klass)}
						stack.concat(vals)
					end
				end
				attributes=attributes.values.first if compact and attributes.keys.length == 1
				h[obj]=attributes
			end
			h
		end
1252781
def to_hash
      result = ::Hash.new

      @table.each do |key, value|
        if value.is_a? Settings
          value = value.to_hash
        end

        result[key] = value
      end

      result
    end
707050
def to_hash
      @data.inject({}) do |ac,(k,v)|
        ac.merge! k => ((v.kind_of? self.class) ? v.to_hash : v)
      end
    end
1190274
def to_hash
      ret = {}
      self.each_pair do |k, v|
        ret[k] = v.to_hash()
      end
      ret
    end
215944
def to_hash(obj)
      return nil unless obj
      return obj if obj.is_a?(Hash)

      hash = {}
      obj.instance_variables.each do |key|
        hash[key[1..-1].to_sym] = deeply_to_hash(obj.instance_variable_get(key))
      end
      hash
    end
655054
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["asm_id"] = asm_id
            index_hash["org_id"] = org_id
            index_hash["disk_id"] = disk_id
            index_hash["size"] = size
            index_hash["status"] = status
            index_hash["created_at"] = created_at
            index_hash["some_msg"] = some_msg
            index_hash
        end
989469
def hashret(self):
        """"""
        if 'PositiveResponse' in self.services[self.service]:
            return struct.pack('B', self.service - 0x40)
        elif self.service == 0x7f:
            return struct.pack('B', self.requestServiceId)
        else:
            return struct.pack('B', self.service)
127684
def to_hash
      result = {}

      @values.each_key do |field_name|
        field = _protobuf_message_field[field_name]
        field.to_message_hash(@values, result)
      end

      result
    end
310667
def convert_to_hash(object)
      if !object.respond_to?(:to_hash)
        return nil
      end

      if object.method(:to_hash).arity != 0
        return nil
      end

      hash = object.to_hash
      if !hash.respond_to?(:keys) || !hash.respond_to?('[]')
        return nil
      end

      return 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())