Set facet properties
967862
def _setup_parameters(self):
        
        # facet
        self.facet.set(
            layout=self.layout,
            theme=self.theme,
            coordinates=self.coordinates,
            figure=self.figure,
            axs=self.axs
        )

        # layout
        self.layout.axs = self.axs
        # theme
        self.theme.figure = self.figure
796392
def add_date_facet(self, *args, **kwargs):
        """"""
        self.facets.append(DateHistogramFacet(*args, **kwargs))
1005551
def _set_properties(self):
        """"""

        self.set_icon(icons["PyspreadLogo"])

        # Without minimum size, initial size is minimum size in wxGTK
        self.minSizeSet = False

        # Leave save mode
        post_command_event(self, self.SafeModeExitMsg)
556863
def set_features(self):
        """"""
        self.scores = {}
        for t_or_d, feats in zip(['target', 'decoy'], [self.target,
                                                       self.decoy]):
            self.scores[t_or_d] = {}
            self.scores[t_or_d]['scores'] = self.score_get_fun(
                feats, self.featuretype, self.prepare_percolator_output)
            self.scores[t_or_d]['fn'] = '{}_qvality_input.txt'.format(t_or_d)
            writers.write_qvality_input(self.scores[t_or_d]['scores'],
                                        self.scores[t_or_d]['fn'])
570709
function (properties, featureCollection, mergeKey) {
		var features = featureCollection.features;
		var featureIndex = L.GeometryUtils.indexFeatureCollection(features, mergeKey);
		var property;
		var mergeValue;
		var newFeatureCollection = {
			type: 'FeatureCollection',
			features: []
		};

		for (var key in properties) {
			if (properties.hasOwnProperty(key)) {
				property = properties[key];

				mergeValue = property[mergeKey];

				if (mergeValue) {
					var feature = featureIndex[mergeValue];

					for (var prop in property) {
						feature.properties[prop] = property[prop];
					}

					newFeatureCollection.features.push(feature);
				}
			}
		}

		return newFeatureCollection;
	}
1197011
def add_term_facet(self, *args, **kwargs):
        """"""
        self.facets.append(TermFacet(*args, **kwargs))
569098
def add_geo_facet(self, *args, **kwargs):
        """"""
        self.facets.append(GeoDistanceFacet(*args, **kwargs))
470518
@SuppressWarnings("unchecked")
	@Override
	public final <T extends SolrDataQuery> T setFacetOptions(@Nullable FacetOptions facetOptions) {

		if (facetOptions != null) {
			Assert.isTrue(facetOptions.hasFacets(), "Cannot set facet options having neither fields nor queries.");
		}
		this.facetOptions = facetOptions;
		return (T) this;
	}
375873
def set_object(self, obj, properties):
        """"""
        self._objects.add(obj)
        properties = set(properties)
        self._properties |= properties
        pairs = self._pairs
        for p in self._properties:
            if p in properties:
                pairs.add((obj, p))
            else:
                pairs.discard((obj, p))
41934
def _set(self, schema):
        """"""
        if isinstance(schema, CommonSchema):
            self._spl_type = False
            self._schema = schema.schema()
            self._style = self._default_style()
        else:
            self._spl_type = schema._spl_type
            self._schema = schema._schema
            self._style = schema._style
1261467
def fix_facets(self):
        
        facets = self.facets
        for key in list(facets.keys()):
            _type = facets[key].get("_type", "unknown")
            if _type == "date_histogram":
                for entry in facets[key].get("entries", []):
                    for k, v in list(entry.items()):
                        if k in ["count", "max", "min", "total_count", "mean", "total"]:
                            continue
                        if not isinstance(entry[k], datetime):
                            entry[k] = datetime.utcfromtimestamp(v / 1e3)
1107609
def project_set_properties(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/setProperties' % object_id, input_params, always_retry=always_retry, **kwargs)
1355690
def set_i(self, i, data, field, side):
        
        edge = self.get_i(i, side)
        setattr(edge, field, data[edge.slice])
221097
def set_property(self, **kwargs):
        
        if not isinstance(self._value, nparray.ndarray):
            raise ValueError("value is not a nparray object")

        for property, value in kwargs.items():
            setattr(self._value, property, value)
74216
def set_properties(self, pathobj, props, recursive):
        
        url = '/'.join([pathobj.drive,
                        'api/storage',
                        str(pathobj.relative_to(pathobj.drive)).strip('/')])

        params = {'properties': encode_properties(props)}

        if not recursive:
            params['recursive'] = '0'

        text, code = self.rest_put(url,
                                   params=params,
                                   auth=pathobj.auth,
                                   verify=pathobj.verify,
                                   cert=pathobj.cert)

        if code == 404 and "Unable to find item" in text:
            raise OSError(2, "No such file or directory: '%s'" % url)
        if code != 204:
            raise RuntimeError(text)
543533
private List<Facet> buildFacetsFromObject(@NotNull Object document) {
        List<Facet> facets = new ArrayList<>();

        for (Field field : document.getClass().getDeclaredFields()) {
            if (isFacetField(field)) {
                Object fieldValue = getFieldValue(document, field);

                if (fieldValue != null) {
                    List<Serializable> values = transformValue(fieldValue);

                    values.forEach(value -> {
                        Facet key = new Facet(new FacetType(field.getName(), value.getClass()), value);

                        facets.add(key);
                    });
                }
            }
        }

        return facets;
    }
1053987
def _set_properties(self, data):
        
        for property in data.keys():
            if property in vars(self):
                setattr(self, property, data[property])