Reload model from given dict or database.
199841
def reload(self, d=None):
        """"""
        if d:
            self.clear()
            self.update(d)
        elif self.id:
            new_dict = self.by_id(self._id)
            self.clear()
            self.update(new_dict)
        else:
            # should I raise an exception here?
            # Like "Model must be saved first."
            pass
704511
def reload(core = false, loaded = [], &code)
    Manager.connection.reload(core, loaded, &code)
  end
541717
def load_for(self, model: str) -> Tuple[list, list]:
        """"""
        inject_params(model)
        if self.prev_cache != pr.vectorization_md5_hash():
            self.prev_cache = pr.vectorization_md5_hash()
            self.data = self.loader()
        return self.data
1316237
def _load_dict_hierarchical(self, db_key: str) -> dict:
        """"""
        db_keys = self._db.keys(pattern=db_key + '*')
        my_dict = {}
        for _db_key in db_keys:
            if self._db.type(_db_key) == 'list':
                db_values = self._db.lrange(_db_key, 0, -1)
                for i, value in enumerate(db_values):
                    try:
                        db_values[i] = ast.literal_eval(value)
                    except SyntaxError:
                        pass
                    except ValueError:
                        pass
            else:  # self._db.type == 'hash'
                db_values = self._db.hgetall(_db_key)
                for _key, _value in db_values.items():
                    try:
                        db_values[_key] = ast.literal_eval(_value)
                    except SyntaxError:
                        pass
                    except ValueError:
                        pass
            my_dict = self._build_dict(my_dict, _db_key.split(':'),
                                       db_values)
        return my_dict[db_key]
888614
def reload(self):
        ''
        self.rows = []

#        if len(self.origCols) == 1 and self.origCols[0].type in (int, float, currency):
#            self.numericBinning()
#        else:
        self.discreteBinning()

        # automatically add cache to all columns now that everything is binned
        for c in self.nonKeyVisibleCols:
            c._cachedValues = collections.OrderedDict()
958227
def reload(self, **kwargs):
        """"""
        frame = self.one({'_id': self._id}, **kwargs)
        self._document = frame._document
1335283
def _reload(self, force=False):
        
        self._config_map = dict()
        self._registered_env_keys = set()
        self.__reload_sources(force)
        self.__load_environment_keys()
        self.verify()
        self._clear_memoization()
1086371
def load_sources(self, sources):
        """"""

        self.clear()
        for s in sources:

            if isinstance(s, dict):
                s = Model.create_from_dict(s)

            self.load_source(s, build_index=False)
        self._build_src_index()
265805
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'environment_id' in _dict:
            args['environment_id'] = _dict.get('environment_id')
        if 'collection_id' in _dict:
            args['collection_id'] = _dict.get('collection_id')
        if 'queries' in _dict:
            args['queries'] = [
                TrainingQuery._from_dict(x) for x in (_dict.get('queries'))
            ]
        return cls(**args)
