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
5ec942de302d4d7d0fdd03d18f4cd427885a451848fa9561def295f1e1a0f890
def register_report(name, implementation): '\n Register a custom reporting function to be used during eval.\n\n This can be useful:\n - if you want to overwrite a report for an existing output type of prediction head (e.g. "per_token")\n - if you have a new type of prediction head and want to add a cust...
Register a custom reporting function to be used during eval. This can be useful: - if you want to overwrite a report for an existing output type of prediction head (e.g. "per_token") - if you have a new type of prediction head and want to add a custom report for it :param name: This must match the `ph_output_type` at...
farm/evaluation/metrics.py
register_report
tstadel/FARM
1
python
def register_report(name, implementation): '\n Register a custom reporting function to be used during eval.\n\n This can be useful:\n - if you want to overwrite a report for an existing output type of prediction head (e.g. "per_token")\n - if you have a new type of prediction head and want to add a cust...
def register_report(name, implementation): '\n Register a custom reporting function to be used during eval.\n\n This can be useful:\n - if you want to overwrite a report for an existing output type of prediction head (e.g. "per_token")\n - if you have a new type of prediction head and want to add a cust...
3cbb73e6c01733a4e69a4b8d0f1408c8200a7f1dbc70e410767b27ee8a3e7f20
def squad(preds, labels): '\n This method calculates squad evaluation metrics a) overall, b) for questions with text answer and c) for questions with no answer\n ' overall_results = squad_base(preds, labels) preds_answer = [pred for (pred, label) in zip(preds, labels) if (((- 1), (- 1)) not in label)]...
This method calculates squad evaluation metrics a) overall, b) for questions with text answer and c) for questions with no answer
farm/evaluation/metrics.py
squad
tstadel/FARM
1
python
def squad(preds, labels): '\n \n ' overall_results = squad_base(preds, labels) preds_answer = [pred for (pred, label) in zip(preds, labels) if (((- 1), (- 1)) not in label)] labels_answer = [label for label in labels if (((- 1), (- 1)) not in label)] answer_results = squad_base(preds_answer, l...
def squad(preds, labels): '\n \n ' overall_results = squad_base(preds, labels) preds_answer = [pred for (pred, label) in zip(preds, labels) if (((- 1), (- 1)) not in label)] labels_answer = [label for label in labels if (((- 1), (- 1)) not in label)] answer_results = squad_base(preds_answer, l...
827c2e7eff633785bc571cc3b99bfe11c0c220bed665edc74292d7ea737f644e
def top_n_accuracy(preds, labels): '\n This method calculates the percentage of documents for which the model makes top n accurate predictions.\n The definition of top n accurate a top n accurate prediction is as follows:\n For any given question document pair, there can be multiple predictions from the mo...
This method calculates the percentage of documents for which the model makes top n accurate predictions. The definition of top n accurate a top n accurate prediction is as follows: For any given question document pair, there can be multiple predictions from the model and multiple labels. If any of those predictions ove...
farm/evaluation/metrics.py
top_n_accuracy
tstadel/FARM
1
python
def top_n_accuracy(preds, labels): '\n This method calculates the percentage of documents for which the model makes top n accurate predictions.\n The definition of top n accurate a top n accurate prediction is as follows:\n For any given question document pair, there can be multiple predictions from the mo...
def top_n_accuracy(preds, labels): '\n This method calculates the percentage of documents for which the model makes top n accurate predictions.\n The definition of top n accurate a top n accurate prediction is as follows:\n For any given question document pair, there can be multiple predictions from the mo...
c3388a2dd4be76a85285023a8ca15eda8d2dec19b9aa833f5d9c2de925b445fb
def text_similarity_acc_and_f1(preds, labels): '\n Returns accuracy and F1 scores for top-1(highest) ranked sequence(context/passage) for each sample/query\n\n :param preds: list of numpy arrays of dimension n1 x n2 containing n2 predicted ranks for n1 sequences/queries\n :type preds: List of numpy array c...
Returns accuracy and F1 scores for top-1(highest) ranked sequence(context/passage) for each sample/query :param preds: list of numpy arrays of dimension n1 x n2 containing n2 predicted ranks for n1 sequences/queries :type preds: List of numpy array containing similarity scores for each sequence in batch :param labels:...
farm/evaluation/metrics.py
text_similarity_acc_and_f1
tstadel/FARM
1
python
def text_similarity_acc_and_f1(preds, labels): '\n Returns accuracy and F1 scores for top-1(highest) ranked sequence(context/passage) for each sample/query\n\n :param preds: list of numpy arrays of dimension n1 x n2 containing n2 predicted ranks for n1 sequences/queries\n :type preds: List of numpy array c...
def text_similarity_acc_and_f1(preds, labels): '\n Returns accuracy and F1 scores for top-1(highest) ranked sequence(context/passage) for each sample/query\n\n :param preds: list of numpy arrays of dimension n1 x n2 containing n2 predicted ranks for n1 sequences/queries\n :type preds: List of numpy array c...
0b92a05c235aed89ae974de0f221801a21aef16383e60de464a34c3601f9b367
def text_similarity_avg_ranks(preds, labels): '\n Calculates average predicted rank of positive sequence(context/passage) for each sample/query\n\n :param preds: list of numpy arrays of dimension n1 x n2 containing n2 predicted ranks for n1 sequences/queries\n :type preds: List of numpy array containing si...
Calculates average predicted rank of positive sequence(context/passage) for each sample/query :param preds: list of numpy arrays of dimension n1 x n2 containing n2 predicted ranks for n1 sequences/queries :type preds: List of numpy array containing similarity scores for each sequence in batch :param labels: list of ar...
farm/evaluation/metrics.py
text_similarity_avg_ranks
tstadel/FARM
1
python
def text_similarity_avg_ranks(preds, labels): '\n Calculates average predicted rank of positive sequence(context/passage) for each sample/query\n\n :param preds: list of numpy arrays of dimension n1 x n2 containing n2 predicted ranks for n1 sequences/queries\n :type preds: List of numpy array containing si...
def text_similarity_avg_ranks(preds, labels): '\n Calculates average predicted rank of positive sequence(context/passage) for each sample/query\n\n :param preds: list of numpy arrays of dimension n1 x n2 containing n2 predicted ranks for n1 sequences/queries\n :type preds: List of numpy array containing si...
7f9586c2f3fd9234f26164670ed5e4ec65ffaa4b8a4ad425c31cd0711c82d3e7
def text_similarity_metric(preds, labels): '\n Returns accuracy, F1 scores and average rank scores for text similarity task\n\n :param preds: list of numpy arrays of dimension n1 x n2 containing n2 predicted ranks for n1 sequences/queries\n :type preds: List of numpy array containing similarity scores for ...
Returns accuracy, F1 scores and average rank scores for text similarity task :param preds: list of numpy arrays of dimension n1 x n2 containing n2 predicted ranks for n1 sequences/queries :type preds: List of numpy array containing similarity scores for each sequence in batch :param labels: list of arrays of dimension...
farm/evaluation/metrics.py
text_similarity_metric
tstadel/FARM
1
python
def text_similarity_metric(preds, labels): '\n Returns accuracy, F1 scores and average rank scores for text similarity task\n\n :param preds: list of numpy arrays of dimension n1 x n2 containing n2 predicted ranks for n1 sequences/queries\n :type preds: List of numpy array containing similarity scores for ...
def text_similarity_metric(preds, labels): '\n Returns accuracy, F1 scores and average rank scores for text similarity task\n\n :param preds: list of numpy arrays of dimension n1 x n2 containing n2 predicted ranks for n1 sequences/queries\n :type preds: List of numpy array containing similarity scores for ...
269f184e814d38c426159181557f309e8d63eb2480704fcab278a6060322c2a9
def __init__(self, name, path, shelves): '\n :param name: = human readable app name - ex -"Painter"\n :param path: = base dir which contains executable - ex: "C:/Program Files/Allegorithmic/Substance Painter 2"\n :param shelves: = [shelf location strings]\n ' self.name = name sel...
:param name: = human readable app name - ex -"Painter" :param path: = base dir which contains executable - ex: "C:/Program Files/Allegorithmic/Substance Painter 2" :param shelves: = [shelf location strings]
templates/app.py
__init__
pwentrys/SubstanceHelpers
2
python
def __init__(self, name, path, shelves): '\n :param name: = human readable app name - ex -"Painter"\n :param path: = base dir which contains executable - ex: "C:/Program Files/Allegorithmic/Substance Painter 2"\n :param shelves: = [shelf location strings]\n ' self.name = name sel...
def __init__(self, name, path, shelves): '\n :param name: = human readable app name - ex -"Painter"\n :param path: = base dir which contains executable - ex: "C:/Program Files/Allegorithmic/Substance Painter 2"\n :param shelves: = [shelf location strings]\n ' self.name = name sel...
acfed3f8622c2d65035f9617ef38c8dbd00781fcf40c7629ca97902cf301ff0f
def hIndex(self, citations): '\n :type citations: List[int]\n :rtype: int\n ' if (not citations): return 0 if (len(citations) == 1): if (citations[0] > 0): return 1 else: return 0 citations.sort(reverse=True) index = 1 while (i...
:type citations: List[int] :rtype: int
leetcode/274.H指数.py
hIndex
ResolveWang/algorithm_qa
79
python
def hIndex(self, citations): '\n :type citations: List[int]\n :rtype: int\n ' if (not citations): return 0 if (len(citations) == 1): if (citations[0] > 0): return 1 else: return 0 citations.sort(reverse=True) index = 1 while (i...
def hIndex(self, citations): '\n :type citations: List[int]\n :rtype: int\n ' if (not citations): return 0 if (len(citations) == 1): if (citations[0] > 0): return 1 else: return 0 citations.sort(reverse=True) index = 1 while (i...
57e47181f02c64fbed8f34a48a415627e4424cb160e080deb9b6f56c27fa422d
def __init__(self, keep_recent=10, keep_freq=0.5, checkpoint_dir=None, var_collections=tf.GraphKeys.GLOBAL_VARIABLES): '\n Args:\n keep_recent(int): see ``tf.train.Saver`` documentation.\n keep_freq(int): see ``tf.train.Saver`` documentation.\n checkpoint_dir (str): Defaults ...
Args: keep_recent(int): see ``tf.train.Saver`` documentation. keep_freq(int): see ``tf.train.Saver`` documentation. checkpoint_dir (str): Defaults to ``logger.LOG_DIR``. var_collections (str or list of str): collection of the variables (or list of collections) to save.
multilstm_tensorpack/tensorpack/callbacks/saver.py
__init__
neale/A4C
1
python
def __init__(self, keep_recent=10, keep_freq=0.5, checkpoint_dir=None, var_collections=tf.GraphKeys.GLOBAL_VARIABLES): '\n Args:\n keep_recent(int): see ``tf.train.Saver`` documentation.\n keep_freq(int): see ``tf.train.Saver`` documentation.\n checkpoint_dir (str): Defaults ...
def __init__(self, keep_recent=10, keep_freq=0.5, checkpoint_dir=None, var_collections=tf.GraphKeys.GLOBAL_VARIABLES): '\n Args:\n keep_recent(int): see ``tf.train.Saver`` documentation.\n keep_freq(int): see ``tf.train.Saver`` documentation.\n checkpoint_dir (str): Defaults ...
96ec18937076e6971c4dc0e547817385fbdb5000dbde4c9dc0bb04eb2e27c477
def __init__(self, monitor_stat, reverse=False, filename=None): '\n Args:\n monitor_stat(str): the name of the statistics.\n reverse (bool): if True, will save the maximum.\n filename (str): the name for the saved model.\n Defaults to ``min-{monitor_stat}.tfmod...
Args: monitor_stat(str): the name of the statistics. reverse (bool): if True, will save the maximum. filename (str): the name for the saved model. Defaults to ``min-{monitor_stat}.tfmodel``. Example: Save the model with minimum validation error to "min-val-error.tfmodel": .. code-block...
multilstm_tensorpack/tensorpack/callbacks/saver.py
__init__
neale/A4C
1
python
def __init__(self, monitor_stat, reverse=False, filename=None): '\n Args:\n monitor_stat(str): the name of the statistics.\n reverse (bool): if True, will save the maximum.\n filename (str): the name for the saved model.\n Defaults to ``min-{monitor_stat}.tfmod...
def __init__(self, monitor_stat, reverse=False, filename=None): '\n Args:\n monitor_stat(str): the name of the statistics.\n reverse (bool): if True, will save the maximum.\n filename (str): the name for the saved model.\n Defaults to ``min-{monitor_stat}.tfmod...
e596330ed466eb711434bea2902cc7bea8e8e374734aa1c4d2a08d2408934256
def __init__(self, monitor_stat, filename=None): '\n Args:\n monitor_stat(str): the name of the statistics.\n filename (str): the name for the saved model.\n Defaults to ``max-{monitor_stat}.tfmodel``.\n ' super(MaxSaver, self).__init__(monitor_stat, True, file...
Args: monitor_stat(str): the name of the statistics. filename (str): the name for the saved model. Defaults to ``max-{monitor_stat}.tfmodel``.
multilstm_tensorpack/tensorpack/callbacks/saver.py
__init__
neale/A4C
1
python
def __init__(self, monitor_stat, filename=None): '\n Args:\n monitor_stat(str): the name of the statistics.\n filename (str): the name for the saved model.\n Defaults to ``max-{monitor_stat}.tfmodel``.\n ' super(MaxSaver, self).__init__(monitor_stat, True, file...
def __init__(self, monitor_stat, filename=None): '\n Args:\n monitor_stat(str): the name of the statistics.\n filename (str): the name for the saved model.\n Defaults to ``max-{monitor_stat}.tfmodel``.\n ' super(MaxSaver, self).__init__(monitor_stat, True, file...
b8e9efa04c78e86d306c109298d52d04bfc5177f6f87c1d01d8cb3ec9d5cca64
def __init__(self, node_def, op, message, error_code): 'Creates a new OpError indicating that a particular op failed.\n\n Args:\n node_def: The graph_pb2.NodeDef proto representing the op that failed.\n op: The ops.Operation that failed, if known; otherwise None.\n message: The message string desc...
Creates a new OpError indicating that a particular op failed. Args: node_def: The graph_pb2.NodeDef proto representing the op that failed. op: The ops.Operation that failed, if known; otherwise None. message: The message string describing the failure. error_code: The error_codes_pb2.Code describing the error.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message, error_code): 'Creates a new OpError indicating that a particular op failed.\n\n Args:\n node_def: The graph_pb2.NodeDef proto representing the op that failed.\n op: The ops.Operation that failed, if known; otherwise None.\n message: The message string desc...
def __init__(self, node_def, op, message, error_code): 'Creates a new OpError indicating that a particular op failed.\n\n Args:\n node_def: The graph_pb2.NodeDef proto representing the op that failed.\n op: The ops.Operation that failed, if known; otherwise None.\n message: The message string desc...
c1fe98bc091628c94b30295d3b446eed16229af499847e94f59edbaa80e44317
@property def message(self): 'The error message that describes the error.' return self._message
The error message that describes the error.
tensorflow/python/framework/errors.py
message
MikalaiDrabovich/tensorflow
4
python
@property def message(self): return self._message
@property def message(self): return self._message<|docstring|>The error message that describes the error.<|endoftext|>
0b1025abfad585fcb62cab105ce05a15ec6ac0cc7f7c3c42ea66940cb0280f21
@property def op(self): 'The operation that failed, if known.\n\n *N.B.* If the failed op was synthesized at runtime, e.g. a `Send`\n or `Recv` op, there will be no corresponding\n [`Operation`](../../api_docs/python/framework.md#Operation) object. In that case, this\n will return `None`, and you shoul...
The operation that failed, if known. *N.B.* If the failed op was synthesized at runtime, e.g. a `Send` or `Recv` op, there will be no corresponding [`Operation`](../../api_docs/python/framework.md#Operation) object. In that case, this will return `None`, and you should instead use the [`OpError.node_def`](#OpError.no...
tensorflow/python/framework/errors.py
op
MikalaiDrabovich/tensorflow
4
python
@property def op(self): 'The operation that failed, if known.\n\n *N.B.* If the failed op was synthesized at runtime, e.g. a `Send`\n or `Recv` op, there will be no corresponding\n [`Operation`](../../api_docs/python/framework.md#Operation) object. In that case, this\n will return `None`, and you shoul...
@property def op(self): 'The operation that failed, if known.\n\n *N.B.* If the failed op was synthesized at runtime, e.g. a `Send`\n or `Recv` op, there will be no corresponding\n [`Operation`](../../api_docs/python/framework.md#Operation) object. In that case, this\n will return `None`, and you shoul...
da9e2d27410b6fc6216ac00699550735bfe45143b9c747114c63e2a58008bdb6
@property def error_code(self): 'The integer error code that describes the error.' return self._error_code
The integer error code that describes the error.
tensorflow/python/framework/errors.py
error_code
MikalaiDrabovich/tensorflow
4
python
@property def error_code(self): return self._error_code
@property def error_code(self): return self._error_code<|docstring|>The integer error code that describes the error.<|endoftext|>
2635843855cf0f3a9dd651b0bfb98c325d887b81107426675dfc970590386ef2
@property def node_def(self): 'The `NodeDef` proto representing the op that failed.' return self._node_def
The `NodeDef` proto representing the op that failed.
tensorflow/python/framework/errors.py
node_def
MikalaiDrabovich/tensorflow
4
python
@property def node_def(self): return self._node_def
@property def node_def(self): return self._node_def<|docstring|>The `NodeDef` proto representing the op that failed.<|endoftext|>
842b57470e91f49ceec4cec9df8f32650be2a1803a56c05d1c4d5cf1eeff3a48
def __init__(self, node_def, op, message): 'Creates a `CancelledError`.' super(CancelledError, self).__init__(node_def, op, message, CANCELLED)
Creates a `CancelledError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(CancelledError, self).__init__(node_def, op, message, CANCELLED)
def __init__(self, node_def, op, message): super(CancelledError, self).__init__(node_def, op, message, CANCELLED)<|docstring|>Creates a `CancelledError`.<|endoftext|>
6e8aa272c8c45e6440e943d6441e391c5c77c8781a939a5f2cf8228438f97efe
def __init__(self, node_def, op, message, error_code=UNKNOWN): 'Creates an `UnknownError`.' super(UnknownError, self).__init__(node_def, op, message, error_code)
Creates an `UnknownError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message, error_code=UNKNOWN): super(UnknownError, self).__init__(node_def, op, message, error_code)
def __init__(self, node_def, op, message, error_code=UNKNOWN): super(UnknownError, self).__init__(node_def, op, message, error_code)<|docstring|>Creates an `UnknownError`.<|endoftext|>
c831835b070859e70cfe1f249a6ba3ef1e821e28fc157f0646e91a16ed7d5fc4
def __init__(self, node_def, op, message): 'Creates an `InvalidArgumentError`.' super(InvalidArgumentError, self).__init__(node_def, op, message, INVALID_ARGUMENT)
Creates an `InvalidArgumentError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(InvalidArgumentError, self).__init__(node_def, op, message, INVALID_ARGUMENT)
def __init__(self, node_def, op, message): super(InvalidArgumentError, self).__init__(node_def, op, message, INVALID_ARGUMENT)<|docstring|>Creates an `InvalidArgumentError`.<|endoftext|>
18ba56508ab2e71d08c4dcf5b30e5eb6042c54734c524b4c54cadffe081f2ccf
def __init__(self, node_def, op, message): 'Creates a `DeadlineExceededError`.' super(DeadlineExceededError, self).__init__(node_def, op, message, DEADLINE_EXCEEDED)
Creates a `DeadlineExceededError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(DeadlineExceededError, self).__init__(node_def, op, message, DEADLINE_EXCEEDED)
def __init__(self, node_def, op, message): super(DeadlineExceededError, self).__init__(node_def, op, message, DEADLINE_EXCEEDED)<|docstring|>Creates a `DeadlineExceededError`.<|endoftext|>
48d57263cc245ca9228ca11f70760b0ec1241a0ee47cab504000b1cb4a85be26
def __init__(self, node_def, op, message): 'Creates a `NotFoundError`.' super(NotFoundError, self).__init__(node_def, op, message, NOT_FOUND)
Creates a `NotFoundError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(NotFoundError, self).__init__(node_def, op, message, NOT_FOUND)
def __init__(self, node_def, op, message): super(NotFoundError, self).__init__(node_def, op, message, NOT_FOUND)<|docstring|>Creates a `NotFoundError`.<|endoftext|>
f671ce39622e0cc85f49bd486ba9f998f9b838e1180e8564cb46a1dd58283548
def __init__(self, node_def, op, message): 'Creates an `AlreadyExistsError`.' super(AlreadyExistsError, self).__init__(node_def, op, message, ALREADY_EXISTS)
Creates an `AlreadyExistsError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(AlreadyExistsError, self).__init__(node_def, op, message, ALREADY_EXISTS)
def __init__(self, node_def, op, message): super(AlreadyExistsError, self).__init__(node_def, op, message, ALREADY_EXISTS)<|docstring|>Creates an `AlreadyExistsError`.<|endoftext|>
d9b6c4bd1ad83db37026cf92e747753dba9c5e3e4172f44d7db58a49e4b164e2
def __init__(self, node_def, op, message): 'Creates a `PermissionDeniedError`.' super(PermissionDeniedError, self).__init__(node_def, op, message, PERMISSION_DENIED)
Creates a `PermissionDeniedError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(PermissionDeniedError, self).__init__(node_def, op, message, PERMISSION_DENIED)
def __init__(self, node_def, op, message): super(PermissionDeniedError, self).__init__(node_def, op, message, PERMISSION_DENIED)<|docstring|>Creates a `PermissionDeniedError`.<|endoftext|>
1e97a59976ece5f15fa47db3c977252dbe8c5431c6dde36f2a5b263337eb8535
def __init__(self, node_def, op, message): 'Creates an `UnauthenticatedError`.' super(UnauthenticatedError, self).__init__(node_def, op, message, UNAUTHENTICATED)
Creates an `UnauthenticatedError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(UnauthenticatedError, self).__init__(node_def, op, message, UNAUTHENTICATED)
def __init__(self, node_def, op, message): super(UnauthenticatedError, self).__init__(node_def, op, message, UNAUTHENTICATED)<|docstring|>Creates an `UnauthenticatedError`.<|endoftext|>
c63c25f7fab630297fcd71c9d51c5ea959ec8d97a77a4375dcccb68c393cd257
def __init__(self, node_def, op, message): 'Creates a `ResourceExhaustedError`.' super(ResourceExhaustedError, self).__init__(node_def, op, message, RESOURCE_EXHAUSTED)
Creates a `ResourceExhaustedError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(ResourceExhaustedError, self).__init__(node_def, op, message, RESOURCE_EXHAUSTED)
def __init__(self, node_def, op, message): super(ResourceExhaustedError, self).__init__(node_def, op, message, RESOURCE_EXHAUSTED)<|docstring|>Creates a `ResourceExhaustedError`.<|endoftext|>
72af08ce327f9fd3ab2b3b22b8f1722dfa1c385e0d6dae23123e05827b3d1324
def __init__(self, node_def, op, message): 'Creates a `FailedPreconditionError`.' super(FailedPreconditionError, self).__init__(node_def, op, message, FAILED_PRECONDITION)
Creates a `FailedPreconditionError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(FailedPreconditionError, self).__init__(node_def, op, message, FAILED_PRECONDITION)
def __init__(self, node_def, op, message): super(FailedPreconditionError, self).__init__(node_def, op, message, FAILED_PRECONDITION)<|docstring|>Creates a `FailedPreconditionError`.<|endoftext|>
9a2b0a69b30b1a9ec5fb24eed4d32337a83f12c57429aafb8ef90114e97de7f8
def __init__(self, node_def, op, message): 'Creates an `AbortedError`.' super(AbortedError, self).__init__(node_def, op, message, ABORTED)
Creates an `AbortedError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(AbortedError, self).__init__(node_def, op, message, ABORTED)
def __init__(self, node_def, op, message): super(AbortedError, self).__init__(node_def, op, message, ABORTED)<|docstring|>Creates an `AbortedError`.<|endoftext|>
b3ae4c65c026910dbddecef591763eee5f5ce9f4334f0c5bc230449f3e617852
def __init__(self, node_def, op, message): 'Creates an `OutOfRangeError`.' super(OutOfRangeError, self).__init__(node_def, op, message, OUT_OF_RANGE)
Creates an `OutOfRangeError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(OutOfRangeError, self).__init__(node_def, op, message, OUT_OF_RANGE)
def __init__(self, node_def, op, message): super(OutOfRangeError, self).__init__(node_def, op, message, OUT_OF_RANGE)<|docstring|>Creates an `OutOfRangeError`.<|endoftext|>
eb238eefcc61e7d71e961a2631ff543c61112661aab0594c2344e72e0953f89a
def __init__(self, node_def, op, message): 'Creates an `UnimplementedError`.' super(UnimplementedError, self).__init__(node_def, op, message, UNIMPLEMENTED)
Creates an `UnimplementedError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(UnimplementedError, self).__init__(node_def, op, message, UNIMPLEMENTED)
def __init__(self, node_def, op, message): super(UnimplementedError, self).__init__(node_def, op, message, UNIMPLEMENTED)<|docstring|>Creates an `UnimplementedError`.<|endoftext|>
fba52d62a3775ed063340527c2385f2ff450470cdd5130f6fae7cf070fb3ca5f
def __init__(self, node_def, op, message): 'Creates an `InternalError`.' super(InternalError, self).__init__(node_def, op, message, INTERNAL)
Creates an `InternalError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(InternalError, self).__init__(node_def, op, message, INTERNAL)
def __init__(self, node_def, op, message): super(InternalError, self).__init__(node_def, op, message, INTERNAL)<|docstring|>Creates an `InternalError`.<|endoftext|>
3d68f98e089e3f1f5a430559bf78c25ed835caca3b6f57bccfafe04b8bf47193
def __init__(self, node_def, op, message): 'Creates an `UnavailableError`.' super(UnavailableError, self).__init__(node_def, op, message, UNAVAILABLE)
Creates an `UnavailableError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(UnavailableError, self).__init__(node_def, op, message, UNAVAILABLE)
def __init__(self, node_def, op, message): super(UnavailableError, self).__init__(node_def, op, message, UNAVAILABLE)<|docstring|>Creates an `UnavailableError`.<|endoftext|>
ff60827f7f67a20db888229180c661f405b0f10e3b4030d5d833e30b641dab17
def __init__(self, node_def, op, message): 'Creates a `DataLossError`.' super(DataLossError, self).__init__(node_def, op, message, DATA_LOSS)
Creates a `DataLossError`.
tensorflow/python/framework/errors.py
__init__
MikalaiDrabovich/tensorflow
4
python
def __init__(self, node_def, op, message): super(DataLossError, self).__init__(node_def, op, message, DATA_LOSS)
def __init__(self, node_def, op, message): super(DataLossError, self).__init__(node_def, op, message, DATA_LOSS)<|docstring|>Creates a `DataLossError`.<|endoftext|>
1d25701856510559ede1a6d1a5c68c422632056900e3022bce629c16bad969fc
def get_refit_filename(lo_which_comb): 'Get a refit filename using the specified arguments.\n ' return saving_gmm_utils.get_refit_filename(df=args.df, degree=args.degree, num_components=gmm.num_components, lo_num_times=args.lo_num_times, lo_which_comb=lo_which_comb, lo_max_num_timepoints=args.lo_max_num_...
Get a refit filename using the specified arguments.
genomics/cluster_scripts/calculate_prediction_errors.py
get_refit_filename
rgiordan/AISTATS2019SwissArmyIJ
6
python
def get_refit_filename(lo_which_comb): '\n ' return saving_gmm_utils.get_refit_filename(df=args.df, degree=args.degree, num_components=gmm.num_components, lo_num_times=args.lo_num_times, lo_which_comb=lo_which_comb, lo_max_num_timepoints=args.lo_max_num_timepoints, init_method=args.init_method)
def get_refit_filename(lo_which_comb): '\n ' return saving_gmm_utils.get_refit_filename(df=args.df, degree=args.degree, num_components=gmm.num_components, lo_num_times=args.lo_num_times, lo_which_comb=lo_which_comb, lo_max_num_timepoints=args.lo_max_num_timepoints, init_method=args.init_method)<|docstrin...
5c769afd78fce44dd00692fcaa3e798086a422a672c736c6642e137fc8ccde9e
def ZZZ(self): 'hardcoded/mock instance of the class' return ExporterEventKind()
hardcoded/mock instance of the class
release/stubs.min/System/Runtime/InteropServices/__init___parts/ExporterEventKind.py
ZZZ
tranconbv/ironpython-stubs
0
python
def ZZZ(self): return ExporterEventKind()
def ZZZ(self): return ExporterEventKind()<|docstring|>hardcoded/mock instance of the class<|endoftext|>
c7f27d24ea4959e4c997eaff22d7d1bf4a38bb10ba31458b90069eef5ea6eed0
def __eq__(self, *args): ' x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y ' pass
x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y
release/stubs.min/System/Runtime/InteropServices/__init___parts/ExporterEventKind.py
__eq__
tranconbv/ironpython-stubs
0
python
def __eq__(self, *args): ' ' pass
def __eq__(self, *args): ' ' pass<|docstring|>x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y<|endoftext|>
ada11d26366342d19ddf94f50604d65258a36c58cfc3ac043990b0b26b3c935d
def __format__(self, *args): ' __format__(formattable: IFormattable,format: str) -> str ' pass
__format__(formattable: IFormattable,format: str) -> str
release/stubs.min/System/Runtime/InteropServices/__init___parts/ExporterEventKind.py
__format__
tranconbv/ironpython-stubs
0
python
def __format__(self, *args): ' ' pass
def __format__(self, *args): ' ' pass<|docstring|>__format__(formattable: IFormattable,format: str) -> str<|endoftext|>
32b5271afcd5ecc37febb67dd854fa2d1b2c4c68b2c41d2ec119d33157e9bbaa
def __init__(self, *args): ' x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature ' pass
x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature
release/stubs.min/System/Runtime/InteropServices/__init___parts/ExporterEventKind.py
__init__
tranconbv/ironpython-stubs
0
python
def __init__(self, *args): ' ' pass
def __init__(self, *args): ' ' pass<|docstring|>x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature<|endoftext|>
ce386cc7f3d16b79f88f42e71fda135265291583305fc4ee8331c951f76154ff
def davis_wetmask(X, Y): 'The wet mask for a recreation of Davis et al. (2014).' wetmask = np.zeros(X.shape, dtype=np.float64) wetmask[((((Y - 1965000.0) ** 2) + ((X - 765000.0) ** 2)) < (750000.0 ** 2))] = 1 wetmask[(((X - 765000.0) ** 2) < (75000.0 ** 2))] = 1 wetmask[(Y < 780000.0)] = 1 wetma...
The wet mask for a recreation of Davis et al. (2014).
reproductions/run_davis_et_al_2014.py
davis_wetmask
edoddridge/aronnax
17
python
def davis_wetmask(X, Y): wetmask = np.zeros(X.shape, dtype=np.float64) wetmask[((((Y - 1965000.0) ** 2) + ((X - 765000.0) ** 2)) < (750000.0 ** 2))] = 1 wetmask[(((X - 765000.0) ** 2) < (75000.0 ** 2))] = 1 wetmask[(Y < 780000.0)] = 1 wetmask[(0, :)] = 0 wetmask[((- 1), :)] = 0 wetmask[...
def davis_wetmask(X, Y): wetmask = np.zeros(X.shape, dtype=np.float64) wetmask[((((Y - 1965000.0) ** 2) + ((X - 765000.0) ** 2)) < (750000.0 ** 2))] = 1 wetmask[(((X - 765000.0) ** 2) < (75000.0 ** 2))] = 1 wetmask[(Y < 780000.0)] = 1 wetmask[(0, :)] = 0 wetmask[((- 1), :)] = 0 wetmask[...
16a0679f60744b09d8e4ff6b6e18bc77093237022f9f709315cbfdf95520e62e
def davis_sponge_h_timescale(X, Y): 'Produce the sponge timescale file used by Davis et al. (2014).' sponge_h_timescale = np.zeros(X.shape, dtype=np.float64) sponge_h_timescale[(Y < 480000.0)] = (1 / ((1.0 * 30.0) * 86400.0)) plt.figure() plt.pcolormesh(X, Y, ((sponge_h_timescale * 86400.0) * 30.0))...
Produce the sponge timescale file used by Davis et al. (2014).
reproductions/run_davis_et_al_2014.py
davis_sponge_h_timescale
edoddridge/aronnax
17
python
def davis_sponge_h_timescale(X, Y): sponge_h_timescale = np.zeros(X.shape, dtype=np.float64) sponge_h_timescale[(Y < 480000.0)] = (1 / ((1.0 * 30.0) * 86400.0)) plt.figure() plt.pcolormesh(X, Y, ((sponge_h_timescale * 86400.0) * 30.0)) plt.colorbar() plt.axes().set_aspect('equal', 'datalim'...
def davis_sponge_h_timescale(X, Y): sponge_h_timescale = np.zeros(X.shape, dtype=np.float64) sponge_h_timescale[(Y < 480000.0)] = (1 / ((1.0 * 30.0) * 86400.0)) plt.figure() plt.pcolormesh(X, Y, ((sponge_h_timescale * 86400.0) * 30.0)) plt.colorbar() plt.axes().set_aspect('equal', 'datalim'...
202f28d672d2116cb1952db859ab1ea678b943eb1a8c7030777ded96ab00729d
def davis_sponge_h(X, Y): 'Produce the sponge file used by Davis et al. (2014).' sponge_h = (400.0 * np.ones(X.shape, dtype=np.float64)) plt.figure() plt.pcolormesh(X, Y, sponge_h) plt.colorbar() plt.axes().set_aspect('equal', 'datalim') plt.savefig('sponge_h.png', dpi=150) plt.close() ...
Produce the sponge file used by Davis et al. (2014).
reproductions/run_davis_et_al_2014.py
davis_sponge_h
edoddridge/aronnax
17
python
def davis_sponge_h(X, Y): sponge_h = (400.0 * np.ones(X.shape, dtype=np.float64)) plt.figure() plt.pcolormesh(X, Y, sponge_h) plt.colorbar() plt.axes().set_aspect('equal', 'datalim') plt.savefig('sponge_h.png', dpi=150) plt.close() return sponge_h
def davis_sponge_h(X, Y): sponge_h = (400.0 * np.ones(X.shape, dtype=np.float64)) plt.figure() plt.pcolormesh(X, Y, sponge_h) plt.colorbar() plt.axes().set_aspect('equal', 'datalim') plt.savefig('sponge_h.png', dpi=150) plt.close() return sponge_h<|docstring|>Produce the sponge file...
0548a9296da10d214520dbaf248c2eb0080b0df16975edf0cc905799f4c0c586
def block_split(X, Y, out): '\n Split the data training and testing\n :return: X (data) and Y (label) for training / testing\n ' num_samples = X.shape[0] if (out == 'svhn'): partition = 26032 else: partition = 10000 (X_adv, Y_adv) = (X[:partition], Y[:partition]) (X_norm...
Split the data training and testing :return: X (data) and Y (label) for training / testing
expts/detectors/deep_mahalanobis/lib_regression.py
block_split
jayaram-r/adversarial-detection
12
python
def block_split(X, Y, out): '\n Split the data training and testing\n :return: X (data) and Y (label) for training / testing\n ' num_samples = X.shape[0] if (out == 'svhn'): partition = 26032 else: partition = 10000 (X_adv, Y_adv) = (X[:partition], Y[:partition]) (X_norm...
def block_split(X, Y, out): '\n Split the data training and testing\n :return: X (data) and Y (label) for training / testing\n ' num_samples = X.shape[0] if (out == 'svhn'): partition = 26032 else: partition = 10000 (X_adv, Y_adv) = (X[:partition], Y[:partition]) (X_norm...
93f703a808e1bcae33e4412c8d31b4430b08fa0f324ba059140f732c19ff77dd
def block_split_adv(X, Y): '\n Split the data training and testing\n :return: X (data) and Y (label) for training / testing\n ' num_samples = X.shape[0] partition = int((num_samples / 3)) (X_adv, Y_adv) = (X[:partition], Y[:partition]) (X_norm, Y_norm) = (X[partition:(2 * partition)], Y[par...
Split the data training and testing :return: X (data) and Y (label) for training / testing
expts/detectors/deep_mahalanobis/lib_regression.py
block_split_adv
jayaram-r/adversarial-detection
12
python
def block_split_adv(X, Y): '\n Split the data training and testing\n :return: X (data) and Y (label) for training / testing\n ' num_samples = X.shape[0] partition = int((num_samples / 3)) (X_adv, Y_adv) = (X[:partition], Y[:partition]) (X_norm, Y_norm) = (X[partition:(2 * partition)], Y[par...
def block_split_adv(X, Y): '\n Split the data training and testing\n :return: X (data) and Y (label) for training / testing\n ' num_samples = X.shape[0] partition = int((num_samples / 3)) (X_adv, Y_adv) = (X[:partition], Y[:partition]) (X_norm, Y_norm) = (X[partition:(2 * partition)], Y[par...
b36c6ff025e1ca17c0d9eb74b453271a238679abfe38dd8d4a9fcc2062901d31
def detection_performance(regressor, X, Y, outf): '\n Measure the detection performance\n return: detection metrics\n ' num_samples = X.shape[0] l1 = open(('%s/confidence_TMP_In.txt' % outf), 'w') l2 = open(('%s/confidence_TMP_Out.txt' % outf), 'w') y_pred = regressor.predict_proba(X)[(:, 1...
Measure the detection performance return: detection metrics
expts/detectors/deep_mahalanobis/lib_regression.py
detection_performance
jayaram-r/adversarial-detection
12
python
def detection_performance(regressor, X, Y, outf): '\n Measure the detection performance\n return: detection metrics\n ' num_samples = X.shape[0] l1 = open(('%s/confidence_TMP_In.txt' % outf), 'w') l2 = open(('%s/confidence_TMP_Out.txt' % outf), 'w') y_pred = regressor.predict_proba(X)[(:, 1...
def detection_performance(regressor, X, Y, outf): '\n Measure the detection performance\n return: detection metrics\n ' num_samples = X.shape[0] l1 = open(('%s/confidence_TMP_In.txt' % outf), 'w') l2 = open(('%s/confidence_TMP_Out.txt' % outf), 'w') y_pred = regressor.predict_proba(X)[(:, 1...
5af5f234a485dee66be1b51a83f89f2aac1385b64c6613f6a184b7ab543f01f8
def load_characteristics(score, dataset, out_type, outf): '\n Load the calculated scores\n return: data and label of input score\n ' (X, Y) = (None, None) file_name = os.path.join(outf, ('%s_%s_%s.npy' % (score, dataset, out_type))) data = np.load(file_name) if (X is None): X = data...
Load the calculated scores return: data and label of input score
expts/detectors/deep_mahalanobis/lib_regression.py
load_characteristics
jayaram-r/adversarial-detection
12
python
def load_characteristics(score, dataset, out_type, outf): '\n Load the calculated scores\n return: data and label of input score\n ' (X, Y) = (None, None) file_name = os.path.join(outf, ('%s_%s_%s.npy' % (score, dataset, out_type))) data = np.load(file_name) if (X is None): X = data...
def load_characteristics(score, dataset, out_type, outf): '\n Load the calculated scores\n return: data and label of input score\n ' (X, Y) = (None, None) file_name = os.path.join(outf, ('%s_%s_%s.npy' % (score, dataset, out_type))) data = np.load(file_name) if (X is None): X = data...
93959c104048130cb46c82ecea94aca2cd8f981088b62dd1ea09b4469207f53a
def make_item() -> pystac.Item: 'Create basic test items that are only slightly different.' asset_id = 'an/asset' start = datetime.datetime(2018, 1, 2) item = pystac.Item(id=asset_id, geometry=None, bbox=None, datetime=start, properties={}) item.ext.enable(pystac.Extensions.SAT) return item
Create basic test items that are only slightly different.
tests/extensions/test_sat.py
make_item
kylebarron/pystac
0
python
def make_item() -> pystac.Item: asset_id = 'an/asset' start = datetime.datetime(2018, 1, 2) item = pystac.Item(id=asset_id, geometry=None, bbox=None, datetime=start, properties={}) item.ext.enable(pystac.Extensions.SAT) return item
def make_item() -> pystac.Item: asset_id = 'an/asset' start = datetime.datetime(2018, 1, 2) item = pystac.Item(id=asset_id, geometry=None, bbox=None, datetime=start, properties={}) item.ext.enable(pystac.Extensions.SAT) return item<|docstring|>Create basic test items that are only slightly diff...
9a2be209938811e722db29da1f0e7082ae8ea87066f3b979c880c9ea67a063e9
def helper(self, lists: List[ListNode], l: int, r: int) -> ListNode: '\n 递归帮助类\n Args:\n lists: 链表\n l: 坐标\n r: 右边\n Returns:\n 合并后链表\n ' if (l == r): return lists[l] mid = ((l + r) / 2) return self.merge(self.helper(list...
递归帮助类 Args: lists: 链表 l: 坐标 r: 右边 Returns: 合并后链表
src/leetcodepython/top100likedquestions/merge_k_sorted_lists_23.py
helper
zhangyu345293721/leetcode
90
python
def helper(self, lists: List[ListNode], l: int, r: int) -> ListNode: '\n 递归帮助类\n Args:\n lists: 链表\n l: 坐标\n r: 右边\n Returns:\n 合并后链表\n ' if (l == r): return lists[l] mid = ((l + r) / 2) return self.merge(self.helper(list...
def helper(self, lists: List[ListNode], l: int, r: int) -> ListNode: '\n 递归帮助类\n Args:\n lists: 链表\n l: 坐标\n r: 右边\n Returns:\n 合并后链表\n ' if (l == r): return lists[l] mid = ((l + r) / 2) return self.merge(self.helper(list...
8aae565e2485f538ae6e8a86d1488cfc44e0475739f645d29900e31fc7e116ac
def merge_k_list(self, lists: List[ListNode]) -> ListNode: '\n 熟悉合并链表\n Args:\n lists:链表\n Returns:\n 合并后的list\n ' if (not lists): return None return self.helper(lists, 0, (len(lists) - 1))
熟悉合并链表 Args: lists:链表 Returns: 合并后的list
src/leetcodepython/top100likedquestions/merge_k_sorted_lists_23.py
merge_k_list
zhangyu345293721/leetcode
90
python
def merge_k_list(self, lists: List[ListNode]) -> ListNode: '\n 熟悉合并链表\n Args:\n lists:链表\n Returns:\n 合并后的list\n ' if (not lists): return None return self.helper(lists, 0, (len(lists) - 1))
def merge_k_list(self, lists: List[ListNode]) -> ListNode: '\n 熟悉合并链表\n Args:\n lists:链表\n Returns:\n 合并后的list\n ' if (not lists): return None return self.helper(lists, 0, (len(lists) - 1))<|docstring|>熟悉合并链表 Args: lists:链表 Returns: 合并后的l...
ceda21a06ed3a1292051511571ca43ade16b6304bf461872e3471d0f924b10c0
def merge_k_lists2(self, lists: List[ListNode]) -> ListNode: '\n 熟悉合并链表\n Args:\n lists:链表\n Returns:\n 合并后的list\n ' dummy = ListNode((- 1)) p = dummy head = [] k = len(lists) for i in range(k): if lists[i]: heapq.heappush(head,...
熟悉合并链表 Args: lists:链表 Returns: 合并后的list
src/leetcodepython/top100likedquestions/merge_k_sorted_lists_23.py
merge_k_lists2
zhangyu345293721/leetcode
90
python
def merge_k_lists2(self, lists: List[ListNode]) -> ListNode: '\n 熟悉合并链表\n Args:\n lists:链表\n Returns:\n 合并后的list\n ' dummy = ListNode((- 1)) p = dummy head = [] k = len(lists) for i in range(k): if lists[i]: heapq.heappush(head,...
def merge_k_lists2(self, lists: List[ListNode]) -> ListNode: '\n 熟悉合并链表\n Args:\n lists:链表\n Returns:\n 合并后的list\n ' dummy = ListNode((- 1)) p = dummy head = [] k = len(lists) for i in range(k): if lists[i]: heapq.heappush(head,...
093e75132104ac12cb365bea111191693760f135c2d4ecb1e0fad203bbd4ddea
@save_boundary_evidence def check_max_boundary_of_measurement(value, boundary): '\n :return:\n ' if (boundary is None): return None elif (float(value) < float(boundary)): return True else: return False
:return:
QuickPotato/statistical/verification.py
check_max_boundary_of_measurement
afparsons/QuickPotato
130
python
@save_boundary_evidence def check_max_boundary_of_measurement(value, boundary): '\n \n ' if (boundary is None): return None elif (float(value) < float(boundary)): return True else: return False
@save_boundary_evidence def check_max_boundary_of_measurement(value, boundary): '\n \n ' if (boundary is None): return None elif (float(value) < float(boundary)): return True else: return False<|docstring|>:return:<|endoftext|>
fd6835a7c06cb0841aca448b6d15db6e3c5d200f3c9a293bcbc9f36c3a332be9
@save_boundary_evidence def check_min_boundary_of_measurement(value, boundary): '\n :return:\n ' if (boundary is None): return None elif (float(value) > float(boundary)): return True else: return False
:return:
QuickPotato/statistical/verification.py
check_min_boundary_of_measurement
afparsons/QuickPotato
130
python
@save_boundary_evidence def check_min_boundary_of_measurement(value, boundary): '\n \n ' if (boundary is None): return None elif (float(value) > float(boundary)): return True else: return False
@save_boundary_evidence def check_min_boundary_of_measurement(value, boundary): '\n \n ' if (boundary is None): return None elif (float(value) > float(boundary)): return True else: return False<|docstring|>:return:<|endoftext|>
c6dc19505f58803a25cb2d549ccef51586776377dec5678f3c6a5fa2ee9313c6
def get_stations(user: User, city: str='lyon') -> Stations: 'Returns the list of the velov stations filtered by the city.\n\n :param: The actual user\n :param city: The city to filter the stations returned by the API\n :return: The list of station of the city\n ' url = f'{DECAUX_API_URL}?apiKey={DEC...
Returns the list of the velov stations filtered by the city. :param: The actual user :param city: The city to filter the stations returned by the API :return: The list of station of the city
my_velov_assistant/assistant/stations.py
get_stations
thefifthagreement/my-velov
1
python
def get_stations(user: User, city: str='lyon') -> Stations: 'Returns the list of the velov stations filtered by the city.\n\n :param: The actual user\n :param city: The city to filter the stations returned by the API\n :return: The list of station of the city\n ' url = f'{DECAUX_API_URL}?apiKey={DEC...
def get_stations(user: User, city: str='lyon') -> Stations: 'Returns the list of the velov stations filtered by the city.\n\n :param: The actual user\n :param city: The city to filter the stations returned by the API\n :return: The list of station of the city\n ' url = f'{DECAUX_API_URL}?apiKey={DEC...
d01be3c52bafbc3566a1ca753f03b7e89ee4044d2b0e317a5c17a000637a3a16
def get_station(number: int, stations: Stations) -> Station: 'Returns the station which ID is the number.\n\n :param number: The number of the station to find\n :param stations: The list of stations\n :return: The station with the same number or None\n ' return next(filter((lambda s: (s.number == nu...
Returns the station which ID is the number. :param number: The number of the station to find :param stations: The list of stations :return: The station with the same number or None
my_velov_assistant/assistant/stations.py
get_station
thefifthagreement/my-velov
1
python
def get_station(number: int, stations: Stations) -> Station: 'Returns the station which ID is the number.\n\n :param number: The number of the station to find\n :param stations: The list of stations\n :return: The station with the same number or None\n ' return next(filter((lambda s: (s.number == nu...
def get_station(number: int, stations: Stations) -> Station: 'Returns the station which ID is the number.\n\n :param number: The number of the station to find\n :param stations: The list of stations\n :return: The station with the same number or None\n ' return next(filter((lambda s: (s.number == nu...
0bf3316dd6d80b985c221fdf757f0a0c6b3c8915a3edfa6d38f6b5810e0e8998
def get_nearest_station(distances: Dict[(int, float)], stations: Stations): 'Search of the nearest station using the distances\n\n :param distances: A dict of number -> distance\n :param stations: The list of velov stations\n :return: The nearest station and the distance in km\n ' nearest = min(dist...
Search of the nearest station using the distances :param distances: A dict of number -> distance :param stations: The list of velov stations :return: The nearest station and the distance in km
my_velov_assistant/assistant/stations.py
get_nearest_station
thefifthagreement/my-velov
1
python
def get_nearest_station(distances: Dict[(int, float)], stations: Stations): 'Search of the nearest station using the distances\n\n :param distances: A dict of number -> distance\n :param stations: The list of velov stations\n :return: The nearest station and the distance in km\n ' nearest = min(dist...
def get_nearest_station(distances: Dict[(int, float)], stations: Stations): 'Search of the nearest station using the distances\n\n :param distances: A dict of number -> distance\n :param stations: The list of velov stations\n :return: The nearest station and the distance in km\n ' nearest = min(dist...
9bd42b3c040f6343a81cca4840ac7d60ef9dda1d998276ec82dba875d320e50c
def get_nearest_free_bike(location: Point, stations: Stations) -> Tuple[(Station, float)]: "Search of the nearest station from the location with a free bike\n\n :param location: The user's location\n :param stations: The list of velov stations\n :return: The nearest station with a free bike and the distanc...
Search of the nearest station from the location with a free bike :param location: The user's location :param stations: The list of velov stations :return: The nearest station with a free bike and the distance in km
my_velov_assistant/assistant/stations.py
get_nearest_free_bike
thefifthagreement/my-velov
1
python
def get_nearest_free_bike(location: Point, stations: Stations) -> Tuple[(Station, float)]: "Search of the nearest station from the location with a free bike\n\n :param location: The user's location\n :param stations: The list of velov stations\n :return: The nearest station with a free bike and the distanc...
def get_nearest_free_bike(location: Point, stations: Stations) -> Tuple[(Station, float)]: "Search of the nearest station from the location with a free bike\n\n :param location: The user's location\n :param stations: The list of velov stations\n :return: The nearest station with a free bike and the distanc...
02d547a791645acc8ab7b60b3aac00b49f7db7ddb0813ea28b77656c50cd8600
def get_nearest_free_place(destination: Point, stations: Stations) -> Tuple[(Station, float)]: "Search of the nearest station from the destination with a free place\n\n :param destination: The user's destination\n :param stations: The list of velov stations\n :return: The nearest station with a free place ...
Search of the nearest station from the destination with a free place :param destination: The user's destination :param stations: The list of velov stations :return: The nearest station with a free place and the distance in km
my_velov_assistant/assistant/stations.py
get_nearest_free_place
thefifthagreement/my-velov
1
python
def get_nearest_free_place(destination: Point, stations: Stations) -> Tuple[(Station, float)]: "Search of the nearest station from the destination with a free place\n\n :param destination: The user's destination\n :param stations: The list of velov stations\n :return: The nearest station with a free place ...
def get_nearest_free_place(destination: Point, stations: Stations) -> Tuple[(Station, float)]: "Search of the nearest station from the destination with a free place\n\n :param destination: The user's destination\n :param stations: The list of velov stations\n :return: The nearest station with a free place ...
9b72c3a93274f37fe7a609a87212663adef0e889c9d375c8a4e236f34bed690b
def haskell_docs(module, name): '\n Returns info for name as multiline string\n ' try: (exit_code, stdout, stderr) = call_and_wait(['haskell-docs', module, name]) stdout = crlf2lf(stdout) if (exit_code == 0): ambigousRe = '^Ambiguous module, belongs to more than one pac...
Returns info for name as multiline string
haskell_docs.py
haskell_docs
kolmodin/SublimeHaskell
0
python
def haskell_docs(module, name): '\n \n ' try: (exit_code, stdout, stderr) = call_and_wait(['haskell-docs', module, name]) stdout = crlf2lf(stdout) if (exit_code == 0): ambigousRe = '^Ambiguous module, belongs to more than one package: (.*)$' continueRe = '^C...
def haskell_docs(module, name): '\n \n ' try: (exit_code, stdout, stderr) = call_and_wait(['haskell-docs', module, name]) stdout = crlf2lf(stdout) if (exit_code == 0): ambigousRe = '^Ambiguous module, belongs to more than one package: (.*)$' continueRe = '^C...
e3ca8754e3ee743ef62d4365177e6ef5ca3fddb9fda3058ca373dfebc798985b
def test_create_logger(): '\n Tests that creating a logger works correctly\n ' MESSAGE = 'THIS IS A TESTING MESSAGE' logger = create_logger(__file__) logger.info(MESSAGE) with open('tests/test_logger.py.log', 'r') as fp: lines: List[str] = fp.readlines() contents: str = '\n'.jo...
Tests that creating a logger works correctly
tests/test_logger.py
test_create_logger
stephend017/sd_utils
0
python
def test_create_logger(): '\n \n ' MESSAGE = 'THIS IS A TESTING MESSAGE' logger = create_logger(__file__) logger.info(MESSAGE) with open('tests/test_logger.py.log', 'r') as fp: lines: List[str] = fp.readlines() contents: str = '\n'.join(lines) assert (MESSAGE in content...
def test_create_logger(): '\n \n ' MESSAGE = 'THIS IS A TESTING MESSAGE' logger = create_logger(__file__) logger.info(MESSAGE) with open('tests/test_logger.py.log', 'r') as fp: lines: List[str] = fp.readlines() contents: str = '\n'.join(lines) assert (MESSAGE in content...
5a01091de3d49bc076b1c99bf23789a523db0d378da81ad0327ac5bf71eb77f4
def run_pto(number, env, ref=False): 'Lead titanate 6 atoms SZP/diagonalisation PBE ' name = 'PTO' description = 'Lead titanate 5 atoms SZP diagonalisation' grid_cutoff = 80.0 xc = 'PBE' kpts = [9, 9, 9] basis = 'small' basis = {'Pb': {'file': 'Pb_SZP_v323_PBE.ion'}, 'Ti': {'file': 'Ti_S...
Lead titanate 6 atoms SZP/diagonalisation PBE
pto.py
run_pto
Paraquat/ConquestTest
0
python
def run_pto(number, env, ref=False): ' ' name = 'PTO' description = 'Lead titanate 5 atoms SZP diagonalisation' grid_cutoff = 80.0 xc = 'PBE' kpts = [9, 9, 9] basis = 'small' basis = {'Pb': {'file': 'Pb_SZP_v323_PBE.ion'}, 'Ti': {'file': 'Ti_SZP_v323_PBE.ion'}, 'O': {'file': 'O_SZP_v323_...
def run_pto(number, env, ref=False): ' ' name = 'PTO' description = 'Lead titanate 5 atoms SZP diagonalisation' grid_cutoff = 80.0 xc = 'PBE' kpts = [9, 9, 9] basis = 'small' basis = {'Pb': {'file': 'Pb_SZP_v323_PBE.ion'}, 'Ti': {'file': 'Ti_SZP_v323_PBE.ion'}, 'O': {'file': 'O_SZP_v323_...
7ae0ceb93a3f6428137387802eaa8025fb81543d15319f2db810eea38320aa84
@cherrypy.expose @cherrypy.tools.json_in() @cherrypy.tools.json_out() def index(self) -> str: '\n Compute sunrise and sunset for the given city.\n ' a = Astral() a.solar_depression = 'civil' params = cherrypy.request.json city_name = (params['city'] or '') try: city = a[cit...
Compute sunrise and sunset for the given city.
app/astre.py
index
rberrelleza/intro-to-chaos-engineering
1
python
@cherrypy.expose @cherrypy.tools.json_in() @cherrypy.tools.json_out() def index(self) -> str: '\n \n ' a = Astral() a.solar_depression = 'civil' params = cherrypy.request.json city_name = (params['city'] or ) try: city = a[city_name] except KeyError: return {'er...
@cherrypy.expose @cherrypy.tools.json_in() @cherrypy.tools.json_out() def index(self) -> str: '\n \n ' a = Astral() a.solar_depression = 'civil' params = cherrypy.request.json city_name = (params['city'] or ) try: city = a[city_name] except KeyError: return {'er...
60461e325f4bb719042174049cb85223b94234e06942f59696c8141956996069
def list(self, account_id=None, study_id=None, user_id=None): 'List.\n\n :param account_id: account_id\n :param study_id: study_id\n :param user_id: user_id\n ' request_data = {'account_id': account_id, 'study_id': study_id, 'user_id': user_id} errors_mapping = {} errors_mapp...
List. :param account_id: account_id :param study_id: study_id :param user_id: user_id
ambra_sdk/service/entrypoints/generated/link.py
list
dicomgrid/sdk-python
9
python
def list(self, account_id=None, study_id=None, user_id=None): 'List.\n\n :param account_id: account_id\n :param study_id: study_id\n :param user_id: user_id\n ' request_data = {'account_id': account_id, 'study_id': study_id, 'user_id': user_id} errors_mapping = {} errors_mapp...
def list(self, account_id=None, study_id=None, user_id=None): 'List.\n\n :param account_id: account_id\n :param study_id: study_id\n :param user_id: user_id\n ' request_data = {'account_id': account_id, 'study_id': study_id, 'user_id': user_id} errors_mapping = {} errors_mapp...
c25d9afd6d374edda1f470755de22fc7b80cf8ddacb2e2b14b03340015c8eced
def add(self, action, prompt_for_anonymize, acceptance_required=None, account_id=None, anonymize=None, charge_amount=None, charge_currency=None, charge_description=None, email=None, filter=None, include_priors=None, max_hits=None, meeting_id=None, message=None, mfm_page=None, minutes_alive=None, mobile_phone=None, name...
Add. :param action: Link action (STUDY_LIST|STUDY_VIEW|STUDY_UPLOAD) :param prompt_for_anonymize: Flag to prompt if the anonymization rules should be applied on ingress :param acceptance_required: Flag that acceptance of TOS is required (optional) :param account_id: account_id :param anonymize: Anonymization rules to ...
ambra_sdk/service/entrypoints/generated/link.py
add
dicomgrid/sdk-python
9
python
def add(self, action, prompt_for_anonymize, acceptance_required=None, account_id=None, anonymize=None, charge_amount=None, charge_currency=None, charge_description=None, email=None, filter=None, include_priors=None, max_hits=None, meeting_id=None, message=None, mfm_page=None, minutes_alive=None, mobile_phone=None, name...
def add(self, action, prompt_for_anonymize, acceptance_required=None, account_id=None, anonymize=None, charge_amount=None, charge_currency=None, charge_description=None, email=None, filter=None, include_priors=None, max_hits=None, meeting_id=None, message=None, mfm_page=None, minutes_alive=None, mobile_phone=None, name...
c5c12d33d4c64ef86a9e339bf0877c0d40be23d55a26c351411c94dba22bf7ce
def get(self, acceptance_required, account_id, action, anonymize, charge_amount, charge_currency, charge_description, created, description, email, filter, has_password, include_priors, is_meeting, max_hits, message, mfm_page, minutes_alive, mobile_phone, namespace_id, namespace_name, notify, parameters, password_is_dob...
Get. :param acceptance_required: Flag that acceptance of TOS is required :param account_id: The account id :param action: Link action :param anonymize: Any anonymization rules :param charge_amount: Amount to charge in pennies before the link can be accessed :param charge_currency: Charge currency :param charge_descrip...
ambra_sdk/service/entrypoints/generated/link.py
get
dicomgrid/sdk-python
9
python
def get(self, acceptance_required, account_id, action, anonymize, charge_amount, charge_currency, charge_description, created, description, email, filter, has_password, include_priors, is_meeting, max_hits, message, mfm_page, minutes_alive, mobile_phone, namespace_id, namespace_name, notify, parameters, password_is_dob...
def get(self, acceptance_required, account_id, action, anonymize, charge_amount, charge_currency, charge_description, created, description, email, filter, has_password, include_priors, is_meeting, max_hits, message, mfm_page, minutes_alive, mobile_phone, namespace_id, namespace_name, notify, parameters, password_is_dob...
a3bf08e8ba46363c24613dcaa48f096ce6c1687f798629e461e0ba042b70bcdf
def delete(self, uuid): 'Delete.\n\n :param uuid: Id of the link\n ' request_data = {'uuid': uuid} errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing field...
Delete. :param uuid: Id of the link
ambra_sdk/service/entrypoints/generated/link.py
delete
dicomgrid/sdk-python
9
python
def delete(self, uuid): 'Delete.\n\n :param uuid: Id of the link\n ' request_data = {'uuid': uuid} errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing field...
def delete(self, uuid): 'Delete.\n\n :param uuid: Id of the link\n ' request_data = {'uuid': uuid} errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing field...
87c54c3be0f4307a92e462574993b3fec2f06508b80de478f4289a612426d134
def status(self, link_charge_id=None, pin=None, uuid=None): 'Status.\n\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param pin: pin\n :param uuid: uuid\n ' request_data = {'link_charge_id': link_charge_id, 'pin': pin, 'uuid': uuid} errors_m...
Status. :param link_charge_id: The uuid of the prior charge against this link (optional) :param pin: pin :param uuid: uuid
ambra_sdk/service/entrypoints/generated/link.py
status
dicomgrid/sdk-python
9
python
def status(self, link_charge_id=None, pin=None, uuid=None): 'Status.\n\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param pin: pin\n :param uuid: uuid\n ' request_data = {'link_charge_id': link_charge_id, 'pin': pin, 'uuid': uuid} errors_m...
def status(self, link_charge_id=None, pin=None, uuid=None): 'Status.\n\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param pin: pin\n :param uuid: uuid\n ' request_data = {'link_charge_id': link_charge_id, 'pin': pin, 'uuid': uuid} errors_m...
a4ba46d192d7cb828811933ceb4e6bdb08e748acd1055121e8a9bab67f7e9903
def session(self, email_address=None, link_charge_id=None, password=None, pin=None, short_id=None, uuid=None): 'Session.\n\n :param email_address: The users email (optional)\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param password: Password if needed ...
Session. :param email_address: The users email (optional) :param link_charge_id: The uuid of the prior charge against this link (optional) :param password: Password if needed (optional) :param pin: pin :param short_id: short_id :param uuid: uuid
ambra_sdk/service/entrypoints/generated/link.py
session
dicomgrid/sdk-python
9
python
def session(self, email_address=None, link_charge_id=None, password=None, pin=None, short_id=None, uuid=None): 'Session.\n\n :param email_address: The users email (optional)\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param password: Password if needed ...
def session(self, email_address=None, link_charge_id=None, password=None, pin=None, short_id=None, uuid=None): 'Session.\n\n :param email_address: The users email (optional)\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param password: Password if needed ...
10e7e1f53cef80dc50875ed11e95d266a178d8f41df6a21a91b048da7b843515
def redirect(self, link_charge_id=None, password=None, pin=None, short_id=None, uuid=None): 'Redirect.\n\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param password: Password if needed (optional)\n :param pin: pin\n :param short_id: short_id\n ...
Redirect. :param link_charge_id: The uuid of the prior charge against this link (optional) :param password: Password if needed (optional) :param pin: pin :param short_id: short_id :param uuid: uuid
ambra_sdk/service/entrypoints/generated/link.py
redirect
dicomgrid/sdk-python
9
python
def redirect(self, link_charge_id=None, password=None, pin=None, short_id=None, uuid=None): 'Redirect.\n\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param password: Password if needed (optional)\n :param pin: pin\n :param short_id: short_id\n ...
def redirect(self, link_charge_id=None, password=None, pin=None, short_id=None, uuid=None): 'Redirect.\n\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param password: Password if needed (optional)\n :param pin: pin\n :param short_id: short_id\n ...
abb00cef437b902ad0bc3183efa0edfb4b21634d2c500fd3c2db7a62c41c6c3c
def external(self, u, v): 'External.\n\n :param u: The uuid of the user_account record to create the guest link as\n :param v: A JSON hash with the following keys pairs. The JSON must be encrypted and base64 encoded\n\n filter.*=>Filter field(s) as per the /study/list to specify the study(s) to constr...
External. :param u: The uuid of the user_account record to create the guest link as :param v: A JSON hash with the following keys pairs. The JSON must be encrypted and base64 encoded filter.*=>Filter field(s) as per the /study/list to specify the study(s) to construct the link for The includ...
ambra_sdk/service/entrypoints/generated/link.py
external
dicomgrid/sdk-python
9
python
def external(self, u, v): 'External.\n\n :param u: The uuid of the user_account record to create the guest link as\n :param v: A JSON hash with the following keys pairs. The JSON must be encrypted and base64 encoded\n\n filter.*=>Filter field(s) as per the /study/list to specify the study(s) to constr...
def external(self, u, v): 'External.\n\n :param u: The uuid of the user_account record to create the guest link as\n :param v: A JSON hash with the following keys pairs. The JSON must be encrypted and base64 encoded\n\n filter.*=>Filter field(s) as per the /study/list to specify the study(s) to constr...
f3c64eb7d3a4ba0050510d4312dba4220b891025b50f8314832f3d49ea9da99a
def sso(self, u, v): 'Sso.\n\n :param u: The uuid of the user_account record\n :param v: An encrypted JSON hash as per the instructions in the SSO to a PHR account with a study share section of the documentation\n ' request_data = {'u': u, 'v': v} errors_mapping = {} errors_mapping[...
Sso. :param u: The uuid of the user_account record :param v: An encrypted JSON hash as per the instructions in the SSO to a PHR account with a study share section of the documentation
ambra_sdk/service/entrypoints/generated/link.py
sso
dicomgrid/sdk-python
9
python
def sso(self, u, v): 'Sso.\n\n :param u: The uuid of the user_account record\n :param v: An encrypted JSON hash as per the instructions in the SSO to a PHR account with a study share section of the documentation\n ' request_data = {'u': u, 'v': v} errors_mapping = {} errors_mapping[...
def sso(self, u, v): 'Sso.\n\n :param u: The uuid of the user_account record\n :param v: An encrypted JSON hash as per the instructions in the SSO to a PHR account with a study share section of the documentation\n ' request_data = {'u': u, 'v': v} errors_mapping = {} errors_mapping[...
e69e946042a7386a643ac2cc54938e0605724b0aae1bc6d9029cb9392c8deccb
def sid(self, email, uuid): 'Sid.\n\n :param email: Email address to associate with this usage\n :param uuid: The uuid of the link usage\n ' request_data = {'email': email, 'uuid': uuid} errors_mapping = {} errors_mapping[('NOT_FOUND', None)] = NotFound('The usage was not found') ...
Sid. :param email: Email address to associate with this usage :param uuid: The uuid of the link usage
ambra_sdk/service/entrypoints/generated/link.py
sid
dicomgrid/sdk-python
9
python
def sid(self, email, uuid): 'Sid.\n\n :param email: Email address to associate with this usage\n :param uuid: The uuid of the link usage\n ' request_data = {'email': email, 'uuid': uuid} errors_mapping = {} errors_mapping[('NOT_FOUND', None)] = NotFound('The usage was not found') ...
def sid(self, email, uuid): 'Sid.\n\n :param email: Email address to associate with this usage\n :param uuid: The uuid of the link usage\n ' request_data = {'email': email, 'uuid': uuid} errors_mapping = {} errors_mapping[('NOT_FOUND', None)] = NotFound('The usage was not found') ...
9f9a6b16a5a3b2f0caffcfe5932c4cc6d6683f17ea0e037ed14ef03502b6014d
def mail(self, email, uuid): 'Mail.\n\n :param email: Email address\n :param uuid: The uuid of the link\n ' request_data = {'email': email, 'uuid': uuid} errors_mapping = {} errors_mapping[('INVALID_EMAIL', None)] = InvalidEmail('Enter a valid email address') errors_mapping[('MI...
Mail. :param email: Email address :param uuid: The uuid of the link
ambra_sdk/service/entrypoints/generated/link.py
mail
dicomgrid/sdk-python
9
python
def mail(self, email, uuid): 'Mail.\n\n :param email: Email address\n :param uuid: The uuid of the link\n ' request_data = {'email': email, 'uuid': uuid} errors_mapping = {} errors_mapping[('INVALID_EMAIL', None)] = InvalidEmail('Enter a valid email address') errors_mapping[('MI...
def mail(self, email, uuid): 'Mail.\n\n :param email: Email address\n :param uuid: The uuid of the link\n ' request_data = {'email': email, 'uuid': uuid} errors_mapping = {} errors_mapping[('INVALID_EMAIL', None)] = InvalidEmail('Enter a valid email address') errors_mapping[('MI...
c6e2db3422c92b2dd289dbe01087a180d9e3b141d2bc65ba0206df60a172e025
def charge(self, charge_token, uuid): 'Charge.\n\n :param charge_token: The stripe charge token\n :param uuid: The uuid of the link\n ' request_data = {'charge_token': charge_token, 'uuid': uuid} errors_mapping = {} errors_mapping[('CHARGE_FAILED', None)] = ChargeFailed('The charge ...
Charge. :param charge_token: The stripe charge token :param uuid: The uuid of the link
ambra_sdk/service/entrypoints/generated/link.py
charge
dicomgrid/sdk-python
9
python
def charge(self, charge_token, uuid): 'Charge.\n\n :param charge_token: The stripe charge token\n :param uuid: The uuid of the link\n ' request_data = {'charge_token': charge_token, 'uuid': uuid} errors_mapping = {} errors_mapping[('CHARGE_FAILED', None)] = ChargeFailed('The charge ...
def charge(self, charge_token, uuid): 'Charge.\n\n :param charge_token: The stripe charge token\n :param uuid: The uuid of the link\n ' request_data = {'charge_token': charge_token, 'uuid': uuid} errors_mapping = {} errors_mapping[('CHARGE_FAILED', None)] = ChargeFailed('The charge ...
aa2ff92b5e96a2082c62f98c44e79cd33c7b9db2316dee69db492575f1961421
def pin(self, uuid): 'Pin.\n\n :param uuid: The uuid of the link\n ' request_data = {'uuid': uuid} errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing field...
Pin. :param uuid: The uuid of the link
ambra_sdk/service/entrypoints/generated/link.py
pin
dicomgrid/sdk-python
9
python
def pin(self, uuid): 'Pin.\n\n :param uuid: The uuid of the link\n ' request_data = {'uuid': uuid} errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing field...
def pin(self, uuid): 'Pin.\n\n :param uuid: The uuid of the link\n ' request_data = {'uuid': uuid} errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing field...
487b2ac758a8f67cd1e00a6e858d05bb08956389467ad646f83929cdea241c33
def list(self, account_id=None, study_id=None, user_id=None): 'List.\n\n :param account_id: account_id\n :param study_id: study_id\n :param user_id: user_id\n ' request_data = {'account_id': account_id, 'study_id': study_id, 'user_id': user_id} errors_mapping = {} errors_mapp...
List. :param account_id: account_id :param study_id: study_id :param user_id: user_id
ambra_sdk/service/entrypoints/generated/link.py
list
dicomgrid/sdk-python
9
python
def list(self, account_id=None, study_id=None, user_id=None): 'List.\n\n :param account_id: account_id\n :param study_id: study_id\n :param user_id: user_id\n ' request_data = {'account_id': account_id, 'study_id': study_id, 'user_id': user_id} errors_mapping = {} errors_mapp...
def list(self, account_id=None, study_id=None, user_id=None): 'List.\n\n :param account_id: account_id\n :param study_id: study_id\n :param user_id: user_id\n ' request_data = {'account_id': account_id, 'study_id': study_id, 'user_id': user_id} errors_mapping = {} errors_mapp...
8615abc35a723e6a69eef184013f2a68edcf5a00708c3b138ccbfbcabd52ccc3
def add(self, action, prompt_for_anonymize, acceptance_required=None, account_id=None, anonymize=None, charge_amount=None, charge_currency=None, charge_description=None, email=None, filter=None, include_priors=None, max_hits=None, meeting_id=None, message=None, mfm_page=None, minutes_alive=None, mobile_phone=None, name...
Add. :param action: Link action (STUDY_LIST|STUDY_VIEW|STUDY_UPLOAD) :param prompt_for_anonymize: Flag to prompt if the anonymization rules should be applied on ingress :param acceptance_required: Flag that acceptance of TOS is required (optional) :param account_id: account_id :param anonymize: Anonymization rules to ...
ambra_sdk/service/entrypoints/generated/link.py
add
dicomgrid/sdk-python
9
python
def add(self, action, prompt_for_anonymize, acceptance_required=None, account_id=None, anonymize=None, charge_amount=None, charge_currency=None, charge_description=None, email=None, filter=None, include_priors=None, max_hits=None, meeting_id=None, message=None, mfm_page=None, minutes_alive=None, mobile_phone=None, name...
def add(self, action, prompt_for_anonymize, acceptance_required=None, account_id=None, anonymize=None, charge_amount=None, charge_currency=None, charge_description=None, email=None, filter=None, include_priors=None, max_hits=None, meeting_id=None, message=None, mfm_page=None, minutes_alive=None, mobile_phone=None, name...
40d3245e651ee8217e6ba155f6f8f1aa35b4b728a07363434f6a953e19195c4c
def get(self, acceptance_required, account_id, action, anonymize, charge_amount, charge_currency, charge_description, created, description, email, filter, has_password, include_priors, is_meeting, max_hits, message, mfm_page, minutes_alive, mobile_phone, namespace_id, namespace_name, notify, parameters, password_is_dob...
Get. :param acceptance_required: Flag that acceptance of TOS is required :param account_id: The account id :param action: Link action :param anonymize: Any anonymization rules :param charge_amount: Amount to charge in pennies before the link can be accessed :param charge_currency: Charge currency :param charge_descrip...
ambra_sdk/service/entrypoints/generated/link.py
get
dicomgrid/sdk-python
9
python
def get(self, acceptance_required, account_id, action, anonymize, charge_amount, charge_currency, charge_description, created, description, email, filter, has_password, include_priors, is_meeting, max_hits, message, mfm_page, minutes_alive, mobile_phone, namespace_id, namespace_name, notify, parameters, password_is_dob...
def get(self, acceptance_required, account_id, action, anonymize, charge_amount, charge_currency, charge_description, created, description, email, filter, has_password, include_priors, is_meeting, max_hits, message, mfm_page, minutes_alive, mobile_phone, namespace_id, namespace_name, notify, parameters, password_is_dob...
04ca3a016b9f984188d51a264ada10f29b803e37b92b2bb4bb64f37e68fc03a9
def delete(self, uuid): 'Delete.\n\n :param uuid: Id of the link\n ' request_data = {'uuid': uuid} errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing field...
Delete. :param uuid: Id of the link
ambra_sdk/service/entrypoints/generated/link.py
delete
dicomgrid/sdk-python
9
python
def delete(self, uuid): 'Delete.\n\n :param uuid: Id of the link\n ' request_data = {'uuid': uuid} errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing field...
def delete(self, uuid): 'Delete.\n\n :param uuid: Id of the link\n ' request_data = {'uuid': uuid} errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing field...
8af8de3c0a690bbaa636ed4ca74889336608b3458b2074ae3bae926e03b34a29
def status(self, link_charge_id=None, pin=None, uuid=None): 'Status.\n\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param pin: pin\n :param uuid: uuid\n ' request_data = {'link_charge_id': link_charge_id, 'pin': pin, 'uuid': uuid} errors_m...
Status. :param link_charge_id: The uuid of the prior charge against this link (optional) :param pin: pin :param uuid: uuid
ambra_sdk/service/entrypoints/generated/link.py
status
dicomgrid/sdk-python
9
python
def status(self, link_charge_id=None, pin=None, uuid=None): 'Status.\n\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param pin: pin\n :param uuid: uuid\n ' request_data = {'link_charge_id': link_charge_id, 'pin': pin, 'uuid': uuid} errors_m...
def status(self, link_charge_id=None, pin=None, uuid=None): 'Status.\n\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param pin: pin\n :param uuid: uuid\n ' request_data = {'link_charge_id': link_charge_id, 'pin': pin, 'uuid': uuid} errors_m...
4f2147feb3bc2e3caaa4b02b4675184a6e3a790688dffb0c969d1ce3788bb11e
def session(self, email_address=None, link_charge_id=None, password=None, pin=None, short_id=None, uuid=None): 'Session.\n\n :param email_address: The users email (optional)\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param password: Password if needed ...
Session. :param email_address: The users email (optional) :param link_charge_id: The uuid of the prior charge against this link (optional) :param password: Password if needed (optional) :param pin: pin :param short_id: short_id :param uuid: uuid
ambra_sdk/service/entrypoints/generated/link.py
session
dicomgrid/sdk-python
9
python
def session(self, email_address=None, link_charge_id=None, password=None, pin=None, short_id=None, uuid=None): 'Session.\n\n :param email_address: The users email (optional)\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param password: Password if needed ...
def session(self, email_address=None, link_charge_id=None, password=None, pin=None, short_id=None, uuid=None): 'Session.\n\n :param email_address: The users email (optional)\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param password: Password if needed ...
cc39351c470d4dc4aedfc96a69ef172f1e09a64f192cb981ff66f0aabfc7c6ba
def redirect(self, link_charge_id=None, password=None, pin=None, short_id=None, uuid=None): 'Redirect.\n\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param password: Password if needed (optional)\n :param pin: pin\n :param short_id: short_id\n ...
Redirect. :param link_charge_id: The uuid of the prior charge against this link (optional) :param password: Password if needed (optional) :param pin: pin :param short_id: short_id :param uuid: uuid
ambra_sdk/service/entrypoints/generated/link.py
redirect
dicomgrid/sdk-python
9
python
def redirect(self, link_charge_id=None, password=None, pin=None, short_id=None, uuid=None): 'Redirect.\n\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param password: Password if needed (optional)\n :param pin: pin\n :param short_id: short_id\n ...
def redirect(self, link_charge_id=None, password=None, pin=None, short_id=None, uuid=None): 'Redirect.\n\n :param link_charge_id: The uuid of the prior charge against this link (optional)\n :param password: Password if needed (optional)\n :param pin: pin\n :param short_id: short_id\n ...
89e9b856468dedac50c6706b26bb3e3d557f2c832f9feb0fc64c83b63cda4d95
def external(self, u, v): 'External.\n\n :param u: The uuid of the user_account record to create the guest link as\n :param v: A JSON hash with the following keys pairs. The JSON must be encrypted and base64 encoded\n\n filter.*=>Filter field(s) as per the /study/list to specify the study(s) to constr...
External. :param u: The uuid of the user_account record to create the guest link as :param v: A JSON hash with the following keys pairs. The JSON must be encrypted and base64 encoded filter.*=>Filter field(s) as per the /study/list to specify the study(s) to construct the link for The includ...
ambra_sdk/service/entrypoints/generated/link.py
external
dicomgrid/sdk-python
9
python
def external(self, u, v): 'External.\n\n :param u: The uuid of the user_account record to create the guest link as\n :param v: A JSON hash with the following keys pairs. The JSON must be encrypted and base64 encoded\n\n filter.*=>Filter field(s) as per the /study/list to specify the study(s) to constr...
def external(self, u, v): 'External.\n\n :param u: The uuid of the user_account record to create the guest link as\n :param v: A JSON hash with the following keys pairs. The JSON must be encrypted and base64 encoded\n\n filter.*=>Filter field(s) as per the /study/list to specify the study(s) to constr...
3cd5a10fbf7861661f7b72c236a1f7ced094b04959549e74ba5fed699f23793c
def sso(self, u, v): 'Sso.\n\n :param u: The uuid of the user_account record\n :param v: An encrypted JSON hash as per the instructions in the SSO to a PHR account with a study share section of the documentation\n ' request_data = {'u': u, 'v': v} errors_mapping = {} errors_mapping[...
Sso. :param u: The uuid of the user_account record :param v: An encrypted JSON hash as per the instructions in the SSO to a PHR account with a study share section of the documentation
ambra_sdk/service/entrypoints/generated/link.py
sso
dicomgrid/sdk-python
9
python
def sso(self, u, v): 'Sso.\n\n :param u: The uuid of the user_account record\n :param v: An encrypted JSON hash as per the instructions in the SSO to a PHR account with a study share section of the documentation\n ' request_data = {'u': u, 'v': v} errors_mapping = {} errors_mapping[...
def sso(self, u, v): 'Sso.\n\n :param u: The uuid of the user_account record\n :param v: An encrypted JSON hash as per the instructions in the SSO to a PHR account with a study share section of the documentation\n ' request_data = {'u': u, 'v': v} errors_mapping = {} errors_mapping[...
259e06ad725e63ca195879c8d2c500396c465cb1d04a96a20adf68150d9ec160
def sid(self, email, uuid): 'Sid.\n\n :param email: Email address to associate with this usage\n :param uuid: The uuid of the link usage\n ' request_data = {'email': email, 'uuid': uuid} errors_mapping = {} errors_mapping[('NOT_FOUND', None)] = NotFound('The usage was not found') ...
Sid. :param email: Email address to associate with this usage :param uuid: The uuid of the link usage
ambra_sdk/service/entrypoints/generated/link.py
sid
dicomgrid/sdk-python
9
python
def sid(self, email, uuid): 'Sid.\n\n :param email: Email address to associate with this usage\n :param uuid: The uuid of the link usage\n ' request_data = {'email': email, 'uuid': uuid} errors_mapping = {} errors_mapping[('NOT_FOUND', None)] = NotFound('The usage was not found') ...
def sid(self, email, uuid): 'Sid.\n\n :param email: Email address to associate with this usage\n :param uuid: The uuid of the link usage\n ' request_data = {'email': email, 'uuid': uuid} errors_mapping = {} errors_mapping[('NOT_FOUND', None)] = NotFound('The usage was not found') ...
46ba33f1b7f68f65e5ad1469f4d17b19eec2a7c6b7f734afa72af340f1f4a278
def mail(self, email, uuid): 'Mail.\n\n :param email: Email address\n :param uuid: The uuid of the link\n ' request_data = {'email': email, 'uuid': uuid} errors_mapping = {} errors_mapping[('INVALID_EMAIL', None)] = InvalidEmail('Enter a valid email address') errors_mapping[('MI...
Mail. :param email: Email address :param uuid: The uuid of the link
ambra_sdk/service/entrypoints/generated/link.py
mail
dicomgrid/sdk-python
9
python
def mail(self, email, uuid): 'Mail.\n\n :param email: Email address\n :param uuid: The uuid of the link\n ' request_data = {'email': email, 'uuid': uuid} errors_mapping = {} errors_mapping[('INVALID_EMAIL', None)] = InvalidEmail('Enter a valid email address') errors_mapping[('MI...
def mail(self, email, uuid): 'Mail.\n\n :param email: Email address\n :param uuid: The uuid of the link\n ' request_data = {'email': email, 'uuid': uuid} errors_mapping = {} errors_mapping[('INVALID_EMAIL', None)] = InvalidEmail('Enter a valid email address') errors_mapping[('MI...
254dd70c36ce815a2f2cbaeec43fefdb12cb9716d9e003670702a6e9e5b93d45
def charge(self, charge_token, uuid): 'Charge.\n\n :param charge_token: The stripe charge token\n :param uuid: The uuid of the link\n ' request_data = {'charge_token': charge_token, 'uuid': uuid} errors_mapping = {} errors_mapping[('CHARGE_FAILED', None)] = ChargeFailed('The charge ...
Charge. :param charge_token: The stripe charge token :param uuid: The uuid of the link
ambra_sdk/service/entrypoints/generated/link.py
charge
dicomgrid/sdk-python
9
python
def charge(self, charge_token, uuid): 'Charge.\n\n :param charge_token: The stripe charge token\n :param uuid: The uuid of the link\n ' request_data = {'charge_token': charge_token, 'uuid': uuid} errors_mapping = {} errors_mapping[('CHARGE_FAILED', None)] = ChargeFailed('The charge ...
def charge(self, charge_token, uuid): 'Charge.\n\n :param charge_token: The stripe charge token\n :param uuid: The uuid of the link\n ' request_data = {'charge_token': charge_token, 'uuid': uuid} errors_mapping = {} errors_mapping[('CHARGE_FAILED', None)] = ChargeFailed('The charge ...
4d3c0325e3ab5cf258344b94917ed4beb9b7db83dd7d47bc71196cc7907b22bb
def pin(self, uuid): 'Pin.\n\n :param uuid: The uuid of the link\n ' request_data = {'uuid': uuid} errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing field...
Pin. :param uuid: The uuid of the link
ambra_sdk/service/entrypoints/generated/link.py
pin
dicomgrid/sdk-python
9
python
def pin(self, uuid): 'Pin.\n\n :param uuid: The uuid of the link\n ' request_data = {'uuid': uuid} errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing field...
def pin(self, uuid): 'Pin.\n\n :param uuid: The uuid of the link\n ' request_data = {'uuid': uuid} errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing field...
de6af9f1e173e59615e24cdc4fa64d8706ccf636e5d4836b3a0e1208f7368773
def get_all_courses(fetch): '\n\tGet all course data and return in dictionary\n\t:param fetch: boolean that indicates whether to fetch data from website again\n\t:return: dirctionary that conatains all course data\n\t' if fetch: URL = 'https://sis.rpi.edu/reg/zs201901.htm' session = Session(URL)...
Get all course data and return in dictionary :param fetch: boolean that indicates whether to fetch data from website again :return: dirctionary that conatains all course data
crawler/course.py
get_all_courses
Tyromancer/RPICourseRecommender
1
python
def get_all_courses(fetch): '\n\tGet all course data and return in dictionary\n\t:param fetch: boolean that indicates whether to fetch data from website again\n\t:return: dirctionary that conatains all course data\n\t' if fetch: URL = 'https://sis.rpi.edu/reg/zs201901.htm' session = Session(URL)...
def get_all_courses(fetch): '\n\tGet all course data and return in dictionary\n\t:param fetch: boolean that indicates whether to fetch data from website again\n\t:return: dirctionary that conatains all course data\n\t' if fetch: URL = 'https://sis.rpi.edu/reg/zs201901.htm' session = Session(URL)...
f34558d9d1d10aad15fda57a2c0ac292786ab0123cd219756f88b3d297eedbf7
def __init__(self, data): '\n\t\tConstructor of Course\n\t\t:param data: a string that holds all information of this course\n\t\t' src = data.split('^') self.CRN = src[0] temp_val = src[1].split('-') if (len(temp_val) == 3): self.major = temp_val[0].upper() self.course_id = temp_val[...
Constructor of Course :param data: a string that holds all information of this course
crawler/course.py
__init__
Tyromancer/RPICourseRecommender
1
python
def __init__(self, data): '\n\t\tConstructor of Course\n\t\t:param data: a string that holds all information of this course\n\t\t' src = data.split('^') self.CRN = src[0] temp_val = src[1].split('-') if (len(temp_val) == 3): self.major = temp_val[0].upper() self.course_id = temp_val[...
def __init__(self, data): '\n\t\tConstructor of Course\n\t\t:param data: a string that holds all information of this course\n\t\t' src = data.split('^') self.CRN = src[0] temp_val = src[1].split('-') if (len(temp_val) == 3): self.major = temp_val[0].upper() self.course_id = temp_val[...
94fbdb3aff628b9d284b7fb73d831a09e7941e972cdf1ef75c08bf76d6e7d161
def fetch(self, filename): '\n\n\t\t:param filename: filename of the txt file to be written\n\t\t:return: None\n\t\t' (html, header) = request.urlretrieve(self.url) html_file = open(html, encoding='utf-8') soup = BeautifulSoup(html_file, 'html.parser') courses = soup.find_all('tr') with open(fil...
:param filename: filename of the txt file to be written :return: None
crawler/course.py
fetch
Tyromancer/RPICourseRecommender
1
python
def fetch(self, filename): '\n\n\t\t:param filename: filename of the txt file to be written\n\t\t:return: None\n\t\t' (html, header) = request.urlretrieve(self.url) html_file = open(html, encoding='utf-8') soup = BeautifulSoup(html_file, 'html.parser') courses = soup.find_all('tr') with open(fil...
def fetch(self, filename): '\n\n\t\t:param filename: filename of the txt file to be written\n\t\t:return: None\n\t\t' (html, header) = request.urlretrieve(self.url) html_file = open(html, encoding='utf-8') soup = BeautifulSoup(html_file, 'html.parser') courses = soup.find_all('tr') with open(fil...
8a7e23a27cd75b3a998be6621003a711973d65a5731c9378ce07cfb745fbd25a
def modify_request(self, request): '\n This method mangles the request in order to evade simple IDSs.\n\n This method MUST be implemented on every plugin.\n\n :param request: urllib2.Request instance that is going to be modified by the evasion plugin\n :return: A fuzzed version of the Re...
This method mangles the request in order to evade simple IDSs. This method MUST be implemented on every plugin. :param request: urllib2.Request instance that is going to be modified by the evasion plugin :return: A fuzzed version of the Request.
packages/w3af/w3af/core/controllers/plugins/evasion_plugin.py
modify_request
ZooAtmosphereGroup/HelloPackages
3
python
def modify_request(self, request): '\n This method mangles the request in order to evade simple IDSs.\n\n This method MUST be implemented on every plugin.\n\n :param request: urllib2.Request instance that is going to be modified by the evasion plugin\n :return: A fuzzed version of the Re...
def modify_request(self, request): '\n This method mangles the request in order to evade simple IDSs.\n\n This method MUST be implemented on every plugin.\n\n :param request: urllib2.Request instance that is going to be modified by the evasion plugin\n :return: A fuzzed version of the Re...
aa0dbe561cde9af3606678ebb78566fcf4a5445c5e22b569b81282600761aa03
def get_priority(self): '\n This function is called when sorting evasion plugins.\n Each evasion plugin should implement this.\n\n :return: An integer specifying the priority. 100 is run first, 0 last.\n ' msg = 'Plugin is not implementing required method get_priority' raise NotI...
This function is called when sorting evasion plugins. Each evasion plugin should implement this. :return: An integer specifying the priority. 100 is run first, 0 last.
packages/w3af/w3af/core/controllers/plugins/evasion_plugin.py
get_priority
ZooAtmosphereGroup/HelloPackages
3
python
def get_priority(self): '\n This function is called when sorting evasion plugins.\n Each evasion plugin should implement this.\n\n :return: An integer specifying the priority. 100 is run first, 0 last.\n ' msg = 'Plugin is not implementing required method get_priority' raise NotI...
def get_priority(self): '\n This function is called when sorting evasion plugins.\n Each evasion plugin should implement this.\n\n :return: An integer specifying the priority. 100 is run first, 0 last.\n ' msg = 'Plugin is not implementing required method get_priority' raise NotI...
0811443272585cc5e0bbca930c6ad2d71f2e577726fe59de14d5475f51ce36bb
@click.command(context_settings=CONTEXT_SETTINGS) @click.version_option(version='1.0.0') @click.option('--caller', default='manta', help='The name of SV caller by which the input VCF was generated.\n[manta, delly, lumpy, gridss] could be acceptable (default, manta).') @click.option('-i', '--info', help='The names of IN...
Convert a VCF file into a BEDPE file. A VCF argument is the path to the input VCF file.
src/viola/cli/vcf2bedpe.py
vcf2bedpe
mmiki21/Viola-SV
13
python
@click.command(context_settings=CONTEXT_SETTINGS) @click.version_option(version='1.0.0') @click.option('--caller', default='manta', help='The name of SV caller by which the input VCF was generated.\n[manta, delly, lumpy, gridss] could be acceptable (default, manta).') @click.option('-i', '--info', help='The names of IN...
@click.command(context_settings=CONTEXT_SETTINGS) @click.version_option(version='1.0.0') @click.option('--caller', default='manta', help='The name of SV caller by which the input VCF was generated.\n[manta, delly, lumpy, gridss] could be acceptable (default, manta).') @click.option('-i', '--info', help='The names of IN...
7fdf17ce4683c172f660f31c4822bffb642f17d645683e409352d4e584c3ee67
def ensure_namespace(api: kubernetes.client.CoreV1Api, namespace: str): '\n Ensure that a Kubernetes namespace exists.\n\n Parameters\n ----------\n api : kubernetes\n ' try: api.create_namespace(body=kubernetes.client.V1Namespace(metadata=kubernetes.client.V1ObjectMeta(name=namespace))) ...
Ensure that a Kubernetes namespace exists. Parameters ---------- api : kubernetes
kbatch-proxy/kbatch_proxy/main.py
ensure_namespace
kbatch-dev/kbatch
2
python
def ensure_namespace(api: kubernetes.client.CoreV1Api, namespace: str): '\n Ensure that a Kubernetes namespace exists.\n\n Parameters\n ----------\n api : kubernetes\n ' try: api.create_namespace(body=kubernetes.client.V1Namespace(metadata=kubernetes.client.V1ObjectMeta(name=namespace))) ...
def ensure_namespace(api: kubernetes.client.CoreV1Api, namespace: str): '\n Ensure that a Kubernetes namespace exists.\n\n Parameters\n ----------\n api : kubernetes\n ' try: api.create_namespace(body=kubernetes.client.V1Namespace(metadata=kubernetes.client.V1ObjectMeta(name=namespace))) ...
a9a4f0d5d6d4ebc991cb7c6980c59ebe46608d937aafca6eb4d0f6e1debbae5a
def _create_job(data: dict, model: Union[(V1CronJob, V1Job)], user: User=Depends(get_current_user)): '\n Create a Kubernetes batch Job or CronJob.\n\n This is handled in three steps:\n 1. Submit ConfigMap\n 2. Submit Job/CronJob\n 3. Patch ConfigMap to add Job/CronJob as the owner\n\n Parameters\n...
Create a Kubernetes batch Job or CronJob. This is handled in three steps: 1. Submit ConfigMap 2. Submit Job/CronJob 3. Patch ConfigMap to add Job/CronJob as the owner Parameters ---------- data : data specific to the Job or CronJob. model : kubernetes batch models, "V1Job" "V1CronJob". user : a `User` object which ho...
kbatch-proxy/kbatch_proxy/main.py
_create_job
kbatch-dev/kbatch
2
python
def _create_job(data: dict, model: Union[(V1CronJob, V1Job)], user: User=Depends(get_current_user)): '\n Create a Kubernetes batch Job or CronJob.\n\n This is handled in three steps:\n 1. Submit ConfigMap\n 2. Submit Job/CronJob\n 3. Patch ConfigMap to add Job/CronJob as the owner\n\n Parameters\n...
def _create_job(data: dict, model: Union[(V1CronJob, V1Job)], user: User=Depends(get_current_user)): '\n Create a Kubernetes batch Job or CronJob.\n\n This is handled in three steps:\n 1. Submit ConfigMap\n 2. Submit Job/CronJob\n 3. Patch ConfigMap to add Job/CronJob as the owner\n\n Parameters\n...
b3f372b55f499b165e77e633d32555cc399897a34b4715cb2305ffda81146033
def _perform_action(job_name: Union[(str, None)], namespace: str, action: str, model: Union[(V1Job, V1CronJob)]) -> str: '\n Perform an action on `job_name`.\n\n Parameters\n ----------\n job_name : name of the Kubernetes Job or CronJob.\n namespace : Kubernetes namespace to check.\n action : acti...
Perform an action on `job_name`. Parameters ---------- job_name : name of the Kubernetes Job or CronJob. namespace : Kubernetes namespace to check. action : action to perform on `job_name`. Must match one item in `job_actions` list. model : kubernetes batch models, "V1Job" "V1CronJob"
kbatch-proxy/kbatch_proxy/main.py
_perform_action
kbatch-dev/kbatch
2
python
def _perform_action(job_name: Union[(str, None)], namespace: str, action: str, model: Union[(V1Job, V1CronJob)]) -> str: '\n Perform an action on `job_name`.\n\n Parameters\n ----------\n job_name : name of the Kubernetes Job or CronJob.\n namespace : Kubernetes namespace to check.\n action : acti...
def _perform_action(job_name: Union[(str, None)], namespace: str, action: str, model: Union[(V1Job, V1CronJob)]) -> str: '\n Perform an action on `job_name`.\n\n Parameters\n ----------\n job_name : name of the Kubernetes Job or CronJob.\n namespace : Kubernetes namespace to check.\n action : acti...
2f4df8afa01f229e33f78cff5e9691faffcac8f6a18f2c05e74882132c9ba600
@property def namespace(self) -> str: 'The Kubernetes namespace for a user.' return patch.namespace_for_username(self.name)
The Kubernetes namespace for a user.
kbatch-proxy/kbatch_proxy/main.py
namespace
kbatch-dev/kbatch
2
python
@property def namespace(self) -> str: return patch.namespace_for_username(self.name)
@property def namespace(self) -> str: return patch.namespace_for_username(self.name)<|docstring|>The Kubernetes namespace for a user.<|endoftext|>
cd49ec36b74c82536f4d771e2ef81319bfd2cf13fedef35c96165008f6f483d9
def trans_res(res): 'Function to take a RES of form blah./^V64 and output VAL64' d = {'CYS': 'C', 'ASP': 'D', 'SER': 'S', 'GLN': 'Q', 'LYS': 'K', 'ILE': 'I', 'PRO': 'P', 'THR': 'T', 'PHE': 'F', 'ASN': 'N', 'GLY': 'G', 'HIS': 'H', 'LEU': 'L', 'ARG': 'R', 'TRP': 'W', 'ALA': 'A', 'VAL': 'V', 'GLU': 'E', 'TYR': 'Y'...
Function to take a RES of form blah./^V64 and output VAL64
src/WebApp/pyplif/make_dict.py
trans_res
abradle/ccf
1
python
def trans_res(res): d = {'CYS': 'C', 'ASP': 'D', 'SER': 'S', 'GLN': 'Q', 'LYS': 'K', 'ILE': 'I', 'PRO': 'P', 'THR': 'T', 'PHE': 'F', 'ASN': 'N', 'GLY': 'G', 'HIS': 'H', 'LEU': 'L', 'ARG': 'R', 'TRP': 'W', 'ALA': 'A', 'VAL': 'V', 'GLU': 'E', 'TYR': 'Y', 'MET': 'M'} rev_d = dict(((v, k) for (k, v) in d.iteri...
def trans_res(res): d = {'CYS': 'C', 'ASP': 'D', 'SER': 'S', 'GLN': 'Q', 'LYS': 'K', 'ILE': 'I', 'PRO': 'P', 'THR': 'T', 'PHE': 'F', 'ASN': 'N', 'GLY': 'G', 'HIS': 'H', 'LEU': 'L', 'ARG': 'R', 'TRP': 'W', 'ALA': 'A', 'VAL': 'V', 'GLU': 'E', 'TYR': 'Y', 'MET': 'M'} rev_d = dict(((v, k) for (k, v) in d.iteri...
ba6e7d431cce7a77c22ba262c2618d939f641e1c4bf520a9abf400fe03755f03
def snowflake_time(id): ' Discord snowflake ID to datetime(str) conversion\n More details: https://discord.com/developers/docs/reference#snowflakes\n ' return str(datetime.utcfromtimestamp((((id >> 22) + DISCORD_EPOCH) / 1000)))
Discord snowflake ID to datetime(str) conversion More details: https://discord.com/developers/docs/reference#snowflakes
tap_discord/__init__.py
snowflake_time
SageData-OOD/tap-discord
0
python
def snowflake_time(id): ' Discord snowflake ID to datetime(str) conversion\n More details: https://discord.com/developers/docs/reference#snowflakes\n ' return str(datetime.utcfromtimestamp((((id >> 22) + DISCORD_EPOCH) / 1000)))
def snowflake_time(id): ' Discord snowflake ID to datetime(str) conversion\n More details: https://discord.com/developers/docs/reference#snowflakes\n ' return str(datetime.utcfromtimestamp((((id >> 22) + DISCORD_EPOCH) / 1000)))<|docstring|>Discord snowflake ID to datetime(str) conversion More details...
034121d6087075ded91d890ebf0853161d9ae2ded9a629d5123564b2ee119156
def time_snowflake(datetime_obj, high=False): 'Returns a numeric snowflake pretending to be created at the given date.\n More details: https://discord.com/developers/docs/reference#snowflakes\n ' unix_seconds = (datetime_obj - type(datetime_obj)(1970, 1, 1)).total_seconds() discord_millis = int(((u...
Returns a numeric snowflake pretending to be created at the given date. More details: https://discord.com/developers/docs/reference#snowflakes
tap_discord/__init__.py
time_snowflake
SageData-OOD/tap-discord
0
python
def time_snowflake(datetime_obj, high=False): 'Returns a numeric snowflake pretending to be created at the given date.\n More details: https://discord.com/developers/docs/reference#snowflakes\n ' unix_seconds = (datetime_obj - type(datetime_obj)(1970, 1, 1)).total_seconds() discord_millis = int(((u...
def time_snowflake(datetime_obj, high=False): 'Returns a numeric snowflake pretending to be created at the given date.\n More details: https://discord.com/developers/docs/reference#snowflakes\n ' unix_seconds = (datetime_obj - type(datetime_obj)(1970, 1, 1)).total_seconds() discord_millis = int(((u...
628a95ec835107c57e4e6e4d13ce45ca94abc08a9a58bace95aaf11de93008f7
def load_schemas(): ' Load schemas from schemas folder ' schemas = {} for filename in os.listdir(get_abs_path('schemas')): path = ((get_abs_path('schemas') + '/') + filename) file_raw = filename.replace('.json', '') with open(path) as file: schemas[file_raw] = Schema.from...
Load schemas from schemas folder
tap_discord/__init__.py
load_schemas
SageData-OOD/tap-discord
0
python
def load_schemas(): ' ' schemas = {} for filename in os.listdir(get_abs_path('schemas')): path = ((get_abs_path('schemas') + '/') + filename) file_raw = filename.replace('.json', ) with open(path) as file: schemas[file_raw] = Schema.from_dict(json.load(file)) return ...
def load_schemas(): ' ' schemas = {} for filename in os.listdir(get_abs_path('schemas')): path = ((get_abs_path('schemas') + '/') + filename) file_raw = filename.replace('.json', ) with open(path) as file: schemas[file_raw] = Schema.from_dict(json.load(file)) return ...
488c35238a5dd41acd6cd2c24609b3c2b909b96381063aeaab61b1886379e6e7
def build(self, words, h_score): '\n\n :param words: list of text patterns\n :param h_score: list of numbers - the scores for the patterns\n :return: build an amended Aho-Corasick structure, return None\n ' for (i, (w, h)) in enumerate(zip(words, h_score)): self._add_wor...
:param words: list of text patterns :param h_score: list of numbers - the scores for the patterns :return: build an amended Aho-Corasick structure, return None
exoticst/ac_automation.py
build
valginer0/exotic-structures
0
python
def build(self, words, h_score): '\n\n :param words: list of text patterns\n :param h_score: list of numbers - the scores for the patterns\n :return: build an amended Aho-Corasick structure, return None\n ' for (i, (w, h)) in enumerate(zip(words, h_score)): self._add_wor...
def build(self, words, h_score): '\n\n :param words: list of text patterns\n :param h_score: list of numbers - the scores for the patterns\n :return: build an amended Aho-Corasick structure, return None\n ' for (i, (w, h)) in enumerate(zip(words, h_score)): self._add_wor...