Publishes feature collections to a feature service.
        
        Args:
            configs (list): A list of JSON configuration feature service details to publish.
        Returns:
            dict: A dictionary of results objects.
359378
def publishFeatureCollections(self, configs):
        
        if self.securityhandler is None:
            print ("Security handler required")
            return
        config = None
        res = None
        resItm = None
        try:
            res = []
            if isinstance(configs, list):
                for config in configs:
                    if 'ReplaceTag' in config:

                        resItm = {"ReplaceTag":config['ReplaceTag'] }
                    else:
                        resItm = {"ReplaceTag":"{FeatureService}" }

                    if 'Zip' in config:
                        resItm['FCInfo'] = self._publishFeatureCollection(config=config)


                    if not resItm['FCInfo'] is None and 'id' in resItm['FCInfo']:
                        print ("%s feature collection created" % resItm['FCInfo']['id'])
                        res.append(resItm)
                    else:
                        print (str(resItm['FCInfo']))


            return res

        except common.ArcRestHelperError as e:
            raise e
        except Exception as e:

            line, filename, synerror = trace()
            raise common.ArcRestHelperError({
                "function": "publishFeatureCollections",
                "line": line,
                "filename":  filename,
                "synerror": synerror,
            })

        finally:
            resItm = None
            config = None

            del resItm
            del config

            gc.collect()
900402
def register_features(with_features)
      Thread.new do
        features = []
        features = with_features.each do | feature |
          features.push(key: feature[:key],
                          variants: feature[:variants],
                          failoverVariant: feature[:failover_variant])
        end
        send_event 'Register Features', :put, '/api/sdk/v1/register', features
      end
    end
1027477
def get_configs(self):
        
        self.check_configs_ready()

        result = []
        for bot in self.bots.values():
            result.extend(list(bot.get_models()))
        return result
1192234
def generate_config_set(self, config):
        '''
        
        '''
        if isinstance(config, dict):
            # Configuration list contains only one element
            self.config = [(config, 1.0)]
        elif isinstance(config, list):
            # Multiple configurations with correscponding weights
            total_weight = 0.
            self.config = []
            for params in config:
                weight = params['Model_Weight']
                total_weight += params['Model_Weight']
                self.config.append((params, weight))
            if fabs(total_weight - 1.0) > 1E-7:
                raise ValueError('MFD config weights do not sum to 1.0 for '
                                 'fault %s' % self.id)
        else:
            raise ValueError('MFD config must be input as dictionary or list!')
386758
def merge_config(configs):
    
    new_config = {}

    for name, config in configs.items():
        new_config = dictmerge(new_config, config, name)

    return new_config
1083721
def publish(self):
        

        def get_data():
            model = self.data["models"]["item"]

            # Communicate with host to retrieve current plugins and instances
            # This can potentially take a very long time; it is run
            # asynchronously and initiates processing once complete.
            host_plugins = dict((p.id, p) for p in self.host.cached_discover)
            host_context = dict((i.id, i) for i in self.host.cached_context)

            plugins = list()
            instances = list()

            for plugin in models.ItemIterator(model.plugins):

                # Exclude Collectors
                if pyblish.lib.inrange(
                        number=plugin.order,
                        base=pyblish.api.Collector.order):
                    continue

                plugins.append(host_plugins[plugin.id])

            for instance in models.ItemIterator(model.instances):
                instances.append(host_context[instance.id])

            return plugins, instances

        def on_data_received(args):
            self.run(*args, callback=on_finished)

        def on_finished():
            self.host.emit("published", context=None)

        util.defer(get_data, callback=on_data_received)
176833
@Override
    public Map<String, String> loadDocStrings(Set<ServiceConfig> serviceConfigs) {
        return serviceConfigs.stream()
                             .flatMap(c -> c.service().as(THttpService.class).get().entries().values().stream())
                             .flatMap(entry -> entry.interfaces().stream().map(Class::getClassLoader))
                             .flatMap(loader -> docstringExtractor.getAllDocStrings(loader)
                                                                  .entrySet().stream())
                             .collect(toImmutableMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> a));
    }
636277
def add_to_configs(self, configs):
        
        for f, td in self.tds.items():
            td.configs.add_to_configs(configs)
517595
def get_id2config_mapping(self):
		
		new_dict = {}
		for k, v in self.data.items():
			new_dict[k] = {}
			new_dict[k]['config'] = copy.deepcopy(v.config)
			try:
				new_dict[k]['config_info'] = copy.deepcopy(v.config_info)
			except:
				pass
		return(new_dict)
