Method to get current optimizer's parameter value
349169
def get_param(self):
        
        cycle_progress = self.event_index / self.cycle_size
        return self.start_value + ((self.end_value - self.start_value) / 2) * (1 - math.cos(math.pi * cycle_progress))
175085
static TraceParams fromTraceConfigProto(
      TraceConfig traceConfigProto, TraceParams currentTraceParams) {
    TraceParams.Builder builder = currentTraceParams.toBuilder();
    if (traceConfigProto.hasConstantSampler()) {
      ConstantSampler constantSampler = traceConfigProto.getConstantSampler();
      ConstantDecision decision = constantSampler.getDecision();
      if (ConstantDecision.ALWAYS_ON.equals(decision)) {
        builder.setSampler(Samplers.alwaysSample());
      } else if (ConstantDecision.ALWAYS_OFF.equals(decision)) {
        builder.setSampler(Samplers.neverSample());
      } // else if (ConstantDecision.ALWAYS_PARENT.equals(decision)) {
      // For ALWAYS_PARENT, don't need to update configs since in Java by default parent sampling
      // decision always takes precedence.
      // }
    } else if (traceConfigProto.hasProbabilitySampler()) {
      builder.setSampler(
          Samplers.probabilitySampler(
              traceConfigProto.getProbabilitySampler().getSamplingProbability()));
    } // TODO: add support for RateLimitingSampler.
    return builder.build();
  }
344662
private String getParameter(String paramKey, String defaultValue) {
        String paramValue = defaultValue;
        if (StringUtils.isNotBlank(paramKey) && args != null && args.length > 0) {
            for (String arg : args) {
                String[] parameter = arg.split("=");
                if (parameter != null && parameter.length == 2 && paramKey.equals(parameter[0])) {
                    paramValue = parameter[1];
                    break;
                }
            }
        }
        return paramValue;
    }
1095745
private List<StackManipulation> argumentValuesOf(MethodDescription instrumentedMethod) {
        TypeList.Generic parameterTypes = instrumentedMethod.getParameters().asTypeList();
        List<StackManipulation> instruction = new ArrayList<StackManipulation>(parameterTypes.size());
        int currentIndex = 1;
        for (TypeDescription.Generic parameterType : parameterTypes) {
            instruction.add(new StackManipulation.Compound(
                    MethodVariableAccess.of(parameterType).loadFrom(currentIndex),
                    assigner.assign(parameterType, TypeDescription.Generic.OBJECT, Assigner.Typing.STATIC)));
            currentIndex += parameterType.getStackSize().getSize();
        }
        return instruction;
    }
