Set data for the widget.

        :param profile_data: profile data.
        :type profile_data: dict

        It will replace the previous data.
482720
def data(self, profile_data):
        
        default_profile = generate_default_profile()
        self.clear()
        for hazard in sorted(default_profile.keys()):
            classifications = default_profile[hazard]
            hazard_widget_item = QTreeWidgetItem()
            hazard_widget_item.setData(0, Qt.UserRole, hazard)
            hazard_widget_item.setText(0, get_name(hazard))
            for classification in sorted(classifications.keys()):
                # Filter out classification that doesn't support population.
                # TODO(IS): This is not the best place to put the filtering.
                # It's more suitable in the generate_default_profile method
                # in safe/definitions/utilities.
                classification_definition = definition(classification)
                supported_exposures = classification_definition.get(
                    'exposures', [])
                # Empty list means support all exposure
                if supported_exposures != []:
                    if exposure_population not in supported_exposures:
                        continue
                classes = classifications[classification]
                classification_widget_item = QTreeWidgetItem()
                classification_widget_item.setData(
                    0, Qt.UserRole, classification)
                classification_widget_item.setText(0, get_name(classification))
                hazard_widget_item.addChild(classification_widget_item)
                for the_class, the_value in list(classes.items()):
                    the_class_widget_item = QTreeWidgetItem()
                    the_class_widget_item.setData(0, Qt.UserRole, the_class)
                    the_class_widget_item.setText(
                        0, get_class_name(the_class, classification))
                    classification_widget_item.addChild(the_class_widget_item)
                    # Adding widget must be happened after addChild
                    affected_check_box = QCheckBox(self)
                    # Set from profile_data if exist, else get default
                    profile_value = profile_data.get(
                        hazard, {}).get(classification, {}).get(
                        the_class, the_value)

                    affected_check_box.setChecked(profile_value['affected'])
                    self.setItemWidget(
                        the_class_widget_item, 1, affected_check_box)
                    displacement_rate_spinbox = PercentageSpinBox(self)
                    displacement_rate_spinbox.setValue(
                        profile_value['displacement_rate'])
                    displacement_rate_spinbox.setEnabled(
                        profile_value['affected'])
                    self.setItemWidget(
                        the_class_widget_item, 2, displacement_rate_spinbox)
                    # Behaviour when the check box is checked
                    # noinspection PyUnresolvedReferences
                    affected_check_box.stateChanged.connect(
                        displacement_rate_spinbox.setEnabled)
            if hazard_widget_item.childCount() > 0:
                self.widget_items.append(hazard_widget_item)

        self.addTopLevelItems(self.widget_items)

        self.expandAll()
1146676
def setProfiles(self, profiles):
        
        self.blockSignals(True)
        self._profileCombo.blockSignals(True)
        
        self._profiles = profiles[:]
        self._profileCombo.clear()
        self._profileCombo.addItems(map(lambda x: x.name(), profiles))
        
        self._profileCombo.blockSignals(False)
        self.blockSignals(False)
1077225
def update(self, data):
        
        for key, value in data.items():
            setattr(self, key, value)
1358105
def setProfile( self, profile ):
        
        self._profile = profile
        
        if not profile:
            self.uiNameTXT.setText('')
            self.uiVersionSPN.setValue(1.0)
            self.uiDescriptionTXT.setText('')
            self.uiIconBTN.setFilepath(resources.find('img/profile_48.png'))
        else:
            self.uiNameTXT.setText(profile.name())
            self.uiVersionSPN.setValue(profile.version())
            self.uiDescriptionTXT.setText(profile.description())
            
            filepath = profile.icon()
            if ( not filepath ):
                filepath = resources.find('img/profile_48.png')
            self.uiIconBTN.setFilepath(filepath)
1275803
public void updateProfile(ProfileFieldValues values) {
		getResourceFactory().getApiResource("/user/profile/")
				.entity(values, MediaType.APPLICATION_JSON_TYPE).put();
	}
