TEAL interface for the `acscteforwardmodel` function.
348529
def run(configobj=None):
    
    acscteforwardmodel(configobj['input'],
                       exec_path=configobj['exec_path'],
                       time_stamps=configobj['time_stamps'],
                       verbose=configobj['verbose'],
                       quiet=configobj['quiet'],
                       single_core=configobj['single_core']
                       )
582323
def main():
    """"""
    import argparse

    parser = argparse.ArgumentParser(
        prog=__taskname__,
        description='Remove horizontal stripes from ACS WFC post-SM4 data.')
    parser.add_argument(
        'arg0', metavar='input', type=str, help='Input file')
    parser.add_argument(
        'arg1', metavar='suffix', type=str, help='Output suffix')
    parser.add_argument(
        'maxiter', nargs='?', type=int, default=15, help='Max #iterations')
    parser.add_argument(
        'sigrej', nargs='?', type=float, default=2.0, help='Rejection sigma')
    parser.add_argument(
        '--stat', type=str, default='pmode1', help='Background statistics')
    parser.add_argument(
        '--lower', nargs='?', type=float, default=None,
        help='Lower limit for "good" pixels.')
    parser.add_argument(
        '--upper', nargs='?', type=float, default=None,
        help='Upper limit for "good" pixels.')
    parser.add_argument(
        '--binwidth', type=float, default=0.1,
        help='Bin width for distribution sampling.')
    parser.add_argument(
        '--mask1', nargs=1, type=str, default=None,
        help='Mask image for [SCI,1]')
    parser.add_argument(
        '--mask2', nargs=1, type=str, default=None,
        help='Mask image for [SCI,2]')
    parser.add_argument(
        '--dqbits', nargs='?', type=str, default=None,
        help='DQ bits to be considered "good".')
    parser.add_argument(
        '--rpt_clean', type=int, default=0,
        help='Number of *repeated* bias de-stripes to perform.')
    parser.add_argument(
        '--atol', nargs='?', type=float, default=0.01,
        help='Absolute tolerance to stop *repeated* bias de-stripes.')
    parser.add_argument(
        '-c', '--clobber', action="store_true", help='Clobber output')
    parser.add_argument(
        '-q', '--quiet', action='store_true',
        help='Do not print informational messages')
    parser.add_argument(
        '--version', action="version",
        version='{0} v{1} ({2})'.format(__taskname__, __version__, __vdate__))
    args = parser.parse_args()

    if args.mask1:
        mask1 = args.mask1[0]
    else:
        mask1 = args.mask1

    if args.mask2:
        mask2 = args.mask2[0]
    else:
        mask2 = args.mask2

    clean(args.arg0, args.arg1, stat=args.stat, maxiter=args.maxiter,
          sigrej=args.sigrej, lower=args.lower, upper=args.upper,
          binwidth=args.binwidth, mask1=mask1, mask2=mask2, dqbits=args.dqbits,
          rpt_clean=args.rpt_clean, atol=args.atol,
          clobber=args.clobber, verbose=not args.quiet)
1222852
def ucamel_method(func):
    
    frame_locals = inspect.currentframe().f_back.f_locals
    frame_locals[snake2ucamel(func.__name__)] = func
    return func
178188
def forward(node, analysis):
  """"""
  if not isinstance(analysis, Forward):
    raise TypeError('not a valid forward analysis object')
  for succ in gast.walk(node):
    if isinstance(succ, gast.FunctionDef):
      cfg_obj = CFG.build_cfg(succ)
      analysis.visit(cfg_obj.entry)
  return node
1033768
def menu_for(parent, abstract_model = nil, object = nil, only_icon = false) # perf matters here (no action view trickery)
      actions = actions(parent, abstract_model, object).select { |a| a.http_methods.include?(:get) }
      actions.collect do |action|
        wording = wording_for(:menu, action)
        %(
          <li title="#{wording if only_icon}" rel="#{'tooltip' if only_icon}" class="icon #{action.key}_#{parent}_link #{'active' if current_action?(action)}">
            <a class="#{action.pjax? ? 'pjax' : ''}" href="#{rails_admin.url_for(action: action.action_name, controller: 'rails_admin/main', model_name: abstract_model.try(:to_param), id: (object.try(:persisted?) && object.try(:id) || nil))}">
              <i class="#{action.link_icon}"></i>
              <span#{only_icon ? " style='display:none'" : ''}>#{wording}</span>
            </a>
          </li>
        )
      end.join.html_safe
    end
979994
public static int cudnnActivationBackward(
        cudnnHandle handle, 
        cudnnActivationDescriptor activationDesc, 
        Pointer alpha, 
        cudnnTensorDescriptor yDesc, 
        Pointer y, 
        cudnnTensorDescriptor dyDesc, 
        Pointer dy, 
        cudnnTensorDescriptor xDesc, 
        Pointer x, 
        Pointer beta, 
        cudnnTensorDescriptor dxDesc, 
        Pointer dx)
    {
        return checkResult(cudnnActivationBackwardNative(handle, activationDesc, alpha, yDesc, y, dyDesc, dy, xDesc, x, beta, dxDesc, dx));
    }
