language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
public void copyDeepMask(BufferedImage pSrcBitmap, BufferedImage pMaskBitmap, Rectangle pSrcRect, Rectangle pMaskRect, Rectangle pDstRect, int pSrcCopy, ...
python
def delete_entity(self, table_name, partition_key, row_key, if_match='*', timeout=None): ''' Deletes an existing entity in a table. Throws if the entity does not exist. When an entity is successfully deleted, the entity is immediately marked for deletion and is no...
java
public boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException { Objects.requireNonNull(e); long nanos = unit.toNanos(timeout); final ReentrantLock lock = this.lock; lock.lockInterruptibly(); try { while (count == items.length) { ...
python
def to_dict(self): """ Returns: itself as a dictionary """ dictator = Script.to_dict(self) # the dynamically created ScriptIterator classes have a generic name # replace this with ScriptIterator to indicate that this class is of type ScriptIterator dictator[self.n...
python
def _get_data(self): """Process the IGRA2 text file for observations at site_id matching time. Return: ------- :class: `pandas.DataFrame` containing the body data. :class: `pandas.DataFrame` containing the header data. """ # Split the list of times into b...
java
public static <S extends Iterator<? extends T>, T> Iterator<T> iteratorOverIterators(Iterator<S> iteratorsIterator) { Objects.requireNonNull(iteratorsIterator, "The iteratorsIterator is null"); return new CombiningIterator<T>(iteratorsIterator); }
java
MACAddressSegment[] toEUISegments(boolean extended) { IPv6AddressSegment seg0, seg1, seg2, seg3; int start = addressSegmentIndex; int segmentCount = getSegmentCount(); int segmentIndex; if(start < 4) { start = 0; segmentIndex = 4 - start; } else { start -= 4; segmentIndex = 0; } int original...
java
public static void filterP12(File p12, String p12Password) throws IOException { if (!p12.exists()) throw new IllegalArgumentException("p12 file does not exist: " + p12.getPath()); final File pem; if (USE_GENERIC_TEMP_DIRECTORY) pem = File.createTempFile(UUID.randomUUID().toString(), ""); else pem = n...
python
def project_path(*names): """Path to a file in the project.""" return os.path.join(os.path.dirname(__file__), *names)
java
public void warn(String msg, Throwable e) { doLog(msg, LOG_WARNING, null, e); }
java
public boolean contains(IPAddressString other) { if(isValid()) { if(other == this) { return true; } if(other.addressProvider.isUninitialized()) { // other not yet validated - if other is validated no need for this quick contains //do the quick check that uses only the String of the other Boolean ...
java
public static void initialize() { if (AppConfigHandler.get().isQueryCacheDeactivated()) { QueryCache.NOOP = new NoOpQueryCache(); } else { if (InfinispanCache.get().exists(QueryCache.INDEXCACHE)) { InfinispanCache.get().<String, QueryKey>getCache(QueryCache.IN...
java
public static <B extends ConnectionConfiguration.Builder<B,?>> B setTLSOnly(B builder) { builder.setEnabledSSLProtocols(new String[] { PROTO_TLSV1_2, PROTO_TLSV1_1, PROTO_TLSV1 }); return builder; }
java
@Override public CPDefinition findByC_S_Last(long CProductId, int status, OrderByComparator<CPDefinition> orderByComparator) throws NoSuchCPDefinitionException { CPDefinition cpDefinition = fetchByC_S_Last(CProductId, status, orderByComparator); if (cpDefinition != null) { return cpDefinition; } S...
java
public final <S, T> void registerBinding(Class<S> source, Class<T> target, Binding<S, T> converter, Class<? extends Annotation> qualifier) { registerBinding(new ConverterKey<S,T>(source, target, qualifier == null ? DefaultBinding.class : qualifier), converter); }
java
public int parse(List<String> words, List<String> postags, List<Integer> heads, List<String> deprels) { Instance inst = new Instance(); inst.forms.add(SpecialOption.ROOT); inst.postags.add(SpecialOption.ROOT); for (int i = 0; i < words.size(); i++) { inst.forms.a...
java
@Override public void refresh(Object bean) { methodCalls.add(MethodCall.of("refresh").with("bean", bean)); find.refresh(bean); }
java
public XML deleteClass(Class<?> aClass){ boolean isRemoved = xmlJmapper.classes.remove(new XmlClass(aClass.getName())); if(!isRemoved)Error.xmlClassInexistent(this.xmlPath,aClass); return this; }
python
def parse_directive_location(lexer: Lexer) -> NameNode: """DirectiveLocation""" start = lexer.token name = parse_name(lexer) if name.value in DirectiveLocation.__members__: return name raise unexpected(lexer, start)
java
private void createProcessAndConnections(Conversion cnv, ConversionDirectionType direction) { assert cnv.getConversionDirection() == null || cnv.getConversionDirection().equals(direction) || cnv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE); // create the process for the conversion in ...
python
def _as_versioned_jar(self, internal_target): """Fetches the jar representation of the given target, and applies the latest pushdb version.""" jar, _ = internal_target.get_artifact_info() pushdb_entry = self._get_db(internal_target).get_entry(internal_target) return jar.copy(rev=pushdb_entry.version().v...
python
def predict(self): """ Returns ------- proba : ndarray, shape=(n_clusters, ) The probability of given cluster being label 1. """ if self.w_ is not None: sigmoid = lambda t: 1. / (1. + np.exp(-t)) return sigmoid(np.dot(self.centers, sel...
python
def read_sparse(cls, file_path: str): """Read a sparse representation from a tab-delimited text file. TODO: docstring""" with open(file_path) as fh: next(fh) # skip header line genes = next(fh)[1:-1].split('\t') cells = next(fh)[1:-1].split(...
python
def updateAndFlush(self, login, tableName, cells): """ Parameters: - login - tableName - cells """ self.send_updateAndFlush(login, tableName, cells) self.recv_updateAndFlush()
python
def mcc(y, z): """Matthews correlation coefficient """ tp, tn, fp, fn = contingency_table(y, z) return (tp * tn - fp * fn) / K.sqrt((tp + fp) * (tp + fn) * (tn + fp) * (tn + fn))
java
public boolean isRoundingAvailable(String roundingId, String... providers) { return isRoundingAvailable( RoundingQueryBuilder.of().setProviderNames(providers).setRoundingName(roundingId).build()); }
python
def add_homogeneous_model(self, magnitude, phase=0, frequency=None): """Add homogeneous models to one or all tomodirs. Register those as forward models Parameters ---------- magnitude : float Value of homogeneous magnitude model phase : float, optional ...
python
def find_includes(filename): """ Find user includes (no system includes) requested from given source file. All .h files will be given relative to the current folder, e.g. ["c/rowindex.h", "c/column.h"]. """ includes = [] with open(filename, "r", encoding="utf-8") as inp: for line in...
java
@Override public final PArray getArray(final String key) { PArray result = optArray(key); if (result == null) { throw new ObjectMissingException(this, key); } return result; }
python
def _get_block(self): """Just read a single block from your current location in _fh""" b = self._fh.read(4) # get block size bytes #print self._fh.tell() if not b: raise StopIteration block_size = struct.unpack('<i',b)[0] return self._fh.read(block_size)
java
void genCatch(JCCatch tree, Env<GenContext> env, int startpc, int endpc, List<Integer> gaps) { if (startpc != endpc) { List<Pair<List<Attribute.TypeCompound>, JCExpression>> catchTypeExprs = catchTypesW...
python
def delete_service_endpoint(self, project, endpoint_id, deep=None): """DeleteServiceEndpoint. [Preview API] Delete a service endpoint. :param str project: Project ID or project name :param str endpoint_id: Id of the service endpoint to delete. :param bool deep: Specific to AzureR...
java
@Override public void setPeerRecoveryLeaseTimeout(int leaseTimeout) { if (tc.isEntryEnabled()) Tr.entry(tc, "setPeerRecoveryLeaseTimeout", leaseTimeout); // Store the Lease Timeout _leaseTimeout = leaseTimeout; if (tc.isEntryEnabled()) Tr.exit(tc, "set...
python
def build_rrule(count=None, interval=None, bysecond=None, byminute=None, byhour=None, byweekno=None, bymonthday=None, byyearday=None, bymonth=None, until=None, bysetpos=None, wkst=None, byday=None, freq=None): """ Build rrule dictionary for vRecur class. :par...
python
def insert_entity(self, table_name, entity, timeout=None): ''' Inserts a new entity into the table. Throws if an entity with the same PartitionKey and RowKey already exists. When inserting an entity into a table, you must specify values for the PartitionKey and RowKey system p...
java
@Override public boolean satisfies(Match match, int... ind) { assertIndLength(ind); // Collect values of the element group Set values = new HashSet(); for (BioPAXElement gen : con1.generate(match, ind)) { values.addAll(pa1.getValueFromBean(gen)); } // If emptiness is desired, check that if (value...
python
def dumps(obj, indent=None, default=None, sort_keys=False, **kw): """Dump string.""" return YAMLEncoder(indent=indent, default=default, sort_keys=sort_keys, **kw).encode(obj)
java
private static boolean isArticleLink(String linkedArticleTitle) { String s = linkedArticleTitle.toLowerCase(); return !(s.startsWith("image:") || s.startsWith("wikipedia:") || s.startsWith("template:") || s.startsWith("category:") || s....
python
def ctrl_x(self, x, to=None): """ Sends a character to the currently active element with Ctrl pressed. This method takes care of pressing and releasing Ctrl. """ seq = [Keys.CONTROL, x, Keys.CONTROL] # This works around a bug in Selenium that happens in FF on ...
python
def set_range_value(self, data): """ Validates date range by parsing into 2 datetime objects and validating them both. """ dtfrom = data.pop('value_from') dtto = data.pop('value_to') if dtfrom is dtto is None: self.errors['value'] = ['Date range requir...
python
def __remove_index(self, ids): """remove affected ids from the index""" if not ids: return ids = ",".join((str(id) for id in ids)) self.execute("DELETE FROM fact_index where id in (%s)" % ids)
java
@SuppressWarnings("WeakerAccess") public CreateInstanceRequest setType(@Nonnull Instance.Type type) { Preconditions.checkNotNull(type); Preconditions.checkArgument(type != Instance.Type.UNRECOGNIZED, "Type is unrecognized"); builder.getInstanceBuilder().setType(type.toProto()); return this; }
java
public synchronized void start() throws SocketException { if (!isRunning()) { socket.set(new DatagramSocket(BEAT_PORT)); deliverLifecycleAnnouncement(logger, true); final byte[] buffer = new byte[512]; final DatagramPacket packet = new DatagramPacket(buffer, buffe...
python
def lal(self): """ Returns a LAL Object that contains this data """ lal_data = None if self._data.dtype == float32: lal_data = _lal.CreateREAL4Vector(len(self)) elif self._data.dtype == float64: lal_data = _lal.CreateREAL8Vector(len(self)) elif self._data...
java
public void setExpressions(java.util.Collection<ExpressionStatus> expressions) { if (expressions == null) { this.expressions = null; return; } this.expressions = new com.amazonaws.internal.SdkInternalList<ExpressionStatus>(expressions); }
python
def if_json_contain(left_json, right_json, op='strict'): """ 判断一个 json 是否包含另外一个 json 的 key,并且 value 相等; :param: * left_json: (dict) 需要判断的 json,我们称之为 left * right_json: (dict) 需要判断的 json,我们称之为 right,目前是判断 left 是否包含在 right 中 * op: (string) 判断操作符,目前只有一种,默认为 strict,向后兼容 :return: ...
python
def get_key(key_name, region=None, key=None, keyid=None, profile=None): ''' Check to see if a key exists. Returns fingerprint and name if it does and False if it doesn't CLI Example: .. code-block:: bash salt myminion boto_ec2.get_key mykey ''' conn = _get_conn(region=region, key=k...
java
String getHost() { LOGGER.entering(); String val = ""; InstanceType type = getType(); if (commands.contains(HOST_ARG)) { val = commands.get(commands.indexOf(HOST_ARG) + 1); LOGGER.exiting(val); return val; } try { if (type...
java
public Trace withSegments(Segment... segments) { if (this.segments == null) { setSegments(new java.util.ArrayList<Segment>(segments.length)); } for (Segment ele : segments) { this.segments.add(ele); } return this; }
python
def h_boiling_Yan_Lin(m, x, Dh, rhol, rhog, mul, kl, Hvap, Cpl, q, A_channel_flow): r'''Calculates the two-phase boiling heat transfer coefficient of a liquid and gas flowing inside a plate and frame heat exchanger, as developed in [1]_. Reviewed in [2]_, [3]_, [4]_, and [5]_. ...
java
public ServerBuilder port(int port, Iterable<SessionProtocol> protocols) { return port(new ServerPort(port, protocols)); }
java
protected void configureDetailedWeekView( DetailedWeekView newDetailedWeekView, boolean trimTimeBounds) { newDetailedWeekView.getWeekView().setShowToday(false); newDetailedWeekView.getWeekView().setTrimTimeBounds(trimTimeBounds); }
python
def from_json_dict(cls, json_dict # type: Dict[str, Any] ): # type: (...) -> IntegerSpec """ Make a IntegerSpec object from a dictionary containing its properties. :param dict json_dict: This dictionary may contain `...
java
public EEnum getCPCPrtFlags() { if (cpcPrtFlagsEEnum == null) { cpcPrtFlagsEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(12); } return cpcPrtFlagsEEnum; }
python
def parse_400_row(row: list) -> tuple: """ Interval event record (400) """ return EventRecord(int(row[1]), int(row[2]), row[3], row[4], row[5])
python
def encode_binary_dict(array, buffers): ''' Send a numpy array as an unencoded binary buffer The encoded format is a dict with the following structure: .. code:: python { '__buffer__' : << an ID to locate the buffer >>, 'shape' : << array shape >>, 'dtype...
python
def flatten(items,enter=lambda x:isinstance(x, list)): # http://stackoverflow.com/a/40857703 # https://github.com/ctmakro/canton/blob/master/canton/misc.py """Yield items from any nested iterable; see REF.""" for x in items: if enter(x): yield from flatten(x) else: ...
java
public byte[] toBytes(final int padding) { // special case a single entry if (padding == 0 && segments.size() == 1) { BufferSegment seg = segments.get(0); if (seg.offset == 0 && seg.len == seg.buf.length) { return seg.buf; } return Arrays.copyOfRange(seg.buf, seg.offset, seg.offs...
java
public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { if ((proxyURLPrefix == null) || (proxyURLPrefix.length() == 0)) { // No proxy specified super.service(req, res); return; } ServletOutputStream streamOut = res.getOutpu...
python
def derivatives_factory(cls, coef, domain, kind, **kwargs): """ Given some coefficients, return a the derivative of a certain kind of orthogonal polynomial defined over a specific domain. """ basis_polynomial = cls._basis_polynomial_factory(kind) return basis_polynomial(...
java
public static List<String> extractResponseCodes(JavadocComment jdoc){ List<String> list = new ArrayList<>(); list.addAll(extractDocAnnotation(DOC_RESPONSE_CODE,jdoc)); return list; }
java
void run(List<String> arguments, @Nullable Path workingDirectory) throws ProcessHandlerException, CloudSdkNotFoundException, CloudSdkOutOfDateException, CloudSdkVersionFileException, IOException { sdk.validateCloudSdk(); List<String> command = new ArrayList<>(); command.add(sdk.getGCloudPa...
java
public static <K, V> V putIfAbsent(final ConcurrentMap<K, V> map, final K key, final V value) { if (map == null) { return null; } final V result = map.putIfAbsent(key, value); return result != null ? result : value; }
python
def to_output(self, value): """Convert value to process output format.""" return {self.name: [self.inner.to_output(v)[self.name] for v in value]}
python
def _retry_over_time(fun, catch, args=[], kwargs={}, errback=None, max_retries=None, interval_start=2, interval_step=2, interval_max=30): """Retry the function over and over until max retries is exceeded. For each retry we sleep a for a while before we try again, this ...
python
def load_xml(self, filepath): """Loads the values of the configuration variables from an XML path.""" from os import path import xml.etree.ElementTree as ET #Make sure the file exists and then import it as XML and read the values out. uxpath = path.expanduser(filepath) if...
java
protected Element findAndReplaceXpp3DOM(Counter counter, Element parent, String name, Xpp3Dom dom) { boolean shouldExist = (dom != null) && ((dom.getChildCount() > 0) || (dom.getValue() != null)); Element element = updateElement(counter, parent, name, shouldExist); if (shouldExist) { ...
java
public Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable { if (thisMethod == null) { BeanLogger.LOG.methodHandlerProcessingReturningBeanInstance(self.getClass()); if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotS...
java
public void seekToHoliday(String holidayString, String direction, String seekAmount) { Holiday holiday = Holiday.valueOf(holidayString); assert(holiday != null); seekToIcsEvent(HOLIDAY_ICS_FILE, holiday.getSummary(), direction, seekAmount); }
python
def get_times(annot, evt_type=None, stage=None, cycle=None, chan=None, exclude=False, buffer=0): """Get start and end times for selected segments of data, bundled together with info. Parameters ---------- annot: instance of Annotations The annotation file containing events and...
java
private void initializeHideNavigation(final SharedPreferences sharedPreferences) { String key = getString(R.string.hide_navigation_preference_key); boolean defaultValue = Boolean.valueOf(getString(R.string.hide_navigation_preference_default_value)); boolean hideNavigation = share...
java
private long resolveLongFwk(final String key, final String frameworkProp, final long defval) { long timeout = defval; String opt = resolve(key); if (opt == null && frameworkProp != null && framework.getPropertyLookup().hasProperty(frameworkProp)) { opt = framework.getProperty(framewo...
java
public ServiceFuture<OperationStatus> updatePublishSettingsAsync(UUID appId, PublishSettingUpdateObject publishSettingUpdateObject, final ServiceCallback<OperationStatus> serviceCallback) { return ServiceFuture.fromResponse(updatePublishSettingsWithServiceResponseAsync(appId, publishSettingUpdateObject), servic...
python
def write_json_to_file(json_data, filename="metadata"): """ Write all JSON in python dictionary to a new json file. :param dict json_data: JSON data :param str filename: Target filename (defaults to 'metadata.jsonld') :return None: """ logger_jsons.info("enter write_json_to_file") json_d...
java
protected static double computePi(int i, double[] dist_i, double[] pij_i, double perplexity, double logPerp) { // Relation to paper: beta == 1. / (2*sigma*sigma) double beta = estimateInitialBeta(dist_i, perplexity); double diff = computeH(i, dist_i, pij_i, -beta) - logPerp; double betaMin = 0.; dou...
python
def create_user(self, customer_id, name, login, password, role=FastlyRoles.USER, require_new_password=True): """Create a user.""" body = self._formdata({ "customer_id": customer_id, "name": name, "login": login, "password": password, "role": role, "require_new_password": require_new_password, },...
java
void store(OutputStream out) throws IOException { BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(out)); for (Entry<String, Point2d[]> e : templateMap.entries()) { bw.write(encodeEntry(e)); bw.write('\n'); } bw.close(); }
java
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "angle") public JAXBElement<MeasureType> createAngle(MeasureType value) { return new JAXBElement<MeasureType>(_Angle_QNAME, MeasureType.class, null, value); }
python
def coastal_coords(): """ A coastal coord is a 2-tuple: (tile id, direction). An edge is coastal if it is on the grid's border. :return: list( (tile_id, direction) ) """ coast = list() for tile_id in coastal_tile_ids(): tile_coord = tile_id_to_coord(tile_id) for edge_coord ...
python
def get_ccle_mrna_levels(): """Get CCLE mRNA amounts using cBioClient""" if request.method == 'OPTIONS': return {} response = request.body.read().decode('utf-8') body = json.loads(response) gene_list = body.get('gene_list') cell_lines = body.get('cell_lines') mrna_amounts = cbio_clie...
python
def bytes_available(device): """ Determines the number of bytes available for reading from an AlarmDecoder device :param device: the AlarmDecoder device :type device: :py:class:`~alarmdecoder.devices.Device` :returns: int """ bytes_avail = 0 if isinstance(device, alarmdecoder.devi...
python
def _send_bool(self,value): """ Convert a boolean value into a bytes object. Uses 0 and 1 as output. """ # Sanity check. if type(value) != bool and value not in [0,1]: err = "{} is not boolean.".format(value) raise ValueError(err) return struct....
java
public void incEncodePB(final MiniSatStyleSolver s, final LNGIntVector lits, final LNGIntVector coeffs, int rhs, final LNGIntVector assumptions, int size) { assert this.incrementalStrategy == IncrementalStrategy.ITERATIVE; switch (this.pbEncoding) { case SWC: this.swc.enc...
java
@Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfplibPackage.BPG__PAGE_NAME: return getPageName(); case AfplibPackage.BPG__TRIPLETS: return getTriplets(); } return super.eGet(featureID, resolve, coreType); }
java
@SuppressWarnings("unchecked") private String encodeAttribute(String s, Charset charset) throws ErrorDataEncoderException { if (s == null) { return ""; } try { String encoded = URLEncoder.encode(s, charset.name()); if (encoderMode == EncoderMode.RFC3986) {...
python
def execute(self, cmd, fname, codes=[0, None]): ''' Execute a command against the specified file. @cmd - Command to execute. @fname - File to run command against. @codes - List of return codes indicating cmd success. Returns True on success, False on failure, or None ...
python
def select_files(self, what="o"): """ Helper function used to select the files of a task. Args: what: string with the list of characters selecting the file type Possible choices: i ==> input_file, o ==> output_file, ...
python
def source_analysis( source_path, group, encoding='automatic', fallback_encoding='cp1252', generated_regexes=pygount.common.regexes_from(DEFAULT_GENERATED_PATTERNS_TEXT), duplicate_pool=None): """ Analysis for line counts in source code stored in ``source_path``. :param source_path:...
python
def select_visible_page_image(infiles, output_file, log, context): """Selects a whole page image that we can show the user (if necessary)""" options = context.get_options() if options.clean_final: image_suffix = '.pp-clean.png' elif options.deskew: image_suffix = '.pp-deskew.png' el...
python
def power_chisq_bins_from_sigmasq_series(sigmasq_series, num_bins, kmin, kmax): """Returns bins of equal power for use with the chisq functions Parameters ---------- sigmasq_series: FrequencySeries A frequency series containing the cumulative power of a filter template preweighted by a...
java
public int uploadFile(String name, java.io.File file) { FileDataBodyPart filePart = new FileDataBodyPart("source", file); // Work around for bug in cherrypy FormDataContentDisposition.FormDataContentDispositionBuilder builder = FormDataContentDisposition .name(filePart.getName()); builder.fileName(file.getN...
java
public static PreprocessedRowsFlusher create(final XMLUtil xmlUtil, final List<TableRow> tableRows) throws IOException { return new PreprocessedRowsFlusher(xmlUtil, tableRows, new StringBuilder(STRING_BUILDER_SIZE)); }
java
private boolean needsToBeCreatedInitially(Entity ent) { boolean create = false; if(ent instanceof PhysicalEntity || ent instanceof Gene) { if(ubiqueDet != null && ubiqueDet.isUbique(ent)) create = false; // ubiques will be created where they are actually used. else if (!ent.getParticipantOf().isEmpty()) ...
java
public static void applyKVToBean(Object bean, String key, Object value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { Method getterMethod = bean.getClass().getMethod(Util.getterMethodName(key)); Method setterMethod = bean.getClass().getMethod...
java
@Override public boolean documentExists(URI documentUri) throws DocumentException { URI fileUri = getDocumentInternalUri(documentUri); File file = new File(fileUri); return file.exists(); }
python
def w_diffuser_inner(sed_inputs=sed_dict): """Return the inner width of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- ...
python
def os_deployment_servers(self): """ Gets the Os Deployment Servers API client. Returns: OsDeploymentServers: """ if not self.__os_deployment_servers: self.__os_deployment_servers = OsDeploymentServers(self.__connection) return self.__os_deploymen...
java
protected List<DbEntityOperation> sortByReferences(SortedSet<DbEntityOperation> preSorted) { // copy the pre-sorted set and apply final sorting to list List<DbEntityOperation> opList = new ArrayList<DbEntityOperation>(preSorted); for (int i = 0; i < opList.size(); i++) { DbEntityOperation currentOpe...
java
public void marshall(RetrieveTapeRecoveryPointRequest retrieveTapeRecoveryPointRequest, ProtocolMarshaller protocolMarshaller) { if (retrieveTapeRecoveryPointRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMar...
python
def tag_residues_with_heptad_register(helices): """ tags Residues in input helices with heptad register. (Helices not required to be the same length). Parameters ---------- helices : [Polypeptide] Returns ------- None """ base_reg = 'abcdefg' start, end = start_and_end_of_refer...