Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/numpy/numpy
/ sha256_of_file
Function
sha256_of_file
tools/cythonize.py:125–129 ·
view source on GitHub ↗
(filename)
Source
from the content-addressed store, hash-verified
123
f.write(
"%s %s %s\n"
% (key, value[0], value[1]))
124
125
def
sha256_of_file(filename):
126
h = hashlib.sha256()
127
with
open(filename,
"rb"
)
as
f:
128
h.update(f.read())
129
return
h.hexdigest()
130
131
#
132
# Main program
Callers
1
get_hash
Function · 0.85
Calls
3
open
Function · 0.85
update
Method · 0.80
read
Method · 0.45
Tested by
no test coverage detected