1091921
def _update_param(self):
        

        """

        # Update the gamma parameter.
        if not isinstance(self._gamma_update, type(None)):
            self._gamma = self._gamma_update(self._gamma)

        # Update lambda parameter.
        if not isinstance(self._lambda_update, type(None)):
            self._lambda_param = self._lambda_update(self._lambda_param)
443843
def get_default_val(self):
        """"""
        val = self.default
        while callable(val):
            val = val()
        return val
1043819
def get_param_arg(param, idx, klass, arg, attr='id'):
    """"""
    if isinstance(arg, klass):
        return getattr(arg, attr)
    elif isinstance(arg, (int, str)):
        return arg
    else:
        raise TypeError(
            "%s[%d] must be int, str, or %s, not %s" % (
                param, idx, klass.__name__, type(arg).__name__))
232051
def get_ext_param(self, ext_key, param_key):
        '''
        
        '''
        return self.extensions[ext_key][param_key] if self.extensions[ext_key]\
                else None
637957
public OptimizationResult getCalibration() throws SolverException {

		Optimizer.ObjectiveFunction objectiveFunction = new Optimizer.ObjectiveFunction() {
			@Override
			public void setValues(double[] parameters, double[] values) {

				//We change the parameters of the model
				CalibratableProcess newModel = model.getCloneForModifiedParameters(parameters);
				CharacteristicFunctionModel newModelFourier = newModel.getCharacteristicFunctionModel();

				int numberOfMaturities = surface.getMaturities().length;
				double mats[] = surface.getMaturities();

				QuotingConvention targetConvention = surface.getQuotingConvention();

				ArrayList<Double> vals = new ArrayList<Double>();

				for(int t = 0; t<numberOfMaturities; t++) {

					double[] currentStrikes = surface.getSmile(mats[t]).getStrikes();

					EuropeanOptionSmile newPricer = pricer.getCloneWithModifiedParameters(mats[t],currentStrikes);

					try {
						Map<String, Function<Double, Double>> currentModelPrices = newPricer.getValue(0.0, newModelFourier);

						for(int i = 0; i<currentStrikes.length;i++) {

							if(targetConvention.equals(QuotingConvention.VOLATILITYLOGNORMAL)) {
								//we convert prices into lognormal volatilities
								double forward = surface.getEquityForwardCurve().getDiscountFactor(mats[t]);
								double optionMaturity =mats[t];
								double optionStrike = currentStrikes[i];
								double payoffUnit = surface.getDiscountCurve().getDiscountFactor(mats[t]);
								double optionValue = currentModelPrices.get("valuePerStrike").apply(optionStrike);
								vals.add(net.finmath.functions.AnalyticFormulas.blackScholesOptionImpliedVolatility(forward, optionMaturity, optionStrike, payoffUnit, optionValue));


							}else if(targetConvention.equals(QuotingConvention.VOLATILITYNORMAL)) {
								//we convert prices into normal volatilities
								double forward = surface.getEquityForwardCurve().getDiscountFactor(mats[t]);
								double optionMaturity =mats[t];
								double optionStrike = currentStrikes[i];
								double payoffUnit = surface.getDiscountCurve().getDiscountFactor(mats[t]);
								double optionValue = currentModelPrices.get("valuePerStrike").apply(optionStrike);
								vals.add(net.finmath.functions.AnalyticFormulas.bachelierOptionImpliedVolatility(forward, optionMaturity, optionStrike, payoffUnit, optionValue));
							}else {
								//just output the prices
								vals.add(currentModelPrices.get("valuePerStrike").apply(currentStrikes[i]));
							}

						}
					} catch (CalculationException e) {
						e.printStackTrace();
					}

				}
				for(int i = 0; i<values.length; i++) {values[i] = vals.get(i);}
			}
		};

		Optimizer optimizer = optimizerFactory.getOptimizer(
				objectiveFunction,
				initialParameters,
				lowerBound,
				upperBound,
				parameterStep,
				formatTargetValuesForOptimizer() /* targetValues */);


		optimizer.run();

		ArrayList<String> calibrationOutput = outputCalibrationResult(optimizer.getBestFitParameters());

		CalibratableProcess calibratedModel = model.getCloneForModifiedParameters(optimizer.getBestFitParameters());

		return new OptimizationResult(calibratedModel,optimizer.getBestFitParameters(),optimizer.getIterations(),optimizer.getRootMeanSquaredError(),calibrationOutput);
	}
232263
def get_parameters(self):
        """"""
        parameter_names = self.PARAMETERS.keys()
        # TODO: Unresolved reference for processor
        parameter_values = [getattr(processor, n) for n in parameter_names]
        return dict(zip(parameter_names, parameter_values))
423710
def getParameterValue(self, parameterName):
        
        if  self._results is None:
            self.__init()
        parameter = self._results[parameterName]
        return parameter
441525
def _get_parameter(self, name, eopatch):
        
        if hasattr(self, name) and getattr(self, name) is not None:
            return getattr(self, name)
        if name == 'bbox' and eopatch.bbox:
            return eopatch.bbox
        if name in eopatch.meta_info:
            return eopatch.meta_info[name]
        if name == 'maxcc':
            return 1.0
        if name == 'time_difference':
            return dt.timedelta(seconds=-1)
        if name in ('size_x', 'size_y'):
            return None

        raise ValueError('Parameter {} was neither defined in initialization of {} nor is contained in '
                         'EOPatch'.format(name, self.__class__.__name__))
935612
@Override
    public Object getParameterType(String name) {
        if ("maxIterations".equals(name)) return Integer.MAX_VALUE;
        if ("lpeChecker".equals(name)) return Boolean.TRUE;
        if ("maxResonStruc".equals(name)) return Integer.MAX_VALUE;
        return null;
    }
148515
def find_parameter():
    """"""
    p1 = mdb.get_parameter('/YSS/SIMULATOR/BatteryVoltage2')
    print('Via qualified name:', p1)

    p2 = mdb.get_parameter('MDB:OPS Name/SIMULATOR_BatteryVoltage2')
    print('Via domain-specific alias:', p2)
1247754
def current_iteration(self):
        
        out_cur_iter = ctypes.c_int(0)
        _safe_call(_LIB.LGBM_BoosterGetCurrentIteration(
            self.handle,
            ctypes.byref(out_cur_iter)))
        return out_cur_iter.value
508224
def value_parameters(self):
        
        return it.chain(self.value_backbone.parameters(), self.critic_head.parameters())
1316416
def get_parameter(self, parameter):
        ""
        parameter = self._get_parameter_name(parameter)
        return self._parameters[parameter]