results in an OmapiMessage
544857
def parse_message(self):
		""""""
		parser = parse_chain(self.parse_net32int,  # authid
							lambda *_: self.parse_net32int(),  # authlen
							lambda *_: self.parse_net32int(),  # opcode
							lambda *_: self.parse_net32int(),  # handle
							lambda *_: self.parse_net32int(),  # tid
							lambda *_: self.parse_net32int(),  # rid
							lambda *_: self.parse_bindict(),  # message
							lambda *_: self.parse_bindict(),  # object
							lambda *args: self.parse_fixedbuffer(args[1]))  # signature
		return parse_map(lambda args:  # skip authlen in args:
				OmapiMessage(*(args[0:1] + args[2:])), parser)
779968
public boolean isAnomaly(Instance instance,
			double uniVariateAnomalyProbabilityThreshold,
			double multiVariateAnomalyProbabilityThreshold,
			int numberOfInstanceesForAnomaly) {
		//AMRUles is equipped with anomaly detection. If on, compute the anomaly value.
		long perceptronIntancesSeen=this.perceptron.getInstancesSeen();
		if ( perceptronIntancesSeen>= numberOfInstanceesForAnomaly) {
			double attribSum;
			double attribSquaredSum;
			double D = 0.0;
			double N = 0.0;
			double anomaly;

			for (int x = 0; x < instance.numAttributes() - 1; x++) {
				// Perceptron is initialized each rule.
				// this is a local anomaly.
				int instAttIndex = modelAttIndexToInstanceAttIndex(x, instance);
				attribSum = this.perceptron.perceptronattributeStatistics.getValue(x);
				attribSquaredSum = this.perceptron.squaredperceptronattributeStatistics.getValue(x);
				double mean = attribSum / perceptronIntancesSeen;
				double sd = computeSD(attribSquaredSum, attribSum, perceptronIntancesSeen);
				double probability = computeProbability(mean, sd, instance.value(instAttIndex));

				if (probability > 0.0) {
					D = D + Math.abs(Math.log(probability));
					if (probability < uniVariateAnomalyProbabilityThreshold) {//0.10
						N = N + Math.abs(Math.log(probability));
					}
				} 
			}

			anomaly = 0.0;
			if (D != 0.0) {
				anomaly = N / D;
			}
			if (anomaly >= multiVariateAnomalyProbabilityThreshold) {
				//debuganomaly(instance,
				//		uniVariateAnomalyProbabilityThreshold,
				//		multiVariateAnomalyProbabilityThreshold,
				//		anomaly);
				return true;
			}
		}
		return false;
	}
376658
function adjustTarget(oMessage) {
					if (oMessage.target) {
						var aSegments = oMessage.target.split("/");

						if (aSegments.shift() === sBindingParameter) {
							oMessage.target = aSegments.join("/");
							return;
						}
					}
					delete oMessage.target;
				}
177610
@Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        try {
            int mode = MeasureSpec.getMode(heightMeasureSpec);

            if (mode == MeasureSpec.UNSPECIFIED || mode == MeasureSpec.AT_MOST) {
                super.onMeasure(widthMeasureSpec, heightMeasureSpec);
                int height = 0;
                for (int i = 0; i < getChildCount(); i++) {
                    View child = getChildAt(i);
                    if (child != null) {
                        child.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
                        int h = child.getMeasuredHeight();
                        if (h > height) {
                            height = h;
                        }
                    }
                }
                heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
            }

            super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        } catch (RuntimeException e) {
            Log.e(TAG, "Exception during WrapContentViewPager onMeasure " + e.toString());
        }
    }
