text stringlengths 78 104k | score float64 0 0.18 |
|---|---|
def add_carrier(self, carrier_record, power_state, aux_data_records=None):
"""Add a new carrier to the handover request message.
:param carrier_record: a record providing carrier information
:param power_state: a string describing the carrier power state
:param aux_data_records: list of... | 0.003348 |
def debug(self): # pragma: no cover
"""Prints all configuration registries for debugging purposes."""
print("Aliases:")
pprint.pprint(self._aliases)
print("Override:")
pprint.pprint(self._override)
print("Args:")
pprint.pprint(self._args)
print("Env:")
... | 0.00365 |
def log_function(self, stream_name, properties={},
log_function_stack_trace=False,
log_exception_stack_trace=False,
namespace=None):
"""
Logs each call to the function as an event in the stream with name
`stream_name`. If `log_stack_trace` is set, it ... | 0.007782 |
def normpath(path):
# type: (Text) -> Text
"""Normalize a path.
This function simplifies a path by collapsing back-references
and removing duplicated separators.
Arguments:
path (str): Path to normalize.
Returns:
str: A valid FS path.
Example:
>>> normpath("/foo//... | 0.001682 |
def log_ndtr(x, series_order=3, name="log_ndtr"):
"""Log Normal distribution function.
For details of the Normal distribution function see `ndtr`.
This function calculates `(log o ndtr)(x)` by either calling `log(ndtr(x))` or
using an asymptotic series. Specifically:
- For `x > upper_segment`, use the appro... | 0.003573 |
def apply_T5(word):
'''If a (V)VVV sequence contains a VV sequence that could be an /i/-final
diphthong, there is a syllable boundary between it and the third vowel,
e.g., [raa.ois.sa], [huo.uim.me], [la.eis.sa], [sel.vi.äi.si], [tai.an],
[säi.e], [oi.om.me].'''
WORD = word
offset = 0
for v... | 0.001381 |
async def hset(self, name, key, value):
"""
Set ``key`` to ``value`` within hash ``name``
Returns 1 if HSET created a new field, otherwise 0
"""
return await self.execute_command('HSET', name, key, value) | 0.008197 |
def update(self, command):
"""
EXPECTING command == {"set":term, "clear":term, "where":where}
THE set CLAUSE IS A DICT MAPPING NAMES TO VALUES
THE where CLAUSE IS A JSON EXPRESSION FILTER
"""
command = wrap(command)
command_clear = listwrap(command["clear"])
... | 0.0033 |
def set_conf_str(conf, optstrs):
"""Set options from a list of section.option=value string.
Args:
conf (:class:`~loam.manager.ConfigurationManager`): the conf to update.
optstrs (list of str): the list of 'section.option=value' formatted
string.
"""
falsy = ['0', 'no', 'n', ... | 0.00091 |
def _sample_condition(exp_condition, frame_times, oversampling=50,
min_onset=-24):
"""Make a possibly oversampled event regressor from condition information.
Parameters
----------
exp_condition : arraylike of shape (3, n_events)
yields description of events for this conditi... | 0.001227 |
def getClientURL(self):
"""This method is used to populate catalog values
Returns the URL of the client for this analysis' AR.
"""
request = self.getRequest()
if request:
client = request.getClient()
if client:
return client.absolute_url_pa... | 0.006173 |
def Bernoulli(cls,
mean: 'TensorFluent',
batch_size: Optional[int] = None) -> Tuple[Distribution, 'TensorFluent']:
'''Returns a TensorFluent for the Bernoulli sampling op with given mean parameter.
Args:
mean: The mean parameter of the Bernoulli distribution.
bat... | 0.008092 |
def clear_composition(self):
"""Removes the composition link.
raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.r... | 0.005085 |
def extract_specific_interval(self, interval_start, interval_end):
"""
Overload if special behaviour is required when a series ends.
"""
interval_start = int(interval_start)
interval_end = int(interval_end)
if interval_start >= interval_end:
raise ValueError... | 0.004442 |
def amend_commit_message(self, cherry_pick_branch):
""" prefix the commit message with (X.Y) """
commit_prefix = ""
if self.prefix_commit:
commit_prefix = f"[{get_base_branch(cherry_pick_branch)}] "
updated_commit_message = f"""{commit_prefix}{self.get_commit_message(self.co... | 0.004224 |
def indentation_post_event_input_accelerators(editor, event):
"""
Implements indentation post event input accelerators.
:param editor: Document editor.
:type editor: QWidget
:param event: Event being handled.
:type event: QEvent
:return: Method success.
:rtype: bool
"""
if even... | 0.004382 |
def shovel_help(shovel, *names):
'''Return a string about help with the tasks, or lists tasks available'''
# If names are provided, and the name refers to a group of tasks, print out
# the tasks and a brief docstring. Otherwise, just enumerate all the tasks
# available
if not len(names):
ret... | 0.001757 |
def process_instance_change_msg(self, instChg: InstanceChange, frm: str) -> None:
"""
Validate and process an instance change request.
:param instChg: the instance change request
:param frm: the name of the node that sent this `msg`
"""
if frm not in self.provider.connec... | 0.004772 |
def to_dict(self, serialize=False):
"""
This method returns the object as a Python dict. If serialize is passed, only those attributes
that have been modified will be included in the result.
:param serialize:
:return:
"""
if serialize:
encode_method = ... | 0.00789 |
def facetintervalrecordlookup(table, key, start='start', stop='stop',
include_stop=False):
"""
As :func:`petl.transform.intervals.facetintervallookup` but return records.
"""
trees = facetrecordtrees(table, key, start=start, stop=stop)
out = dict()
for k in tr... | 0.004854 |
def in6_isaddrTeredo(x):
"""
Return True if provided address is a Teredo, meaning it is under
the /32 conf.teredoPrefix prefix value (by default, 2001::).
Otherwise, False is returned. Address must be passed in printable
format.
"""
our = inet_pton(socket.AF_INET6, x)[0:4]
teredoPrefix =... | 0.002488 |
def current_op(self, include_all=False, session=None):
"""Get information on operations currently running.
:Parameters:
- `include_all` (optional): if ``True`` also list currently
idle operations in the result
- `session` (optional): a
:class:`~pymongo.client... | 0.001779 |
def is_ec2_instance():
"""Try fetching instance metadata at 'curl http://169.254.169.254/latest/meta-data/'
to see if host is on an ec2 instance"""
# Note: this code assumes that docker containers running on ec2 instances
# inherit instances metadata, which they do as of 2016-08-25
global IS_EC2_I... | 0.002646 |
def _get_y_scores(self, X):
"""
The ``precision_recall_curve`` metric requires target scores that
can either be the probability estimates of the positive class,
confidence values, or non-thresholded measures of decisions (as
returned by a "decision function").
"""
... | 0.002685 |
def add(self):
""" Add a new VRF.
"""
c.action = 'add'
if 'action' in request.params:
if request.params['action'] == 'add':
v = VRF()
if request.params['rt'].strip() != '':
v.rt = request.params['rt']
if re... | 0.003344 |
def _pki_minions(self):
'''
Retreive complete minion list from PKI dir.
Respects cache if configured
'''
minions = []
pki_cache_fn = os.path.join(self.opts['pki_dir'], self.acc, '.key_cache')
try:
os.makedirs(os.path.dirname(pki_cache_fn))
exce... | 0.004549 |
def gen_lock(self, lock_type='update', timeout=0, poll_interval=0.5):
'''
Set and automatically clear a lock
'''
if not isinstance(lock_type, six.string_types):
raise GitLockError(
errno.EINVAL,
'Invalid lock_type \'{0}\''.format(lock_type)
... | 0.001039 |
def ensure_proper_casing(self):
"""Ensures proper casing of Pipfile packages"""
pfile = self.parsed_pipfile
casing_changed = self.proper_case_section(pfile.get("packages", {}))
casing_changed |= self.proper_case_section(pfile.get("dev-packages", {}))
return casing_changed | 0.009615 |
def setDatastreamVersionable(self, pid, dsID, versionable):
'''Update datastream versionable setting.
:param pid: object pid
:param dsID: datastream id
:param versionable: boolean
:returns: boolean success
'''
# /objects/{pid}/datastreams/{dsID} ? [versionable]
... | 0.004967 |
def save(self, filename, clear_history=True, incl_uniqueid=False,
compact=False):
"""Save the bundle to a JSON-formatted ASCII file.
:parameter str filename: relative or full path to the file
:parameter bool clear_history: whether to clear history log
items before savin... | 0.002676 |
def gisland(self, dae):
"""Reset g(x) for islanded buses and areas"""
if not (self.islanded_buses and self.island_sets):
return
a, v = list(), list()
# for islanded areas without a slack bus
for island in self.island_sets:
nosw = 1
for item i... | 0.002972 |
def get_build_timeline(self, project, build_id, timeline_id=None, change_id=None, plan_id=None):
"""GetBuildTimeline.
Gets details for a build
:param str project: Project ID or project name
:param int build_id:
:param str timeline_id:
:param int change_id:
:param ... | 0.006198 |
def max_id_length(self):
"""
Returns the maximum length of a todo ID, used for formatting purposes.
"""
if config().identifiers() == "text":
return max_id_length(len(self._todos))
else:
try:
return math.ceil(math.log(len(self._todos), 10))
... | 0.005333 |
def command(self):
"""
Returns a string representing the command you have to type to
obtain the same packet
"""
f = []
for fn, fv in six.iteritems(self.fields):
fld = self.get_field(fn)
if isinstance(fv, (list, dict, set)) and len(fv) == 0:
... | 0.002296 |
def is_opened(components):
"""
Checks if all components are opened.
To be checked components must implement [[IOpenable]] interface.
If they don't the call to this method returns true.
:param components: a list of components that are to be checked.
:return: true if all... | 0.006633 |
def get_param(self, param):
""" .. todo:: docstring for get_param
"""
# Imports
import os
from ..const import EnumAnharmRepoParam
from ..error import RepoError as RErr
# Must be a valid parameter name
if not param in EnumAnharmRepoParam:
rais... | 0.008711 |
def generate_certificates(base_dir: str, remove_certificates: bool=False):
''' Generate client and server CURVE certificate files'''
public_keys_dir = os.path.join(base_dir, 'public_keys')
secret_keys_dir = os.path.join(base_dir, 'private_keys')
# Make the public and private key directories
for pat... | 0.002392 |
def install_genome(name, provider, version=None, genome_dir=None, localname=None, mask="soft", regex=None, invert_match=False, annotation=False):
"""
Install a genome.
Parameters
----------
name : str
Genome name
provider : str
Provider name
version : str
Version (... | 0.006857 |
def erase_hardware_breakpoint(self, dwThreadId, address):
"""
Erases the hardware breakpoint at the given address.
@see:
L{define_hardware_breakpoint},
L{has_hardware_breakpoint},
L{get_hardware_breakpoint},
L{enable_hardware_breakpoint},
... | 0.002275 |
def register_request(self, valid_responses):
"""Register a RPC request.
:param list valid_responses: List of possible Responses that
we should be waiting for.
:return:
"""
uuid = str(uuid4())
self._response[uuid] = []
for acti... | 0.004963 |
def pruned_c2cifft(invec, outvec, indices, pretransposed=False):
"""
Perform a pruned iFFT, only valid for power of 2 iffts as the
decomposition is easier to choose. This is not a strict requirement of the
functions, but it is unlikely to the optimal to use anything but power
of 2. (Alex to provide ... | 0.00083 |
def get_assets_by_genus_type(self, asset_genus_type=None):
"""Gets an ``AssetList`` corresponding to the given asset genus ``Type`` which does not
include assets of types derived from the specified ``Type``.
In plenary mode, the returned list contains all known assets or
an error result... | 0.002437 |
def set_hit_fields(self, hit_fields):
''' Tell the clusterizer the meaning of the field names.
The hit_fields parameter is a dict, e.g., {"new field name": "standard field name"}.
If None default mapping is set.
Example:
--------
Internally, the clusterizer uses the hi... | 0.004055 |
def p_formula_atom(self, p):
"""formula : ATOM
| TRUE
| FALSE"""
if p[1]==Symbols.TRUE.value:
p[0] = PLTrue()
elif p[1]==Symbols.FALSE.value:
p[0] = PLFalse()
else:
p[0] = PLAtomic(Symbol(p[1])) | 0.013333 |
def get_private_key(key_path, password_path=None):
"""Open a JSON-encoded private key and return it
If a password file is provided, uses it to decrypt the key. If not, the
password is asked interactively. Raw hex-encoded private keys are supported,
but deprecated."""
assert key_path, key_path
... | 0.004035 |
def list_catalogs(results=30, start=0):
"""
Returns list of all catalogs created on this API key
Args:
Kwargs:
results (int): An integer number of results to return
start (int): An integer starting value for the result set
Returns:
A list of catalog objects
Example:
... | 0.003995 |
def template(self, lambda_arn, role_arn, output=None, json=False):
"""
Only build the template file.
"""
if not lambda_arn:
raise ClickException("Lambda ARN is required to template.")
if not role_arn:
raise ClickException("Role ARN is required to templat... | 0.005698 |
def stop_request(self, stop_now=False):
"""Send a stop request to the daemon
:param stop_now: stop now or go to stop wait mode
:type stop_now: bool
:return: the daemon response (True)
"""
logger.debug("Sending stop request to %s, stop now: %s", self.name, stop_now)
... | 0.009592 |
def save(self, exclude_scopes: tuple = ('Optimizer',)) -> None:
"""Save model parameters to self.save_path"""
if not hasattr(self, 'sess'):
raise RuntimeError('Your TensorFlow model {} must'
' have sess attribute!'.format(self.__class__.__name__))
path ... | 0.005495 |
def temperature(self, temperature):
""" Set the temperature.
:param temperature: Value to set (0.0-1.0).
"""
try:
cmd = self.command_set.temperature(temperature)
self.send(cmd)
self._temperature = temperature
except AttributeError:
... | 0.00431 |
def _parse_gene_anatomy(self, fh, limit):
"""
Process anat_entity files with columns:
Ensembl gene ID,gene name, anatomical entity ID,
anatomical entity name, rank score, XRefs to BTO
:param fh: filehandle
:param limit: int, limit per group
:return: None
... | 0.002555 |
def from_uint8(arr_uint8, shape, min_value=0.0, max_value=1.0):
"""
Create a heatmaps object from an heatmap array containing values ranging from 0 to 255.
Parameters
----------
arr_uint8 : (H,W) ndarray or (H,W,C) ndarray
Heatmap(s) array, where ``H`` is height, ``W... | 0.007199 |
def extract_true_string(string_content):
"""
remove extra characters before the actual string we are
looking for. The Jenkins console output is encoded using utf-8. However, the stupid
redirect function can only encode using ASCII. I have googled for half a day with no
results to how to resolve t... | 0.008197 |
def execute_operation(self, method="GET", ops_path="", payload=""):
"""
Executes a Kubernetes operation using the specified method against a path.
This is part of the low-level API.
:Parameters:
- `method`: The HTTP method to use, defaults to `GET`
- `ops_path`: Th... | 0.008081 |
async def unban(self, user, *, reason=None):
"""|coro|
Unbans a user from the guild.
The user must meet the :class:`abc.Snowflake` abc.
You must have the :attr:`~Permissions.ban_members` permission to
do this.
Parameters
-----------
user: :class:`abc.S... | 0.002789 |
def as_singular(result_key):
"""
Given a result key, return in the singular form
"""
if result_key.endswith('ies'):
return re.sub('ies$', 'y', result_key)
elif result_key.endswith('uses'):
return re.sub("uses$", "us", result_key)
elif result_key.endswith('addresses'): # Special ... | 0.00211 |
def url(self, url_to_test=None, last_url=None):
"""
Manage the case that we want to test only a given url.
:param url_to_test: The url to test.
:type url_to_test: str
:param last_url:
The last url of the file we are testing
(if exist)
:type last_... | 0.001172 |
def merge(self):
"""Perform merge of head and update starting from root."""
if isinstance(self.head, dict) and isinstance(self.update, dict):
if not isinstance(self.root, dict):
self.root = {}
self._merge_dicts()
else:
self._merge_base_values()... | 0.004796 |
def _dispatch_cmd(self, handler, argv):
"""Introspect sub-command handler signature to determine how to
dispatch the command. The raw handler provided by the base
'RawCmdln' class is still supported:
def do_foo(self, argv):
# 'argv' is the vector of command line args... | 0.001626 |
def _finalize_chunk(self, dd, offsets):
# type: (Downloader, blobxfer.models.download.Descriptor,
# blobxfer.models.download.Offsets) -> None
"""Finalize written chunk
:param Downloader self: this
:param blobxfer.models.download.Descriptor dd: download descriptor
:... | 0.004115 |
def find_path(start, goal, neighbors_fnct, reversePath=False, heuristic_cost_estimate_fnct=lambda a, b: Infinite, distance_between_fnct=lambda a, b: 1.0, is_goal_reached_fnct=lambda a, b: a == b):
"""A non-class version of the path finding algorithm"""
class FindPath(AStar):
def heuristic_cost_estimate... | 0.002721 |
def xAxisIsMajor(self):
'''
Returns True if the major axis is parallel to the X axis, boolean.
'''
return max(self.radius.x, self.radius.y) == self.radius.x | 0.010638 |
def has_permission(self, perm):
"""
Checks if current user (or role) has the given permission.
Args:
perm: Permmission code or object.
Depends on the :attr:`~zengine.auth.auth_backend.AuthBackend` implementation.
Returns:
Boolean.
"""
... | 0.007853 |
def _deserialize(self, data):
"""
Deserialise from JSON response data.
String items named ``*_at`` are turned into dates.
Filters out:
* attribute names in ``Meta.deserialize_skip``
:param data dict: JSON-style object with instance data.
:return: this instance
... | 0.002541 |
def get_backup_file_time_tag(file_name, custom_prefix="backup"):
""" Returns a datetime object computed from a file name string, with
formatting based on DATETIME_FORMAT."""
name_string = file_name[len(custom_prefix):]
time_tag = name_string.split(".", 1)[0]
return datetime.strptime(time_ta... | 0.00295 |
def community_posts_search(self, query=None, topic=None, updated_after=None, updated_before=None, **kwargs):
"https://developer.zendesk.com/rest_api/docs/help_center/search#filtering-by-date"
api_path = "/api/v2/community/posts/search.json"
api_query = {}
if "query" in kwargs.keys():
... | 0.004489 |
def run(self, num_of_processes=multiprocessing.cpu_count()):
"""
Applies the wordification methodology on the target table
:param num_of_processes: number of processes
"""
# class + wordification on every example of the main table
p = multiprocessing.Pool(num_of_pr... | 0.006593 |
def put(self, requirement, handle):
"""
Store a distribution archive in all of the available caches.
:param requirement: A :class:`.Requirement` object.
:param handle: A file-like object that provides access to the
distribution archive.
"""
filenam... | 0.004711 |
async def get_endpoint_for_did(wallet_handle: int,
pool_handle: int,
did: str) -> (str, Optional[str]):
"""
Returns endpoint information for the given DID.
:param wallet_handle: Wallet handle (created by open_wallet).
:param pool_handle: Poo... | 0.001958 |
def check_concurrency(self) -> bool:
"""Checks the concurrency of the operation run.
Checks the concurrency of the operation run
to validate if we can start a new operation run.
Returns:
boolean: Whether to start a new operation run or not.
"""
if not self.o... | 0.003578 |
def subjectAreas(self):
"""List of subject areas of article.
Note: Requires the FULL view of the article.
"""
subjectAreas = self.xml.find('subject-areas', ns)
try:
return [a.text for a in subjectAreas]
except:
return None | 0.010204 |
def _build_connections(self, process_list, ignore_dependencies,
auto_dependency):
"""Parses the process connections dictionaries into a process list
This method is called upon instantiation of the NextflowGenerator
class. Essentially, it sets the main input/output cha... | 0.000597 |
def clear_text(self):
"""stub"""
if (self.get_text_metadata().is_read_only() or
self.get_text_metadata().is_required()):
raise NoAccess()
self.my_osid_object_form._my_map['text'] = \
dict(self.get_text_metadata().get_default_string_values()[0]) | 0.006494 |
def _next_lowest_integer(group_keys):
"""
returns the lowest available integer in a set of dict keys
"""
try: #TODO Replace with max default value when dropping compatibility with Python < 3.4
largest_int= max([ int(val) for val in group_keys if _is_int(val)])
except:
largest_int= 0
... | 0.023121 |
def delete(self):
"""Mark the community for deletion.
:param delete_time: DateTime after which to delete the community.
:type delete_time: datetime.datetime
:raises: CommunitiesError
"""
if self.deleted_at is not None:
raise CommunitiesError(community=self)
... | 0.005263 |
def get_token(self, lineno, col_offset):
"""
Returns the token containing the given (lineno, col_offset) position, or the preceeding token
if the position is between tokens.
"""
# TODO: add test for multibyte unicode. We need to translate offsets from ast module (which
# are in utf8) to offsets ... | 0.009881 |
def _zom_arg(lexer):
"""Return zero or more arguments."""
tok = next(lexer)
# ',' EXPR ZOM_X
if isinstance(tok, COMMA):
return (_expr(lexer), ) + _zom_arg(lexer)
# null
else:
lexer.unpop_token(tok)
return tuple() | 0.003846 |
def joinArgs(args):
""" Returns a query string (uses for HTTP URLs) where only the value is URL encoded.
Example return value: '?genre=action&type=1337'.
Parameters:
args (dict): Arguments to include in query string.
"""
if not args:
return ''
arglist = []
for ke... | 0.004 |
def _read_items(self):
self._items = []
self._items = glob.glob(path.join(self._config_path, '*.csv'))
if len(self._items) == 0:
return 0, -1
else:
self._items.sort()
for i, an_item in enumerate(self._items):
self._items[i] = an_item.replace(se... | 0.005326 |
def can_publish(self):
"""
Return True if there is a draft version of the document that's ready to
be published.
"""
with self.published_context():
published = self.one(
Q._uid == self._uid,
projection={'revision': True}
... | 0.005535 |
def filter_instance(inst, plist):
"""Remove properties from an instance that aren't in the PropertyList
inst -- The CIMInstance
plist -- The property List, or None. The list items must be all
lowercase.
"""
if plist is not None:
for pname in inst.properties.keys():
if... | 0.002558 |
def to_dict(self):
'''Save this execution context into a dictionary.'''
d = {'id': self.id,
'kind': self.kind}
if self.rate != 0.0:
d['rate'] = self.rate
participants = []
for p in self.participants:
participants.append(p.to_dict())
... | 0.004412 |
def construct_scratch_path(self, dirname, basename):
"""Construct and return a path in the scratch area.
This will be <self.scratchdir>/<dirname>/<basename>
"""
return os.path.join(self.scratchdir, dirname, basename) | 0.008 |
def as_frame(self):
""" :return: Multi-Index DataFrame """
data = {sid: pd.Series(data) for sid, data in self.response_map.iteritems()}
return pd.DataFrame.from_dict(data, orient='index') | 0.014218 |
def setup_manage_parser(self, parser):
"""Setup the given parser for manage command
:param parser: the argument parser to setup
:type parser: :class:`argparse.ArgumentParser`
:returns: None
:rtype: None
:raises: None
"""
parser.set_defaults(func=self.mana... | 0.004376 |
def human_size(size, a_kilobyte_is_1024_bytes=False, precision=1, target=None):
'''Convert a file size to human-readable form.
Keyword arguments:
size -- file size in bytes
a_kilobyte_is_1024_bytes -- if True (default), use multiples of 1024
if False, use multiples of 10... | 0.000959 |
def get_notification_commands(self, notifways, n_type, command_name=False):
"""Get notification commands for object type
:param notifways: list of alignak.objects.NotificationWay objects
:type notifways: NotificationWays
:param n_type: object type (host or service)
:type n_type:... | 0.004529 |
def send_file(self, fp, headers=None, cb=None, num_cb=10,
query_args=None, chunked_transfer=False, callback=None):
"""
Upload a file to a key into a bucket on S3.
:type fp: file
:param fp: The file pointer to upload
:type headers: dict
:param headers: ... | 0.002014 |
def plotGrid(self, numLines=(5,5), lineWidth=1, colour="#777777"):
"""Plot NUMLINES[0] vertical gridlines and NUMLINES[1] horizontal gridlines,
while keeping the initial axes bounds that were present upon its calling.
Will not work for certain cases.
"""
x1, x2, y1, y2 = mp.axis(... | 0.01615 |
async def googlecast(dev: Device, target, value):
"""Return Googlecast settings."""
if target and value:
click.echo("Setting %s = %s" % (target, value))
await dev.set_googlecast_settings(target, value)
print_settings(await dev.get_googlecast_settings()) | 0.003559 |
def to_df(self, method: str = 'MEMORY', **kwargs) -> 'pd.DataFrame':
"""
Export this SAS Data Set to a Pandas Data Frame
:param method: defaults to MEMORY; the original method. CSV is the other choice which uses an intermediary csv file; faster for large data
:param kwargs:
:ret... | 0.007042 |
def copy_move_single(self, dest_path, is_move):
"""See DAVResource.copy_move_single() """
if self.provider.readonly:
raise DAVError(HTTP_FORBIDDEN)
fpDest = self.provider._loc_to_file_path(dest_path, self.environ)
assert not util.is_equal_or_child_uri(self.path, dest_path)
... | 0.001918 |
def _print_stream_parameters(self, values):
"""Print a coloured help for a given tuple of stream parameters."""
cprint("{0}".format(*values), "magenta", attrs=["bold"])
print("{4}".format(*values))
cprint(" available formats: {1}".format(*values), "blue")
cprint(" mandatory s... | 0.004505 |
def get_properties(self):
"""
Get a mapping of all properties and their values.
Returns a dictionary of property_name -> value.
"""
return {prop.get_name(): prop.get_value()
for prop in self.properties.values()} | 0.007463 |
def as_leaf_class(self):
"""
Returns the leaf class no matter where the calling instance is in the inheritance hierarchy.
Inspired by http://www.djangosnippets.org/snippets/1031/
"""
try:
return self.__getattribute__(self.class_name.lower())
except AttributeEr... | 0.005671 |
def is_right_model(instance, attribute, value):
"""Must include at least the ``source`` and ``license`` keys, but
not a ``rightsOf`` key (``source`` indicates that the Right is
derived from and allowed by a source Right; it cannot contain the
full rights to a Creation).
"""
for key in ['source'... | 0.001106 |
def find_expectations(self,
expectation_type=None,
column=None,
expectation_kwargs=None,
discard_result_format_kwargs=True,
discard_include_configs_kwargs=True,
dis... | 0.00908 |
def dispatch(self, request, *args, **kwargs):
""" Construct IDP server with config from settings dict
"""
conf = IdPConfig()
try:
conf.load(copy.deepcopy(settings.SAML_IDP_CONFIG))
self.IDP = Server(config=conf)
except Exception as e:
return se... | 0.006818 |
def callback(self, *incoming):
"""
Gets called by the CallbackManager if a new message was received
"""
message = incoming[0]
if message:
address, command = message[0], message[2]
profile = self.get_profile(address)
if profile is not None:
... | 0.006494 |
def _proxy(self):
"""
Generate an instance context for the instance, the context is capable of
performing various actions. All instance actions are proxied to the context
:returns: RatePlanContext for this RatePlanInstance
:rtype: twilio.rest.preview.wireless.rate_plan.RatePlan... | 0.010204 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.