def generate_hash(inp):
    """Generate a sha1 hash to match the raw url to the filename extracted."""
    h = hashlib.sha1()
    h.update(inp)
    return h.hexdigest()
Generate a sha1 hash to match the raw url to the filename extracted.
tensor2tensor/data_generators/cnn_dailymail.py