Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

        def hash_for_file(file_name):
    return urlsafe_b64encode(hash_file_md5(file_name)).strip('=')
        


src/t/u/turbulenz_local-1.1.4/turbulenz_local/lib/compact.py   turbulenz_local(Download)
def compact(dev_path, rel_path, versions_yaml, src_type, compactor_fn, merge=False):
    from yaml import dump as yaml_dump
    from turbulenz_tools.utils.hash import hash_for_file, hash_for_string
 
    rel_path = _posixpath(rel_path)
        for dev_filename in iglob(_join(path, '*.%s' % src_type)):
            dev_filename = _posixpath(dev_filename)
            current_hash = hash_for_file(dev_filename)
            # Build a suitable output filename - hash.ext
            rel_filename = _join(rel_path, src_type, '%s.%s' % (current_hash, src_type))

src/t/u/turbulenz_local-HEAD/turbulenz_local/lib/compact.py   turbulenz_local(Download)
def compact(dev_path, rel_path, versions_yaml, src_type, compactor_fn, merge=False):
    from yaml import dump as yaml_dump
    from turbulenz_tools.utils.hash import hash_for_file, hash_for_string
 
    rel_path = _posixpath(rel_path)
        for dev_filename in iglob(_join(path, '*.%s' % src_type)):
            dev_filename = _posixpath(dev_filename)
            current_hash = hash_for_file(dev_filename)
            # Build a suitable output filename - hash.ext
            rel_filename = _join(rel_path, src_type, '%s.%s' % (current_hash, src_type))