Hash representation of a span
177532
def to_h
      {
        runtime_guid: tracer.guid,
        span_guid: context.id,
        trace_guid: context.trace_id,
        span_name: operation_name,
        attributes: tags.map {|key, value|
          {Key: key.to_s, Value: value}
        },
        oldest_micros: start_micros,
        youngest_micros: end_micros,
        error_flag: false,
        dropped_logs: dropped_logs_count,
        log_records: log_records
      }
    end
494617
function hashFromString(s) {
  return Math.abs(
    s.split("").reduce(function(prev, c) {
      var hash = (prev << 5) - prev + c.charCodeAt(0);
      return hash;
    }, 0)
  );
}
211193
def render_hash(hsh)
      str = ""
      indiff_hsh = hsh.with_indifferent_access
      indiff_hsh.keys.sort.each do |key|
        str << "#{key}: "
        value = indiff_hsh[key]
        PP::pp(value, str)
      end
      str
    end
509148
def _get_hashed_params(self, page_text):
        """"""
        soup = BeautifulSoup(page_text, 'html.parser')
        return [tag['name'] for tag in soup.find_all('input', class_='sl')]
519594
def hash_to_range(element)
      hash = SipHash.digest(key, element)
      map_into_range(hash, f)
    end
93391
def to_hash
        h = {}
        keys.each { |k| h[ k ] = self.fetch( k ) }
        h
    end
1190274
def to_hash
      ret = {}
      self.each_pair do |k, v|
        ret[k] = v.to_hash()
      end
      ret
    end
419375
def hash(value):
    ''''''
    if not value:
        return
    elif len(value) == 32:
        type = 'md5'
    elif len(value) == 40:
        type = 'sha1'
    elif len(value) == 64:
        type = 'sha256'
    else:
        return None
    return {'type': type, 'value': value}
690153
def make_hash(str)

      str = str.split('&')
      hash = {}

      str.each do |s|
        opt = s.split('=')
        hash[opt[0]] = URI.unescape(opt[1].to_s.gsub('+', ' '))
      end

      hash

    end
1264438
def hash(self):
        """"""
        content = json.dumps(self.data, sort_keys=True, separators=(",", ":"))
        return hashlib.sha256(content.encode("utf8")).hexdigest()
1170958
def to_hash
      characteristics.inject({}) do |memo, (k, v)|
        memo[k] = v.value
        memo
      end
    end
156470
def hash_contents(contents):
    
    assert isinstance(contents, GroupNode)

    result = hashlib.sha256()

    def _hash_int(value):
        result.update(struct.pack(">L", value))

    def _hash_str(string):
        assert isinstance(string, string_types)
        _hash_int(len(string))
        result.update(string.encode())

    def _hash_object(obj):
        _hash_str(obj.json_type)
        if isinstance(obj, (TableNode, FileNode)):
            hashes = obj.hashes
            _hash_int(len(hashes))
            for hval in hashes:
                _hash_str(hval)
        elif isinstance(obj, GroupNode):
            children = obj.children
            _hash_int(len(children))
            for key, child in sorted(iteritems(children)):
                _hash_str(key)
                _hash_object(child)
        else:
            assert False, "Unexpected object: %r" % obj

        # Backward compatibility: only hash metadata_hash if it's present.
        if obj.metadata_hash is not None:
            _hash_str(obj.metadata_hash)

    _hash_object(contents)

    return result.hexdigest()
56489
def to_input_hash
      HASH_SCHEMA.schema(
        map { |attr| [attr.name, attr.to_write_type] }.to_h
      )
    end
339159
function hash(s) {
    var h = hash.BASE

    for (var i = 0, l = s.length; i < l; i++) {
        h ^= s.charCodeAt(i)
        h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24)
    }

    return h >>> 0
}
1142479
private int bsfHashCode(Node node, int result) {
        result += 31 * node.hashCode();

        if(node instanceof Content) {
            return result;
        }

        Element elem = (Element) node;
        List<Node> childElements = elem.getChildElements();

        for (Node childElement : childElements) {
            result += 31 * childElement.hashCode();
        }

        for (Node child : childElements) {
            if (child instanceof Content) {
                result += 31 * child.hashCode();
            } else {
                result = bsfHashCode(child, result);
            }
        }

        return result;
    }
1310111
def create_span(unirange, is_bytes=False):
    """"""

    if len(unirange) < 2:
        unirange.append(unirange[0])
    if is_bytes:
        if unirange[0] > MAXASCII:
            return None
        if unirange[1] > MAXASCII:
            unirange[1] = MAXASCII
    return [x for x in range(unirange[0], unirange[1] + 1)]
1054915
def xml_to_hash(element, child_with_children = "", unique_children = true)
      properties = {}
      element.each_element_with_text do |e|
        if e.name.eql?(child_with_children)
          if unique_children
            e.each_element_with_text do |t|
              properties[t.name] = to_type(t.text)
            end
          else
            children = []
            e.each_element_with_text do |t|
              properties[t.name] = children.push(to_type(t.text))
            end
          end
        else
          properties[e.name] = to_type(e.text)
        end
      end
      properties
    end