Load pickled DAWG from disk.
348493
def load(self, model):
        """"""
        self._dawg.load(find_data(model))
        self._loaded_model = True
92415
def load(cls, filename):
        
        cls.load_counter_offset = StoreOptions.id_offset()
        val = pickle.load(filename)
        cls.load_counter_offset = None
        return val
159141
def load_from_file_object(cls, fd, format=None):
        
        format = 'pickle' if format is None else format
        load = getattr(cls, "load_%s" % format, None)
        if load is None:
            raise ValueError("Unknown format '%s'." % format)
        return load(fd)
104990
def save(self, path):
        """"""
        with io.open(path, 'wb') as fout:
            return pickle.dump(dict(self.weights), fout)
301314
def store_pickle(file_path, data):
    
    pkl_file = open(file_path, 'wb')
    pickle.dump(data, pkl_file)
    pkl_file.close()
875075
def pickle_loads(cls, s):
        """"""
        strio = StringIO()
        strio.write(s)
        strio.seek(0)
        flow = pmg_pickle_load(strio)
        return flow
473029
def _load(self, files_in, files_out, urlpath, meta=True):
        """"""
        import dask
        out = []
        outnames = []
        for file_in, file_out in zip(files_in, files_out):
            cache_path = file_out.path
            outnames.append(cache_path)

            # If `_munge_path` did not find a match we want to avoid
            # writing to the urlpath.
            if cache_path == urlpath:
                continue

            if not os.path.isfile(cache_path):
                logger.debug("Caching file: {}".format(file_in.path))
                logger.debug("Original path: {}".format(urlpath))
                logger.debug("Cached at: {}".format(cache_path))
                if meta:
                    self._log_metadata(urlpath, file_in.path, cache_path)
                ddown = dask.delayed(_download)
                out.append(ddown(file_in, file_out, self.blocksize,
                                 self.output))
        dask.compute(*out)
        return outnames
18254
def load_dale_chall(self):
        """"""
        self.dale_chall_dict = os.path.join(self.base_dir, 'dicts', 'dale_chall.txt')
        with open(self.dale_chall_dict) as words_file:
            data = words_file.read()
        self.dale_chall_words = set(data.splitlines())
1362237
def pickle_load(fname):
    """"""
    assert type(fname) is str and os.path.exists(fname)
    print("loaded",fname)
    return pickle.load(open(fname,"rb"))
923834
def load(name, path=None, ext="dat", silent=False):
    
    filename = __get_filename(path, name, ext)

    if not os.path.exists(filename):
        if not silent:
            raise ValueException("Specified input filename doesn't exist.")
        return None

    with open(filename, "rb") as f:
        return pickle.load(f)
42274
def load_pickle(filename):
    """"""
    try:
        if pd:
            return pd.read_pickle(filename), None
        else:
            with open(filename, 'rb') as fid:
                data = pickle.load(fid)
            return data, None
    except Exception as err:
        return None, str(err)
919525
def load(self, path):
        
        path = os.path.expandvars(os.path.expanduser(path))
        with open(path, "rb") as f:
            roots = pickle.load(f)

        for key, tensor in roots.items():
            self.add(tensor, key=key)
805509
def load_pickle(file_path):
    
    pkl_file = open(file_path, 'rb')
    data = pickle.load(pkl_file)
    pkl_file.close()
    return data
689313
def _parse_file(cls, path, pickle=False):
        """"""

        fname = path
        if fname.endswith(".gz"):
            fname = path[:-3]

        if fname.endswith('.pkl'):
            #you asked for the pickled file. I'll give it to you
            log.debug("loading pickled file %s ..." % fname)
            return cPickle.load( open(fname, "rb") )
        elif os.path.isfile("%s.pkl" % fname):
            #there is a cached version I can give to you
            log.info("loading pickled file %s.pkl ..." % fname)
            if os.stat(path).st_mtime > os.stat("%s.pkl" % fname).st_mtime:
                log.critical("*** pickled file %s.pkl is not up to date ***" % (path))
            return cPickle.load( open("%s.pkl" % fname, "rb") )

        data = fastLoadChain(path, cls._strfactory)
        if pickle and not os.path.isfile('%s.pkl' % fname):
            log.info("pckling to %s.pkl" % (fname))
            with open('%s.pkl' % fname, 'wb') as fd:
                cPickle.dump(data, fd)
        return data
1140065
def load(self):
        
        if self._dict is None:
            if self.dirty:
                self._dict = self._loader(self.filename)
                self.cache()
            else:
                with open(self.cachename, 'rb') as stream:
                    self._dict = cPickle.load(stream)

        return self._dict
292687
def load(self, fp):
        """"""
        cluster = pickle.load(fp)
        cluster.repository = self
        return cluster
647068
def pickle_load(name, extension='.pkl'):
    
    filename = name + extension
    infile = open(filename, 'rb')
    data = pickle.load(infile)
    infile.close()
    return data