MCPcopy
hub / github.com/Turing-Project/WriteGPT / hashhex

Function hashhex

LanguageNetwork/BERT/utils/prepropress/data_builder.py:149–153  ·  view source on GitHub ↗

Returns a heximal formated SHA1 hash of the input string.

(s)

Source from the content-addressed store, hash-verified

147
148
149def hashhex(s):
150 """Returns a heximal formated SHA1 hash of the input string."""
151 h = hashlib.sha1()
152 h.update(s.encode('utf-8'))
153 return h.hexdigest()
154
155
156class BertData:

Callers

nothing calls this directly

Calls 2

updateMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected