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
cfc2436b02bdd2f072445ee72fc0feeeb27c5bc6d29f606946ee74e4ebd7cc42
def GetDelegateKeyByValidator(self, request, context): 'Missing associated documentation comment in .proto file.' context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
Missing associated documentation comment in .proto file.
pyinjective/proto/injective/peggy/v1/query_pb2_grpc.py
GetDelegateKeyByValidator
CtheSky/sdk-python
10
python
def GetDelegateKeyByValidator(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
def GetDelegateKeyByValidator(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')<|docstring|>Missing associated documentation comment in .proto file.<|endoftext|>
e0ed6935a13e7a9c1ca53030dffc4f0c923358cf8cdc917a0e79482ce1f0b25b
def GetDelegateKeyByEth(self, request, context): 'Missing associated documentation comment in .proto file.' context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
Missing associated documentation comment in .proto file.
pyinjective/proto/injective/peggy/v1/query_pb2_grpc.py
GetDelegateKeyByEth
CtheSky/sdk-python
10
python
def GetDelegateKeyByEth(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
def GetDelegateKeyByEth(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')<|docstring|>Missing associated documentation comment in .proto file.<|endoftext|>
8ab6f3fe14c650dbc572a469aa94efbd56cc1a630d46c517567e43aa7bf347d6
def GetDelegateKeyByOrchestrator(self, request, context): 'Missing associated documentation comment in .proto file.' context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
Missing associated documentation comment in .proto file.
pyinjective/proto/injective/peggy/v1/query_pb2_grpc.py
GetDelegateKeyByOrchestrator
CtheSky/sdk-python
10
python
def GetDelegateKeyByOrchestrator(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
def GetDelegateKeyByOrchestrator(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')<|docstring|>Missing associated documentation comment in .proto file.<|endoftext|>
5b7fca8171782e39d9eb82f5eac101eb4cf63d8fc5801b11f739318fc6a91c45
def PeggyModuleState(self, request, context): "Retrieves the entire peggy module's state\n " context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
Retrieves the entire peggy module's state
pyinjective/proto/injective/peggy/v1/query_pb2_grpc.py
PeggyModuleState
CtheSky/sdk-python
10
python
def PeggyModuleState(self, request, context): "\n " context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
def PeggyModuleState(self, request, context): "\n " context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')<|docstring|>Retrieves the entire peggy module's state<|endoftext|>
fe91de6aa905fbb61f1eee8cc7c0f0463cb9ede2574d6498264577068c34a1a7
def soft_to_hard_permutation(inputs): 'Returns permutation matrices by solving a matching problem.\n\n Solves linear sum assignment to convert doubly-stochastic matrices to\n permutation matrices. It uses scipy.optimize.linear_sum_assignment to solve\n the optimization problem max_P sum_i,j M_i,j P_i,j with P a ...
Returns permutation matrices by solving a matching problem. Solves linear sum assignment to convert doubly-stochastic matrices to permutation matrices. It uses scipy.optimize.linear_sum_assignment to solve the optimization problem max_P sum_i,j M_i,j P_i,j with P a permutation matrix. Notice the negative sign; the rea...
tensor2tensor/layers/reversible_layers.py
soft_to_hard_permutation
ekuznetsov139/tensor2tensor
34
python
def soft_to_hard_permutation(inputs): 'Returns permutation matrices by solving a matching problem.\n\n Solves linear sum assignment to convert doubly-stochastic matrices to\n permutation matrices. It uses scipy.optimize.linear_sum_assignment to solve\n the optimization problem max_P sum_i,j M_i,j P_i,j with P a ...
def soft_to_hard_permutation(inputs): 'Returns permutation matrices by solving a matching problem.\n\n Solves linear sum assignment to convert doubly-stochastic matrices to\n permutation matrices. It uses scipy.optimize.linear_sum_assignment to solve\n the optimization problem max_P sum_i,j M_i,j P_i,j with P a ...
702632db5cd8b9939e3df496497870dd78116e8b1c55e182ccfd1378032ba077
def one_hot_argmax(inputs, temperature, axis=(- 1)): 'Returns one-hot of argmax with backward pass set to softmax-temperature.' vocab_size = inputs.shape[(- 1)] hard = tf.one_hot(tf.argmax(inputs, axis=axis), depth=vocab_size, axis=axis, dtype=inputs.dtype) soft = tf.nn.softmax((inputs / temperature), a...
Returns one-hot of argmax with backward pass set to softmax-temperature.
tensor2tensor/layers/reversible_layers.py
one_hot_argmax
ekuznetsov139/tensor2tensor
34
python
def one_hot_argmax(inputs, temperature, axis=(- 1)): vocab_size = inputs.shape[(- 1)] hard = tf.one_hot(tf.argmax(inputs, axis=axis), depth=vocab_size, axis=axis, dtype=inputs.dtype) soft = tf.nn.softmax((inputs / temperature), axis=axis) outputs = (soft + tf.stop_gradient((hard - soft))) retur...
def one_hot_argmax(inputs, temperature, axis=(- 1)): vocab_size = inputs.shape[(- 1)] hard = tf.one_hot(tf.argmax(inputs, axis=axis), depth=vocab_size, axis=axis, dtype=inputs.dtype) soft = tf.nn.softmax((inputs / temperature), axis=axis) outputs = (soft + tf.stop_gradient((hard - soft))) retur...
8f67c178211114d69b3830915e7ba1759587fa2367c4b88529c65dc917fb117e
def one_hot_add(inputs, shift): 'Performs (inputs + shift) % vocab_size in the one-hot space.\n\n Args:\n inputs: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor.\n shift: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor specifying how much to ...
Performs (inputs + shift) % vocab_size in the one-hot space. Args: inputs: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot Tensor. shift: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot Tensor specifying how much to shift the corresponding one-hot vector in inputs....
tensor2tensor/layers/reversible_layers.py
one_hot_add
ekuznetsov139/tensor2tensor
34
python
def one_hot_add(inputs, shift): 'Performs (inputs + shift) % vocab_size in the one-hot space.\n\n Args:\n inputs: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor.\n shift: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor specifying how much to ...
def one_hot_add(inputs, shift): 'Performs (inputs + shift) % vocab_size in the one-hot space.\n\n Args:\n inputs: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor.\n shift: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor specifying how much to ...
64cb9955e04883123070b53db3ab21504b656eae6153b25f1a465359ee281f9e
def one_hot_minus(inputs, shift): 'Performs (inputs - shift) % vocab_size in the one-hot space.\n\n Args:\n inputs: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor.\n shift: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor specifying how much t...
Performs (inputs - shift) % vocab_size in the one-hot space. Args: inputs: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot Tensor. shift: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot Tensor specifying how much to shift the corresponding one-hot vector in inputs....
tensor2tensor/layers/reversible_layers.py
one_hot_minus
ekuznetsov139/tensor2tensor
34
python
def one_hot_minus(inputs, shift): 'Performs (inputs - shift) % vocab_size in the one-hot space.\n\n Args:\n inputs: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor.\n shift: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor specifying how much t...
def one_hot_minus(inputs, shift): 'Performs (inputs - shift) % vocab_size in the one-hot space.\n\n Args:\n inputs: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor.\n shift: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor specifying how much t...
8632db3d36f1ae5000fec3e1af51ca457c38525599b48ad9edfbbe5a46733fd5
def one_hot_multiply(inputs, scale): 'Performs (inputs * scale) % vocab_size in the one-hot space.\n\n Args:\n inputs: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor.\n scale: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor specifying how muc...
Performs (inputs * scale) % vocab_size in the one-hot space. Args: inputs: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot Tensor. scale: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot Tensor specifying how much to scale the corresponding one-hot vector in inputs....
tensor2tensor/layers/reversible_layers.py
one_hot_multiply
ekuznetsov139/tensor2tensor
34
python
def one_hot_multiply(inputs, scale): 'Performs (inputs * scale) % vocab_size in the one-hot space.\n\n Args:\n inputs: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor.\n scale: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor specifying how muc...
def one_hot_multiply(inputs, scale): 'Performs (inputs * scale) % vocab_size in the one-hot space.\n\n Args:\n inputs: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor.\n scale: Tensor of shape `[..., vocab_size]`. Typically a soft/hard one-hot\n Tensor specifying how muc...
aaaeccc39bd9b7d15b9262225fd5a4948104811d7fccd1f84588bd83dc63277a
def py_multiplicative_inverse(a, n): 'Multiplicative inverse of a modulo n (in Python).\n\n Implements extended Euclidean algorithm.\n\n Args:\n a: int-like np.ndarray.\n n: int.\n\n Returns:\n Multiplicative inverse as an int32 np.ndarray with same shape as a.\n ' batched_a = np.asarray(a, dtype=n...
Multiplicative inverse of a modulo n (in Python). Implements extended Euclidean algorithm. Args: a: int-like np.ndarray. n: int. Returns: Multiplicative inverse as an int32 np.ndarray with same shape as a.
tensor2tensor/layers/reversible_layers.py
py_multiplicative_inverse
ekuznetsov139/tensor2tensor
34
python
def py_multiplicative_inverse(a, n): 'Multiplicative inverse of a modulo n (in Python).\n\n Implements extended Euclidean algorithm.\n\n Args:\n a: int-like np.ndarray.\n n: int.\n\n Returns:\n Multiplicative inverse as an int32 np.ndarray with same shape as a.\n ' batched_a = np.asarray(a, dtype=n...
def py_multiplicative_inverse(a, n): 'Multiplicative inverse of a modulo n (in Python).\n\n Implements extended Euclidean algorithm.\n\n Args:\n a: int-like np.ndarray.\n n: int.\n\n Returns:\n Multiplicative inverse as an int32 np.ndarray with same shape as a.\n ' batched_a = np.asarray(a, dtype=n...
694919ee64ec0b1f6072e15bfb4dc83be4747064ffa2567fa9c29edae4c3b330
def multiplicative_inverse(a, n): 'Multiplicative inverse of a modulo n.\n\n Args:\n a: Tensor of shape [..., vocab_size]. It denotes an integer in the one-hot\n space.\n n: int Tensor of shape [...].\n\n Returns:\n Tensor of same shape and dtype as a.\n ' a = tf.convert_to_tensor(a) n = tf...
Multiplicative inverse of a modulo n. Args: a: Tensor of shape [..., vocab_size]. It denotes an integer in the one-hot space. n: int Tensor of shape [...]. Returns: Tensor of same shape and dtype as a.
tensor2tensor/layers/reversible_layers.py
multiplicative_inverse
ekuznetsov139/tensor2tensor
34
python
def multiplicative_inverse(a, n): 'Multiplicative inverse of a modulo n.\n\n Args:\n a: Tensor of shape [..., vocab_size]. It denotes an integer in the one-hot\n space.\n n: int Tensor of shape [...].\n\n Returns:\n Tensor of same shape and dtype as a.\n ' a = tf.convert_to_tensor(a) n = tf...
def multiplicative_inverse(a, n): 'Multiplicative inverse of a modulo n.\n\n Args:\n a: Tensor of shape [..., vocab_size]. It denotes an integer in the one-hot\n space.\n n: int Tensor of shape [...].\n\n Returns:\n Tensor of same shape and dtype as a.\n ' a = tf.convert_to_tensor(a) n = tf...
4f7c06862e75a6f4891cfd777729b123cfa300537cd6a1c9ce19712e56a7df61
def create_degrees(input_dim, hidden_dims, input_order='left-to-right', hidden_order='left-to-right'): "Returns a list of degree vectors, one for each input and hidden layer.\n\n A unit with degree d can only receive input from units with degree < d. Output\n units always have the same degree as their associated ...
Returns a list of degree vectors, one for each input and hidden layer. A unit with degree d can only receive input from units with degree < d. Output units always have the same degree as their associated input unit. Args: input_dim: Number of inputs. hidden_dims: list with the number of hidden units per layer. It...
tensor2tensor/layers/reversible_layers.py
create_degrees
ekuznetsov139/tensor2tensor
34
python
def create_degrees(input_dim, hidden_dims, input_order='left-to-right', hidden_order='left-to-right'): "Returns a list of degree vectors, one for each input and hidden layer.\n\n A unit with degree d can only receive input from units with degree < d. Output\n units always have the same degree as their associated ...
def create_degrees(input_dim, hidden_dims, input_order='left-to-right', hidden_order='left-to-right'): "Returns a list of degree vectors, one for each input and hidden layer.\n\n A unit with degree d can only receive input from units with degree < d. Output\n units always have the same degree as their associated ...
4086085419d0b0671f3335fc62cee345ce97bdd6088a8049b63e201c02b26638
def create_masks(input_dim, hidden_dims, input_order='left-to-right', hidden_order='left-to-right'): "Returns a list of binary mask matrices respecting autoregressive ordering.\n\n Args:\n input_dim: Number of inputs.\n hidden_dims: list with the number of hidden units per layer. It does not\n include t...
Returns a list of binary mask matrices respecting autoregressive ordering. Args: input_dim: Number of inputs. hidden_dims: list with the number of hidden units per layer. It does not include the output layer; those number of units will always be set to input_dim downstream. Each hidden unit size must be at...
tensor2tensor/layers/reversible_layers.py
create_masks
ekuznetsov139/tensor2tensor
34
python
def create_masks(input_dim, hidden_dims, input_order='left-to-right', hidden_order='left-to-right'): "Returns a list of binary mask matrices respecting autoregressive ordering.\n\n Args:\n input_dim: Number of inputs.\n hidden_dims: list with the number of hidden units per layer. It does not\n include t...
def create_masks(input_dim, hidden_dims, input_order='left-to-right', hidden_order='left-to-right'): "Returns a list of binary mask matrices respecting autoregressive ordering.\n\n Args:\n input_dim: Number of inputs.\n hidden_dims: list with the number of hidden units per layer. It does not\n include t...
fa7c7b7e6bf7283c548717c9e7bba98d72d6f81a02338c5fe02b9d7836e6a4ac
def sinkhorn(inputs, n_iters=20): 'Performs incomplete Sinkhorn normalization to inputs.\n\n By a theorem by Sinkhorn and Knopp [1], a sufficiently well-behaved matrix\n with positive entries can be turned into a doubly-stochastic matrix\n (i.e. its rows and columns add up to one) via the succesive row and colu...
Performs incomplete Sinkhorn normalization to inputs. By a theorem by Sinkhorn and Knopp [1], a sufficiently well-behaved matrix with positive entries can be turned into a doubly-stochastic matrix (i.e. its rows and columns add up to one) via the succesive row and column normalization. -To ensure positivity, the effe...
tensor2tensor/layers/reversible_layers.py
sinkhorn
ekuznetsov139/tensor2tensor
34
python
def sinkhorn(inputs, n_iters=20): 'Performs incomplete Sinkhorn normalization to inputs.\n\n By a theorem by Sinkhorn and Knopp [1], a sufficiently well-behaved matrix\n with positive entries can be turned into a doubly-stochastic matrix\n (i.e. its rows and columns add up to one) via the succesive row and colu...
def sinkhorn(inputs, n_iters=20): 'Performs incomplete Sinkhorn normalization to inputs.\n\n By a theorem by Sinkhorn and Knopp [1], a sufficiently well-behaved matrix\n with positive entries can be turned into a doubly-stochastic matrix\n (i.e. its rows and columns add up to one) via the succesive row and colu...
fd1449bd89b5577880d1195d43e44df7a046bf965ea9872bcdcbe047d246935a
@ed.interceptable def TransformedRandomVariable(random_variable, reversible_layer, name=None, sample_shape=(), value=None): 'Random variable for f(x), where x ~ p(x) and f is reversible.' return ed.RandomVariable(distribution=TransformedDistribution(random_variable.distribution, reversible_layer, name=name), sa...
Random variable for f(x), where x ~ p(x) and f is reversible.
tensor2tensor/layers/reversible_layers.py
TransformedRandomVariable
ekuznetsov139/tensor2tensor
34
python
@ed.interceptable def TransformedRandomVariable(random_variable, reversible_layer, name=None, sample_shape=(), value=None): return ed.RandomVariable(distribution=TransformedDistribution(random_variable.distribution, reversible_layer, name=name), sample_shape=sample_shape, value=value)
@ed.interceptable def TransformedRandomVariable(random_variable, reversible_layer, name=None, sample_shape=(), value=None): return ed.RandomVariable(distribution=TransformedDistribution(random_variable.distribution, reversible_layer, name=name), sample_shape=sample_shape, value=value)<|docstring|>Random variab...
e7851fcafb6eebcc67dd98a7b44a114eb3967f7d7543ecb430bbf16ee9c3b012
def __init__(self, layer, temperature, **kwargs): 'Constructs flow.\n\n Args:\n layer: Two-headed masked network taking the inputs and returning a\n real-valued Tensor of shape `[..., length, 2*vocab_size]`.\n Alternatively, `layer` may return a Tensor of shape\n `[..., length, vocab_si...
Constructs flow. Args: layer: Two-headed masked network taking the inputs and returning a real-valued Tensor of shape `[..., length, 2*vocab_size]`. Alternatively, `layer` may return a Tensor of shape `[..., length, vocab_size]` to be used as the location transform; the scale transform will be hard-c...
tensor2tensor/layers/reversible_layers.py
__init__
ekuznetsov139/tensor2tensor
34
python
def __init__(self, layer, temperature, **kwargs): 'Constructs flow.\n\n Args:\n layer: Two-headed masked network taking the inputs and returning a\n real-valued Tensor of shape `[..., length, 2*vocab_size]`.\n Alternatively, `layer` may return a Tensor of shape\n `[..., length, vocab_si...
def __init__(self, layer, temperature, **kwargs): 'Constructs flow.\n\n Args:\n layer: Two-headed masked network taking the inputs and returning a\n real-valued Tensor of shape `[..., length, 2*vocab_size]`.\n Alternatively, `layer` may return a Tensor of shape\n `[..., length, vocab_si...
f71cfe696cf2862b3b9cdcc9e9edcb110f0ca21f1d011a03abe4a7dfd3f814f9
def call(self, inputs, **kwargs): 'Forward pass for left-to-right autoregressive generation.' inputs = tf.convert_to_tensor(inputs) length = inputs.shape[(- 2)].value if (length is None): raise NotImplementedError('length dimension must be known.') outputs = self._initial_call(inputs[(..., 0...
Forward pass for left-to-right autoregressive generation.
tensor2tensor/layers/reversible_layers.py
call
ekuznetsov139/tensor2tensor
34
python
def call(self, inputs, **kwargs): inputs = tf.convert_to_tensor(inputs) length = inputs.shape[(- 2)].value if (length is None): raise NotImplementedError('length dimension must be known.') outputs = self._initial_call(inputs[(..., 0, :)], length, **kwargs) for t in range(1, length): ...
def call(self, inputs, **kwargs): inputs = tf.convert_to_tensor(inputs) length = inputs.shape[(- 2)].value if (length is None): raise NotImplementedError('length dimension must be known.') outputs = self._initial_call(inputs[(..., 0, :)], length, **kwargs) for t in range(1, length): ...
1721f7524a0acf0c33d2424ed8250f3f9836bd07cddcbd8cf2e357ed6721b1dd
def _initial_call(self, new_inputs, length, **kwargs): 'Returns Tensor of shape [..., 1, vocab_size].\n\n Args:\n new_inputs: Tensor of shape [..., vocab_size], the new input to generate\n its output.\n length: Length of final desired sequence.\n **kwargs: Optional keyword arguments to laye...
Returns Tensor of shape [..., 1, vocab_size]. Args: new_inputs: Tensor of shape [..., vocab_size], the new input to generate its output. length: Length of final desired sequence. **kwargs: Optional keyword arguments to layer.
tensor2tensor/layers/reversible_layers.py
_initial_call
ekuznetsov139/tensor2tensor
34
python
def _initial_call(self, new_inputs, length, **kwargs): 'Returns Tensor of shape [..., 1, vocab_size].\n\n Args:\n new_inputs: Tensor of shape [..., vocab_size], the new input to generate\n its output.\n length: Length of final desired sequence.\n **kwargs: Optional keyword arguments to laye...
def _initial_call(self, new_inputs, length, **kwargs): 'Returns Tensor of shape [..., 1, vocab_size].\n\n Args:\n new_inputs: Tensor of shape [..., vocab_size], the new input to generate\n its output.\n length: Length of final desired sequence.\n **kwargs: Optional keyword arguments to laye...
0da26e7536ca7922cb05f26767ba321f3982e50276f1f1af96b673794e9a497a
def _per_timestep_call(self, current_outputs, new_inputs, length, timestep, **kwargs): 'Returns Tensor of shape [..., timestep+1, vocab_size].\n\n Args:\n current_outputs: Tensor of shape [..., timestep, vocab_size], the so-far\n generated sequence Tensor.\n new_inputs: Tensor of shape [..., voc...
Returns Tensor of shape [..., timestep+1, vocab_size]. Args: current_outputs: Tensor of shape [..., timestep, vocab_size], the so-far generated sequence Tensor. new_inputs: Tensor of shape [..., vocab_size], the new input to generate its output given current_outputs. length: Length of final desired seque...
tensor2tensor/layers/reversible_layers.py
_per_timestep_call
ekuznetsov139/tensor2tensor
34
python
def _per_timestep_call(self, current_outputs, new_inputs, length, timestep, **kwargs): 'Returns Tensor of shape [..., timestep+1, vocab_size].\n\n Args:\n current_outputs: Tensor of shape [..., timestep, vocab_size], the so-far\n generated sequence Tensor.\n new_inputs: Tensor of shape [..., voc...
def _per_timestep_call(self, current_outputs, new_inputs, length, timestep, **kwargs): 'Returns Tensor of shape [..., timestep+1, vocab_size].\n\n Args:\n current_outputs: Tensor of shape [..., timestep, vocab_size], the so-far\n generated sequence Tensor.\n new_inputs: Tensor of shape [..., voc...
f297fc2513fe378005f560dcf0bbdde88d2e375142f906125c677317dcefff29
def reverse(self, inputs, **kwargs): 'Reverse pass returning the inverse autoregressive transformation.' if (not self.built): self._maybe_build(inputs) net = self.layer(inputs, **kwargs) if (net.shape[(- 1)] == (2 * self.vocab_size)): (loc, scale) = tf.split(net, 2, axis=(- 1)) s...
Reverse pass returning the inverse autoregressive transformation.
tensor2tensor/layers/reversible_layers.py
reverse
ekuznetsov139/tensor2tensor
34
python
def reverse(self, inputs, **kwargs): if (not self.built): self._maybe_build(inputs) net = self.layer(inputs, **kwargs) if (net.shape[(- 1)] == (2 * self.vocab_size)): (loc, scale) = tf.split(net, 2, axis=(- 1)) scale = tf.cast(one_hot_argmax(scale, self.temperature), inputs.dtyp...
def reverse(self, inputs, **kwargs): if (not self.built): self._maybe_build(inputs) net = self.layer(inputs, **kwargs) if (net.shape[(- 1)] == (2 * self.vocab_size)): (loc, scale) = tf.split(net, 2, axis=(- 1)) scale = tf.cast(one_hot_argmax(scale, self.temperature), inputs.dtyp...
7660a621b23610fe3d6b0f79bc852ab3eb84e22745232b6296622d13fbe9cfd0
def __init__(self, layer, mask, temperature, **kwargs): 'Constructs flow.\n\n Args:\n layer: Two-headed masked network taking the inputs and returning a\n real-valued Tensor of shape `[..., length, 2*vocab_size]`.\n Alternatively, `layer` may return a Tensor of shape\n `[..., length, vo...
Constructs flow. Args: layer: Two-headed masked network taking the inputs and returning a real-valued Tensor of shape `[..., length, 2*vocab_size]`. Alternatively, `layer` may return a Tensor of shape `[..., length, vocab_size]` to be used as the location transform; the scale transform will be hard-c...
tensor2tensor/layers/reversible_layers.py
__init__
ekuznetsov139/tensor2tensor
34
python
def __init__(self, layer, mask, temperature, **kwargs): 'Constructs flow.\n\n Args:\n layer: Two-headed masked network taking the inputs and returning a\n real-valued Tensor of shape `[..., length, 2*vocab_size]`.\n Alternatively, `layer` may return a Tensor of shape\n `[..., length, vo...
def __init__(self, layer, mask, temperature, **kwargs): 'Constructs flow.\n\n Args:\n layer: Two-headed masked network taking the inputs and returning a\n real-valued Tensor of shape `[..., length, 2*vocab_size]`.\n Alternatively, `layer` may return a Tensor of shape\n `[..., length, vo...
a6fd67a6f6cf6b12877b5c21912a3863a00eb43f544e5a01e7fad60e87118a6e
def call(self, inputs, **kwargs): 'Forward pass for bipartite generation.' inputs = tf.convert_to_tensor(inputs) batch_ndims = (inputs.shape.ndims - 2) mask = tf.reshape(tf.cast(self.mask, inputs.dtype), (([1] * batch_ndims) + [(- 1), 1])) masked_inputs = (mask * inputs) net = self.layer(masked_...
Forward pass for bipartite generation.
tensor2tensor/layers/reversible_layers.py
call
ekuznetsov139/tensor2tensor
34
python
def call(self, inputs, **kwargs): inputs = tf.convert_to_tensor(inputs) batch_ndims = (inputs.shape.ndims - 2) mask = tf.reshape(tf.cast(self.mask, inputs.dtype), (([1] * batch_ndims) + [(- 1), 1])) masked_inputs = (mask * inputs) net = self.layer(masked_inputs, **kwargs) if (net.shape[(- 1...
def call(self, inputs, **kwargs): inputs = tf.convert_to_tensor(inputs) batch_ndims = (inputs.shape.ndims - 2) mask = tf.reshape(tf.cast(self.mask, inputs.dtype), (([1] * batch_ndims) + [(- 1), 1])) masked_inputs = (mask * inputs) net = self.layer(masked_inputs, **kwargs) if (net.shape[(- 1...
a8b957d5a91288fc1a39e051d879fbcbd4efd6a1a0d201a71ae4d5492c077515
def reverse(self, inputs, **kwargs): 'Reverse pass for the inverse bipartite transformation.' if (not self.built): self._maybe_build(inputs) inputs = tf.convert_to_tensor(inputs) batch_ndims = (inputs.shape.ndims - 2) mask = tf.reshape(tf.cast(self.mask, inputs.dtype), (([1] * batch_ndims) +...
Reverse pass for the inverse bipartite transformation.
tensor2tensor/layers/reversible_layers.py
reverse
ekuznetsov139/tensor2tensor
34
python
def reverse(self, inputs, **kwargs): if (not self.built): self._maybe_build(inputs) inputs = tf.convert_to_tensor(inputs) batch_ndims = (inputs.shape.ndims - 2) mask = tf.reshape(tf.cast(self.mask, inputs.dtype), (([1] * batch_ndims) + [(- 1), 1])) masked_inputs = (mask * inputs) ne...
def reverse(self, inputs, **kwargs): if (not self.built): self._maybe_build(inputs) inputs = tf.convert_to_tensor(inputs) batch_ndims = (inputs.shape.ndims - 2) mask = tf.reshape(tf.cast(self.mask, inputs.dtype), (([1] * batch_ndims) + [(- 1), 1])) masked_inputs = (mask * inputs) ne...
6672473612a4f4efe6904d0b0def3c43cf85754f3825d6ee82cc8d5a5e4412fa
def __init__(self, layer, temperature, **kwargs): 'Constructs flow.\n\n Args:\n layer: Masked network taking inputs with shape `[..., length, vocab_size]`\n and returning a real-valued Tensor of shape\n `[..., length, vocab_size ** 2]`. Sinkhorn iterations are applied to\n each `layer` ...
Constructs flow. Args: layer: Masked network taking inputs with shape `[..., length, vocab_size]` and returning a real-valued Tensor of shape `[..., length, vocab_size ** 2]`. Sinkhorn iterations are applied to each `layer` output to produce permutation matrices. temperature: Positive value determining...
tensor2tensor/layers/reversible_layers.py
__init__
ekuznetsov139/tensor2tensor
34
python
def __init__(self, layer, temperature, **kwargs): 'Constructs flow.\n\n Args:\n layer: Masked network taking inputs with shape `[..., length, vocab_size]`\n and returning a real-valued Tensor of shape\n `[..., length, vocab_size ** 2]`. Sinkhorn iterations are applied to\n each `layer` ...
def __init__(self, layer, temperature, **kwargs): 'Constructs flow.\n\n Args:\n layer: Masked network taking inputs with shape `[..., length, vocab_size]`\n and returning a real-valued Tensor of shape\n `[..., length, vocab_size ** 2]`. Sinkhorn iterations are applied to\n each `layer` ...
f71cfe696cf2862b3b9cdcc9e9edcb110f0ca21f1d011a03abe4a7dfd3f814f9
def call(self, inputs, **kwargs): 'Forward pass for left-to-right autoregressive generation.' inputs = tf.convert_to_tensor(inputs) length = inputs.shape[(- 2)].value if (length is None): raise NotImplementedError('length dimension must be known.') outputs = self._initial_call(inputs[(..., 0...
Forward pass for left-to-right autoregressive generation.
tensor2tensor/layers/reversible_layers.py
call
ekuznetsov139/tensor2tensor
34
python
def call(self, inputs, **kwargs): inputs = tf.convert_to_tensor(inputs) length = inputs.shape[(- 2)].value if (length is None): raise NotImplementedError('length dimension must be known.') outputs = self._initial_call(inputs[(..., 0, :)], length, **kwargs) for t in range(1, length): ...
def call(self, inputs, **kwargs): inputs = tf.convert_to_tensor(inputs) length = inputs.shape[(- 2)].value if (length is None): raise NotImplementedError('length dimension must be known.') outputs = self._initial_call(inputs[(..., 0, :)], length, **kwargs) for t in range(1, length): ...
b3c16c689efcc329352314fdd87be4ccfb7a2e4f8fd8a06d4b9d91f44409052c
def _initial_call(self, new_inputs, length, **kwargs): 'Returns Tensor of shape [..., 1, vocab_size].\n\n Args:\n new_inputs: Tensor of shape [..., vocab_size], the new input to generate\n its output.\n length: Length of final desired sequence.\n **kwargs: Optional keyword arguments to laye...
Returns Tensor of shape [..., 1, vocab_size]. Args: new_inputs: Tensor of shape [..., vocab_size], the new input to generate its output. length: Length of final desired sequence. **kwargs: Optional keyword arguments to layer.
tensor2tensor/layers/reversible_layers.py
_initial_call
ekuznetsov139/tensor2tensor
34
python
def _initial_call(self, new_inputs, length, **kwargs): 'Returns Tensor of shape [..., 1, vocab_size].\n\n Args:\n new_inputs: Tensor of shape [..., vocab_size], the new input to generate\n its output.\n length: Length of final desired sequence.\n **kwargs: Optional keyword arguments to laye...
def _initial_call(self, new_inputs, length, **kwargs): 'Returns Tensor of shape [..., 1, vocab_size].\n\n Args:\n new_inputs: Tensor of shape [..., vocab_size], the new input to generate\n its output.\n length: Length of final desired sequence.\n **kwargs: Optional keyword arguments to laye...
73c78507f841b6dc7ebb2d547fdc41dc67a0ecd120a16ed6180afc8bb14d1392
def _per_timestep_call(self, current_outputs, new_inputs, length, timestep, **kwargs): 'Returns Tensor of shape [..., timestep+1, vocab_size].\n\n Args:\n current_outputs: Tensor of shape [..., timestep, vocab_size], the so-far\n generated sequence Tensor.\n new_inputs: Tensor of shape [..., voc...
Returns Tensor of shape [..., timestep+1, vocab_size]. Args: current_outputs: Tensor of shape [..., timestep, vocab_size], the so-far generated sequence Tensor. new_inputs: Tensor of shape [..., vocab_size], the new input to generate its output given current_outputs. length: Length of final desired seque...
tensor2tensor/layers/reversible_layers.py
_per_timestep_call
ekuznetsov139/tensor2tensor
34
python
def _per_timestep_call(self, current_outputs, new_inputs, length, timestep, **kwargs): 'Returns Tensor of shape [..., timestep+1, vocab_size].\n\n Args:\n current_outputs: Tensor of shape [..., timestep, vocab_size], the so-far\n generated sequence Tensor.\n new_inputs: Tensor of shape [..., voc...
def _per_timestep_call(self, current_outputs, new_inputs, length, timestep, **kwargs): 'Returns Tensor of shape [..., timestep+1, vocab_size].\n\n Args:\n current_outputs: Tensor of shape [..., timestep, vocab_size], the so-far\n generated sequence Tensor.\n new_inputs: Tensor of shape [..., voc...
cd526d7ddc49114bb7ef501eabb207f598588ddb6338dc16743fe9a001aee8dc
def reverse(self, inputs, **kwargs): 'Reverse pass returning the inverse autoregressive transformation.' if (not self.built): self._maybe_build(inputs) logits = self.layer(inputs, **kwargs) logits = tf.reshape(logits, logits.shape[:(- 1)].concatenate([self.vocab_size, self.vocab_size])) soft...
Reverse pass returning the inverse autoregressive transformation.
tensor2tensor/layers/reversible_layers.py
reverse
ekuznetsov139/tensor2tensor
34
python
def reverse(self, inputs, **kwargs): if (not self.built): self._maybe_build(inputs) logits = self.layer(inputs, **kwargs) logits = tf.reshape(logits, logits.shape[:(- 1)].concatenate([self.vocab_size, self.vocab_size])) soft = sinkhorn((logits / self.temperature), n_iters=20) hard = sof...
def reverse(self, inputs, **kwargs): if (not self.built): self._maybe_build(inputs) logits = self.layer(inputs, **kwargs) logits = tf.reshape(logits, logits.shape[:(- 1)].concatenate([self.vocab_size, self.vocab_size])) soft = sinkhorn((logits / self.temperature), n_iters=20) hard = sof...
752d604aa42f42b613106f21de04e1cbb0c245f9be349b78baf05aa27f4d507c
def log_det_jacobian(self, inputs): 'Returns log det | dx / dy | = num_events * sum log | scale |.' del inputs num_events = tf.reduce_prod(tf.shape(inputs)[1:(- 1)]) log_det_jacobian = (num_events * tf.reduce_sum(self.log_scale)) return log_det_jacobian
Returns log det | dx / dy | = num_events * sum log | scale |.
tensor2tensor/layers/reversible_layers.py
log_det_jacobian
ekuznetsov139/tensor2tensor
34
python
def log_det_jacobian(self, inputs): del inputs num_events = tf.reduce_prod(tf.shape(inputs)[1:(- 1)]) log_det_jacobian = (num_events * tf.reduce_sum(self.log_scale)) return log_det_jacobian
def log_det_jacobian(self, inputs): del inputs num_events = tf.reduce_prod(tf.shape(inputs)[1:(- 1)]) log_det_jacobian = (num_events * tf.reduce_sum(self.log_scale)) return log_det_jacobian<|docstring|>Returns log det | dx / dy | = num_events * sum log | scale |.<|endoftext|>
1cf0ee0ca571a7d2df41f152b6eb9f2c27fc44b1c2c4366510c585aa4b1e35cc
def __init__(self, units, hidden_dims, input_order='left-to-right', hidden_order='left-to-right', activation=None, use_bias=True, **kwargs): "Constructs network.\n\n Args:\n units: Positive integer, dimensionality of the output space.\n hidden_dims: list with the number of hidden units per layer. It do...
Constructs network. Args: units: Positive integer, dimensionality of the output space. hidden_dims: list with the number of hidden units per layer. It does not include the output layer; those number of units will always be set to the input dimension multiplied by `num_heads`. Each hidden unit size must...
tensor2tensor/layers/reversible_layers.py
__init__
ekuznetsov139/tensor2tensor
34
python
def __init__(self, units, hidden_dims, input_order='left-to-right', hidden_order='left-to-right', activation=None, use_bias=True, **kwargs): "Constructs network.\n\n Args:\n units: Positive integer, dimensionality of the output space.\n hidden_dims: list with the number of hidden units per layer. It do...
def __init__(self, units, hidden_dims, input_order='left-to-right', hidden_order='left-to-right', activation=None, use_bias=True, **kwargs): "Constructs network.\n\n Args:\n units: Positive integer, dimensionality of the output space.\n hidden_dims: list with the number of hidden units per layer. It do...
3f41fa566f02150a445e0b3ea0b09d7b2f62dce6c186e1d1a6ed084792ed47c5
def __init__(self, base, reversible_layer, name=None): 'Constructs a transformed distribution.\n\n Args:\n base: Base distribution.\n reversible_layer: Callable with methods `reverse` and `log_det_jacobian`.\n name: Name for scoping operations in the class.\n ' self.base = base self.rev...
Constructs a transformed distribution. Args: base: Base distribution. reversible_layer: Callable with methods `reverse` and `log_det_jacobian`. name: Name for scoping operations in the class.
tensor2tensor/layers/reversible_layers.py
__init__
ekuznetsov139/tensor2tensor
34
python
def __init__(self, base, reversible_layer, name=None): 'Constructs a transformed distribution.\n\n Args:\n base: Base distribution.\n reversible_layer: Callable with methods `reverse` and `log_det_jacobian`.\n name: Name for scoping operations in the class.\n ' self.base = base self.rev...
def __init__(self, base, reversible_layer, name=None): 'Constructs a transformed distribution.\n\n Args:\n base: Base distribution.\n reversible_layer: Callable with methods `reverse` and `log_det_jacobian`.\n name: Name for scoping operations in the class.\n ' self.base = base self.rev...
75aee68793e5e09eb594f9e355ea6df9d78ffc44349219a51088af2a78302462
def trimesh_remesh(mesh, target, kmax=100, tol=0.1, divergence=0.01, verbose=False, allow_boundary_split=False, allow_boundary_swap=False, allow_boundary_collapse=False, smooth=True, fixed=None, callback=None, callback_args=None): "Remesh until all edges have a specified target length.\n\n Parameters\n ------...
Remesh until all edges have a specified target length. Parameters ---------- mesh : Mesh A triangle mesh. target : float The target length for the mesh edges. kmax : int, optional [100] The number of iterations. tol : float, optional [0.1] Length deviation tolerance. divergence : float, optional [0.01]...
src/compas/datastructures/mesh/remesh/remesh.py
trimesh_remesh
elidim/compas
1
python
def trimesh_remesh(mesh, target, kmax=100, tol=0.1, divergence=0.01, verbose=False, allow_boundary_split=False, allow_boundary_swap=False, allow_boundary_collapse=False, smooth=True, fixed=None, callback=None, callback_args=None): "Remesh until all edges have a specified target length.\n\n Parameters\n ------...
def trimesh_remesh(mesh, target, kmax=100, tol=0.1, divergence=0.01, verbose=False, allow_boundary_split=False, allow_boundary_swap=False, allow_boundary_collapse=False, smooth=True, fixed=None, callback=None, callback_args=None): "Remesh until all edges have a specified target length.\n\n Parameters\n ------...
d6d0c6a1c80a0c2c287aa74a90c8232fdbdb7ee623817acc8636ef2ed9c2d61d
def test_context_stack(mocker): 'Check that the context stack is pushed and popped correctly.' assert_that(midnite.get_device()).is_equal_to(torch.device('cpu')) mock_device = mocker.Mock(spec=torch.device) mocker.patch('torch.device', return_value=mock_device) with midnite.device('cuda:0'): ...
Check that the context stack is pushed and popped correctly.
tests/unit/context_test.py
test_context_stack
christina-aigner/midnite
0
python
def test_context_stack(mocker): assert_that(midnite.get_device()).is_equal_to(torch.device('cpu')) mock_device = mocker.Mock(spec=torch.device) mocker.patch('torch.device', return_value=mock_device) with midnite.device('cuda:0'): torch.device.assert_called_once_with('cuda:0') torch....
def test_context_stack(mocker): assert_that(midnite.get_device()).is_equal_to(torch.device('cpu')) mock_device = mocker.Mock(spec=torch.device) mocker.patch('torch.device', return_value=mock_device) with midnite.device('cuda:0'): torch.device.assert_called_once_with('cuda:0') torch....
69e7c3390a540568df2e8c5fef74f2a10234c5837f91e7b56b84f6a003edc780
def test_context_fail_early(): 'Checks that creating a context with invalid device immediately fails' with pytest.raises(RuntimeError): with midnite.device('does not exist'): pass
Checks that creating a context with invalid device immediately fails
tests/unit/context_test.py
test_context_fail_early
christina-aigner/midnite
0
python
def test_context_fail_early(): with pytest.raises(RuntimeError): with midnite.device('does not exist'): pass
def test_context_fail_early(): with pytest.raises(RuntimeError): with midnite.device('does not exist'): pass<|docstring|>Checks that creating a context with invalid device immediately fails<|endoftext|>
5d372b07e88c87eee33b62b65db39e782524fddcfac4dfe3f6c5f119f9979fad
def transform_landmarks(data, angle, scale, translation, center): '\n Landmark transform\n ' (translation, center) = validate_transform_params(angle, scale, translation, center) data_copy = data.copy() angle = np.deg2rad((- angle)) rotation_matrix = np.array([[np.cos(angle), (- np.sin(angle))]...
Landmark transform
utils.py
transform_landmarks
kivancyuksel/cfpd
4
python
def transform_landmarks(data, angle, scale, translation, center): '\n \n ' (translation, center) = validate_transform_params(angle, scale, translation, center) data_copy = data.copy() angle = np.deg2rad((- angle)) rotation_matrix = np.array([[np.cos(angle), (- np.sin(angle))], [np.sin(angle), ...
def transform_landmarks(data, angle, scale, translation, center): '\n \n ' (translation, center) = validate_transform_params(angle, scale, translation, center) data_copy = data.copy() angle = np.deg2rad((- angle)) rotation_matrix = np.array([[np.cos(angle), (- np.sin(angle))], [np.sin(angle), ...
29eb79f46050730e66fe496e87133a89ef7a8f21e1e45d0f072fbdedaaa0ad96
def transform_affine(data, angle, scale, translation, center): '\n 2D affine transformation\n ' (translation, center) = validate_transform_params(angle, scale, translation, center) angle = np.deg2rad((angle + 90)) data_copy = data.copy() translation_matrix = np.array([[1, 0, translation[0]], [...
2D affine transformation
utils.py
transform_affine
kivancyuksel/cfpd
4
python
def transform_affine(data, angle, scale, translation, center): '\n \n ' (translation, center) = validate_transform_params(angle, scale, translation, center) angle = np.deg2rad((angle + 90)) data_copy = data.copy() translation_matrix = np.array([[1, 0, translation[0]], [0, 1, translation[1]]]) ...
def transform_affine(data, angle, scale, translation, center): '\n \n ' (translation, center) = validate_transform_params(angle, scale, translation, center) angle = np.deg2rad((angle + 90)) data_copy = data.copy() translation_matrix = np.array([[1, 0, translation[0]], [0, 1, translation[1]]]) ...
2e60243310cdd495ce6d4417435e6f4487882677de6f1465012127b23ed434fa
def load_pts_file(path): ' Load .pts file' landmarks = np.genfromtxt(path, skip_header=3, skip_footer=1) return landmarks
Load .pts file
utils.py
load_pts_file
kivancyuksel/cfpd
4
python
def load_pts_file(path): ' ' landmarks = np.genfromtxt(path, skip_header=3, skip_footer=1) return landmarks
def load_pts_file(path): ' ' landmarks = np.genfromtxt(path, skip_header=3, skip_footer=1) return landmarks<|docstring|>Load .pts file<|endoftext|>
81b61e3dfd29543d26f678c677e4fd744379f399821c02194f216d21946ee8c4
def save_landmarks_as_pts_file(landmarks, path): 'Save landmark coordinates as .pts file' landmarks_pts = 'version: 1\nn_points: 68\n{\n' for pts in landmarks: landmarks_pts += (((str(pts[0]) + ' ') + str(pts[1])) + '\n') landmarks_pts += '}' with open(path, 'w') as file_: print(land...
Save landmark coordinates as .pts file
utils.py
save_landmarks_as_pts_file
kivancyuksel/cfpd
4
python
def save_landmarks_as_pts_file(landmarks, path): landmarks_pts = 'version: 1\nn_points: 68\n{\n' for pts in landmarks: landmarks_pts += (((str(pts[0]) + ' ') + str(pts[1])) + '\n') landmarks_pts += '}' with open(path, 'w') as file_: print(landmarks_pts, file=file_)
def save_landmarks_as_pts_file(landmarks, path): landmarks_pts = 'version: 1\nn_points: 68\n{\n' for pts in landmarks: landmarks_pts += (((str(pts[0]) + ' ') + str(pts[1])) + '\n') landmarks_pts += '}' with open(path, 'w') as file_: print(landmarks_pts, file=file_)<|docstring|>Save ...
8f23b0e4a4455be0cb8d86a73839cfa7f6987245cf3239027b35e9885054069f
def mirror_landmarks(landmarks, img_shape): 'Mirror landmarks carefully' landmarks_copy = landmarks.copy() face_parts_to_indices = get_face_parts_to_indices() indices = face_parts_to_indices landmarks_copy[(:, 0)] = (img_shape[1] - landmarks_copy[(:, 0)]) left_eye_to_right_eye = np.concatenate((...
Mirror landmarks carefully
utils.py
mirror_landmarks
kivancyuksel/cfpd
4
python
def mirror_landmarks(landmarks, img_shape): landmarks_copy = landmarks.copy() face_parts_to_indices = get_face_parts_to_indices() indices = face_parts_to_indices landmarks_copy[(:, 0)] = (img_shape[1] - landmarks_copy[(:, 0)]) left_eye_to_right_eye = np.concatenate((indices['left_eye'], indices...
def mirror_landmarks(landmarks, img_shape): landmarks_copy = landmarks.copy() face_parts_to_indices = get_face_parts_to_indices() indices = face_parts_to_indices landmarks_copy[(:, 0)] = (img_shape[1] - landmarks_copy[(:, 0)]) left_eye_to_right_eye = np.concatenate((indices['left_eye'], indices...
952d2c77faf771031264daa676b20fae0679c0f13f38a4a9d9bb8fd1a2b45a87
def analyse(self): '\n read from the messages queue, and generate:\n 1. Counter for From field\n 2. Counter for Time field (by hour)\n ' with concurrent.futures.ThreadPoolExecutor() as executor: progress = Spinner(f'{helpers.loader_icn} Loading messages ') event = Eve...
read from the messages queue, and generate: 1. Counter for From field 2. Counter for Time field (by hour)
src/metrics.py
analyse
0xbsec/gmail_analyzer
34
python
def analyse(self): '\n read from the messages queue, and generate:\n 1. Counter for From field\n 2. Counter for Time field (by hour)\n ' with concurrent.futures.ThreadPoolExecutor() as executor: progress = Spinner(f'{helpers.loader_icn} Loading messages ') event = Eve...
def analyse(self): '\n read from the messages queue, and generate:\n 1. Counter for From field\n 2. Counter for Time field (by hour)\n ' with concurrent.futures.ThreadPoolExecutor() as executor: progress = Spinner(f'{helpers.loader_icn} Loading messages ') event = Eve...
90f07e8732787b3a679974151c61fd63df37347a6826e75e33ac58ebfa8a7abf
def download_demo_dataset(data, workspace, load_demo_proc_dict): "下载样例工程\n\n Args:\n data为dict, key包括\n 'prj_type' 样例类型(ProjectType)\n " if isinstance(data['prj_type'], str): prj_type = ProjectType(prj_type_list.index(data['prj_type'])) else: prj_type = Pr...
下载样例工程 Args: data为dict, key包括 'prj_type' 样例类型(ProjectType)
paddlex_restful/restful/demo.py
download_demo_dataset
jercheng/PaddleX
3,655
python
def download_demo_dataset(data, workspace, load_demo_proc_dict): "下载样例工程\n\n Args:\n data为dict, key包括\n 'prj_type' 样例类型(ProjectType)\n " if isinstance(data['prj_type'], str): prj_type = ProjectType(prj_type_list.index(data['prj_type'])) else: prj_type = Pr...
def download_demo_dataset(data, workspace, load_demo_proc_dict): "下载样例工程\n\n Args:\n data为dict, key包括\n 'prj_type' 样例类型(ProjectType)\n " if isinstance(data['prj_type'], str): prj_type = ProjectType(prj_type_list.index(data['prj_type'])) else: prj_type = Pr...
54589c0dacadedbb4375a5622953a8e7056a47956879f6baf64daa89c66a68b6
def load_demo_project(data, workspace, monitored_processes, load_demo_proj_data_dict, load_demo_proc_dict): "导入样例工程\n\n Args:\n data为dict, key包括\n 'prj_type' 样例类型(ProjectType)\n " if isinstance(data['prj_type'], str): prj_type = ProjectType(prj_type_list.index(data['prj_type'])) ...
导入样例工程 Args: data为dict, key包括 'prj_type' 样例类型(ProjectType)
paddlex_restful/restful/demo.py
load_demo_project
jercheng/PaddleX
3,655
python
def load_demo_project(data, workspace, monitored_processes, load_demo_proj_data_dict, load_demo_proc_dict): "导入样例工程\n\n Args:\n data为dict, key包括\n 'prj_type' 样例类型(ProjectType)\n " if isinstance(data['prj_type'], str): prj_type = ProjectType(prj_type_list.index(data['prj_type'])) ...
def load_demo_project(data, workspace, monitored_processes, load_demo_proj_data_dict, load_demo_proc_dict): "导入样例工程\n\n Args:\n data为dict, key包括\n 'prj_type' 样例类型(ProjectType)\n " if isinstance(data['prj_type'], str): prj_type = ProjectType(prj_type_list.index(data['prj_type'])) ...
e5adbc747a82481525df4d8d47c4f03da25b7b744983a54f490f8dea61072ad8
def get_download_demo_progress(data, workspace): "查询样例工程的下载进度\n\n Args:\n data为dict, key包括\n 'prj_type' 样例类型(ProjectType)\n " if isinstance(data['prj_type'], str): target_path = osp.join(workspace.path, 'demo_datasets', data['prj_type']) else: prj_type = ProjectType(data[...
查询样例工程的下载进度 Args: data为dict, key包括 'prj_type' 样例类型(ProjectType)
paddlex_restful/restful/demo.py
get_download_demo_progress
jercheng/PaddleX
3,655
python
def get_download_demo_progress(data, workspace): "查询样例工程的下载进度\n\n Args:\n data为dict, key包括\n 'prj_type' 样例类型(ProjectType)\n " if isinstance(data['prj_type'], str): target_path = osp.join(workspace.path, 'demo_datasets', data['prj_type']) else: prj_type = ProjectType(data[...
def get_download_demo_progress(data, workspace): "查询样例工程的下载进度\n\n Args:\n data为dict, key包括\n 'prj_type' 样例类型(ProjectType)\n " if isinstance(data['prj_type'], str): target_path = osp.join(workspace.path, 'demo_datasets', data['prj_type']) else: prj_type = ProjectType(data[...
cb2f524905338f829322a1534f7d63c34e961366b258b2b0cf614a7952a23cfb
def stop_import_demo(data, workspace, load_demo_proc_dict, load_demo_proj_data_dict): "停止样例工程的导入进度\n\n Args:\n request(comm.Request): 其中request.params为dict, key包括\n 'prj_type' 样例类型(ProjectType)\n " if isinstance(data['prj_type'], str): prj_type = ProjectType(prj_type_list.index(data[...
停止样例工程的导入进度 Args: request(comm.Request): 其中request.params为dict, key包括 'prj_type' 样例类型(ProjectType)
paddlex_restful/restful/demo.py
stop_import_demo
jercheng/PaddleX
3,655
python
def stop_import_demo(data, workspace, load_demo_proc_dict, load_demo_proj_data_dict): "停止样例工程的导入进度\n\n Args:\n request(comm.Request): 其中request.params为dict, key包括\n 'prj_type' 样例类型(ProjectType)\n " if isinstance(data['prj_type'], str): prj_type = ProjectType(prj_type_list.index(data[...
def stop_import_demo(data, workspace, load_demo_proc_dict, load_demo_proj_data_dict): "停止样例工程的导入进度\n\n Args:\n request(comm.Request): 其中request.params为dict, key包括\n 'prj_type' 样例类型(ProjectType)\n " if isinstance(data['prj_type'], str): prj_type = ProjectType(prj_type_list.index(data[...
9f28db3a0c249a154f2c85cf86fda663b043bcf2b57a1d5bda5ee221a79dac3d
def create_app(config_name='dev'): '\n Create App\n :param config_name:\n :return:\n ' app_api = app load_config(app_api, config_name) return app_api
Create App :param config_name: :return:
app/__init__.py
create_app
fabidick22/inject-sec-to-devops
7
python
def create_app(config_name='dev'): '\n Create App\n :param config_name:\n :return:\n ' app_api = app load_config(app_api, config_name) return app_api
def create_app(config_name='dev'): '\n Create App\n :param config_name:\n :return:\n ' app_api = app load_config(app_api, config_name) return app_api<|docstring|>Create App :param config_name: :return:<|endoftext|>
faf48ada32a0f7abe036c600f2fee606424cbbb0b091fd22cb5a6f67200a9928
def load_config(app_config: Flask, config_mode) -> None: "\n Load the application's config\n :param (flask.app.Flask) app_config: The application instance Flask that'll be running\n :param config_mode: Config mode (Allowed: [dev, stg, prod])\n :return:\n " if (config_mode in config_values): ...
Load the application's config :param (flask.app.Flask) app_config: The application instance Flask that'll be running :param config_mode: Config mode (Allowed: [dev, stg, prod]) :return:
app/__init__.py
load_config
fabidick22/inject-sec-to-devops
7
python
def load_config(app_config: Flask, config_mode) -> None: "\n Load the application's config\n :param (flask.app.Flask) app_config: The application instance Flask that'll be running\n :param config_mode: Config mode (Allowed: [dev, stg, prod])\n :return:\n " if (config_mode in config_values): ...
def load_config(app_config: Flask, config_mode) -> None: "\n Load the application's config\n :param (flask.app.Flask) app_config: The application instance Flask that'll be running\n :param config_mode: Config mode (Allowed: [dev, stg, prod])\n :return:\n " if (config_mode in config_values): ...
f7d848efd90e2ce56b550e909b30b6b79226bcfabc5526758997122c1c6ecf89
def __init__(__self__, *, address1: str, city: str, country: str, postal_code: str, state: str, address2: Optional[str]=None): '\n Address information for domain registration.\n :param str address1: First line of an Address.\n :param str city: The city for the address.\n :param str count...
Address information for domain registration. :param str address1: First line of an Address. :param str city: The city for the address. :param str country: The country for the address. :param str postal_code: The postal code for the address. :param str state: The state or province for the address. :param str address2: T...
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, address1: str, city: str, country: str, postal_code: str, state: str, address2: Optional[str]=None): '\n Address information for domain registration.\n :param str address1: First line of an Address.\n :param str city: The city for the address.\n :param str count...
def __init__(__self__, *, address1: str, city: str, country: str, postal_code: str, state: str, address2: Optional[str]=None): '\n Address information for domain registration.\n :param str address1: First line of an Address.\n :param str city: The city for the address.\n :param str count...
b80116b4739a876d32099389e95709b065650b4e6275233de11343a680c75ee3
@property @pulumi.getter def address1(self) -> str: '\n First line of an Address.\n ' return pulumi.get(self, 'address1')
First line of an Address.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
address1
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def address1(self) -> str: '\n \n ' return pulumi.get(self, 'address1')
@property @pulumi.getter def address1(self) -> str: '\n \n ' return pulumi.get(self, 'address1')<|docstring|>First line of an Address.<|endoftext|>
1303f015b8f3c70b6c3fda899c2b01880e5d02281e7be9848812e6f535142ac0
@property @pulumi.getter def city(self) -> str: '\n The city for the address.\n ' return pulumi.get(self, 'city')
The city for the address.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
city
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def city(self) -> str: '\n \n ' return pulumi.get(self, 'city')
@property @pulumi.getter def city(self) -> str: '\n \n ' return pulumi.get(self, 'city')<|docstring|>The city for the address.<|endoftext|>
12f5d317a925dafc36f774cdfa8b9ae45a3951dcf4b23f7c13aaf54e951ba613
@property @pulumi.getter def country(self) -> str: '\n The country for the address.\n ' return pulumi.get(self, 'country')
The country for the address.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
country
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def country(self) -> str: '\n \n ' return pulumi.get(self, 'country')
@property @pulumi.getter def country(self) -> str: '\n \n ' return pulumi.get(self, 'country')<|docstring|>The country for the address.<|endoftext|>
ce7a3b066afe70a1507d956ac742d08c7f8cc7a887f4b7e05b6cba0cf69b0acc
@property @pulumi.getter(name='postalCode') def postal_code(self) -> str: '\n The postal code for the address.\n ' return pulumi.get(self, 'postal_code')
The postal code for the address.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
postal_code
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='postalCode') def postal_code(self) -> str: '\n \n ' return pulumi.get(self, 'postal_code')
@property @pulumi.getter(name='postalCode') def postal_code(self) -> str: '\n \n ' return pulumi.get(self, 'postal_code')<|docstring|>The postal code for the address.<|endoftext|>
fcfbc0a95c561e37d1bcc7a3b6f9f48183ad5e5c993da726c2928a6b266e99b6
@property @pulumi.getter def state(self) -> str: '\n The state or province for the address.\n ' return pulumi.get(self, 'state')
The state or province for the address.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
state
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def state(self) -> str: '\n \n ' return pulumi.get(self, 'state')
@property @pulumi.getter def state(self) -> str: '\n \n ' return pulumi.get(self, 'state')<|docstring|>The state or province for the address.<|endoftext|>
f7e1a697f9c8753d6df7425d3bb85f22e7b2e377187453802d081e5b78b0f0ca
@property @pulumi.getter def address2(self) -> Optional[str]: '\n The second line of the Address. Optional.\n ' return pulumi.get(self, 'address2')
The second line of the Address. Optional.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
address2
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def address2(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'address2')
@property @pulumi.getter def address2(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'address2')<|docstring|>The second line of the Address. Optional.<|endoftext|>
b3ffc38b49609ce02f5dfb8ab76c6ca74f118a8de9db1c2ef9209880988f3991
def __init__(__self__, *, email: str, name_first: str, name_last: str, phone: str, address_mailing: Optional['outputs.AddressResponse']=None, fax: Optional[str]=None, job_title: Optional[str]=None, name_middle: Optional[str]=None, organization: Optional[str]=None): "\n Contact information for domain registra...
Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois directories as per ICANN requirements. :param str email: Email address. :param str name_first: First name. :param str name_last: Last name. :param str phone:...
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, email: str, name_first: str, name_last: str, phone: str, address_mailing: Optional['outputs.AddressResponse']=None, fax: Optional[str]=None, job_title: Optional[str]=None, name_middle: Optional[str]=None, organization: Optional[str]=None): "\n Contact information for domain registra...
def __init__(__self__, *, email: str, name_first: str, name_last: str, phone: str, address_mailing: Optional['outputs.AddressResponse']=None, fax: Optional[str]=None, job_title: Optional[str]=None, name_middle: Optional[str]=None, organization: Optional[str]=None): "\n Contact information for domain registra...
286de140f732e30fb694fc1697de4a72a30b6561e3c3fd7c163aa83d74db3d61
@property @pulumi.getter def email(self) -> str: '\n Email address.\n ' return pulumi.get(self, 'email')
Email address.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
email
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def email(self) -> str: '\n \n ' return pulumi.get(self, 'email')
@property @pulumi.getter def email(self) -> str: '\n \n ' return pulumi.get(self, 'email')<|docstring|>Email address.<|endoftext|>
bb7ab498741aaabfbe8f7b57f05abf51dc2d843098748bb11d0c6e3b207cc268
@property @pulumi.getter(name='nameFirst') def name_first(self) -> str: '\n First name.\n ' return pulumi.get(self, 'name_first')
First name.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
name_first
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='nameFirst') def name_first(self) -> str: '\n \n ' return pulumi.get(self, 'name_first')
@property @pulumi.getter(name='nameFirst') def name_first(self) -> str: '\n \n ' return pulumi.get(self, 'name_first')<|docstring|>First name.<|endoftext|>
b418b8f5eb3b43aee2611939ece416523b9fa445acba3262e35256d8385e6620
@property @pulumi.getter(name='nameLast') def name_last(self) -> str: '\n Last name.\n ' return pulumi.get(self, 'name_last')
Last name.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
name_last
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='nameLast') def name_last(self) -> str: '\n \n ' return pulumi.get(self, 'name_last')
@property @pulumi.getter(name='nameLast') def name_last(self) -> str: '\n \n ' return pulumi.get(self, 'name_last')<|docstring|>Last name.<|endoftext|>
9a3d92516cbdbc1272dd4e5ac8ed0935f71e35b69f06a2bc39de9b7ab4082629
@property @pulumi.getter def phone(self) -> str: '\n Phone number.\n ' return pulumi.get(self, 'phone')
Phone number.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
phone
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def phone(self) -> str: '\n \n ' return pulumi.get(self, 'phone')
@property @pulumi.getter def phone(self) -> str: '\n \n ' return pulumi.get(self, 'phone')<|docstring|>Phone number.<|endoftext|>
9d43e257dc6ec5aefd5dab405704edfa749829e9c51c63b96920e81b40cd9501
@property @pulumi.getter(name='addressMailing') def address_mailing(self) -> Optional['outputs.AddressResponse']: '\n Mailing address.\n ' return pulumi.get(self, 'address_mailing')
Mailing address.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
address_mailing
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='addressMailing') def address_mailing(self) -> Optional['outputs.AddressResponse']: '\n \n ' return pulumi.get(self, 'address_mailing')
@property @pulumi.getter(name='addressMailing') def address_mailing(self) -> Optional['outputs.AddressResponse']: '\n \n ' return pulumi.get(self, 'address_mailing')<|docstring|>Mailing address.<|endoftext|>
9bc97d5b619938854775fb2c4d0fcde7736b62f69560779b593b050f399f0988
@property @pulumi.getter def fax(self) -> Optional[str]: '\n Fax number.\n ' return pulumi.get(self, 'fax')
Fax number.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
fax
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def fax(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'fax')
@property @pulumi.getter def fax(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'fax')<|docstring|>Fax number.<|endoftext|>
c399bb346e5d4bb7c7940273bbca1daec7f820980f44d1c3ca227774b63ba24b
@property @pulumi.getter(name='jobTitle') def job_title(self) -> Optional[str]: '\n Job title.\n ' return pulumi.get(self, 'job_title')
Job title.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
job_title
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='jobTitle') def job_title(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'job_title')
@property @pulumi.getter(name='jobTitle') def job_title(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'job_title')<|docstring|>Job title.<|endoftext|>
2e622f4d784f2cd48d45b416e43ddba9b588a6bf4992d94ea64374be7bb6ab9b
@property @pulumi.getter(name='nameMiddle') def name_middle(self) -> Optional[str]: '\n Middle name.\n ' return pulumi.get(self, 'name_middle')
Middle name.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
name_middle
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='nameMiddle') def name_middle(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'name_middle')
@property @pulumi.getter(name='nameMiddle') def name_middle(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'name_middle')<|docstring|>Middle name.<|endoftext|>
71a46bfe11a50b2e85811a020500f20e21ea02ca4a9aef1fd03e85e8eaa90829
@property @pulumi.getter def organization(self) -> Optional[str]: '\n Organization contact belongs to.\n ' return pulumi.get(self, 'organization')
Organization contact belongs to.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
organization
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def organization(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'organization')
@property @pulumi.getter def organization(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'organization')<|docstring|>Organization contact belongs to.<|endoftext|>
45dcf6bbbc214b23a7583eb7a3cd01f6f11545fd52d4deb98a78719aad3eeabd
def __init__(__self__, *, agreed_at: Optional[str]=None, agreed_by: Optional[str]=None, agreement_keys: Optional[Sequence[str]]=None): '\n Domain purchase consent object, representing acceptance of applicable legal agreements.\n :param str agreed_at: Timestamp when the agreements were accepted.\n ...
Domain purchase consent object, representing acceptance of applicable legal agreements. :param str agreed_at: Timestamp when the agreements were accepted. :param str agreed_by: Client IP address. :param Sequence[str] agreement_keys: List of applicable legal agreement keys. This list can be retrieved using ListLegalAgre...
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, agreed_at: Optional[str]=None, agreed_by: Optional[str]=None, agreement_keys: Optional[Sequence[str]]=None): '\n Domain purchase consent object, representing acceptance of applicable legal agreements.\n :param str agreed_at: Timestamp when the agreements were accepted.\n ...
def __init__(__self__, *, agreed_at: Optional[str]=None, agreed_by: Optional[str]=None, agreement_keys: Optional[Sequence[str]]=None): '\n Domain purchase consent object, representing acceptance of applicable legal agreements.\n :param str agreed_at: Timestamp when the agreements were accepted.\n ...
9ce456cdf8e7c38c704f532cc41383f96cb0a10e509275bb4beddb8317b94a55
@property @pulumi.getter(name='agreedAt') def agreed_at(self) -> Optional[str]: '\n Timestamp when the agreements were accepted.\n ' return pulumi.get(self, 'agreed_at')
Timestamp when the agreements were accepted.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
agreed_at
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='agreedAt') def agreed_at(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'agreed_at')
@property @pulumi.getter(name='agreedAt') def agreed_at(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'agreed_at')<|docstring|>Timestamp when the agreements were accepted.<|endoftext|>
9bca656aa5c55bc93c273d53c7d2a9e6813121f2749625ec9a54547edeb5016a
@property @pulumi.getter(name='agreedBy') def agreed_by(self) -> Optional[str]: '\n Client IP address.\n ' return pulumi.get(self, 'agreed_by')
Client IP address.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
agreed_by
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='agreedBy') def agreed_by(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'agreed_by')
@property @pulumi.getter(name='agreedBy') def agreed_by(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'agreed_by')<|docstring|>Client IP address.<|endoftext|>
67d49115887c5cafb0cfbb13f422ad2893d886d2893f26cf55d62836f099d65f
@property @pulumi.getter(name='agreementKeys') def agreement_keys(self) -> Optional[Sequence[str]]: '\n List of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements API under <code>TopLevelDomain</code> resource.\n ' return pulumi.get(self, 'agreement_keys')
List of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements API under <code>TopLevelDomain</code> resource.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
agreement_keys
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='agreementKeys') def agreement_keys(self) -> Optional[Sequence[str]]: '\n \n ' return pulumi.get(self, 'agreement_keys')
@property @pulumi.getter(name='agreementKeys') def agreement_keys(self) -> Optional[Sequence[str]]: '\n \n ' return pulumi.get(self, 'agreement_keys')<|docstring|>List of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements API under <code>TopLevelDomain</code> res...
7527b8c2f1de0f285a550e3990a0d49e4188a8f64340514adfca8f69ccf0a90a
def __init__(__self__, *, azure_resource_name: Optional[str]=None, azure_resource_type: Optional[str]=None, custom_host_name_dns_record_type: Optional[str]=None, host_name_type: Optional[str]=None, name: Optional[str]=None, site_names: Optional[Sequence[str]]=None): '\n Details of a hostname derived from a d...
Details of a hostname derived from a domain. :param str azure_resource_name: Name of the Azure resource the hostname is assigned to. If it is assigned to a Traffic Manager then it will be the Traffic Manager name otherwise it will be the app name. :param str azure_resource_type: Type of the Azure resource the hostname ...
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, azure_resource_name: Optional[str]=None, azure_resource_type: Optional[str]=None, custom_host_name_dns_record_type: Optional[str]=None, host_name_type: Optional[str]=None, name: Optional[str]=None, site_names: Optional[Sequence[str]]=None): '\n Details of a hostname derived from a d...
def __init__(__self__, *, azure_resource_name: Optional[str]=None, azure_resource_type: Optional[str]=None, custom_host_name_dns_record_type: Optional[str]=None, host_name_type: Optional[str]=None, name: Optional[str]=None, site_names: Optional[Sequence[str]]=None): '\n Details of a hostname derived from a d...
f7ec255e558c6be26c1bcb749026787bc7dbd0f4f5b1ab8e8ba9258e522933b9
@property @pulumi.getter(name='azureResourceName') def azure_resource_name(self) -> Optional[str]: '\n Name of the Azure resource the hostname is assigned to. If it is assigned to a Traffic Manager then it will be the Traffic Manager name otherwise it will be the app name.\n ' return pulumi.get(se...
Name of the Azure resource the hostname is assigned to. If it is assigned to a Traffic Manager then it will be the Traffic Manager name otherwise it will be the app name.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
azure_resource_name
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='azureResourceName') def azure_resource_name(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'azure_resource_name')
@property @pulumi.getter(name='azureResourceName') def azure_resource_name(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'azure_resource_name')<|docstring|>Name of the Azure resource the hostname is assigned to. If it is assigned to a Traffic Manager then it will be the Traffic Manager ...
757552508f740d833e14746ea50430829aeb0e723a1d06853619eab5b2612d25
@property @pulumi.getter(name='azureResourceType') def azure_resource_type(self) -> Optional[str]: '\n Type of the Azure resource the hostname is assigned to.\n ' return pulumi.get(self, 'azure_resource_type')
Type of the Azure resource the hostname is assigned to.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
azure_resource_type
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='azureResourceType') def azure_resource_type(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'azure_resource_type')
@property @pulumi.getter(name='azureResourceType') def azure_resource_type(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'azure_resource_type')<|docstring|>Type of the Azure resource the hostname is assigned to.<|endoftext|>
d205244e6d2eafac0423d16f5f1faaf1c7ae5c59207273a22edcef8fa47c6aaa
@property @pulumi.getter(name='customHostNameDnsRecordType') def custom_host_name_dns_record_type(self) -> Optional[str]: '\n Type of the DNS record.\n ' return pulumi.get(self, 'custom_host_name_dns_record_type')
Type of the DNS record.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
custom_host_name_dns_record_type
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='customHostNameDnsRecordType') def custom_host_name_dns_record_type(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'custom_host_name_dns_record_type')
@property @pulumi.getter(name='customHostNameDnsRecordType') def custom_host_name_dns_record_type(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'custom_host_name_dns_record_type')<|docstring|>Type of the DNS record.<|endoftext|>
2b9c684b8faa0d6c40aefd938209aabb1b7b419384cdbe9e7c7243aed244a643
@property @pulumi.getter(name='hostNameType') def host_name_type(self) -> Optional[str]: '\n Type of the hostname.\n ' return pulumi.get(self, 'host_name_type')
Type of the hostname.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
host_name_type
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='hostNameType') def host_name_type(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'host_name_type')
@property @pulumi.getter(name='hostNameType') def host_name_type(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'host_name_type')<|docstring|>Type of the hostname.<|endoftext|>
9ef39563671c8063dc2b19aaa4d32a036637c89abfa06a09535f2e020c3640dc
@property @pulumi.getter def name(self) -> Optional[str]: '\n Name of the hostname.\n ' return pulumi.get(self, 'name')
Name of the hostname.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
name
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def name(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'name')
@property @pulumi.getter def name(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'name')<|docstring|>Name of the hostname.<|endoftext|>
8d907c17651110a450968518f1e4c0a9954d3b7ecc139df8d8080ec540253e19
@property @pulumi.getter(name='siteNames') def site_names(self) -> Optional[Sequence[str]]: '\n List of apps the hostname is assigned to. This list will have more than one app only if the hostname is pointing to a Traffic Manager.\n ' return pulumi.get(self, 'site_names')
List of apps the hostname is assigned to. This list will have more than one app only if the hostname is pointing to a Traffic Manager.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
site_names
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='siteNames') def site_names(self) -> Optional[Sequence[str]]: '\n \n ' return pulumi.get(self, 'site_names')
@property @pulumi.getter(name='siteNames') def site_names(self) -> Optional[Sequence[str]]: '\n \n ' return pulumi.get(self, 'site_names')<|docstring|>List of apps the hostname is assigned to. This list will have more than one app only if the hostname is pointing to a Traffic Manager.<|endoftext|>
aa70371be71a464e4f2205ed5c7317a360c85b458735923a328a21d6e7b8a224
def __init__(__self__, *, name: Optional[str]=None): '\n Identifies an object.\n :param str name: Name of the object.\n ' if (name is not None): pulumi.set(__self__, 'name', name)
Identifies an object. :param str name: Name of the object.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, name: Optional[str]=None): '\n Identifies an object.\n :param str name: Name of the object.\n ' if (name is not None): pulumi.set(__self__, 'name', name)
def __init__(__self__, *, name: Optional[str]=None): '\n Identifies an object.\n :param str name: Name of the object.\n ' if (name is not None): pulumi.set(__self__, 'name', name)<|docstring|>Identifies an object. :param str name: Name of the object.<|endoftext|>
82b802a8aeeee52fff6f8b378547364efa8e09ef5856925a9b12582e65ffd241
@property @pulumi.getter def name(self) -> Optional[str]: '\n Name of the object.\n ' return pulumi.get(self, 'name')
Name of the object.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
name
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def name(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'name')
@property @pulumi.getter def name(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'name')<|docstring|>Name of the object.<|endoftext|>
94a47dd884fe9dbfb062ed4959ef31b1a7e1fc0220e8a27d9efd95f6d6356469
def __init__(__self__, *, created_at: Optional[str]=None, created_by: Optional[str]=None, created_by_type: Optional[str]=None, last_modified_at: Optional[str]=None, last_modified_by: Optional[str]=None, last_modified_by_type: Optional[str]=None): '\n Metadata pertaining to creation and last modification of t...
Metadata pertaining to creation and last modification of the resource. :param str created_at: The timestamp of resource creation (UTC). :param str created_by: The identity that created the resource. :param str created_by_type: The type of identity that created the resource. :param str last_modified_at: The timestamp of...
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, created_at: Optional[str]=None, created_by: Optional[str]=None, created_by_type: Optional[str]=None, last_modified_at: Optional[str]=None, last_modified_by: Optional[str]=None, last_modified_by_type: Optional[str]=None): '\n Metadata pertaining to creation and last modification of t...
def __init__(__self__, *, created_at: Optional[str]=None, created_by: Optional[str]=None, created_by_type: Optional[str]=None, last_modified_at: Optional[str]=None, last_modified_by: Optional[str]=None, last_modified_by_type: Optional[str]=None): '\n Metadata pertaining to creation and last modification of t...
e5327ee2800d99a9cbbe7bde47291f1c647496707002eb4902d7c8ff27b968b9
@property @pulumi.getter(name='createdAt') def created_at(self) -> Optional[str]: '\n The timestamp of resource creation (UTC).\n ' return pulumi.get(self, 'created_at')
The timestamp of resource creation (UTC).
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
created_at
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='createdAt') def created_at(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'created_at')
@property @pulumi.getter(name='createdAt') def created_at(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'created_at')<|docstring|>The timestamp of resource creation (UTC).<|endoftext|>
527e076fe3b36844fa1ee613514acf4c691ec5c00052af683a0b926eb513d2c2
@property @pulumi.getter(name='createdBy') def created_by(self) -> Optional[str]: '\n The identity that created the resource.\n ' return pulumi.get(self, 'created_by')
The identity that created the resource.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
created_by
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='createdBy') def created_by(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'created_by')
@property @pulumi.getter(name='createdBy') def created_by(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'created_by')<|docstring|>The identity that created the resource.<|endoftext|>
0f880a1086365a1d74c0afc8c7b9e2470f33a14563baf2cc83163212ca968133
@property @pulumi.getter(name='createdByType') def created_by_type(self) -> Optional[str]: '\n The type of identity that created the resource.\n ' return pulumi.get(self, 'created_by_type')
The type of identity that created the resource.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
created_by_type
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='createdByType') def created_by_type(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'created_by_type')
@property @pulumi.getter(name='createdByType') def created_by_type(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'created_by_type')<|docstring|>The type of identity that created the resource.<|endoftext|>
2cf8fd52c412a625c6606d643fe4b2b32be7b731ea5a1595989d697d9752f472
@property @pulumi.getter(name='lastModifiedAt') def last_modified_at(self) -> Optional[str]: '\n The timestamp of resource last modification (UTC)\n ' return pulumi.get(self, 'last_modified_at')
The timestamp of resource last modification (UTC)
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
last_modified_at
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='lastModifiedAt') def last_modified_at(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'last_modified_at')
@property @pulumi.getter(name='lastModifiedAt') def last_modified_at(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'last_modified_at')<|docstring|>The timestamp of resource last modification (UTC)<|endoftext|>
c4b983166ec5bdf701fb701b8072f42e1a255e45f32c6bff555384b2622f549c
@property @pulumi.getter(name='lastModifiedBy') def last_modified_by(self) -> Optional[str]: '\n The identity that last modified the resource.\n ' return pulumi.get(self, 'last_modified_by')
The identity that last modified the resource.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
last_modified_by
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='lastModifiedBy') def last_modified_by(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'last_modified_by')
@property @pulumi.getter(name='lastModifiedBy') def last_modified_by(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'last_modified_by')<|docstring|>The identity that last modified the resource.<|endoftext|>
d45bdc60142433bffd319e8c803988017a9bab94338ab594bcfe68246757766f
@property @pulumi.getter(name='lastModifiedByType') def last_modified_by_type(self) -> Optional[str]: '\n The type of identity that last modified the resource.\n ' return pulumi.get(self, 'last_modified_by_type')
The type of identity that last modified the resource.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
last_modified_by_type
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='lastModifiedByType') def last_modified_by_type(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'last_modified_by_type')
@property @pulumi.getter(name='lastModifiedByType') def last_modified_by_type(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'last_modified_by_type')<|docstring|>The type of identity that last modified the resource.<|endoftext|>
ad16cbc0a4a852cb81e5583f34d2df44ad45c2d3091f07726ceff936c25d4674
def __init__(__self__, *, agreement_key: str, content: str, title: str, url: Optional[str]=None): '\n Legal agreement for a top level domain.\n :param str agreement_key: Unique identifier for the agreement.\n :param str content: Agreement details.\n :param str title: Agreement title.\n ...
Legal agreement for a top level domain. :param str agreement_key: Unique identifier for the agreement. :param str content: Agreement details. :param str title: Agreement title. :param str url: URL where a copy of the agreement details is hosted.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
__init__
pulumi-bot/pulumi-azure-native
31
python
def __init__(__self__, *, agreement_key: str, content: str, title: str, url: Optional[str]=None): '\n Legal agreement for a top level domain.\n :param str agreement_key: Unique identifier for the agreement.\n :param str content: Agreement details.\n :param str title: Agreement title.\n ...
def __init__(__self__, *, agreement_key: str, content: str, title: str, url: Optional[str]=None): '\n Legal agreement for a top level domain.\n :param str agreement_key: Unique identifier for the agreement.\n :param str content: Agreement details.\n :param str title: Agreement title.\n ...
cece0778b86da345e6e0db95b65af2806e001e3956d7b04afcd92beaa70e57a7
@property @pulumi.getter(name='agreementKey') def agreement_key(self) -> str: '\n Unique identifier for the agreement.\n ' return pulumi.get(self, 'agreement_key')
Unique identifier for the agreement.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
agreement_key
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter(name='agreementKey') def agreement_key(self) -> str: '\n \n ' return pulumi.get(self, 'agreement_key')
@property @pulumi.getter(name='agreementKey') def agreement_key(self) -> str: '\n \n ' return pulumi.get(self, 'agreement_key')<|docstring|>Unique identifier for the agreement.<|endoftext|>
3ccb740d090820f5e69af44f44a66a00daf81dfd7be1e023dfb44f5d115f08d1
@property @pulumi.getter def content(self) -> str: '\n Agreement details.\n ' return pulumi.get(self, 'content')
Agreement details.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
content
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def content(self) -> str: '\n \n ' return pulumi.get(self, 'content')
@property @pulumi.getter def content(self) -> str: '\n \n ' return pulumi.get(self, 'content')<|docstring|>Agreement details.<|endoftext|>
d9a09d324862d3d8c7b9b8dfe87d6b5b594ba12b3f40641e1682ab51b5881d88
@property @pulumi.getter def title(self) -> str: '\n Agreement title.\n ' return pulumi.get(self, 'title')
Agreement title.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
title
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def title(self) -> str: '\n \n ' return pulumi.get(self, 'title')
@property @pulumi.getter def title(self) -> str: '\n \n ' return pulumi.get(self, 'title')<|docstring|>Agreement title.<|endoftext|>
89bdc2edacb472071f40826b7ac888c9c490d47cfb472ba1a67e9193f01bc064
@property @pulumi.getter def url(self) -> Optional[str]: '\n URL where a copy of the agreement details is hosted.\n ' return pulumi.get(self, 'url')
URL where a copy of the agreement details is hosted.
sdk/python/pulumi_azure_native/domainregistration/v20201001/outputs.py
url
pulumi-bot/pulumi-azure-native
31
python
@property @pulumi.getter def url(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'url')
@property @pulumi.getter def url(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'url')<|docstring|>URL where a copy of the agreement details is hosted.<|endoftext|>
d40b826db8d91d5f881a1368b97abf7af9603ca9ff483f706cb06a643dd17d70
def exceedingCapacityRemoval(candidate, n, data): '\n Given a solution(candidate) and a nurse\n this function removes any assignment w[n][h] whenever\n capacity is exceeded at some hour h and\n the resulting schedule is valid\n ' for h in range(data['hours']): if ((candida...
Given a solution(candidate) and a nurse this function removes any assignment w[n][h] whenever capacity is exceeded at some hour h and the resulting schedule is valid
Metaheuristics/GRASP/LocalSearch2.py
exceedingCapacityRemoval
presmerats/Nurse-Scheduling-LP-and-Heuristics
1
python
def exceedingCapacityRemoval(candidate, n, data): '\n Given a solution(candidate) and a nurse\n this function removes any assignment w[n][h] whenever\n capacity is exceeded at some hour h and\n the resulting schedule is valid\n ' for h in range(data['hours']): if ((candida...
def exceedingCapacityRemoval(candidate, n, data): '\n Given a solution(candidate) and a nurse\n this function removes any assignment w[n][h] whenever\n capacity is exceeded at some hour h and\n the resulting schedule is valid\n ' for h in range(data['hours']): if ((candida...
6aa72af8ad656109443b4c134f21906eee202d7bfc8c4c5aa0cc60c516fbe80d
def buildNewSol(neighbor, data): '\n given a recently build solution (neighbor)\n this function computes:\n the cost,\n the exceeding capacity,\n the pending assignments\n the total assigned hours\n ' totalw = 0 sumz = 0 columnarSum = [((- 1) ...
given a recently build solution (neighbor) this function computes: the cost, the exceeding capacity, the pending assignments the total assigned hours
Metaheuristics/GRASP/LocalSearch2.py
buildNewSol
presmerats/Nurse-Scheduling-LP-and-Heuristics
1
python
def buildNewSol(neighbor, data): '\n given a recently build solution (neighbor)\n this function computes:\n the cost,\n the exceeding capacity,\n the pending assignments\n the total assigned hours\n ' totalw = 0 sumz = 0 columnarSum = [((- 1) ...
def buildNewSol(neighbor, data): '\n given a recently build solution (neighbor)\n this function computes:\n the cost,\n the exceeding capacity,\n the pending assignments\n the total assigned hours\n ' totalw = 0 sumz = 0 columnarSum = [((- 1) ...
f100e0766aa601f899dbf1796910b60051ec638837cec95dfac4bd92a2a5d8f8
def findCandidate(solution, data, n): ' \n this function returns a new solution that include:\n - 0 hours assigned to nurse n\n - all the hours that where assigned to nurse n\n are assigned to other nurses\n - the solution is valid (constraints)\n ' s = c...
this function returns a new solution that include: - 0 hours assigned to nurse n - all the hours that where assigned to nurse n are assigned to other nurses - the solution is valid (constraints)
Metaheuristics/GRASP/LocalSearch2.py
findCandidate
presmerats/Nurse-Scheduling-LP-and-Heuristics
1
python
def findCandidate(solution, data, n): ' \n this function returns a new solution that include:\n - 0 hours assigned to nurse n\n - all the hours that where assigned to nurse n\n are assigned to other nurses\n - the solution is valid (constraints)\n ' s = c...
def findCandidate(solution, data, n): ' \n this function returns a new solution that include:\n - 0 hours assigned to nurse n\n - all the hours that where assigned to nurse n\n are assigned to other nurses\n - the solution is valid (constraints)\n ' s = c...
fffc7cab6d4352071ccacfc9e65fd34e787da132051ffcd99072307c7741c22a
def nursesAtHourH(solution, h): '\n this function computes the total nurse assignments\n at hour h\n ' sumN = 0 for w in solution['w']: sumN += w[h] return sumN
this function computes the total nurse assignments at hour h
Metaheuristics/GRASP/LocalSearch2.py
nursesAtHourH
presmerats/Nurse-Scheduling-LP-and-Heuristics
1
python
def nursesAtHourH(solution, h): '\n this function computes the total nurse assignments\n at hour h\n ' sumN = 0 for w in solution['w']: sumN += w[h] return sumN
def nursesAtHourH(solution, h): '\n this function computes the total nurse assignments\n at hour h\n ' sumN = 0 for w in solution['w']: sumN += w[h] return sumN<|docstring|>this function computes the total nurse assignments at hour h<|endoftext|>
1672a98df8a1652354b976c7956b70f05e8314e7c2e2c0b9ed624dfbfcff0911
def exceedingNurseHours(solution, data): '\n this function computes and stores the\n exceeding capacity for each hour\n\n ' solution['exceeding'] = ([0] * len(solution['w'][0])) for h in range(data['hours']): solution['exceeding'][h] = (nursesAtHourH(solution, h) - data['demand'][h]) if...
this function computes and stores the exceeding capacity for each hour
Metaheuristics/GRASP/LocalSearch2.py
exceedingNurseHours
presmerats/Nurse-Scheduling-LP-and-Heuristics
1
python
def exceedingNurseHours(solution, data): '\n this function computes and stores the\n exceeding capacity for each hour\n\n ' solution['exceeding'] = ([0] * len(solution['w'][0])) for h in range(data['hours']): solution['exceeding'][h] = (nursesAtHourH(solution, h) - data['demand'][h]) if...
def exceedingNurseHours(solution, data): '\n this function computes and stores the\n exceeding capacity for each hour\n\n ' solution['exceeding'] = ([0] * len(solution['w'][0])) for h in range(data['hours']): solution['exceeding'][h] = (nursesAtHourH(solution, h) - data['demand'][h]) if...
1436dd53ce77947f890b37856df543ccd3270d71fb9e53dbc8485c35ec2cd777
def run(script_args: List) -> int: 'Run the actual script.' from sqlalchemy import create_engine from sqlalchemy import func from sqlalchemy.orm import sessionmaker from influxdb import InfluxDBClient from homeassistant.components.recorder import models from homeassistant.helpers import stat...
Run the actual script.
homeassistant/scripts/influxdb_import.py
run
spacesuitdiver/home-assistant
37
python
def run(script_args: List) -> int: from sqlalchemy import create_engine from sqlalchemy import func from sqlalchemy.orm import sessionmaker from influxdb import InfluxDBClient from homeassistant.components.recorder import models from homeassistant.helpers import state as state_helper fr...
def run(script_args: List) -> int: from sqlalchemy import create_engine from sqlalchemy import func from sqlalchemy.orm import sessionmaker from influxdb import InfluxDBClient from homeassistant.components.recorder import models from homeassistant.helpers import state as state_helper fr...
b028f4a31004762096e7abc225477afefcf4ec6dcab0a8925b5cc4303cd9f8c8
def print_progress(iteration: int, total: int, prefix: str='', suffix: str='', decimals: int=2, bar_length: int=68) -> None: 'Print progress bar.\n\n Call in a loop to create terminal progress bar\n @params:\n iteration - Required : current iteration (Int)\n total - Required : total it...
Print progress bar. Call in a loop to create terminal progress bar @params: iteration - Required : current iteration (Int) total - Required : total iterations (Int) prefix - Optional : prefix string (Str) suffix - Optional : suffix string (Str) decimals - Optional : number...
homeassistant/scripts/influxdb_import.py
print_progress
spacesuitdiver/home-assistant
37
python
def print_progress(iteration: int, total: int, prefix: str=, suffix: str=, decimals: int=2, bar_length: int=68) -> None: 'Print progress bar.\n\n Call in a loop to create terminal progress bar\n @params:\n iteration - Required : current iteration (Int)\n total - Required : total iterat...
def print_progress(iteration: int, total: int, prefix: str=, suffix: str=, decimals: int=2, bar_length: int=68) -> None: 'Print progress bar.\n\n Call in a loop to create terminal progress bar\n @params:\n iteration - Required : current iteration (Int)\n total - Required : total iterat...
3a0be941a762723e5137831baf0f09cf487aa3d237184ad6e3aeb69c0ea8f7a1
def kepclean(infile, outfile=None, zero=True, overwrite=False, verbose=False, logfile='kepclean.log'): '\n Remove NaN values from a kepler light curve or TPF fits file. If passed a TPF\n only cadences where the postage stamp is ALL NaN values will be removed.\n\n Parameters\n ----------\n infile: str...
Remove NaN values from a kepler light curve or TPF fits file. If passed a TPF only cadences where the postage stamp is ALL NaN values will be removed. Parameters ---------- infile: str The name of a MAST standard format FITS file containing a Kepler light curve within the first data extension. outfile: str ...
pyke/kepclean.py
kepclean
christinahedges/PyKE
0
python
def kepclean(infile, outfile=None, zero=True, overwrite=False, verbose=False, logfile='kepclean.log'): '\n Remove NaN values from a kepler light curve or TPF fits file. If passed a TPF\n only cadences where the postage stamp is ALL NaN values will be removed.\n\n Parameters\n ----------\n infile: str...
def kepclean(infile, outfile=None, zero=True, overwrite=False, verbose=False, logfile='kepclean.log'): '\n Remove NaN values from a kepler light curve or TPF fits file. If passed a TPF\n only cadences where the postage stamp is ALL NaN values will be removed.\n\n Parameters\n ----------\n infile: str...
9ed6d775a82ca0f636691a7e7aabdba4834df3062789f19dabb2b44757c14e41
@property def sids(self): "\n This seems to be used to pre-fetch assets.\n I don't think that we need this for live-trading.\n Leaving the list empty.\n " all_sids = [] for exchange_name in self.exchanges: exchange = self.exchanges[exchange_name] exchange.init() ...
This seems to be used to pre-fetch assets. I don't think that we need this for live-trading. Leaving the list empty.
catalyst/exchange/exchange_asset_finder.py
sids
korigod/catalyst
6
python
@property def sids(self): "\n This seems to be used to pre-fetch assets.\n I don't think that we need this for live-trading.\n Leaving the list empty.\n " all_sids = [] for exchange_name in self.exchanges: exchange = self.exchanges[exchange_name] exchange.init() ...
@property def sids(self): "\n This seems to be used to pre-fetch assets.\n I don't think that we need this for live-trading.\n Leaving the list empty.\n " all_sids = [] for exchange_name in self.exchanges: exchange = self.exchanges[exchange_name] exchange.init() ...
86bf7158617c5bf442b81559a7124b658c6d02ce37c119d2064f48e462ec9044
def retrieve_asset(self, sid, default_none=False): '\n Retrieve the first Asset found for a given sid.\n ' asset = None for exchange_name in self.exchanges: if (asset is not None): break exchange = self.exchanges[exchange_name] assets = [a for a in exchange....
Retrieve the first Asset found for a given sid.
catalyst/exchange/exchange_asset_finder.py
retrieve_asset
korigod/catalyst
6
python
def retrieve_asset(self, sid, default_none=False): '\n \n ' asset = None for exchange_name in self.exchanges: if (asset is not None): break exchange = self.exchanges[exchange_name] assets = [a for a in exchange.assets if (a.sid == sid)] if assets: ...
def retrieve_asset(self, sid, default_none=False): '\n \n ' asset = None for exchange_name in self.exchanges: if (asset is not None): break exchange = self.exchanges[exchange_name] assets = [a for a in exchange.assets if (a.sid == sid)] if assets: ...
90f66d1ef33ef30de480464135f376012590e9fc92e24cd92de75d592cd03ce4
def retrieve_all(self, sids, default_none=False): '\n Retrieve all assets in `sids`.\n\n Parameters\n ----------\n sids : iterable of int\n Assets to retrieve.\n default_none : bool\n If True, return None for failed lookups.\n If False, raise `Sids...
Retrieve all assets in `sids`. Parameters ---------- sids : iterable of int Assets to retrieve. default_none : bool If True, return None for failed lookups. If False, raise `SidsNotFound`. Returns ------- assets : list[Asset or None] A list of the same length as `sids` containing Assets (or Nones) ...
catalyst/exchange/exchange_asset_finder.py
retrieve_all
korigod/catalyst
6
python
def retrieve_all(self, sids, default_none=False): '\n Retrieve all assets in `sids`.\n\n Parameters\n ----------\n sids : iterable of int\n Assets to retrieve.\n default_none : bool\n If True, return None for failed lookups.\n If False, raise `Sids...
def retrieve_all(self, sids, default_none=False): '\n Retrieve all assets in `sids`.\n\n Parameters\n ----------\n sids : iterable of int\n Assets to retrieve.\n default_none : bool\n If True, return None for failed lookups.\n If False, raise `Sids...
f0afbf7019711dce51fc6eb1bb07423b5c30c29f534412c43efe007fa37bc3fa
def lookup_symbol(self, symbol, exchange, data_frequency=None, as_of_date=None, fuzzy=False): 'Lookup an asset by symbol.\n\n Parameters\n ----------\n symbol : str\n The ticker symbol to resolve.\n as_of_date : datetime or None\n Look up the last owner of this symb...
Lookup an asset by symbol. Parameters ---------- symbol : str The ticker symbol to resolve. as_of_date : datetime or None Look up the last owner of this symbol as of this datetime. If ``as_of_date`` is None, then this can only resolve the equity if exactly one equity has ever owned the ticker. fuzzy : ...
catalyst/exchange/exchange_asset_finder.py
lookup_symbol
korigod/catalyst
6
python
def lookup_symbol(self, symbol, exchange, data_frequency=None, as_of_date=None, fuzzy=False): 'Lookup an asset by symbol.\n\n Parameters\n ----------\n symbol : str\n The ticker symbol to resolve.\n as_of_date : datetime or None\n Look up the last owner of this symb...
def lookup_symbol(self, symbol, exchange, data_frequency=None, as_of_date=None, fuzzy=False): 'Lookup an asset by symbol.\n\n Parameters\n ----------\n symbol : str\n The ticker symbol to resolve.\n as_of_date : datetime or None\n Look up the last owner of this symb...