442081
def set_identifiers(self, data):
        
        for id_info in self._details.identifiers:
            var_name = id_info['var_name']
            self._data[var_name] = data.get(var_name)

        # FIXME: This needs to likely kick off invalidating/rebuilding
        #        relations.
        #        For now, just remove them all. This is potentially inefficient
        #        but is nicely lazy if we don't need them & prevents stale data
        #        for the moment.
        self._relations = {}
215181
def _set_table(self, data):
        
        self.set_state('table')
        self.current_table = HEPTable(index=len(self.tables) + 1)
        self.tables.append(self.current_table)
        self.data.append(self.current_table.metadata)
772510
def update_data(self, data_np, metadata=None, astype=None):
        
        self.set_data(data_np.copy(), metadata=metadata,
                      astype=astype)
596722
public void setProfile(OperaProfile profile) {
    options.get(PROFILE).setValue(PROFILE.sanitize(profile));
    supportsPd = true;
  }
133712
def render_profile_data(self, as_parsed):
        """"""
        try:
            return deep_map(self._render_profile_data, as_parsed)
        except RecursionException:
            raise DbtProfileError(
                'Cycle detected: Profile input has a reference to itself',
                project=as_parsed
            )
332813
def set_(key, value, profile=None):
    '''
    
    '''
    if not profile:
        return False
    redis_kwargs = profile.copy()
    redis_kwargs.pop('driver')
    redis_conn = redis.StrictRedis(**redis_kwargs)
    return redis_conn.set(key, value)
307755
def _load_profile(self, profile_name):
        

        # find the profile
        default_profile = self._profile_list[0]
        for profile in self._profile_list:
            if profile.get('default', False):
                # explicit default, not the first
                default_profile = profile

            if profile['display_name'] == profile_name:
                break
        else:
            if profile_name:
                # name specified, but not found
                raise ValueError("No such profile: %s. Options include: %s" % (
                    profile_name, ', '.join(p['display_name'] for p in self._profile_list)
                ))
            else:
                # no name specified, use the default
                profile = default_profile

        self.log.debug("Applying KubeSpawner override for profile '%s'", profile['display_name'])
        kubespawner_override = profile.get('kubespawner_override', {})
        for k, v in kubespawner_override.items():
            if callable(v):
                v = v(self)
                self.log.debug(".. overriding KubeSpawner value %s=%s (callable result)", k, v)
            else:
                self.log.debug(".. overriding KubeSpawner value %s=%s", k, v)
            setattr(self, k, v)
925534
public final void setProfileId(String profileId) {
        boolean force = false;
        if (Utility.isNullOrEmpty(this.profileId) || !this.profileId.equalsIgnoreCase(profileId)) {
            // Clear out the old profilePicture before requesting for the new one.
            setBlankProfilePicture();
            force = true;
        }

        this.profileId = profileId;
        refreshImage(force);
    }
791135
def set_data(self, data):
        

        if not isinstance(data, basestring):
            raise ValueError("data must an instance of basestring")
        self._data = data
        self._current = 0
215434
def add_profile(self, namespace, key, value, force=False):
        
        try:
            entry = dax.Profile(namespace, key, value)
            self._dax_node.addProfile(entry)
        except dax.DuplicateError:
            if force:
                # Replace with the new key
                self._dax_node.removeProfile(entry)
                self._dax_node.addProfile(entry)
584820
public function setData(array $data = [])
    {
        $this->default = empty($data);

        $this->data = array_replace([
            static::VISIBLE_COLUMNS => [],
            static::MAX_PER_PAGE    => null,
            static::CONFIG          => null,
            static::PAGE_NUM        => null,
            static::SORT            => null,
            static::ADD_FILTER      => null,
            static::REMOVE_FILTER   => null,
            static::IDENTIFIERS     => [],
            static::ALL             => null,
            static::BATCH           => null,
            static::ACTION          => null,
            static::EXPORT          => null,
            static::FORMAT          => null,
            static::PROFILE         => [],
        ], $data);
    }
88385
def remove_profile(self, profile=None):
        
        with self.db:
            return self.db.remove(self.query.profile == profile)