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_string(string):
    return urlsafe_b64encode(md5(string).digest()).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)
 
    if merge:
        current_hash = hash_for_string(''.join([v for _, v in new_versions.iteritems()]))
        rel_filename = _join(rel_path, src_type, '%s.%s' % (current_hash, src_type))
        if not path_exists(rel_filename):

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)
 
    if merge:
        current_hash = hash_for_string(''.join([v for _, v in new_versions.iteritems()]))
        rel_filename = _join(rel_path, src_type, '%s.%s' % (current_hash, src_type))
        if not path_exists(rel_filename):