region FluentAPI
508821
public <I> RequestHandler4<T, R, U, I> param(final Class<I> paramClass) {
    return new RequestHandler4<>(method, path, resolverParam1, resolverParam2, resolverParam3,
      ParameterResolver.path(3, paramClass),
      errorHandler);
  }
294717
private void addUserProvidersToMap(Map<String, String> propertiesMap) {
        if (userDefinedProviders.length != 0) {
            for (PropertiesProvider provider : userDefinedProviders) {
                propertiesMap.putAll(provider.getProperties());
            }
        }
    }
523605
def _get_regional_term(self, C, imt, vs30, rrup):
        
        vs30star = self._get_vs30star(vs30, imt)
        return C['a31'] * np.log(vs30star/C['vlin']) + C['a25'] * rrup
188104
function configure(
// tslint:disable-next-line:ban-types
frameworkConfig, callback) {
    // the fluent rule definition API needs the parser to translate messages
    // to interpolation expressions.
    const messageParser = frameworkConfig.container.get(ValidationMessageParser);
    const propertyParser = frameworkConfig.container.get(PropertyAccessorParser);
    ValidationRules.initialize(messageParser, propertyParser);
    // configure...
    const config = new AureliaValidationConfiguration();
    if (callback instanceof Function) {
        callback(config);
    }
    config.apply(frameworkConfig.container);
    // globalize the behaviors.
    if (frameworkConfig.globalResources) {
        frameworkConfig.globalResources(ValidateBindingBehavior, ValidateManuallyBindingBehavior, ValidateOnBlurBindingBehavior, ValidateOnChangeBindingBehavior, ValidateOnChangeOrBlurBindingBehavior, ValidationErrorsCustomAttribute, ValidationRendererCustomAttribute);
    }
}
1278673
private <TResponse> TResponse callGetApi(
            BasicCredentials credentials, String path, Map<String, String> queryParams,
            Class<TResponse> responseClass) throws AuthleteApiException
    {
        return callApi(HttpMethod.GET, credentials, path, queryParams, (Object)null, responseClass);
    }
747846
function buildAPIs(vueObj) {
  const funcArray = [propsAPIObject, methodsAPIObject, eventsAPIObject, slotsAPIObject]

  const compAPIObj = funcArray.reduce((apiObj, curFn) => {
    const obj = curFn(vueObj)

    if (obj !== null) {
      Object.assign(apiObj, obj)
    }
    return apiObj
  }, {})
  
  return compAPIObj
}
841781
public static void init(final GwAPI gwAPI, GwFacade facade) throws Exception {
		String aftenv = gwAPI.env.getProperty(API_AAFAccess.AFT_ENVIRONMENT);
		if(aftenv==null) throw new Exception(API_AAFAccess.AFT_ENVIRONMENT + " must be set");

		////////
		// Do not deploy these to PROD
		///////
		if(API_AAFAccess.AFTUAT.equals(aftenv)) {
			gwAPI.route(HttpMethods.GET,"/tguard/:path*",API.VOID,new GwCode(facade,"TGuard Test", true) {
				@Override
				public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception {
					Result<Void> r = context.getAPI(trans,resp,gwAPI);
					switch(r.status) {
						case OK:
							resp.setStatus(HttpStatus.OK_200);
							break;
						default:
							context.error(trans,resp,r);
					}
				}
			});
		}
	}
944134
public static TextAnalyticsAPI authenticate(AzureRegions region, String subscriptionKey) {
        return authenticate("https://{AzureRegion}.api.cognitive.microsoft.com/text/analytics/", subscriptionKey)
                .withAzureRegion(region);
    }
75483
@Override
    public Set<String> getPreferredIDs(
        Locale locale,
        boolean smart
    ) {

        String country = FormatUtils.getRegion(locale);

        if (smart) {
            if (country.equals("US")) {
                Set<String> tzids = new LinkedHashSet<>();
                tzids.add("America/New_York");
                tzids.add("America/Chicago");
                tzids.add("America/Denver");
                tzids.add("America/Los_Angeles");
                tzids.add("America/Anchorage");
                tzids.add("Pacific/Honolulu");
                tzids.add("America/Adak");
                return Collections.unmodifiableSet(tzids);
            } else {
                String primaryZone = PRIMARIES.get(country);

                if (primaryZone != null) {
                    return Collections.singleton(primaryZone);
                }
            }
        }

        Set<String> result = TERRITORIES.get(country);

        if (result == null) {
            result = Collections.emptySet();
        }

        return result;

    }