1244611
@Override
	public double getForward(AnalyticModelInterface model, double fixingTime, double paymentOffset)
	{
		if(model == null) {
			throw new IllegalArgumentException(this.getName() + ": model==null");
		}
		DiscountCurveInterface referenceDiscountCurveForForwards = model.getDiscountCurve(referenceDiscountCurveForForwardsName); // do not use discountCurveName here (usually this is an OIS curve)
		if(referenceDiscountCurveForForwards == null) {
			throw new IllegalArgumentException(this.getName() + ": referenceDiscountCurveForForwards " + referenceDiscountCurveForForwardsName + " not found in the model:\n" + model.toString());
		}
		if(Double.isNaN(paymentOffset) || paymentOffset<=0.0) {
			throw new IllegalArgumentException(this.getName() + ": Requesting forward with paymentOffset " + paymentOffset + " not allowed.");
		}

		double daycount = paymentOffset * daycountScaling;
		return (referenceDiscountCurveForForwards.getDiscountFactor(model, fixingTime+periodOffset) / referenceDiscountCurveForForwards.getDiscountFactor(model, fixingTime+paymentOffset+periodOffset) - 1.0) / daycount;
	}
897808
function nsModelCallHelper(updateTree, modelName, methodName, p1, p2, p3, p4, p5) {
        var tree = yr.nodeset2data(updateTree);
        /** @type ns.View */
        var view = tree.bosphorus;

        var model = view.getModel(modelName);
        if (!model) {
            throw new Error('[ns-bosphorus] ' +
                'Model "' + modelName + '" in not defined for View "' + [view.id, view.key].join('#') + '"'
            );
        }

        var result = model[methodName](p1, p2, p3, p4, p5);
        return result2nodeset(result);
    }
1189229
private void forward(TrellisNode[][] trellis, double[] scaling) {
        int n = trellis.length; // length of sequence

        TrellisNode[] t0 = trellis[0];
        for (int i = 0; i < numClasses; i++) {
            TrellisNode t0i = t0[i];
            TreePotentialFunction pi = potentials[i];
            if (numFeatures <= 0) {
                for (int k = t0i.age; k < pi.trees.size(); k++) {
                    t0i.scores[0] += pi.eta * pi.trees.get(k).predict(t0i.samples[0]);
                }
            } else {
                for (int k = t0i.age; k < pi.trees.size(); k++) {
                    t0i.scores[0] += pi.eta * pi.trees.get(k).predict(t0i.sparseSamples[0]);
                }                
            }

            t0i.expScores[0] = Math.exp(t0i.scores[0]);
            t0i.alpha = t0i.expScores[0];
            t0i.age = pi.trees.size();
        }

        // Normalize alpha values since they increase quickly
        scaling[0] = 0.0;
        for (int i = 0; i < numClasses; i++) {
            scaling[0] += t0[i].alpha;
        }
        for (int i = 0; i < numClasses; i++) {
            t0[i].alpha /= scaling[0];
        }

        for (int t = 1; t < n; t++) {
            TrellisNode[] tt = trellis[t];
            TrellisNode[] tt1 = trellis[t-1];
            for (int i = 0; i < numClasses; i++) {
                TrellisNode tti = tt[i];
                TreePotentialFunction pi = potentials[i];
                tti.alpha = 0.0;
                for (int j = 0; j < numClasses; j++) {
                    if (numFeatures <= 0) {
                        for (int k = tti.age; k < pi.trees.size(); k++) {
                            tti.scores[j] += pi.eta * pi.trees.get(k).predict(tti.samples[j]);
                        }
                    } else {
                        for (int k = tti.age; k < pi.trees.size(); k++) {
                            tti.scores[j] += pi.eta * pi.trees.get(k).predict(tti.sparseSamples[j]);
                        }
                    }

                    tti.expScores[j] = Math.exp(tti.scores[j]);
                    tti.alpha += tti.expScores[j] * tt1[j].alpha;
                }
                tti.age = pi.trees.size();
            }

            // Normalize alpha values since they increase quickly
            scaling[t] = 0.0;
            for (int i = 0; i < numClasses; i++) {
                scaling[t] += tt[i].alpha;
            }
            for (int i = 0; i < numClasses; i++) {
                tt[i].alpha /= scaling[t];
            }
        }
    }