907427
function(oRm, oMessageNotifier, oNotiBar) {
			if (oMessageNotifier.hasItems()) {
				var aMessages = oMessageNotifier.getMessages();
				var lastItem = aMessages[aMessages.length - 1];

				var oMA = oMessageNotifier._oMessageArea;
				// this ensures that this message is selectable from the bar
				oMA._message = lastItem;
				var sId = oNotiBar.getId() + "-inplaceMessage-" + oMA._message.getId();

				oRm.write("<li");
				oRm.writeAttribute("id", sId);
				oRm.addClass("sapUiInPlaceMessage");
				oRm.writeClasses();

				if (oNotiBar._gapMessageArea) {
					var sMargin = oNotiBar._gapMessageArea + "px";
					oRm.addStyle("margin-left", sMargin);
					oRm.writeStyles();
				}
				oRm.write(">");

				// oRm.renderControl(oMA);
				if (lastItem.getText() != "") {
					oRm.write("<div");
					oRm.writeControlData(oMA);
					// enable inplace message for item navigation
					oRm.writeAttribute("tabindex", "-1");
					oRm.addClass("sapUiNotifierMessageText");
					oRm.addClass("sapUiInPlaceMessage");
					// if the latest message is read-only don't provide a visual selectable link
					if (oMessageNotifier._bEnableMessageSelect && !oMA._message.getReadOnly()) {
						// if there is an event handler show the inplace message
						// clickable
						oRm.addClass("sapUiInPlaceMessageSelectable");
					}
					oRm.writeClasses();
					oRm.write(">");
					oRm.writeEscaped(lastItem.getText());
					oRm.write("</div>"); // Text
				}

				if (lastItem.getTimestamp() != "") {
					oRm.write("<div");
					oRm.addClass("sapUiNotifierMessageTimestamp");
					oRm.addClass("sapUiInPlaceMessage");
					oRm.writeClasses();
					oRm.write(">");
					oRm.writeEscaped(lastItem.getTimestamp());
					oRm.write("</div>"); // Timestamp
				}

				oRm.write("</li>");
			}
		}
427502
function processMultiBytePacket (o) {
  if (o.multiPacketBuffer) {
    o.multiPacketBuffer = Buffer.concat([Buffer.from(o.multiPacketBuffer), Buffer.from(o.rawDataPacket.slice(k.OBCIGanglionPacket19Bit.dataStart, k.OBCIGanglionPacket19Bit.dataStop))]);
  } else {
    o.multiPacketBuffer = o.rawDataPacket.slice(k.OBCIGanglionPacket19Bit.dataStart, k.OBCIGanglionPacket19Bit.dataStop);
  }
}
1214242
def warning(self):
        
        signals, docs, overs = self.expandedStim()
        if np.any(np.array(overs) > 0):
            msg = 'Stimuli in this test are over the maximum allowable \
                voltage output. They will be rescaled with a maximum \
                undesired attenuation of {:.2f}dB.'.format(np.amax(overs))
            return msg
        return 0
1205820
function checkResponse(err, data, response) {
		var results, accessToken, accessSecret;

		if (err) {
			return callback(err);
		}

		// Check if we got a for url encoded response
		if (/oauth_token/.test(data)) {
			results = require('querystring').parse(data);
			accessToken= results['oauth_token'];
			accessSecret = results['oauth_token_secret'];

			delete results['oauth_token'];
			delete results['oauth_token_secret'];

			return callback(null, accessToken, accessSecret);
		}

		// We didn't so parse the body as an XML response
		responseParser.parse(data,
			{ format: this.format, logger: this.logger }, getTokens);
		function getTokens(err, tokenResponse) {
			var accessToken, accessSecret;

			if (err) {
				return callback(err);
			}

			accessToken = tokenResponse.oauth_access_token.oauth_token;
			accessSecret = tokenResponse.oauth_access_token.oauth_token_secret;

			return callback(null, accessToken, accessSecret);
		}
   }
185907
@Override
    protected void checkIncomingMessageLimit(long addition) throws MessageTooLargeException {
        super.addToIncomingMsgSize(addition);
        // check if we even need to bother comparing sizes against limits
        if (HttpConfigConstants.UNLIMITED == getHttpConfig().getMessageSizeLimit()) {
            return;
        }
        if (queryIncomingMsgSize() > getHttpConfig().getMessageSizeLimit()) {
            // over channel limit, see if the factory has a system wide "large" limit
            HttpInboundChannelFactory factory = this.myLink.getChannel().getFactory();
            if (factory.getConfig().areMessagesLimited() && factory.allowLargeMessage(queryIncomingMsgSize())) {
                this.bContainsLargeMessage = true;
            } else {
                throw new MessageTooLargeException("Size=" + queryIncomingMsgSize());
            }
        }
    }
284425
def _mdens(self,m):
        """"""
        return (self.a/m)**self.alpha/(1.+m/self.a)**(self.betaminusalpha)
154987
function( result, message ) {
            message = message || ( result ? "okay" : "failed, expected argument to be truthy, was: " +
            QUnit.dump.parse( result ) );
            if ( !!result ) {
                this.push( true, result, true, message );
            } else {
                this.test.pushFailure( message, null, result );
            }
        }
