body_hash
stringlengths
64
64
body
stringlengths
23
109k
docstring
stringlengths
1
57k
path
stringlengths
4
198
name
stringlengths
1
115
repository_name
stringlengths
7
111
repository_stars
float64
0
191k
lang
stringclasses
1 value
body_without_docstring
stringlengths
14
108k
unified
stringlengths
45
133k
c51bf5caf154655e69fbb8b830c3e6f3517a9565ab315e7e2bf1a94388bf4dca
def alignment_error_rate(self, reference, possible=None): '\n Return the Alignment Error Rate (AER) of an aligned sentence\n with respect to a "gold standard" reference ``AlignedSent``.\n\n Return an error rate between 0.0 (perfect alignment) and 1.0 (no\n alignment).\n\n >>> ...
Return the Alignment Error Rate (AER) of an aligned sentence with respect to a "gold standard" reference ``AlignedSent``. Return an error rate between 0.0 (perfect alignment) and 1.0 (no alignment). >>> from nltk.align import AlignedSent >>> s = AlignedSent(["the", "cat"], ["le", "chat"], [(0, 0), (1, 1)]) ...
venv/lib/python2.7/site-packages/nltk/align/api.py
alignment_error_rate
sravani-m/Web-Application-Security-Framework
3
python
def alignment_error_rate(self, reference, possible=None): '\n Return the Alignment Error Rate (AER) of an aligned sentence\n with respect to a "gold standard" reference ``AlignedSent``.\n\n Return an error rate between 0.0 (perfect alignment) and 1.0 (no\n alignment).\n\n >>> ...
def alignment_error_rate(self, reference, possible=None): '\n Return the Alignment Error Rate (AER) of an aligned sentence\n with respect to a "gold standard" reference ``AlignedSent``.\n\n Return an error rate between 0.0 (perfect alignment) and 1.0 (no\n alignment).\n\n >>> ...
8b5f8336f82d07453244133a22c7ba33da54eb56d9dfe5326c8fc7d8cbbe192d
def __getitem__(self, key): '\n Look up the alignments that map from a given index or slice.\n ' if (not self._index): self._build_index() return self._index.__getitem__(key)
Look up the alignments that map from a given index or slice.
venv/lib/python2.7/site-packages/nltk/align/api.py
__getitem__
sravani-m/Web-Application-Security-Framework
3
python
def __getitem__(self, key): '\n \n ' if (not self._index): self._build_index() return self._index.__getitem__(key)
def __getitem__(self, key): '\n \n ' if (not self._index): self._build_index() return self._index.__getitem__(key)<|docstring|>Look up the alignments that map from a given index or slice.<|endoftext|>
f67a0c6af96f10b58d8100316589b74c5cb49e23d2bce8c58cb96618d1b325d8
def invert(self): '\n Return an Alignment object, being the inverted mapping.\n ' return Alignment((((p[1], p[0]) + p[2:]) for p in self))
Return an Alignment object, being the inverted mapping.
venv/lib/python2.7/site-packages/nltk/align/api.py
invert
sravani-m/Web-Application-Security-Framework
3
python
def invert(self): '\n \n ' return Alignment((((p[1], p[0]) + p[2:]) for p in self))
def invert(self): '\n \n ' return Alignment((((p[1], p[0]) + p[2:]) for p in self))<|docstring|>Return an Alignment object, being the inverted mapping.<|endoftext|>
93eb14df25bd851b52321d138998768bf6b5be375027687fdeb425de2ff744bc
def range(self, positions=None): '\n Work out the range of the mapping from the given positions.\n If no positions are specified, compute the range of the entire mapping.\n ' image = set() if (not self._index): self._build_index() if (not positions): positions = list...
Work out the range of the mapping from the given positions. If no positions are specified, compute the range of the entire mapping.
venv/lib/python2.7/site-packages/nltk/align/api.py
range
sravani-m/Web-Application-Security-Framework
3
python
def range(self, positions=None): '\n Work out the range of the mapping from the given positions.\n If no positions are specified, compute the range of the entire mapping.\n ' image = set() if (not self._index): self._build_index() if (not positions): positions = list...
def range(self, positions=None): '\n Work out the range of the mapping from the given positions.\n If no positions are specified, compute the range of the entire mapping.\n ' image = set() if (not self._index): self._build_index() if (not positions): positions = list...
a834a62a6b7e2fb2a50d659c8a4c172f9aea9b6894ab93ac8f38a415e84be66e
def __repr__(self): '\n Produce a Giza-formatted string representing the alignment.\n ' return ('Alignment(%r)' % sorted(self))
Produce a Giza-formatted string representing the alignment.
venv/lib/python2.7/site-packages/nltk/align/api.py
__repr__
sravani-m/Web-Application-Security-Framework
3
python
def __repr__(self): '\n \n ' return ('Alignment(%r)' % sorted(self))
def __repr__(self): '\n \n ' return ('Alignment(%r)' % sorted(self))<|docstring|>Produce a Giza-formatted string representing the alignment.<|endoftext|>
ff2f5fd9d602325dd81e5592657a9d0d0954de2987a24d38ff1ab5d0d9588cb9
def __str__(self): '\n Produce a Giza-formatted string representing the alignment.\n ' return ' '.join((('%d-%d' % p[:2]) for p in sorted(self)))
Produce a Giza-formatted string representing the alignment.
venv/lib/python2.7/site-packages/nltk/align/api.py
__str__
sravani-m/Web-Application-Security-Framework
3
python
def __str__(self): '\n \n ' return ' '.join((('%d-%d' % p[:2]) for p in sorted(self)))
def __str__(self): '\n \n ' return ' '.join((('%d-%d' % p[:2]) for p in sorted(self)))<|docstring|>Produce a Giza-formatted string representing the alignment.<|endoftext|>
487eeb5a9ad8701976ebe2bc1b1f48920e666d7a446ce50cd1a656797252b7d0
def _build_index(self): '\n Build a list self._index such that self._index[i] is a list\n of the alignments originating from word i.\n ' self._index = [[] for _ in range((self._len + 1))] for p in self: self._index[p[0]].append(p)
Build a list self._index such that self._index[i] is a list of the alignments originating from word i.
venv/lib/python2.7/site-packages/nltk/align/api.py
_build_index
sravani-m/Web-Application-Security-Framework
3
python
def _build_index(self): '\n Build a list self._index such that self._index[i] is a list\n of the alignments originating from word i.\n ' self._index = [[] for _ in range((self._len + 1))] for p in self: self._index[p[0]].append(p)
def _build_index(self): '\n Build a list self._index such that self._index[i] is a list\n of the alignments originating from word i.\n ' self._index = [[] for _ in range((self._len + 1))] for p in self: self._index[p[0]].append(p)<|docstring|>Build a list self._index such that s...
c9777462c471a1c3ce3b7a8cfc324d091295959991be654a17569ceb285215a0
def _backup_and_load_cache(self): 'Useful for performing evaluation on the slow weights (which typically generalize better)\n ' for group in self.optimizer.param_groups: for p in group['params']: param_state = self.state[p] param_state['backup_params'] = torch.zeros_like(p...
Useful for performing evaluation on the slow weights (which typically generalize better)
pytorch_lightning_spells/optimizers.py
_backup_and_load_cache
veritable-tech/pytorch-lightning-spells
5
python
def _backup_and_load_cache(self): '\n ' for group in self.optimizer.param_groups: for p in group['params']: param_state = self.state[p] param_state['backup_params'] = torch.zeros_like(p.data) param_state['backup_params'].copy_(p.data) p.data.copy_(p...
def _backup_and_load_cache(self): '\n ' for group in self.optimizer.param_groups: for p in group['params']: param_state = self.state[p] param_state['backup_params'] = torch.zeros_like(p.data) param_state['backup_params'].copy_(p.data) p.data.copy_(p...
939264af49ef2ebd0a8e0148387e74686cfb21787ea33c150a74bc2356dcb449
def step(self, closure=None): 'Performs a single Lookahead optimization step.\n ' loss = self.optimizer.step(closure) self.step_counter += 1 if (self.step_counter >= self.k): self.step_counter = 0 for group in self.optimizer.param_groups: for p in group['params']: ...
Performs a single Lookahead optimization step.
pytorch_lightning_spells/optimizers.py
step
veritable-tech/pytorch-lightning-spells
5
python
def step(self, closure=None): '\n ' loss = self.optimizer.step(closure) self.step_counter += 1 if (self.step_counter >= self.k): self.step_counter = 0 for group in self.optimizer.param_groups: for p in group['params']: param_state = self.state[p] ...
def step(self, closure=None): '\n ' loss = self.optimizer.step(closure) self.step_counter += 1 if (self.step_counter >= self.k): self.step_counter = 0 for group in self.optimizer.param_groups: for p in group['params']: param_state = self.state[p] ...
eb8e19c310324fa3a5ab0c5086312b4981131391e769fd56b3aca810ec9cf9d1
@click.command() def start(): '\n Add filtered datasets.\n ' create_client().consume(callback, consume_routing_key)
Add filtered datasets.
workers/extract/dataset_filter.py
start
open-contracting/pelican-backend
1
python
@click.command() def start(): '\n \n ' create_client().consume(callback, consume_routing_key)
@click.command() def start(): '\n \n ' create_client().consume(callback, consume_routing_key)<|docstring|>Add filtered datasets.<|endoftext|>
784e697af8eba437fabd2b81e4707a845a6d0e95c4b284937744ea4b9c413906
def custom_simclr_contrastive_loss(proj_feat1, proj_feat2, temperature=0.5, seed=SEED): '\n custom_simclr_contrastive_loss(proj_feat1, proj_feat2)\n Returns contrastive loss, given sets of projected features, with positive\n pairs matched along the batch dimension.\n Required args:\n - proj_feat1 (2D torch Ten...
custom_simclr_contrastive_loss(proj_feat1, proj_feat2) Returns contrastive loss, given sets of projected features, with positive pairs matched along the batch dimension. Required args: - proj_feat1 (2D torch Tensor): first set of projected features (batch_size x feat_size) - proj_feat2 (2D torch Tensor): second set...
tutorials/W3D1_UnsupervisedAndSelfSupervisedLearning/solutions/W3D1_Tutorial1_Solution_8dde8bad.py
custom_simclr_contrastive_loss
haltakov/course-content-dl
1
python
def custom_simclr_contrastive_loss(proj_feat1, proj_feat2, temperature=0.5, seed=SEED): '\n custom_simclr_contrastive_loss(proj_feat1, proj_feat2)\n Returns contrastive loss, given sets of projected features, with positive\n pairs matched along the batch dimension.\n Required args:\n - proj_feat1 (2D torch Ten...
def custom_simclr_contrastive_loss(proj_feat1, proj_feat2, temperature=0.5, seed=SEED): '\n custom_simclr_contrastive_loss(proj_feat1, proj_feat2)\n Returns contrastive loss, given sets of projected features, with positive\n pairs matched along the batch dimension.\n Required args:\n - proj_feat1 (2D torch Ten...
39d7bbf4be3e3e81c145c033c47dfbf71c48a7a5085fcbec40da38240bc4c024
@classmethod def _validate_sent_datetime(cls, item): 'Validate that sent_datetime of model is less than current time.\n\n Args:\n item: datastore_services.Model. SentEmailModel to validate.\n ' current_datetime = datetime.datetime.utcnow() if (item.sent_datetime > current_datetime):...
Validate that sent_datetime of model is less than current time. Args: item: datastore_services.Model. SentEmailModel to validate.
core/domain/email_validators.py
_validate_sent_datetime
OBITORASU/oppia
2
python
@classmethod def _validate_sent_datetime(cls, item): 'Validate that sent_datetime of model is less than current time.\n\n Args:\n item: datastore_services.Model. SentEmailModel to validate.\n ' current_datetime = datetime.datetime.utcnow() if (item.sent_datetime > current_datetime):...
@classmethod def _validate_sent_datetime(cls, item): 'Validate that sent_datetime of model is less than current time.\n\n Args:\n item: datastore_services.Model. SentEmailModel to validate.\n ' current_datetime = datetime.datetime.utcnow() if (item.sent_datetime > current_datetime):...
d4a7a605d37058766c8e23204b8bd479409ff099525729d1951ba728574c258c
@classmethod def _validate_recipient_email(cls, item, field_name_to_external_model_references): "Validate that recipient email corresponds to email of user obtained\n by using the recipient_id.\n\n Args:\n item: datastore_services.Model. SentEmailModel to validate.\n field_name_t...
Validate that recipient email corresponds to email of user obtained by using the recipient_id. Args: item: datastore_services.Model. SentEmailModel to validate. field_name_to_external_model_references: dict(str, (list(base_model_validators.ExternalModelReference))). A dict keyed by field name. ...
core/domain/email_validators.py
_validate_recipient_email
OBITORASU/oppia
2
python
@classmethod def _validate_recipient_email(cls, item, field_name_to_external_model_references): "Validate that recipient email corresponds to email of user obtained\n by using the recipient_id.\n\n Args:\n item: datastore_services.Model. SentEmailModel to validate.\n field_name_t...
@classmethod def _validate_recipient_email(cls, item, field_name_to_external_model_references): "Validate that recipient email corresponds to email of user obtained\n by using the recipient_id.\n\n Args:\n item: datastore_services.Model. SentEmailModel to validate.\n field_name_t...
819c3abcf86ba213eccc5dc9b79c43c3ae5f2ab30468a704dd2d662a7e72faca
@classmethod def _validate_sent_datetime(cls, item): 'Validate that sent_datetime of model is less than current time.\n\n Args:\n item: datastore_services.Model. BulkEmailModel to validate.\n ' current_datetime = datetime.datetime.utcnow() if (item.sent_datetime > current_datetime):...
Validate that sent_datetime of model is less than current time. Args: item: datastore_services.Model. BulkEmailModel to validate.
core/domain/email_validators.py
_validate_sent_datetime
OBITORASU/oppia
2
python
@classmethod def _validate_sent_datetime(cls, item): 'Validate that sent_datetime of model is less than current time.\n\n Args:\n item: datastore_services.Model. BulkEmailModel to validate.\n ' current_datetime = datetime.datetime.utcnow() if (item.sent_datetime > current_datetime):...
@classmethod def _validate_sent_datetime(cls, item): 'Validate that sent_datetime of model is less than current time.\n\n Args:\n item: datastore_services.Model. BulkEmailModel to validate.\n ' current_datetime = datetime.datetime.utcnow() if (item.sent_datetime > current_datetime):...
92880c7feb47f97d25fab83e99c4cd562fe67d5c3dc239773c94be545b1912c0
@classmethod def _validate_sender_email(cls, item, field_name_to_external_model_references): "Validate that sender email corresponds to email of user obtained\n by using the sender_id.\n\n Args:\n item: datastore_services.Model. BulkEmailModel to validate.\n field_name_to_externa...
Validate that sender email corresponds to email of user obtained by using the sender_id. Args: item: datastore_services.Model. BulkEmailModel to validate. field_name_to_external_model_references: dict(str, (list(base_model_validators.ExternalModelReference))). A dict keyed by field name. The fi...
core/domain/email_validators.py
_validate_sender_email
OBITORASU/oppia
2
python
@classmethod def _validate_sender_email(cls, item, field_name_to_external_model_references): "Validate that sender email corresponds to email of user obtained\n by using the sender_id.\n\n Args:\n item: datastore_services.Model. BulkEmailModel to validate.\n field_name_to_externa...
@classmethod def _validate_sender_email(cls, item, field_name_to_external_model_references): "Validate that sender email corresponds to email of user obtained\n by using the sender_id.\n\n Args:\n item: datastore_services.Model. BulkEmailModel to validate.\n field_name_to_externa...
f6776da2a019e7491fd0341192fb89fffce0173c0b4c73f5fd3d0782f3c1ab60
@classmethod def _validate_reply_to_id_length(cls, item): 'Validate that reply_to_id length is less than or equal to\n REPLY_TO_ID_LENGTH.\n\n Args:\n item: datastore_services.Model. GeneralFeedbackEmailReplyToIdModel\n to validate.\n ' if (len(item.reply_to_id) > ...
Validate that reply_to_id length is less than or equal to REPLY_TO_ID_LENGTH. Args: item: datastore_services.Model. GeneralFeedbackEmailReplyToIdModel to validate.
core/domain/email_validators.py
_validate_reply_to_id_length
OBITORASU/oppia
2
python
@classmethod def _validate_reply_to_id_length(cls, item): 'Validate that reply_to_id length is less than or equal to\n REPLY_TO_ID_LENGTH.\n\n Args:\n item: datastore_services.Model. GeneralFeedbackEmailReplyToIdModel\n to validate.\n ' if (len(item.reply_to_id) > ...
@classmethod def _validate_reply_to_id_length(cls, item): 'Validate that reply_to_id length is less than or equal to\n REPLY_TO_ID_LENGTH.\n\n Args:\n item: datastore_services.Model. GeneralFeedbackEmailReplyToIdModel\n to validate.\n ' if (len(item.reply_to_id) > ...
053db00e697f92b2c69ab86dd4994446ba7d5ff78702fe1859ff28c551c81d51
def __init__(self, params: List[Tensor], max_trust_radius: float=1000, initial_trust_radius: float=0.05, eta: float=0.15, gtol: float=1e-05, **kwargs) -> None: ' Trust Region Newton Conjugate Gradient\n\n Uses the Conjugate Gradient Algorithm to find the solution of the\n trust region sub-prob...
Trust Region Newton Conjugate Gradient Uses the Conjugate Gradient Algorithm to find the solution of the trust region sub-problem For more details see chapter 7.2 of "Numerical Optimization, Nocedal and Wright" Arguments: params (iterable): A list or iterable of tensors that will be optimized max_tru...
torchtrustncg/trust_region_newton_cg.py
__init__
vchoutas/torch-trust-ncg
14
python
def __init__(self, params: List[Tensor], max_trust_radius: float=1000, initial_trust_radius: float=0.05, eta: float=0.15, gtol: float=1e-05, **kwargs) -> None: ' Trust Region Newton Conjugate Gradient\n\n Uses the Conjugate Gradient Algorithm to find the solution of the\n trust region sub-prob...
def __init__(self, params: List[Tensor], max_trust_radius: float=1000, initial_trust_radius: float=0.05, eta: float=0.15, gtol: float=1e-05, **kwargs) -> None: ' Trust Region Newton Conjugate Gradient\n\n Uses the Conjugate Gradient Algorithm to find the solution of the\n trust region sub-prob...
e63a400e6a84a3d92af43a9cf9ac7ed8c5292154ac87152900ccd8d7933fed08
def _gather_flat_grad(self) -> Tensor: ' Concatenates all gradients into a single gradient vector\n ' views = [] for p in self._params: if (p.grad is None): view = p.data.new(p.data.numel()).zero_() elif p.grad.data.is_sparse: view = p.grad.to_dense().view((- 1...
Concatenates all gradients into a single gradient vector
torchtrustncg/trust_region_newton_cg.py
_gather_flat_grad
vchoutas/torch-trust-ncg
14
python
def _gather_flat_grad(self) -> Tensor: ' \n ' views = [] for p in self._params: if (p.grad is None): view = p.data.new(p.data.numel()).zero_() elif p.grad.data.is_sparse: view = p.grad.to_dense().view((- 1)) else: view = p.grad.view((- 1)) ...
def _gather_flat_grad(self) -> Tensor: ' \n ' views = [] for p in self._params: if (p.grad is None): view = p.data.new(p.data.numel()).zero_() elif p.grad.data.is_sparse: view = p.grad.to_dense().view((- 1)) else: view = p.grad.view((- 1)) ...
6c5dd050e60598777b1053a2f93107dfa2086d537bb18f5c42488a0532ab4580
@torch.no_grad() def _improvement_ratio(self, p, start_loss, gradient, closure): ' Calculates the ratio of the actual to the expected improvement\n\n Arguments:\n p (torch.tensor): The update vector for the parameters\n start_loss (torch.tensor): The value of the loss functi...
Calculates the ratio of the actual to the expected improvement Arguments: p (torch.tensor): The update vector for the parameters start_loss (torch.tensor): The value of the loss function before applying the optimization step gradient (torch.tensor): The flattened gradient vector of the para...
torchtrustncg/trust_region_newton_cg.py
_improvement_ratio
vchoutas/torch-trust-ncg
14
python
@torch.no_grad() def _improvement_ratio(self, p, start_loss, gradient, closure): ' Calculates the ratio of the actual to the expected improvement\n\n Arguments:\n p (torch.tensor): The update vector for the parameters\n start_loss (torch.tensor): The value of the loss functi...
@torch.no_grad() def _improvement_ratio(self, p, start_loss, gradient, closure): ' Calculates the ratio of the actual to the expected improvement\n\n Arguments:\n p (torch.tensor): The update vector for the parameters\n start_loss (torch.tensor): The value of the loss functi...
1bfb82b9598199891f9399a1d6dbd55f7d00cf0ac735ed1d61d2b3ca9797cffb
@torch.no_grad() def _quad_model(self, p: Tensor, loss: float, gradient: Tensor, hess_vp: Tensor) -> float: ' Returns the value of the local quadratic approximation\n ' return ((loss + torch.flatten((gradient * p)).sum(dim=(- 1))) + (0.5 * torch.flatten((hess_vp * p)).sum(dim=(- 1))))
Returns the value of the local quadratic approximation
torchtrustncg/trust_region_newton_cg.py
_quad_model
vchoutas/torch-trust-ncg
14
python
@torch.no_grad() def _quad_model(self, p: Tensor, loss: float, gradient: Tensor, hess_vp: Tensor) -> float: ' \n ' return ((loss + torch.flatten((gradient * p)).sum(dim=(- 1))) + (0.5 * torch.flatten((hess_vp * p)).sum(dim=(- 1))))
@torch.no_grad() def _quad_model(self, p: Tensor, loss: float, gradient: Tensor, hess_vp: Tensor) -> float: ' \n ' return ((loss + torch.flatten((gradient * p)).sum(dim=(- 1))) + (0.5 * torch.flatten((hess_vp * p)).sum(dim=(- 1))))<|docstring|>Returns the value of the local quadratic approximation<|endof...
af437de8906c547bf65d26f7ae13ffe8981b31f4328ea9adb87bdbd152e98920
@torch.no_grad() def calc_boundaries(self, iterate: Tensor, direction: Tensor, trust_radius: float) -> Tuple[(Tensor, Tensor)]: ' Calculates the offset to the boundaries of the trust region\n ' a = torch.sum((direction ** 2), dim=(- 1)) b = (2 * torch.sum((direction * iterate), dim=(- 1))) c = (t...
Calculates the offset to the boundaries of the trust region
torchtrustncg/trust_region_newton_cg.py
calc_boundaries
vchoutas/torch-trust-ncg
14
python
@torch.no_grad() def calc_boundaries(self, iterate: Tensor, direction: Tensor, trust_radius: float) -> Tuple[(Tensor, Tensor)]: ' \n ' a = torch.sum((direction ** 2), dim=(- 1)) b = (2 * torch.sum((direction * iterate), dim=(- 1))) c = (torch.sum((iterate ** 2), dim=(- 1)) - (trust_radius ** 2)) ...
@torch.no_grad() def calc_boundaries(self, iterate: Tensor, direction: Tensor, trust_radius: float) -> Tuple[(Tensor, Tensor)]: ' \n ' a = torch.sum((direction ** 2), dim=(- 1)) b = (2 * torch.sum((direction * iterate), dim=(- 1))) c = (torch.sum((iterate ** 2), dim=(- 1)) - (trust_radius ** 2)) ...
4b5766d811ceceed7aec88418f86bb09fbbfe6d2f47437a75ce3f314e5e387c3
@torch.no_grad() def _solve_trust_reg_subproblem(self, loss: float, flat_grad: Tensor, trust_radius: float) -> Tuple[(Tensor, bool)]: ' Solves the quadratic subproblem in the trust region\n ' iterate = torch.zeros_like(flat_grad, requires_grad=False) residual = flat_grad.detach() direction = (- r...
Solves the quadratic subproblem in the trust region
torchtrustncg/trust_region_newton_cg.py
_solve_trust_reg_subproblem
vchoutas/torch-trust-ncg
14
python
@torch.no_grad() def _solve_trust_reg_subproblem(self, loss: float, flat_grad: Tensor, trust_radius: float) -> Tuple[(Tensor, bool)]: ' \n ' iterate = torch.zeros_like(flat_grad, requires_grad=False) residual = flat_grad.detach() direction = (- residual) jac_mag = torch.norm(flat_grad).item()...
@torch.no_grad() def _solve_trust_reg_subproblem(self, loss: float, flat_grad: Tensor, trust_radius: float) -> Tuple[(Tensor, bool)]: ' \n ' iterate = torch.zeros_like(flat_grad, requires_grad=False) residual = flat_grad.detach() direction = (- residual) jac_mag = torch.norm(flat_grad).item()...
7f229ace083ef439d236e0e7c4f6ca2734fe834a095fde6e5d2f077df9aad0c1
def __init__(self, input_size, projection_layer_size=150, kernel_heights=(3, 5), feature_map_increase=75, cnn_depth=3, output_projection_layer_size=300, activation=nn.LeakyReLU, dp=0, normalize_output=True): '\n :param input_size: Time step size.\n :param projection_layer_size: Size of projection_laye...
:param input_size: Time step size. :param projection_layer_size: Size of projection_layer. :param kernel_heights: Kernel height of the filters. :param feature_map_increase: Number of filters of each convolutional layer. :param cnn_depth: Number of convolutional layers per kernel height. :param output_projection_layer_s...
pytorch_wrapper/modules/sequence_dense_cnn.py
__init__
christosvar/pytorch-wrapper
111
python
def __init__(self, input_size, projection_layer_size=150, kernel_heights=(3, 5), feature_map_increase=75, cnn_depth=3, output_projection_layer_size=300, activation=nn.LeakyReLU, dp=0, normalize_output=True): '\n :param input_size: Time step size.\n :param projection_layer_size: Size of projection_laye...
def __init__(self, input_size, projection_layer_size=150, kernel_heights=(3, 5), feature_map_increase=75, cnn_depth=3, output_projection_layer_size=300, activation=nn.LeakyReLU, dp=0, normalize_output=True): '\n :param input_size: Time step size.\n :param projection_layer_size: Size of projection_laye...
f349b46b1c7c41313e2ed3803a63489b5ebf60f516164f73ae281e33c2b0477d
def forward(self, batch_sequences): '\n :param batch_sequences: 3D Tensor (batch_size, sequence_length, time_step_size).\n :return: 3D Tensor (batch_size, sequence_length, output_projection_layer_size).\n ' batch_sequences = batch_sequences.transpose(1, 2) output = [batch_sequences] ...
:param batch_sequences: 3D Tensor (batch_size, sequence_length, time_step_size). :return: 3D Tensor (batch_size, sequence_length, output_projection_layer_size).
pytorch_wrapper/modules/sequence_dense_cnn.py
forward
christosvar/pytorch-wrapper
111
python
def forward(self, batch_sequences): '\n :param batch_sequences: 3D Tensor (batch_size, sequence_length, time_step_size).\n :return: 3D Tensor (batch_size, sequence_length, output_projection_layer_size).\n ' batch_sequences = batch_sequences.transpose(1, 2) output = [batch_sequences] ...
def forward(self, batch_sequences): '\n :param batch_sequences: 3D Tensor (batch_size, sequence_length, time_step_size).\n :return: 3D Tensor (batch_size, sequence_length, output_projection_layer_size).\n ' batch_sequences = batch_sequences.transpose(1, 2) output = [batch_sequences] ...
28baf8fd535bb242ab93100856dee5c0d2790c7a9ec5621c2d531de47339ba3d
def absorb(self, victim): "\n Absorb one tree into another - note that this can't exceed the maximum size of the\n species.\n " self.size = min((self.size + victim.size), self.species.max_size)
Absorb one tree into another - note that this can't exceed the maximum size of the species.
forest/tree.py
absorb
DaveTCode/ProceduralForest
3
python
def absorb(self, victim): "\n Absorb one tree into another - note that this can't exceed the maximum size of the\n species.\n " self.size = min((self.size + victim.size), self.species.max_size)
def absorb(self, victim): "\n Absorb one tree into another - note that this can't exceed the maximum size of the\n species.\n " self.size = min((self.size + victim.size), self.species.max_size)<|docstring|>Absorb one tree into another - note that this can't exceed the maximum size o...
5395cd0377aa86aadeb1c5f60fc59a27f4bb808b80871f93b29e892295539113
def grow(self): '\n Increase the size of the tree by the amount specified in the species.\n ' self.size = min((self.size + self.species.growth_rate), self.species.max_size)
Increase the size of the tree by the amount specified in the species.
forest/tree.py
grow
DaveTCode/ProceduralForest
3
python
def grow(self): '\n \n ' self.size = min((self.size + self.species.growth_rate), self.species.max_size)
def grow(self): '\n \n ' self.size = min((self.size + self.species.growth_rate), self.species.max_size)<|docstring|>Increase the size of the tree by the amount specified in the species.<|endoftext|>
e3df56faceb3bfaa273d11ab39e70b0a497dbe6ff7f4bf7354a6f158213e8d5b
def is_mature(self): '\n Some actions only occur when a tree is fully mature. This checks for that by comparing\n the size to the species maximum size.\n ' return (self.size == self.species.max_size)
Some actions only occur when a tree is fully mature. This checks for that by comparing the size to the species maximum size.
forest/tree.py
is_mature
DaveTCode/ProceduralForest
3
python
def is_mature(self): '\n Some actions only occur when a tree is fully mature. This checks for that by comparing\n the size to the species maximum size.\n ' return (self.size == self.species.max_size)
def is_mature(self): '\n Some actions only occur when a tree is fully mature. This checks for that by comparing\n the size to the species maximum size.\n ' return (self.size == self.species.max_size)<|docstring|>Some actions only occur when a tree is fully mature. This checks for th...
b3b0704d8d580d7ca3e0c08e8e3eb7e463b8ed0323d07864353ce616bbc27d66
def overlapping(self, tree): '\n Check whether this tree overlaps another tree - assumes circular tree.\n ' d = math.sqrt((math.pow((tree.x - self.x), 2) + math.pow((tree.y - self.y), 2))) return (d <= (tree.size + self.size))
Check whether this tree overlaps another tree - assumes circular tree.
forest/tree.py
overlapping
DaveTCode/ProceduralForest
3
python
def overlapping(self, tree): '\n \n ' d = math.sqrt((math.pow((tree.x - self.x), 2) + math.pow((tree.y - self.y), 2))) return (d <= (tree.size + self.size))
def overlapping(self, tree): '\n \n ' d = math.sqrt((math.pow((tree.x - self.x), 2) + math.pow((tree.y - self.y), 2))) return (d <= (tree.size + self.size))<|docstring|>Check whether this tree overlaps another tree - assumes circular tree.<|endoftext|>
a70cb22e9eb643cd7c792dbd64ba4b4a5519ed7f8001823b51a574fcdb8fbb3e
def contains_point(self, x, y): '\n Check whether a point is within this tree.\n ' d = math.sqrt((math.pow((self.x - x), 2) + math.pow((self.y - y), 2))) return (d <= self.size)
Check whether a point is within this tree.
forest/tree.py
contains_point
DaveTCode/ProceduralForest
3
python
def contains_point(self, x, y): '\n \n ' d = math.sqrt((math.pow((self.x - x), 2) + math.pow((self.y - y), 2))) return (d <= self.size)
def contains_point(self, x, y): '\n \n ' d = math.sqrt((math.pow((self.x - x), 2) + math.pow((self.y - y), 2))) return (d <= self.size)<|docstring|>Check whether a point is within this tree.<|endoftext|>
10fd4af263e65544d94552ea64635c75ae4944ecefcdc7d4388535c244052ce9
@pytest.mark.parametrize('config, expected', [pytest.param({'_attr_': 'list', '_eval_': 'partial', '_args_': [[1]]}, (lambda : [1]))]) def test_parser_default_parser(config, expected): 'Test default parse.' parser = fromconfig.parser.DefaultParser() parsed = parser(config) if callable(expected): ...
Test default parse.
tests/unit/parser/test_parser_default.py
test_parser_default_parser
Mbompr/fromconfig
19
python
@pytest.mark.parametrize('config, expected', [pytest.param({'_attr_': 'list', '_eval_': 'partial', '_args_': [[1]]}, (lambda : [1]))]) def test_parser_default_parser(config, expected): parser = fromconfig.parser.DefaultParser() parsed = parser(config) if callable(expected): assert (fromconfig.f...
@pytest.mark.parametrize('config, expected', [pytest.param({'_attr_': 'list', '_eval_': 'partial', '_args_': [[1]]}, (lambda : [1]))]) def test_parser_default_parser(config, expected): parser = fromconfig.parser.DefaultParser() parsed = parser(config) if callable(expected): assert (fromconfig.f...
ec63490f0642c392cf7cb8e99f26132580f0ad479cca70fbbf895617e6e92f82
def __init__(__self__, *, dns_prefix: pulumi.Input[str], name: pulumi.Input[str], count: Optional[pulumi.Input[int]]=None, vm_size: Optional[pulumi.Input[Union[(str, 'ContainerServiceVMSizeTypes')]]]=None): "\n Profile for container service agent pool\n :param pulumi.Input[str] dns_prefix: DNS prefix ...
Profile for container service agent pool :param pulumi.Input[str] dns_prefix: DNS prefix to be used to create FQDN for this agent pool :param pulumi.Input[str] name: Unique name of the agent pool profile within the context of the subscription and resource group :param pulumi.Input[int] count: No. of agents (VMs) that w...
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, dns_prefix: pulumi.Input[str], name: pulumi.Input[str], count: Optional[pulumi.Input[int]]=None, vm_size: Optional[pulumi.Input[Union[(str, 'ContainerServiceVMSizeTypes')]]]=None): "\n Profile for container service agent pool\n :param pulumi.Input[str] dns_prefix: DNS prefix ...
def __init__(__self__, *, dns_prefix: pulumi.Input[str], name: pulumi.Input[str], count: Optional[pulumi.Input[int]]=None, vm_size: Optional[pulumi.Input[Union[(str, 'ContainerServiceVMSizeTypes')]]]=None): "\n Profile for container service agent pool\n :param pulumi.Input[str] dns_prefix: DNS prefix ...
f9b94fe8e4adfa8d37551818b83cbef195b65e1613dd16f0e31c7b5f7f3e157e
@property @pulumi.getter(name='dnsPrefix') def dns_prefix(self) -> pulumi.Input[str]: '\n DNS prefix to be used to create FQDN for this agent pool\n ' return pulumi.get(self, 'dns_prefix')
DNS prefix to be used to create FQDN for this agent pool
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
dns_prefix
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='dnsPrefix') def dns_prefix(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'dns_prefix')
@property @pulumi.getter(name='dnsPrefix') def dns_prefix(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'dns_prefix')<|docstring|>DNS prefix to be used to create FQDN for this agent pool<|endoftext|>
010b38f1633b9bf430457540e76910d06c832627199fc62a8289df31875d1973
@property @pulumi.getter def name(self) -> pulumi.Input[str]: '\n Unique name of the agent pool profile within the context of the subscription and resource group\n ' return pulumi.get(self, 'name')
Unique name of the agent pool profile within the context of the subscription and resource group
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
name
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def name(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'name')
@property @pulumi.getter def name(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'name')<|docstring|>Unique name of the agent pool profile within the context of the subscription and resource group<|endoftext|>
04526ffb1ce57f60d58ca419bfa1e0261f02b4c8ddc89dd18875b57128a3d2f8
@property @pulumi.getter def count(self) -> Optional[pulumi.Input[int]]: '\n No. of agents (VMs) that will host docker containers\n ' return pulumi.get(self, 'count')
No. of agents (VMs) that will host docker containers
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
count
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def count(self) -> Optional[pulumi.Input[int]]: '\n \n ' return pulumi.get(self, 'count')
@property @pulumi.getter def count(self) -> Optional[pulumi.Input[int]]: '\n \n ' return pulumi.get(self, 'count')<|docstring|>No. of agents (VMs) that will host docker containers<|endoftext|>
1e84c8d4f0cd5bfde069a73d60e71655897c20ddf9f5b285fcf0936f7c0bb40c
@property @pulumi.getter(name='vmSize') def vm_size(self) -> Optional[pulumi.Input[Union[(str, 'ContainerServiceVMSizeTypes')]]]: '\n Size of agent VMs\n ' return pulumi.get(self, 'vm_size')
Size of agent VMs
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
vm_size
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='vmSize') def vm_size(self) -> Optional[pulumi.Input[Union[(str, 'ContainerServiceVMSizeTypes')]]]: '\n \n ' return pulumi.get(self, 'vm_size')
@property @pulumi.getter(name='vmSize') def vm_size(self) -> Optional[pulumi.Input[Union[(str, 'ContainerServiceVMSizeTypes')]]]: '\n \n ' return pulumi.get(self, 'vm_size')<|docstring|>Size of agent VMs<|endoftext|>
9546bed620f777a14ce8d02de3a909ebdfdc4f5657b5966c67573d66cb668549
def __init__(__self__, *, vm_diagnostics: Optional[pulumi.Input['ContainerServiceVMDiagnosticsArgs']]=None): "\n :param pulumi.Input['ContainerServiceVMDiagnosticsArgs'] vm_diagnostics: Profile for container service VM diagnostic agent\n " if (vm_diagnostics is not None): pulumi.set(__self...
:param pulumi.Input['ContainerServiceVMDiagnosticsArgs'] vm_diagnostics: Profile for container service VM diagnostic agent
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, vm_diagnostics: Optional[pulumi.Input['ContainerServiceVMDiagnosticsArgs']]=None): "\n \n " if (vm_diagnostics is not None): pulumi.set(__self__, 'vm_diagnostics', vm_diagnostics)
def __init__(__self__, *, vm_diagnostics: Optional[pulumi.Input['ContainerServiceVMDiagnosticsArgs']]=None): "\n \n " if (vm_diagnostics is not None): pulumi.set(__self__, 'vm_diagnostics', vm_diagnostics)<|docstring|>:param pulumi.Input['ContainerServiceVMDiagnosticsArgs'] vm_diagnostics:...
12df4900ac49c29af95616f0fd321128627533f869ebc337c33ea7655ec2359d
@property @pulumi.getter(name='vmDiagnostics') def vm_diagnostics(self) -> Optional[pulumi.Input['ContainerServiceVMDiagnosticsArgs']]: '\n Profile for container service VM diagnostic agent\n ' return pulumi.get(self, 'vm_diagnostics')
Profile for container service VM diagnostic agent
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
vm_diagnostics
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='vmDiagnostics') def vm_diagnostics(self) -> Optional[pulumi.Input['ContainerServiceVMDiagnosticsArgs']]: '\n \n ' return pulumi.get(self, 'vm_diagnostics')
@property @pulumi.getter(name='vmDiagnostics') def vm_diagnostics(self) -> Optional[pulumi.Input['ContainerServiceVMDiagnosticsArgs']]: '\n \n ' return pulumi.get(self, 'vm_diagnostics')<|docstring|>Profile for container service VM diagnostic agent<|endoftext|>
53c4601c9c894473b259e4e7c3e7ed27560ed203a57ad3a3b4911c852d3847e8
def __init__(__self__, *, admin_username: pulumi.Input[str], ssh: pulumi.Input['ContainerServiceSshConfigurationArgs']): "\n Profile for Linux VM\n :param pulumi.Input[str] admin_username: The administrator username to use for all Linux VMs\n :param pulumi.Input['ContainerServiceSshConfiguratio...
Profile for Linux VM :param pulumi.Input[str] admin_username: The administrator username to use for all Linux VMs :param pulumi.Input['ContainerServiceSshConfigurationArgs'] ssh: Specifies the ssh key configuration for Linux VMs
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, admin_username: pulumi.Input[str], ssh: pulumi.Input['ContainerServiceSshConfigurationArgs']): "\n Profile for Linux VM\n :param pulumi.Input[str] admin_username: The administrator username to use for all Linux VMs\n :param pulumi.Input['ContainerServiceSshConfiguratio...
def __init__(__self__, *, admin_username: pulumi.Input[str], ssh: pulumi.Input['ContainerServiceSshConfigurationArgs']): "\n Profile for Linux VM\n :param pulumi.Input[str] admin_username: The administrator username to use for all Linux VMs\n :param pulumi.Input['ContainerServiceSshConfiguratio...
46b5cde415d4e26ae09075ce569f7174af65184eeb1228dbc4d083dbf812a5a2
@property @pulumi.getter(name='adminUsername') def admin_username(self) -> pulumi.Input[str]: '\n The administrator username to use for all Linux VMs\n ' return pulumi.get(self, 'admin_username')
The administrator username to use for all Linux VMs
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
admin_username
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='adminUsername') def admin_username(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'admin_username')
@property @pulumi.getter(name='adminUsername') def admin_username(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'admin_username')<|docstring|>The administrator username to use for all Linux VMs<|endoftext|>
203d09ba55ed754a12c84755b74df592fd4d910d4d9fa22933e1cd1a863f88b9
@property @pulumi.getter def ssh(self) -> pulumi.Input['ContainerServiceSshConfigurationArgs']: '\n Specifies the ssh key configuration for Linux VMs\n ' return pulumi.get(self, 'ssh')
Specifies the ssh key configuration for Linux VMs
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
ssh
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def ssh(self) -> pulumi.Input['ContainerServiceSshConfigurationArgs']: '\n \n ' return pulumi.get(self, 'ssh')
@property @pulumi.getter def ssh(self) -> pulumi.Input['ContainerServiceSshConfigurationArgs']: '\n \n ' return pulumi.get(self, 'ssh')<|docstring|>Specifies the ssh key configuration for Linux VMs<|endoftext|>
8e77e867ddc7a92cd069409061790139ccf9b9cc010ec1352c230d0eb195dd6f
def __init__(__self__, *, dns_prefix: pulumi.Input[str], count: Optional[pulumi.Input[int]]=None): '\n Profile for container service master\n :param pulumi.Input[str] dns_prefix: DNS prefix to be used to create FQDN for master\n :param pulumi.Input[int] count: Number of masters (VMs) in the con...
Profile for container service master :param pulumi.Input[str] dns_prefix: DNS prefix to be used to create FQDN for master :param pulumi.Input[int] count: Number of masters (VMs) in the container cluster
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, dns_prefix: pulumi.Input[str], count: Optional[pulumi.Input[int]]=None): '\n Profile for container service master\n :param pulumi.Input[str] dns_prefix: DNS prefix to be used to create FQDN for master\n :param pulumi.Input[int] count: Number of masters (VMs) in the con...
def __init__(__self__, *, dns_prefix: pulumi.Input[str], count: Optional[pulumi.Input[int]]=None): '\n Profile for container service master\n :param pulumi.Input[str] dns_prefix: DNS prefix to be used to create FQDN for master\n :param pulumi.Input[int] count: Number of masters (VMs) in the con...
87e550ff3cbc2a7ba8e147e95bcc9e97d62b736da36ebb3b471ddaf222f6b1c7
@property @pulumi.getter(name='dnsPrefix') def dns_prefix(self) -> pulumi.Input[str]: '\n DNS prefix to be used to create FQDN for master\n ' return pulumi.get(self, 'dns_prefix')
DNS prefix to be used to create FQDN for master
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
dns_prefix
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='dnsPrefix') def dns_prefix(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'dns_prefix')
@property @pulumi.getter(name='dnsPrefix') def dns_prefix(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'dns_prefix')<|docstring|>DNS prefix to be used to create FQDN for master<|endoftext|>
3412b0b23bfdd558ccdb2250452d14c5864693ba3e712d786781822434d0cf35
@property @pulumi.getter def count(self) -> Optional[pulumi.Input[int]]: '\n Number of masters (VMs) in the container cluster\n ' return pulumi.get(self, 'count')
Number of masters (VMs) in the container cluster
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
count
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def count(self) -> Optional[pulumi.Input[int]]: '\n \n ' return pulumi.get(self, 'count')
@property @pulumi.getter def count(self) -> Optional[pulumi.Input[int]]: '\n \n ' return pulumi.get(self, 'count')<|docstring|>Number of masters (VMs) in the container cluster<|endoftext|>
bdd94d0c1cb1a9b523d609d2f0f1026344ca4450290c9eabaa69c308c533d4c1
def __init__(__self__, *, orchestrator_type: Optional[pulumi.Input['ContainerServiceOchestratorTypes']]=None): "\n Profile for Orchestrator\n :param pulumi.Input['ContainerServiceOchestratorTypes'] orchestrator_type: Specifies what orchestrator will be used to manage container cluster resources.\n ...
Profile for Orchestrator :param pulumi.Input['ContainerServiceOchestratorTypes'] orchestrator_type: Specifies what orchestrator will be used to manage container cluster resources.
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, orchestrator_type: Optional[pulumi.Input['ContainerServiceOchestratorTypes']]=None): "\n Profile for Orchestrator\n :param pulumi.Input['ContainerServiceOchestratorTypes'] orchestrator_type: Specifies what orchestrator will be used to manage container cluster resources.\n ...
def __init__(__self__, *, orchestrator_type: Optional[pulumi.Input['ContainerServiceOchestratorTypes']]=None): "\n Profile for Orchestrator\n :param pulumi.Input['ContainerServiceOchestratorTypes'] orchestrator_type: Specifies what orchestrator will be used to manage container cluster resources.\n ...
8fff61dbf719cde6bad3d73590111ad47f3fa172dbc7e16c2a52b02bd0d0d852
@property @pulumi.getter(name='orchestratorType') def orchestrator_type(self) -> Optional[pulumi.Input['ContainerServiceOchestratorTypes']]: '\n Specifies what orchestrator will be used to manage container cluster resources.\n ' return pulumi.get(self, 'orchestrator_type')
Specifies what orchestrator will be used to manage container cluster resources.
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
orchestrator_type
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='orchestratorType') def orchestrator_type(self) -> Optional[pulumi.Input['ContainerServiceOchestratorTypes']]: '\n \n ' return pulumi.get(self, 'orchestrator_type')
@property @pulumi.getter(name='orchestratorType') def orchestrator_type(self) -> Optional[pulumi.Input['ContainerServiceOchestratorTypes']]: '\n \n ' return pulumi.get(self, 'orchestrator_type')<|docstring|>Specifies what orchestrator will be used to manage container cluster resources.<|endoftext|...
00a713891d07c6b8da7c91b9f5c54755fb0b36853a8b3a6be5704448156db4db
def __init__(__self__, *, public_keys: Optional[pulumi.Input[Sequence[pulumi.Input['ContainerServiceSshPublicKeyArgs']]]]=None): "\n SSH configuration for Linux based VMs running on Azure\n :param pulumi.Input[Sequence[pulumi.Input['ContainerServiceSshPublicKeyArgs']]] public_keys: Gets or sets the li...
SSH configuration for Linux based VMs running on Azure :param pulumi.Input[Sequence[pulumi.Input['ContainerServiceSshPublicKeyArgs']]] public_keys: Gets or sets the list of SSH public keys used to authenticate with Linux based VMs
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, public_keys: Optional[pulumi.Input[Sequence[pulumi.Input['ContainerServiceSshPublicKeyArgs']]]]=None): "\n SSH configuration for Linux based VMs running on Azure\n :param pulumi.Input[Sequence[pulumi.Input['ContainerServiceSshPublicKeyArgs']]] public_keys: Gets or sets the li...
def __init__(__self__, *, public_keys: Optional[pulumi.Input[Sequence[pulumi.Input['ContainerServiceSshPublicKeyArgs']]]]=None): "\n SSH configuration for Linux based VMs running on Azure\n :param pulumi.Input[Sequence[pulumi.Input['ContainerServiceSshPublicKeyArgs']]] public_keys: Gets or sets the li...
0ce7662055523de20e322876dc257050b47523268bf007a87d8c086901bde566
@property @pulumi.getter(name='publicKeys') def public_keys(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ContainerServiceSshPublicKeyArgs']]]]: '\n Gets or sets the list of SSH public keys used to authenticate with Linux based VMs\n ' return pulumi.get(self, 'public_keys')
Gets or sets the list of SSH public keys used to authenticate with Linux based VMs
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
public_keys
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='publicKeys') def public_keys(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ContainerServiceSshPublicKeyArgs']]]]: '\n \n ' return pulumi.get(self, 'public_keys')
@property @pulumi.getter(name='publicKeys') def public_keys(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ContainerServiceSshPublicKeyArgs']]]]: '\n \n ' return pulumi.get(self, 'public_keys')<|docstring|>Gets or sets the list of SSH public keys used to authenticate with Linux based VMs<|e...
433c33fe0a5e0f47e63e5b1c79ed01ad14be737057a5baf797abbfca283e2df9
def __init__(__self__, *, key_data: pulumi.Input[str]): '\n Contains information about SSH certificate public key data.\n :param pulumi.Input[str] key_data: Gets or sets Certificate public key used to authenticate with VM through SSH. The certificate must be in Pem format with or without headers.\n ...
Contains information about SSH certificate public key data. :param pulumi.Input[str] key_data: Gets or sets Certificate public key used to authenticate with VM through SSH. The certificate must be in Pem format with or without headers.
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, key_data: pulumi.Input[str]): '\n Contains information about SSH certificate public key data.\n :param pulumi.Input[str] key_data: Gets or sets Certificate public key used to authenticate with VM through SSH. The certificate must be in Pem format with or without headers.\n ...
def __init__(__self__, *, key_data: pulumi.Input[str]): '\n Contains information about SSH certificate public key data.\n :param pulumi.Input[str] key_data: Gets or sets Certificate public key used to authenticate with VM through SSH. The certificate must be in Pem format with or without headers.\n ...
b6f85d688131e88acfa16bdab0ff7e9c9cc183e0dd58def349b530862720939e
@property @pulumi.getter(name='keyData') def key_data(self) -> pulumi.Input[str]: '\n Gets or sets Certificate public key used to authenticate with VM through SSH. The certificate must be in Pem format with or without headers.\n ' return pulumi.get(self, 'key_data')
Gets or sets Certificate public key used to authenticate with VM through SSH. The certificate must be in Pem format with or without headers.
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
key_data
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='keyData') def key_data(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'key_data')
@property @pulumi.getter(name='keyData') def key_data(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'key_data')<|docstring|>Gets or sets Certificate public key used to authenticate with VM through SSH. The certificate must be in Pem format with or without headers.<|endoftext|>
a625b5c43760321410b34064deaaca5d4d1822c1a696da6f30ee402423b027a1
def __init__(__self__, *, enabled: Optional[pulumi.Input[bool]]=None): '\n Describes VM Diagnostics.\n :param pulumi.Input[bool] enabled: Gets or sets whether VM Diagnostic Agent should be provisioned on the Virtual Machine.\n ' if (enabled is not None): pulumi.set(__self__, 'enable...
Describes VM Diagnostics. :param pulumi.Input[bool] enabled: Gets or sets whether VM Diagnostic Agent should be provisioned on the Virtual Machine.
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, enabled: Optional[pulumi.Input[bool]]=None): '\n Describes VM Diagnostics.\n :param pulumi.Input[bool] enabled: Gets or sets whether VM Diagnostic Agent should be provisioned on the Virtual Machine.\n ' if (enabled is not None): pulumi.set(__self__, 'enable...
def __init__(__self__, *, enabled: Optional[pulumi.Input[bool]]=None): '\n Describes VM Diagnostics.\n :param pulumi.Input[bool] enabled: Gets or sets whether VM Diagnostic Agent should be provisioned on the Virtual Machine.\n ' if (enabled is not None): pulumi.set(__self__, 'enable...
4ccc30c51289648aaf76c0dc17d4bd1c60b702311ed0e919700d698b333e6f22
@property @pulumi.getter def enabled(self) -> Optional[pulumi.Input[bool]]: '\n Gets or sets whether VM Diagnostic Agent should be provisioned on the Virtual Machine.\n ' return pulumi.get(self, 'enabled')
Gets or sets whether VM Diagnostic Agent should be provisioned on the Virtual Machine.
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
enabled
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def enabled(self) -> Optional[pulumi.Input[bool]]: '\n \n ' return pulumi.get(self, 'enabled')
@property @pulumi.getter def enabled(self) -> Optional[pulumi.Input[bool]]: '\n \n ' return pulumi.get(self, 'enabled')<|docstring|>Gets or sets whether VM Diagnostic Agent should be provisioned on the Virtual Machine.<|endoftext|>
81b5fbf28bc40172cdb037e3554c5b23540ee72edc60f763e618b67a346df09c
def __init__(__self__, *, admin_password: pulumi.Input[str], admin_username: pulumi.Input[str]): '\n Profile for Windows jumpbox\n :param pulumi.Input[str] admin_password: The administrator password to use for Windows jumpbox\n :param pulumi.Input[str] admin_username: The administrator username...
Profile for Windows jumpbox :param pulumi.Input[str] admin_password: The administrator password to use for Windows jumpbox :param pulumi.Input[str] admin_username: The administrator username to use for Windows jumpbox
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, admin_password: pulumi.Input[str], admin_username: pulumi.Input[str]): '\n Profile for Windows jumpbox\n :param pulumi.Input[str] admin_password: The administrator password to use for Windows jumpbox\n :param pulumi.Input[str] admin_username: The administrator username...
def __init__(__self__, *, admin_password: pulumi.Input[str], admin_username: pulumi.Input[str]): '\n Profile for Windows jumpbox\n :param pulumi.Input[str] admin_password: The administrator password to use for Windows jumpbox\n :param pulumi.Input[str] admin_username: The administrator username...
a8c8d245c44dd4c954371302b8234d21c327ab5977f04382af0d3ffca8e516cb
@property @pulumi.getter(name='adminPassword') def admin_password(self) -> pulumi.Input[str]: '\n The administrator password to use for Windows jumpbox\n ' return pulumi.get(self, 'admin_password')
The administrator password to use for Windows jumpbox
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
admin_password
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='adminPassword') def admin_password(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'admin_password')
@property @pulumi.getter(name='adminPassword') def admin_password(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'admin_password')<|docstring|>The administrator password to use for Windows jumpbox<|endoftext|>
f1e54a52af8c9472f4600771858bcb3c6117eed9aa625f02877686f385824b2c
@property @pulumi.getter(name='adminUsername') def admin_username(self) -> pulumi.Input[str]: '\n The administrator username to use for Windows jumpbox\n ' return pulumi.get(self, 'admin_username')
The administrator username to use for Windows jumpbox
sdk/python/pulumi_azure_native/containerservice/v20151101preview/_inputs.py
admin_username
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='adminUsername') def admin_username(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'admin_username')
@property @pulumi.getter(name='adminUsername') def admin_username(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'admin_username')<|docstring|>The administrator username to use for Windows jumpbox<|endoftext|>
a144140dfdabe5a2c7427811384be2fc6c8c9eac667613512275c2d04e197481
def camelCase_to_underscore(str): "\n >>> camelCase_to_underscore('camelcase')\n 'camelcase'\n >>> camelCase_to_underscore('camelCase')\n 'camel_case'\n >>> camelCase_to_underscore('camelCamelCase')\n 'camel_camel_case'\n " return re.sub(pattern, sub, str).lower()
>>> camelCase_to_underscore('camelcase') 'camelcase' >>> camelCase_to_underscore('camelCase') 'camel_case' >>> camelCase_to_underscore('camelCamelCase') 'camel_camel_case'
utils/model/gen_uml.py
camelCase_to_underscore
MarianelaSena/gaphor
0
python
def camelCase_to_underscore(str): "\n >>> camelCase_to_underscore('camelcase')\n 'camelcase'\n >>> camelCase_to_underscore('camelCase')\n 'camel_case'\n >>> camelCase_to_underscore('camelCamelCase')\n 'camel_camel_case'\n " return re.sub(pattern, sub, str).lower()
def camelCase_to_underscore(str): "\n >>> camelCase_to_underscore('camelcase')\n 'camelcase'\n >>> camelCase_to_underscore('camelCase')\n 'camel_case'\n >>> camelCase_to_underscore('camelCamelCase')\n 'camel_camel_case'\n " return re.sub(pattern, sub, str).lower()<|docstring|>>>> camelCase_...
070504d83250001b7a80aeb72e7921162917c3567a3b334eb35b9ed895eb8198
def parse_association_end(head, tail): '\n The head association end is enriched with the following attributes:\n\n derived - association is a derived union or not\n name - name of the association end (name of head is found on tail)\n class_name - name of the class this association belongs to...
The head association end is enriched with the following attributes: derived - association is a derived union or not name - name of the association end (name of head is found on tail) class_name - name of the class this association belongs to opposite_class_name - name of the class at the other end of t...
utils/model/gen_uml.py
parse_association_end
MarianelaSena/gaphor
0
python
def parse_association_end(head, tail): '\n The head association end is enriched with the following attributes:\n\n derived - association is a derived union or not\n name - name of the association end (name of head is found on tail)\n class_name - name of the class this association belongs to...
def parse_association_end(head, tail): '\n The head association end is enriched with the following attributes:\n\n derived - association is a derived union or not\n name - name of the association end (name of head is found on tail)\n class_name - name of the class this association belongs to...
982a2777ca2c5de69691285727e7e779f017cc8f26c52bb395b36b2dbd0705d1
def write_classdef(self, clazz): '\n Write a class definition (class xx(x): pass).\n First the parent classes are examined. After that its own definition\n is written. It is ensured that class definitions are only written\n once.\n ' if (not clazz.written): s = '' ...
Write a class definition (class xx(x): pass). First the parent classes are examined. After that its own definition is written. It is ensured that class definitions are only written once.
utils/model/gen_uml.py
write_classdef
MarianelaSena/gaphor
0
python
def write_classdef(self, clazz): '\n Write a class definition (class xx(x): pass).\n First the parent classes are examined. After that its own definition\n is written. It is ensured that class definitions are only written\n once.\n ' if (not clazz.written): s = ...
def write_classdef(self, clazz): '\n Write a class definition (class xx(x): pass).\n First the parent classes are examined. After that its own definition\n is written. It is ensured that class definitions are only written\n once.\n ' if (not clazz.written): s = ...
e44c6932c14d272ed34ca46e5ea5e217a26ab2160b888cbe5b26a3ec54011a8a
def write_property(self, full_name, value): '\n Write a property to the file. If the property is overridden, use the\n overridden value. full_name should be like Class.attribute. value is\n free format text.\n ' if (not self.overrides.write_override(self, full_name)): self.wr...
Write a property to the file. If the property is overridden, use the overridden value. full_name should be like Class.attribute. value is free format text.
utils/model/gen_uml.py
write_property
MarianelaSena/gaphor
0
python
def write_property(self, full_name, value): '\n Write a property to the file. If the property is overridden, use the\n overridden value. full_name should be like Class.attribute. value is\n free format text.\n ' if (not self.overrides.write_override(self, full_name)): self.wr...
def write_property(self, full_name, value): '\n Write a property to the file. If the property is overridden, use the\n overridden value. full_name should be like Class.attribute. value is\n free format text.\n ' if (not self.overrides.write_override(self, full_name)): self.wr...
4f1965477e09f6cc8057382526e8f4cbb5e66ef90988e80e6b7cde3da300706d
def write_attribute(self, a, enumerations={}): '\n Write a definition for attribute a. Enumerations may be a dict\n of enumerations, indexed by ID. These are used to identify enums.\n ' params = {} type = a.typeValue if (type is None): raise ValueError(('ERROR! type is not s...
Write a definition for attribute a. Enumerations may be a dict of enumerations, indexed by ID. These are used to identify enums.
utils/model/gen_uml.py
write_attribute
MarianelaSena/gaphor
0
python
def write_attribute(self, a, enumerations={}): '\n Write a definition for attribute a. Enumerations may be a dict\n of enumerations, indexed by ID. These are used to identify enums.\n ' params = {} type = a.typeValue if (type is None): raise ValueError(('ERROR! type is not s...
def write_attribute(self, a, enumerations={}): '\n Write a definition for attribute a. Enumerations may be a dict\n of enumerations, indexed by ID. These are used to identify enums.\n ' params = {} type = a.typeValue if (type is None): raise ValueError(('ERROR! type is not s...
7de93cb8597f83961b2cf8deadbe85eb654526a97f94f1b4d081b8740a0db6f1
def write_association(self, head, tail): '\n Write an association for head.\n The association should not be a redefine or derived association.\n ' if head.written: return assert head.navigable assert (not head.derived) assert (not head.redefines) a = f"association('{...
Write an association for head. The association should not be a redefine or derived association.
utils/model/gen_uml.py
write_association
MarianelaSena/gaphor
0
python
def write_association(self, head, tail): '\n Write an association for head.\n The association should not be a redefine or derived association.\n ' if head.written: return assert head.navigable assert (not head.derived) assert (not head.redefines) a = f"association('{...
def write_association(self, head, tail): '\n Write an association for head.\n The association should not be a redefine or derived association.\n ' if head.written: return assert head.navigable assert (not head.derived) assert (not head.redefines) a = f"association('{...
5ea054be91a38345d6358e1408388a7f878dc796122a5e0e29e905f470caf4c3
def write_derivedunion(self, d): '\n Write a derived union. If there are no subsets a warning\n is issued. The derivedunion is still created though.\n\n Derived unions may be created for associations that were returned\n False by write_association().\n ' subs = '' for u in...
Write a derived union. If there are no subsets a warning is issued. The derivedunion is still created though. Derived unions may be created for associations that were returned False by write_association().
utils/model/gen_uml.py
write_derivedunion
MarianelaSena/gaphor
0
python
def write_derivedunion(self, d): '\n Write a derived union. If there are no subsets a warning\n is issued. The derivedunion is still created though.\n\n Derived unions may be created for associations that were returned\n False by write_association().\n ' subs = for u in d...
def write_derivedunion(self, d): '\n Write a derived union. If there are no subsets a warning\n is issued. The derivedunion is still created though.\n\n Derived unions may be created for associations that were returned\n False by write_association().\n ' subs = for u in d...
35135c6ba384843bffb929b45cce4118bd80117f4836b179d9dd8eda6580098c
def write_redefine(self, r): '\n Redefines may be created for associations that were returned\n False by write_association().\n ' self.write_property(f'{r.class_name}.{r.name}', ("redefine(%s, '%s', %s, %s)" % (r.class_name, r.name, r.opposite_class_name, r.redefines)))
Redefines may be created for associations that were returned False by write_association().
utils/model/gen_uml.py
write_redefine
MarianelaSena/gaphor
0
python
def write_redefine(self, r): '\n Redefines may be created for associations that were returned\n False by write_association().\n ' self.write_property(f'{r.class_name}.{r.name}', ("redefine(%s, '%s', %s, %s)" % (r.class_name, r.name, r.opposite_class_name, r.redefines)))
def write_redefine(self, r): '\n Redefines may be created for associations that were returned\n False by write_association().\n ' self.write_property(f'{r.class_name}.{r.name}', ("redefine(%s, '%s', %s, %s)" % (r.class_name, r.name, r.opposite_class_name, r.redefines)))<|docstring|>Redefine...
d2ce16097c0f7345cfc9695eae9f1557be67887cebf85c128e38d0b1590ed91b
def resolve(val, attr): 'Resolve references.\n ' try: refs = val.references[attr] except KeyError: val.references[attr] = None return if isinstance(refs, type([])): unrefs = [] for r in refs: unrefs.append(all_elements[r]) val.references...
Resolve references.
utils/model/gen_uml.py
resolve
MarianelaSena/gaphor
0
python
def resolve(val, attr): '\n ' try: refs = val.references[attr] except KeyError: val.references[attr] = None return if isinstance(refs, type([])): unrefs = [] for r in refs: unrefs.append(all_elements[r]) val.references[attr] = unrefs ...
def resolve(val, attr): '\n ' try: refs = val.references[attr] except KeyError: val.references[attr] = None return if isinstance(refs, type([])): unrefs = [] for r in refs: unrefs.append(all_elements[r]) val.references[attr] = unrefs ...
3bbfbb628960ca0d952031868d7320250b3b3edec4549e11e60ca83d29621bca
def read_data(self): 'Reads the json data located in self.data_fname into memory, to\n the attribute self.data.\n ' with open(self.data_fname, 'r') as j: self.data = json.loads(j.read())
Reads the json data located in self.data_fname into memory, to the attribute self.data.
hw5.py
read_data
yaelgat/hw5
0
python
def read_data(self): 'Reads the json data located in self.data_fname into memory, to\n the attribute self.data.\n ' with open(self.data_fname, 'r') as j: self.data = json.loads(j.read())
def read_data(self): 'Reads the json data located in self.data_fname into memory, to\n the attribute self.data.\n ' with open(self.data_fname, 'r') as j: self.data = json.loads(j.read())<|docstring|>Reads the json data located in self.data_fname into memory, to the attribute self.data.<|en...
9b5ef0ce19e5ff07df658a2866fbb76b29c923bf05d8e374c6c5ffb9c8c435b4
def test_parser() -> None: 'Run a merge test with the provided action.' test_data = parse_path(__file__) parser(test_data.org, test_data.model, test_data.driver, test_data.path)
Run a merge test with the provided action.
tests/models/openconfig/data/openconfig_vlan/parse/junos/config/test_case.py
test_parser
steinzi/ntc-rosetta
95
python
def test_parser() -> None: test_data = parse_path(__file__) parser(test_data.org, test_data.model, test_data.driver, test_data.path)
def test_parser() -> None: test_data = parse_path(__file__) parser(test_data.org, test_data.model, test_data.driver, test_data.path)<|docstring|>Run a merge test with the provided action.<|endoftext|>
edde19febba1c53828a7bd818e3b690b25c1b511309f59ecbf4a22a1871fc17d
def is_mobile(text: str) -> bool: '\n 检查手机号码\n\n :param text:\n :return:\n ' return check_string('^1[3-9]\\d{9}$', text)
检查手机号码 :param text: :return:
backend/app/utils/processing_string.py
is_mobile
wu-clan/fastapi_mysql_demo
0
python
def is_mobile(text: str) -> bool: '\n 检查手机号码\n\n :param text:\n :return:\n ' return check_string('^1[3-9]\\d{9}$', text)
def is_mobile(text: str) -> bool: '\n 检查手机号码\n\n :param text:\n :return:\n ' return check_string('^1[3-9]\\d{9}$', text)<|docstring|>检查手机号码 :param text: :return:<|endoftext|>
cbd162f7f5588a3e007844f377606740564ddfe09e4de511c5cab9d111d19f5c
def is_wechat(text: str) -> bool: '\n 检查微信号\n\n :param text:\n :return:\n ' return check_string('^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$', text)
检查微信号 :param text: :return:
backend/app/utils/processing_string.py
is_wechat
wu-clan/fastapi_mysql_demo
0
python
def is_wechat(text: str) -> bool: '\n 检查微信号\n\n :param text:\n :return:\n ' return check_string('^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$', text)
def is_wechat(text: str) -> bool: '\n 检查微信号\n\n :param text:\n :return:\n ' return check_string('^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$', text)<|docstring|>检查微信号 :param text: :return:<|endoftext|>
808cc832b8d25cd480dc189d293ebd1c69be828150834dd9edf5ab34b15c9324
def is_QQ(text: str) -> bool: '\n 检查QQ号\n\n :param text:\n :return:\n ' return check_string('^[1-9][0-9]{4,10}$', text)
检查QQ号 :param text: :return:
backend/app/utils/processing_string.py
is_QQ
wu-clan/fastapi_mysql_demo
0
python
def is_QQ(text: str) -> bool: '\n 检查QQ号\n\n :param text:\n :return:\n ' return check_string('^[1-9][0-9]{4,10}$', text)
def is_QQ(text: str) -> bool: '\n 检查QQ号\n\n :param text:\n :return:\n ' return check_string('^[1-9][0-9]{4,10}$', text)<|docstring|>检查QQ号 :param text: :return:<|endoftext|>
8bf252a347a073ca831779c129b3a4457af854a87bcf4dc65b9f3ad628e2c8c1
def appdata_dir(): 'Find the path to the application data directory; add an electrum folder and return path.' if (platform.system() == 'Windows'): return os.path.join(os.environ['APPDATA'], 'Electrum') elif (platform.system() == 'Linux'): return os.path.join(sys.prefix, 'share', 'electrum') ...
Find the path to the application data directory; add an electrum folder and return path.
web/cgi-bin/electrum/lib/util.py
appdata_dir
appealing-alexey/ew
1
python
def appdata_dir(): if (platform.system() == 'Windows'): return os.path.join(os.environ['APPDATA'], 'Electrum') elif (platform.system() == 'Linux'): return os.path.join(sys.prefix, 'share', 'electrum') elif ((platform.system() == 'Darwin') or (platform.system() == 'DragonFly')): ...
def appdata_dir(): if (platform.system() == 'Windows'): return os.path.join(os.environ['APPDATA'], 'Electrum') elif (platform.system() == 'Linux'): return os.path.join(sys.prefix, 'share', 'electrum') elif ((platform.system() == 'Darwin') or (platform.system() == 'DragonFly')): ...
47aaaa404f8ce217020099d62ae14a0d20e3c84da02adf1ef160ec77d33016e0
def local_data_dir(): 'Return path to the data folder.' assert sys.argv prefix_path = os.path.dirname(sys.argv[0]) local_data = os.path.join(prefix_path, 'data') return local_data
Return path to the data folder.
web/cgi-bin/electrum/lib/util.py
local_data_dir
appealing-alexey/ew
1
python
def local_data_dir(): assert sys.argv prefix_path = os.path.dirname(sys.argv[0]) local_data = os.path.join(prefix_path, 'data') return local_data
def local_data_dir(): assert sys.argv prefix_path = os.path.dirname(sys.argv[0]) local_data = os.path.join(prefix_path, 'data') return local_data<|docstring|>Return path to the data folder.<|endoftext|>
eb1bd0571d9977a75262d44ba307146da36e267b97898f76653d172855948014
def compress_content(self): '\n Method to change for new implementations\n ' raise NotImplementedError()
Method to change for new implementations
compress_field/base.py
compress_content
valdergallo/django-compress-field
13
python
def compress_content(self): '\n \n ' raise NotImplementedError()
def compress_content(self): '\n \n ' raise NotImplementedError()<|docstring|>Method to change for new implementations<|endoftext|>
0d537422e4b85bb1c9262ff289899c7d3e071a6039607d2a77ecc9bef8e8c011
def intersect_line_and_sphere(endpoint, center, radius): 'Compute distance to intersections of a line and a sphere.\n\n Given a line through the origin (0,0,0) and an |xyz| ``endpoint``,\n and a sphere with the |xyz| ``center`` and scalar ``radius``,\n return the distance from the origin to their two inter...
Compute distance to intersections of a line and a sphere. Given a line through the origin (0,0,0) and an |xyz| ``endpoint``, and a sphere with the |xyz| ``center`` and scalar ``radius``, return the distance from the origin to their two intersections. If the line is tangent to the sphere, the two intersections will be...
skyfield/geometry.py
intersect_line_and_sphere
Imperator26/python-skyfield
765
python
def intersect_line_and_sphere(endpoint, center, radius): 'Compute distance to intersections of a line and a sphere.\n\n Given a line through the origin (0,0,0) and an |xyz| ``endpoint``,\n and a sphere with the |xyz| ``center`` and scalar ``radius``,\n return the distance from the origin to their two inter...
def intersect_line_and_sphere(endpoint, center, radius): 'Compute distance to intersections of a line and a sphere.\n\n Given a line through the origin (0,0,0) and an |xyz| ``endpoint``,\n and a sphere with the |xyz| ``center`` and scalar ``radius``,\n return the distance from the origin to their two inter...
15e24af4165a83d38fa36e14b5527a5bab34f387c925d083b1362e124ccc35d6
def dense_patch_slices(image_size, patch_size, scan_interval): '\n Enumerate all slices defining 2D/3D patches of size `patch_size` from an `image_size` input image.\n\n Args:\n image_size (tuple of int): dimensions of image to iterate over\n patch_size (tuple of int): size of patches to generat...
Enumerate all slices defining 2D/3D patches of size `patch_size` from an `image_size` input image. Args: image_size (tuple of int): dimensions of image to iterate over patch_size (tuple of int): size of patches to generate slices scan_interval (tuple of int): dense patch sampling interval Returns: a l...
contrib/MedicalSeg/medicalseg/core/infer_window.py
dense_patch_slices
sun222/PaddleSeg
0
python
def dense_patch_slices(image_size, patch_size, scan_interval): '\n Enumerate all slices defining 2D/3D patches of size `patch_size` from an `image_size` input image.\n\n Args:\n image_size (tuple of int): dimensions of image to iterate over\n patch_size (tuple of int): size of patches to generat...
def dense_patch_slices(image_size, patch_size, scan_interval): '\n Enumerate all slices defining 2D/3D patches of size `patch_size` from an `image_size` input image.\n\n Args:\n image_size (tuple of int): dimensions of image to iterate over\n patch_size (tuple of int): size of patches to generat...
7144d827d1aee22abe2a85031b09ba701ab100076a0d3b9c4d217d6b2acd603a
def sliding_window_inference(inputs, roi_size, sw_batch_size, predictor): 'Use SlidingWindow method to execute inference.\n\n Args:\n inputs (torch Tensor): input image to be processed (assuming NCHW[D])\n roi_size (list, tuple): the window size to execute SlidingWindow inference.\n sw_batch...
Use SlidingWindow method to execute inference. Args: inputs (torch Tensor): input image to be processed (assuming NCHW[D]) roi_size (list, tuple): the window size to execute SlidingWindow inference. sw_batch_size (int): the batch size to run window slices. predictor (Callable): given input tensor `patc...
contrib/MedicalSeg/medicalseg/core/infer_window.py
sliding_window_inference
sun222/PaddleSeg
0
python
def sliding_window_inference(inputs, roi_size, sw_batch_size, predictor): 'Use SlidingWindow method to execute inference.\n\n Args:\n inputs (torch Tensor): input image to be processed (assuming NCHW[D])\n roi_size (list, tuple): the window size to execute SlidingWindow inference.\n sw_batch...
def sliding_window_inference(inputs, roi_size, sw_batch_size, predictor): 'Use SlidingWindow method to execute inference.\n\n Args:\n inputs (torch Tensor): input image to be processed (assuming NCHW[D])\n roi_size (list, tuple): the window size to execute SlidingWindow inference.\n sw_batch...
7e025e755bf09e59182db5285e8dcd4c7ba5544dc1fa06f4ca4800720b8f564e
def set_size_mode(self, mode: SizeConstraintStr): 'Set the size mode of the layout.\n\n Args:\n mode: size mode for the layout\n\n Raises:\n InvalidParamError: size mode does not exist\n ' if (mode not in SIZE_CONSTRAINT): raise InvalidParamError(mode, SIZE_CON...
Set the size mode of the layout. Args: mode: size mode for the layout Raises: InvalidParamError: size mode does not exist
prettyqt/widgets/layout.py
set_size_mode
phil65/PrettyQt
7
python
def set_size_mode(self, mode: SizeConstraintStr): 'Set the size mode of the layout.\n\n Args:\n mode: size mode for the layout\n\n Raises:\n InvalidParamError: size mode does not exist\n ' if (mode not in SIZE_CONSTRAINT): raise InvalidParamError(mode, SIZE_CON...
def set_size_mode(self, mode: SizeConstraintStr): 'Set the size mode of the layout.\n\n Args:\n mode: size mode for the layout\n\n Raises:\n InvalidParamError: size mode does not exist\n ' if (mode not in SIZE_CONSTRAINT): raise InvalidParamError(mode, SIZE_CON...
d31f9d69b1ba200b061aba15d47b93e2628490947fc78c44f2dec7b1995e0502
def get_size_mode(self) -> SizeConstraintStr: 'Return current size mode.\n\n Returns:\n size mode\n ' return SIZE_CONSTRAINT.inverse[self.sizeConstraint()]
Return current size mode. Returns: size mode
prettyqt/widgets/layout.py
get_size_mode
phil65/PrettyQt
7
python
def get_size_mode(self) -> SizeConstraintStr: 'Return current size mode.\n\n Returns:\n size mode\n ' return SIZE_CONSTRAINT.inverse[self.sizeConstraint()]
def get_size_mode(self) -> SizeConstraintStr: 'Return current size mode.\n\n Returns:\n size mode\n ' return SIZE_CONSTRAINT.inverse[self.sizeConstraint()]<|docstring|>Return current size mode. Returns: size mode<|endoftext|>
76b93e94c15326eaee0d22da5b39ba7b01a32c590f0f3e9c5cab99fb02edce28
def set_alignment(self, alignment: constants.AlignmentStr, item: ((QtWidgets.QWidget | QtWidgets.QLayout) | None)=None): 'Set the alignment for widget / layout to alignment.\n\n Returns true if w is found in this layout (not including child layouts).\n\n Args:\n alignment: alignment for the...
Set the alignment for widget / layout to alignment. Returns true if w is found in this layout (not including child layouts). Args: alignment: alignment for the layout item: set alignment for specific child only Raises: InvalidParamError: alignment does not exist
prettyqt/widgets/layout.py
set_alignment
phil65/PrettyQt
7
python
def set_alignment(self, alignment: constants.AlignmentStr, item: ((QtWidgets.QWidget | QtWidgets.QLayout) | None)=None): 'Set the alignment for widget / layout to alignment.\n\n Returns true if w is found in this layout (not including child layouts).\n\n Args:\n alignment: alignment for the...
def set_alignment(self, alignment: constants.AlignmentStr, item: ((QtWidgets.QWidget | QtWidgets.QLayout) | None)=None): 'Set the alignment for widget / layout to alignment.\n\n Returns true if w is found in this layout (not including child layouts).\n\n Args:\n alignment: alignment for the...
89e9670cad8dc02bfb002290bb9053ddff5d4be649e15ce5fce3e07d967054f5
def _zero_pad_1d(self, embedding: torch.FloatTensor): 'Pads a 1-D tensor with zeros to the right' batch_size = embedding.size(0) padding = torch.zeros(batch_size, (self.d - embedding.size((- 1))), device=self.device) return torch.cat([embedding, padding], dim=(- 1))
Pads a 1-D tensor with zeros to the right
learning/models/embedder.py
_zero_pad_1d
samlanka/oracle
2
python
def _zero_pad_1d(self, embedding: torch.FloatTensor): batch_size = embedding.size(0) padding = torch.zeros(batch_size, (self.d - embedding.size((- 1))), device=self.device) return torch.cat([embedding, padding], dim=(- 1))
def _zero_pad_1d(self, embedding: torch.FloatTensor): batch_size = embedding.size(0) padding = torch.zeros(batch_size, (self.d - embedding.size((- 1))), device=self.device) return torch.cat([embedding, padding], dim=(- 1))<|docstring|>Pads a 1-D tensor with zeros to the right<|endoftext|>
006f3ece1f13f59a721fd0ec62c3e5b736202eafdae8009ec827593e80379771
def build_sampler(cfg): 'Build sampler\n\n Args:\n cfg(mmcv.Config): Sample cfg\n\n Returns:\n obj: sampler\n ' return build(cfg, SAMPLER)
Build sampler Args: cfg(mmcv.Config): Sample cfg Returns: obj: sampler
davarocr/davarocr/davar_common/datasets/builder.py
build_sampler
CuteyThyme/MultiModal_IE
0
python
def build_sampler(cfg): 'Build sampler\n\n Args:\n cfg(mmcv.Config): Sample cfg\n\n Returns:\n obj: sampler\n ' return build(cfg, SAMPLER)
def build_sampler(cfg): 'Build sampler\n\n Args:\n cfg(mmcv.Config): Sample cfg\n\n Returns:\n obj: sampler\n ' return build(cfg, SAMPLER)<|docstring|>Build sampler Args: cfg(mmcv.Config): Sample cfg Returns: obj: sampler<|endoftext|>
fd4419092fbfc56643c93f0319762b023aaef718f56698a8b544a20fe807245e
def davar_build_dataloader(dataset, samples_per_gpu=1, workers_per_gpu=1, sampler_type=None, num_gpus=1, dist=True, shuffle=True, seed=None, **kwargs): '\n\n Args:\n dataset (Dataset): dataset\n samples_per_gpu (int): image numbers on each gpu\n workers_per_gpu (int): workers each gpu\n ...
Args: dataset (Dataset): dataset samples_per_gpu (int): image numbers on each gpu workers_per_gpu (int): workers each gpu sampler_type (optional | dict): sampler parameter num_gpus (int): numbers of gpu dist (boolean): whether to use distributed mode shuffle (boolean): whether to shuffle the...
davarocr/davarocr/davar_common/datasets/builder.py
davar_build_dataloader
CuteyThyme/MultiModal_IE
0
python
def davar_build_dataloader(dataset, samples_per_gpu=1, workers_per_gpu=1, sampler_type=None, num_gpus=1, dist=True, shuffle=True, seed=None, **kwargs): '\n\n Args:\n dataset (Dataset): dataset\n samples_per_gpu (int): image numbers on each gpu\n workers_per_gpu (int): workers each gpu\n ...
def davar_build_dataloader(dataset, samples_per_gpu=1, workers_per_gpu=1, sampler_type=None, num_gpus=1, dist=True, shuffle=True, seed=None, **kwargs): '\n\n Args:\n dataset (Dataset): dataset\n samples_per_gpu (int): image numbers on each gpu\n workers_per_gpu (int): workers each gpu\n ...
4a5b1a6d5b05cb3ad6eb1cdff19d8a03097bb74b681baf5b05f6efe59363088c
def _concat_dataset(cfg, default_args=None): '\n\n Args:\n cfg (cfg): model config file\n default_args (args): back parameter\n\n Returns:\n concat all the dataset in config file\n\n ' ann_files = cfg['ann_file'] img_prefixes = cfg.get('img_prefix', None) seg_prefixes = cfg...
Args: cfg (cfg): model config file default_args (args): back parameter Returns: concat all the dataset in config file
davarocr/davarocr/davar_common/datasets/builder.py
_concat_dataset
CuteyThyme/MultiModal_IE
0
python
def _concat_dataset(cfg, default_args=None): '\n\n Args:\n cfg (cfg): model config file\n default_args (args): back parameter\n\n Returns:\n concat all the dataset in config file\n\n ' ann_files = cfg['ann_file'] img_prefixes = cfg.get('img_prefix', None) seg_prefixes = cfg...
def _concat_dataset(cfg, default_args=None): '\n\n Args:\n cfg (cfg): model config file\n default_args (args): back parameter\n\n Returns:\n concat all the dataset in config file\n\n ' ann_files = cfg['ann_file'] img_prefixes = cfg.get('img_prefix', None) seg_prefixes = cfg...
b981a01aa03b2e936974b968e8fe503aeb172b77bc960319ddcc2c6ea5be4d44
def davar_build_dataset(cfg, default_args=None): '\n\n Args:\n cfg (cfg): model config file\n default_args (args): back parameter\n\n Returns:\n build the dataset for training\n\n ' from mmdet.datasets.dataset_wrappers import ConcatDataset, RepeatDataset, ClassBalancedDataset f...
Args: cfg (cfg): model config file default_args (args): back parameter Returns: build the dataset for training
davarocr/davarocr/davar_common/datasets/builder.py
davar_build_dataset
CuteyThyme/MultiModal_IE
0
python
def davar_build_dataset(cfg, default_args=None): '\n\n Args:\n cfg (cfg): model config file\n default_args (args): back parameter\n\n Returns:\n build the dataset for training\n\n ' from mmdet.datasets.dataset_wrappers import ConcatDataset, RepeatDataset, ClassBalancedDataset f...
def davar_build_dataset(cfg, default_args=None): '\n\n Args:\n cfg (cfg): model config file\n default_args (args): back parameter\n\n Returns:\n build the dataset for training\n\n ' from mmdet.datasets.dataset_wrappers import ConcatDataset, RepeatDataset, ClassBalancedDataset f...
32d53f789b9c7e0328bf9123df7abe572df61c5261d835ad7a192e5cbf800631
def parameter_align(cfg): ' pipeline parameter alignment\n Args:\n cfg (config): model pipeline config\n\n Returns:\n\n ' align_para = list() if isinstance(cfg['batch_ratios'], (float, int)): batch_ratios = [cfg['batch_ratios']] elif isinstance(cfg['batch_ratios'], (tuple, list))...
pipeline parameter alignment Args: cfg (config): model pipeline config Returns:
davarocr/davarocr/davar_common/datasets/builder.py
parameter_align
CuteyThyme/MultiModal_IE
0
python
def parameter_align(cfg): ' pipeline parameter alignment\n Args:\n cfg (config): model pipeline config\n\n Returns:\n\n ' align_para = list() if isinstance(cfg['batch_ratios'], (float, int)): batch_ratios = [cfg['batch_ratios']] elif isinstance(cfg['batch_ratios'], (tuple, list))...
def parameter_align(cfg): ' pipeline parameter alignment\n Args:\n cfg (config): model pipeline config\n\n Returns:\n\n ' align_para = list() if isinstance(cfg['batch_ratios'], (float, int)): batch_ratios = [cfg['batch_ratios']] elif isinstance(cfg['batch_ratios'], (tuple, list))...
ddf62bf1039713a8e8e0ed94e51404271c2a6307d7be3cbd818cc758af533d83
def Get_timestamp(): 'Return time & date at moment t' return time.asctime(time.localtime())
Return time & date at moment t
main.py
Get_timestamp
SlothKun/Shopopop_autonotif
0
python
def Get_timestamp(): return time.asctime(time.localtime())
def Get_timestamp(): return time.asctime(time.localtime())<|docstring|>Return time & date at moment t<|endoftext|>
e941bdb8e72797a4b22af411301444836679d7e23c30026ae19c121962301154
def Get_foregroundapp(device): 'Return the foreground app' return device.shell("dumpsys activity recents | grep 'Recent #0' | cut -d= -f2 | sed 's| .*||' | cut -d '/' -f1").strip()
Return the foreground app
main.py
Get_foregroundapp
SlothKun/Shopopop_autonotif
0
python
def Get_foregroundapp(device): return device.shell("dumpsys activity recents | grep 'Recent #0' | cut -d= -f2 | sed 's| .*||' | cut -d '/' -f1").strip()
def Get_foregroundapp(device): return device.shell("dumpsys activity recents | grep 'Recent #0' | cut -d= -f2 | sed 's| .*||' | cut -d '/' -f1").strip()<|docstring|>Return the foreground app<|endoftext|>
15360511ebbbb1716b9f496a4258e1206d1f3a1759204e0e59e00dd6089141cb
def Screen(device): 'Make a screenshot of the screen and save it on the computer' with open('phonescreen.png', 'wb') as fp: fp.write(device.screencap())
Make a screenshot of the screen and save it on the computer
main.py
Screen
SlothKun/Shopopop_autonotif
0
python
def Screen(device): with open('phonescreen.png', 'wb') as fp: fp.write(device.screencap())
def Screen(device): with open('phonescreen.png', 'wb') as fp: fp.write(device.screencap())<|docstring|>Make a screenshot of the screen and save it on the computer<|endoftext|>
328a62eef37f9554322215cec5229ff41735ada4723a7508669218f17af3d701
def Get_refreshcoordinates(): '\n Search the refresh button presence by checking the line at the 2/3 of the top menu\n ' try: img = Image.open('phonescreen.png') rgb_img = img.load() i = 1 pixelstart = rgb_img[(0, 0)] newpixel = rgb_img[(0, i)] while (pixels...
Search the refresh button presence by checking the line at the 2/3 of the top menu
main.py
Get_refreshcoordinates
SlothKun/Shopopop_autonotif
0
python
def Get_refreshcoordinates(): '\n \n ' try: img = Image.open('phonescreen.png') rgb_img = img.load() i = 1 pixelstart = rgb_img[(0, 0)] newpixel = rgb_img[(0, i)] while (pixelstart == newpixel): newpixel = rgb_img[(0, i)] i += 1 ...
def Get_refreshcoordinates(): '\n \n ' try: img = Image.open('phonescreen.png') rgb_img = img.load() i = 1 pixelstart = rgb_img[(0, 0)] newpixel = rgb_img[(0, i)] while (pixelstart == newpixel): newpixel = rgb_img[(0, i)] i += 1 ...
c7ccd9bb4e23fca3696d1cfc53eb29cff9033d4cdb973dcd86da90520f580091
def Get_checkdeliv(): "\n Check screen for the right pixel color corresponding to the delivery's button\n Start from the middle of the screen as the button will always be on the bottom of it\n " try: img = Image.open('phonescreen.png') rgb_img = img.load() x = int((img.size[0] /...
Check screen for the right pixel color corresponding to the delivery's button Start from the middle of the screen as the button will always be on the bottom of it
main.py
Get_checkdeliv
SlothKun/Shopopop_autonotif
0
python
def Get_checkdeliv(): "\n Check screen for the right pixel color corresponding to the delivery's button\n Start from the middle of the screen as the button will always be on the bottom of it\n " try: img = Image.open('phonescreen.png') rgb_img = img.load() x = int((img.size[0] /...
def Get_checkdeliv(): "\n Check screen for the right pixel color corresponding to the delivery's button\n Start from the middle of the screen as the button will always be on the bottom of it\n " try: img = Image.open('phonescreen.png') rgb_img = img.load() x = int((img.size[0] /...
da679392ce90c154c3aeacdd4265d55c55544d9bf329824fbdc83ff137fbde38
def transform(item_paths, output_dir, experiment_code, compresslevel=0): 'Read medable csv and writes gen3 json.' file_emitter = emitter('submitted_file', output_dir=output_dir) with open(item_paths[0], newline='') as csvfile: reader = csv.DictReader(csvfile) for row in reader: i...
Read medable csv and writes gen3 json.
transform/hop/file.py
transform
ohsu-comp-bio/gen3-etl
1
python
def transform(item_paths, output_dir, experiment_code, compresslevel=0): file_emitter = emitter('submitted_file', output_dir=output_dir) with open(item_paths[0], newline=) as csvfile: reader = csv.DictReader(csvfile) for row in reader: if exclude_row(row): contin...
def transform(item_paths, output_dir, experiment_code, compresslevel=0): file_emitter = emitter('submitted_file', output_dir=output_dir) with open(item_paths[0], newline=) as csvfile: reader = csv.DictReader(csvfile) for row in reader: if exclude_row(row): contin...
3dd748ea2b0044be6b00c4c6e6d74429d619a1415f7f8f4bf653af9aa72dd43a
def rest_get(self, suburi): 'REST GET' return self.rest_client.get(path=suburi)
REST GET
examples/Rest/_restobject.py
rest_get
HewlettPackard/python-ilorest-library-EOL
27
python
def rest_get(self, suburi): return self.rest_client.get(path=suburi)
def rest_get(self, suburi): return self.rest_client.get(path=suburi)<|docstring|>REST GET<|endoftext|>
5bfe3f968c9aaf84d432f13130c839602439a4501778d0530eacb0f60cc61ceb
def rest_patch(self, suburi, request_body, optionalpassword=None): 'REST PATCH' sys.stdout.write((((('PATCH ' + str(request_body)) + ' to ') + suburi) + '\n')) response = self.rest_client.patch(path=suburi, body=request_body, optionalpassword=optionalpassword) sys.stdout.write((('PATCH response = ' + st...
REST PATCH
examples/Rest/_restobject.py
rest_patch
HewlettPackard/python-ilorest-library-EOL
27
python
def rest_patch(self, suburi, request_body, optionalpassword=None): sys.stdout.write((((('PATCH ' + str(request_body)) + ' to ') + suburi) + '\n')) response = self.rest_client.patch(path=suburi, body=request_body, optionalpassword=optionalpassword) sys.stdout.write((('PATCH response = ' + str(response.s...
def rest_patch(self, suburi, request_body, optionalpassword=None): sys.stdout.write((((('PATCH ' + str(request_body)) + ' to ') + suburi) + '\n')) response = self.rest_client.patch(path=suburi, body=request_body, optionalpassword=optionalpassword) sys.stdout.write((('PATCH response = ' + str(response.s...
7a68f7be376f498d3d4235432eacc395b20bf2f206ae464b636cd04491967b18
def rest_put(self, suburi, request_body, optionalpassword=None): 'REST PUT' sys.stdout.write((((('PUT ' + str(request_body)) + ' to ') + suburi) + '\n')) response = self.rest_client.put(path=suburi, body=request_body, optionalpassword=optionalpassword) sys.stdout.write((('PUT response = ' + str(response...
REST PUT
examples/Rest/_restobject.py
rest_put
HewlettPackard/python-ilorest-library-EOL
27
python
def rest_put(self, suburi, request_body, optionalpassword=None): sys.stdout.write((((('PUT ' + str(request_body)) + ' to ') + suburi) + '\n')) response = self.rest_client.put(path=suburi, body=request_body, optionalpassword=optionalpassword) sys.stdout.write((('PUT response = ' + str(response.status)) ...
def rest_put(self, suburi, request_body, optionalpassword=None): sys.stdout.write((((('PUT ' + str(request_body)) + ' to ') + suburi) + '\n')) response = self.rest_client.put(path=suburi, body=request_body, optionalpassword=optionalpassword) sys.stdout.write((('PUT response = ' + str(response.status)) ...
c141d8a3bcd15483e631e50bc90e9532f59d9e3e6f42eaa70d94d46c5b3acd6a
def rest_post(self, suburi, request_body): 'REST POST' sys.stdout.write((((('POST ' + str(request_body)) + ' to ') + suburi) + '\n')) response = self.rest_client.post(path=suburi, body=request_body) sys.stdout.write((('POST response = ' + str(response.status)) + '\n')) return response
REST POST
examples/Rest/_restobject.py
rest_post
HewlettPackard/python-ilorest-library-EOL
27
python
def rest_post(self, suburi, request_body): sys.stdout.write((((('POST ' + str(request_body)) + ' to ') + suburi) + '\n')) response = self.rest_client.post(path=suburi, body=request_body) sys.stdout.write((('POST response = ' + str(response.status)) + '\n')) return response
def rest_post(self, suburi, request_body): sys.stdout.write((((('POST ' + str(request_body)) + ' to ') + suburi) + '\n')) response = self.rest_client.post(path=suburi, body=request_body) sys.stdout.write((('POST response = ' + str(response.status)) + '\n')) return response<|docstring|>REST POST<|en...
c697c89ec1ea15a0b2f318990d61a9599a90f72194aa0ca92cc64abd27602251
def rest_delete(self, suburi): 'REST DELETE' sys.stdout.write((('DELETE ' + suburi) + '\n')) response = self.rest_client.delete(path=suburi) sys.stdout.write((('DELETE response = ' + str(response.status)) + '\n')) return response
REST DELETE
examples/Rest/_restobject.py
rest_delete
HewlettPackard/python-ilorest-library-EOL
27
python
def rest_delete(self, suburi): sys.stdout.write((('DELETE ' + suburi) + '\n')) response = self.rest_client.delete(path=suburi) sys.stdout.write((('DELETE response = ' + str(response.status)) + '\n')) return response
def rest_delete(self, suburi): sys.stdout.write((('DELETE ' + suburi) + '\n')) response = self.rest_client.delete(path=suburi) sys.stdout.write((('DELETE response = ' + str(response.status)) + '\n')) return response<|docstring|>REST DELETE<|endoftext|>
d7752b9671eab837061798b193d2517d0d8305ad6456f3c2f6297af370bb188d
def __hash__(self): '\n Return hash(self).\n ' return None
Return hash(self).
nuke_stubs/nuke/nuke_classes/ToolBar.py
__hash__
sisoe24/Nuke-Python-Stubs
1
python
def __hash__(self): '\n \n ' return None
def __hash__(self): '\n \n ' return None<|docstring|>Return hash(self).<|endoftext|>
cf416fac323b173d338cb8363e1aababbccc3f14968a8783bd9f08cc63ba7b0f
def __new__(self, *args, **kwargs): '\n Create and return a new object. See help(type) for accurate signature.\n ' return None
Create and return a new object. See help(type) for accurate signature.
nuke_stubs/nuke/nuke_classes/ToolBar.py
__new__
sisoe24/Nuke-Python-Stubs
1
python
def __new__(self, *args, **kwargs): '\n \n ' return None
def __new__(self, *args, **kwargs): '\n \n ' return None<|docstring|>Create and return a new object. See help(type) for accurate signature.<|endoftext|>
1d41eb0ac8fb88bfc9e6fd9bd9fb644ca69dadfd2bd3871effb9f205a2c2f4f6
def addCommand(self, name: str, command: str=None, shortcut: str=None, icon: str=None, tooltip: str=None, index: Number=None, readonly: bool=None): '\n self.addCommand(name, command, shortcut, icon, tooltip, index, readonly) -> The menu/toolbar item that was added to hold the command.\n Add a new comm...
self.addCommand(name, command, shortcut, icon, tooltip, index, readonly) -> The menu/toolbar item that was added to hold the command. Add a new command to this menu/toolbar. Note that when invoked, the command is automatically enclosed in an undo group, so that undo/redo functionality works. Optional arguments can be s...
nuke_stubs/nuke/nuke_classes/ToolBar.py
addCommand
sisoe24/Nuke-Python-Stubs
1
python
def addCommand(self, name: str, command: str=None, shortcut: str=None, icon: str=None, tooltip: str=None, index: Number=None, readonly: bool=None): '\n self.addCommand(name, command, shortcut, icon, tooltip, index, readonly) -> The menu/toolbar item that was added to hold the command.\n Add a new comm...
def addCommand(self, name: str, command: str=None, shortcut: str=None, icon: str=None, tooltip: str=None, index: Number=None, readonly: bool=None): '\n self.addCommand(name, command, shortcut, icon, tooltip, index, readonly) -> The menu/toolbar item that was added to hold the command.\n Add a new comm...
69f9ce1b7b78d984ed8897544b839b603498b6a89d9cd5507ca53516965ea008
def addMenu(self, **kwargs): '\n self.addMenu(**kwargs) -> The submenu that was added.\n Add a new submenu.\n @param **kwargs The following keyword arguments are accepted:\n name The name for the menu/toolbar item\n icon An icon for the me...
self.addMenu(**kwargs) -> The submenu that was added. Add a new submenu. @param **kwargs The following keyword arguments are accepted: name The name for the menu/toolbar item icon An icon for the menu. Loaded from the nuke search path. tooltip The tooltip text...
nuke_stubs/nuke/nuke_classes/ToolBar.py
addMenu
sisoe24/Nuke-Python-Stubs
1
python
def addMenu(self, **kwargs): '\n self.addMenu(**kwargs) -> The submenu that was added.\n Add a new submenu.\n @param **kwargs The following keyword arguments are accepted:\n name The name for the menu/toolbar item\n icon An icon for the me...
def addMenu(self, **kwargs): '\n self.addMenu(**kwargs) -> The submenu that was added.\n Add a new submenu.\n @param **kwargs The following keyword arguments are accepted:\n name The name for the menu/toolbar item\n icon An icon for the me...
fcc607853e3865a3f7ecfcd2ff72c6f3ddf62b470c223e8cf267d2e06ebe68f6
def clearMenu(self): '\n self.clearMenu() \n Clears a menu.\n @param **kwargs The following keyword arguments are accepted:\n name The name for the menu/toolbar item\n @return: true if cleared, false if menu not found \n ' return bool()
self.clearMenu() Clears a menu. @param **kwargs The following keyword arguments are accepted: name The name for the menu/toolbar item @return: true if cleared, false if menu not found
nuke_stubs/nuke/nuke_classes/ToolBar.py
clearMenu
sisoe24/Nuke-Python-Stubs
1
python
def clearMenu(self): '\n self.clearMenu() \n Clears a menu.\n @param **kwargs The following keyword arguments are accepted:\n name The name for the menu/toolbar item\n @return: true if cleared, false if menu not found \n ' return bool()
def clearMenu(self): '\n self.clearMenu() \n Clears a menu.\n @param **kwargs The following keyword arguments are accepted:\n name The name for the menu/toolbar item\n @return: true if cleared, false if menu not found \n ' return bool()<|docstring|>...
df111cc113c04d5cb5ae664f22064c81b3e9b8c9747516f7dd7a9e3fb561b067
def addSeparator(self, **kwargs): '\n self.addSeparator(**kwargs) -> The separator that was created.\n Add a separator to this menu/toolbar.\n @param **kwargs The following keyword arguments are accepted:\n index The position to insert the new separator in, in the menu/toolbar.\n ...
self.addSeparator(**kwargs) -> The separator that was created. Add a separator to this menu/toolbar. @param **kwargs The following keyword arguments are accepted: index The position to insert the new separator in, in the menu/toolbar. @return: The separator that was created.
nuke_stubs/nuke/nuke_classes/ToolBar.py
addSeparator
sisoe24/Nuke-Python-Stubs
1
python
def addSeparator(self, **kwargs): '\n self.addSeparator(**kwargs) -> The separator that was created.\n Add a separator to this menu/toolbar.\n @param **kwargs The following keyword arguments are accepted:\n index The position to insert the new separator in, in the menu/toolbar.\n ...
def addSeparator(self, **kwargs): '\n self.addSeparator(**kwargs) -> The separator that was created.\n Add a separator to this menu/toolbar.\n @param **kwargs The following keyword arguments are accepted:\n index The position to insert the new separator in, in the menu/toolbar.\n ...