581112
function (value) {
            var report = new ariaWidgetsControllersReportsDropDownControllerReport();
            var dataModel = this._dataModel;
            if (value === null) {
                report.ok = true;
                dataModel.value = null;
                dataModel.text = '';
            } else {
                if (!ariaUtilsJson.equals(value, dataModel.value)) {
                    // Only update the data-model if there has been a change, otherwise onchange is raised
                    ariaUtilsJson.setValue(dataModel, 'selectedValues', value);
                    dataModel.value = value;

                } else {
                    if (!ariaUtilsJson.equals(dataModel.selectedValues, dataModel.value)) {
                        // Only update the data-model if there has been a change, otherwise onchange is raised
                        value = dataModel.selectedValues;
                        dataModel.value = value;
                    }
                }
                report.ok = true;
                var text = this._getDisplayValue(value);
                dataModel.text = text;
            }
            if (report.ok) {
                report.text = dataModel.text;
                report.value = this._getValue(dataModel.text, dataModel.value);
            }
            return report;
        }
920076
public static int cudnnSoftmaxForward(
        cudnnHandle handle, 
        int algo, 
        int mode, 
        Pointer alpha, 
        cudnnTensorDescriptor xDesc, 
        Pointer x, 
        Pointer beta, 
        cudnnTensorDescriptor yDesc, 
        Pointer y)
    {
        return checkResult(cudnnSoftmaxForwardNative(handle, algo, mode, alpha, xDesc, x, beta, yDesc, y));
    }
341199
def hybrid_forward(self, F, data, gamma, beta):
        """"""
        # TODO(haibin): LayerNorm does not support fp16 safe reduction. Issue is tracked at:
        # https://github.com/apache/incubator-mxnet/issues/14073
        if self._dtype:
            data = data.astype('float32')
            gamma = gamma.astype('float32')
            beta = beta.astype('float32')
        norm_data = F.LayerNorm(data, gamma=gamma, beta=beta, axis=self._axis, eps=self._epsilon)
        if self._dtype:
            norm_data = norm_data.astype(self._dtype)
        return norm_data
1273067
function UMLSwimlaneView() {
        NodeView.apply(this, arguments);

        /** @member {Boolean} */
        this.isVertical = true;

        /** @member {LabelView} */
        this.nameLabel = new LabelView();
        this.nameLabel.horizontalAlignment = Graphics.AL_CENTER;
        this.nameLabel.verticalAlignment = Graphics.AL_TOP;
        this.nameLabel.selectable = Core.SK_NO;
        this.nameLabel.parentStyle = true;
        this.addSubView(this.nameLabel);
    }
223631
private void parseForwardStep() throws TTXPathException {

        AbsAxis axis;
        AbsFilter filter;
        if (isForwardAxis()) {
            axis = parseForwardAxis();
            filter = parseNodeTest(axis.getClass() == AttributeAxis.class);

            mPipeBuilder.addStep(axis, filter);
        } else {
            axis = parseAbbrevForwardStep();

            mPipeBuilder.addStep(axis);
        }
    }
1357768
function UMLArtifactInstanceView() {
        UMLGeneralNodeView.apply(this, arguments);
        this.iconRatio = ARTIFACT_RATIO_PERCENT;
        this.containerChangeable = true;
        // mixin UMLArtifactViewMixin
        _.extend(UMLArtifactInstanceView.prototype, UMLArtifactViewMixin);

        this.fillColor = PreferenceManager.get("uml.artifactinstance.fillColor", "#ffffff") || PreferenceManager.get("view.fillColor", "#ffffff");
        this.stereotypeDisplay = PreferenceManager.get("uml.artifact.stereotypeDisplay", UML.SD_ICON);
    }
408852
public void computeDescriptor( int cx , int cy , TupleDesc_F64 desc  ) {

		desc.fill(0);

		int widthPixels = widthSubregion*widthGrid;
		int radius = widthPixels/2;

		for (int i = 0; i < widthPixels; i++) {
			int angleIndex = (cy-radius+i)*savedAngle.width + (cx-radius);

			float subY = i/(float)widthSubregion;

			for (int j = 0; j < widthPixels; j++, angleIndex++ ) {
				float subX = j/(float)widthSubregion;

				double angle = savedAngle.data[angleIndex];

				float weightGaussian = gaussianWeight[i*widthPixels+j];
				float weightGradient = savedMagnitude.data[angleIndex];

				// trilinear interpolation intro descriptor
				trilinearInterpolation(weightGaussian*weightGradient,subX,subY,angle,desc);
			}
		}

		normalizeDescriptor(desc,maxDescriptorElementValue);
	}
737714
function ( oSettings, fnCallbackDraw )
			{
				if ( !oSettings.aanFeatures.p )
				{
					return;
				}
				
				var oClasses = oSettings.oClasses;
				var an = oSettings.aanFeatures.p;
	
				/* Loop over each instance of the pager */
				for ( var i=0, iLen=an.length ; i<iLen ; i++ )
				{
					if ( an[i].childNodes.length !== 0 )
					{
						an[i].childNodes[0].className = ( oSettings._iDisplayStart === 0 ) ? 
							oClasses.sPagePrevDisabled : oClasses.sPagePrevEnabled;
						
						an[i].childNodes[1].className = ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() ) ? 
							oClasses.sPageNextDisabled : oClasses.sPageNextEnabled;
					}
				}
			}