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

All Samples(11)  |  Call(10)  |  Derive(0)  |  Import(1)
A context object for caching a function's return value each time it
is called with the same input arguments.

All values are cached on the filesystem, in a deep directory
structure.

see :ref:`memory_reference`

src/p/y/pypreprocess-HEAD/pypreprocess/purepython_preproc_utils.py   pypreprocess(Download)
    )
 
from .external.joblib import Memory
from .io_utils import (get_basenames,
                       save_vols,
    # prepare for smart caching
    if caching:
        mem = Memory(cachedir=os.path.join(
                subject_data.output_dir, 'cache_dir'),
                     verbose=100
    # prepare for smart caching
    if caching:
        mem = Memory(cachedir=os.path.join(
                subject_data.output_dir, 'cache_dir'),
                     verbose=100
    # prepare for smart caching
    if caching:
        mem = Memory(cachedir=os.path.join(
                subject_data.output_dir, 'cache_dir'),
                     verbose=100
    # prepare for smart caching
    if caching:
        mem = Memory(cachedir=os.path.join(
                subject_data.output_dir, 'cache_dir'),
                     verbose=100

src/p/y/pypreprocess-HEAD/pypreprocess/reporting/preproc_reporter.py   pypreprocess(Download)
    if not os.path.exists(qa_cache_dir):
        os.makedirs(qa_cache_dir)
    qa_mem = joblib.Memory(cachedir=qa_cache_dir, verbose=5)
 
    thumb_desc = procedure_name
    if not os.path.exists(qa_cache_dir):
        os.makedirs(qa_cache_dir)
    qa_mem = joblib.Memory(cachedir=qa_cache_dir, verbose=5)
 
    thumb_desc = "Segmentation of %s " % brain
    if not os.path.exists(qa_cache_dir):
        os.makedirs(qa_cache_dir)
    qa_mem = joblib.Memory(cachedir=qa_cache_dir, verbose=5)
 
    if isinstance(image_files, basestring) or is_niimg(image_files):

src/p/y/pypreprocess-HEAD/pypreprocess/io_utils.py   pypreprocess(Download)
    if not os.path.exists(merge_cache_dir):
        os.makedirs(merge_cache_dir)
    merge_mem = joblib.Memory(cachedir=merge_cache_dir, verbose=5)
 
    # merging proper
    if not os.path.exists(cache_dir):
        os.makedirs(cache_dir)
    mem = joblib.Memory(cachedir=cache_dir, verbose=5)
 
    # resample input img to new resolution

src/p/y/pypreprocess-HEAD/pypreprocess/reporting/check_preprocessing.py   pypreprocess(Download)
        if not os.path.exists(cache_dir):
            os.makedirs(cache_dir)
        mem = joblib.Memory(cachedir=cache_dir, verbose=5)
        cv = mem.cache(compute_cv)(data, mask_array=mask_array)