text
stringlengths
78
104k
score
float64
0
0.18
def _CreateExpandedDSA(client, ad_group_id): """Creates the expanded Dynamic Search Ad. Args: client: an AdwordsClient instance. ad_group_id: an integer ID of the ad group in which the DSA is added. """ # Get the AdGroupAdService. ad_group_ad_service = client.GetService('AdGroupAdService') # Creat...
0.009002
def base_station(self): """Return the base_station assigned for the given camera.""" try: return list(filter(lambda x: x.device_id == self.parent_id, self._session.base_stations))[0] except (IndexError, AttributeError): return None
0.006452
def run(self, task, **kwargs): """ This is a utility method to call a task from within a task. For instance: def grouped_tasks(task): task.run(my_first_task) task.run(my_second_task) nornir.run(grouped_tasks) This method will ensure the ...
0.004721
def pipool(name, ivals): """ This entry point provides toolkit programmers a method for programmatically inserting integer data into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pipool_c.html :param name: The kernel pool name to associate with values. :type name: st...
0.001751
def ip_hide_community_list_holder_community_list_extended_ip_action(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") ip = ET.SubElement(config, "ip", xmlns="urn:brocade.com:mgmt:brocade-common-def") hide_community_list_holder = ET.SubElement(ip, "hide-com...
0.005676
def validate_parsed_json(obj_json, options=None): """ Validate objects from parsed JSON. This supports a single object, or a list of objects. If a single object is given, a single result is returned. Otherwise, a list of results is returned. If an error occurs, a ValidationErrorResults instance ...
0.001761
async def update_offer(self, **params): """Updates offer after transaction confirmation Accepts: - transaction id - coinid - confirmed (boolean flag) """ logging.debug("\n\n -- Update offer. ") if params.get("message"): params = json.loads(params.get("message", "{}")) if not params: return...
0.046406
def SetLowerTimestamp(cls, timestamp): """Sets the lower bound timestamp.""" if not hasattr(cls, '_lower'): cls._lower = timestamp return if timestamp < cls._lower: cls._lower = timestamp
0.018349
def replace_vcf_info(keyword, annotation, variant_line=None, variant_dict=None): """Replace the information of a info field of a vcf variant line or a variant dict. Arguments: variant_line (str): A vcf formatted variant line variant_dict (dict): A variant dictionary keyword...
0.006195
def add_contact(self, segment_id, contact_id): """ Add a contact to the segment :param segment_id: int Segment ID :param contact_id: int Contact ID :return: dict|str """ response = self._client.session.post( '{url}/{segment_id}/contact/add/{contact_i...
0.003861
def find_user_by_username(self, username): """Find a User object by username.""" return self.db_adapter.ifind_first_object(self.UserClass, username=username)
0.017341
def create_tensorprod_function(funcs): """Combine 1-D rules into multivariate rule using tensor product.""" dim = len(funcs) def tensprod_rule(order, part=None): """Tensor product rule.""" order = order*numpy.ones(dim, int) values = [funcs[idx](order[idx]) for idx in range(dim)] ...
0.001541
def post_mortem(trace_back=None, exc_info=None): """ Breaks on a traceback and send all execution information to the debugger client. If the interpreter is handling an exception at this traceback, exception information is sent to _line_tracer() which will transmit it to the debugging client. Call...
0.010701
def sina_download(url, output_dir='.', merge=True, info_only=False, **kwargs): """Downloads Sina videos by URL. """ if 'news.sina.com.cn/zxt' in url: sina_zxt(url, output_dir=output_dir, merge=merge, info_only=info_only, **kwargs) return vid = match1(url, r'vid=(\d+)') if vid is Non...
0.005728
def break_array(a, threshold=numpy.pi, other=None): """Create a array which masks jumps >= threshold. Extra points are inserted between two subsequent values whose absolute difference differs by more than threshold (default is pi). Other can be a secondary array which is also masked according to ...
0.004453
def remove_root(self, model, setter=None): ''' Remove a model as root model from this Document. Changes to this model may still trigger ``on_change`` callbacks on this document, if the model is still referred to by other root models. Args: model (Model) : ...
0.002306
def _apply_data(self, f, ts, reverse=False): """ Convenience function for all of the math stuff. """ # TODO: needs to catch np numeric types? if isinstance(ts, (int, float)): d = ts * np.ones(self.shape[0]) elif ts is None: d = None elif np...
0.003021
def get_pkg_version(pkg_name, parse=False): """ Verify and get installed python package version. :param pkg_name: python package name :param parse: parse version number with pkg_resourc.parse_version -function :return: None if pkg is not installed, otherwise version as a string or parsed ver...
0.00165
def close(args): """ %prog close scaffolds.fasta PE*.fastq Run GapFiller to fill gaps. """ p = OptionParser(close.__doc__) p.set_home("gapfiller") p.set_cpus() opts, args = p.parse_args(args) if len(args) < 1: sys.exit(not p.print_help()) scaffolds = args[0] libtxt...
0.001821
def _setup_profiles(self, conversion_profiles): ''' Add given conversion profiles checking for invalid profiles ''' # Check for invalid profiles for key, path in conversion_profiles.items(): if isinstance(path, str): path = (path, ) for lef...
0.002635
def configure(ctx, helper, edit): ''' Update configuration ''' ctx.obj.config = ConfigFile(ctx.obj.config_file) if edit: ctx.obj.config.edit_config_file() return if os.path.isfile(ctx.obj.config.config_file): ctx.obj.config.read_config() if ctx.obj.profile is None...
0.000843
def render(self, surf): """Render the button""" if self.clicked: icon = self.icon_pressed else: icon = self.icon surf.blit(icon, self)
0.010417
def list_user_participants(self, appointment_group, **kwargs): """ List user participants in this appointment group. .. warning:: .. deprecated:: 0.10.0 Use :func:`canvasapi. canvas.Canvas.get_user_participants` instead. :calls: `GET /api/v1/appointment_grou...
0.005941
def setvar(parser, token): """ {% setvar <var_name> to <var_value> %} """ try: setvar, var_name, to_, var_value = token.split_contents() except ValueError: raise template.TemplateSyntaxError('Invalid arguments for %r' % token.split_contents()[0]) return SetVarNode(var_name, var_value)
0.00627
def open(self, inp, opts=None): """Use this to set what file to read from. """ if isinstance(inp, io.TextIOWrapper): self.input = inp elif isinstance(inp, 'string'.__class__): # FIXME self.name = inp self.input = open(inp, 'r') else: rais...
0.006881
def offset(self, offset): """Fetch results after `offset` value""" clone = self._clone() if isinstance(offset, int): clone._offset = offset return clone
0.010101
def get_serializer_in(self, *args, **kwargs): """ Return the serializer instance that should be used for validating and deserializing input, and for serializing output. """ serializer_class = self.get_serializer_class_in() kwargs['context'] = self.get_serializer_context()...
0.00542
def _remove_old_stderr_files(self): """ Remove stderr files left by previous Spyder instances. This is only required on Windows because we can't clean up stderr files while Spyder is running on it. """ if os.name == 'nt': tmpdir = get_temp_dir() ...
0.003497
def getdata(self, blc=(), trc=(), inc=()): """Get image data. Using the arguments blc (bottom left corner), trc (top right corner), and inc (stride) it is possible to get a data slice. The data is returned as a numpy array. Its dimensionality is the same as the dimensionality o...
0.003788
def swap(self): '''Swap stereo channels. If the input is not stereo, pairs of channels are swapped, and a possible odd last channel passed through. E.g., for seven channels, the output order will be 2, 1, 4, 3, 6, 5, 7. See Also ---------- remix ''' eff...
0.004535
def max_height(self): """ :return: The max height of the rendered text (across all images if an animated renderer). """ if len(self._plain_images) <= 0: self._convert_images() if self._max_height == 0: for image in self._plain_images: ...
0.004854
def ProcessXMLAnnotation(xml_file): """Process a single XML file containing a bounding box.""" # pylint: disable=broad-except try: tree = ET.parse(xml_file) except Exception: print('Failed to parse: ' + xml_file, file=sys.stderr) return None # pylint: enable=broad-except root = tree.getroot() ...
0.006884
def process_lists(self): """Do any preprocessing of the lists.""" for l1_idx, obj1 in enumerate(self.l1): for l2_idx, obj2 in enumerate(self.l2): if self.equal(obj1, obj2): self.matches.add((l1_idx, l2_idx))
0.00738
def get_segments(self, addr, size): """ Get a segmented memory region based on AbstractLocation information available from VSA. Here are some assumptions to make this method fast: - The entire memory region [addr, addr + size] is located within the same MemoryRegion - Th...
0.006031
def FileEntryExistsByPathSpec(self, path_spec): """Determines if a file entry for a path specification exists. Args: path_spec (PathSpec): path specification. Returns: bool: True if the file entry exists. """ # All checks for correct path spec is done in SQLiteBlobFile. # Therefore...
0.004566
def set_description(self, description, lang=None): """Sets the `description` metadata property on your Thing/Point. Only one description is allowed per language, so any other descriptions in this language are removed before adding this one Raises `ValueError` containing an error message if the...
0.006623
def build(self, X, Y, w=None, edges=None): """ Assigns data to this object and builds the Morse-Smale Complex @ In, X, an m-by-n array of values specifying m n-dimensional samples @ In, Y, a m vector of values specifying the output responses correspond...
0.00092
def process_summary(summaryfile, **kwargs): """Extracting information from an albacore summary file. Only reads which have a >0 length are returned. The fields below may or may not exist, depending on the type of sequencing performed. Fields 1-14 are for 1D sequencing. Fields 1-23 for 2D sequencin...
0.002738
def get_intervals(self, sort=False): """Give all the intervals or points. :param bool sort: Flag for yielding the intervals or points sorted. :yields: All the intervals """ for i in sorted(self.intervals) if sort else self.intervals: yield i
0.006803
def _populate(cls, as_of=None, delete=False): """Populate the table with billing cycles starting from `as_of` Args: as_of (date): The date at which to begin the populating delete (bool): Should future billing cycles be deleted? """ billing_cycle_helper = get_bi...
0.003101
def load_commodities(self): """ Load the commodities for Amounts in this object. """ base, quote = self.market.split("_") if isinstance(self.price, Amount): self.price = Amount("{0:.8f} {1}".format(self.price.to_double(), quote)) else: self.price =...
0.007786
def copy_to(self, new_key, bucket=None): """Copies this item to the specified new key. Args: new_key: the new key to copy this item to. bucket: the bucket of the new item; if None (the default) use the same bucket. Returns: An Item corresponding to new key. Raises: Exception if ...
0.009788
def Lewis(D=None, alpha=None, Cp=None, k=None, rho=None): r'''Calculates Lewis number or `Le` for a fluid with the given parameters. .. math:: Le = \frac{k}{\rho C_p D} = \frac{\alpha}{D} Inputs can be either of the following sets: * Diffusivity and Thermal diffusivity * Diffusivity, heat...
0.000577
def top(**kwargs): ''' Look up top data in Cobbler for a minion. ''' url = __opts__['cobbler.url'] user = __opts__['cobbler.user'] password = __opts__['cobbler.password'] minion_id = kwargs['opts']['id'] log.info("Querying cobbler for information for %r", minion_id) try: se...
0.001493
def query(self, tablename, attributes=None, consistent=False, count=False, index=None, limit=None, desc=False, return_capacity=None, filter=None, filter_or=False, exclusive_start_key=None, **kwargs): """ Perform an index query on a table This uses the older version o...
0.00145
def kernel_pull(self, user_name, kernel_slug, **kwargs): # noqa: E501 """Pull the latest code from a kernel # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.kernel_pull(user_name, ke...
0.002041
def discretize_arc(points, close=False, scale=1.0): """ Returns a version of a three point arc consisting of line segments. Parameters --------- points : (3, d) float Points on the arc where d in [2,3] close : boolean If True close the arc ...
0.000443
def _read_mode_ts(self, size, kind): """Read Time Stamp option. Positional arguments: * size - int, length of option * kind - int, 68 (TS) Returns: * dict -- extracted Time Stamp (TS) option Structure of Timestamp (TS) option [RFC 791]: ...
0.001211
def create_parser(subparsers): """ create argument parser """ parser = subparsers.add_parser( 'clusters', help='Display existing clusters', usage="%(prog)s [options]", add_help=True) args.add_verbose(parser) args.add_tracker_url(parser) parser.set_defaults(subcommand='clusters') retu...
0.021021
def simple_paginate(self, per_page=15, current_page=None, columns=None): """ Paginate the given query. :param per_page: The number of records per page :type per_page: int :param current_page: The current page of results :type current_page: int :param columns: T...
0.002937
def _severity_by_name(name): """ Return the severity integer value by it's name. If not found, return 'information'. :rtype: int """ for intvalue, sevname in SEVERITY.items(): if name.lower() == sevname: return intvalue return 1
0.007117
def jsonAsCti(dct): """ Config tree item JSON decoding function. Returns a CTI given a dictionary of attributes. The full class name of desired CTI class should be in dct['_class_'']. """ if '_class_'in dct: full_class_name = dct['_class_'] # TODO: how to handle the full_class_name? ...
0.011682
def get_output(db, output_id): """ :param db: a :class:`openquake.server.dbapi.Db` instance :param output_id: ID of an Output object :returns: (ds_key, calc_id, dirname) """ out = db('SELECT output.*, ds_calc_dir FROM output, job ' 'WHERE oq_job_id=job.id AND output.id=?x', output_i...
0.002481
def connectShell(connection, protocol): """Connect a Protocol to a ssh shell session """ deferred = connectSession(connection, protocol) @deferred.addCallback def requestSubsystem(session): return session.requestShell() return deferred
0.007491
def wait_for_ribcl_firmware_update_to_complete(ribcl_object): """Continuously checks for iLO firmware update to complete.""" def is_ilo_reset_initiated(): """Checks for initiation of iLO reset Invokes the ``get_product_name`` api and returns i) True, if exception gets raised as tha...
0.000792
def split_fragment(cls, fragment): """A heuristic used to split a string into version name/fragment: >>> SourcePackage.split_fragment('pysolr-2.1.0-beta') ('pysolr', '2.1.0-beta') >>> SourcePackage.split_fragment('cElementTree-1.0.5-20051216') ('cElementTree', '1.0.5-20051216') >...
0.004444
def repeat_op(repetitions, inputs, op, *args, **kwargs): """Build a sequential Tower starting from inputs by using an op repeatedly. It creates new scopes for each operation by increasing the counter. Example: given repeat_op(3, _, ops.conv2d, 64, [3, 3], scope='conv1') it will repeat the given op under the ...
0.00533
def set_unobserved_before(self,tlen,qlen,nt,p): """Set the unobservable sequence data before this base :param tlen: target homopolymer length :param qlen: query homopolymer length :param nt: nucleotide :param p: p is the probability of attributing this base to the unobserved error :type tlen: i...
0.020501
def _createAction(self, widget, iconFileName, text, shortcut, slot): """Create QAction with given parameters and add to the widget """ icon = qutepart.getIcon(iconFileName) action = QAction(icon, text, widget) action.setShortcut(QKeySequence(shortcut)) action.setShortcutC...
0.004535
async def vcx_init(config_path: str) -> None: """ Initializes VCX with config file. :param config_path: String Example: await vcx_init('/home/username/vcxconfig.json') :return: """ logger = logging.getLogger(__name__) if not hasattr(vcx_init, "cb"): logger.debug("vcx_init: C...
0.001548
def update_dns_ha_resource_params(resources, resource_params, relation_id=None, crm_ocf='ocf:maas:dns'): """ Configure DNS-HA resources based on provided configuration and update resource dictionaries for the HA relation. @param resources:...
0.000915
def scatter(self, x, y, xerr=[], yerr=[], mark='o', markstyle=None): """Plot a series of points. Plot a series of points (marks) that are not connected by a line. Shortcut for plot with linestyle=None. :param x: array containing x-values. :param y: array containing y-values. ...
0.001969
def _find_experiment_tag(self): """Finds the experiment associcated with the metadata.EXPERIMENT_TAG tag. Caches the experiment if it was found. Returns: The experiment or None if no such experiment is found. """ with self._experiment_from_tag_lock: if self._experiment_from_tag is None...
0.004225
def replace_namespaced_resource_quota(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_resource_quota # noqa: E501 replace the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request,...
0.001265
def make_fig(self): """ Figure constructor, called before `self.plot()` """ self.fig = plt.figure(figsize=(8, 4)) self._all_figures.append(self.fig)
0.010638
def is_user(self, organisation_id): """Is the user valid and approved in this organisation""" return (self._has_role(organisation_id, self.roles.user) or self.is_org_admin(organisation_id))
0.00905
def getThirdPartyLibLinkerFlags(self, libs): """ Retrieves the linker flags for building against the Unreal-bundled versions of the specified third-party libraries """ fmt = PrintingFormat.singleLine() if libs[0] == '--multiline': fmt = PrintingFormat.multiLine() libs = libs[1:] includeLibs = True ...
0.040909
def delete(cls, filename, offset=None): """Delete ID3v1 tag from a file (if present).""" with fileutil.opened(filename, "rb+") as file: if offset is None: file.seek(-128, 2) else: file.seek(offset) offset = file.tell() data ...
0.004454
def protocol_tree_items(self): """ :rtype: dict[int, list of ProtocolTreeItem] """ result = {} for i, group in enumerate(self.rootItem.children): result[i] = [child for child in group.children] return result
0.007463
def getQRArray(text, errorCorrection): """ Takes in text and errorCorrection (letter), returns 2D array of the QR code""" # White is True (1) # Black is False (0) # ECC: L7, M15, Q25, H30 # Create the object qr = pyqrcode.create(text, error=errorCorrection) # Get the terminal representation and split by lines ...
0.031515
def _concrete_acl(self, acl_doc): """Concretize an ACL document. :param dict acl_doc: A document describing an ACL entry. Should come from the API. :returns: An :py:class:`Acl`, or None. :rtype: :py:class:`bases.BaseInstance` """ if not isinstance(acl_doc, dict): ...
0.005794
def start_roles(self, service_name, deployment_name, role_names): ''' Starts the specified virtual machines. service_name: The name of the service. deployment_name: The name of the deployment. role_names: The names of the roles, as an enumerab...
0.002755
def _render_image(self, spec, container_args, alt_text=None): """ Render an image specification into an <img> tag """ try: path, image_args, title = image.parse_image_spec(spec) except Exception as err: # pylint: disable=broad-except logger.exception("Got error on spec ...
0.002871
def is_available(self, fname): """ Check availability of a remote file without downloading it. Use this method when working with large files to check if they are available for download. Parameters ---------- fname : str The file name (relative to the...
0.005413
def get_list_from_file(file_name): """read the lines from a file into a list""" with open(file_name, mode='r', encoding='utf-8') as f1: lst = f1.readlines() return lst
0.005348
def get_raw_path(self): """Returns the raw path to the mounted disk image, i.e. the raw :file:`.dd`, :file:`.raw` or :file:`ewf1` file. :rtype: str """ if self.disk_mounter == 'dummy': return self.paths[0] else: if self.disk_mounter == 'avfs' and...
0.007502
def sectorPerformanceDF(token='', version=''): '''This returns an array of each sector and performance for the current trading day. Performance is based on each sector ETF. https://iexcloud.io/docs/api/#sector-performance 8am-5pm ET Mon-Fri Args: token (string); Access token version (s...
0.003976
def generate_ecc_signing_key(algorithm): """Returns an ECC signing key. :param algorithm: Algorithm object which determines what signature to generate :type algorithm: aws_encryption_sdk.identifiers.Algorithm :returns: Generated signing key :raises NotSupportedError: if signing algorithm is not sup...
0.006144
def calculate_checksum(self): """Calculate ISBN checksum. Returns: ``str``: ISBN checksum value """ if len(self.isbn) in (9, 12): return calculate_checksum(self.isbn) else: return calculate_checksum(self.isbn[:-1])
0.006849
def _call(self, x): """Return ``self(x)``.""" x_norm = self.pointwise_norm(x).ufuncs.max() if x_norm > 1: return np.inf else: return 0
0.010471
def writeAnnotation(self, onset_in_seconds, duration_in_seconds, description, str_format='utf-8'): """ Writes an annotation/event to the file """ if str_format == 'utf-8': if duration_in_seconds >= 0: return write_annotation_utf8(self.handle, np.round(onset_in...
0.007284
def execute_lines(self, lines): """ Execute a set of lines as multiple command lines: multiple lines of text to be executed as single commands """ for line in lines.splitlines(): stripped_line = line.strip() if stripped_line.startswith('#'): ...
0.004329
def find_entry_point(site_packages: Path, console_script: str) -> str: """Find a console_script in a site-packages directory. Console script metadata is stored in entry_points.txt per setuptools convention. This function searches all entry_points.txt files and returns the import string for a given cons...
0.001582
def set_config_token_from_env(section, token, config): '''Given a config section and token, checks for an appropriate environment variable. If the variable exists, sets the config entry to its value. The environment variable checked is of the form SECTION_TOKEN, all upper case, with any dots replac...
0.001441
def precision(y_true, y_score, k=None, return_bounds=False): """ If return_bounds is False then returns precision on the labeled examples in the top k. If return_bounds is True the returns a tuple containing: - precision on the labeled examples in the top k - number of labeled exampl...
0.001017
def matches_section(section_name): """Decorator for SectionSchema classes to define the mapping between a config section schema class and one or more config sections with matching name(s). .. sourcecode:: @matches_section("foo") class FooSchema(SectionSchema): pass ...
0.000635
def delete(self, delete_contents=False): """Issues a request to delete the dataset. Args: delete_contents: if True, any tables and views in the dataset will be deleted. If False and the dataset is non-empty an exception will be raised. Returns: None on success. Raises: Excep...
0.010479
def do_handshake(self, timeout): 'perform a SSL/TLS handshake' tout = _timeout(timeout) if not self._blocking: return self._sslobj.do_handshake() while 1: try: return self._sslobj.do_handshake() except ssl.SSLError, exc: ...
0.002928
def str_replace(x, pat, repl, n=-1, flags=0, regex=False): """Replace occurences of a pattern/regex in a column with some other string. :param str pattern: string or a regex pattern :param str replace: a replacement string :param int n: number of replacements to be made from the start. If -1 make all r...
0.003419
def ConsultarTiposCategoriaReceptor(self, sep="||"): "Obtener el código y descripción para cada tipos de categorías de receptor" ret = self.client.consultarTiposCategoriaReceptor( authRequest={ 'token': self.Token, 'sign': self.Sign, ...
0.005571
def _neg_bounded_fun(fun, bounds, x, args=()): """ Wrapper for bounding and taking the negative of `fun` for the Nelder-Mead algorithm. JIT-compiled in `nopython` mode using Numba. Parameters ---------- fun : callable The objective function to be minimized. `fun(x, *args) ->...
0.000931
def iso_mesh_line(vertices, tris, vertex_data, levels): """Generate an isocurve from vertex data in a surface mesh. Parameters ---------- vertices : ndarray, shape (Nv, 3) Vertex coordinates. tris : ndarray, shape (Nf, 3) Indices of triangular element into the vertices array. ve...
0.000328
def recap(self, nc): # type: (int) -> None """recap changes the maximum size limit of the dynamic table. It also proceeds to a resize(), if the new size is lower than the previous one. @param int nc: the new cap of the dynamic table (that is the maximum-maximum size) # noqa: E501 ...
0.00487
def create_normal_logq(self,z): """ Create logq components for mean-field normal family (the entropy estimate) """ means, scale = self.get_means_and_scales() return ss.norm.logpdf(z,loc=means,scale=scale).sum()
0.024
def _audio_response_for_run(self, tensor_events, run, tag, sample): """Builds a JSON-serializable object with information about audio. Args: tensor_events: A list of image event_accumulator.TensorEvent objects. run: The name of the run. tag: The name of the tag the audio entries all belong to...
0.002892
def addUsersToGroup(self, user_ids, thread_id=None): """ Adds users to a group. :param user_ids: One or more user IDs to add :param thread_id: Group ID to add people to. See :ref:`intro_threads` :type user_ids: list :raises: FBchatException if request failed """ ...
0.00289
def get_compliance_expansion(self): """ Gets a compliance tensor expansion from the elastic tensor expansion. """ # TODO: this might have a general form if not self.order <= 4: raise ValueError("Compliance tensor expansion only " "...
0.002463
def add_collaborator(self, login): """Add ``login`` as a collaborator to a repository. :param str login: (required), login of the user :returns: bool -- True if successful, False otherwise """ resp = False if login: url = self._build_url('collaborators', logi...
0.004751
def detect_keep_boundary(start, end, namespaces): """a helper to inspect a link and see if we should keep the link boundary """ result_start, result_end = False, False parent_start = start.getparent() parent_end = end.getparent() if parent_start.tag == "{%s}p" % namespaces['text']: # mo...
0.001437
def fetch_all_objects_from_db(self, cls: Type[T], table: str, fieldlist: Sequence[str], construct_with_pk: bool, *args) -> List[T]: """Fetches...
0.013436