language
stringclasses
2 values
func_code_string
stringlengths
63
466k
python
def _read_header(self): """Read the header info""" data = np.fromfile(self.filename, dtype=native_header, count=1) self.header.update(recarray2dict(data)) data15hd = self.header['15_DATA_HEADER'] sec15hd = self.header['15_SECONDARY_PRODUCT_HEADER'] ...
java
public void forceDeleteModule(String moduleName) throws Exception { OpenCms.getModuleManager().deleteModule( m_cms, moduleName, true, new CmsShellReport(m_cms.getRequestContext().getLocale())); }
python
def get_product_historic_rates(self, product_id, start=None, end=None, granularity=None): """Historic rates for a product. Rates are returned in grouped buckets based on requested `granularity`. If start, end, and granularity aren't provided, the excha...
java
public static <E extends Enum<E>> StreamableEnumSet<E> of (E first, E... rest) { StreamableEnumSet<E> set = new StreamableEnumSet<E>(first.getDeclaringClass()); set.add(first); for (E e : rest) { set.add(e); } return set; }
java
public static DictionaryMaker combineWhenNotInclude(String[] pathArray) { DictionaryMaker dictionaryMaker = new DictionaryMaker(); logger.info("正在处理主词典" + pathArray[0]); dictionaryMaker.addAll(DictionaryMaker.loadAsItemList(pathArray[0])); for (int i = 1; i < pathArray.length; ++i) ...
java
public static void removeConnectionData(Profile profile, String providerId) { Map<String, List<Map<String, Object>>> allConnections = profile.getAttribute(CONNECTIONS_ATTRIBUTE_NAME); if (MapUtils.isNotEmpty(allConnections)) { allConnections.remove(providerId); } }
python
def reset(self): """Reset accumulated components and metric values""" if self.parallel: from pyannote.metrics import manager_ self.accumulated_ = manager_.dict() self.results_ = manager_.list() self.uris_ = manager_.dict() else: self.ac...
java
public Duration getWork(Date startDate, Date endDate, TimeUnit format) { DateRange range = new DateRange(startDate, endDate); Long cachedResult = m_workingDateCache.get(range); long totalTime = 0; if (cachedResult == null) { // // We want the start date to be the earl...
python
async def get_identity_document(client: Client, current_block: dict, pubkey: str) -> Identity: """ Get the identity document of the pubkey :param client: Client to connect to the api :param current_block: Current block data :param pubkey: UID/Public key :rtype: Identity """ # Here we r...
python
def detectAndroid(self): """Return detection of an Android device Detects *any* Android OS-based device: phone, tablet, and multi-media player. Also detects Google TV. """ if UAgentInfo.deviceAndroid in self.__userAgent \ or self.detectGoogleTV(): return T...
python
def from_region(region, mesh_in, save_edges=False, save_faces=False, localize=False, is_surface=False): """ Create a mesh corresponding to a given region. """ mesh = Mesh( mesh_in.name + "_reg" ) mesh.coors = mesh_in.coors.copy() mesh.ngroups = mesh_in...
java
@Override public void channelHandlerContext(ChannelHandlerContext ctx) throws Http2Exception { this.ctx = checkNotNull(ctx, "ctx"); // Writing the pending bytes will not check writability change and instead a writability change notification // to be provided by an explicit call. cha...
python
def add_configuration(options): """ interactively add a new configuration """ if options.username != None: username = options.username else: username = prompt('Username: ') if options.password != None: password = options.password else: password = prompt('Pas...
java
private Map<String, Object> toMap(CompositeData value) { Map<String, Object> data = new HashMap<String, Object>(); for(String key : value.getCompositeType().keySet()) { data.put(key, value.get(key)); } return data; }
java
private String getVersion(MigrationModel migrationModel) { String version = migrationConfig.getVersion(); if (version == null) { version = migrationModel.getNextVersion(initialVersion); } return version; }
python
def add_conversion_step(self, converter: Converter[S, T], inplace: bool = False): """ Utility method to add a converter to this chain. If inplace is True, this object is modified and None is returned. Otherwise, a copy is returned :param converter: the converter to add :param in...
python
def exit_enable_mode(self, exit_command=""): """Exit enable mode. :param exit_command: Command that exits the session from privileged mode :type exit_command: str """ output = "" if self.check_enable_mode(): self.write_channel(self.normalize_cmd(exit_command)...
python
def convertVariable(self, key, varName, varValue): """Puts the function in the globals() of the main module.""" if isinstance(varValue, encapsulation.FunctionEncapsulation): result = varValue.getFunction() # Update the global scope of the function to match the current module ...
python
def _gotitem(self, key, ndim, subset=None): """ Sub-classes to define. Return a sliced object. Parameters ---------- key : string / list of selections ndim : 1,2 requested ndim of result subset : object, default None subset to act on ...
python
def xmlprint(element): """ pretty prints an ElementTree (or an Element of it), or the XML representation of a SaltDocument (or an element thereof, e.g. a node, edge, layer etc.) """ if isinstance(element, (etree._Element, etree._ElementTree)): print etree.tostring(element, pretty_print=T...
python
def _check_overlap(self, fragment): """ Check that the interval of the given fragment does not overlap any existing interval in the list (except at its boundaries). Raises an error if not OK. """ # # NOTE bisect does not work if there is a configuration like: ...
python
def get_color(self, value): """Helper method to validate and map values used in the instantiation of of the Color object to the correct unicode value. """ if value in COLOR_SET: value = COLOR_MAP[value] else: try: value = int(value) ...
java
@Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfplibPackage.MEDIUM_ORIENTATION__MED_ORIENT: return getMedOrient(); } return super.eGet(featureID, resolve, coreType); }
python
def connect(self, server): "Connects to a server and return a connection id." if 'connections' not in session: session['connections'] = {} session.save() conns = session['connections'] id = str(len(conns)) conn = Connection(server) conns[...
java
public static <K, V> V first( NavigableMap<K, V> map ) { return map.firstEntry().getValue(); }
java
public static <T> T handleExceptionAndThrowRuntimeEx(Logger log, Throwable throwable, String method, Object... params) { handleException(log, throwable, method, params); throw new RuntimeException(throwable); }
java
private void add2MBR(int[] entrySorting, List<Heap<DoubleIntPair>> pqUB, List<Heap<DoubleIntPair>> pqLB, int index) { SpatialComparable currMBR = node.getEntry(entrySorting[index]); for(int d = 0; d < currMBR.getDimensionality(); d++) { double max = currMBR.getMax(d); pqUB.get(d).add(new DoubleIntPa...
java
public Collection<? extends CRL> engineGetCRLs(CRLSelector selector) throws CertStoreException { if (selector != null && !(selector instanceof X509CRLSelector)) { throw new IllegalArgumentException(); } if (crlDelegate.getCollection() == null) { return new Vector<X509CRL>(); } // Given that we alw...
java
public boolean addEventExecution(EventExecution eventExecution) { boolean added = executionDAO.addEventExecution(eventExecution); if (added) { indexDAO.addEventExecution(eventExecution); } return added; }
java
public List<DynamoDBMapper.FailedBatch> batchSave(Iterable<T> objectsToSave) { return mapper.batchWrite(objectsToSave, (Iterable<T>)Collections.<T>emptyList()); }
python
def generate_supplied_diff_subparser(subparsers): """Adds a sub-command parser to `subparsers` to run a diff query using the supplied results sets.""" parser = subparsers.add_parser( 'sdiff', description=constants.SUPPLIED_DIFF_DESCRIPTION, epilog=constants.SUPPLIED_DIFF_EPILOG, form...
java
public Observable<ServiceResponse<DatabaseVulnerabilityAssessmentRuleBaselineInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, List<DatabaseVulnerabilityAssessmentRuleBaselineIt...
python
def script(self, **kwargs): """ Define update action to take: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-using.html for more details. Note: the API only accepts a single script, so calling the script multiple times will overwrite. ...
python
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'debug') and self.debug is not None: _dict['debug'] = self.debug if hasattr(self, 'restart') and self.restart is not None: _dict['restart'] = self.restart ...
python
def check_backend() -> bool: """Check if the backend is available.""" try: import bluepy.btle # noqa: F401 #pylint: disable=unused-import return True except ImportError as importerror: _LOGGER.error('bluepy not found: %s', str(importerror)) return Fal...
java
private Future<Channel> acquireHealthyFromPoolOrNew(final Promise<Channel> promise) { try { final Channel ch = pollChannel(); if (ch == null) { // No Channel left in the pool bootstrap a new Channel Bootstrap bs = bootstrap.clone(); bs.attr...
java
public final void synpred12_DRL6Expressions_fragment() throws RecognitionException { // src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:438:8: ( squareArguments shiftExpression ) // src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:438:9: squareArguments shiftExpression { pushFollow(FO...
python
def _format_json(data, theme): """Pretty print a dict as a JSON, with colors if pygments is present.""" output = json.dumps(data, indent=2, sort_keys=True) if pygments and sys.stdout.isatty(): style = get_style_by_name(theme) formatter = Terminal256Formatter(style=style) return pygm...
python
def shape(self) -> Tuple[int, ...]: """Required shape of |NetCDFVariableDeep.array|. For the default configuration, the first axis corresponds to the number of devices, and the second one to the number of timesteps. We show this for the 0-dimensional input sequence |lland_inputs.Nied|: ...
java
public DirectionsApiRequest waypointsFromPlaceIds(String... waypoints) { Waypoint[] objWaypoints = new Waypoint[waypoints.length]; for (int i = 0; i < waypoints.length; i++) { objWaypoints[i] = new Waypoint(prefixPlaceId(waypoints[i])); } return waypoints(objWaypoints); }
python
def createMemoryParserCtxt(buffer, size): """Create a parser context for an XML in-memory document. """ ret = libxml2mod.xmlCreateMemoryParserCtxt(buffer, size) if ret is None:raise parserError('xmlCreateMemoryParserCtxt() failed') return parserCtxt(_obj=ret)
java
@GuardedBy("evictionLock") boolean admit(K candidateKey, K victimKey) { int victimFreq = frequencySketch().frequency(victimKey); int candidateFreq = frequencySketch().frequency(candidateKey); if (candidateFreq > victimFreq) { return true; } else if (candidateFreq <= 5) { // The maximum fre...
python
def add_device(self, model, serial): """ Returns 'device object' of newly created device. http://docs.exosite.com/portals/#create-device http://docs.exosite.com/portals/#device-object """ device = { 'model': model, 'vendor': se...
python
def add_context(request): """ Add variables to all dictionaries passed to templates. """ # Whether the user has president privileges try: PRESIDENT = Manager.objects.filter( incumbent__user=request.user, president=True, ).count() > 0 except TypeError: PRES...
python
def _set_upload_url(self): """Generate the full URL for a POST.""" # pylint: disable=protected-access self._upload_url = "/".join( [self.jss._url, self._url, self.resource_type, self.id_type, str(self._id)])
java
public static StorageVol findVolume(Connect connection, String path) throws LibvirtException { log.debug("Looking up StorageVolume for path '{}'", path); for (String s : connection.listStoragePools()) { StoragePool sp = connection.storagePoolLookupByName(s); for (String v : sp.li...
python
def csv_to_list(csv_file): """ Open and transform a CSV file into a matrix (list of lists). .. code:: python reusables.csv_to_list("example.csv") # [['Name', 'Location'], # ['Chris', 'South Pole'], # ['Harry', 'Depth of Winter'], # ['Bob', 'Skull']] :param c...
python
def eventgroup_delete(self, event_group_id="0.0.0", account=None, **kwargs): """ Delete an eventgroup. This needs to be **propose**. :param str event_group_id: ID of the event group to be deleted :param str account: (optional) Account used to verify the operation""" if not acco...
java
public static boolean validOptions(String[][] options, DocErrorReporter reporter) { return SARL_DOCLET.configuration.validOptions(options, reporter); }
java
public IndexFacesResult withFaceRecords(FaceRecord... faceRecords) { if (this.faceRecords == null) { setFaceRecords(new java.util.ArrayList<FaceRecord>(faceRecords.length)); } for (FaceRecord ele : faceRecords) { this.faceRecords.add(ele); } return this; ...
java
public CreateApiKeyRequest withStageKeys(StageKey... stageKeys) { if (this.stageKeys == null) { setStageKeys(new java.util.ArrayList<StageKey>(stageKeys.length)); } for (StageKey ele : stageKeys) { this.stageKeys.add(ele); } return this; }
java
public Iterable<Di18n> queryByUpdatedDate(java.util.Date updatedDate) { return queryByField(null, Di18nMapper.Field.UPDATEDDATE.getFieldName(), updatedDate); }
java
protected void updateText(PageElement pageElement, String textOrKey, CharSequence keysToSend, Object... args) throws TechnicalException, FailureException { String value = getTextOrKey(textOrKey); if (!"".equals(value)) { try { final WebElement element = Context.waitUntil(...
java
@Deprecated public static JpaModule newServerModule(EntityManagerFactory emFactory, EntityManager em, TransactionRunner transactionRunner) { JpaModuleConfig config = new JpaModuleConfig(); config.exposeAllEntities(emFactory); return new JpaModule(c...
java
static LHS getLHSObjectField( Object object, String fieldName ) throws UtilEvalError, ReflectError { if ( object instanceof This ) return new LHS( ((This)object).namespace, fieldName, false ); try { Invocable f = resolveExpectedJavaField( object.getCla...
python
def set_logscale(self,t=True): """ - set_logscale(): If M is the matrix of the image, it defines the image M as log10(M+1). """ if(t == self.get_logscale()): return else: if(t): self.__image = np.log10(self.__image+1) self._...
python
def _set_bearer_user_vars_local(token, allowed_client_ids, scopes): """Validate the oauth bearer token on the dev server. Since the functions in the oauth module return only example results in local development, this hits the tokeninfo endpoint and attempts to validate the token. If it's valid, we'll set _ENV...
java
public void marshall(AddIpRoutesRequest addIpRoutesRequest, ProtocolMarshaller protocolMarshaller) { if (addIpRoutesRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(addIpRoutesRequest.getDir...
java
protected final void setRequiresCheckpoint() { final String methodName = "setRequiresCheckpoint"; if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, methodName, new Object[] { new ...
python
def template(key, books=None, optional=False): """Starts a Pretty Tensor graph template. ## Template Mode Templates allow you to define a graph with some unknown values. The most common use case is to leave the input undefined and then define a graph normally. The variables are only defined once the first t...
java
public String getAttribute(final DirContext ctx, final String dn, final String attributeName) throws NamingException { final Attributes attributes = ctx.getAttributes(dn); return getAttribute(attributes, attributeName); }
python
def hplogistic(self, data: ['SASdata', str] = None, by: str = None, cls: [str, list] = None, code: str = None, freq: str = None, id: str = None, model: str = None, out: [str, bool, 'SASda...
java
SubscriptionMessageHandler removeRemoteSubscription( SIBUuid12 topicSpace, String topic, SubscriptionMessageHandler messageHandler, boolean sendProxy) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "removeRemoteSubscription", new Object[] { ...
java
public FleetLaunchTemplateConfig withOverrides(FleetLaunchTemplateOverrides... overrides) { if (this.overrides == null) { setOverrides(new com.amazonaws.internal.SdkInternalList<FleetLaunchTemplateOverrides>(overrides.length)); } for (FleetLaunchTemplateOverrides ele : overrides) { ...
python
def api_handler(input_data, cloud, api, url_params=None, batch_size=None, **kwargs): """ Sends finalized request data to ML server and receives response. If a batch_size is specified, breaks down a request into smaller component requests and aggregates the results. """ url_params = url_params or...
python
def is_installable_dir(path): """Return True if `path` is a directory containing a setup.py file.""" if not os.path.isdir(path): return False setup_py = os.path.join(path, "setup.py") if os.path.isfile(setup_py): return True return False
python
def call(method, path, ret_type, ret_is_list=False, data=None, params=None, api_version=1): """ Generic function for calling a resource method and automatically dealing with serialization of parameters and deserialization of return values. @param method: method to call (must be bound to a resource; ...
python
def command_schema(self, name=None): ''' Prints current database schema (according sqlalchemy database model):: ./manage.py sqla:schema [name] ''' meta_name = table_name = None if name: if isinstance(self.metadata, MetaData): table_name = ...
python
def WriteFlowLogEntries(self, entries): """Writes flow output plugin log entries for a given flow.""" flow_ids = [(e.client_id, e.flow_id) for e in entries] for f in flow_ids: if f not in self.flows: raise db.AtLeastOneUnknownFlowError(flow_ids) for e in entries: dest = self.flow_lo...
java
byte []readBinary() throws IOException { TempOutputStream tos = new TempOutputStream(); while (true) { int ch = read(); int len; switch (ch) { default: _peek = ch; return tos.toByteArray(); case 0x20: case 0x21: case 0x22: case 0x23: cas...
java
@BetaApi public final Operation deleteTargetHttpsProxy( ProjectGlobalTargetHttpsProxyName targetHttpsProxy) { DeleteTargetHttpsProxyHttpRequest request = DeleteTargetHttpsProxyHttpRequest.newBuilder() .setTargetHttpsProxy(targetHttpsProxy == null ? null : targetHttpsProxy.toString()) ...
python
def _replace_numeric_markers(operation, string_parameters): """ Replaces qname, format, and numeric markers in the given operation, from the string_parameters list. Raises ProgrammingError on wrong number of parameters or bindings when using qmark. There is no error checking on numeric parameters. ...
python
def show_image(kwargs, call=None): ''' Show the details from aliyun image ''' if call != 'function': raise SaltCloudSystemExit( 'The show_images function must be called with ' '-f or --function' ) if not isinstance(kwargs, dict): kwargs = {} loca...
java
public Selection restrictArgumentType(int arg, Class type) { List<Function> lst; int i; Class tmp; Class[] paras; lst = new ArrayList<Function>(); for (i = 0; i < functions.length; i++) { paras = functions[i].getParameterTypes(); if (arg < paras.l...
python
def mouseReleaseEvent( self, event ): """ Overloads the base QGraphicsScene method to reset the selection \ signals and finish the connection. :param event <QMouseReleaseEvent> """ if event.button() == Qt.MidButton: self.setViewMode...
python
def fit(self, X, y=None): """Fit X into an embedded space. Optionally use y for supervised dimension reduction. Parameters ---------- X : array, shape (n_samples, n_features) or (n_samples, n_samples) If the metric is 'precomputed' X must be a square distance ...
java
@Nonnull public MockHttpServletRequest setParameter (@Nonnull final String sName, @Nullable final String [] aValues) { m_aParameters.remove (sName); m_aParameters.addAll (sName, aValues); return this; }
python
def _listen_commands(self): """Monitor new updates and send them further to self._respond_commands, where bot actions are decided. """ self._last_update = None update_body = {'timeout': 2} while True: latest = self._last_update # increase...
java
@Override public String validate(DTDValidatorBase v, char[] cbuf, int start, int end, boolean normalize) throws XMLStreamException { String ok = validateEnumValue(cbuf, start, end, normalize, mEnumValues); if (ok == null) { String val = new String(cbuf, start, (end-start)); ...
python
def connection_made(self, address): """When the connection is made, send something.""" logger.info("connection made to {}".format(address)) self.count = 0 self.connected = True self.transport.write(b'Echo Me')
python
def remove_event_detect(channel): """ :param channel: the channel based on the numbering system you have specified (:py:attr:`GPIO.BOARD`, :py:attr:`GPIO.BCM` or :py:attr:`GPIO.SUNXI`). """ _check_configured(channel, direction=IN) pin = get_gpio_pin(_mode, channel) event.remove_edge_dete...
java
@Override public GetSnapshotLimitsResult getSnapshotLimits(GetSnapshotLimitsRequest request) { request = beforeClientExecution(request); return executeGetSnapshotLimits(request); }
python
def n2l(c, l): "network to host long" l = U32(c[0] << 24) l = l | (U32(c[1]) << 16) l = l | (U32(c[2]) << 8) l = l | (U32(c[3])) return l
java
public INDArray getArr(boolean enforceExistence){ if(sameDiff.arrayAlreadyExistsForVarName(getVarName())) return sameDiff.getArrForVarName(getVarName()); //initialize value if it's actually a scalar constant (zero or 1 typically...) if(getScalarValue() != null && ArrayUtil.prod(getS...
java
public void enableMvc(ConfigurableListableBeanFactory factory, BundleContext context) { if (factory == null) { throw new IllegalArgumentException("Method argument factory must not be null."); } if (context == null) { throw new IllegalArgumentException("Method argument con...
python
async def multipart_parser(request, file_handler=default_file_handler): """ :param file_handler: callable to save file, this should always return the file path :return: dictionary containing files and data """ multipart_data = { 'files': {}, 'data': {} } if request.content_ty...
java
@Override void addEntry(int hash, K key, V value, int bucketIndex) { super.addEntry(hash, key, value, bucketIndex); // Remove eldest entry if instructed Entry<K, V> eldest = header.after; if (removeEldestEntry(eldest)) { removeEntryForKey(eldest.key); } }
python
def PartitioningQueryIterable(cls, client, query, options, database_link, partition_key): """ Represents a client side partitioning query iterable. This constructor instantiates a QueryIterable for client side partitioning queries, and sets _MultiCollectionQueryExecutionContext ...
python
def is_phy_iface(interface): """Returns True if interface is not virtual, otherwise False.""" if interface: sys_net = '/sys/class/net' if os.path.isdir(sys_net): for iface in glob.glob(os.path.join(sys_net, '*')): if '/virtual/' in os.path.realpath(iface): ...
python
def update(self): """Called before the listing renders """ super(BatchFolderContentsView, self).update() if self.on_batch_folder() and self.can_add_batches(): self.context_actions[_("Add")] = { "url": "createObject?type_name=Batch", "permissio...
python
def thread_lock(lock): """Return the thread lock for *lock*.""" if hasattr(lock, '_lock'): return lock._lock elif hasattr(lock, 'acquire'): return lock else: raise TypeError('expecting Lock/RLock')
java
public int[] getOccurrences() { int[] res = new int[this.occurrences.size()]; for (int i = 0; i < this.occurrences.size(); i++) { res[i] = this.occurrences.get(i); } return res; }
python
def eval_to_ast(self, e, n, extra_constraints=(), exact=None): """ Evaluate an expression, using the solver if necessary. Returns AST objects. :param e: the expression :param n: the number of desired solutions :param extra_constraints: extra constraints to apply to the solver ...
python
def connect_inputs(self, datas): """ Connects input ``Pipers`` to "datas" input data in the correct order determined, by the ``Piper.ornament`` attribute and the ``Dagger._cmp`` function. It is assumed that the input data is in the form of an iterator and that all inp...
java
public void marshall(ActivityTaskFailedEventAttributes activityTaskFailedEventAttributes, ProtocolMarshaller protocolMarshaller) { if (activityTaskFailedEventAttributes == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocol...
python
def pipe_item_split(tokens, loc): """Process a pipe item, which could be a partial, an attribute access, a method call, or an expression. Return (type, split) where split is - (expr,) for expression, - (func, pos_args, kwd_args) for partial, - (name, args) for attr/method, and - ...
java
public Set<Reference> getNonCopytoResult() { final Set<Reference> nonCopytoSet = new LinkedHashSet<>(128); nonCopytoSet.addAll(nonConrefCopytoTargets); for (final URI f : conrefTargets) { nonCopytoSet.add(new Reference(stripFragment(f), currentFileFormat())); } for (...
java
@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { if (changed || mNeedsResize) { int widthLimit = (right - left) - getCompoundPaddingLeft() - getCompoundPaddingRight(); int heightLimit = (bottom - top) - getCompoundPaddingBottom() - getCompoundPaddingTop(); resiz...
java
static float coslook(float a) { double d = a * (.31830989 * (float) COS_LOOKUP_SZ); int i = (int) d; return COS_LOOKUP[i] + ((float) (d - i)) * (COS_LOOKUP[i + 1] - COS_LOOKUP[i]); }
python
def get_remote_evb_mode(self, tlv_data): """Returns the EVB mode in the TLV. """ ret, parsed_val = self._check_common_tlv_format( tlv_data, "mode:", "EVB Configuration TLV") if not ret: return None mode_val = parsed_val[1].split()[0].strip() return mode_va...