19003
function (
        builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api
    ) {
        // After filtering, axis may change, select area needs to be update.
        var extent = axisModel.axis.getExtent();
        var extentLen = extent[1] - extent[0];
        var extra = Math.min(30, Math.abs(extentLen) * 0.1); // Arbitrary value.

        // width/height might be negative, which will be
        // normalized in BoundingRect.
        var rect = graphic.BoundingRect.create({
            x: extent[0],
            y: -areaWidth / 2,
            width: extentLen,
            height: areaWidth
        });
        rect.x -= extra;
        rect.width += 2 * extra;

        this._brushController
            .mount({
                enableGlobalPan: true,
                rotation: builderOpt.rotation,
                position: builderOpt.position
            })
            .setPanels([{
                panelId: 'pl',
                clipPath: brushHelper.makeRectPanelClipPath(rect),
                isTargetByCursor: brushHelper.makeRectIsTargetByCursor(rect, api, coordSysModel),
                getLinearBrushOtherExtent: brushHelper.makeLinearBrushOtherExtent(rect, 0)
            }])
            .enableBrush({
                brushType: 'lineX',
                brushStyle: areaSelectStyle,
                removeOnClick: true
            })
            .updateCovers(getCoverInfoList(axisModel));
    }
1050471
def _fluent_size(self, fluents, ordering) -> Sequence[Sequence[int]]:
        '''
        '''
        shapes = []
        for name in ordering:
            fluent = fluents[name]
            shape = self._param_types_to_shape(fluent.param_types)
            shapes.append(shape)
        return tuple(shapes)
757171
function parallelApis(apiCalls, req, res, next) {
    debug('parallelApis started!! # calls:' + apiCalls.length);

    var results = 1;
    apiCalls.forEach(function(apiCall){
      api.getData(apiCall, req, res, function(err){
        if (err) { 
          next(err); // if any error - send full request into error flow, exit out of parallelApi calls
          return;
        }

        if (results++ === apiCalls.length) {
          debug('parallelApis done!!');
          next(); // if all calls return successfully call the express next()
        }
      });
    });
  }
523216
static NovaApi novaApi( Map<String,String> targetProperties ) throws TargetException {

		validate( targetProperties );
		return ContextBuilder
				.newBuilder( PROVIDER_NOVA )
				.endpoint( targetProperties.get( API_URL ))
				.credentials( identity( targetProperties ), targetProperties.get( PASSWORD ))
				.buildApi( NovaApi.class );
	}
939709
def _autocomplete(client, url_part, input_text, session_token=None,
                  offset=None, location=None, radius=None, language=None,
                  types=None, components=None, strict_bounds=False):
    

    params = {"input": input_text}

    if session_token:
        params["sessiontoken"] = session_token
    if offset:
        params["offset"] = offset
    if location:
        params["location"] = convert.latlng(location)
    if radius:
        params["radius"] = radius
    if language:
        params["language"] = language
    if types:
        params["types"] = types
    if components:
        if len(components) != 1 or list(components.keys())[0] != "country":
            raise ValueError("Only country components are supported")
        params["components"] = convert.components(components)
    if strict_bounds:
        params["strictbounds"] = "true"

    url = "/maps/api/place/%sautocomplete/json" % url_part
    return client._request(url, params).get("predictions", [])
1188916
def _compile_batch_fluents(self,
            fluents: List[Tuple[str, TensorFluent]],
            batch_size: int) -> Sequence[tf.Tensor]:
        '''
        '''
        batch_fluents = []
        with self.graph.as_default():
            for name, fluent in fluents:
                name_scope = utils.identifier(name)
                with tf.name_scope(name_scope):
                    t = tf.stack([fluent.tensor] * batch_size)
                batch_fluents.append(t)
        return tuple(batch_fluents)
843390
def _fluent_range_type(cls, fluents, ordering) -> Sequence[str]:
        '''
        '''
        range_types = []
        for name in ordering:
            fluent = fluents[name]
            range_type = fluent.range
            range_types.append(range_type)
        return tuple(range_types)
1291072
def state_fluent_variables(self) -> FluentParamsList:
        '''
        '''
        fluents = self.domain.state_fluents
        ordering = self.domain.state_fluent_ordering
        return self._fluent_params(fluents, ordering)