33325
def load_from_dict(db, data, metadata):
    
    # The ORM overhead is too high for this kind of bulk load,
    # so drop down to SQLAlchemy Core.
    # This tries to do minimize the number of SQL commands by loading entire
    # tables at once

    if metadata['version'] != 2:
        raise ValueError('Can only load version 2')

    try:
        bind = db.get_bind(tables.Event)
    except (ValueError, AttributeError):
        pass
    else:
        if bind.dialect.name == 'sqlite':
            db.execute('PRAGMA foreign_keys = ON')

    with bulk_inserter(db) as insert:

        # Load speakers

        speaker_slugs = set()

        for series_slug, series in data['series'].items():
            for event_slug, event in series['events'].items():
                for talk in event.get('talks'):
                    for speaker in talk.get('speakers', ()):
                        if speaker not in speaker_slugs:
                            speaker_slugs.add(speaker)
                            insert(tables.Speaker, {
                                'slug': speaker,
                                'name': speaker,
                            })

        venue_ids = {}

        # Load cities, and their venues

        for city_slug, city in data['cities'].items():
            city_data = city['city']
            insert(tables.City, {
                'slug': city_slug,
                'name': city_data['name'],
                'latitude': city_data['location']['latitude'],
                'longitude': city_data['location']['longitude'],
                '_source': city_data['_source'],
            })

            for venue_slug, venue in city.get('venues', {}).items():
                venue_ids[city_slug, venue_slug] = insert(tables.Venue, {
                    'city_slug': city_slug,
                    'slug': venue_slug,
                    'name': venue['name'],
                    'address': venue.get('address'),
                    'latitude': venue['location']['latitude'],
                    'longitude': venue['location']['longitude'],
                    'notes': venue.get('notes'),
                })


        # Load series, their events, and everything underneath

        for series_slug, series_dir in data['series'].items():

            series = series_dir['series']
            recurrence = series.get('recurrence')
            if recurrence:
                rrule_str = recurrence['rrule']
                rrule.rrulestr(rrule_str)  # check rrule syntax
                recurrence_attrs = {
                    'recurrence_rule': rrule_str,
                    'recurrence_scheme': recurrence['scheme'],
                    'recurrence_description_cs': recurrence['description']['cs'],
                    'recurrence_description_en': recurrence['description']['en'],
                }
            else:
                recurrence_attrs = {
                    'recurrence_rule': None,
                    'recurrence_scheme': None,
                    'recurrence_description_cs': None,
                    'recurrence_description_en': None,
                }
            insert(tables.Series, {
                'slug': series_slug,
                'name': series['name'],
                'home_city_slug': series.get('city'),
                'description_cs': series['description']['cs'],
                'description_en': series['description']['en'],
                'organizer_info': json.dumps(series.get('organizer-info', ())),
                **recurrence_attrs,
            })

            for event_slug, event in series_dir['events'].items():
                venue_slug = event.get('venue')
                city_slug = event['city']
                if venue_slug:
                    venue_id = venue_ids[city_slug, venue_slug]
                else:
                    venue_id = None

                start = make_full_datetime(event['start'])
                end = event.get('end')
                if end is None:
                    end = start.replace(hour=23, minute=59, second=59)
                event_id = insert(tables.Event, {
                    'name': event['name'],
                    'number': event.get('number'),
                    'topic': event.get('topic'),
                    'description': event.get('description'),
                    'date': start.date(),
                    'start_time': start.time(),
                    'end': end,
                    'all_day': event.get('all_day', False),
                    'series_slug': series_slug,
                    'city_slug': city_slug,
                    'venue_id': venue_id,
                    '_source': event['_source']
                })

                for i, talk in enumerate(event.get('talks', ())):
                    talk_id = insert(tables.Talk, {
                        'event_id': event_id,
                        'index': i,
                        'title': talk['title'],
                        'description': talk.get('description'),
                        'is_lightning': talk.get('lightning', False),
                    })

                    for i, speaker in enumerate(talk.get('speakers', ())):
                        assert speaker in speaker_slugs
                        insert(tables.TalkSpeaker, {
                            'talk_id': talk_id,
                            'index': i,
                            'speaker_slug': speaker,
                        })

                    for i, link in enumerate([
                            *({'talk': u} for u in talk.get('urls', ())),
                            *talk.get('coverage', {})]):
                        for kind, url in link.items():
                            insert(tables.TalkLink, {
                                'talk_id': talk_id,
                                'index': i,
                                'url': url,
                                'kind': kind,
                            })

                for i, url in enumerate(event.get('urls', ())):
                    insert(tables.EventLink, {
                        'event_id': event_id,
                        'index': i,
                        'url': url,
                    })
1351538
def reload(self, env=None, silent=None):  # pragma: no cover
        """"""
        self.clean()
        self.execute_loaders(env, silent)
283392
def reload_source(self, name, init_source=True):
        """"""

        for c in self.components:
            c.reload_source(name)

        if init_source:
            self._init_source(name)

        self.like.model = self.like.components[0].model
211920
def reload(cls, args):
        """"""
        LOG.info('Reloading NApps...')
        mgr = NAppsManager()

        try:
            if args['all']:
                mgr.reload(None)
            else:
                napps = args['<napp>']
                mgr.reload(napps)

            LOG.info('\tReloaded.')
        except requests.HTTPError as exception:
            if exception.response.status_code != 200:
                msg = json.loads(exception.response.content)
                LOG.error('\tServer error: %s - ', msg['error'])
473351
public static void reload(String key) {
        KV<String, SplitWord> kv = CRF.get(key);
        if (kv != null) {
            CRF.get(key).setV(null);
        }

        LOG.warn("make sure ,this reload not use same obj , it to instance a new model");
    }
392091
def load_models(module):
    """"""
    modules = _import_submodules(module)
    return {m for module in modules for m in filter(
        _check_model, (getattr(module, name) for name in dir(module))
    )}
134042
def reload(self):
        """"""
        self.restarted_adapter = False
        self.data.clear()
        if conf.use_winpcapy:
            # Reload from Winpcapy
            from scapy.arch.pcapdnet import load_winpcapy
            load_winpcapy()
        self.load()
        # Reload conf.iface
        conf.iface = get_working_if()
45837
def load_from_dict(self, conf_dict=None):
        
        self.set_to_default()
        self._update_dict(self._config, conf_dict)
        self._update_python_paths()