Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"os"
"github.com/go-cmd/cmd"
"github.com/theengineeringco/flow/pkg/utils"
)
@ahobsonsayers
ahobsonsayers / hash_utils.py
Last active October 2, 2020 13:08
Python Hash Utils
import hashlib
from dirhash import dirhash
from pathlib import Path
from typing import cast, Union
CHUNKSIZE = 128 * 1024
def hash_file(file_path: Union[Path, str]) -> str:
# From https://stackoverflow.com/a/44873382