text stringlengths 78 104k | score float64 0 0.18 |
|---|---|
def run(self, inputs):
"""Run many steps of the simulation.
The argument is a list of input mappings for each step,
and its length is the number of steps to be executed.
"""
steps = len(inputs)
# create i/o arrays of the appropriate length
ibuf_type = ctypes.c_ui... | 0.000894 |
def stop(id):
"""
Stop a running job.
"""
try:
experiment = ExperimentClient().get(normalize_job_name(id))
except FloydException:
experiment = ExperimentClient().get(id)
if experiment.state not in ["queued", "queue_scheduled", "running"]:
floyd_logger.info("Job in {} sta... | 0.00495 |
def _parse_the_ned_position_results(
self,
ra,
dec,
nedResults):
"""
*parse the ned results*
**Key Arguments:**
- ``ra`` -- the search ra
- ``dec`` -- the search dec
**Return:**
- ``results`` -- list of... | 0.001336 |
def uninstalled(name, version=None, uninstall_args=None, override_args=False):
'''
Uninstalls a package
name
The name of the package to be uninstalled
version
Uninstalls a specific version of the package. Defaults to latest
version installed.
uninstall_args
A list of unins... | 0.000834 |
def minvar(X, order, sampling=1., NFFT=default_NFFT):
r"""Minimum Variance Spectral Estimation (MV)
This function computes the minimum variance spectral estimate using
the Musicus procedure. The Burg algorithm from :func:`~spectrum.burg.arburg`
is used for the estimation of the autoregressive paramete... | 0.001492 |
def _get_bucket_name(**values):
"""
Generates the bucket name for url_for.
"""
app = current_app
# manage other special values, all have no meaning for static urls
values.pop('_external', False) # external has no meaning here
values.pop('_anchor', None) # anchor as well
values.pop('_me... | 0.000948 |
def split_token(output):
"""
Split an output into token tuple, real output tuple.
:param output:
:return: tuple, tuple
"""
output = ensure_tuple(output)
flags, i, len_output, data_allowed = set(), 0, len(output), True
while i < len_output and isflag(output[i]):
if output[i].mu... | 0.002217 |
def implied_feature (implicit_value):
""" Returns the implicit feature associated with the given implicit value.
"""
assert isinstance(implicit_value, basestring)
components = implicit_value.split('-')
if components[0] not in __implicit_features:
raise InvalidValue ("'%s' is not a value of ... | 0.009877 |
def values(self):
"""
Returns the labels, strings or relation-values.
:return: all the values, None if not NOMINAL, STRING, or RELATION
:rtype: list
"""
enm = javabridge.call(self.jobject, "enumerateValues", "()Ljava/util/Enumeration;")
if enm is None:
... | 0.0075 |
def get_family(families):
"""Return the first installed font family in family list"""
if not isinstance(families, list):
families = [ families ]
for family in families:
if font_is_installed(family):
return family
else:
print("Warning: None of the following fonts is in... | 0.010076 |
def writerow(self, cells):
"""
Write a row of cells into the default sheet of the spreadsheet.
:param cells: A list of cells (most basic Python types supported).
:return: Nothing.
"""
if self.default_sheet is None:
self.default_sheet = self.new_sheet()
... | 0.005634 |
def get_organization_events(self, org):
"""
:calls: `GET /users/:user/events/orgs/:org <http://developer.github.com/v3/activity/events>`_
:param org: :class:`github.Organization.Organization`
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
"""
... | 0.006745 |
def p_Value(self, p):
"""Value : valueofObjectSyntax
| '{' BitsValue '}'"""
n = len(p)
if n == 2:
p[0] = p[1]
elif n == 4:
p[0] = p[2] | 0.009662 |
def set_page_label(self, page_id, label):
"""
Set a label on the page
:param page_id: content_id format
:param label: label to add
:return:
"""
url = 'rest/api/content/{page_id}/label'.format(page_id=page_id)
data = {'prefix': 'global',
'na... | 0.005305 |
def pad_dialogues(self, dialogues):
"""
Pad the entire dataset.
This involves adding padding at the end of each sentence, and in the case of
a hierarchical model, it also involves adding padding at the end of each dialogue,
so that every training sample (dialogue) has the same di... | 0.009775 |
def _downloaded_filename(self):
"""Download the package's archive if necessary, and return its
filename.
--no-deps is implied, as we have reimplemented the bits that would
ordinarily do dependency resolution.
"""
# Peep doesn't support requirements that don't come down ... | 0.001982 |
def get_block(self, x, y, z):
"""Get a block from relative x,y,z."""
sy,by = divmod(y, 16)
section = self.get_section(sy)
if section == None:
return None
return section.get_block(x, by, z) | 0.016598 |
def list_alarms(self, limit=None, marker=None, return_next=False):
"""
Returns a list of all the alarms created on this entity.
"""
return self._alarm_manager.list(limit=limit, marker=marker,
return_next=return_next) | 0.011364 |
def fillPelicanHole(site, username, password, tstat_name, start_time, end_time):
"""Fill a hole in a Pelican thermostat's data stream.
Arguments:
site -- The thermostat's Pelican site name
username -- The Pelican username for the site
password -- The Pelican password for the site
... | 0.002729 |
def dfa_projection(dfa: dict, symbols_to_remove: set) -> dict:
""" Returns a NFA that reads the language recognized by the
input DFA where all the symbols in **symbols_to_project**
are projected out of the alphabet.
Projection in a DFA is the operation that existentially
removes from a word all occ... | 0.000867 |
def run_lint_command():
"""
Run lint command in the shell and save results to lint-result.xml
"""
lint, app_dir, lint_result, ignore_layouts = parse_args()
if not lint_result:
if not distutils.spawn.find_executable(lint):
raise Exception(
'`%s` executable could no... | 0.004111 |
def name():
"""
Generates a random person's name which has the following structure
<optional prefix> <first name> <second name> <optional suffix>
:return: a random name.
"""
result = ""
if RandomBoolean.chance(3, 5):
result += random.choice(_name_pre... | 0.005597 |
def revoke_session(self, sid='', token=''):
"""
Mark session as revoked but also explicitly revoke all issued tokens
:param token: any token connected to the session
:param sid: Session identifier
"""
if not sid:
if token:
sid = self.handler.s... | 0.002972 |
def unbind(self):
"""Unlisten and close each bound item."""
for variable in self.variables:
self.__unbind_variable(variable)
for result in self.results:
self.__unbind_result(result) | 0.008734 |
def _random_edge_iterator(graph, n_edges: int) -> Iterable[Tuple[BaseEntity, BaseEntity, int, Mapping]]:
"""Get a random set of edges from the graph and randomly samples a key from each.
:type graph: pybel.BELGraph
:param n_edges: Number of edges to randomly select from the given graph
"""
edges = ... | 0.00578 |
def commit_history(self, branch, limit=None, days=None, ignore_globs=None, include_globs=None):
"""
Returns a pandas DataFrame containing all of the commits for a given branch. The results from all repositories
are appended to each other, resulting in one large data frame of size <limit>. If a ... | 0.006993 |
def handle_sub_rectangles(self, images, sub_rectangles):
""" handle_sub_rectangles(images)
Handle the sub-rectangle stuff. If the rectangles are given by the
user, the values are checked. Otherwise the subrectangles are
calculated automatically.
"""
image_info = [im.inf... | 0.001807 |
def RegisterAt(cls, *args, **kwargs):
"""
**RegisterAt**
RegisterAt(n, f, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation="", method_type=utils.identity, explain=True, _return_type=None)
Most of the time you don't want to register an method as such, that is, you don't car... | 0.004043 |
def _references(self, i, sequence=False):
"""Handle references."""
value = ''
c = next(i)
if c == '\\':
# \\
if sequence and self.bslash_abort:
raise PathNameException
value = r'\\'
if self.bslash_abort:
if ... | 0.001745 |
def _formatparam(param, value=None, quote=True):
"""Convenience function to format and return a key=value pair.
This will quote the value if needed or if quote is true. If value is a
three tuple (charset, language, value), it will be encoded according
to RFC2231 rules. If it contains non-ascii charac... | 0.000671 |
def tripledes_cbc_pkcs5_decrypt(key, data, iv):
"""
Decrypts 3DES ciphertext in CBC mode using either the 2 or 3 key variant
(16 or 24 byte long key) and PKCS#5 padding.
:param key:
The encryption key - a byte string 16 or 24 bytes long (2 or 3 key mode)
:param data:
The ciphertext... | 0.001524 |
def after(self, *nodes: Union[AbstractNode, str]) -> None:
"""Append nodes after this node.
If nodes contains ``str``, it will be converted to Text node.
"""
if self.parentNode:
node = _to_node_list(nodes)
_next_node = self.nextSibling
if _next_node i... | 0.004367 |
def invoke_webhook_handlers(self):
"""
Invokes any webhook handlers that have been registered for this event
based on event type or event sub-type.
See event handlers registered in the ``djstripe.event_handlers`` module
(or handlers registered in djstripe plugins or contrib packages).
"""
webhooks.call_... | 0.027027 |
def response(uri, method, res, token='', keyword='',
content='', raw_flag=False):
"""Response of tonicdns_client request
Arguments:
uri: TonicDNS API URI
method: TonicDNS API request method
res: Response of against request to TonicDNS API
token: Toni... | 0.001751 |
def calc_outputs_v1(self):
"""Performs the actual interpolation or extrapolation.
Required control parameters:
|XPoints|
|YPoints|
Required derived parameter:
|NmbPoints|
|NmbBranches|
Required flux sequence:
|Input|
Calculated flux sequence:
|Outputs|
Ex... | 0.000385 |
def parse(cls, datestr):
"""Parse string <DATE_VALUE> string and make :py:class:`DateValue`
instance out of it.
:param str datestr: String with GEDCOM date, range, period, etc.
"""
# some apps generate DATE recods without any value, which is
# non-standard, return empty ... | 0.002342 |
def get_code(self):
"""Returns code representation of value of widget"""
selection = self.GetSelection()
if selection == wx.NOT_FOUND:
selection = 0
# Return code string
return self.styles[selection][1] | 0.007782 |
def query(self, sql, *args, **kwargs):
"""Executes an SQL SELECT query, returning a result set as a Statement object.
:param sql: query to execute
:param args: parameters iterable
:param kwargs: parameters iterable
:return: result set as a Statement object
:rtype: pydbal... | 0.006276 |
def press(self):
'''
press key via name or key code. Supported key name includes:
home, back, left, right, up, down, center, menu, search, enter,
delete(or del), recent(recent apps), volume_up, volume_down,
volume_mute, camera, power.
Usage:
d.press.back() # pres... | 0.003067 |
def generate_association_rules(patterns, confidence_threshold):
"""
Given a set of frequent itemsets, return a dict
of association rules in the form
{(left): ((right), confidence)}
"""
rules = {}
for itemset in patterns.keys():
upper_support = patterns[itemset]
for i in rang... | 0.001172 |
def auto_decode(data):
# type: (bytes) -> Text
"""Check a bytes string for a BOM to correctly detect the encoding
Fallback to locale.getpreferredencoding(False) like open() on Python3"""
for bom, encoding in BOMS:
if data.startswith(bom):
return data[len(bom):].decode(encoding)
... | 0.001466 |
def matches(self, s):
"""Whether the pattern matches anywhere in the string s."""
regex_matches = self.compiled_regex.search(s) is not None
return not regex_matches if self.inverted else regex_matches | 0.004717 |
def vector_angle_cos(u, v):
'''
vector_angle_cos(u, v) yields the cosine of the angle between the two vectors u and v. If u
or v (or both) is a (d x n) matrix of n vectors, the result will be a length n vector of the
cosines.
'''
u = np.asarray(u)
v = np.asarray(v)
return (u * v).sum(0) ... | 0.008242 |
def _aodata(echo, columns, xnxq=None, final_exam=False):
"""
生成用于post的数据
:param echo: a int to check is response is write
:type echo: int
:param columns: 所有columns列名组成的list
:type columns: list
:param xnxq: str
:type xnxq: string
:param final_exam:... | 0.002423 |
def query(self):
"""Return all start records for this the dataset, grouped by the start record"""
return self._session.query(Process).filter(Process.d_vid == self._d_vid) | 0.02139 |
def kl_prep(self,mlt_df):
""" prepare KL based parameterizations
Parameters
----------
mlt_df : pandas.DataFrame
a dataframe with multiplier array information
Note
----
calls pyemu.helpers.setup_kl()
"""
if len(self.kl_props) == 0:
... | 0.012608 |
def wait_for_mouse_move_from(self, origin_x, origin_y):
"""
Wait for the mouse to move from a location. This function will block
until the condition has been satisified.
:param origin_x: the X position you expect the mouse to move from
:param origin_y: the Y position you expect ... | 0.004651 |
def add_file_path_in_work_tree(self, path, work_tree, verbose=True):
"""
Add a new file as blob in the storage and add its tree entry into the index.
"""
args = ['--work-tree', work_tree, 'add', '-f']
if verbose:
args.append('--verbose')
args.append(path)
... | 0.008152 |
def ret_list_minions(self):
'''
Return minions that match via list
'''
tgt = _tgt_set(self.tgt)
return self._ret_minions(tgt.intersection) | 0.011236 |
def color(x, y):
"""triangles.
Colors:
- http://paletton.com/#uid=70l150klllletuehUpNoMgTsdcs shade 2
"""
if (x-4) > (y-4) and -(y-4) <= (x-4):
# right
return "#CDB95B"
elif (x-4) > (y-4) and -(y-4) > (x-4):
# top
return "#CD845B"
elif (x-4) <= (y-4) and -(y... | 0.001988 |
def get_benchmark_returns(symbol):
"""
Get a Series of benchmark returns from IEX associated with `symbol`.
Default is `SPY`.
Parameters
----------
symbol : str
Benchmark symbol for which we're getting the returns.
The data is provided by IEX (https://iextrading.com/), and we can
... | 0.001538 |
def on_change_plot_cursor(self,event):
"""
If mouse is over data point making it selectable change the shape of the cursor
@param: event -> the wx Mouseevent for that click
"""
if not self.xdata or not self.ydata: return
pos=event.GetPosition()
width, height = sel... | 0.01355 |
def group(self, groupId):
"""
gets a group based on it's ID
"""
url = "%s/%s" % (self.root, groupId)
return Group(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port,... | 0.005587 |
def p_For(p):
'''
For : FOR Expression IN Expression COLON Terminator Block
| FOR Expression COMMA Expression IN Expression COLON Terminator Block
'''
if len(p) <= 8:
p[0] = For(p[2], None, p[4], p[6], p[7])
else:
p[0] = For(p[2], p[4], p[6], p[8], p[9]) | 0.003356 |
def create_features(bam_in, loci_file, reference, out_dir):
"""
Use feature extraction module from CoRaL
"""
lenvec_plus = op.join(out_dir, 'genomic_lenvec.plus')
lenvec_minus = op.join(out_dir, 'genomic_lenvec.minus')
compute_genomic_cmd = ("compute_genomic_lenvectors "
... | 0.002343 |
def ParseAttributes(self, problems):
"""Parse all attributes, calling problems as needed.
Return True if all of the values are valid.
"""
if util.IsEmpty(self.shape_id):
problems.MissingValue('shape_id')
return
try:
if not isinstance(self.shape_pt_sequence, int):
self.sha... | 0.009276 |
def update_metadata_statement(self, metadata_statement, receiver='',
federation=None, context=''):
"""
Update a metadata statement by:
* adding signed metadata statements or uris pointing to signed
metadata statements.
* adding the entities ... | 0.002588 |
def proportions(
self,
axis=None,
weighted=True,
include_transforms_for_dims=None,
include_mr_cat=False,
prune=False,
):
"""Return percentage values for cube as `numpy.ndarray`.
This function calculates the proportions across the selected axis
... | 0.001258 |
def from_nid(cls, lib, nid):
"""
Instantiate a new :py:class:`_EllipticCurve` associated with the given
OpenSSL NID.
:param lib: The OpenSSL library binding object.
:param nid: The OpenSSL NID the resulting curve object will represent.
This must be a curve NID (and ... | 0.003442 |
def cudnnCreateTensorDescriptor():
"""
Create a Tensor descriptor object.
Allocates a cudnnTensorDescriptor_t structure and returns a pointer to it.
Returns
-------
tensor_descriptor : int
Tensor descriptor.
"""
tensor = ctypes.c_void_p()
status = _libcudnn.cudnnCreateTens... | 0.002457 |
def stop(self, labels=None):
"""Stop specified timer(s).
Parameters
----------
labels : string or list, optional (default None)
Specify the label(s) of the timer(s) to be stopped. If it is
``None``, stop the default timer with label specified by the
``dfltl... | 0.001967 |
def _get_node(name: str, args: str):
"""Get node from object name and arg string
Not Used. Left for future reference purpose.
"""
obj = get_object(name)
args = ast.literal_eval(args)
if not isinstance(args, tuple):
args = (args,)
return obj.node(*args) | 0.003448 |
def set_courses(self, course_ids=None):
"""Sets the courses.
arg: courseIds (osid.id.Id): the course Ids
raise: INVALID_ARGUMENT - courseIds is invalid
raise: NullArgument - courseIds is null
raise: NoAccess - metadata.is_read_only() is true
compliance: mandatory -... | 0.002567 |
def bulk_remove(self, named_graph, add, size=DEFAULT_CHUNK_SIZE):
"""
Remove batches of statements in n-sized chunks.
"""
return self.bulk_update(named_graph, add, size, is_add=False) | 0.009302 |
def show_raslog_output_show_all_raslog_number_of_entries(self, **kwargs):
"""Auto Generated Code
"""
config = ET.Element("config")
show_raslog = ET.Element("show_raslog")
config = show_raslog
output = ET.SubElement(show_raslog, "output")
show_all_raslog = ET.SubEl... | 0.003401 |
def get_parent_label(self, treepos):
"""Given the treeposition of a node, return the label of its parent.
Returns None, if the tree has no parent.
"""
parent_pos = self.get_parent_treepos(treepos)
if parent_pos is not None:
parent = self.dgtree[parent_pos]
... | 0.005263 |
def get_locale_with_proxy(proxy):
"""Given a Proxy, returns the Locale
This assumes that instantiating a dlkit.mongo.locale.objects.Locale
without constructor arguments wlll return the default Locale.
"""
from .locale.objects import Locale
if proxy is not None:
locale = proxy.get_l... | 0.004854 |
def splitBy(data, num):
""" Turn a list to list of list """
return [data[i:i + num] for i in range(0, len(data), num)] | 0.007937 |
def read_from_file( self, filename, negative_occupancies='warn' ):
"""
Reads the projected wavefunction character of each band from a VASP PROCAR file.
Args:
filename (str): Filename of the PROCAR file.
negative_occupancies (:obj:Str, optional): Sets the behaviour for ha... | 0.022745 |
def powered_up(self):
"""
Returns True whether the card is "powered up".
"""
if not self.data.scripts.powered_up:
return False
for script in self.data.scripts.powered_up:
if not script.check(self):
return False
return True | 0.045082 |
def _valid_baremetal_port(port):
"""Check if port is a baremetal port with exactly one security group"""
if port.get(portbindings.VNIC_TYPE) != portbindings.VNIC_BAREMETAL:
return False
sgs = port.get('security_groups', [])
if len(sgs) == 0:
# Nothing to do
... | 0.003279 |
def Star(inner_rule, loc=None):
"""
A rule that accepts a sequence of tokens satisfying ``inner_rule`` zero or more times,
and returns the returned values in a :class:`list`.
"""
@llrule(loc, lambda parser: [])
def rule(parser):
results = []
while True:
data = parser.... | 0.003704 |
def _normalize_port(scheme, port):
"""Return port if it is not default port, else None.
>>> _normalize_port('http', '80')
>>> _normalize_port('http', '8080')
'8080'
"""
if not scheme:
return port
if port and port != DEFAULT_PORT[scheme]:
return port | 0.00339 |
def get_hash(input_string):
""" Return the hash of the movie depending on the input string.
If the input string looks like a symbolic link to a movie in a Kolekto
tree, return its movies hash, else, return the input directly in lowercase.
"""
# Check if the input looks like a link to a movie:
... | 0.002033 |
def first_produced_mesh(self):
"""The first produced mesh.
:return: the first produced mesh
:rtype: knittingpattern.Mesh.Mesh
:raises IndexError: if no mesh is produced
.. seealso:: :attr:`number_of_produced_meshes`
"""
for instruction in self.instructions:
... | 0.004175 |
def create_model(schema, collection, class_name=None):
"""
Main entry point to creating a new mongothon model. Both
schema and Pymongo collection objects must be provided.
Returns a new class which can be used as a model class.
The class name of the model class by default is inferred
from the ... | 0.004202 |
def purge(self, queue, nowait=True, ticket=None, cb=None):
'''
Purge all messages in a queue.
'''
nowait = nowait and self.allow_nowait() and not cb
args = Writer()
args.write_short(ticket or self.default_ticket).\
write_shortstr(queue).\
write_bi... | 0.003766 |
def _consolidate_auth(ssh_password=None,
ssh_pkey=None,
ssh_pkey_password=None,
allow_agent=True,
host_pkey_directories=None,
logger=None):
"""
Get sure authentication inform... | 0.004408 |
def plot_volume_exposures_gross(grossed_threshold, percentile, ax=None):
"""
Plots outputs of compute_volume_exposures as line graphs
Parameters
----------
grossed_threshold : pd.Series
Series of grossed volume exposures (output of
compute_volume_exposures).
percentile : float
... | 0.001196 |
def set_disk_cache(self, results, key=None):
"""Store result in disk cache with key matching model state."""
if not getattr(self, 'disk_cache_location', False):
self.init_disk_cache()
disk_cache = shelve.open(self.disk_cache_location)
key = self.model.hash if key is None else... | 0.005195 |
def im_open(self, *, user: str, **kwargs) -> SlackResponse:
"""Opens a direct message channel.
Args:
user (str): The user id to open a DM with. e.g. 'W1234567890'
"""
kwargs.update({"user": user})
return self.api_call("im.open", json=kwargs) | 0.006803 |
def to_query(self):
"""
Returns a json-serializable representation.
"""
return {
"geo_shape": {
self.name: {
"indexed_shape": {
"index": self.index_name,
"type": self.doc_type,
... | 0.004386 |
def significance_fdr(p, alpha):
"""Calculate significance by controlling for the false discovery rate.
This function determines which of the p-values in `p` can be considered
significant. Correction for multiple comparisons is performed by
controlling the false discovery rate (FDR). The FDR is the maxi... | 0.000787 |
def install(client, force):
"""Install Git hooks."""
import pkg_resources
from git.index.fun import hook_path as get_hook_path
for hook in HOOKS:
hook_path = Path(get_hook_path(hook, client.repo.git_dir))
if hook_path.exists():
if not force:
click.echo(
... | 0.001166 |
def determine_repo_dir(template, abbreviations, clone_to_dir, checkout,
no_input, password=None):
"""
Locate the repository directory from a template reference.
Applies repository abbreviations to the template reference.
If the template refers to a repository URL, clone it.
I... | 0.00043 |
def _parser(result):
'''
parses the output into a dictionary
'''
# regexes to match
_total_time = re.compile(r'total time:\s*(\d*.\d*s)')
_total_execution = re.compile(r'event execution:\s*(\d*.\d*s?)')
_min_response_time = re.compile(r'min:\s*(\d*.\d*ms)')
_max_response_time = re.compi... | 0.000752 |
def __check_suc_cookie(self, components):
'''
This is only called if we're on a known sucuri-"protected" site.
As such, if we do *not* have a sucuri cloudproxy cookie, we can assume we need to
do the normal WAF step-through.
'''
netloc = components.netloc.lower()
for cookie in self.cj:
if cookie.domai... | 0.027273 |
def send_build_close(params,response_url):
'''send build close sends a final response (post) to the server to bring down
the instance. The following must be included in params:
repo_url, logfile, repo_id, secret, log_file, token
'''
# Finally, package everything to send back to shub
response = ... | 0.005573 |
def uv(self, values):
"""
Set the UV coordinates.
Parameters
--------------
values : (n, 2) float
Pixel locations on a texture per- vertex
"""
if values is None:
self._data.clear()
else:
self._data['uv'] = np.asanyarray(v... | 0.005814 |
def ls(serial=None):
"""
List the files on the micro:bit.
If no serial object is supplied, microfs will attempt to detect the
connection itself.
Returns a list of the files on the connected device or raises an IOError if
there's a problem.
"""
out, err = execute([
'import os',
... | 0.002146 |
def fill(self):
"""Parse all the paths (['Lcom/example/myclass/MyActivity$1;', ...])
and build a tree using the QTreeWidgetItem insertion method."""
log.debug("Fill classes tree")
for idx, filename, digest, classes in self.session.get_classes():
for c in sorted(classes, k... | 0.001778 |
def validate_request_table(self, request):
'''
Validates that all requests have the same table name. Set the table
name if it is the first request for the batch operation.
request:
the request to insert, update or delete entity
'''
if self.batch_table:
... | 0.005566 |
def RFC3339(self):
"""RFC3339.
`Link to RFC3339.`__
__ https://www.ietf.org/rfc/rfc3339.txt
"""
# get timezone offset
delta_sec = time.timezone
m, s = divmod(delta_sec, 60)
h, m = divmod(m, 60)
# timestamp
format_string = "%Y-%m-%dT%H:%M:... | 0.002685 |
def get(cls, context, path, out_fp):
"""
Streamily download a file from the connection multiplexer process in
the controller.
:param mitogen.core.Context context:
Reference to the context hosting the FileService that will be used
to fetch the file.
:param... | 0.000836 |
def sign_create_withdrawal(withdrawal_params, key_pair):
"""
Function to create the withdrawal request by signing the parameters necessary for withdrawal.
Execution of this function is as follows::
sign_create_withdrawal(withdrawal_params=signable_params, private_key=eth_private_key)
The expec... | 0.004707 |
def export_configuration_generator(self, sql, sql_args):
"""
Generator for :class:`meteorpi_model.ExportConfiguration`
:param sql:
A SQL statement which must return rows describing export configurations
:param sql_args:
Any variables required to populate the quer... | 0.007185 |
def replace_namespaced_cron_job(self, name, namespace, body, **kwargs): # noqa: E501
"""replace_namespaced_cron_job # noqa: E501
replace the specified CronJob # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async... | 0.0013 |
def _prune_fields(field_dict, only):
"""Filter fields data **in place** with `only` list.
Example::
self._prune_fields(field_dict, ['slug', 'text'])
self._prune_fields(field_dict, [MyModel.slug])
"""
fields = [(isinstance(f, str) and f or f.name) for f in only]
... | 0.004415 |
def _grow_to(self, width, height, top_tc=None):
"""
Grow this cell to *width* grid columns and *height* rows by expanding
horizontal spans and creating continuation cells to form vertical
spans.
"""
def vMerge_val(top_tc):
if top_tc is not self:
... | 0.003135 |
def storedata(self, fieldName, values, data_type, vName, vClass):
"""Create and initialize a single field vdata, returning
the vdata reference number.
Args::
fieldName Name of the single field in the vadata to create
values Sequence of values to store in the field;. ... | 0.000895 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.