text stringlengths 78 104k | score float64 0 0.18 |
|---|---|
def _calc_recip(self):
"""
Perform the reciprocal space summation. Calculates the quantity
E_recip = 1/(2PiV) sum_{G < Gmax} exp(-(G.G/4/eta))/(G.G) S(G)S(-G)
where
S(G) = sum_{k=1,N} q_k exp(-i G.r_k)
S(G)S(-G) = |S(G)|**2
This method is heavily vectorized to ut... | 0.001408 |
def unpack_rpc_response(status, response=None, rpc_id=0, address=0):
"""Unpack an RPC status back in to payload or exception."""
status_code = status & ((1 << 6) - 1)
if address == 8:
status_code &= ~(1 << 7)
if status == 0:
raise BusyRPCResponse()
elif status == 2:
raise ... | 0.001497 |
def overview(index, start, end):
"""Compute metrics in the overview section for enriched git indexes.
Returns a dictionary. Each key in the dictionary is the name of
a metric, the value is the value of that metric. Value can be
a complex object (eg, a time series).
:param index: index object
:... | 0.001381 |
def set(self, prefix, url, obj):
""" Add an object into the cache """
if not self.cache_dir:
return
filename = self._get_cache_file(prefix, url)
try:
os.makedirs(os.path.join(self.cache_dir, prefix))
except OSError:
pass
with open(fi... | 0.005305 |
def get_storage_controller_hotplug_capable(self, controller_type):
"""Returns whether the given storage controller supports
hot-plugging devices.
in controller_type of type :class:`StorageControllerType`
The storage controller to check the setting for.
return hotplug_capabl... | 0.005369 |
def _random_key(self):
""" Return random session key """
hashstr = '%s%s' % (random.random(), self.time_module.time())
return hashlib.md5(hashstr).hexdigest() | 0.010989 |
def check_privatenet(self):
"""
Check if privatenet is running, and if container is same as the current Chains/privnet database.
Raises:
PrivnetConnectionError: if the private net couldn't be reached or the nonce does not match
"""
rpc_settings.setup(self.RPC_LIST)
... | 0.005935 |
def write(self, destination, source_model, name=None):
"""
Exports to NRML
"""
if os.path.exists(destination):
os.remove(destination)
self.destination = destination
if name:
source_model.name = name
output_source_model = Node("sourceModel",... | 0.002364 |
def generateVariantAnnotation(self, variant):
"""
Generate a random variant annotation based on a given variant.
This generator should be seeded with a value that is unique to the
variant so that the same annotation will always be produced regardless
of the order it is generated ... | 0.001688 |
def Log(self, format_str, *args):
"""Logs the message using the flow's standard logging.
Args:
format_str: Format string
*args: arguments to the format string
"""
log_entry = rdf_flow_objects.FlowLogEntry(
client_id=self.rdf_flow.client_id,
flow_id=self.rdf_flow.flow_id,
... | 0.003584 |
def get_prompt_tokens(_):
"""Return a list of tokens for the prompt"""
namespace = q(r'\d')
if namespace == '.':
namespace = ''
return [(Token.Generic.Prompt, 'q%s)' % namespace)] | 0.004926 |
def add_group(group_name, system_group=False, gid=None):
"""Add a group to the system
Will log but otherwise succeed if the group already exists.
:param str group_name: group to create
:param bool system_group: Create system group
:param int gid: GID for user being created
:returns: The passw... | 0.001221 |
def root_and_path(self):
""":returns: a tuple (parent, [members,... ]"""
rt = []
curAttr = self
while isinstance(curAttr.parent, AdHocTree):
rt.append(curAttr.name)
curAttr = curAttr.parent
rt.reverse()
return (curAttr.parent, rt) | 0.006623 |
def autoconf(self):
"""Implements Munin Plugin Auto-Configuration Option.
@return: True if plugin can be auto-configured, False otherwise.
"""
apacheInfo = ApacheInfo(self._host, self._port,
self._user, self._password,
... | 0.012195 |
def log_backend_action(action=None):
""" Logging for backend method.
Expects django model instance as first argument.
"""
def decorator(func):
@functools.wraps(func)
def wrapped(self, instance, *args, **kwargs):
action_name = func.func_name.replace('_', ' ') if action is Non... | 0.005714 |
def _make_graphite_api_points_list(influxdb_data):
"""Make graphite-api data points dictionary from Influxdb ResultSet data"""
_data = {}
for key in influxdb_data.keys():
_data[key[0]] = [(datetime.datetime.fromtimestamp(float(d['time'])),
d['value']) for d in influxdb_data... | 0.005602 |
def nameservers(self):
"""
:rtype: list
:returns: A list of nameserver strings for this hosted zone.
"""
# If this HostedZone was instantiated by ListHostedZones, the nameservers
# attribute didn't get populated. If the user requests it, we'll
# lazy load by quer... | 0.004093 |
def _read_section(self, f, integer=True):
"""
Reads one section from the mesh3d file.
integer ... if True, all numbers are passed to int(), otherwise to
float(), before returning
Some examples how a section can look like:
2
1 2 5 4 7 8 11 10
2 3 6 5... | 0.007273 |
def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'size') and self.size is not None:
_dict['size'] = self.size
if hasattr(self, 'hits') and self.hits is not None:
_dict['hits'] = self.hits._to_dict()
re... | 0.006061 |
def fd_weights_all(x, x0=0, n=1):
"""
Return finite difference weights for derivatives of all orders up to n.
Parameters
----------
x : vector, length m
x-coordinates for grid points
x0 : scalar
location where approximations are to be accurate
n : scalar integer
high... | 0.000861 |
def start(controller_class):
"""Start the Helper controller either in the foreground or as a daemon
process.
:param controller_class: The controller class handle to create and run
:type controller_class: callable
"""
args = parser.parse()
obj = controller_class(args, platform.operating_sys... | 0.00137 |
def user_save_event(user):
""" Handle persist event for user entities """
msg = 'User ({}){} updated/saved'.format(user.id, user.email)
current_app.logger.info(msg) | 0.005682 |
def files(self):
""" Return the names of files to be created. """
files_description = [
[ self.project_name,
'bootstrap',
'BootstrapScriptFileTemplate' ],
[ self.project_name,
'CHANGES.txt',
'PythonPackageCHANGESFileTemplate... | 0.017964 |
def lag_calc(detections, detect_data, template_names, templates,
shift_len=0.2, min_cc=0.4, horizontal_chans=['E', 'N', '1', '2'],
vertical_chans=['Z'], cores=1, interpolate=False,
plot=False, parallel=True, debug=0):
"""
Main lag-calculation function for detections of spe... | 0.0001 |
def my_func(version): # noqa: D202
"""Enclosing function."""
class MyClass(object):
"""Enclosed class."""
if version == 2:
import docs.support.python2_module as pm
else:
import docs.support.python3_module as pm
def __init__(self, value):
se... | 0.002101 |
def _make(c):
"""
create html from template, adding figure,
annotation and sequences counts
"""
ann = defaultdict(list)
for pos in c['ann']:
for db in pos:
ann[db] += list(pos[db])
logger.debug(ann)
valid = [l for l in c['valid']]
ann_list = [", ".join(list(set(... | 0.007444 |
def update(ctx, name, description, tags):
"""Update job.
Uses [Caching](/references/polyaxon-cli/#caching)
Example:
\b
```bash
$ polyaxon job -j 2 update --description="new description for my job"
```
"""
user, project_name, _job = get_job_or_local(ctx.obj.get('project'), ctx.obj.... | 0.00273 |
def python_to_jupyter_cli(args=None, namespace=None):
"""Exposes the jupyter notebook renderer to the command line
Takes the same arguments as ArgumentParser.parse_args
"""
from . import gen_gallery # To avoid circular import
parser = argparse.ArgumentParser(
description='Sphinx-Gallery No... | 0.001034 |
def help_text(self, name, text, text_kind='plain', trim_pfx=0):
"""
Provide help text for the user.
This method will convert the text as necessary with docutils and
display it in the WBrowser plugin, if available. If the plugin is
not available and the text is type 'rst' then t... | 0.001019 |
def watch(self, filepath, func=None, delay=None, ignore=None):
"""Add the given filepath for watcher list.
Once you have intialized a server, watch file changes before
serve the server::
server.watch('static/*.stylus', 'make static')
def alert():
print('... | 0.001613 |
def rmdir(self, paths):
''' Delete a directory
:param paths: Paths to delete
:type paths: list
:returns: a generator that yields dictionaries
.. note: directories have to be empty.
'''
if not isinstance(paths, list):
raise InvalidInputException("Path... | 0.004808 |
def _manifest(self):
"""Return manifest content."""
if self._manifest_cache is None:
self._manifest_cache = self._storage_broker.get_manifest()
return self._manifest_cache | 0.009615 |
def fmt_duration(duration):
""" Format a duration value in seconds to a readable form.
"""
try:
return fmt.human_duration(float(duration), 0, 2, True)
except (ValueError, TypeError):
return "N/A".rjust(len(fmt.human_duration(0, 0, 2, True))) | 0.003663 |
async def observations(self):
"""Retrieve current weather observation."""
observations = []
raw_stations = await self.retrieve(url=API_OBSERVATION_STATIONS,
headers={'Referer': 'http://www.ipma.pt'})
if not raw_stations:
return obse... | 0.005712 |
def flownet2_fusion(self, x):
"""
Architecture in Table 4 of FlowNet 2.0.
Args:
x: NCHW tensor, where C=11 is the concatenation of 7 items of [3, 2, 2, 1, 1, 1, 1] channels.
"""
with argscope([tf.layers.conv2d], activation=lambda x: tf.nn.leaky_relu(x, 0.1),
... | 0.006422 |
def complement_alleles(self):
"""Complement the alleles of this variant.
This will call this module's `complement_alleles` function.
Note that this will not create a new object, but modify the state of
the current instance.
"""
self.alleles = self._encode_alleles(
... | 0.005222 |
def run_pandoc(text='', args=None):
"""
Low level function that calls Pandoc with (optionally)
some input text and/or arguments
"""
if args is None:
args = []
pandoc_path = which('pandoc')
if pandoc_path is None or not os.path.exists(pandoc_path):
raise OSError("Path to pan... | 0.001664 |
def verify_ed25519_signature(public_key, contents, signature, message):
"""Verify that ``signature`` comes from ``public_key`` and ``contents``.
Args:
public_key (Ed25519PublicKey): the key to verify the signature
contents (bytes): the contents that was signed
signature (bytes): the sig... | 0.001629 |
def _get_updated_environment(self, env_dict=None):
"""Returns globals environment with 'magic' variable
Parameters
----------
env_dict: Dict, defaults to {'S': self}
\tDict that maps global variable name to value
"""
if env_dict is None:
env_dict = ... | 0.004854 |
def parse_branchinglevel(self, branchinglevel_node, depth, validate):
"""
Parse one branching level.
:param branchinglevel_node:
``etree.Element`` object with tag "logicTreeBranchingLevel".
:param depth:
The sequential number of this branching level, based on 0.
... | 0.001059 |
def is_admin(self, send, nick, required_role='admin'):
"""Checks if a nick is a admin.
If NickServ hasn't responded yet, then the admin is unverified,
so assume they aren't a admin.
"""
# If the required role is None, bypass checks.
if not required_role:
ret... | 0.003193 |
def peek(self, default=None):
'''Returns `default` is there is no subsequent item'''
try:
result = self.pointer.next()
# immediately push it back onto the front of the iterable
self.pointer = itertools.chain([result], self.pointer)
return result
ex... | 0.006696 |
def highlight_code(self, ontospy_entity):
"""
produce an html version of Turtle code with syntax highlighted
using Pygments CSS
"""
try:
pygments_code = highlight(ontospy_entity.rdf_source(),
TurtleLexer(), HtmlFormatter())
... | 0.00313 |
def _get_inference_input(self,
trans_inputs: List[TranslatorInput]) -> Tuple[mx.nd.NDArray,
int,
Optional[lexicon.TopKLexicon],
... | 0.007621 |
def update(self, friendly_name=values.unset, code_length=values.unset,
lookup_enabled=values.unset, skip_sms_to_landlines=values.unset,
dtmf_input_required=values.unset, tts_name=values.unset,
psd2_enabled=values.unset):
"""
Update the ServiceInstance
... | 0.008141 |
def _GetAppYamlHostname(application_path, open_func=open):
"""Build the hostname for this app based on the name in app.yaml.
Args:
application_path: A string with the path to the AppEngine application. This
should be the directory containing the app.yaml file.
open_func: Function to call to open a f... | 0.011281 |
def create_analytic_backend(settings):
"""
Creates a new Analytics backend from the settings
:param settings: Dictionary of settings for the analytics backend
:returns: A backend object implementing the analytics api
>>>
>>> analytics = create_analytic({
>>> 'backend': 'analytics.backe... | 0.001129 |
def read_xml(self):
"""
read metadata from xml and set all the found properties.
:return: the root element of the xml
:rtype: ElementTree.Element
"""
with reading_ancillary_files(self):
root = super(ImpactLayerMetadata, self).read_xml()
if root i... | 0.00495 |
def partition(self, dimension):
"""
Partition subspace into desired dimension.
:type dimension: int
:param dimension: Maximum dimension to use.
"""
# Take leftmost 'dimension' input basis vectors
for i, channel in enumerate(self.u):
if self.v[i].shape... | 0.003571 |
def minmax(low, high):
"""Test that the data items fall within range: low <= x <= high."""
def decorator(function):
"""Decorate a function with args."""
@functools.wraps(function)
def wrapper(*args, **kwargs):
"""Wrap the function."""
series = function(*args, **kw... | 0.002075 |
def tear_down(self):
"""
Tears down all temp files and directories.
"""
while len(self._temp_directories) > 0:
directory = self._temp_directories.pop()
shutil.rmtree(directory, ignore_errors=True)
while len(self._temp_files) > 0:
file = self._t... | 0.004619 |
def sync_readmes():
""" just copies README.md into README for pypi documentation """
print("syncing README")
with open("README.md", 'r') as reader:
file_text = reader.read()
with open("README", 'w') as writer:
writer.write(file_text) | 0.003774 |
def rename(client, old, new, force):
"""Rename the workflow named <old> to <new>."""
from renku.models.refs import LinkReference
LinkReference(client=client, name=_ref(old)).rename(_ref(new), force=force) | 0.00463 |
def quote(identifier,
html=HTML_STRING.match, valid_id=ID.match, dot_keywords=KEYWORDS):
"""Return DOT identifier from string, quote if needed.
>>> quote('')
'""'
>>> quote('spam')
'spam'
>>> quote('spam spam')
'"spam spam"'
>>> quote('-4.2')
'-4.2'
>>> quote('.42'... | 0.00152 |
def estimate_hessian(objective_func, parameters,
lower_bounds=None, upper_bounds=None,
step_ratio=2, nmr_steps=5,
max_step_sizes=None,
data=None, cl_runtime_info=None):
"""Estimate and return the upper triangular elements of the Hes... | 0.005946 |
def _hide(self):
"""Hide the tray icon."""
self._icon.set_visible(False)
self._icon.disconnect(self._conn_left)
self._icon.disconnect(self._conn_right)
self._conn_left = None
self._conn_right = None | 0.00813 |
def ReturnLeasedCronJobs(self, jobs):
"""Makes leased cron jobs available for leasing again."""
errored_jobs = []
for returned_job in jobs:
existing_lease = self.cronjob_leases.get(returned_job.cron_job_id)
if existing_lease is None:
errored_jobs.append(returned_job)
continue
... | 0.009873 |
def vod_data(self, vid=None):
"""
Get the VOD data path and the default VOD ID
:return:
"""
page = self.session.http.get(self.url)
m = self._vod_re.search(page.text)
vod_data_url = m and urljoin(self.url, m.group(0))
if vod_data_url:
self.logge... | 0.004264 |
def _XYZvxvyvz(self,*args,**kwargs):
"""Calculate X,Y,Z,U,V,W"""
obs, ro, vo= self._parse_radec_kwargs(kwargs,vel=True)
thiso= self(*args,**kwargs)
if not len(thiso.shape) == 2: thiso= thiso.reshape((thiso.shape[0],1))
if len(thiso[:,0]) != 4 and len(thiso[:,0]) != 6: #pragma: no... | 0.034607 |
def _populate_union_type_attributes(self, env, data_type):
"""
Converts a forward reference of a union into a complete definition.
"""
parent_type = None
extends = data_type._ast_node.extends
if extends:
# A parent type must be fully defined and not just a for... | 0.001453 |
def show_help(message=None):
"""Open an help message in the user's browser
:param message: An optional message object to display in the dialog.
:type message: Message.Message
"""
help_path = mktemp('.html')
with open(help_path, 'wb+') as f:
help_html = get_help_html(message)
f.... | 0.002169 |
def parse(cls, parser, text, pos): # pylint: disable=W0613
"""Match simple values excluding some Keywords like 'and' and 'or'"""
if not text.strip():
return text, SyntaxError("Invalid value")
class Rule(object):
grammar = attr('value', SpiresSimpleValue), omit(re.compil... | 0.002911 |
def touching(self, other):
""" Return true if this rectangle is touching the given shape. """
if self.top < other.bottom: return False
if self.bottom > other.top: return False
if self.left > other.right: return False
if self.right < other.left: return False
return True | 0.018809 |
def show(self):
"""Show the hidden spinner."""
thr_is_alive = self._spin_thread and self._spin_thread.is_alive()
if thr_is_alive and self._hide_spin.is_set():
# clear the hidden spinner flag
self._hide_spin.clear()
# clear the current line so the spinner is ... | 0.00495 |
def get_modules(folder, include_meta=False):
"""Finds modules (recursively) in folder
:param folder: root folder
:param include_meta: whether include meta files like (__init__ or
__version__)
:return: list of modules
"""
files = [
file
for file in _get_modules(folder)
... | 0.001862 |
def open_file(link, session=None, stream=True):
"""
Open local or remote file for reading.
:type link: pip._internal.index.Link or str
:type session: requests.Session
:param bool stream: Try to stream if remote, default True
:raises ValueError: If link points to a local directory.
:return: ... | 0.001252 |
def update(state, host, cache_time=None, touch_periodic=False):
'''
Updates apt repos.
+ cache_time: cache updates for this many seconds
+ touch_periodic: touch ``/var/lib/apt/periodic/update-success-stamp`` after update
'''
# If cache_time check when apt was last updated, prevent updates if w... | 0.006335 |
def get_abbr_impl():
"""Return abbreviated implementation name."""
impl = platform.python_implementation()
if impl == 'PyPy':
return 'pp'
elif impl == 'Jython':
return 'jy'
elif impl == 'IronPython':
return 'ip'
elif impl == 'CPython':
return 'cp'
raise Looku... | 0.002717 |
def set_info_page(self):
"""Set current info_page."""
if self.info_page is not None:
self.infowidget.setHtml(
self.info_page,
QUrl.fromLocalFile(self.css_path)
) | 0.008368 |
def triplifyGML(dpath="../data/fb/",fname="foo.gdf",fnamei="foo_interaction.gdf",
fpath="./fb/",scriptpath=None,uid=None,sid=None,fb_link=None,ego=True,umbrella_dir=None):
"""Produce a linked data publication tree from a standard GML file.
INPUTS:
======
=> the data directory path
=> the fi... | 0.028078 |
def _parse_common(text, **options):
"""
Tries to parse the string as a common datetime format.
:param text: The string to parse.
:type text: str
:rtype: dict or None
"""
m = COMMON.match(text)
has_date = False
year = 0
month = 1
day = 1
if not m:
raise ParserEr... | 0.000689 |
def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'score') and self.score is not None:
_dict['score'] = self.score
return _dict | 0.008889 |
def get_version(self, filename=None, version=-1):
"""Get a file from GridFS by ``"filename"``.
Returns a version of the file in GridFS whose filename matches
`filename` and whose metadata fields match the supplied keyword
arguments, as an instance of :class:`~gridfs.grid_file.GridOut`.
... | 0.002087 |
def save_model(self, request, obj, form, change):
"""
Set the ID of the parent page if passed in via querystring, and
make sure the new slug propagates to all descendant pages.
"""
if change and obj._old_slug != obj.slug:
# _old_slug was set in PageAdminForm.clean_slu... | 0.002653 |
def edit_distance(seq1, seq2, action_function=lowest_cost_action, test=operator.eq):
"""Computes the edit distance between the two given sequences.
This uses the relatively fast method that only constructs
two columns of the 2d array for edits. This function actually uses four columns
because we track ... | 0.001618 |
def image_export(self, image_name, dest_url, remote_host=None):
"""Export the image to the specified location
:param image_name: image name that can be uniquely identify an image
:param dest_url: the location of exported image, eg.
file:///opt/images/export.img, now only support export t... | 0.001708 |
def _load_values(self, db_key: str) -> dict:
"""Load values from the db at the specified key, db_key.
FIXME(BMo): Could also be extended to load scalar types (instead of
just list and hash)
"""
if self._db.type(db_key) == 'list':
db_values = self._db.lra... | 0.002083 |
def get_version():
"""
Get version without importing from elasticapm. This avoids any side effects
from importing while installing and/or building the module
:return: a string, indicating the version
"""
version_file = open(os.path.join("elasticapm", "version.py"), encoding="utf-8")
for line... | 0.003839 |
def compute(self, pairs, x=None, x_link=None):
"""Return continuous random values for each record pair.
Parameters
----------
pairs : pandas.MultiIndex
A pandas MultiIndex with the record pairs to compare. The indices
in the MultiIndex are indices of the DataFram... | 0.001921 |
def is_on(self):
"""
Get sensor state.
Assume offline or open (worst case).
"""
if self._type == 'Occupancy':
return self.status not in CONST.STATUS_ONLINE
return self.status not in (CONST.STATUS_OFF, CONST.STATUS_OFFLINE,
C... | 0.0059 |
def imbound(clspatch, *args, **kwargs):
"""
:param clspatch:
:param args:
:param kwargs:
:return:
"""
# todo : add example
c = kwargs.pop('color', kwargs.get('edgecolor', None))
kwargs.update(facecolor='none', edgecolor=c)
return impatch(clspatch, *args, **kwargs) | 0.003279 |
def has_any_role(*items):
r"""A :func:`.check` that is added that checks if the member invoking the
command has **any** of the roles specified. This means that if they have
one out of the three roles specified, then this check will return `True`.
Similar to :func:`.has_role`\, the names or IDs passed i... | 0.003927 |
def Majority(k, n):
"""Return a DataSet with n k-bit examples of the majority problem:
k random bits followed by a 1 if more than half the bits are 1, else 0."""
examples = []
for i in range(n):
bits = [random.choice([0, 1]) for i in range(k)]
bits.append(int(sum(bits) > k/2))
ex... | 0.002538 |
def topDownCompute(self, encoded):
"""See the function description in base.py"""
return EncoderResult(value=0, scalar=0,
encoding=numpy.zeros(self.n)) | 0.005464 |
def move_optimizer_to_cuda(optimizer):
"""
Move the optimizer state to GPU, if necessary.
After calling, any parameter specific state in the optimizer
will be located on the same device as the parameter.
"""
for param_group in optimizer.param_groups:
for param in param_group['params']:
... | 0.003339 |
def _rpc(self, method, *args):
"""Sends an rpc to the app.
Args:
method: str, The name of the method to execute.
args: any, The args of the method.
Returns:
The result of the rpc.
Raises:
ProtocolError: Something went wrong with the prot... | 0.001332 |
def _convert(cls, other, ignoreScalars=False):
'''
:other: Point or point equivalent
:ignorescalars: optional boolean
:return: Point
Class private method for converting 'other' into a Point
subclasss. If 'other' already is a Point subclass, nothing
is done. If ig... | 0.002899 |
def _fuzzy_custom_query(issn, titles):
"""
Este metodo constroi a lista de filtros por título de periódico que
será aplicada na pesquisa boleana como match por similaridade "should".
A lista de filtros é coletada do template de pesquisa customizada
do periódico, q... | 0.003906 |
def update_port(port, name, admin_state_up=True, profile=None):
'''
Updates a port
CLI Example:
.. code-block:: bash
salt '*' neutron.update_port port-name network-name new-port-name
:param port: Port name or ID
:param name: Name of this port
:param admin_state_up: Set admin stat... | 0.001764 |
def CreateBlockDeviceMap(self, image_id, instance_type):
"""
If you launch without specifying a manual device block mapping, you may
not get all the ephemeral devices available to the given instance type.
This will build one that ensures all available ephemeral devices are
mapped.
... | 0.018484 |
def is_all_field_none(self):
"""
:rtype: bool
"""
if self._state is not None:
return False
if self._time_start is not None:
return False
if self._time_end is not None:
return False
if self._error_message is not None:
... | 0.00339 |
def removeApplicationManifest(self, pchApplicationManifestFullPath):
"""Removes an application manifest from the list to load when building the list of installed applications."""
fn = self.function_table.removeApplicationManifest
result = fn(pchApplicationManifestFullPath)
return result | 0.009375 |
def osCopy(self):
""" Triggers the OS "copy" keyboard shortcut """
k = Keyboard()
k.keyDown("{CTRL}")
k.type("c")
k.keyUp("{CTRL}") | 0.011696 |
def disease_comment(self, comment=None, entry_name=None, limit=None, as_df=False):
"""Method to query :class:`.models.DiseaseComment` objects in database
:param comment: Comment(s) to disease
:type comment: str or tuple(str) or None
:param entry_name: name(s) in :class:`.models.Entry`
... | 0.005596 |
def makeArg(segID, N, CA, C, O, geo):
'''Creates an Arginie residue'''
##R-Group
CA_CB_length=geo.CA_CB_length
C_CA_CB_angle=geo.C_CA_CB_angle
N_C_CA_CB_diangle=geo.N_C_CA_CB_diangle
CB_CG_length=geo.CB_CG_length
CA_CB_CG_angle= geo.CA_CB_CG_angle
N_CA_CB_CG_diangle=geo.N_CA_CB_CG_diang... | 0.022563 |
def traverse(self):
"""Traverse the tree yielding the direction taken to a node, the
co-ordinates of that node and the directions leading from the Node.
Yields
------
(direction, (x, y), {:py:class:`~rig.routing_table.Routes`, ...})
Direction taken to reach a Node in... | 0.00132 |
def _print_base64(self, base64_data):
"""
Pipe the binary directly to the label printer. Works under Linux
without requiring PySerial. This is not typically something you
should call directly, unless you have special needs.
@type base64_data: L{str}
@param base64... | 0.006024 |
def _add_qualified_edge_helper(self, u, v, relation, annotations, subject_modifier, object_modifier) -> str:
"""Add a qualified edge from the internal aspects of the parser."""
return self.graph.add_qualified_edge(
u,
v,
relation=relation,
evidence=self.co... | 0.005137 |
def refresh_from_pdb(self, pdb_state):
"""
Refresh Variable Explorer and Editor from a Pdb session,
after running any pdb command.
See publish_pdb_state and notify_spyder in spyder_kernels
"""
if 'step' in pdb_state and 'fname' in pdb_state['step']:
fname = p... | 0.002674 |
def go_to(self, url_or_text):
"""Go to page utl."""
if is_text_string(url_or_text):
url = QUrl(url_or_text)
else:
url = url_or_text
self.notebookwidget.load(url) | 0.009217 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.