297390
function (optMsg) {
                var msg = "Forced Failure";
                if (optMsg) {
                    msg += " (" + optMsg + ")";
                }

                this.raiseFailure(msg);

                // raise an exception to stop subsequent assertions
                throw {
                    name : this.ASSERT_FAILURE,
                    message : msg
                };
            }
1010372
void notifyOmemoMessageReceived(Stanza stanza, OmemoMessage.Received decryptedMessage) {
        for (OmemoMessageListener l : omemoMessageListeners) {
            l.onOmemoMessageReceived(stanza, decryptedMessage);
        }
    }
867005
private void logAuditEntriesBeforeAuthn(WebReply webReply, Subject receivedSubject, String uriName, WebRequest webRequest) {
        AuthenticationResult authResult;
        if (webReply instanceof PermitReply) {
            authResult = new AuthenticationResult(AuthResult.SUCCESS, receivedSubject, null, null, AuditEvent.OUTCOME_SUCCESS);
        } else {
            authResult = new AuthenticationResult(AuthResult.FAILURE, receivedSubject, null, null, AuditEvent.OUTCOME_FAILURE);
        }
        int statusCode = Integer.valueOf(webReply.getStatusCode());
        Audit.audit(Audit.EventID.SECURITY_AUTHN_01, webRequest, authResult, statusCode);
        Audit.audit(Audit.EventID.SECURITY_AUTHZ_01, webRequest, authResult, uriName, statusCode);
    }
1099449
def _assert_occurrence(probe, target, amount=1):
    '''
    
    '''
    occ = len(probe)
    if occ > amount:
        msg = 'more than'
    elif occ < amount:
        msg = 'less than'
    elif not occ:
        msg = 'no'
    else:
        msg = None

    if msg:
        raise CommandExecutionError('Found {0} expected occurrences in "{1}" expression'.format(msg, target))

    return occ
1323312
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    super.onMeasure(widthMeasureSpec, heightMeasureSpec);

    int viewWidth = circleRadius + this.getPaddingLeft() + this.getPaddingRight();
    int viewHeight = circleRadius + this.getPaddingTop() + this.getPaddingBottom();

    int widthMode = MeasureSpec.getMode(widthMeasureSpec);
    int widthSize = MeasureSpec.getSize(widthMeasureSpec);
    int heightMode = MeasureSpec.getMode(heightMeasureSpec);
    int heightSize = MeasureSpec.getSize(heightMeasureSpec);

    int width;
    int height;

    //Measure Width
    if (widthMode == MeasureSpec.EXACTLY) {
      //Must be this size
      width = widthSize;
    } else if (widthMode == MeasureSpec.AT_MOST) {
      //Can't be bigger than...
      width = Math.min(viewWidth, widthSize);
    } else {
      //Be whatever you want
      width = viewWidth;
    }

    //Measure Height
    if (heightMode == MeasureSpec.EXACTLY || widthMode == MeasureSpec.EXACTLY) {
      //Must be this size
      height = heightSize;
    } else if (heightMode == MeasureSpec.AT_MOST) {
      //Can't be bigger than...
      height = Math.min(viewHeight, heightSize);
    } else {
      //Be whatever you want
      height = viewHeight;
    }

    setMeasuredDimension(width, height);
  }
489932
function addMessage(oMessage) {
			var oReportMessage = {
					code : oMessage.code,
					message : oMessage.message,
					technical : oMessage.technical
				};

			Object.keys(oMessage).forEach(function (sProperty) {
				if (sProperty[0] === '@') {
					if (sProperty.endsWith(".numericSeverity")) {
						oReportMessage.numericSeverity = oMessage[sProperty];
					} else if (sProperty.endsWith(".longtextUrl") && oError.requestUrl
							&& sResourcePath) {
						oReportMessage.longtextUrl =
							_Helper.makeAbsolute(oMessage[sProperty], oError.requestUrl);
					}
				}
			});

			if (typeof oMessage.target !== "string") {
				aUnboundMessages.push(oReportMessage);
			} else if (oMessage.target[0] === "$" || !sResourcePath) {
				// target for the bound message cannot be resolved -> report as unbound message
				oReportMessage.message = oMessage.target + ": " + oReportMessage.message;
				aUnboundMessages.push(oReportMessage);
			} else {
				oReportMessage.target = oMessage.target;
				oReportMessage.transition = true;
				aBoundMessages.push(oReportMessage);
			}
		}