List available runtime configurations available backend types

REST: GET /hosting/web/{serviceName}/runtimeAvailableTypes
@param language [required] Specific programming language to filter
@param serviceName [required] The internal name of your hosting
762420
public ArrayList<OvhTypeEnum> serviceName_runtimeAvailableTypes_GET(String serviceName, String language) throws IOException {
		String qPath = "/hosting/web/{serviceName}/runtimeAvailableTypes";
		StringBuilder sb = path(qPath, serviceName);
		query(sb, "language", language);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t4);
	}
143916
private <T> List<T> loadServices(final Class<T> serviceType) {
        List<T> services = new ArrayList<>();
        try {
            for (T t : ServiceLoader.load(serviceType)) {
                services.add(t);
            }
            services.sort(PriorityAwareServiceProvider::compareServices);
            @SuppressWarnings("unchecked")
            final List<T> previousServices = (List<T>) servicesLoaded.putIfAbsent(serviceType, (List<Object>) services);
            return Collections.unmodifiableList(previousServices != null ? previousServices : services);
        } catch (Exception e) {
            Logger.getLogger(PriorityAwareServiceProvider.class.getName()).log(Level.WARNING,
                    "Error loading services of type " + serviceType, e);
            services.sort(PriorityAwareServiceProvider::compareServices);
            return services;
        }
    }
157277
def get_runtime_configuration(self):
        # type: () -> RuntimeConfiguration
        
        request_mapper = GenericRequestMapper(
            request_handler_chains=self.request_handler_chains)
        exception_mapper = GenericExceptionMapper(
            exception_handlers=self.exception_handlers)
        handler_adapter = GenericHandlerAdapter()

        runtime_configuration = RuntimeConfiguration(
            request_mappers=[request_mapper],
            handler_adapters=[handler_adapter],
            exception_mapper=exception_mapper,
            request_interceptors=self.global_request_interceptors,
            response_interceptors=self.global_response_interceptors)

        return runtime_configuration
89717
public EndpointInfoBuilder availableMimeTypes(Iterable<MediaType> availableMimeTypes) {
        requireNonNull(availableMimeTypes, "availableMimeTypes");
        checkArgument(!Iterables.isEmpty(availableMimeTypes), "Should at least have an available media type.");
        if (defaultMimeType != null && !Iterables.contains(availableMimeTypes, defaultMimeType)) {
            this.availableMimeTypes = addDefaultMimeType(defaultMimeType, availableMimeTypes);
        } else {
            this.availableMimeTypes = ImmutableSet.copyOf(availableMimeTypes);
        }
        return this;
    }
1248002
public OvhEmailAvailability serviceName_localSeo_emailAvailability_GET(String serviceName, String email) throws IOException {
		String qPath = "/hosting/web/{serviceName}/localSeo/emailAvailability";
		StringBuilder sb = path(qPath, serviceName);
		query(sb, "email", email);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhEmailAvailability.class);
	}
668274
public static Nd4jBackend load() throws NoAvailableBackendException {

        List<Nd4jBackend> backends = new ArrayList<>(1);
        ServiceLoader<Nd4jBackend> loader = ServiceLoader.load(Nd4jBackend.class);
        try {

            Iterator<Nd4jBackend> backendIterator = loader.iterator();
            while (backendIterator.hasNext())
                backends.add(backendIterator.next());

        } catch (ServiceConfigurationError serviceError) {
            // a fatal error due to a syntax or provider construction error.
            // backends mustn't throw an exception during construction.
            throw new RuntimeException("failed to process available backends", serviceError);
        }

        Collections.sort(backends, new Comparator<Nd4jBackend>() {
            @Override
            public int compare(Nd4jBackend o1, Nd4jBackend o2) {
                // high-priority first
                return o2.getPriority() - o1.getPriority();
            }
        });

        for (Nd4jBackend backend : backends) {
            boolean available = false;
            String error = null;
            try {
                available = backend.isAvailable();
            } catch (Exception e) {
                error = e.getMessage();
            }
            if (!available) {
                log.warn("Skipped [{}] backend (unavailable): {}", backend.getClass().getSimpleName(), error);
                continue;
            }

            try {
                Nd4jContext.getInstance().updateProperties(backend.getConfigurationResource().getInputStream());
            } catch (IOException e) {
                e.printStackTrace();
            }

            log.info("Loaded [{}] backend", backend.getClass().getSimpleName());
            return backend;
        }

        //need to dynamically load jars and recall, note that we do this right before the backend loads.
        //An existing backend should take precedence over
        //ones being dynamically discovered.
        //Note that we prioritize jvm properties first, followed by environment variables.
        String[] jarUris;
        if (System.getProperties().containsKey(ND4JSystemProperties.DYNAMIC_LOAD_CLASSPATH_PROPERTY) && !triedDynamicLoad) {
            jarUris = System.getProperties().getProperty(ND4JSystemProperties.DYNAMIC_LOAD_CLASSPATH_PROPERTY).split(";");
        // Do not call System.getenv(): Accessing all variables requires higher security privileges
        } else if (System.getenv(ND4JEnvironmentVars.BACKEND_DYNAMIC_LOAD_CLASSPATH) != null && !triedDynamicLoad) {
            jarUris = System.getenv(ND4JEnvironmentVars.BACKEND_DYNAMIC_LOAD_CLASSPATH).split(";");
        }

        else
            throw new NoAvailableBackendException(
                            "Please ensure that you have an nd4j backend on your classpath. Please see: http://nd4j.org/getstarted.html");

        triedDynamicLoad = true;
        //load all the discoverable uris and try to load the backend again
        for (String uri : jarUris) {
            loadLibrary(new File(uri));
        }

        return load();
    }
