text
stringlengths
78
104k
score
float64
0
0.18
def init_layout(self): """ Add all child widgets to the view """ super(AndroidViewGroup, self).init_layout() widget = self.widget i = 0 for child in self.children(): child_widget = child.widget if child_widget: if child.layout_param...
0.004587
def result_report_overall(self): """Report overall results Returns ------- str result report in string format """ results = self.results_overall_metrics() output = self.ui.section_header('Overall metrics (micro-average)', indent=2) + '\n' ...
0.004209
def params(self): """ A combined :class:`MultiDict` with values from :attr:`forms` and :attr:`GET`. File-uploads are not included. """ params = MultiDict(self.GET) for key, value in self.forms.iterallitems(): params[key] = value return params
0.006711
def renamecol(self, old, new): """ Rename column or color in-place. Method wraps:: tabular.spreadsheet.renamecol(self, old, new) """ spreadsheet.renamecol(self,old,new) for x in self.coloring.keys(): if old in self.coloring[x]: ...
0.01
def _run_down(self, path, migration, pretend=False): """ Run "down" a migration instance. """ migration_file = migration['migration'] instance = self._resolve(path, migration_file) if pretend: return self._pretend_to_run(instance, 'down') instance.d...
0.004556
def _default(self): """ Determines default. """ if self.ctx.ignore_default: if not self.ctx.ignore_missing: self.ctx.errors.missing() return NOT_SET if self.default is NOT_SET: if not self.ctx.ignore_missing: sel...
0.002532
def logical_name(self): """The logical name of the seat. This is an identifier to group sets of devices within the compositor. Returns: str: The logical name of this seat. """ pchar = self._libinput.libinput_seat_get_logical_name(self._handle) return string_at(pchar).decode()
0.030612
def read(sensor): """ distance of object in front of sensor in CM. """ import time import RPi.GPIO as GPIO # Disable any warning message such as GPIO pins in use GPIO.setwarnings(False) # use the values of the GPIO pins, and not the actual pin number # so if you connect to ...
0.006542
def stream(self, end=values.unset, start=values.unset, limit=None, page_size=None): """ Streams DataSessionInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results ar...
0.009373
def copy(self, target, timeout=500): """Copy or download this file to a new local file""" if self.metadata and 'encoding' in self.metadata: with io.open(target,'w', encoding=self.metadata['encoding']) as f: for line in self: f.write(line) else: ...
0.012097
def save_linked_hdds_info(self): """ Save linked cloned hard disks information. :returns: disk table information """ hdd_table = [] if self.linked_clone: if os.path.exists(self.working_dir): hdd_files = yield from self._get_all_hdd_files() ...
0.007186
def verify_refresh_request(request): """ Wrapper around JWTIdentityPolicy.verify_refresh which verify if the request to refresh the token is valid. If valid it returns the userid which can be used to create to create an updated identity with ``remember_identity``. Otherwise it raises an exceptio...
0.00135
def apply_voucher(self, voucher_code): ''' Applies the voucher with the given code to this cart. ''' # Try and find the voucher voucher = inventory.Voucher.objects.get(code=voucher_code.upper()) # Re-applying vouchers should be idempotent if voucher in self.cart.vouchers.all():...
0.004505
def matchesTripleConstraint(cntxt: Context, t: RDFTriple, expr: ShExJ.TripleConstraint, c: DebugContext) -> bool: """ expr is a TripleConstraint and: * t is a triple * t's predicate equals expr's predicate. Let value be t's subject if inverse is true, else t's object. * if inverse is true, t ...
0.004711
def get_timezone(as_timedelta=False): """ utility to get the machine's timezone """ try: offset_hour = -(time.altzone if time.daylight else time.timezone) except Exception as e: offset_hour = -(datetime.datetime.now() - datetime.datetime.utcnow()).seconds offset_...
0.001876
def generateBatches(tasks, givens): """ A function to generate a batch of commands to run in a specific order as to meet all the dependencies for each command. For example, the commands with no dependencies are run first, and the commands with the most deep dependencies are run last """ _rem...
0.001161
def set_power(self, value=False): """Power on or off the device.""" power = (yield from self.handle_set( self.API.get('power'), int(value))) return bool(power)
0.010256
def _parse_msg_for_influxdb(self, msgs): ''' >>> from logagg.forwarders import InfluxDBForwarder >>> idbf = InfluxDBForwarder('no_host', '8086', 'deadpool', ... 'chimichanga', 'logs', 'collection') >>> valid_log = [{u'data': {u'_force_this_as_field': ...
0.000781
def actual_params(self): """Dictionary of actual parameters of the model.""" params_to_select = {"model_id": "name", "response_column": "column_name", "training_frame": "name", "validation_frame": "name"} params ...
0.005128
def save_model(self, network=None, model_name='model', **kwargs): """Save model architecture and parameters into database, timestamp will be added automatically. Parameters ---------- network : TensorLayer layer TensorLayer layer instance. model_name : str ...
0.003939
def _prepare_patterns(self, pattern_dict): """Return two dictionaries: compiled and text prompts.""" dict_compiled = {} dict_text = {} dict_dscr = {} for platform, patterns in pattern_dict.items(): dict_text[platform] = {} dict_compiled[platform] = {} ...
0.003515
def read_total_energies(pathname,colnum): """Reads in the TEMP#/ener_box#.output file and parses it, returning an array of energies ARGUMENTS filename (string) - the path to the folder of the simulation colnum (integer) column the energy is found in """ print("--Reading total energies from %s...
0.014786
def get_distributed_builds(self, id, **kwargs): """ Gets the set of builds which produced artifacts distributed/shipped in a Product Milestone This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function ...
0.003132
def proQuestRecordParser(enRecordFile, recNum): """The parser [ProQuestRecords](../classes/ProQuestRecord.html#metaknowledge.proquest.ProQuestRecord) use. This takes an entry from [proQuestParser()](#metaknowledge.proquest.proQuestHandlers.proQuestParser) and parses it a part of the creation of a `ProQuestRecord`. ...
0.001443
def pmap(func, args, processes=None, callback=lambda *_, **__: None, **kwargs): """pmap(func, args, processes=None, callback=do_nothing, **kwargs) Parallel equivalent of ``map(func, args)``, with the additional ability of providing keyword arguments to func, and a callback function which is applied to ...
0.000611
def detect_django_settings(): """ Automatically try to discover Django settings files, return them as relative module paths. """ matches = [] for root, dirnames, filenames in os.walk(os.getcwd()): for filename in fnmatch.filter(filenames, '*settings.py'): full = os.path.join...
0.002994
def get_measurements(region, core_info, data, extra_offset=0): """ Get the complete measurement info from likwid's region info. Args: region: The region we took a measurement in. core_info: The core information. data: The raw data. extra_offset (int): default = 0 Return...
0.001024
def concatenate_textlcs_for_objectid(lcbasedir, objectid, aperture='TF1', postfix='.gz', sortby='rjd', normalize=True, ...
0.0014
def main(): """Provide the program's entry point when directly executed.""" if len(sys.argv) != 2: print("Usage: {} USERNAME".format(sys.argv[0])) return 1 caching_requestor = prawcore.Requestor( "prawcore_device_id_auth_example", session=CachingSession() ) authenticator = p...
0.000679
def clear_published_date(self): """Removes the puiblished date. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid...
0.00487
def parse_rev_args(receive_msg): """ parse reveive msgs to global variable """ global trainloader global testloader global net global criterion global optimizer # Loading Data logger.debug("Preparing data..") raw_train_data = torchvision.datasets.FashionMNIST( root="./d...
0.000987
def table_driven(self, in_data): """ The Standard table_driven CRC algorithm. """ # If the input data is a string, convert to bytes. if isinstance(in_data, str): in_data = [ord(c) for c in in_data] tbl = self.gen_table() register = self.DirectInit <<...
0.005804
def join_lines(iterator): """ Joins a line ending in '\' with the previous line. """ lines = [] for line in iterator: if not line.endswith('\\'): if lines: lines.append(line) yield ''.join(lines) lines = [] else: ...
0.002525
def encode_query_kwargs(dynamizer, kwargs): """ Encode query constraints in Dynamo format """ ret = {} for k, v in six.iteritems(kwargs): if '__' not in k: raise TypeError("Invalid query argument '%s'" % k) name, condition_key = k.split('__') # Convert ==None to IS_NULL ...
0.00114
def get_clear_pin(pinblock, account_number): """ Calculate the clear PIN from provided PIN block and account_number, which is the 12 right-most digits of card account number, excluding check digit """ raw_pinblock = bytes.fromhex(pinblock.decode('utf-8')) raw_acct_num = bytes.fromhex((b'0000' + acco...
0.006135
def from_obj(cls, container, file_obj): """Create from regular info object.""" # RFC 1123: Thu, 07 Jun 2007 18:57:07 GMT return cls(container, name=file_obj.name, size=file_obj.size, content_type=file_obj.content_type, l...
0.004545
def from_dict(cls, rules_dict: dict, default_rule=None, raise_error=False): """Allow loading of rule data from a dictionary.""" # Parse the rules stored in the dictionary rules = {k: _parser.parse_rule(v, raise_error) for k, v in rules_dict.items()} return cls(rules, d...
0.006024
def flatten_dict_items(dict_): """ Flattens keys / values in a heirarchical dictionary Example: >>> # ENABLE_DOCTEST >>> from utool.util_dict import * # NOQA >>> import utool as ut >>> item_list = [1, 2, 3, 4] >>> groupids_list = [[1, 1, 1, 2], [1, 2, 2, 2], [1,...
0.001078
def _update_adjustments_with_actuals(adjustments, guides): """ Update |Adjustment| instances in *adjustments* with actual values held in *guides*, a list of ``<a:gd>`` elements. Guides with a name that does not match an adjustment object are skipped. """ adjustments_by_na...
0.003125
def replace_project(self, owner, id, **kwargs): """ Create / Replace a project Create a project with a given id or completely rewrite the project, including any previously added files or linked datasets, if one already exists with the given id. This method makes a synchronous HTTP reques...
0.002636
def build_pdf(source, texinputs=[], builder=None): """Builds a LaTeX source to PDF. Will automatically instantiate an available builder (or raise a :class:`exceptions.RuntimeError` if none are available) and build the supplied source with it. Parameters are passed on to the builder's :meth:`~l...
0.000963
def _data_received(self, next_bytes): """Maintains buffer of bytes received from peer and extracts bgp message from this buffer if enough data is received. Validates bgp message marker, length, type and data and constructs appropriate bgp message instance and calls handler. :Pa...
0.000819
def create_token(cls, obj_id, data, expires_at=None): """Create the secret link token.""" if expires_at: s = TimedSecretLinkSerializer(expires_at=expires_at) else: s = SecretLinkSerializer() return s.create_token(obj_id, data)
0.007067
def switchCurrentView(self, viewType): """ Swaps the current tab view for the inputed action's type. :param action | <QAction> :return <XView> || None """ if not self.count(): return self.addView(viewType) # make sure we're not trying to sw...
0.003721
def _looks_like_libdoc_file(self, name): """Return true if an xml file looks like a libdoc file""" # inefficient since we end up reading the file twice, # but it's fast enough for our purposes, and prevents # us from doing a full parse of files that are obviously # not libdoc fil...
0.002857
def update(self, uid: str, data={}) -> str: """ Specifies new values for the customizable messages in a form (specified by form_id). You can format messages with bold (*bold*) and italic (_italic_) text. HTML tags are forbidden. Return a `str` based on success of change, `OK` on success,...
0.013544
def publish_workflow_status(self, workflow_uuid, status, logs='', message=None): """Publish workflow status using the configured. :param workflow_uudid: String which represents the workflow UUID. :param status: Integer which represents the status of the workflow,...
0.003584
def validate_resource(self, value): """Validate the network resource with exponential backoff""" def do_backoff(*args, **kwargs): """Call self._test_connection with exponential backoff, for self._max_tries attempts""" attempts = 0 while True: try: ...
0.004155
def prepare_destruction(self): """Prepares the model for destruction Un-registers itself as observer from the state machine and the root state """ try: self.relieve_model(self.state_machine_model) assert self.__buffered_root_state_model is self.state_machine_mode...
0.00603
def export_setting(file_path, qsettings=None): """Export InaSAFE's setting to a file. :param file_path: The file to write the exported setting. :type file_path: basestring :param qsettings: A custom QSettings to use. If it's not defined, it will use the default one. :type qsettings: qgis.P...
0.000998
def remote_get(self, remote='origin'): """Get the fetch and push URL for a specified remote name. :param remote: the remote name used to define the fetch and push URL :type remote: str :returns: remote name and url in tuple form :rtype: tuple """ try: ...
0.002445
async def verify_proof(self, proof_req: dict, proof: dict) -> str: """ Verify proof as Verifier. Raise AbsentRevReg if a proof cites a revocation registry that does not exist on the distributed ledger. :param proof_req: proof request as Verifier creates, as per proof_req_json above ...
0.003873
def crop_to_fit(self, image_size, view_size): """ Set cropping values in `p:blipFill/a:srcRect` such that an image of *image_size* will stretch to exactly fit *view_size* when its aspect ratio is preserved. """ self.blipFill.crop(self._fill_cropping(image_size, view_size)...
0.006231
def download_version(version, url=None, verbose=False, binary=False): """Download, extract, and build Cassandra tarball. if binary == True, download precompiled tarball, otherwise build from source tarball. """ assert_jdk_valid_for_cassandra_version(version) archive_url = ARCHIVE if CCM_CONFIG...
0.003557
def get_confirmation(self): """Get user confirmation to proceed.""" if self.clear: action = 'This will DELETE ALL FILES in this location!' else: action = 'This will overwrite existing files!' message = ( "\n" "You have requested to collect...
0.002353
async def open(self, wait_for_completion=True): """Open window. Parameters: * wait_for_completion: If set, function will return after device has reached target position. """ await self.set_position( position=Position(position_percent=0), ...
0.005495
def ndarray_to_imagedatadict(nparr): """ Convert the numpy array nparr into a suitable ImageList entry dictionary. Returns a dictionary with the appropriate Data, DataType, PixelDepth to be inserted into a dm3 tag dictionary and written to a file. """ ret = {} dm_type = None for k, v in ...
0.005741
def apply_i_umlaut(stem: str): """ Changes the vowel of the last syllable of the given stem according to an i-umlaut. >>> apply_i_umlaut("mæl") 'mæl' >>> apply_i_umlaut("lagð") 'legð' >>> apply_i_umlaut("vak") 'vek' >>> apply_i_umlaut("haf") 'hef' >>> apply_i_umlaut("buð") ...
0.002809
def all_optional_fields(self): """ Returns an iterator that traverses optional fields in all super types first, and then for this type. """ def optional_check(f): return is_nullable_type(f.data_type) or f.has_default return self._filter_fields(optional_check)
0.00627
async def commit( request: web.Request, session: UpdateSession) -> web.Response: """ Serves /update/:session/commit """ if session.stage != Stages.DONE: return web.json_response( data={'error': 'not-ready', 'message': f'System is not ready to commit the update ' ...
0.001618
def buildSkyCatalog(self): """ Convert sky catalog for all chips into a single catalog for the entire field-of-view of this image. """ self.all_radec = None self.all_radec_orig = None ralist = [] declist = [] fluxlist = [] idlist = [] f...
0.004815
def read(self, frames, raw=False): """Read samples from an input stream. The function does not return until the required number of frames has been read. This may involve waiting for the operating system to supply the data. If raw data is requested, the raw cffi data buffer is ...
0.002421
def data_check(data,target): """ Checks data type Parameters ---------- data : pd.DataFrame or np.array Field to specify the time series data that will be used. target : int or str Target column Returns ---------- transformed_data : np.array Raw dat...
0.010613
def cleanup_attacks_with_zero_images(self): """Cleans up data about attacks which generated zero images.""" print_header('Cleaning up attacks which generated 0 images.') # find out attack work to cleanup self.adv_batches.init_from_datastore() self.attack_work.read_all_from_datastore() new_attack...
0.002584
def setup(cls, client_id, client_secret): """Configure client in session """ cls.client_id = client_id cls.client_secret = client_secret
0.011905
def _onShortcutPasteLine(self): """Paste lines from the clipboard """ lines = self.lines[self._selectedLinesSlice()] text = QApplication.clipboard().text() if text: with self: if self.textCursor().hasSelection(): startBlockNumber, e...
0.00438
def prototype_adjacency(self, n_block_features, alpha): """Build a new graph. Doc for ".create(n_features, alpha)" Parameters ----------- n_features : int alpha : float (0,1) The complexity / sparsity factor. This is (1 - alpha_0) in sklearn.dat...
0.002564
def configure_discovery(graph): """ Build a singleton endpoint that provides a link to all search endpoints. """ ns = Namespace( subject=graph.config.discovery_convention.name, ) convention = DiscoveryConvention(graph) convention.configure(ns, discover=tuple()) return ns.subject
0.003125
def update_scheme(current, target): """ Take the scheme from the current URL and applies it to the target URL if the target URL startswith // or is missing a scheme :param current: current URL :param target: target URL :return: target URL with the current URLs scheme """ target_p = urlpa...
0.001443
def map_announce2alias(url): """ Get tracker alias for announce URL, and if none is defined, the 2nd level domain. """ import urlparse # Try to find an exact alias URL match and return its label for alias, urls in announce.items(): if any(i == url for i in urls): return alias ...
0.003755
def mins(self): """ Returns de minimum values of x, y, z as a numpy array """ return np.array([self.x_min, self.y_min, self.z_min])
0.012903
def findsource(object): """Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. ...
0.004578
def get_mean_and_stddevs(self, sites, rup, dists, imt, stddev_types): """ See :meth:`superclass method <.base.GroundShakingIntensityModel.get_mean_and_stddevs>` for spec of input and result values. """ # extract dictionaries of coefficients specific to required # ...
0.003717
def to_tess(obj): ''' to_tess(obj) yields a Tesselation object that is equivalent to obj; if obj is a tesselation object already and no changes are requested (see options) then obj is returned unmolested. The following objects can be converted into tesselations: * a tesselation object * a...
0.014941
def server_rules(self): """ Reads the server rules from the client and returns it. """ sftp = self.client.open_sftp() try: rule_path = self.rule_location try: stat_entry = sftp.stat(rule_path) if stat.S_ISDIR(stat_en...
0.00313
def feedforward(self): """ Soon to be depriciated. Needed to make the SP implementation compatible with some older code. """ m = self._numInputs n = self._numColumns W = np.zeros((n, m)) for i in range(self._numColumns): self.getPermanence(i, W[i, :]) return W
0.006452
def get_interface_switchport_output_switchport_acceptable_frame_type(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") get_interface_switchport = ET.Element("get_interface_switchport") config = get_interface_switchport output = ET.SubElement(get_in...
0.004324
def classorder(self,classes): """Return a list of class IDs in order for presentational purposes: order is determined first and foremost by explicit ordering, else alphabetically by label or as a last resort by class ID""" return [ classid for classid, classitem in sorted( ((classid, classitem) for clas...
0.02144
def convert_frequency(frequency): """return the number of seconds that a certain frequency string represents. For example: `1d` means 1 day which means 60 * 60 * 24 seconds. The recognized formats are: 10d : 10 days 3m : 3 minutes 12h : 12 hours """ number = int(re.findal...
0.004926
def create_worker(self, func, interval, *args, **kwargs): """Spawn a worker thread running func. The worker will be automatically be started when start() is called and terminated when stop() is called on this object. This must be called only from the main thread, not from a worker threa...
0.00202
def comment (self, s, **args): """ Write SQL comment. """ self.write(u"-- ") self.writeln(s=s, **args)
0.021127
def set(name, data, **kwargs): ''' Set debconf selections .. code-block:: yaml <state_id>: debconf.set: - name: <name> - data: <question>: {'type': <type>, 'value': <value>} <question>: {'type': <type>, 'value': <value>} <s...
0.001555
def from_label(cls, label): r"""Take pauli string to construct pauli. The qubit index of pauli label is q_{n-1} ... q_0. E.g., a pauli is $P_{n-1} \otimes ... \otimes P_0$ Args: label (str): pauli label Returns: Pauli: the constructed pauli Rai...
0.003086
def time_series_h5(timefile, colnames): """Read temporal series HDF5 file. If :data:`colnames` is too long, it will be truncated. If it is too short, additional column names will be deduced from the content of the file. Args: timefile (:class:`pathlib.Path`): path of the TimeSeries.h5 file. ...
0.000978
def pkt2uptime(pkt, HZ=100): """Calculate the date the machine which emitted the packet booted using TCP timestamp # noqa: E501 pkt2uptime(pkt, [HZ=100])""" if not isinstance(pkt, Packet): raise TypeError("Not a TCP packet") if isinstance(pkt, NoPayload): raise TypeError("Not a TCP packet")...
0.001582
def send(self, message, arguments=None): """Send a message to the Instance. Message arguments must be provided as a string. """ output = clips.data.DataObject(self._env) instance = clips.data.DataObject( self._env, dtype=CLIPSType.INSTANCE_ADDRESS) instance....
0.003711
def get_variants(self, arch=None, types=None, recursive=False): """ Return all variants of given arch and types. Supported variant types: self - include the top-level ("self") variant as well addon variant optional """ types = ...
0.003448
def _annotation_stmt(self, stmt: Statement, sctx: SchemaContext) -> None: """Handle annotation statement.""" if not sctx.schema_data.if_features(stmt, sctx.text_mid): return dst = stmt.find1("description") self.annotations[(stmt.argument, sctx.default_ns)] = Annotation( ...
0.004608
def _kip_vline(self, modstart, modstop, sparse, outfile, xlims=[0.,0.], ylims=[0.,0.], ixaxis='log_time_left', mix_zones=5, burn_zones=50): """ *** DEPRECIATED and hence UNSUPPORTED *** This function creates a Kippenhahn plot with energy flux using ver...
0.014369
def verify(self, obj): """Verify that the object conforms to this verifier's schema Args: obj (object): A python object to verify Raises: ValidationError: If there is a problem verifying the dictionary, a ValidationError is thrown with at least the reaso...
0.006734
def add_column(self, data, column_name="", inplace=False): """ Returns an SFrame with a new column. The number of elements in the data given must match the length of every other column of the SFrame. If no name is given, a default name is chosen. If inplace == False (default) th...
0.002644
def gt(min_value, # type: Any strict=False # type: bool ): """ 'Greater than' validation_function generator. Returns a validation_function to check that x >= min_value (strict=False, default) or x > min_value (strict=True) :param min_value: minimum value for x :param strict: Boole...
0.00579
def stepThroughJsWaf_selenium_chromium(self, url, titleContains='', titleNotContains=''): ''' Use Selenium+SeleniumChromium to access a resource behind cloudflare protection. Params: ``url`` - The URL to access that is protected by cloudflare ``titleContains`` - A string that is in the title of the protect...
0.025679
def plot_file(self, name: str=None, time: int=None) -> None: """ Plot specific time for provided datafile. If no time provided, will plot middle. :param: savefile name :param: time/data column """ if not time: time = int(len(self.times) / 2) i...
0.010118
def get_job(job_id): """Return the job with the given job_id as a dict. The dict also includes any metadata or logs associated with the job. Returns None instead of a dict if there's no job with the given job_id. The keys of a job dict are: "job_id": The unique identifier for the job (unicode) ...
0.000313
def restore_state(self, system): """Called after unpickling to restore some attributes manually.""" super().restore_state(system) BaseSpaceContainerImpl.restore_state(self, system) for cells in self._cells.values(): cells.restore_state(system)
0.006944
def pcdata(self, tup_tree): """ Return the concatenated character data within the child nodes of a tuple tree node, as a unicode string. Whitespace is preserved. The child nodes must be text nodes (no element nodes). """ try: data = u''.join(tup_tree[2]) ...
0.00319
def refresh(self, *args, **kwargs): """Refresh the model :returns: None :rtype: None :raises: None """ self.prjbrws.set_model(self.create_prj_model()) if self.get_current_file(): self.set_to_current() else: self.init_selection()
0.006309
def ends_with(self, suffix): """ Find all words ending with a suffix. Args: suffix: A suffix to be searched for. Returns: A list of all words found. """ suffix = suffix.lower() found_words = [] res = cgaddag.gdg_ends_with(self.gd...
0.003413
def add_port_to_free_pool(self, port): """Add a new port to the free pool for allocation.""" if port < 1 or port > 65535: raise ValueError( 'Port must be in the [1, 65535] range, not %d.' % port) port_info = _PortInfo(port=port) self._port_queue.append(port_in...
0.006192