516688
private static void addFeatures(Featurable featurable, Services services, Setup setup)
    {
        final List<Feature> rawFeatures = FeaturableConfig.getFeatures(services, setup);
        final int length = rawFeatures.size();
        for (int i = 0; i < length; i++)
        {
            final Feature feature = rawFeatures.get(i);
            featurable.addFeature(feature);
        }
        featurable.addAfter(services, setup);
    }
302788
public void setConfigurationSettings(java.util.Collection<ConfigurationSettingsDescription> configurationSettings) {
        if (configurationSettings == null) {
            this.configurationSettings = null;
            return;
        }

        this.configurationSettings = new com.amazonaws.internal.SdkInternalList<ConfigurationSettingsDescription>(configurationSettings);
    }
1291402
def merge_featurecollection(*jsons):
    
    features = []
    for json in jsons:
        if json['type'] == 'FeatureCollection':
            for feature in json['features']:
                features.append(feature)
    return {"type":'FeatureCollection', "features":features}
1136979
def list_features(self, **kwargs):
        
        # Endpoint parameters
        params = {
            'language': util.language_code(kwargs.get('lang')),
            'publicData': True
        }

        # Request
        result = self.make_request('list_features', {}, **params)

        if not util.check_result(result):
            return False, result.get('message', 'UNKNOWN ERROR')

        # Parse
        values = util.response_list(result, 'Data')
        return True, [emtype.ParkingFeature(**a) for a in values]
745951
@SuppressWarnings("unchecked")
    public Dictionary<String, String> updateDictionaryConfig(Dictionary<String, String> dictionary, boolean returnCopy)
    {
        if (returnCopy)
            dictionary = BaseBundleActivator.putAll(dictionary, null);
        if (dictionary == null)
            dictionary = new Hashtable<String, String>();
        try {
            String servicePid = dictionary.get(BundleConstants.SERVICE_PID);
            if (servicePid != null)
            {
                ServiceReference caRef = context.getServiceReference(ConfigurationAdmin.class.getName());
                if (caRef != null)
                {
                    ConfigurationAdmin configAdmin = (ConfigurationAdmin)context.getService(caRef);
                    Configuration config = configAdmin.getConfiguration(servicePid);

                    configProperties = config.getProperties();
                    if (configProperties == null)
                        configProperties = new Hashtable<String, String>();
                    // First, move all settings to dictionary
                    dictionary = BaseBundleActivator.putAll(configProperties, dictionary);
                    dictionary.put(BaseWebappServlet.ALIAS, this.calculateWebAlias(dictionary));
                    // Next, move all saveable settings to the config dictionary (and save them)
                    Enumeration<String> keys = dictionary.keys();
                    while (keys.hasMoreElements())
                    {
                        String key = keys.nextElement();
                        if (isPersistentProperty(key))
                            configProperties.put(key, dictionary.get(key)); // Make sure all the fully qualified keys are persisted
                    }
                    // push the configuration dictionary to the ConfigAdminService
                    config.update(configProperties);
                }
            }
            if (dictionary.get(BaseWebappServlet.ALIAS) == null)
                dictionary.put(BaseWebappServlet.ALIAS, this.calculateWebAlias(dictionary));
        } catch (IOException e) {
            e.printStackTrace();
        }
        return dictionary;
    }
585905
def push(config, services):
    
    version = _get_version()
    for service_name, service_dict in services.iteritems():
        image = service_dict['image']
        things = {'image': image, 'version': version}
        _call_output('docker push {image}:latest'.format(**things))
        _call_output('docker push {image}:{version}'.format(**things))
1324150
@SuppressWarnings("unchecked")
    @Override
    public Dictionary<String, String> getProperties(String servicePid)
    {
        Dictionary<String, String> properties = null;
         try {
             if (servicePid != null)
             {
                 ServiceReference caRef = bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
                 if (caRef != null)
                 {
                     ConfigurationAdmin configAdmin = (ConfigurationAdmin)bundleContext.getService(caRef);
                     Configuration config = configAdmin.getConfiguration(servicePid);
    
                     properties = config.getProperties();
                 }
             }
         } catch (IOException e) {
             e.printStackTrace();
         }
         return properties;
    }
420198
def get_data(
    dataset,
    query=None,
    crs="epsg:4326",
    bounds=None,
    sortby=None,
    pagesize=10000,
    max_workers=5,
):
    
    param_dicts = define_request(dataset, query, crs, bounds, sortby, pagesize)

    with ThreadPoolExecutor(max_workers=max_workers) as executor:
        results = executor.map(make_request, param_dicts)

    outjson = dict(type="FeatureCollection", features=[])
    for result in results:
        outjson["features"] += result
    return outjson