702057
def get_avaliable_languages(self, bundleId):
        """"""
        bundleData = self.__get_bundle_data(bundleId)

        if not bundleData:
            return []

        sourceLanguage = bundleData.get(self.__RESPONSE_SRC_LANGUAGE_KEY)
        languages = bundleData.get(self.__RESPONSE_TARGET_LANGUAGES_KEY)
        languages.append(sourceLanguage)

        return languages if languages else []
1213591
public function getAvailableLanguages()
    {
        if (!is_null($this->languageNames)) {
            return $this->languageNames;
        }
        $path = PIWIK_INCLUDE_PATH . "/lang/";
        $languagesPath = _glob($path . "*.json");

        $pathLength = strlen($path);
        $languages = array();
        if ($languagesPath) {
            foreach ($languagesPath as $language) {
                $languages[] = substr($language, $pathLength, -strlen('.json'));
            }
        }

        $this->enableDevelopmentLanguageInDevEnvironment($languages);

        /**
         * Hook called after loading available language files.
         *
         * Use this hook to customise the list of languagesPath available in Matomo.
         *
         * @param array
         */
        Piwik::postEvent('LanguagesManager.getAvailableLanguages', array(&$languages));

        /**
         * Hook called after loading available language files.
         *
         * @param array
         *
         * @deprecated since v3.9.0 use LanguagesManager.getAvailableLanguages instead. Will be removed in Matomo 4.0.0
         */
        Piwik::postEvent('LanguageManager.getAvailableLanguages', array(&$languages));

        $this->languageNames = $languages;
        return $languages;
    }
1226126
@Override
    public List<Locale> getLocales(String acceptLangHdr) {
        // Short circuit with an empty enumeration if null header
        if (null == acceptLangHdr) {
            List<Locale> def = new ArrayList<Locale>(1);
            def.add(Locale.getDefault());
            return def;
        }

        // Check cache
        List<Locale> langList = this.localesCache.get(acceptLangHdr);
        if (null == langList) {
            // Create and add to cache
            List<List<String>> rc = processAcceptLanguage(acceptLangHdr);
            if (null != rc) {
                langList = extractLocales(rc);
                this.localesCache.put(acceptLangHdr, langList);
            } else {
                // this can happen with only q=0 values in the header
                List<Locale> def = new ArrayList<Locale>(1);
                def.add(Locale.getDefault());
                return def;
            }
        }

        return langList;
    }
514607
function getProviderIDsForLanguage(languageId) {
        if (!_providers[languageId]) {
            return [];
        }
        return _providers[languageId].map(function (provider) {
            return provider.name;
        });
    }
1368901
public ServiceFuture<List<AvailableCulture>> listSupportedCulturesAsync(final ServiceCallback<List<AvailableCulture>> serviceCallback) {
        return ServiceFuture.fromResponse(listSupportedCulturesWithServiceResponseAsync(), serviceCallback);
    }
1134447
@Override
	protected List<String> findAvailableLocales(String resource) {

		Set<String> result = new HashSet<String>();
		
		String[] msgBundleArray = resource
				.split(RESOURCE_BUNDLE_SEPARATOR);
		for (String msgResource : msgBundleArray) {
			List<String> availableLocales = GrailsLocaleUtils
					.getAvailableLocaleSuffixesForBundle(msgResource,
							rsHandler);
			result.addAll(availableLocales);
		}
		
		LOGGER.debug("Available locales for "+resource+" : "+result);
		return new ArrayList<String>(result);
	}
1327081
@SuppressWarnings("javadoc")
    public static <T> T getSingleService(Class<T> serviceInterface) throws IllegalStateException {
        // Cached single service values are derived from the values cached when checking
        // for multiple services
        T rval = null;
        Set<T> services = getServices(serviceInterface);
        
        if (services.size() > 1) {
            throw new IllegalStateException("Multiple implementations found of " + serviceInterface); //$NON-NLS-1$
        } else if (!services.isEmpty()) {
            rval = services.iterator().next();
        }
        return rval;
    }
388337
@VisibleForTesting
  static ServiceInfo getServiceInfo(String serviceName) {
    return ServiceInfo.newBuilder().setName(serviceName).build();
  }
1109686
public DescribeServices getAvailableServices() {
		if (services == null) {
			Set<String> keys = this.getRegisteredConfigurations().keySet();

			Iterator<String> it = keys.iterator();

			String id = null;
			services = new DescribeServices();
			while (it.hasNext()) {
				id = it.next();
				services.put(id, this.getServiceConfiguration(id));
			}
		}

		return services;
	}
8079
def _get_languages(cls) -> set:
        """"""
        if not cls._server_is_alive():
            cls._start_server_on_free_port()
        url = urllib.parse.urljoin(cls._url, 'Languages')
        languages = set()
        for e in cls._get_root(url, num_tries=1):
            languages.add(e.get('abbr'))
            languages.add(e.get('abbrWithVariant'))
        return languages
413661
def supported_languages(self):
        
        if self.__supported_languages is None:
            res = self.wiki_request({"meta": "siteinfo", "siprop": "languages"})
            tmp = res["query"]["languages"]
            supported = {lang["code"]: lang["*"] for lang in tmp}
            self.__supported_languages = supported
        return self.__supported_languages