text
stringlengths
78
104k
score
float64
0
0.18
def add_plot_boundary(ax, padding=0.125): """Add a buffer of empty space around a plot boundary. .. note:: This only uses ``line`` data from the axis. It **could** use ``patch`` data, but doesn't at this time. Args: ax (matplotlib.artist.Artist): A matplotlib axis. padding (...
0.00104
def n2mfrow(nr_plots): """ Compute the rows and columns given the number of plots. This is a port of grDevices::n2mfrow from R """ if nr_plots <= 3: nrow, ncol = nr_plots, 1 elif nr_plots <= 6: nrow, ncol = (nr_plots + 1) // 2, 2 elif nr_plots <= 12: nrow, ncol =...
0.002141
def touched_files(self, parent): """ :API: public """ try: return self._scm.changed_files(from_commit=parent, include_untracked=True, relative_to=get_buildroot()) except Scm.ScmException as e: raise self.WorkspaceE...
0.008264
def responseReceived(self, response, tag): """ Receives some characters of a netstring. Whenever a complete response is received, this method calls the deferred associated with it. @param response: A complete response generated by exiftool. @type response: C{bytes} ...
0.004367
def _get_one_pending_job(self): """ Retrieve a pending job. :return: A CFGJob instance or None """ pending_job_key, pending_job = self._pending_jobs.popitem() pending_job_state = pending_job.state pending_job_call_stack = pending_job.call_stack pending_j...
0.00432
def set_widgets(self): """Set widgets on the Threshold tab.""" clear_layout(self.gridLayoutThreshold) # Set text in the label layer_purpose = self.parent.step_kw_purpose.selected_purpose() layer_subcategory = self.parent.step_kw_subcategory.\ selected_subcategory() ...
0.000355
def __split_info(self, info_part, patternsname, patterns): """ Splits info from SAR parts into logical stuff :-) :param info_part: Part of SAR output we want to split into usable data :param patternsname: ??? :param patterns: ??? :return: ``List``-style info from SAR file...
0.00109
def _generate_username(self): """ Generate a unique username """ while True: # Generate a UUID username, removing dashes and the last 2 chars # to make it fit into the 30 char User.username field. Gracefully # handle any unlikely, but possible duplicate usernames. ...
0.003431
def to_lal_ligotimegps(gps): """Convert the given GPS time to a `lal.LIGOTimeGPS` object Parameters ---------- gps : `~gwpy.time.LIGOTimeGPS`, `float`, `str` input GPS time, can be anything parsable by :meth:`~gwpy.time.to_gps` Returns ------- ligotimegps : `lal.LIGOTimeGPS` ...
0.002079
def _enforce_no_overlap(self, start_at=0): """Enforce that no ranges overlap in internal storage.""" i = start_at while i+1 < len(self.data): if self.data[i][1] >= self.data[i+1][0]: # beginning of i+1-th range is contained in i-th range if self.data[i...
0.003521
def extract_code_from_args(args): """ Extracts the access code from the arguments dictionary (given back from github) """ if args is None: raise_error("Couldn't extract GitHub authentication code " "from response") # TODO: Is there a case where the length of the erro...
0.000992
def MakeSubparser(subparsers, parents, method, arguments=None): """Returns an argparse subparser to create a 'subcommand' to adb.""" name = ('-'.join(re.split(r'([A-Z][a-z]+)', method.__name__)[1:-1:2])).lower() help = method.__doc__.splitlines()[0] subparser = subparsers.add_parser( name=name, ...
0.001851
def spksfs(body, et, idlen): # spksfs has a Parameter SIDLEN, # sounds like an optional but is that possible? """ Search through loaded SPK files to find the highest-priority segment applicable to the body and time specified. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksfs_c.html...
0.002558
def list_inventory(inventory): """List a projects inventory Given a project, simply list the contents of `inventory.yaml` Arguments: root (str): Absolute path to the `be` root directory, typically the current working directory. inventory (dict): inventory.yaml """ inv...
0.001992
def random_coefs(nmax, mmax, mu=0.0, sigma=1.0, coef_type=scalar): """Returns a ScalarCoefs object or a VectorCoeffs object where each of the coefficients is a normal random variable with mean 0 and standardard deviation 1.0. The structure is such that *nmax* is th largest *n* can be in c[n, m], ...
0.006141
def parseFile(self, srcFile, closeFile=False): """Parses CSS file-like objects using the current cssBuilder. Use for external stylesheets.""" try: result = self.parse(srcFile.read()) finally: if closeFile: srcFile.close() return result
0.006329
def encode_dict(data, encoding=None, errors='strict', keep=False, preserve_dict_class=False, preserve_tuples=False): ''' Encode all string values to bytes ''' rv = data.__class__() if preserve_dict_class else {} for key, value in six.iteritems(data): if isinstance(key, tuple)...
0.001841
def _build_mwtabfile(self, mwtab_str): """Build :class:`~mwtab.mwtab.MWTabFile` instance. :param mwtab_str: String in `mwtab` format. :type mwtab_str: :py:class:`str` or :py:class:`bytes` :return: instance of :class:`~mwtab.mwtab.MWTabFile`. :rtype: :class:`~mwtab.mwtab.MWTabFil...
0.002743
def _build_point_formats_dtypes(point_format_dimensions, dimensions_dict): """ Builds the dict mapping point format id to numpy.dtype In the dtypes, bit fields are still packed, and need to be unpacked each time you want to access them """ return { fmt_id: _point_format_to_dtype(point_fmt, d...
0.004926
def filter_vectors(self, input_list): """ Returns subset of specified input list. """ unique_dict = {} for v in input_list: unique_dict[v[1]] = v return list(unique_dict.values())
0.008368
def iter_gff3(path, attributes=None, region=None, score_fill=-1, phase_fill=-1, attributes_fill='.', tabix='tabix'): """Iterate over records in a GFF3 file. Parameters ---------- path : string Path to input file. attributes : list of strings, optional List of columns t...
0.000939
def create_collection(self, name, codec_options=None, read_preference=None, write_concern=None, read_concern=None, session=None, **kwargs): """Create a new :class:`~pymongo.collection.Collection` in this database. Normally collection creation ...
0.001292
def compute_mu(L_aug, Y, k, p): """Given label matrix L_aug and labels Y, compute the true mu params. Args: L: (np.array {0,1}) [n, d] The augmented (indicator) label matrix Y: (np.array int) [n] The true labels in {1,...,k} k: (int) Cardinality p: (np.array float) [k] The class...
0.001799
def setEditor(self, editor): """ Sets the editor widget for this entry system. :param editor | <QWidget> || None """ widget = self.uiEditorAREA.takeWidget() if widget: widget.close() if editor is not None: ...
0.010101
def unique_list(lst): """Make a list unique, retaining order of initial appearance.""" uniq = [] for item in lst: if item not in uniq: uniq.append(item) return uniq
0.005
def init(ctx, reset, root, phenomizer): """Initialize a database that store metadata Check if "root" dir exists, otherwise create the directory and build the database. If a database already exists, do nothing. """ configs = {} if root is None: root = ctx.obj.get('root') or os.p...
0.003591
def _save_archive(self): """Saves the JSON archive of processed pull requests. """ import json from utility import json_serial with open(self.archpath, 'w') as f: json.dump(self.archive, f, default=json_serial)
0.007634
def domain_whois(self, domain): '''Gets whois information for a domain''' uri = self._uris["whois_domain"].format(domain) resp_json = self.get_parse(uri) return resp_json
0.009901
def infer(self, input_data, input_label): """ Description : Print sentence for prediction result """ sum_losses = 0 len_losses = 0 for data, label in zip(input_data, input_label): pred = self.net(data) sum_losses += mx.nd.array(self.loss_fn(pred, l...
0.004552
def _value_counts_arraylike(values, dropna): """ Parameters ---------- values : arraylike dropna : boolean Returns ------- (uniques, counts) """ values = _ensure_arraylike(values) original = values values, dtype, ndtype = _ensure_data(values) if needs_i8_conversion...
0.001017
def ntp_configured(name, service_running, ntp_servers=None, service_policy=None, service_restart=False, update_datetime=False): ''' Ensures a host's NTP server configuration such as setting NTP servers, ensuring the ...
0.002083
def lfsr_next_one_seed(seed_iter, min_value_shift): """High-quality seeding for LFSR generators. The LFSR generator components discard a certain number of their lower bits when generating each output. The significant bits of their state must not all be zero. We must ensure that when seeding the gen...
0.002372
def to_dict(self): """Render a MessageElement as python dict. :return: Python dict representation :rtype: dict """ obj_dict = super(Table, self).to_dict() rows_dict = [r.to_dict() for r in self.rows] child_dict = { 'type': self.__class__.__name__, ...
0.004415
def version_list(package): """ List the versions of a package. """ team, owner, pkg = parse_package(package) session = _get_session(team) response = session.get( "{url}/api/version/{owner}/{pkg}/".format( url=get_registry_url(team), owner=owner, pkg=p...
0.002217
def show_firmware_version_output_show_firmware_version_os_version(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") show_firmware_version = ET.Element("show_firmware_version") config = show_firmware_version output = ET.SubElement(show_firmware_vers...
0.004785
def record(self): # type: () -> bytes ''' A method to generate a string representing this Boot Record. Parameters: None. Returns: A string representing this Boot Record. ''' if not self._initialized: raise pycdlibexception.PyCdlibInt...
0.006908
def _from_dict(cls, _dict): """Initialize a KeyValuePair object from a json dictionary.""" args = {} if 'key' in _dict: args['key'] = Key._from_dict(_dict.get('key')) if 'value' in _dict: args['value'] = Value._from_dict(_dict.get('value')) return cls(**ar...
0.006192
def credentials_from_clientsecrets_and_code(filename, scope, code, message=None, redirect_uri='postmessage', http=None, cache=None, ...
0.000335
def t(self): """:obj:`numpy.ndarray` : The 3x1 translation matrix for this projection """ t = np.array([self._plane_width / 2, self._plane_height / 2, self._depth_scale / 2]) return t
0.011583
def contains_plural_field(model, fields): """ Returns a boolean indicating if ``fields`` contains a relationship to multiple items. """ source_model = model for orm_path in fields: model = source_model bits = orm_path.lstrip('+-').split('__') for bit in bits[:-1]: field =...
0.003945
def description(self, value): """ Setter for **self.__description** attribute. :param value: Attribute value. :type value: unicode """ if value is not None: assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format( ...
0.007937
def getkeys(self, path, filename=None, directories=False, recursive=False): """ Get matching keys for a path """ from .utils import connection_with_anon, connection_with_gs parse = BotoClient.parse_query(path) scheme = parse[0] bucket_name = parse[1] key...
0.003823
async def send_text_message_to_all_interfaces(self, *args, **kwargs): """ TODO: we should know from where user has come and use right interface as well right interface can be chosen :param args: :param kwargs: :return: """ logger.debug('async_send...
0.002959
def get(self, virtual_host): """Get Virtual Host details. :param str virtual_host: Virtual host name :raises ApiError: Raises if the remote server encountered an error. :raises ApiConnectionError: Raises if there was a connectivity issue. :rtype: dict """ virtu...
0.004739
def list_timezones(): """Return a list of all time zones known to the system.""" l = [] for i in xrange(parentsize): l.append(_winreg.EnumKey(tzparent, i)) return l
0.010638
def _refresh_file_mapping(self): ''' refresh the mapping of the FS on disk ''' # map of suffix to description for imp if self.opts.get('cython_enable', True) is True: try: global pyximport pyximport = __import__('pyximport') # pylint: ...
0.001417
def as_dictionary(self): """ Return the service agreement template as a dictionary. :return: dict """ template = { 'contractName': self.contract_name, 'events': [e.as_dictionary() for e in self.agreement_events], 'fulfillmentOrder': self.fulfi...
0.002994
def _bddnode(root, lo, hi): """Return a unique BDD node.""" if lo is hi: node = lo else: key = (root, lo, hi) try: node = _NODES[key] except KeyError: node = _NODES[key] = BDDNode(*key) return node
0.003717
def _get_token(self): """ Get token for make request. The The data obtained herein are used in the variable header. Returns: To perform the request, receive in return a dictionary with several keys. With this method only return the tok...
0.005722
def parse(self, msg, name): """Parses the message. We check that the message is properly formatted. :param msg: a json-encoded value containing a JWS or JWE+JWS token :raises InvalidMessage: if the message cannot be parsed or validated :returns: A verified payload """...
0.001055
def grouping_delta_stats(old, new): """ Returns statistics about grouping changes Args: old (set of frozenset): old grouping new (set of frozenset): new grouping Returns: pd.DataFrame: df: data frame of size statistics Example: >>> # ENABLE_DOCTEST >>> from...
0.000606
def write_headers( self, start_line: Union[httputil.RequestStartLine, httputil.ResponseStartLine], headers: httputil.HTTPHeaders, chunk: bytes = None, ) -> "Future[None]": """Implements `.HTTPConnection.write_headers`.""" lines = [] if self.is_client: ...
0.002569
def seq_seguid(seq, normalize=True): """returns seguid for sequence `seq` This seguid is compatible with BioPython's seguid. >>> seq_seguid('') '2jmj7l5rSw0yVb/vlWAYkK/YBwk' >>> seq_seguid('ACGT') 'IQiZThf2zKn/I1KtqStlEdsHYDQ' >>> seq_seguid('acgt') 'IQiZThf2zKn/I1KtqStlEdsHYDQ' ...
0.003425
def build_input_file(data, samples, randomseed): """ [This is run on an ipengine] Make a concatenated consens file with sampled alleles (no RSWYMK/rswymk). Orders reads by length and shuffles randomly within length classes """ ## get all of the consens handles for samples that have consens read...
0.007669
def di_power(self, i, power=1): r'''Method to calculate a power of a particle class/bin in a generic way so as to support when there are as many `ds` as `fractions`, or one more diameter spec than `fractions`. When each bin has a lower and upper bound, the formula is as follows ...
0.007971
def compile(self): """ Compile this expression into an ODPS SQL :return: compiled DAG :rtype: str """ from ..engines import get_default_engine engine = get_default_engine(self) return engine.compile(self)
0.00738
def GetFingerprint(self, name): """Gets the first fingerprint type from the protobuf.""" for result in self.results: if result.GetItem("name") == name: return result
0.010695
def describe_tile(self, index): """Get the registration information for the tile at the given index.""" if index >= len(self.tile_manager.registered_tiles): tile = TileInfo.CreateInvalid() else: tile = self.tile_manager.registered_tiles[index] return tile.regist...
0.00597
def linear(self, limits=None, k=5): """Returns an ndarray of linear breaks.""" start, stop = limits or (self.minval, self.maxval) return np.linspace(start, stop, k)
0.010638
def _scatter_matrix(self,theme=None,bins=10,color='grey',size=2, asFigure=False, **iplot_kwargs): """ Displays a matrix with scatter plot for each pair of Series in the DataFrame. The diagonal shows a histogram for each of the Series Parameters: ----------- df : DataFrame Pandas DataFrame theme : string ...
0.048942
def pts_relative(pts=[], shift=[0.0, 0.0], angle=[0.0]): '''Convenience shift+rotate combination. ''' assert isinstance(pts, list) and len(pts) > 0 l_pt_prev = None for pt in pts: assert isinstance(pt, tuple) l_pt = len(pt) assert l_pt > 1 for i in pt: ass...
0.001235
def _parse_numbers(text): ''' Convert a string to a number, allowing for a K|M|G|T postfix, 32.8K. Returns a decimal number if the string is a real number, or the string unchanged otherwise. ''' if text.isdigit(): return decimal.Decimal(text) try: postPrefixes = {'K': '10E3'...
0.002928
def sequenceToWord(sequence): """ converts a sequence (one-hot) in a reber string """ reberString = '' for i in xrange(len(sequence)): index = np.where(sequence[i]==1.)[0][0] reberString += chars[index] return reberString
0.007663
def run(self, messages): """Determine if a student is elgible to recieve a hint. Based on their state, poses reflection questions. After more attempts, ask if students would like hints. If so, query the server. """ if self.args.local: return # Only r...
0.002745
def load_data(self, filename, ext): """Load data from filename""" from spyder_kernels.utils.iofuncs import iofunctions from spyder_kernels.utils.misc import fix_reference_name glbs = self._mglobals() load_func = iofunctions.load_funcs[ext] data, error_message = load_fun...
0.002809
def do_login(self, line): "login aws-acces-key aws-secret" if line: args = self.getargs(line) self.conn = boto.connect_dynamodb( aws_access_key_id=args[0], aws_secret_access_key=args[1]) else: self.conn = boto.connect_dynamodb(...
0.005731
def compress(x, c, is_2d, hparams, name): """Compress.""" with tf.variable_scope(name): # Run compression by strided convs. cur = x k1 = (3, 3) if is_2d else (3, 1) k2 = (2, 2) if is_2d else (2, 1) cur = residual_conv(cur, hparams.num_compress_steps, k1, hparams, "rc") if c is not None and h...
0.007958
def find_words(text, suspect_words, excluded_words=[]): """Check if a text has some of the suspect words (or words that starts with one of the suspect words). You can set some words to be excluded of the search, so you can remove false positives like 'important' be detected when you search by 'import'. ...
0.001676
def rebase_array(d, recursive=False): """Transform an indexed dictionary (such as those returned by the dzn2dict function when parsing arrays) into an multi-dimensional list. Parameters ---------- d : dict The indexed dictionary to convert. bool : recursive Whether to rebase the...
0.00156
def create_unique_transfer_operation_id(ase): # type: (blobxfer.models.azure.StorageEntity) -> str """Create a unique transfer operation id :param blobxfer.models.azure.StorageEntity ase: storage entity :rtype: str :return: unique transfer id """ return ';'.join( ...
0.007426
def geom(self): """Provide :shapely:`Shapely LineString object<linestrings>` geometry of :class:`Line`""" adj_nodes = self._grid._graph.nodes_from_line(self) return LineString([adj_nodes[0].geom, adj_nodes[1].geom])
0.012097
def list_clusters(call=None): ''' Returns a list of clusters in OpenNebula. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt-cloud -f list_clusters opennebula ''' if call == 'action': raise SaltCloudSystemExit( 'The list_clusters function must...
0.001529
def ensure_routing_table_is_fresh(self, access_mode): """ Update the routing table if stale. This method performs two freshness checks, before and after acquiring the refresh lock. If the routing table is already fresh on entry, the method exits immediately; otherwise, the refresh lock ...
0.003623
def qs_add(self, *args, **kwargs): '''Add value to QuerySet MultiDict''' query = self.query.copy() if args: mdict = MultiDict(args[0]) for k, v in mdict.items(): query.add(k, v) for k, v in kwargs.items(): query.add(k, v) return...
0.005814
def permute_outputs(Y, X): """ Permute the output according to one of the inputs as in [_2] References ---------- .. [2] Elmar Plischke (2010) "An effective algorithm for computing global sensitivity indices (EASI) Reliability Engineering & System Safety", 95:4, 354-360....
0.001748
def update_webhook_metadata(self, scaling_group, policy, webhook, metadata): """ Adds the given metadata dict to the existing metadata for the specified webhook. """ if not isinstance(webhook, AutoScaleWebhook): webhook = self.get_webhook(scaling_group, policy, webhoo...
0.005964
def check(path=None, env='default'): """ Execute the checks: rules for a given build.yml file. """ # TODO: add files=<list of files> to check only a subset... # also useful for 'quilt build' to exclude certain files? # (if not, then require dry_run=True if files!=None/all) build("dry_run/dry...
0.002778
def _yarn_get_running_spark_apps(self, rm_address, requests_config, tags): """ Return a dictionary of {app_id: (app_name, tracking_url)} for running Spark applications. The `app_id` returned is that of the YARN application. This will eventually be mapped into a Spark application ID. ...
0.003556
def get_attributes(self, name_list): """Get Attributes Get a list of attributes as a name/value dictionary. :param name_list: A list of attribute names (strings). :return: A name/value dictionary (both names and values are strings). """ propertie...
0.003976
def sed(self, photon_energy, distance=1 * u.kpc): """Spectral energy distribution at a given distance from the source. Parameters ---------- photon_energy : :class:`~astropy.units.Quantity` float or array Photon energy array. distance : :class:`~astropy.units.Quanti...
0.002614
def download(self, folder=None): # type: (Optional[str]) -> Tuple[str, str] """Download resource store to provided folder or temporary folder if no folder supplied Args: folder (Optional[str]): Folder to download resource to. Defaults to None. Returns: Tuple[str...
0.006529
def _get_cpu_info_from_proc_cpuinfo(): ''' Returns the CPU info gathered from /proc/cpuinfo. Returns {} if /proc/cpuinfo is not found. ''' try: # Just return {} if there is no cpuinfo if not DataSource.has_proc_cpuinfo(): return {} returncode, output = DataSource.cat_proc_cpuinfo() if returncode != 0: ...
0.035669
def acquire(cls, name=None, lifetime=None, mechs=None, usage='both', store=None): """Acquire GSSAPI credentials This method acquires credentials. If the `store` argument is used, the credentials will be acquired from the given credential store (if supported). Otherwise...
0.001238
def get_z(self, var, coords=None): """ Get the vertical (z-) coordinate of a variable This method searches for the z-coordinate in the :attr:`ds`. It first checks whether there is one dimension that holds an ``'axis'`` attribute with 'Z', otherwise it looks whether there is an i...
0.001589
def add_cache_entry(self, key, entry): """ Add the given `entry` (which must be a :class:`~.disco.xso.InfoQuery` instance) to the user-level database keyed with the hash function type `hash_` and the `node` URL. The `entry` is **not** validated to actually map to `node` with the ...
0.002625
def _assemble_autophosphorylation(self, stmt): """Example: complex(p(HGNC:MAPK14), p(HGNC:TAB1)) => p(HGNC:MAPK14, pmod(Ph, Tyr, 100))""" sub_agent = deepcopy(stmt.enz) mc = stmt._get_mod_condition() sub_agent.mods.append(mc) # FIXME Ignore...
0.004231
def _to_json(self, include_references=True): """Convert the model to JSON using the PotionJSONEncode and automatically resolving the resource as needed (`_properties` call handles this). """ if include_references: return json.dumps(self._resource._properties, cls=PotionJSONEn...
0.006349
def tuple_as_vec(xyzw): """ Generates a Vector4 from a tuple or list. """ vec = Vector4() vec[0] = xyzw[0] vec[1] = xyzw[1] vec[2] = xyzw[2] vec[3] = xyzw[3] return vec
0.008333
def get_creation_date( self, bucket: str, key: str, ) -> datetime: """ Retrieves the creation date for a given key in a given bucket. :param bucket: the bucket the object resides in. :param key: the key of the object for which the creation date is ...
0.008681
def sample(expr, parts=None, columns=None, i=None, n=None, frac=None, replace=False, weights=None, strata=None, random_state=None): """ Sample collection. :param expr: collection :param parts: how many parts to hash :param columns: the columns to sample :param i: the part to sample o...
0.005407
def lincomb(self, a, x1, b=None, x2=None, out=None): """Implement ``out[:] = a * x1 + b * x2``. This function implements ``out[:] = a * x1`` or, if ``b`` and ``x2`` are given, ``out = a * x1 + b * x2``. Parameters ---------- a : `field` elemen...
0.000759
def parallel_iter(source_iterables: Sequence[Iterable[Optional[Any]]], target_iterable: Iterable[Optional[Any]], skip_blanks: bool = True): """ Creates iterators over parallel iteratables by calling iter() on the iterables and chaining to parallel_iterate(). The purpose o...
0.00369
def build_blueprint(self, url_prefix=''): """Build a blueprint that contains the endpoints for callback URLs of the current subscriber. Only call this once per instance. Arguments: - url_prefix; this allows you to prefix the callback URLs in your app. """ self.blueprint_name, s...
0.005013
def benchmark(self, func, gpu_args, threads, grid, times): """runs the kernel and measures time repeatedly, returns average time Runs the kernel and measures kernel execution time repeatedly, number of iterations is set during the creation of CudaFunctions. Benchmark returns a robust av...
0.006173
def change_column_name( conn, table, old_column_name, new_column_name, schema=None ): """ Changes given `activity` jsonb data column key. This function is useful when you want to reflect column name changes to activity table. :: from alembic import op from postgresq...
0.000638
def union(self, *args): """Unions the equivalence classes containing the elements in `*args`.""" if self._readonly: raise AttributeError if len(args) == 0: return None if len(args) == 1: return self[args[0]] for a, b in zip(args[:-1], args[1:]...
0.007732
def gen_ordered_statistics(transaction_manager, record): """ Returns a generator of ordered statistics as OrderedStatistic instances. Arguments: transaction_manager -- Transactions as a TransactionManager instance. record -- A support record as a SupportRecord instance. """ items = ...
0.001267
def has_permission(obj_name, principal, permission, access_mode='grant', obj_type='file', exact=True): r''' Check if the object has a permission Args: obj_name (str): The name of or path to t...
0.001832
def update_notificant(self, id, **kwargs): # noqa: E501 """Update a specific notification target # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_notifi...
0.001592
def _add_escape_character_for_quote_prime_character(self, text): """ Fix for https://github.com/openatx/facebook-wda/issues/33 Returns: string with properly formated quotes, or non changed text """ if text is not None: if "'" in text: return text...
0.014344