language
stringclasses
2 values
func_code_string
stringlengths
63
466k
python
def remove_search_paths(self, path_type, paths, target_name=None, configuration_name=None): """ Removes the given search paths from the path_type section of the target on the configurations :param path_type: name of the path type to be removed the values from :param paths: A string or ar...
java
public void setWindowMillis(long windowMillis) { FailureInterpreter fi = getFailureInterpreter(); if (!(fi instanceof DefaultFailureInterpreter)) { throw new IllegalStateException("setWindowMillis() not supported: this CircuitBreaker's FailureInterpreter isn't a DefaultFailureInterpreter.");...
java
protected boolean fail(List<ValidationMessage> errors, IssueType type, int line, int col, String path, boolean thePass, String msg) { if (!thePass) { addValidationMessage(errors, type, line, col, path, msg, IssueSeverity.FATAL); } return thePass; }
java
public static JsonWebKey fromRSA(KeyPair keyPair) { RSAPrivateCrtKey privateKey = (RSAPrivateCrtKey) keyPair.getPrivate(); JsonWebKey key = null; if (privateKey != null) { key = new JsonWebKey().withKty(JsonWebKeyType.RSA).withN(toByteArray(privateKey.getModulus())) ...
python
def forward(self, X): """Forward function. :param X: The input (batch) of the model contains word sequences for lstm and features. :type X: For word sequences: a list of torch.Tensor pair (word sequence and word mask) of shape (batch_size, sequence_length). F...
python
def available_state_for_gene(self, gene: Gene, state: State) -> Tuple[State, ...]: """ Return the state reachable from a given state for a particular gene. """ result: List[State] = [] active_multiplex: Tuple[Multiplex] = gene.active_multiplex(state) transition: Transition = self.find_tr...
python
def get_geoip_dat (): """Find a GeoIP database, preferring city over country lookup.""" datafiles = ("GeoIPCity.dat", "GeoIP.dat") if os.name == 'nt': paths = (sys.exec_prefix, r"c:\geoip") else: paths = ("/usr/local/share/GeoIP", "/usr/share/GeoIP") for path in paths: for da...
java
public void setErrorMode(@NonNull ErrorMode errorMode) { this.errorMode = errorMode; errorTextView.setVisibility(errorMode == ErrorMode.WhenInvalid ? INVISIBLE : errorMode == ErrorMode.Always ? VISIBLE : GONE); }
java
public boolean hasChildNodes(int nodeHandle) { int identity = makeNodeIdentity(nodeHandle); int firstChild = _firstch(identity); return firstChild != DTM.NULL; }
python
def get_doctree(path, **kwargs): """ Obtain a Sphinx doctree from the RST file at ``path``. Performs no Releases-specific processing; this code would, ideally, be in Sphinx itself, but things there are pretty tightly coupled. So we wrote this. Any additional kwargs are passed unmodified into a...
java
public Number getPercentageWorkComplete() { Number pct = (Number) getCachedValue(AssignmentField.PERCENT_WORK_COMPLETE); if (pct == null) { Duration actualWork = getActualWork(); Duration work = getWork(); if (actualWork != null && work != null && work.getDuration() != 0)...
python
async def join( self, *, remote_addrs: Iterable[str], listen_addr: str = "0.0.0.0:2377", join_token: str, advertise_addr: str = None, data_path_addr: str = None ) -> bool: """ Join a swarm. Args: listen_addr ...
python
def _link_record(self): """ Checks restrictions for use of CNAME lookup and returns a tuple of the fully qualified record name to lookup and a boolean, if a CNAME lookup should be done or not. The fully qualified record name is empty if no record name is specified by this provide...
python
def replace_with_text_stream(stream_name): """Given a stream name, replace the target stream with a text-converted equivalent :param str stream_name: The name of a target stream, such as **stdout** or **stderr** :return: None """ new_stream = TEXT_STREAMS.get(stream_name) if new_stream is not N...
python
def _bytes_to_values(self, bs, width=None): """Convert a packed row of bytes into a row of values. Result will be a freshly allocated object, not shared with the argument. """ if self.bitdepth == 8: return bytearray(bs) if self.bitdepth == 16: ret...
java
@Override protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) { setTickColor(g); super.paintMajorTickForVertSlider(g, tickBounds, y); }
java
public static void updateSchema(SQLDatabase database, Migration migration, int version) throws SQLException { Misc.checkArgument(version > 0, "Schema version number must be positive"); // ensure foreign keys are enforced in the case that we are up to date and no migration happen data...
java
public V get (int key) { Record<V> rec = getImpl(key); return (rec == null) ? null : rec.value; }
python
def keywords(self): """ Returns a list of all keywords that this rule object has defined. A keyword is considered defined if the value it returns != None. """ defined_keywords = [ ('allowempty_map', 'allowempty_map'), ('assertion', 'assertion'), ...
python
def istextfile(fname, blocksize=512): """ Uses heuristics to guess whether the given file is text or binary, by reading a single block of bytes from the file. If more than 30% of the chars in the block are non-text, or there are NUL ('\x00') bytes in the block, assume this is a binary file. ...
java
public static CPInstance fetchByLtD_S_First(Date displayDate, int status, OrderByComparator<CPInstance> orderByComparator) { return getPersistence() .fetchByLtD_S_First(displayDate, status, orderByComparator); }
python
async def make_response(*args: Any) -> Response: """Create a response, a simple wrapper function. This is most useful when you want to alter a Response before returning it, for example .. code-block:: python response = make_response(render_template('index.html')) response.headers['X-H...
java
protected void config() { objectMapper.configure(com.fasterxml.jackson.core.JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true); objectMapper.configure(com.fasterxml.jackson.core.JsonParser.Feature.ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER, true); }
java
public static OffsetDateTime of(LocalDate date, LocalTime time, ZoneOffset offset) { LocalDateTime dt = LocalDateTime.of(date, time); return new OffsetDateTime(dt, offset); }
python
def density(G, t=None): r"""Return the density of a graph at timestamp t. The density for undirected graphs is .. math:: d = \frac{2m}{n(n-1)}, and for directed graphs is .. math:: d = \frac{m}{n(n-1)}, where `n` is the number of nodes and `m` is th...
python
def find_link(self, href_pattern, make_absolute=True): """ Find link in response body which href value matches ``href_pattern``. Returns found url or None. """ if make_absolute: self.tree.make_links_absolute(self.doc.url) if isinstance(href_pattern, six.tex...
python
def is_child(self, node): """Check if a node is a child of the current node Parameters ---------- node : instance of Node The potential child. Returns ------- child : bool Whether or not the node is a child. """ if node in...
python
def _binary_op(cls, x: 'TensorFluent', y: 'TensorFluent', op: Callable[[tf.Tensor, tf.Tensor], tf.Tensor], dtype: tf.DType) -> 'TensorFluent': '''Returns a TensorFluent for the binary `op` applied to fluents `x` and `y`. Args: x: The first ope...
java
private Order create( final String number, final String customerName, final LocalDate date, final String preferences, final ExecutionContext executionContext) { return executionContext.add(this, orders.create(number, customerName, date, preferences)); ...
python
def abs2rel_y(y, axis=None): r''' Transform absolute y-coordinates to relative y-coordinates. Relative coordinates correspond to a fraction of the relevant axis. Be sure to set the limits and scale before calling this function! :arguments: **y** (``float``, ``list``) Absolute coordinates. :options: **axis...
python
def fit_gaussian(x, y, yerr, p0): """ Fit a Gaussian to the data """ try: popt, pcov = curve_fit(gaussian, x, y, sigma=yerr, p0=p0, absolute_sigma=True) except RuntimeError: return [0],[0] return popt, pcov
python
def set_primary(self, **params): """https://developers.coinbase.com/api/v2#set-account-as-primary""" data = self.api_client.set_primary_account(self.id, **params) self.update(data) return data
java
public void setConnectTimeout(int millis) { ClientHttpRequestFactory f = getRequestFactory(); if (f instanceof SimpleClientHttpRequestFactory) { ((SimpleClientHttpRequestFactory) f).setConnectTimeout(millis); } else { ((HttpComponentsClientHttpRequestFactory) f).setConnectTimeout(millis); } }
python
def command_show(self): """ Show metadata """ self.parser = argparse.ArgumentParser( description="Show metadata of available objects") self.options_select() self.options_formatting() self.options_utils() self.options = self.parser.parse_args(self.arguments[2:]...
java
@SuppressWarnings({"WeakerAccess", "unused"}) public float getDocumentAspectRatio() { if (this.rootElement == null) throw new IllegalArgumentException("SVG document is empty"); Length w = this.rootElement.width; Length h = this.rootElement.height; // If width and hei...
python
def _reverse(self): """Reverse all bits in-place.""" # Reverse the contents of each byte n = [BYTE_REVERSAL_DICT[b] for b in self._datastore.rawbytes] # Then reverse the order of the bytes n.reverse() # The new offset is the number of bits that were unused at the end. ...
python
def traverse_preorder(self, leaves=True, internal=True): '''Perform a preorder traversal starting at this ``Node`` object Args: ``leaves`` (``bool``): ``True`` to include leaves, otherwise ``False`` ``internal`` (``bool``): ``True`` to include internal nodes, otherwise ``False`...
python
def cli(env, is_open): """List tickets.""" ticket_mgr = SoftLayer.TicketManager(env.client) table = formatting.Table([ 'id', 'assigned_user', 'title', 'last_edited', 'status', 'updates', 'priority' ]) tickets = ticket_mgr.list_tickets(open_status=is_open, closed_status=not is_open) for ...
java
public PersistenceUnitDefaults<PersistenceUnitMetadata<T>> getOrCreatePersistenceUnitDefaults() { Node node = childNode.getOrCreate("persistence-unit-defaults"); PersistenceUnitDefaults<PersistenceUnitMetadata<T>> persistenceUnitDefaults = new PersistenceUnitDefaultsImpl<PersistenceUnitMetadata<T>>(this,...
java
public static int getIntegerInitParameter(ExternalContext context, String[] names, int defaultValue) { if (names == null) { throw new NullPointerException(); } String param = null; for (String name : names) { if (name == null) ...
python
def query_parent_objects(self, context, query=None): """Return the objects of the same type from the parent object :param query: Catalog query to narrow down the objects :type query: dict :returns: Content objects of the same portal type in the parent """ # return the o...
java
@Override public void extractEphemeralTableQueries(List<StmtEphemeralTableScan> scans) { if (m_leftNode != null) { m_leftNode.extractEphemeralTableQueries(scans); } if (m_rightNode != null) { m_rightNode.extractEphemeralTableQueries(scans); } }
python
def getSimilarTermsForExpressions(self, body, contextId=None, posType=None, getFingerprint=None, startIndex=0, maxResults=10, sparsity=1.0): """Bulk get similar terms for input expressions Args: body, ExpressionOperation: The JSON encoded expression to be evaluated (required) con...
java
public NodeDefinitionData getChildNodeDefinition(InternalQName nodeName, InternalQName nodeType, InternalQName parentNodeType, InternalQName[] parentMixinTypes) throws RepositoryException { NodeDefinitionData[] defs = getAllChildNodeDefinitions(getNodeTypeNames(parentNodeType, parentMixinTypes)); ...
python
def email_quote_txt(text, indent_txt='>>', linebreak_input="\n", linebreak_output="\n"): """ Takes a text and returns it in a typical mail quoted format, e.g.:: C'est un lapin, lapin de bois. >>Quoi? Un cadeau. >>What? ...
python
def updates(self, id, update_id=None): # pylint: disable=invalid-name,redefined-builtin """Get updates of a running result via long-polling. If no updates are available, CDRouter waits up to 10 seconds before sending an empty response. :param id: Result ID as an int. :param update_id: (optiona...
java
public CassandraSink<IN> disableChaining() { if (useDataStreamSink) { getSinkTransformation().setChainingStrategy(ChainingStrategy.NEVER); } else { getStreamTransformation().setChainingStrategy(ChainingStrategy.NEVER); } return this; }
python
def do_sqlite_connect(dbapi_connection, connection_record): """Ensure SQLite checks foreign key constraints. For further details see "Foreign key support" sections on https://docs.sqlalchemy.org/en/latest/dialects/sqlite.html#foreign-key-support """ # Enable foreign key constraint checking curs...
java
protected void startCancellationExecutor() { this.cancellationExecutor.execute(new Runnable() { @Override public void run() { synchronized (AbstractJobLauncher.this.cancellationRequest) { try { while (!AbstractJobLauncher.this.cancellationRequested) { // Wait ...
java
public boolean refine(Point2D_F64 a, Point2D_F64 b, LineGeneral2D_F64 found) { // determine the local coordinate system center.x = (a.x + b.x)/2.0; center.y = (a.y + b.y)/2.0; localScale = a.distance(center); // define the line which points are going to be sampled along double slopeX = (b.x - a.x); doub...
python
def agg_to_two_dim_dataframe(agg): '''A function that takes an elasticsearch response with aggregation and returns the names of all bucket value pairs :param agg: an aggregation from elasticsearch results :type agg: elasticsearch response.aggregation.agg_name object :returns: pandas data fr...
java
private static Method findMatchingMethod(Method originalMethod, String methodName, Type classToSearch, ResolutionContext ctx, Class<?> originalClass) { // Check self Method result = findMethodOnClass(originalMethod, methodName, classToSearch, ctx, originalClass); // Check interfaces if ...
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static <T> Flowable<T> fromArray(T... items) { ObjectHelper.requireNonNull(items, "items is null"); if (items.length == 0) { return empty(); } if (items.l...
python
def output_capturing(): """Temporarily captures/redirects stdout.""" out = sys.stdout sys.stdout = StringIO() try: yield finally: sys.stdout = out
java
private TileMatrixSetDao getTileMatrixSetDao() throws SQLException { if (tileMatrixSetDao == null) { tileMatrixSetDao = DaoManager.createDao(connectionSource, TileMatrixSet.class); } return tileMatrixSetDao; }
python
def save_token(self): """ Saves the token dict in the specified file :return bool: Success / Failure """ if self.token is None: raise ValueError('You have to set the "token" first.') try: if not self.token_path.parent.exists(): sel...
python
def html(self, groups='all', template=None, **context): """Return an html string of the routes specified by the doc() method A template can be specified. A list of routes is available under the 'autodoc' value (refer to the documentation for the generate() for a description of available...
python
def parse_tx_op_return(tx): """ Given a transaction, locate its OP_RETURN and parse out its opcode and payload. Return (opcode, payload) on success Return (None, None) if there is no OP_RETURN, or if it's not a blockchain ID operation. """ # find OP_RETURN output op_return = None ou...
java
@Override protected <R, C> R accept(AstVisitor<R, C> visitor, C context) { return visitor.visitExpression(this, context); }
java
private boolean validateDigits(Object validationObject, Annotation annotate) { if (checkNullObject(validationObject)) { return true; } if (checkvalidDigitTypes(validationObject.getClass())) { if (!NumberUtils.isDigits(toString(validationObject))) ...
python
def is_binarized(self): """ Return True if the pianoroll is already binarized. Otherwise, return False. Returns ------- is_binarized : bool True if the pianoroll is already binarized; otherwise, False. """ is_binarized = np.issubdtype(self.pi...
python
def append_field(self, fieldname): # type: (str) -> None ''' Mark a field as present in the Rock Ridge records. Parameters: fieldname - The name of the field to mark as present; should be one of 'PX', 'PN', 'SL', 'NM', 'CL', 'PL', 'RE', or 'TF'. Ret...
python
def ready(self): """ Add user info to ExtensibleNodeSerializer """ from nodeshot.core.nodes.base import ExtensibleNodeSerializer from .models import Vote from .serializers import (CommentRelationSerializer, ParticipationSerializer) ExtensibleNod...
python
def _locate_bar_gen(icut, epos, transform1, transform2): """Generic function for the fine position of the CSU""" epos_pix = coor_to_pix_1d(epos) # transform -> epos_pix_s = transform1(epos_pix) icut2 = transform2(icut) # try: res = position_half_h(icut2, epos_pix_s) xint_...
python
def get_ntlmv1_response(password, challenge): """ Generate the Unicode MD4 hash for the password associated with these credentials. """ ntlm_hash = PasswordAuthentication.ntowfv1(password.encode('utf-16le')) response = PasswordAuthentication._encrypt_des_block(ntlm_hash[:7], cha...
java
public RoadSegment removeRoadSegmentAt(int index) { if (index >= 0) { int b = 0; for (final RoadPath p : this.paths) { int end = b + p.size(); if (index < end) { end = index - b; return removeRoadSegmentAt(p, end, null); } b = end; } } throw new IndexOutOfBoundsException(); }
python
def getrealpath(self, root, path): ''' Return the real path on disk from the query path, from a root path. The input path from URL might be absolute '/abc', or point to parent '../test', or even with UNC or drive '\\test\abc', 'c:\test.abc', which creates security issues when acc...
python
def get_value(self, name, data): """ Get the value of this field from the data. If there is a problem with the data, raise ValidationError. :param name: Name of this field (to retrieve from data). :param data: Dictionary of data for all fields. :raises: ValidationError ...
python
def _run_includemes(configurator, includemes): """ Automatically include packages defined in **include** configuration key. :param pyramid.config.Configurator configurator: pyramid's app configurator :param dict includemes: include, a list of includes or dictionary """ for include in includemes...
java
private String printError(Throwable t) { StringBuffer result = new StringBuffer(1024); result.append("/*\n"); result.append(CmsStringUtil.escapeHtml(t.getMessage())); result.append("\n*/\n"); result.append("function init() {\n"); result.append("}\n"); return resu...
java
@NullSafe public static <T extends Comparable<T>> int compareIgnoreNull(T obj1, T obj2) { return (obj1 == null ? 1 : (obj2 == null ? -1 : obj1.compareTo(obj2))); }
java
private static double tanQ(double xa, double xb, boolean cotanFlag) { int idx = (int) ((xa * 8.0) + 0.5); final double epsilon = xa - EIGHTHS[idx]; //idx*0.125; // Table lookups final double sintA = SINE_TABLE_A[idx]; final double sintB = SINE_TABLE_B[idx]; final double...
java
@InterfaceAudience.Private protected void addAttachment(Attachment attachment, String name) { Map<String, Object> attachments = (Map<String, Object>) properties.get("_attachments"); if (attachments == null) { attachments = new HashMap<String, Object>(); } attachments.put(...
java
@Override public final void propertyChange(PropertyChangeEvent evt) { if ("lookAndFeel".equals(evt.getPropertyName())) { this.onLookAndFeelChange((LookAndFeel) evt.getOldValue(), (LookAndFeel) evt.getNewValue()); } }
java
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.RENDERING_INTENT__RESERVED: return RESERVED_EDEFAULT == null ? reserved != null : !RESERVED_EDEFAULT.equals(reserved); case AfplibPackage.RENDERING_INTENT__IOCARI: return IOCARI_EDEFAULT == null ? iocari != null : ...
python
def _get_keycachelike(self, keycache, keys, get_adds_dels, parentity, branch, turn, tick, *, forward): """Try to retrieve a frozenset representing extant keys. If I can't, generate one, store it, and return it. """ keycache_key = parentity + (branch,) keycache2 = keycache3 = No...
python
def get_path(root, path, default=_UNSET): """Retrieve a value from a nested object via a tuple representing the lookup path. >>> root = {'a': {'b': {'c': [[1], [2], [3]]}}} >>> get_path(root, ('a', 'b', 'c', 2, 0)) 3 The path format is intentionally consistent with that of :func:`remap`. ...
java
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "directedNode") public JAXBElement<DirectedNodePropertyType> createDirectedNode(DirectedNodePropertyType value) { return new JAXBElement<DirectedNodePropertyType>(_DirectedNode_QNAME, DirectedNodePropertyType.class, null, value); }
python
def image_transformer2d_base(): """Set of hyperparameters.""" hparams = common_hparams.basic_params1() hparams.hidden_size = 512 hparams.batch_size = 1 hparams.max_length = 256 hparams.dropout = 0.0 hparams.clip_grad_norm = 0. # i.e. no gradient clipping hparams.optimizer_adam_epsilon = 1e-9 hparams....
java
private void verifyEncoding(String id, int bpc) throws WstxException { if (mByteSizeFound) { /* Let's verify that if we matched an encoding, it's the same * as what was declared... */ if (bpc != mBytesPerChar) { // [WSTX-138]: Needs t...
java
public String getContentType() { if (contentType != null) { return contentType; } if (dataStream != null) { try { contentType = URLConnection.guessContentTypeFromStream(dataStream); } catch (IOException ioe) { // ignore exception } } if (data != null) { ...
java
public static cachepolicy_binding[] get(nitro_service service, String policyname[]) throws Exception{ if (policyname !=null && policyname.length>0) { cachepolicy_binding response[] = new cachepolicy_binding[policyname.length]; cachepolicy_binding obj[] = new cachepolicy_binding[policyname.length]; for (int i...
java
public void setConfigurationRecorderNames(java.util.Collection<String> configurationRecorderNames) { if (configurationRecorderNames == null) { this.configurationRecorderNames = null; return; } this.configurationRecorderNames = new com.amazonaws.internal.SdkInternalList<S...
python
def updateSolutionTerminal(self): ''' Update the terminal period solution. This method should be run when a new AgentType is created or when CRRA changes. Parameters ---------- None Returns ------- None ''' AggShockConsumerType.u...
python
def select(message="", title="Lackey Input", options=None, default=None): """ Creates a dropdown selection dialog with the specified message and options `default` must be one of the options. Returns the selected value. """ if options is None or len(options) == 0: return "" if default is ...
java
protected void loadConfig() { if (!isEnabled()) { return; } final String urlProp = format(PROPERTY_FORMAT, id, "url"); LRSUrl = propertyResolver.getProperty(urlProp); actorName = propertyResolver.getProperty(format(PROPERTY_FORMAT, id, "actor-name"), ...
python
def deserialize(self, raw_jws, key=None, alg=None): """Deserialize a JWS token. NOTE: Destroys any current status and tries to import the raw JWS provided. :param raw_jws: a 'raw' JWS token (JSON Encoded or Compact notation) string. :param key: A (:class:`jwcrypto.jwk....
python
def truncate_money(money: Money) -> Money: """Truncates money amount to the number of decimals corresponding to the currency""" amount = truncate_to(money.amount, money.currency) return Money(amount, money.currency)
python
def contains_info(self, key, value): """ Returns how many cards in the deck have the specified value under the specified key in their info data. This method requires a library to be stored in the deck instance and will return `None` if there is no library. """ if...
python
def _get_capabilities_from_driver_type(driver_name): """Create initial driver capabilities :params driver_name: name of selected driver :returns: capabilities dictionary """ if driver_name == 'firefox': return DesiredCapabilities.FIREFOX.copy() elif driver_na...
java
protected <E extends Event> void linkService(final Node node, final javafx.event.EventType<E> eventType, final Class<? extends Service> serviceClass, final WaveType waveType, final Callback<E, Boolean> callback, final WaveData<?>... waveData) { // LinkService node.addEventHandle...
java
@Override public GetJobResult getJob(GetJobRequest request) { request = beforeClientExecution(request); return executeGetJob(request); }
java
public Class<?> getParameterType() { if (this.parameterType == null) { if (this.parameterIndex < 0) { this.parameterType = (this.method != null ? this.method.getReturnType() : null); } else { this.parameterType = (this.method != null ? this.method.getParam...
java
@Override public final EmailMsg process( final Map<String, Object> pAddParam, final EmailMsg pEntity, final IRequestData pRequestData) throws Exception { if (pEntity.getIsNew()) { this.srvOrm.insertEntity(pAddParam, pEntity); pEntity.setIsNew(false); } else { if (pEntity.getIsSent(...
java
public JobAgentInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, parameters).toBlocking().last().body(); }
java
public AllianceResponse getAlliancesAllianceId(Integer allianceId, String datasource, String ifNoneMatch) throws ApiException { ApiResponse<AllianceResponse> resp = getAlliancesAllianceIdWithHttpInfo(allianceId, datasource, ifNoneMatch); return resp.getData(); }
java
public void marshall(ListReviewableHITsRequest listReviewableHITsRequest, ProtocolMarshaller protocolMarshaller) { if (listReviewableHITsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(list...
python
def check_header(in_bam, rgnames, ref_file, config): """Ensure passed in BAM header matches reference file and read groups names. """ _check_bam_contigs(in_bam, ref_file, config) _check_sample(in_bam, rgnames)
python
def _get_record(self, record_type): """This overrides _get_record in osid.Extensible. Perhaps we should leverage it somehow? """ if (not self.has_record_type(record_type) and record_type.get_identifier() not in self._record_type_data_sets): raise errors.Unsu...
java
public static URI getRequestURI(HttpRequestMessage request, IoSession session) { URI requestURI = request.getRequestURI(); String host = request.getHeader("Host"); return getRequestURI(requestURI, host, session); }