text
stringlengths
78
104k
score
float64
0
0.18
def calculate_z1pt0(vs30): ''' Reads an array of vs30 values (in m/s) and returns the depth to the 1.0 km/s velocity horizon (in m) Ref: Chiou & Youngs (2014) California model :param vs30: the shear wave velocity (in m/s) at a depth of 30m ''' c1 = 571 ** 4. c2 = 1360.0 ** 4. return ...
0.002584
def list(self, language=values.unset, limit=None, page_size=None): """ Lists SampleInstance records from the API as a list. Unlike stream(), this operation is eager and will load `limit` records into memory before returning. :param unicode language: The ISO language-country stri...
0.009532
def filter_genes_only(stmts_in, **kwargs): """Filter to statements containing genes only. Parameters ---------- stmts_in : list[indra.statements.Statement] A list of statements to filter. specific_only : Optional[bool] If True, only elementary genes/proteins will be kept and familie...
0.001591
def data(self, column, role): """Return the data for the column and role :param column: the data column :type column: int :param role: the data role :type role: QtCore.Qt.ItemDataRole :returns: data depending on the role :rtype: :raises: None """ ...
0.006536
def extractRunInto(javaLogText): """ This function will extract the various operation time for GLRM model building iterations. :param javaLogText: :return: """ global g_initialXY global g_reguarlize_Y global g_regularize_X_objective global g_updateX global g_updateY global g...
0.002236
def init_session(self, get_token=True): """ init a new oauth2 session that is required to access the cloud :param bool get_token: if True, a token will be obtained, after the session has been created """ if (self._client_id is None) or (self._clien...
0.002381
def make_logging_handlers_and_tools(self, multiproc=False): """Creates logging handlers and redirects stdout.""" log_stdout = self.log_stdout if sys.stdout is self._stdout_to_logger: # If we already redirected stdout we don't neet to redo it again log_stdout = False ...
0.001688
def pickAttachment(self): """ Prompts the user to select an attachment to add to this edit. """ filename = QFileDialog.getOpenFileName(self.window(), 'Select Attachment', '', ...
0.006504
def decrease_weight(self, proxy): """Decreasing the weight of a proxy by multiplying dec_ratio""" new_weight = proxy.weight * self.dec_ratio if new_weight < self.weight_thr: self.remove_proxy(proxy) else: proxy.weight = new_weight
0.006993
def get_pattern_formatter(cls, location): """ Fragment from aiohttp.web_urldispatcher.UrlDispatcher#add_resource :param location: :return: """ pattern = '' formatter = '' canon = '' for part in cls.ROUTE_RE.split(location): match = cls....
0.001614
def remove_keywords_from_list(self, keyword_list): """To remove keywords present in list Args: keyword_list (list(str)): List of keywords to remove Examples: >>> keyword_processor.remove_keywords_from_list(["java", "python"]}) Raises: AttributeError:...
0.007117
def update_content_item(access_token, content_item_id, payload): ''' Name: update_content_item Parameters: access_token, content_item_id, payload (dict) Return: dictionary ''' headers = {'Authorization': 'Bearer ' + str(access_token)} content_item_url =\ construct_content_item_url(enrichment_url, content_item...
0.025253
def template2regex(template, ranges=None): """Convert a URL template to a regular expression. Converts a template, such as /{name}/ to a regular expression, e.g. /(?P<name>[^/]+)/ and a list of the named parameters found in the template (e.g. ['name']). Ranges are given after a colon in a template name...
0.00137
def publish( self, resource_group_name, automation_account_name, runbook_name, custom_headers=None, raw=False, polling=True, **operation_config): """Publish runbook draft. :param resource_group_name: Name of an Azure Resource group. :type resource_group_name: str :param auto...
0.003462
def create_date_from_text(self, text): """ Parse a text in the form dd/mm/yyyy, dd/mm/yy or yyyy/mm/dd and return a corresponding :class:`datetime.date` object. If no date can be extracted from the given text, a :exc:`ValueError` will be raised. """ # Try to match dd/mm/yyyy form...
0.004762
def restore_from_checkpoint(sess, input_checkpoint): """Return a TensorFlow saver from a checkpoint containing the metagraph.""" saver = tf.train.import_meta_graph('{}.meta'.format(input_checkpoint)) saver.restore(sess, input_checkpoint) return saver
0.003759
def selfSimilarityMatrix(featureVectors): ''' This function computes the self-similarity matrix for a sequence of feature vectors. ARGUMENTS: - featureVectors: a numpy matrix (nDims x nVectors) whose i-th column corresponds to the i-th feature vector RETURNS: ...
0.001522
def close(self): """Close the connection :raises: ConnectionBusyError """ LOGGER.debug('Connection %s closing', self.id) if self.busy: raise ConnectionBusyError(self) with self._lock: if not self.handle.closed: try: ...
0.004255
def hardcodeRomIntoProcess(cls, rom): """ Due to verilog restrictions it is not posible to use array constants and rom memories has to be hardcoded as process """ processes = [] signals = [] for e in rom.endpoints: assert isinstance(e, Operator) and e....
0.001934
def json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, (datetime, date)): serial = obj.isoformat() return serial from ..time_interval import TimeInterval, TimeIntervals if isinstance(obj, (TimeInterval, TimeIntervals)): ...
0.001577
def kde(self, term, bandwidth=2000, samples=1000, kernel='gaussian'): """ Estimate the kernel density of the instances of term in the text. Args: term (str): A stemmed term. bandwidth (int): The kernel bandwidth. samples (int): The number of evenly-spaced sa...
0.002077
def format_sync_stats(self, cnt): ''' Format stats of the sync output. :param cnt: :return: ''' stats = salt.utils.odict.OrderedDict() if cnt.get('retcode') == salt.defaults.exitcodes.EX_OK: for line in cnt.get('stdout', '').split(os.linesep): ...
0.002509
def set_col_name(self, index, name): """ Sets the column name. :param index: the 0-based row index :type index: int :param name: the name of the column :type name: str """ javabridge.call(self.jobject, "setColName", "(ILjava/lang/String;)V", index, name)
0.009404
def get_protein_data(peptide, pdata, headerfields, accfield): """These fields are currently not pool dependent so headerfields is ignored""" report = get_proteins(peptide, pdata, headerfields) return get_cov_descriptions(peptide, pdata, report)
0.003846
def add(self, p_src): """ Given a todo string, parse it and put it to the end of the list. """ todos = self.add_list([p_src]) return todos[0] if len(todos) else None
0.009709
def _set_cir(self, v, load=False): """ Setter method for cir, mapped from YANG variable /policy_map/class/police/cir (uint64) If this variable is read-only (config: false) in the source YANG file, then _set_cir is considered as a private method. Backends looking to populate this variable should ...
0.004637
def getparams(self, param): """Get parameters which match with input param. :param Parameter param: parameter to compare with this parameters. :rtype: list """ return list(cparam for cparam in self.values() if cparam == param)
0.007463
def set_meta_refresh_enabled(self, enabled): """ *Deprecated:* set :attr:`~.Cluster.schema_metadata_enabled` :attr:`~.Cluster.token_metadata_enabled` instead Sets a flag to enable (True) or disable (False) all metadata refresh queries. This applies to both schema and node topology. ...
0.008373
async def close(self) -> None: """ Explicit exit. If so configured, populate cache to prove all creds in wallet offline if need be, archive cache, and purge prior cache archives. :return: current object """ LOGGER.debug('HolderProver.close >>>') if self.cfg.get...
0.004779
def get_user_profile(self, user_id): """ Get user profile. Returns user profile data, including user id, name, and profile pic. When requesting the profile for the user accessing the API, the user's calendar feed URL will be returned as well. """ ...
0.006579
def model_getattr(): """ Creates a getter that will drop the current value and retrieve the model's attribute with the context key as name. """ def model_getattr(_value, context, **_params): value = getattr(context["model"], context["key"]) return _attr(value) return model_geta...
0.003096
def list_forwarding_addresses(api_key, offset=None, coin_symbol='btc'): ''' List the forwarding addresses for a certain api key (and on a specific blockchain) ''' assert is_valid_coin_symbol(coin_symbol) assert api_key url = make_url(coin_symbol, 'payments') params = {'token': api_key...
0.004149
def datetime_from_iso_format(string): """ Return a datetime object from an iso 8601 representation. Return None if string is non conforming. """ match = DATE_ISO_REGEX.match(string) if match: date = datetime.datetime(year=int(match.group(DATE_ISO_YEAR_GRP)), ...
0.001395
def send_patch_document(self, event): """ Sends a PATCH-DOC message, returning a Future that's completed when it's written out. """ msg = self.protocol.create('PATCH-DOC', [event]) return self._socket.send_message(msg)
0.012397
def load_json_dct( dct, record_store=None, schema=None, loader=from_json_compatible ): """ Create a Record instance from a json-compatible dictionary The dictionary values should have types that are json compatible, as if just loaded from a json serialized record string. ...
0.000696
def stop_watcher(self): """ Stop the watcher thread that tries to send offline reports. """ if self._watcher: self._watcher_running = False self.logger.info('CrashReporter: Stopping watcher.')
0.008065
def get_separator_words(toks1): """ Finds the words that separate a list of tokens from a background corpus Basically this generates a list of informative/interesting words in a set toks1 is a list of words Returns a list of separator words """ tab_toks1 = nltk.FreqDist(word.lower() for word...
0.004608
def create(self, request): """Create a new object.""" form = (self.form or generate_form(self.model))(request.POST) if form.is_valid(): object = form.save() return self._render( request = request, template = 'show', contex...
0.026432
def send_data(self): """Send data packets from the local file to the server""" if not self.connection._sock: raise err.InterfaceError("(0, '')") conn = self.connection try: with open(self.filename, 'rb') as open_file: packet_size = min(conn.max_al...
0.004981
def _get_host_disks(host_reference): ''' Helper function that returns a dictionary containing a list of SSD and Non-SSD disks. ''' storage_system = host_reference.configManager.storageSystem disks = storage_system.storageDeviceInfo.scsiLun ssds = [] non_ssds = [] for disk in disks: ...
0.003448
def parse_timestamp(x): """Parse ISO8601 formatted timestamp.""" dt = dateutil.parser.parse(x) if dt.tzinfo is None: dt = dt.replace(tzinfo=pytz.utc) return dt
0.005464
def printInfo(obj): """Print information about a vtk object.""" def printvtkactor(actor, tab=""): if not actor.GetPickable(): return if hasattr(actor, "polydata"): poly = actor.polydata() else: poly = actor.GetMapper().GetInput() pro = actor...
0.001703
def resources(argv=sys.argv[1:]): """ Juju CLI subcommand for dispatching resources subcommands. """ eps = iter_entry_points('jujuresources.subcommands') ep_map = {ep.name: ep.load() for ep in eps} parser = argparse.ArgumentParser() if '--description' in argv: print('Manage and mirr...
0.002732
def altitudes(self): ''' A list of the altitudes of each vertex [AltA, AltB, AltC], list of floats. An altitude is the shortest distance from a vertex to the side opposite of it. ''' a = self.area * 2 return [a / self.a, a / self.b, a / self.c]
0.006431
def custom_getter(self, activation_dtype=tf.bfloat16): """A custom getter that uses the encoding for bfloat16 and float32 vars. When a bfloat16 or float32 variable is requsted, an encoded float16 varaible is created, which is then decoded and cast to a bfloat16 activation. Args: activation_d...
0.004635
def aliases(self): """Returns a dictionary of the aliases, or "titles", of the field names in self. An alias can be specified by passing a tuple in the name part of the dtype. For example, if an array is created with ``dtype=[(('foo', 'bar'), float)]``, the array will have a field ...
0.002632
def empty(self): """ Indicator whether DataFrame is empty. True if DataFrame is entirely empty (no items), meaning any of the axes are of length 0. Returns ------- bool If DataFrame is empty, return True, if not return False. See Also ...
0.001672
def findAll(self, name=None, attrs={}, recursive=True, text=None, limit=None, **kwargs): """Extracts a list of Tag objects that match the given criteria. You can specify the name of the Tag and any attributes you want the Tag to have. The value of a key-value pair in th...
0.003831
def _set_reverse_metric_info(self, v, load=False): """ Setter method for reverse_metric_info, mapped from YANG variable /isis_state/interface_detail/isis_intf/reverse_metric_info (container) If this variable is read-only (config: false) in the source YANG file, then _set_reverse_metric_info is considere...
0.005074
def import_machines(self, options): """Imports the appliance into VirtualBox by creating instances of :py:class:`IMachine` and other interfaces that match the information contained in the appliance as closely as possible, as represented by the import instructions in the :py:func:`virtua...
0.008663
def eval_algorithm(curr, prev): """ Evaluates OBV Args: curr: Dict of current volume and close prev: Dict of previous OBV and close Returns: Float of OBV """ if curr['close'] > prev['close']: v = curr['volume'] elif curr['...
0.004515
def ports(self): '''The list of ports involved in this connection. The result is a list of tuples, (port name, port object). Each port name is a full path to the port (e.g. /localhost/Comp0.rtc:in) if this Connection object is owned by a Port, which is in turn owned by a Compone...
0.001994
def watch(cams, path=None, delay=10): """Get screenshots from all cams at defined intervall.""" while True: for c in cams: c.snap(path) time.sleep(delay)
0.005291
def cause_mip(self, mechanism, purview): """Return the irreducibility analysis for the cause MIP. Alias for |find_mip()| with ``direction`` set to |CAUSE|. """ return self.find_mip(Direction.CAUSE, mechanism, purview)
0.008
def recursive_children(self): """ Generator returning all recursive children elements. """ for child in self.children: yield child for recursive_child in child.recursive_children: yield recursive_child
0.007273
def create_gre_tunnel_no_encryption(cls, name, local_endpoint, remote_endpoint, mtu=0, pmtu_discovery=True, ttl=0, enabled=True, comment=None): """ Create a GRE Tunnel with no encryption. See `create_gre_tunnel_mode` for constructor description...
0.009058
def reverse(self, lon, lat, types=None, limit=None): """Returns a Requests response object that contains a GeoJSON collection of places near the given longitude and latitude. `response.geojson()` returns the geocoding result as GeoJSON. `response.status_code` returns the HTTP API status...
0.003067
def check_extracted_paths(namelist, subdir=None): """ Check whether zip file paths are all relative, and optionally in a specified subdirectory, raises an exception if not namelist: A list of paths from the zip file subdir: If specified then check whether all paths in the zip file are under t...
0.000726
def convert_frame(frame, body_encoding=None): """ Convert a frame to a list of lines separated by newlines. :param Frame frame: the Frame object to convert :rtype: list(str) """ lines = [] body = None if frame.body: if body_encoding: body = encode(frame.body, body_...
0.001045
def get_genetic_profiles(study_id, profile_filter=None): """Return all the genetic profiles (data sets) for a given study. Genetic profiles are different types of data for a given study. For instance the study 'cellline_ccle_broad' has profiles such as 'cellline_ccle_broad_mutations' for mutations, 'ce...
0.00077
def copyDirectoryToHdfs(localDirectory, hdfsDirectory, hdfsClient): '''Copy directory from local to HDFS''' if not os.path.exists(localDirectory): raise Exception('Local Directory does not exist!') hdfsClient.mkdirs(hdfsDirectory) result = True for file in os.listdir(localDirectory): ...
0.004119
def _conf(cls, opts): """Setup logging via ini-file from logging_conf_file option.""" if not opts.logging_conf_file: return False if not os.path.exists(opts.logging_conf_file): # FileNotFoundError added only in Python 3.3 # https://docs.python.org/3/whatsnew/...
0.006861
def convex_hull(self): """Return an array of vertex indexes representing the convex hull. If faces have not been computed for this mesh, the function computes them. If no vertices or faces are specified, the function returns None. """ if self._faces is None: ...
0.004566
def find_geometry(self, physics): r""" Find the Geometry associated with a given Physics Parameters ---------- physics : OpenPNM Physics Object Must be a Physics object Returns ------- An OpenPNM Geometry object Raises ------...
0.002162
def get_file_format(self): """Get the file format description. This describes the type of data stored on disk. """ # Have cached file format? if self._file_fmt is not None: return self._file_fmt # Make the call to retrieve it. desc = AudioStreamBasicD...
0.003257
def popmin_compat(self, count=1): """ Atomically remove the lowest-scoring item(s) in the set. Compatible with Redis versions < 5.0. :returns: a list of item, score tuples or ``None`` if the set is empty. """ pipe = self.database.pipeline() r1, r2 = (pipe ...
0.004115
def rotateInDeclination(v1, theta_deg): """Rotation is chosen so a rotation of 90 degrees from zenith ends up at ra=0, dec=0""" axis = np.array([0,-1,0]) return rotateAroundVector(v1, axis, theta_deg)
0.013889
def update_vrf_table(self, route_dist, prefix=None, next_hop=None, route_family=None, route_type=None, tunnel_type=None, is_withdraw=False, redundancy_mode=None, pmsi_tunnel_type=None, **kwargs): """Update a BGP route in the VRF table id...
0.001364
def thin(image, mask=None, iterations=1): '''Thin an image to lines, preserving Euler number Implements thinning as described in algorithm # 1 from Guo, "Parallel Thinning with Two Subiteration Algorithms", Communications of the ACM, Vol 32 #3 page 359. ''' global thin_table, eight_connect ...
0.018993
def calc_system(self, x, Y, Y_agg=None, L=None, population=None): """ Calculates the missing part of the extension plus accounts This method allows to specify an aggregated Y_agg for the account calculation (see Y_agg below). However, the full Y needs to be specified for the calculation...
0.000257
def update(self, fields=None, async_=None, jira=None, notify=True, **kwargs): """Update this resource on the server. Keyword arguments are marshalled into a dict before being sent. If this resource doesn't support ``PUT``, a :py:exc:`.JIRAError` will be raised; subclasses that specialize this m...
0.003231
def HandleForwardedIps(self, interface, forwarded_ips, interface_ip=None): """Handle changes to the forwarded IPs on a network interface. Args: interface: string, the output device to configure. forwarded_ips: list, the forwarded IP address strings desired. interface_ip: string, current inter...
0.001245
def _load_config_include(self, include_directory): """Load included configuration files. Args: include_directory (str): The name of the config include directory. Returns: list: A list of all profiles for the current App. """ include_directory = os.path.j...
0.004058
def _toc_fetch_finished(self): """Callback for when the TOC fetching is finished""" self.cf.remove_port_callback(self.port, self._new_packet_cb) logger.debug('[%d]: Done!', self.port) self.finished_callback()
0.008333
def secure_channel(target, credentials, options=None, *, loop=None, executor=None, standalone_pool_for_streaming=False): """Creates a secure Channel to a server. Args: target: The server address. credentials: A ChannelCredentials instance. options: An optional list of key-value pai...
0.003571
def start_task(self, method, *args, **kwargs): """ Start a task in a separate thread Args: method: the method to start in a separate thread args: Accept args/kwargs arguments """ thread = threading.Thread(target=method, args=args, kwargs=kwargs) ...
0.004926
def setup_datafind_runtime_frames_single_call_perifo(cp, scienceSegs, outputDir, tags=None): """ This function uses the glue.datafind library to obtain the location of all the frame files that will be needed to cover the analysis of the data given in science...
0.000805
def handle_command(command): """Accepts a string command and performs an action. Args: command: the command to run as a string. """ try: cmds = command.split(None, 1) cmd = cmds[0] if cmd == 'new': add_task(get_arg(cmds)) elif cmd == 'done': mark_done(int(get_arg(cmds))) eli...
0.015517
def _open_interface(self, conn_id, iface, callback): """Open an interface on this device Args: conn_id (int): the unique identifier for the connection iface (string): the interface name to open callback (callback): Callback to be called when this command finishes ...
0.006276
def dirs(self, path="/", **kwargs): # type: (Text, **Any) -> Iterator[Text] """Walk a filesystem, yielding absolute paths to directories. Arguments: path (str): A path to a directory. Keyword Arguments: ignore_errors (bool): If `True`, any errors reading a ...
0.00189
def create(provider, count=1, name=None, **kwargs): r''' Create one or more cloud servers Args: * provider (str): Cloud provider, e.g. ec2, digitalocean * count (int) =1: Number of instances * name (str) =None: Name of server(s) * \**kwargs: Provider-specific flags ''' ...
0.001692
def plogdet(K): r"""Log of the pseudo-determinant. It assumes that ``K`` is a positive semi-definite matrix. Args: K (array_like): matrix. Returns: float: log of the pseudo-determinant. """ egvals = eigvalsh(K) return npsum(log(egvals[egvals > epsilon]))
0.003322
def read_float_matrix(rx_specifier): """ Return float matrix as np array for the given rx specifier. """ path, offset = rx_specifier.strip().split(':', maxsplit=1) offset = int(offset) sample_format = 4 with open(path, 'rb') as f: # move to offset f.seek...
0.002796
def events(times, labels=None, base=None, height=None, ax=None, text_kw=None, **kwargs): '''Plot event times as a set of vertical lines Parameters ---------- times : np.ndarray, shape=(n,) event times, in the format returned by :func:`mir_eval.io.load_events` or :func...
0.000354
def get_actions(self, commands): """Get parameterized actions from command list based on command type and verb.""" actions = [] for type, turn_based, verb in commands: if len(self.action_filter) != 0 and verb not in self.action_filter: continue if type == ...
0.001199
def create_model(self, parent, name, multiplicity='ZERO_MANY', **kwargs): """Create a new child model under a given parent. In order to prevent the backend from updating the frontend you may add `suppress_kevents=True` as additional keyword=value argument to this method. This will improve perfo...
0.005442
def add(self, artifact_type: ArtifactType, src_path: str, dst_path: str=None): """Add an artifact of type `artifact_type` at `src_path`. `src_path` should be the path of the file relative to project root. `dst_path`, if given, is the desired path of the artifact in dependent ...
0.00612
def _has_attr(cls, ds, attr, concept_name, priority=BaseCheck.HIGH): """ Checks for the existance of attr in ds, with the name/message using concept_name. """ val = cls.std_check(ds, attr) msgs = [] if not val: msgs.append("Attr '{}' (IOOS concept: '{}') not ...
0.009456
def fcoe_networks(self): """ Gets the FcoeNetworks API client. Returns: FcoeNetworks: """ if not self.__fcoe_networks: self.__fcoe_networks = FcoeNetworks(self.__connection) return self.__fcoe_networks
0.007299
def end_compress(codec, stream): """End of compressing the current image. Wraps the openjp2 library function opj_end_compress. Parameters ---------- codec : CODEC_TYPE Compressor handle. stream : STREAM_TYPE_P Output stream buffer. Raises ------ RuntimeError ...
0.001825
def ParseAccountInformation( self, parser_mediator, query, row, **unused_kwargs): """Parses account information. Args: parser_mediator (ParserMediator): mediates interactions between parsers and other components, such as storage and dfvfs. query (str): query that created the row. ...
0.006482
def dont_load(self, *fields): '''Works like :meth:`load_only` to provides a :ref:`performance boost <increase-performance>` in cases when you need to load all fields except a subset specified by *fields*. ''' q = self._clone() fs = unique_tuple(q.exclude_fields, fields) q.exclude_...
0.005479
def Parse(self): """Iterator returning dict for each entry in history.""" for data in self.Query(self.EVENTS_QUERY): (timestamp, agent_bundle_identifier, agent_name, url, sender, sender_address, type_number, title, referrer, referrer_alias) = data yield [ timestamp, "OSX_QUARANTINE"...
0.006522
def gofmt(ui, repo, *pats, **opts): """apply gofmt to modified files Applies gofmt to the modified files in the repository that match the given patterns. """ if codereview_disabled: raise hg_util.Abort(codereview_disabled) files = ChangedExistingFiles(ui, repo, pats, opts) files = gofmt_required(files) if n...
0.035714
def load_alerts(self): """ NOTE: use refresh() instead of this, if you are just needing to refresh the alerts list Gets raw xml (cap) from the Alerts feed, throws it into the parser and ends up with a list of alerts object, which it stores to self._alerts """ self._feed =...
0.008368
def randchoice(seq: Union[str, list, tuple, dict, set]) -> any: """Return a randomly chosen element from the given sequence. Raises TypeError if *seq* is not str, list, tuple, dict, set and an IndexError if it is empty. >>> randchoice((1, 2, 'a', 'b')) #doctest:+SKIP 'a' """ if not isins...
0.001295
def stop(ctx, description, f): """ Use it when you stop working on the current task. You can add a description to what you've done. """ description = ' '.join(description) try: timesheet_collection = get_timesheet_collection_for_context(ctx, f) current_timesheet = timesheet_colle...
0.001366
def create(self, ogpgs): """ Method to create object group permissions general :param ogpgs: List containing vrf desired to be created on database :return: None """ data = {'ogpgs': ogpgs} return super(ApiObjectGroupPermissionGeneral, self).post('api/v3/object-g...
0.008671
def run_id(self): '''Run name without whitespace ''' s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', self.__class__.__name__) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
0.009615
def connection_from_ndb_query(query, args=None, connection_type=None, edge_type=None, pageinfo_type=None, transform_edges=None, context=None, **kwargs): ''' A simple function that accepts an ndb Query and used ndb QueryIterator object(https://cloud.google.com/appengine/docs/python/...
0.003