hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
qsc_code_num_words_quality_signal
int64
qsc_code_num_chars_quality_signal
float64
qsc_code_mean_word_length_quality_signal
float64
qsc_code_frac_words_unique_quality_signal
float64
qsc_code_frac_chars_top_2grams_quality_signal
float64
qsc_code_frac_chars_top_3grams_quality_signal
float64
qsc_code_frac_chars_top_4grams_quality_signal
float64
qsc_code_frac_chars_dupe_5grams_quality_signal
float64
qsc_code_frac_chars_dupe_6grams_quality_signal
float64
qsc_code_frac_chars_dupe_7grams_quality_signal
float64
qsc_code_frac_chars_dupe_8grams_quality_signal
float64
qsc_code_frac_chars_dupe_9grams_quality_signal
float64
qsc_code_frac_chars_dupe_10grams_quality_signal
float64
qsc_code_frac_chars_replacement_symbols_quality_signal
float64
qsc_code_frac_chars_digital_quality_signal
float64
qsc_code_frac_chars_whitespace_quality_signal
float64
qsc_code_size_file_byte_quality_signal
float64
qsc_code_num_lines_quality_signal
float64
qsc_code_num_chars_line_max_quality_signal
float64
qsc_code_num_chars_line_mean_quality_signal
float64
qsc_code_frac_chars_alphabet_quality_signal
float64
qsc_code_frac_chars_comments_quality_signal
float64
qsc_code_cate_xml_start_quality_signal
float64
qsc_code_frac_lines_dupe_lines_quality_signal
float64
qsc_code_cate_autogen_quality_signal
float64
qsc_code_frac_lines_long_string_quality_signal
float64
qsc_code_frac_chars_string_length_quality_signal
float64
qsc_code_frac_chars_long_word_length_quality_signal
float64
qsc_code_frac_lines_string_concat_quality_signal
float64
qsc_code_cate_encoded_data_quality_signal
float64
qsc_code_frac_chars_hex_words_quality_signal
float64
qsc_code_frac_lines_prompt_comments_quality_signal
float64
qsc_code_frac_lines_assert_quality_signal
float64
qsc_codepython_cate_ast_quality_signal
float64
qsc_codepython_frac_lines_func_ratio_quality_signal
float64
qsc_codepython_cate_var_zero_quality_signal
bool
qsc_codepython_frac_lines_pass_quality_signal
float64
qsc_codepython_frac_lines_import_quality_signal
float64
qsc_codepython_frac_lines_simplefunc_quality_signal
float64
qsc_codepython_score_lines_no_logic_quality_signal
float64
qsc_codepython_frac_lines_print_quality_signal
float64
qsc_code_num_words
int64
qsc_code_num_chars
int64
qsc_code_mean_word_length
int64
qsc_code_frac_words_unique
null
qsc_code_frac_chars_top_2grams
int64
qsc_code_frac_chars_top_3grams
int64
qsc_code_frac_chars_top_4grams
int64
qsc_code_frac_chars_dupe_5grams
int64
qsc_code_frac_chars_dupe_6grams
int64
qsc_code_frac_chars_dupe_7grams
int64
qsc_code_frac_chars_dupe_8grams
int64
qsc_code_frac_chars_dupe_9grams
int64
qsc_code_frac_chars_dupe_10grams
int64
qsc_code_frac_chars_replacement_symbols
int64
qsc_code_frac_chars_digital
int64
qsc_code_frac_chars_whitespace
int64
qsc_code_size_file_byte
int64
qsc_code_num_lines
int64
qsc_code_num_chars_line_max
int64
qsc_code_num_chars_line_mean
int64
qsc_code_frac_chars_alphabet
int64
qsc_code_frac_chars_comments
int64
qsc_code_cate_xml_start
int64
qsc_code_frac_lines_dupe_lines
int64
qsc_code_cate_autogen
int64
qsc_code_frac_lines_long_string
int64
qsc_code_frac_chars_string_length
int64
qsc_code_frac_chars_long_word_length
int64
qsc_code_frac_lines_string_concat
null
qsc_code_cate_encoded_data
int64
qsc_code_frac_chars_hex_words
int64
qsc_code_frac_lines_prompt_comments
int64
qsc_code_frac_lines_assert
int64
qsc_codepython_cate_ast
int64
qsc_codepython_frac_lines_func_ratio
int64
qsc_codepython_cate_var_zero
int64
qsc_codepython_frac_lines_pass
int64
qsc_codepython_frac_lines_import
int64
qsc_codepython_frac_lines_simplefunc
int64
qsc_codepython_score_lines_no_logic
int64
qsc_codepython_frac_lines_print
int64
effective
string
hits
int64
0966430e2a9ef66941c2a92a0c7824a470c585d7
97
py
Python
src/graph_transpiler/webdnn/graph/variables/attributes/constant.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
1
2018-07-26T13:52:21.000Z
2018-07-26T13:52:21.000Z
src/graph_transpiler/webdnn/graph/variables/attributes/constant.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
null
null
null
src/graph_transpiler/webdnn/graph/variables/attributes/constant.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
null
null
null
from webdnn.graph.attribute import Attribute # FIXME: DOCS class Constant(Attribute): pass
13.857143
44
0.762887
12
97
6.166667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.164948
97
6
45
16.166667
0.91358
0.113402
0
0
0
0
0
0
0
0
0
0.166667
0
1
0
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
1
1
1
0
1
0
0
7
0988decfaf61ca71cdd3aefc9db3a2c60b8e695e
7,753
py
Python
src/behavior_tree/subtrees/MoveJoint.py
rirolab/behavior_tree
e2cc2c96fbe3af756908da966421667b7e28f821
[ "MIT" ]
null
null
null
src/behavior_tree/subtrees/MoveJoint.py
rirolab/behavior_tree
e2cc2c96fbe3af756908da966421667b7e28f821
[ "MIT" ]
1
2021-08-25T07:02:39.000Z
2021-08-25T07:11:21.000Z
src/behavior_tree/subtrees/MoveJoint.py
rirolab/behavior_tree
e2cc2c96fbe3af756908da966421667b7e28f821
[ "MIT" ]
null
null
null
import numpy as np import json import rospy import py_trees import std_msgs.msg as std_msgs from actionlib_msgs.msg import GoalStatus from control_msgs.msg import FollowJointTrajectoryResult import geometry_msgs from complex_action_client.srv import String_Int, None_String class MOVEJ(py_trees.behaviour.Behaviour): """ Note that this behaviour will return with :attr:`~py_trees.common.Status.SUCCESS`. It will also send a clearing command to the robot if it is cancelled or interrupted by a higher priority behaviour. """ def __init__(self, name, action_goal=None, topic_name="", controller_ns=""): super(MOVEJ, self).__init__(name=name) self.topic_name = topic_name self.controller_ns = controller_ns self.arm = None self.action_goal = action_goal self.sent_goal = False self.cmd_req = None def setup(self, timeout): ## self.publisher = rospy.Publisher(self.topic_name, std_msgs.String, queue_size=10, latch=True) self.feedback_message = "{}: setup".format(self.name) rospy.wait_for_service("arm_client/command") self.cmd_req = rospy.ServiceProxy("arm_client/command", String_Int) rospy.wait_for_service("arm_client/status") self.status_req = rospy.ServiceProxy("arm_client/status", None_String) return True def initialise(self): self.logger.debug("{0}.initialise()".format(self.__class__.__name__)) self.sent_goal = False def update(self): self.logger.debug("%s.update()" % self.__class__.__name__) if self.cmd_req is None: self.feedback_message = \ "no action client, did you call setup() on your tree?" return py_trees.Status.FAILURE if not self.sent_goal: goal = {} for i, ang in enumerate(self.action_goal): goal[str(i)] = ang cmd_str = json.dumps({'action_type': 'moveJoint', 'goal': json.dumps(goal), 'timeout': 3., 'no_wait': True}) ret = self.cmd_req(cmd_str) if ret.data==GoalStatus.REJECTED or ret.data==GoalStatus.ABORTED: self.feedback_message = \ "failed to execute" self.logger.debug("%s.update()[%s]" % (self.__class__.__name__, self.feedback_message)) return py_trees.common.Status.FAILURE self.sent_goal = True self.feedback_message = "Sending a joint goal" return py_trees.common.Status.RUNNING msg = self.status_req() d = json.loads(msg.data) state = d['state'] ret = d['result'] if state in [GoalStatus.ABORTED, GoalStatus.PREEMPTED, GoalStatus.REJECTED] and \ ret != FollowJointTrajectoryResult.SUCCESSFUL: self.feedback_message = "FAILURE" self.logger.debug("%s.update()[%s->%s][%s]" % (self.__class__.__name__, self.status, py_trees.common.Status.FAILURE, self.feedback_message)) return py_trees.common.Status.FAILURE if ret == FollowJointTrajectoryResult.SUCCESSFUL: self.feedback_message = "SUCCESSFUL" self.logger.debug("%s.update()[%s->%s][%s]" % (self.__class__.__name__, self.status, py_trees.common.Status.SUCCESS, self.feedback_message)) return py_trees.common.Status.SUCCESS else: return py_trees.common.Status.RUNNING def terminate(self, new_status): msg = self.status_req() d = json.loads(msg.data) if d['state'] == GoalStatus.ACTIVE: self.cmd_req( json.dumps({'action_type': 'cancel_goal'}) ) self.logger.debug("%s.terminate()[%s->%s]" % (self.__class__.__name__, self.status, new_status)) return class MOVEA(py_trees.behaviour.Behaviour): """ Note that this behaviour will return with :attr:`~py_trees.common.Status.SUCCESS`. It will also send a clearing command to the robot if it is cancelled or interrupted by a higher priority behaviour. """ def __init__(self, name, action_goal=None, topic_name="", controller_ns=""): super(MOVEA, self).__init__(name=name) self.topic_name = topic_name self.controller_ns = controller_ns self.arm = None self.action_goal = action_goal self.sent_goal = False self.cmd_req = None def setup(self, timeout): ## self.publisher = rospy.Publisher(self.topic_name, std_msgs.String, queue_size=10, latch=True) self.feedback_message = "{}: setup".format(self.name) rospy.wait_for_service("arm_client/command") self.cmd_req = rospy.ServiceProxy("arm_client/command", String_Int) rospy.wait_for_service("arm_client/status") self.status_req = rospy.ServiceProxy("arm_client/status", None_String) return True def initialise(self): self.logger.debug("{0}.initialise()".format(self.__class__.__name__)) self.sent_goal = False def update(self): self.logger.debug("%s.update()" % self.__class__.__name__) if self.cmd_req is None: self.feedback_message = \ "no action client, did you call setup() on your tree?" return py_trees.Status.FAILURE if not self.sent_goal: goal = {} for i, ang in enumerate(self.action_goal): goal[str(i)] = ang cmd_str = json.dumps({'action_type': 'moveJoint', 'goal': json.dumps(goal), 'timeout': 3., 'no_wait': True}) ret = self.cmd_req(cmd_str) if ret.data==GoalStatus.REJECTED or ret.data==GoalStatus.ABORTED: self.feedback_message = \ "failed to execute" self.logger.debug("%s.update()[%s]" % (self.__class__.__name__, self.feedback_message)) return py_trees.common.Status.FAILURE self.sent_goal = True self.feedback_message = "Sending a joint goal" return py_trees.common.Status.RUNNING msg = self.status_req() d = json.loads(msg.data) state = d['state'] ret = d['result'] if state in [GoalStatus.ABORTED, GoalStatus.PREEMPTED, GoalStatus.REJECTED] and \ ret != FollowJointTrajectoryResult.SUCCESSFUL: self.feedback_message = "FAILURE" self.logger.debug("%s.update()[%s->%s][%s]" % (self.__class__.__name__, self.status, py_trees.common.Status.FAILURE, self.feedback_message)) return py_trees.common.Status.FAILURE if ret == FollowJointTrajectoryResult.SUCCESSFUL: self.feedback_message = "SUCCESSFUL" self.logger.debug("%s.update()[%s->%s][%s]" % (self.__class__.__name__, self.status, py_trees.common.Status.SUCCESS, self.feedback_message)) return py_trees.common.Status.SUCCESS else: return py_trees.common.Status.RUNNING def terminate(self, new_status): msg = self.status_req() d = json.loads(msg.data) if d['state'] == GoalStatus.ACTIVE: self.cmd_req( json.dumps({'action_type': 'cancel_goal'}) ) self.logger.debug("%s.terminate()[%s->%s]" % (self.__class__.__name__, self.status, new_status)) return
38.959799
152
0.595382
905
7,753
4.828729
0.142541
0.033638
0.078261
0.069565
0.940503
0.940503
0.940503
0.940503
0.940503
0.940503
0
0.00146
0.293048
7,753
198
153
39.156566
0.79584
0.075584
0
0.909091
0
0
0.104375
0.019131
0
0
0
0
0
1
0.06993
false
0
0.062937
0
0.258741
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
09f994858a7c2a9b9bb7ff63284cafd56a5e0d2d
8,595
py
Python
test/test_nn.py
Renovamen/tinyark
da536e8f8132ef531c5bef3feebd3178c1877fce
[ "MIT" ]
15
2021-02-08T16:01:52.000Z
2021-02-10T07:49:26.000Z
test/test_nn.py
Renovamen/tinyark
da536e8f8132ef531c5bef3feebd3178c1877fce
[ "MIT" ]
null
null
null
test/test_nn.py
Renovamen/tinyark
da536e8f8132ef531c5bef3feebd3178c1877fce
[ "MIT" ]
2
2021-05-10T06:40:45.000Z
2021-05-10T14:47:03.000Z
import os import sys import unittest import numpy as np from numpy.core.numeric import identity import torch sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) import flint class TestNN(unittest.TestCase): def test_linear(self): batch_size = 2 in_features = 10 out_features = 3 x_init = np.random.randn(batch_size, in_features).astype(np.float32) w_init = np.random.randn(in_features, out_features).astype(np.float32) b_init = np.random.randn(1, out_features).astype(np.float32) def test_flint(): x = flint.Tensor(x_init.copy(), requires_grad=True) w = flint.Tensor(w_init.copy(), requires_grad=True) b = flint.Tensor(b_init.copy(), requires_grad=True) out = flint.nn.functional.linear(x, w, b) c = out.sum() c.backward() return out.data, w.grad def test_torch(): x = torch.tensor(x_init.copy(), requires_grad=True) w = torch.tensor(w_init.transpose(1, 0).copy(), requires_grad=True) b = torch.tensor(b_init.squeeze().copy(), requires_grad=True) out = torch.nn.functional.linear(x, w, b) c = out.sum() c.backward() return out.detach().numpy(), w.grad.permute(1, 0).numpy() for x, y in zip(test_flint(), test_torch()): np.testing.assert_allclose(x, y, atol=1e-5) def test_conv2d(self): batch_size = 2 h_in = 8 w_in = 7 in_channels = 2 out_channels = 3 kernel_size = (3, 2) stride = (3, 2) pad = (2, 2) dilation = (2, 2) x_init = np.random.randn(batch_size, in_channels, h_in, w_in).astype(np.float32) w_init = np.random.randn(out_channels, in_channels, kernel_size[0], kernel_size[1]).astype(np.float32) b_init = np.random.randn(1, out_channels, 1, 1).astype(np.float32) def test_flint(): x = flint.Tensor(x_init.copy(), requires_grad=True) w = flint.Tensor(w_init.copy(), requires_grad=True) b = flint.Tensor(b_init.copy(), requires_grad=True) out = flint.nn.functional.conv2d(x, w, b, stride, pad, dilation) c = out.sum() c.backward() return out.data, w.grad def test_torch(): x = torch.tensor(x_init.copy(), requires_grad=True) w = torch.tensor(w_init.copy(), requires_grad=True) b = torch.tensor(np.squeeze(b_init.copy()), requires_grad=True) out = torch.nn.functional.conv2d(x, w, b, stride, pad, dilation) c = out.sum() c.backward() return out.detach().numpy(), w.grad.numpy() for x, y in zip(test_flint(), test_torch()): np.testing.assert_allclose(x, y, atol=1e-5) def test_conv1d(self): batch_size = 3 l_in = 9 in_channels = 2 out_channels = 3 kernel_size = 3 stride = (2, ) pad = (1, ) dilation = (2, ) x_init = np.random.randn(batch_size, in_channels, l_in).astype(np.float32) w_init = np.random.randn(out_channels, in_channels, kernel_size).astype(np.float32) b_init = np.random.randn(1, out_channels, 1).astype(np.float32) def test_flint(): x = flint.Tensor(x_init.copy(), requires_grad=True) w = flint.Tensor(w_init.copy(), requires_grad=True) b = flint.Tensor(b_init.copy(), requires_grad=True) out = flint.nn.functional.conv1d(x, w, b, stride, pad, dilation) c = out.sum() c.backward() return out.data, w.grad def test_torch(): x = torch.tensor(x_init.copy(), requires_grad=True) w = torch.tensor(w_init.copy(), requires_grad=True) b = torch.tensor(np.squeeze(b_init.copy()), requires_grad=True) out = torch.nn.functional.conv1d(x, w, b, stride, pad, dilation) c = out.sum() c.backward() return out.detach().numpy(), w.grad.numpy() for x, y in zip(test_flint(), test_torch()): np.testing.assert_allclose(x, y, atol=1e-5) def test_max_pool2d(self): batch_size = 3 h_in = 8 w_in = 7 in_channels = 2 kernel_size = (3, 2) stride = (3, 2) pad = (0, 0) dilation = (2, 2) x_init = np.random.randn(batch_size, in_channels, h_in, w_in).astype(np.float32) def test_flint(): x = flint.Tensor(x_init.copy(), requires_grad=True) out = flint.nn.functional.max_pool2d(x, kernel_size, stride, pad, dilation) c = out.sum() c.backward() return out.data, x.grad def test_torch(): x = torch.tensor(x_init.copy(), requires_grad=True) out = torch.nn.functional.max_pool2d(x, kernel_size, stride, pad, dilation) c = out.sum() c.backward() return out.detach().numpy(), x.grad.numpy() for x, y in zip(test_flint(), test_torch()): np.testing.assert_allclose(x, y, atol=1e-5) def test_max_pool1d(self): batch_size = 3 l_in = 9 in_channels = 2 kernel_size = 3 stride = (2, ) pad = (0, ) dilation = (2, ) x_init = np.random.randn(batch_size, in_channels, l_in).astype(np.float32) def test_flint(): x = flint.Tensor(x_init.copy(), requires_grad=True) out = flint.nn.functional.max_pool1d(x, kernel_size, stride, pad, dilation) c = out.sum() c.backward() return out.data, x.grad def test_torch(): x = torch.tensor(x_init.copy(), requires_grad=True) out = torch.nn.functional.max_pool1d(x, kernel_size, stride, pad, dilation) c = out.sum() c.backward() return out.detach().numpy(), x.grad.numpy() for x, y in zip(test_flint(), test_torch()): np.testing.assert_allclose(x, y, atol=1e-5) def test_unfold(self): batch_size = 2 h_in = 8 w_in = 7 in_channels = 2 kernel_size = (3, 2) stride = (3, 2) pad = (2, 2) dilation = (2, 2) x_init = np.random.randn(batch_size, in_channels, h_in, w_in).astype(np.float32) def test_flint(): x = flint.Tensor(x_init.copy(), requires_grad=True) unfold = flint.nn.Unfold(kernel_size, stride, pad, dilation) out = unfold(x) c = out.sum() c.backward() return out.data, x.grad def test_torch(): x = torch.tensor(x_init.copy(), requires_grad=True) unfold = torch.nn.Unfold(kernel_size, dilation, pad, stride) out = unfold(x) c = out.sum() c.backward() return out.detach().numpy(), x.grad.numpy() for x, y in zip(test_flint(), test_torch()): np.testing.assert_allclose(x, y, atol=1e-5) def test_identity(self): x_init = np.random.randn(16, 20, 14, 14).astype(np.float32) def test_flint(): x = flint.Tensor(x_init.copy(), requires_grad=True) identity = flint.nn.Identity() out = identity(x) c = out.sum() c.backward() return out.data, x.grad def test_torch(): x = torch.tensor(x_init.copy(), requires_grad=True) identity = torch.nn.Identity() out = identity(x) c = out.sum() c.backward() return out.detach().numpy(), x.grad.numpy() for x, y in zip(test_flint(), test_torch()): np.testing.assert_allclose(x, y, atol=1e-5) def test_flatten(self): x_init = np.random.randn(16, 20).astype(np.float32) def test_flint(): x = flint.Tensor(x_init.copy(), requires_grad=True) out = flint.nn.functional.flatten(x) c = out.sum() c.backward() return out.data, x.grad def test_torch(): x = torch.tensor(x_init.copy(), requires_grad=True) out = x.view(x.size(0), -1) c = out.sum() c.backward() return out.detach().numpy(), x.grad.numpy() for x, y in zip(test_flint(), test_torch()): np.testing.assert_allclose(x, y, atol=1e-5) if __name__ == '__main__': unittest.main()
31.141304
110
0.552298
1,182
8,595
3.845178
0.07868
0.073927
0.09857
0.123212
0.89747
0.887349
0.880528
0.873487
0.836084
0.828383
0
0.023418
0.314369
8,595
275
111
31.254545
0.747836
0
0
0.745098
0
0
0.001163
0
0
0
0
0
0.039216
1
0.117647
false
0
0.034314
0
0.235294
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
11103b833fcb1ee4f3759f1529ce6e4661ed44e9
37
py
Python
tests/test_popups.py
telday/py_cui
9f7a5f9a72733effd5e50322774988ca998a5e8a
[ "BSD-3-Clause" ]
null
null
null
tests/test_popups.py
telday/py_cui
9f7a5f9a72733effd5e50322774988ca998a5e8a
[ "BSD-3-Clause" ]
null
null
null
tests/test_popups.py
telday/py_cui
9f7a5f9a72733effd5e50322774988ca998a5e8a
[ "BSD-3-Clause" ]
1
2020-08-03T19:04:05.000Z
2020-08-03T19:04:05.000Z
import pytest import py_cui # TODO
6.166667
13
0.756757
6
37
4.5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.216216
37
6
14
6.166667
0.931034
0.108108
0
0
0
0
0
0
0
0
0
0.166667
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
1
0
1
0
0
7
3a22929d8840a13ef4462fa278429ea15d2eb3fc
9,677
py
Python
sdk/metricsadvisor/azure-ai-metricsadvisor/tests/test_credential_entities.py
jiriburant/azure-sdk-for-python
a3b20fd3cf30145ee74fa3dfafbdce98ea9f6ef0
[ "MIT" ]
null
null
null
sdk/metricsadvisor/azure-ai-metricsadvisor/tests/test_credential_entities.py
jiriburant/azure-sdk-for-python
a3b20fd3cf30145ee74fa3dfafbdce98ea9f6ef0
[ "MIT" ]
1
2021-05-31T08:56:01.000Z
2021-05-31T08:56:01.000Z
sdk/metricsadvisor/azure-ai-metricsadvisor/tests/test_credential_entities.py
jiriburant/azure-sdk-for-python
a3b20fd3cf30145ee74fa3dfafbdce98ea9f6ef0
[ "MIT" ]
null
null
null
# coding=utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import pytest from azure.ai.metricsadvisor.models import ( SqlConnectionStringCredentialEntity, DataLakeGen2SharedKeyCredentialEntity, ServicePrincipalCredentialEntity, ServicePrincipalInKeyVaultCredentialEntity ) from base_testcase import TestMetricsAdvisorAdministrationClientBase class TestMetricsAdvisorAdministrationClient(TestMetricsAdvisorAdministrationClientBase): def test_create_sql_connection_string_credential_entity(self): credential_entity_name = self.create_random_name("testsqlcredential") try: credential_entity = self.admin_client.create_credential_entity( credential_entity=SqlConnectionStringCredentialEntity( name=credential_entity_name, connection_string=self.sql_server_connection_string, description="my credential entity", ) ) self.assertIsNotNone(credential_entity.id) self.assertEqual(credential_entity.name, credential_entity_name) self.assertEqual(credential_entity.credential_entity_type, 'AzureSQLConnectionString') finally: self.admin_client.delete_credential_entity(credential_entity.id) def test_datalake_gen2_shared_key_credential_entity(self): credential_entity_name = self.create_random_name("testdatalakecredential") try: credential_entity = self.admin_client.create_credential_entity( credential_entity=DataLakeGen2SharedKeyCredentialEntity( name=credential_entity_name, account_key=self.azure_datalake_account_key, description="my credential entity", ) ) self.assertIsNotNone(credential_entity.id) self.assertEqual(credential_entity.name, credential_entity_name) self.assertEqual(credential_entity.credential_entity_type, 'DataLakeGen2SharedKey') finally: self.admin_client.delete_credential_entity(credential_entity.id) def test_service_principal_credential_entity(self): credential_entity_name = self.create_random_name("testserviceprincipalcredential") try: credential_entity = self.admin_client.create_credential_entity( credential_entity=ServicePrincipalCredentialEntity( name=credential_entity_name, client_id="client_id", client_secret="client_secret", tenant_id="tenant_id", description="my credential entity", ) ) self.assertIsNotNone(credential_entity.id) self.assertEqual(credential_entity.name, credential_entity_name) self.assertEqual(credential_entity.credential_entity_type, 'ServicePrincipal') finally: self.admin_client.delete_credential_entity(credential_entity.id) def test_service_principal_in_kv_credential_entity(self): credential_entity_name = self.create_random_name("testserviceprincipalcredential") try: credential_entity = self.admin_client.create_credential_entity( credential_entity=ServicePrincipalInKeyVaultCredentialEntity( name=credential_entity_name, key_vault_endpoint="key_vault_endpoint", key_vault_client_id="key_vault_client_id", key_vault_client_secret="key_vault_client_secret", service_principal_id_name_in_kv="service_principal_id_name_in_kv", service_principal_secret_name_in_kv="service_principal_secret_name_in_kv", tenant_id="tenant_id", description="my credential entity", ) ) self.assertIsNotNone(credential_entity.id) self.assertEqual(credential_entity.name, credential_entity_name) self.assertEqual(credential_entity.credential_entity_type, 'ServicePrincipalInKV') finally: self.admin_client.delete_credential_entity(credential_entity.id) def test_list_credential_entities(self): credential_entity_name = self.create_random_name("testsqlcredential") try: credential_entity = self.admin_client.create_credential_entity( credential_entity=SqlConnectionStringCredentialEntity( name=credential_entity_name, connection_string=self.sql_server_connection_string, description="my credential entity", ) ) credential_entities = self.admin_client.list_credential_entities() assert len(list(credential_entities)) > 0 finally: self.admin_client.delete_credential_entity(credential_entity.id) def test_update_sql_connection_string_credential_entity(self): credential_entity_name = self.create_random_name("testsqlcredential") try: credential_entity = self.admin_client.create_credential_entity( credential_entity=SqlConnectionStringCredentialEntity( name=credential_entity_name, connection_string=self.sql_server_connection_string, description="my credential entity", ) ) credential_entity.connection_string = "update" credential_entity.description = "update" credential_entity_updated = self.admin_client.update_credential_entity(credential_entity) self.assertEqual(credential_entity_updated.description, "update") finally: self.admin_client.delete_credential_entity(credential_entity.id) def test_update_datalake_gen2_shared_key_credential_entity(self): credential_entity_name = self.create_random_name("testdatalakecredential") try: credential_entity = self.admin_client.create_credential_entity( credential_entity=DataLakeGen2SharedKeyCredentialEntity( name=credential_entity_name, account_key=self.azure_datalake_account_key, description="my credential entity", ) ) credential_entity.account_key = "update" credential_entity.description = "update" credential_entity_updated = self.admin_client.update_credential_entity(credential_entity) self.assertEqual(credential_entity_updated.description, "update") finally: self.admin_client.delete_credential_entity(credential_entity.id) def test_update_service_principal_credential_entity(self): credential_entity_name = self.create_random_name("testserviceprincipalcredential") try: credential_entity = self.admin_client.create_credential_entity( credential_entity=ServicePrincipalCredentialEntity( name=credential_entity_name, client_id="client_id", client_secret="client_secret", tenant_id="tenant_id", description="my credential entity", ) ) credential_entity.client_id = "update" credential_entity.client_secret = "update" credential_entity.tenant_id = "update" credential_entity.description = "update" credential_entity_updated = self.admin_client.update_credential_entity(credential_entity) self.assertEqual(credential_entity_updated.description, "update") finally: self.admin_client.delete_credential_entity(credential_entity.id) def test_update_service_principal_in_kv_credential_entity(self): credential_entity_name = self.create_random_name("testserviceprincipalcredential") try: credential_entity = self.admin_client.create_credential_entity( credential_entity=ServicePrincipalInKeyVaultCredentialEntity( name=credential_entity_name, key_vault_endpoint="key_vault_endpoint", key_vault_client_id="key_vault_client_id", key_vault_client_secret="key_vault_client_secret", service_principal_id_name_in_kv="service_principal_id_name_in_kv", service_principal_secret_name_in_kv="service_principal_secret_name_in_kv", tenant_id="tenant_id", description="my credential entity", ) ) credential_entity.key_vault_endpoint = "update" credential_entity.key_vault_client_id = "update" credential_entity.key_vault_client_secret = "update" credential_entity.service_principal_id_name_in_kv = "update" credential_entity.service_principal_secret_name_in_kv = "update" credential_entity.tenant_id = "update" credential_entity.description = "update" credential_entity_updated = self.admin_client.update_credential_entity(credential_entity) self.assertEqual(credential_entity_updated.description, "update") finally: self.admin_client.delete_credential_entity(credential_entity.id)
51.473404
101
0.670042
877
9,677
6.939567
0.099202
0.344397
0.132435
0.157739
0.88301
0.87118
0.842918
0.842918
0.842918
0.842918
0
0.001112
0.256381
9,677
187
102
51.748663
0.844636
0.032241
0
0.696429
0
0
0.098525
0.041355
0
0
0
0
0.10119
1
0.053571
false
0
0.017857
0
0.077381
0
0
0
0
null
1
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
3a420190e296ae5117513e4be1fdf3b24b20a9ec
357
py
Python
Desafios Python/m01/ex032.py
joaquimjfernandes/Curso-de-Python
3356211248d355eaa67098cebe5cdb8cf6badc75
[ "MIT" ]
null
null
null
Desafios Python/m01/ex032.py
joaquimjfernandes/Curso-de-Python
3356211248d355eaa67098cebe5cdb8cf6badc75
[ "MIT" ]
null
null
null
Desafios Python/m01/ex032.py
joaquimjfernandes/Curso-de-Python
3356211248d355eaa67098cebe5cdb8cf6badc75
[ "MIT" ]
null
null
null
# ----------------------------------------------------------------------- print('\033[32;1mDESAFIO 032 - Ano Bissexto\033[m') print('\033[32;1mALUNO:\033[m \033[36;1mJoaquim Fernandes\033[m') print('-' * 50) # ----------------------------------------------------------------------- # -----------------------------------------------------------------------
44.625
73
0.257703
23
357
4
0.565217
0.130435
0.217391
0
0
0
0
0
0
0
0
0.094395
0.05042
357
7
74
51
0.176991
0.602241
0
0
0
0.333333
0.717391
0.15942
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
1
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
8
28c94f0c92d8389025d1ebac10b4f5c98c7cdab5
34
py
Python
packages/foo/beta/moon.py
rockman/learn-python-online
9c979fbea7bb2ed502eba2440306ab5a0f4637af
[ "MIT" ]
null
null
null
packages/foo/beta/moon.py
rockman/learn-python-online
9c979fbea7bb2ed502eba2440306ab5a0f4637af
[ "MIT" ]
null
null
null
packages/foo/beta/moon.py
rockman/learn-python-online
9c979fbea7bb2ed502eba2440306ab5a0f4637af
[ "MIT" ]
null
null
null
def the_moon(): return 'MOON'
11.333333
17
0.617647
5
34
4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.235294
34
3
17
11.333333
0.769231
0
0
0
0
0
0.117647
0
0
0
0
0
0
1
0.5
true
0
0
0.5
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
7
e922480dc4b2fde82bbd10250ba8c6f2c6a728c7
193
py
Python
unitorch/models/swin/__init__.py
fuliucansheng/UniTorch
47038321593ce4e7eabda555bd58c0cf89482146
[ "MIT" ]
2
2022-02-05T08:52:00.000Z
2022-03-27T07:01:34.000Z
unitorch/models/swin/__init__.py
Lixin-Qian/unitorch
47038321593ce4e7eabda555bd58c0cf89482146
[ "MIT" ]
null
null
null
unitorch/models/swin/__init__.py
Lixin-Qian/unitorch
47038321593ce4e7eabda555bd58c0cf89482146
[ "MIT" ]
1
2022-03-27T07:01:13.000Z
2022-03-27T07:01:13.000Z
# Copyright (c) FULIUCANSHENG. # Licensed under the MIT License. from unitorch.models.swin.modeling import SwinForImageClassification from unitorch.models.swin.processing import SwinProcessor
32.166667
68
0.839378
22
193
7.363636
0.772727
0.148148
0.222222
0.271605
0
0
0
0
0
0
0
0
0.098446
193
5
69
38.6
0.931034
0.310881
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
e9264cc5c711fb97e5e0d658478217d880d29910
31,212
py
Python
CybORG/CybORG/Tests/test_sim/test_Agents/test_react_blue_agent.py
rafvasq/cage-challenge-1
95affdfa38afc1124f1a1a09c92fbc0ed5b96318
[ "MIT" ]
18
2021-08-20T15:07:55.000Z
2022-03-11T12:05:15.000Z
CybORG/CybORG/Tests/test_sim/test_Agents/test_react_blue_agent.py
rafvasq/cage-challenge-1
95affdfa38afc1124f1a1a09c92fbc0ed5b96318
[ "MIT" ]
7
2021-11-09T06:46:58.000Z
2022-03-31T12:35:06.000Z
CybORG/CybORG/Tests/test_sim/test_Agents/test_react_blue_agent.py
rafvasq/cage-challenge-1
95affdfa38afc1124f1a1a09c92fbc0ed5b96318
[ "MIT" ]
13
2021-08-17T00:26:31.000Z
2022-03-29T20:06:45.000Z
import inspect from ipaddress import IPv4Network from CybORG import CybORG from CybORG.Agents.SimpleAgents.BlueReactAgent import BlueReactRemoveAgent from CybORG.Shared.Actions import Impact, PrivilegeEscalate, ExploitRemoteService, DiscoverNetworkServices, \ DiscoverRemoteSystems from CybORG.Shared.Enums import TrinaryEnum, SessionType, ProcessType, ProcessState, OperatingSystemType from CybORG.Tests.EphemeralPort import LinuxEphemeralPort, Win2008EphemeralPort, PID import pytest @pytest.mark.skip() @pytest.mark.parametrize("seed", [1]) def test_react_blue_agent(seed): # create cyborg environment path = str(inspect.getfile(CybORG)) path = path[:-10] + '/Shared/Scenarios/Scenario1b.yaml' cyborg = CybORG(path, 'sim', agents={'Blue': BlueReactRemoveAgent}) cyborg.set_seed(seed) # test discover remote systems # act on all subnets in action space action_space = cyborg.get_action_space('Red') initial_observation = cyborg.get_observation('Red') session = list(action_space['session'].keys())[0] def red_remote_system_discover(expected_observation, subnet, reward): action = DiscoverRemoteSystems(subnet=subnet, agent='Red', session=session) result = cyborg.step(action=action, agent='Red') # test if output of observation matches expected output # assert result.reward == reward assert not result.done assert result.observation == expected_observation, f'failed scan of {subnet}' def red_remote_service_discover(expected_observation, ip_address, reward): action = DiscoverNetworkServices(ip_address=ip_address, agent='Red', session=session) result = cyborg.step(action=action, agent='Red') # test if output of observation matches expected output # assert result.reward == reward assert not result.done assert result.observation == expected_observation def red_remote_service_exploit(expected_observation, ip_address, reward): action = ExploitRemoteService(ip_address=ip_address, agent='Red', session=session) result = cyborg.step(action=action, agent='Red') # test if output of observation matches expected output # assert result.reward == reward assert not result.done assert result.observation == expected_observation def red_privilege_escalate(expected_observation, hostname, reward): action = PrivilegeEscalate(hostname=hostname, agent='Red', session=session) result = cyborg.step(action=action, agent='Red') # test if output of observation matches expected output # assert result.reward == round(reward, 1), f'incorrect reward for host {hostname}' assert not result.done assert result.observation == expected_observation for subnet in action_space["subnet"]: if not action_space["subnet"][subnet]: expected_observation = {'success': TrinaryEnum.FALSE} reward = -0.1 else: expected_observation = {str(cyborg.environment_controller.hostname_ip_map['User' + str(i)]): {'Interface': [{ 'IP Address': cyborg.environment_controller.hostname_ip_map[ 'User' + str( i)], 'Subnet': subnet}]} for i in range(5)} reward = 0 expected_observation.update({'success': True}) red_remote_system_discover(expected_observation, subnet, reward) # test discover network services # act on ip addresses discovered in first subnet addresses = [i for i in action_space["ip_address"]] for address in addresses: if not action_space["ip_address"][address]: expected_observation = {'success': TrinaryEnum.FALSE} reward = -0.1 elif address == cyborg.environment_controller.hostname_ip_map['User0'] or address == \ cyborg.environment_controller.hostname_ip_map['User1'] \ or address == cyborg.environment_controller.hostname_ip_map['User2']: expected_observation = {str(address): {'Interface': [{'IP Address': address}], 'Processes': [ {'Connections': [{'local_address': address, 'local_port': 22}]}, {'Connections': [{'local_address': address, 'local_port': 135}]}, {'Connections': [{'local_address': address, 'local_port': 3389}]}, {'Connections': [{'local_address': address, 'local_port': 445}]}, {'Connections': [{'local_address': address, 'local_port': 139}]}]}, 'success': TrinaryEnum.TRUE} reward = 0 elif address == cyborg.environment_controller.hostname_ip_map['User3'] \ or address == cyborg.environment_controller.hostname_ip_map['User4']: expected_observation = {str(address): {'Interface': [{'IP Address': address}], 'Processes': [ {'Connections': [{'local_address': address, 'local_port': 22}]}, {'Connections': [{'local_address': address, 'local_port': 80}]}]}, 'success': TrinaryEnum.TRUE} reward = 0 else: raise ValueError red_remote_service_discover(expected_observation, address, reward) # test exploit action by acting on all known ip_addresses count = 1 initial_ip_address = initial_observation['User0']['Interface'][0]['IP Address'] # own all hosts on the client subnet cumm_reward = 0 for address in addresses: reward = cumm_reward # test if output of observation matches expected output if not action_space["ip_address"][address]: expected_observation = {'success': TrinaryEnum.FALSE} reward += -0.1 elif address == initial_ip_address: expected_observation = {str(address): {'Interface': [{'IP Address': address}], 'Processes': [{'Connections': [{'local_address': address, 'local_port': 4444, 'remote_address': address, 'remote_port': Win2008EphemeralPort()}], 'Process Type': ProcessType.REVERSE_SESSION_HANDLER}, {'Connections': [{'local_address': address, 'local_port': Win2008EphemeralPort(), 'remote_address': address, 'remote_port': 4444}], 'Process Type': ProcessType.REVERSE_SESSION}, {'Connections': [{'local_address': address, 'local_port': 139, 'Status': ProcessState.OPEN}], 'Process Type': ProcessType.SMB}], 'Sessions': [{'Agent': 'Red', 'ID': count, 'Type': SessionType.RED_REVERSE_SHELL}], 'System info': {'Hostname': 'User0', 'OSType': OperatingSystemType.WINDOWS} }, 'success': TrinaryEnum.TRUE} count += 1 elif address == \ cyborg.environment_controller.hostname_ip_map['User1'] \ or address == cyborg.environment_controller.hostname_ip_map['User2']: expected_observation = {str(address): {'Interface': [{'IP Address': address}], 'Processes': [{'Connections': [{'local_address': address, 'local_port': Win2008EphemeralPort(), 'remote_address': initial_ip_address, 'remote_port': 4444}], 'Process Type': ProcessType.REVERSE_SESSION}, {'Connections': [{'local_address': address, 'local_port': 139, 'Status': ProcessState.OPEN}], 'Process Type': ProcessType.SMB}], 'Sessions': [{'Agent': 'Red', 'ID': count, 'Type': SessionType.RED_REVERSE_SHELL}], 'System info': {'Hostname': {v: i for i, v in cyborg.environment_controller.hostname_ip_map.items()}[ address], 'OSType': OperatingSystemType.WINDOWS} }, str(initial_ip_address): {'Interface': [{'IP Address': initial_ip_address}], 'Processes': [ {'Connections': [{'local_address': initial_ip_address, 'local_port': 4444, 'remote_address': address, 'remote_port': Win2008EphemeralPort()}], 'Process Type': ProcessType.REVERSE_SESSION_HANDLER}]}, 'success': TrinaryEnum.TRUE} count += 1 cumm_reward += 0.1 reward = cumm_reward elif address == \ cyborg.environment_controller.hostname_ip_map['User3'] \ or address == cyborg.environment_controller.hostname_ip_map['User4']: expected_observation = {str(address): {'Interface': [{'IP Address': address}], 'Processes': [{'Connections': [{'local_address': address, 'local_port': LinuxEphemeralPort(), 'remote_address': initial_ip_address, 'remote_port': 4444}], 'Process Type': ProcessType.REVERSE_SESSION}, {'Connections': [{'local_address': address, 'local_port': 80, 'Status': ProcessState.OPEN}], 'Process Type': ProcessType.WEBSERVER}], 'Sessions': [{'Agent': 'Red', 'ID': count, 'Type': SessionType.RED_REVERSE_SHELL}], 'System info': {'Hostname': {v: i for i, v in cyborg.environment_controller.hostname_ip_map.items()}[ address], 'OSType': OperatingSystemType.LINUX} }, str(initial_ip_address): {'Interface': [{'IP Address': initial_ip_address}], 'Processes': [ {'Connections': [{'local_address': initial_ip_address, 'local_port': 4444, 'remote_address': address, 'remote_port': LinuxEphemeralPort()}], 'Process Type': ProcessType.REVERSE_SESSION_HANDLER}]}, 'success': TrinaryEnum.TRUE} count += 1 else: raise NotImplementedError red_remote_service_exploit(expected_observation, address, reward) # priv esc on all hosts in client subnet action_space = cyborg.get_action_space('Red') hostnames = action_space['hostname'] count = 2 for hostname in hostnames: reward = cumm_reward # test if output of observation matches expected output if not action_space["hostname"][hostname]: expected_observation = {'success': TrinaryEnum.FALSE} reward += -0.1 elif hostname == 'User0': expected_observation = {hostname: {'Interface': [{'IP Address': cyborg.environment_controller.hostname_ip_map[hostname], 'Interface Name': 'eth0', 'Subnet': IPv4Network( f'{cyborg.environment_controller.hostname_ip_map[hostname]}/28', False)}], 'Processes': [{'PID': PID(), 'Username': 'SYSTEM'}], 'Sessions': [{'Agent': 'Red', 'ID': 0, 'Type': SessionType.RED_ABSTRACT_SESSION, 'Username': 'SYSTEM', 'PID': PID(), 'Timeout': 0}]}, 'success': TrinaryEnum.TRUE} elif hostname == 'User1' or hostname == 'User2': expected_observation = {'Enterprise1': { 'Interface': [{'IP Address': cyborg.environment_controller.hostname_ip_map['Enterprise1']}]}, hostname: {'Interface': [{'IP Address': cyborg.environment_controller.hostname_ip_map[hostname], 'Interface Name': 'eth0', 'Subnet': IPv4Network( f'{cyborg.environment_controller.hostname_ip_map[hostname]}/28', False)}], 'Processes': [{'PID': PID(), 'Username': 'SYSTEM'}], 'Sessions': [{'Agent': 'Red', 'ID': count, 'Type': SessionType.RED_REVERSE_SHELL, 'Username': 'SYSTEM', 'PID': PID(), 'Timeout': 0}]}, 'success': TrinaryEnum.TRUE} count += 1 elif hostname == 'User3' or hostname == 'User4': if seed in [] or hostname == 'User4': expected_observation = {'Enterprise0': { 'Interface': [{'IP Address': cyborg.environment_controller.hostname_ip_map['Enterprise0']}]}, hostname: {'Interface': [{'IP Address': cyborg.environment_controller.hostname_ip_map[hostname], 'Interface Name': 'eth0', 'Subnet': IPv4Network( f'{cyborg.environment_controller.hostname_ip_map[hostname]}/28', False)}], 'Sessions': [{'Agent': 'Red', 'ID': count, 'Type': SessionType.RED_REVERSE_SHELL, 'Username': 'root'}]}, 'success': TrinaryEnum.TRUE} reward = cumm_reward else: expected_observation = {'success': False} reward = cumm_reward reward += 0.1 if hostname == 'User4' else 0 count += 1 else: raise ValueError red_privilege_escalate(expected_observation, hostname, reward) # recon hosts in enterprise subnet action_space = cyborg.get_action_space('Red') addresses = [i for i in action_space["ip_address"]] for address in addresses: reward = cumm_reward if not action_space["ip_address"][address]: expected_observation = {'success': TrinaryEnum.FALSE} reward = cumm_reward-0.1 elif address == cyborg.environment_controller.hostname_ip_map['User0'] \ or address == cyborg.environment_controller.hostname_ip_map['User1'] \ or address == cyborg.environment_controller.hostname_ip_map['User2'] \ or address == cyborg.environment_controller.hostname_ip_map['User3'] \ or address == cyborg.environment_controller.hostname_ip_map['User4']: continue elif address == cyborg.environment_controller.hostname_ip_map['Enterprise0']: expected_observation = {str(address): {'Interface': [{'IP Address': address}], 'Processes': [ {'Connections': [{'local_address': address, 'local_port': 22}]}]}, 'success': TrinaryEnum.TRUE} elif address == cyborg.environment_controller.hostname_ip_map['Enterprise1']: expected_observation = {str(address): {'Interface': [{'IP Address': address}], 'Processes': [ {'Connections': [{'local_address': address, 'local_port': 22}]}, {'Connections': [{'local_address': address, 'local_port': 135}]}, {'Connections': [{'local_address': address, 'local_port': 3389}]}, {'Connections': [{'local_address': address, 'local_port': 445}]}, {'Connections': [{'local_address': address, 'local_port': 139}]}, {'Connections': [{'local_address': address, 'local_port': 80}]}, {'Connections': [{'local_address': address, 'local_port': 443}]}]}, 'success': TrinaryEnum.TRUE} else: raise ValueError red_remote_service_discover(expected_observation, address, reward) # exploit hosts in enterprise subnet action_space = cyborg.get_action_space('Red') addresses = [i for i in action_space["ip_address"]] for address in addresses: reward = cumm_reward if not action_space["ip_address"][address]: expected_observation = {'success': TrinaryEnum.FALSE} reward = cumm_reward-0.1 elif address == cyborg.environment_controller.hostname_ip_map['User0'] \ or address == cyborg.environment_controller.hostname_ip_map['User1'] \ or address == cyborg.environment_controller.hostname_ip_map['User2'] \ or address == cyborg.environment_controller.hostname_ip_map['User3'] \ or address == cyborg.environment_controller.hostname_ip_map['User4']: continue elif address == cyborg.environment_controller.hostname_ip_map['Enterprise0']: expected_observation = {str(address): {'Interface': [{'IP Address': address}], 'Processes': [{'Connections': [{'local_address': address, 'local_port': 22, 'Status': ProcessState.OPEN}], 'Process Type': ProcessType.SSH}, {'Connections': [{'local_address': address, 'local_port': 22, 'remote_address': initial_ip_address, 'remote_port': LinuxEphemeralPort()}], 'Process Type': ProcessType.SSH}, ], 'Sessions': [{'Agent': 'Red', 'ID': count, 'Type': SessionType.SSH, 'Username': 'pi'}], 'System info': {'Hostname': {v: i for i, v in cyborg.environment_controller.hostname_ip_map.items()}[ address], 'OSType': OperatingSystemType.LINUX}, 'User Info': [{'Password': 'raspberry', 'UID': 1001, 'Username': 'pi'}] }, str(initial_ip_address): {'Interface': [{'IP Address': initial_ip_address}], 'Processes': [ {'Connections': [{'local_address': initial_ip_address, 'local_port': LinuxEphemeralPort(), 'remote_address': address, 'remote_port': 22}]}]}, 'success': TrinaryEnum.TRUE} count += 1 elif address == cyborg.environment_controller.hostname_ip_map['Enterprise1']: expected_observation = {str(address): {'Interface': [{'IP Address': address}], 'Processes': [{'Connections': [{'local_address': address, 'local_port': Win2008EphemeralPort(), 'remote_address': initial_ip_address, 'remote_port': 4444}], 'Process Type': ProcessType.REVERSE_SESSION}, {'Connections': [{'local_address': address, 'local_port': 443, 'Status': ProcessState.OPEN}], 'Process Type': ProcessType.WEBSERVER}], 'Sessions': [{'Agent': 'Red', 'ID': count, 'Type': SessionType.RED_REVERSE_SHELL}], 'System info': {'Hostname': {v: i for i, v in cyborg.environment_controller.hostname_ip_map.items()}[ address], 'OSType': OperatingSystemType.WINDOWS} }, str(initial_ip_address): {'Interface': [{'IP Address': initial_ip_address}], 'Processes': [ {'Connections': [{'local_address': initial_ip_address, 'local_port': 4444, 'remote_address': address, 'remote_port': Win2008EphemeralPort()}], 'Process Type': ProcessType.REVERSE_SESSION_HANDLER}]}, 'success': TrinaryEnum.TRUE} count += 1 else: raise ValueError red_remote_service_exploit(expected_observation, address, reward) # priv esc hosts in enterprise subnet enterprise_subnet = cyborg.environment_controller.subnet_cidr_map['Enterprise'] action_space = cyborg.get_action_space('Red') hostnames = action_space['hostname'] count = 6 for hostname in hostnames: reward = cumm_reward # test if output of observation matches expected output if not action_space["hostname"][hostname]: expected_observation = {'success': TrinaryEnum.FALSE} reward = cumm_reward-0.1 elif 'User' in hostname: continue elif hostname == 'Enterprise0': expected_observation = {hostname: {'Interface': [{'IP Address': cyborg.environment_controller.hostname_ip_map[ hostname], 'Interface Name': 'eth0', 'Subnet': enterprise_subnet}], 'Sessions': [{'Agent': 'Red', 'ID': count, 'Type': SessionType.SSH, 'Username': 'root'}]}, 'success': TrinaryEnum.TRUE} count += 1 reward = 1 elif hostname == 'Enterprise1': if seed in []: expected_observation = {hostname: {'Interface': [{'IP Address': cyborg.environment_controller.hostname_ip_map[ hostname], 'Interface Name': 'eth0', 'Subnet': enterprise_subnet}], 'Sessions': [{'Agent': 'Red', 'ID': count, 'Type': SessionType.RED_REVERSE_SHELL, 'Username': 'SYSTEM'}]}, 'success': TrinaryEnum.TRUE} count += 1 reward = 1 else: expected_observation = {'success': TrinaryEnum.FALSE} count += 1 else: raise ValueError red_privilege_escalate(expected_observation, hostname, reward)
69.982063
135
0.394207
1,958
31,212
6.079673
0.093973
0.040071
0.090726
0.114667
0.833165
0.8188
0.798891
0.765037
0.749412
0.706149
0
0.01501
0.521883
31,212
445
136
70.139326
0.782684
0.030565
0
0.775862
0
0
0.116124
0.007045
0
0
0
0
0.019704
1
0.012315
false
0.002463
0.019704
0
0.03202
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
3ac85decdd3cd14130730bf4677e4d1469ca5d89
10,565
py
Python
vines/fields/transducers.py
AndrewGibbs/vines
4c4f75adc8f601f06e2ab12fbaa95a047ef4354e
[ "MIT" ]
4
2020-07-05T19:01:52.000Z
2022-03-07T18:27:21.000Z
vines/fields/transducers.py
AndrewGibbs/vines
4c4f75adc8f601f06e2ab12fbaa95a047ef4354e
[ "MIT" ]
null
null
null
vines/fields/transducers.py
AndrewGibbs/vines
4c4f75adc8f601f06e2ab12fbaa95a047ef4354e
[ "MIT" ]
5
2020-07-31T13:57:44.000Z
2022-02-02T08:49:03.000Z
def bowl_transducer(k, focal_length, focus, radius, n_elements, aperture_radius, points, axis): ''' Generates a field from a uniform bowl transducer with or without an aperture. This is essentially a segment of a sphere's surface. We compute it in a slightly crude way by spreading many point sources evenly over the surface. This is done according to `How to generate equidistributed points on the surface of a sphere' by Markus Deserno (https://www.cmu.edu/biolphys/deserno/pdf/sphere_equi.pdf). Note that in practice such tranducers with uniformly distributed sources are not used in practice. ''' import numpy as np theta1 = np.arcsin(aperture_radius / focal_length) theta2 = np.arcsin(radius / focal_length) r = 1.0 # radius of the sphere n_count = 0 a = 2 * np.pi * r**2 * (np.cos(theta1) - np.cos(theta2)) / n_elements d = np.sqrt(a) M_theta = np.int(np.round((theta2 - theta1) / d)) d_theta = (theta2 - theta1) / M_theta d_phi = a / d_theta x = [] y = [] z = [] for m in range(0, M_theta): theta = (theta2 - theta1) * (m + 0.5) / M_theta + theta1 M_phi = np.int(np.round(2 * np.pi * np.sin(theta) / d_phi)) for n in range(0, M_phi): phi = 2 * np.pi * n / M_phi x.append(focal_length * np.sin(theta) * np.cos(phi)) y.append(focal_length * np.sin(theta) * np.sin(phi)) z.append(focal_length * np.cos(theta)) n_count += 1 # Re-order so that the transducer is behind the axis, rather than in front if axis in 'z': x = np.array(x) y = np.array(y) z = -np.array(z) elif axis in 'x': x_t = np.array(x) y_t = np.array(y) z_t = -np.array(z) z = -y_t y = -x_t x = z_t # if axis in 'z': # x = np.array(x) # y = np.array(y) # z = focus[2] - np.array(z) # elif axis in 'x': # x_t = np.array(x) # y_t = np.array(y) # z_t = focus[0] - np.array(z) # z = -y_t # y = -x_t # x = z_t # Rotate about the z-axis # FIXME: assumes that the x-axis is the central axis of the transducer rot_angle = 0 rot_mat = np.array([[np.cos(rot_angle), -np.sin(rot_angle), 0], [np.sin(rot_angle), np.cos(rot_angle), 0], [0, 0, 1]]) coord_array = np.zeros((x.shape[0], 3)) coord_array[:, 0] = x[:] coord_array[:, 1] = y[:] coord_array[:, 2] = z[:] new_array = np.zeros_like(coord_array) for ii in range(x.shape[0]): new_array[ii, :] = rot_mat.dot(coord_array[ii, :]) x[:] = new_array[:, 0] y[:] = new_array[:, 1] z[:] = new_array[:, 2] # Shift to make focus at focus[0,1,2] if axis in 'z': z = focus[2] + z elif axis in 'x': x = focus[0] + x # def eval_source_vec(x, y, z, points, k): # # p = np.zeros_like(points[0]) # p = 0.0 # for i in range(x.shape[0]): # dist = np.sqrt((points[0] - x[i])**2 + (points[1] - y[i])**2 + # (points[2] - z[i])**2) # p += np.exp(1j * k * dist) / (4 * np.pi * dist) # return p from numba import njit, prange @njit(parallel=True) def eval_source(x, y, z, points, k): p = np.zeros_like(points[0], dtype=np.complex128) # from IPython import embed; embed() for i in prange(points.shape[1]): temp = 0.0 for j in range(x.shape[0]): dist = np.sqrt((points[0, i] - x[j])**2 + (points[1, i] - y[j])**2 + (points[2, i] - z[j])**2) if dist > 1e-3: temp += np.exp(1j * k * dist) / (4 * np.pi * dist) p[i] = temp return p p = eval_source(x, y, z, points, k) # p = eval_source_vec(x, y, z, points, k) return x, y, z, p*a def normalise_power(power, rho, c0, radius, k1, focal_length, focus, n_elements, aperture_radius): # NOTE: this assumes symmetry in theta to reduced the integral over a disc # to an integral over the radial direction only. Need to generalise for more # complex sources import numpy as np n_quad = 500 r_quad_dim = radius * 1.0 r_quad = np.linspace(0, r_quad_dim, n_quad) # x_location_disk = x_location # x_location_disk = focal_length - 0.9135 * np.sqrt(focal_length**2 - radius**2) x_location_disk = focal_length - 0.99 * np.sqrt(focal_length**2 - radius**2) # x_location_disk = focal_length - 0.9 * np.sqrt(focal_length**2 - radius**2) points_quad = np.vstack((x_location_disk * np.ones(n_quad), np.zeros(n_quad), r_quad)) _, _, _, p_quad = bowl_transducer(np.real(k1), focal_length, focus, radius, n_elements, aperture_radius, points_quad,'x') integral = 2*np.pi*np.sum(np.abs(p_quad)**2 * r_quad)*r_quad_dim/n_quad p0 = np.sqrt(2*rho*c0*power/integral) return p0 def bowl_transducer_rotate(k, focal_length, focus, radius, n_elements, aperture_radius, points, axis, rot_angle): ''' Generates a field from a uniform bowl transducer with or without an aperture. This is essentially a segment of a sphere's surface. We compute it in a slightly crude way by spreading many point sources evenly over the surface. This is done according to `How to generate equidistributed points on the surface of a sphere' by Markus Deserno (https://www.cmu.edu/biolphys/deserno/pdf/sphere_equi.pdf). Note that in practice such tranducers with uniformly distributed sources are not used in practice. ''' import numpy as np theta1 = np.arcsin(aperture_radius / focal_length) theta2 = np.arcsin(radius / focal_length) r = 1.0 # radius of the sphere n_count = 0 a = 2 * np.pi * r**2 * (np.cos(theta1) - np.cos(theta2)) / n_elements d = np.sqrt(a) M_theta = np.int(np.round((theta2 - theta1) / d)) d_theta = (theta2 - theta1) / M_theta d_phi = a / d_theta x = [] y = [] z = [] for m in range(0, M_theta): theta = (theta2 - theta1) * (m + 0.5) / M_theta + theta1 M_phi = np.int(np.round(2 * np.pi * np.sin(theta) / d_phi)) for n in range(0, M_phi): phi = 2 * np.pi * n / M_phi x.append(focal_length * np.sin(theta) * np.cos(phi)) y.append(focal_length * np.sin(theta) * np.sin(phi)) z.append(focal_length * np.cos(theta)) n_count += 1 # Ro-order so that the transducer is behind the axis, rather than in front if axis in 'z': x = np.array(x) y = np.array(y) z = -np.array(z) elif axis in 'x': x_t = np.array(x) y_t = np.array(y) z_t = -np.array(z) z = -y_t y = -x_t x = z_t # if axis in 'z': # x = np.array(x) # y = np.array(y) # z = focus[2] - np.array(z) # elif axis in 'x': # x_t = np.array(x) # y_t = np.array(y) # z_t = focus[0] - np.array(z) # z = -y_t # y = -x_t # x = z_t # Rotate about the z-axis # FIXME: assumes that the x-axis is the central axis of the transducer # rot_angle = np.pi / 2 rot_mat = np.array([[np.cos(rot_angle), -np.sin(rot_angle), 0], [np.sin(rot_angle), np.cos(rot_angle), 0], [0, 0, 1]]) coord_array = np.zeros((x.shape[0], 3)) coord_array[:, 0] = x[:] coord_array[:, 1] = y[:] coord_array[:, 2] = z[:] new_array = np.zeros_like(coord_array) for ii in range(x.shape[0]): new_array[ii, :] = rot_mat.dot(coord_array[ii, :]) x[:] = new_array[:, 0] y[:] = new_array[:, 1] z[:] = new_array[:, 2] # Shift to make focus at focus[0,1,2] if axis in 'z': z = focus[2] + z elif axis in 'x': x = focus[0] + x # def eval_source_vec(x, y, z, points, k): # # p = np.zeros_like(points[0]) # p = 0.0 # for i in range(x.shape[0]): # dist = np.sqrt((points[0] - x[i])**2 + (points[1] - y[i])**2 + # (points[2] - z[i])**2) # p += np.exp(1j * k * dist) / (4 * np.pi * dist) # return p from numba import njit, prange @njit(parallel=True) def eval_source(x, y, z, points, k): p = np.zeros_like(points[0], dtype=np.complex128) # from IPython import embed; embed() for i in prange(points.shape[1]): temp = 0.0 for j in range(x.shape[0]): dist = np.sqrt((points[0, i] - x[j])**2 + (points[1, i] - y[j])**2 + (points[2, i] - z[j])**2) if dist > 1e-3: temp += np.exp(1j * k * dist) / (4 * np.pi * dist) p[i] = temp return p p = eval_source(x, y, z, points, k) # p = eval_source_vec(x, y, z, points, k) return x, y, z, p*a def normalise_power_rotate(power, rho, c0, radius, k1, focal_length, focus, n_elements, aperture_radius, rot_angle): import numpy as np n_quad = 500 r_quad_dim = radius * 1.0 r_quad = np.linspace(0, r_quad_dim, n_quad) # x_location_disk = x_location x_location_disk = focal_length - 0.98 * np.sqrt(focal_length**2 - radius**2) points_quad = np.vstack((x_location_disk * np.ones(n_quad), np.zeros(n_quad), r_quad)) # Rotate points_quad by rot_angle rot_mat = np.array([[np.cos(rot_angle), -np.sin(rot_angle), 0], [np.sin(rot_angle), np.cos(rot_angle), 0], [0, 0, 1]]) # Perform rotation for i in range(n_quad): # Need to shift points so that focus is at origin, then rotate, then # shift back shifted = points_quad[:, i] - np.array([focal_length, 0, 0]) points_quad[:, i] = rot_mat.dot(shifted) + np.array([focal_length, 0, 0]) _, _, _, p_quad = bowl_transducer_rotate(np.real(k1), focal_length, focus, radius, n_elements, aperture_radius, points_quad,'x', rot_angle) integral = 2*np.pi*np.sum(np.abs(p_quad)**2 * r_quad)*r_quad_dim/n_quad p0 = np.sqrt(2*rho*c0*power/integral) return p0
36.05802
86
0.537908
1,658
10,565
3.288299
0.115199
0.037234
0.006603
0.013206
0.92113
0.92113
0.913793
0.913793
0.913793
0.913793
0
0.029391
0.32371
10,565
292
87
36.181507
0.73366
0.299669
0
0.897143
1
0
0.001378
0
0
0
0
0.006849
0
1
0.034286
false
0
0.034286
0
0.102857
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
6e60999cef8762d184c9b1b34217394bfd339725
9,832
py
Python
models/transformer/decoders.py
aimagelab/camel
67cb06210165b7953248ef38c36fc51d7240fb5e
[ "BSD-3-Clause" ]
17
2022-02-23T02:16:25.000Z
2022-03-29T02:03:19.000Z
models/transformer/decoders.py
aimagelab/camel
67cb06210165b7953248ef38c36fc51d7240fb5e
[ "BSD-3-Clause" ]
2
2022-03-15T01:31:06.000Z
2022-03-31T03:02:07.000Z
models/transformer/decoders.py
aimagelab/camel
67cb06210165b7953248ef38c36fc51d7240fb5e
[ "BSD-3-Clause" ]
7
2022-02-23T06:05:42.000Z
2022-03-30T01:45:08.000Z
import torch from torch import nn import numpy as np from models.transformer.attention import MultiHeadAttention from models.transformer.utils import sinusoid_encoding_table, PositionWiseFeedForward from models.containers import Module, ModuleList from models.utils import one_hot_to_index class MeshedDecoderLayer(Module): def __init__(self, N_enc, d_model=512, d_k=64, d_v=64, h=8, d_ff=2048, dropout=.1, self_att_module=None, enc_att_module=None, self_att_module_kwargs=None, enc_att_module_kwargs=None): super(MeshedDecoderLayer, self).__init__() self.N_enc = N_enc self.self_att = MultiHeadAttention(d_model, d_k, d_v, h, dropout, can_be_stateful=True, attention_module=self_att_module, attention_module_kwargs=self_att_module_kwargs) self.enc_att = MultiHeadAttention(d_model, d_k, d_v, h, dropout, can_be_stateful=False, attention_module=enc_att_module, attention_module_kwargs=enc_att_module_kwargs) self.pwff = PositionWiseFeedForward(d_model, d_ff, dropout) self.fc_alpha = ModuleList([nn.Linear(d_model + d_model, d_model) for _ in range(N_enc)]) self.init_weights() def init_weights(self): for fc_alpha in self.fc_alpha: nn.init.xavier_uniform_(fc_alpha.weight) nn.init.constant_(fc_alpha.bias, 0) def forward(self, input, enc_output, mask_pad, mask_self_att, mask_enc_att): self_att = self.self_att(input, input, input, mask_self_att) self_att = self_att * mask_pad enc_att = None for i in range(self.N_enc): enc_att_i = self.enc_att(self_att, enc_output[:, i], enc_output[:, i], mask_enc_att) * mask_pad alpha_i = torch.sigmoid(self.fc_alpha[i](torch.cat([self_att, enc_att_i], -1))) if enc_att is None: enc_att = enc_att_i * alpha_i else: enc_att += enc_att_i * alpha_i enc_att /= np.sqrt(self.N_enc) enc_att *= mask_pad ff = self.pwff(enc_att) ff = ff * mask_pad return ff class DecoderLayer(Module): def __init__(self, d_model=512, d_k=64, d_v=64, h=8, d_ff=2048, dropout=.1, self_att_module=None, enc_att_module=None, self_att_module_kwargs=None, enc_att_module_kwargs=None): super(DecoderLayer, self).__init__() self.self_att = MultiHeadAttention(d_model, d_k, d_v, h, dropout, can_be_stateful=True, attention_module=self_att_module, attention_module_kwargs=self_att_module_kwargs) self.enc_att = MultiHeadAttention(d_model, d_k, d_v, h, dropout, can_be_stateful=False, attention_module=enc_att_module, attention_module_kwargs=enc_att_module_kwargs) self.pwff = PositionWiseFeedForward(d_model, d_ff, dropout) def forward(self, input, enc_output, mask_pad, mask_self_att, mask_enc_att): self_att = self.self_att(input, input, input, mask_self_att) enc_att = self.enc_att(self_att, enc_output, enc_output, mask_enc_att) ff = self.pwff(enc_att) ff = ff * mask_pad return ff class MeshedDecoder(Module): def __init__(self, vocab_size, max_len, N_dec, N_enc, padding_idx=0, d_model=512, d_k=64, d_v=64, h=8, d_ff=2048, dropout=.1, self_att_module=None, enc_att_module=None, self_att_module_kwargs=None, enc_att_module_kwargs=None): super(MeshedDecoder, self).__init__() self.d_model = d_model self.vocab_size = vocab_size self.word_emb = nn.Embedding(vocab_size, d_model, padding_idx=padding_idx) self.pos_emb = nn.Embedding.from_pretrained(sinusoid_encoding_table(max_len + 1, d_model, 0), freeze=True) self.layers = ModuleList( [MeshedDecoderLayer(N_enc, d_model, d_k, d_v, h, d_ff, dropout, self_att_module=self_att_module, enc_att_module=enc_att_module, self_att_module_kwargs=self_att_module_kwargs, enc_att_module_kwargs=enc_att_module_kwargs) for _ in range(N_dec)]) self.fc = nn.Linear(d_model, vocab_size, bias=False) self.max_len = max_len self.padding_idx = padding_idx self.N = N_dec self.register_state('running_mask_self_attention', None) self.register_state('running_seq', torch.zeros((1,)).long()) def forward(self, input, encoder_output_list, mask_encoder): # input (b_s, seq_len) input = input[:, :self.max_len] b_s, seq_len = input.shape[:2] if input.dtype in [torch.long, torch.int]: input_index = input else: input_index = one_hot_to_index(input) mask_queries = (input_index != self.padding_idx).unsqueeze(-1).type(input.dtype) # (b_s, seq_len, 1) mask_self_attention = torch.triu(torch.ones((seq_len, seq_len), dtype=torch.bool, device=input.device), diagonal=1) mask_self_attention = mask_self_attention.unsqueeze(0).unsqueeze(0) # (1, 1, seq_len, seq_len) mask_self_attention = mask_self_attention + (input_index == self.padding_idx).unsqueeze(1).unsqueeze(1).bool() mask_self_attention = mask_self_attention.gt(0) # (b_s, 1, seq_len, seq_len) if self._is_stateful: if self.running_mask_self_attention is None: self.running_mask_self_attention = mask_self_attention else: self.running_mask_self_attention = torch.cat([self.running_mask_self_attention, mask_self_attention], -1) mask_self_attention = self.running_mask_self_attention seq = torch.arange(1, seq_len + 1).view(1, -1).expand(b_s, -1).to(input.device) # (b_s, seq_len) seq = seq.masked_fill(mask_queries.squeeze(-1) == 0, 0) if self._is_stateful: self.running_seq.add_(1) seq = self.running_seq if input.dtype in [torch.long, torch.int]: out = self.word_emb(input) else: out = input @ self.word_emb.weight out = out + self.pos_emb(seq) for i, l in enumerate(self.layers): out = l(out, encoder_output_list, mask_queries, mask_self_attention, mask_encoder) out = self.fc(out) return out class Decoder(Module): def __init__(self, vocab_size, max_len, N_dec, padding_idx=0, d_model=512, d_k=64, d_v=64, h=8, d_ff=2048, dropout=.1, self_att_module=None, enc_att_module=None, self_att_module_kwargs=None, enc_att_module_kwargs=None): super(Decoder, self).__init__() self.d_model = d_model self.vocab_size = vocab_size self.word_emb = nn.Embedding(vocab_size, d_model, padding_idx=padding_idx) self.pos_emb = nn.Embedding.from_pretrained(sinusoid_encoding_table(max_len + 1, d_model, 0), freeze=True) self.layers = ModuleList( [DecoderLayer(d_model, d_k, d_v, h, d_ff, dropout, self_att_module=self_att_module, enc_att_module=enc_att_module, self_att_module_kwargs=self_att_module_kwargs, enc_att_module_kwargs=enc_att_module_kwargs) for _ in range(N_dec)]) self.fc = nn.Linear(d_model, vocab_size, bias=False) self.max_len = max_len self.padding_idx = padding_idx self.N = N_dec self.register_state('running_mask_self_attention', None) self.register_state('running_seq', torch.zeros((1,)).long()) def forward(self, input, encoder_output, mask_encoder): # input (b_s, seq_len) input = input[:, :self.max_len] b_s, seq_len = input.shape[:2] if input.dtype in [torch.long, torch.int]: input_index = input else: input_index = one_hot_to_index(input) mask_queries = (input_index != self.padding_idx).unsqueeze(-1).type(input.dtype) # (b_s, seq_len, 1) mask_self_attention = torch.triu(torch.ones((seq_len, seq_len), dtype=torch.bool, device=input.device), diagonal=1) mask_self_attention = mask_self_attention.unsqueeze(0).unsqueeze(0) # (1, 1, seq_len, seq_len) mask_self_attention = mask_self_attention + (input_index == self.padding_idx).unsqueeze(1).unsqueeze(1).bool() mask_self_attention = mask_self_attention.gt(0) # (b_s, 1, seq_len, seq_len) if self._is_stateful: if self.running_mask_self_attention is None: self.running_mask_self_attention = mask_self_attention else: self.running_mask_self_attention = torch.cat([self.running_mask_self_attention, mask_self_attention], -1) mask_self_attention = self.running_mask_self_attention seq = torch.arange(1, seq_len + 1).view(1, -1).expand(b_s, -1).to(input.device) # (b_s, seq_len) seq = seq.masked_fill(mask_queries.squeeze(-1) == 0, 0) if self._is_stateful: self.running_seq.add_(1) seq = self.running_seq if input.dtype in [torch.long, torch.int]: out = self.word_emb(input) else: out = input @ self.word_emb.weight out = out + self.pos_emb(seq) for i, l in enumerate(self.layers): out = l(out, encoder_output, mask_queries, mask_self_attention, mask_encoder) out = self.fc(out) return out
49.16
118
0.632221
1,379
9,832
4.13198
0.092821
0.043173
0.101439
0.050544
0.853984
0.84907
0.84907
0.833275
0.833275
0.833275
0
0.014798
0.271461
9,832
199
119
49.407035
0.780678
0.021461
0
0.713415
0
0
0.007908
0.005619
0
0
0
0
0
1
0.054878
false
0
0.042683
0
0.146341
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
42ea2ed472344290b6b24346f952066ce05caf6e
17,853
py
Python
scripts/processors/Phonetisers.py
DungLuongTuan/Ossian
ce5d3f8e1a3e11100bfa821a7eda8f9899992ae6
[ "Apache-2.0" ]
null
null
null
scripts/processors/Phonetisers.py
DungLuongTuan/Ossian
ce5d3f8e1a3e11100bfa821a7eda8f9899992ae6
[ "Apache-2.0" ]
null
null
null
scripts/processors/Phonetisers.py
DungLuongTuan/Ossian
ce5d3f8e1a3e11100bfa821a7eda8f9899992ae6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ## Project: Ossian - May 2017 ## Contact: Oliver Watts - owatts@staffmail.ed.ac.uk from processors.UtteranceProcessor import SUtteranceProcessor, Element from naive import naive_util import default.const as c # import os # import sys # import re # import regex # import unicodedata # import shutil # import glob # import fileinput # import subprocess # import codecs # import default.const as c # from processors.NodeEnricher import NodeEnricher # from processors.UtteranceProcessor import UtteranceProcessor # from util.LookupTable import LookupTable # from naive.naive_util import readlist, writelist class NaivePhonetiser(SUtteranceProcessor): ''' Add 'phonetic' segments consisting of standard orthography characters, converted into an ASCII-safe 'safetext' form ''' def __init__(self, processor_name='naive_phonetiser', target_nodes="//token", \ target_attribute='text', child_node_type='segment', output_attribute='pronunciation', \ class_attribute='token_class', word_classes=['word'], probable_pause_classes=['punctuation', c.TERMINAL], \ possible_pause_classes=['space']): self.processor_name = processor_name self.target_nodes = target_nodes self.target_attribute = target_attribute self.child_node_type = child_node_type self.output_attribute = output_attribute self.class_attribute = class_attribute self.word_classes = word_classes self.probable_pause_classes = probable_pause_classes self.possible_pause_classes = possible_pause_classes super(NaivePhonetiser, self).__init__() def process_utterance(self, utt): for node in utt.xpath(self.target_nodes): assert node.has_attribute(self.class_attribute) assert node.has_attribute(self.target_attribute) current_class = node.attrib[self.class_attribute] if current_class in self.word_classes: word = node.attrib[self.target_attribute] children = self.get_phonetic_segments(word) elif current_class in self.probable_pause_classes: children = [c.PROB_PAUSE] elif current_class in self.possible_pause_classes: children = [c.POSS_PAUSE] else: sys.exit('Class "%s" not in any of word_classes, probable_pause_classes, possible_pause_classes') for chunk in children: child = Element(self.child_node_type) child.set(self.output_attribute, chunk) node.add_child(child) def get_phonetic_segments(self, word): safetext_letters = [] for letter in list(word.lower()): safetext_letters.append(naive_util.safetext(letter)) return safetext_letters def do_training(self, speech_corpus, text_corpus): print "NaivePhonetiser requires no training" class DungltPhonetiser(SUtteranceProcessor): ''' Add 'phonetic' segments consisting of standard orthography characters, converted into an ASCII-safe 'safetext' form ''' def __init__(self, processor_name='naive_phonetiser', target_nodes="//token", \ target_attribute='text', child_node_type='segment', output_attribute='pronunciation', \ class_attribute='token_class', word_classes=['word'], probable_pause_classes=['punctuation', c.TERMINAL], \ possible_pause_classes=['space']): self.processor_name = processor_name self.target_nodes = target_nodes self.target_attribute = target_attribute self.child_node_type = child_node_type self.output_attribute = output_attribute self.class_attribute = class_attribute self.word_classes = word_classes self.probable_pause_classes = probable_pause_classes self.possible_pause_classes = possible_pause_classes self.vi_consonants = ['b', 'd', 'h', 'l', 'm', 'n', 'p', 'r', 's', 't', 'v', 'x', '_LATINSMALLLETTERDWITHSTROKE_', 'f', 'q', 'c', 'k', 'z', 'w', 'j', 'tr', 'th', 'ch', 'ph', 'nh', 'kh', 'gi', 'qu', 'sh', 'gh', 'ng', 'ngh'] self.vi_cons_phone = ['b', 'd', 'h', 'l', 'm', 'n', 'p', 'r', 'sh', 't', 'v', 's', '_LATINSMALLLETTERDWITHSTROKE_', 'f', 'k', 'k', 'k', 'z', 'w', 'z', 'tr', 'th', 'ch', 'f', 'nh', 'kh', 'z', 'kw', 'sh', 'g', 'ng', 'ng'] super(DungltPhonetiser, self).__init__() def process_utterance(self, utt): for node in utt.xpath(self.target_nodes): assert node.has_attribute(self.class_attribute) assert node.has_attribute(self.target_attribute) current_class = node.attrib[self.class_attribute] if current_class in self.word_classes: word = node.attrib[self.target_attribute] children = self.get_phonetic_segments(word) elif current_class in self.probable_pause_classes: children = [c.PROB_PAUSE] elif current_class in self.possible_pause_classes: children = [c.POSS_PAUSE] else: sys.exit('Class "%s" not in any of word_classes, probable_pause_classes, possible_pause_classes') for chunk in children: child = Element(self.child_node_type) child.set(self.output_attribute, chunk) node.add_child(child) def get_phonetic_segments(self, word): # consonants = ['q', 'w', 'r', 't', 'p', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm'] # list_words = list(word.lower()) # safetext_letters = [naive_util.safetext(list_words[0])] # for letter in list_words[1:]: # if (letter in consonants) and (safetext_letters[-1] in consonants): # safetext_letters[-1] += letter # continue # if (letter == 'u') and (safetext_letters[-1] == 'q'): # safetext_letters[-1] += 'u' # continue # if (naive_util.safetext(letter) in ['i', '_LATINSMALLLETTERIWITHGRAVE_', '_LATINSMALLLETTERIWITHACUTE_', '_LATINSMALLLETTERIWITHHOOKABOVE_', '_LATINSMALLLETTERIWITHTILDE_', '_LATINSMALLLETTERIWITHDOTBELOW_']) and (safetext_letters[-1] == 'g'): # safetext_letters[-1] += 'i' # safetext_letters.append(naive_util.safetext(letter)) # letters = list(word.lower()) # safetext_letters = [letters[0]] # for letter in letters[1:]: # if (safetext_letters[-1] + letter in self.vi_consonants): # safetext_letters[-1] += letter # continue # if (safetext_letters[-1] == 'g') and (naive_util.safetext(letter) in ['i', '_LATINSMALLLETTERIWITHGRAVE_', '_LATINSMALLLETTERIWITHACUTE_', '_LATINSMALLLETTERIWITHHOOKABOVE_', '_LATINSMALLLETTERIWITHTILDE_', '_LATINSMALLLETTERIWITHDOTBELOW_']): # safetext_letters[-1] += 'i' # safetext_letters.append(letter) # for i in range(len(safetext_letters)): # if (safetext_letters[i] in self.vi_consonants): # safetext_letters[i] = self.vi_cons_phone[self.vi_consonants.index(safetext_letters[i])] # for i in range(len(safetext_letters)): # safetext_letters[i] = naive_util.safetext(safetext_letters[i]) letters = [naive_util.safetext(l) for l in list(word.lower())] safetext_letters = [letters[0]] for letter in letters[1:]: if (safetext_letters[-1] + letter in self.vi_consonants): safetext_letters[-1] += letter continue if (safetext_letters[-1] == 'g') and (letter in ['i', '_LATINSMALLLETTERIWITHGRAVE_', '_LATINSMALLLETTERIWITHACUTE_', '_LATINSMALLLETTERIWITHHOOKABOVE_', '_LATINSMALLLETTERIWITHTILDE_', '_LATINSMALLLETTERIWITHDOTBELOW_']): safetext_letters[-1] += 'i' safetext_letters.append(letter) for i in range(len(safetext_letters)): if (safetext_letters[i] in self.vi_consonants): safetext_letters[i] = self.vi_cons_phone[self.vi_consonants.index(safetext_letters[i])] return safetext_letters def do_training(self, speech_corpus, text_corpus): print "DungltPhonetiser requires no training" class StartEndPhonetiser(SUtteranceProcessor): ''' Add 'phonetic' segments consisting of standard orthography characters, converted into an ASCII-safe 'safetext' form ''' def __init__(self, processor_name='naive_phonetiser', target_nodes="//token", \ target_attribute='text', child_node_type='segment', output_attribute='pronunciation', \ class_attribute='token_class', word_classes=['word'], probable_pause_classes=['punctuation', c.TERMINAL], \ possible_pause_classes=['space']): self.processor_name = processor_name self.target_nodes = target_nodes self.target_attribute = target_attribute self.child_node_type = child_node_type self.output_attribute = output_attribute self.class_attribute = class_attribute self.word_classes = word_classes self.probable_pause_classes = probable_pause_classes self.possible_pause_classes = possible_pause_classes self.vi_consonants = ['b', 'd', 'h', 'l', 'm', 'n', 'p', 'r', 's', 't', 'v', 'x', 'đ', 'f', 'q', 'c', 'k', 'z', 'w', 'tr', 'th', 'ch', 'ph', 'nh', 'kh', 'gi', 'qu', 'sh', 'gh', 'ng', 'ngh'] self.vi_cons_phone = ['b', 'd', 'h', 'l', 'm', 'n', 'p', 'r', 'sh', 't', 'v', 's', 'đ', 'f', 'k', 'k', 'k', 'z', 'w', 'tr', 'th', 'ch', 'f', 'nh', 'kh', 'z', 'kw', 'sh', 'g', 'ng', 'ng'] self.name_reps = {" ": "", "-": "", "0": "ZERO", "1": "ONE", "2": "TWO", "3": "THREE", "4": "FOUR", "5": "FIVE", "6": "SIX", "7": "SEVEN", "8": "EIGHT", "9": "NINE"} super(StartEndPhonetiser, self).__init__() def process_utterance(self, utt): for node in utt.xpath(self.target_nodes): assert node.has_attribute(self.class_attribute) assert node.has_attribute(self.target_attribute) current_class = node.attrib[self.class_attribute] if current_class in self.word_classes: word = node.attrib[self.target_attribute] children = self.get_phonetic_segments(word) elif current_class in self.probable_pause_classes: children = [c.PROB_PAUSE] elif current_class in self.possible_pause_classes: children = [c.POSS_PAUSE] else: sys.exit('Class "%s" not in any of word_classes, probable_pause_classes, possible_pause_classes') for chunk in children: child = Element(self.child_node_type) child.set(self.output_attribute, chunk) node.add_child(child) def get_safetext(self, char): # try: # safetext_char = unicodedata.name(char) # except: # safetext_char = "PROBLEMCHARACTER" # return safetext_char return unicodedata.name(unicode(char)) def get_phonetic_segments(self, word): word = word.lower() safetext_word = [] unsafetext_word = [] chars = '@' for i, char in enumerate(word + "@"): if (chars + char in self.vi_consonants): chars += char else: if (chars == 'g') and (naive_util.safetext(char) in ['i', '_LATINSMALLLETTERIWITHGRAVE_', '_LATINSMALLLETTERIWITHACUTE_', '_LATINSMALLLETTERIWITHHOOKABOVE_', '_LATINSMALLLETTERIWITHTILDE_', '_LATINSMALLLETTERIWITHDOTBELOW_']): chars += 'i' safetext_char = '' if (chars in self.vi_consonants): for c in self.vi_cons_phone[self.vi_consonants.index(chars)]: safetext_char += self.get_safetext(c) elif chars in self.name_reps.keys(): safetext_char += self.name_reps[chars] else: safetext_char += self.get_safetext(chars) safetext_word.append(safetext_char) unsafetext_word.append(chars) chars = char if (unsafetext_word[-1] in self.vi_consonants): safetext_word[-1] = "END" + safetext_word[-1] for i in range(len(safetext_word)): safetext_word[i] = "_" + safetext_word[i].replace(" ", "") + "_" return safetext_word[1:] def do_training(self, speech_corpus, text_corpus): print "StartEndPhonetiser requires no training" class ConcateVowelPhonetiser(SUtteranceProcessor): ''' Add 'phonetic' segments consisting of standard orthography characters, converted into an ASCII-safe 'safetext' form ''' def __init__(self, processor_name='naive_phonetiser', target_nodes="//token", \ target_attribute='text', child_node_type='segment', output_attribute='pronunciation', \ class_attribute='token_class', word_classes=['word'], probable_pause_classes=['punctuation', c.TERMINAL], \ possible_pause_classes=['space']): self.processor_name = processor_name self.target_nodes = target_nodes self.target_attribute = target_attribute self.child_node_type = child_node_type self.output_attribute = output_attribute self.class_attribute = class_attribute self.word_classes = word_classes self.probable_pause_classes = probable_pause_classes self.possible_pause_classes = possible_pause_classes self.vi_consonants = ['b', 'd', 'h', 'l', 'm', 'n', 'p', 'r', 's', 't', 'v', 'x', 'đ', 'f', 'q', 'c', 'k', 'z', 'w', 'tr', 'th', 'ch', 'ph', 'nh', 'kh', 'gi', 'qu', 'sh', 'gh', 'ng', 'ngh'] self.vi_cons_phone = ['b', 'd', 'h', 'l', 'm', 'n', 'p', 'r', 'sh', 't', 'v', 's', 'đ', 'f', 'k', 'k', 'k', 'z', 'w', 'tr', 'th', 'ch', 'f', 'nh', 'kh', 'z', 'kw', 'sh', 'g', 'ng', 'ng'] self.name_reps = {" ": "", "-": "", "0": "ZERO", "1": "ONE", "2": "TWO", "3": "THREE", "4": "FOUR", "5": "FIVE", "6": "SIX", "7": "SEVEN", "8": "EIGHT", "9": "NINE"} super(ConcateVowelPhonetiser, self).__init__() def process_utterance(self, utt): for node in utt.xpath(self.target_nodes): assert node.has_attribute(self.class_attribute) assert node.has_attribute(self.target_attribute) current_class = node.attrib[self.class_attribute] if current_class in self.word_classes: word = node.attrib[self.target_attribute] children = self.get_phonetic_segments(word) elif current_class in self.probable_pause_classes: children = [c.PROB_PAUSE] elif current_class in self.possible_pause_classes: children = [c.POSS_PAUSE] else: sys.exit('Class "%s" not in any of word_classes, probable_pause_classes, possible_pause_classes') for chunk in children: child = Element(self.child_node_type) child.set(self.output_attribute, chunk) node.add_child(child) def get_safetext(self, char): # try: # safetext_char = unicodedata.name(char) # except: # safetext_char = "PROBLEMCHARACTER" # return safetext_char return unicodedata.name(unicode(char)) def get_phonetic_segments(self, word): word = word.lower() safetext_word = [] unsafetext_word = [] chars = '@' for i, char in enumerate(word + "@"): if (chars + char in self.vi_consonants): chars += char else: if (chars == 'g') and (naive_util.safetext(char) in ['i', '_LATINSMALLLETTERIWITHGRAVE_', '_LATINSMALLLETTERIWITHACUTE_', '_LATINSMALLLETTERIWITHHOOKABOVE_', '_LATINSMALLLETTERIWITHTILDE_', '_LATINSMALLLETTERIWITHDOTBELOW_']): chars += 'i' safetext_char = '' if (chars in self.vi_consonants): for c in self.vi_cons_phone[self.vi_consonants.index(chars)]: safetext_char += self.get_safetext(c) elif chars in self.name_reps.keys(): safetext_char += self.name_reps[chars] else: safetext_char += self.get_safetext(chars) safetext_word.append(safetext_char) unsafetext_word.append(chars) chars = char if (unsafetext_word[-1] in self.vi_consonants): safetext_word[-1] = "END" + safetext_word[-1] safetext_letters = [safetext_word[1]] for i in range(2, len(safetext_word)): if (unsafetext_word[i] not in self.vi_consonants) and (unsafetext_word[i-1] not in self.vi_consonants) and (naive_util.safetext(unsafetext_word[i-1]) != '_LATINSMALLLETTERDWITHSTROKE_'): safetext_letters[-1] += safetext_word[i] else: safetext_letters.append(safetext_word[i]) for i in range(len(safetext_letters)): safetext_letters[i] = "_" + safetext_letters[i].replace(" ", "") + "_" return safetext_letters def do_training(self, speech_corpus, text_corpus): print "ConcateVowelPhonetiser requires no training"
47.481383
257
0.600067
1,969
17,853
5.173184
0.105637
0.06185
0.03927
0.021206
0.86236
0.855488
0.846849
0.828981
0.828981
0.824661
0
0.004389
0.272615
17,853
375
258
47.608
0.779994
0.131631
0
0.84375
0
0
0.115207
0.048924
0
0
0
0
0.03125
0
null
null
0
0.011719
null
null
0.015625
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
8
6e3fe83a2025b71f49517d27fecb0abeee284126
17,159
py
Python
main.py
gabecooney/Exercise-01c-Export-from-Twine
4bbb345f55cc5f27739a265e9022e572c034d01b
[ "MIT" ]
null
null
null
main.py
gabecooney/Exercise-01c-Export-from-Twine
4bbb345f55cc5f27739a265e9022e572c034d01b
[ "MIT" ]
null
null
null
main.py
gabecooney/Exercise-01c-Export-from-Twine
4bbb345f55cc5f27739a265e9022e572c034d01b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys assert sys.version_info >= (3,9), "This script requires at least Python 3.9" world = { "uuid": "7D0922D1-D8E8-461D-A92C-7BD8B48D3F5D", "name": "Zork", "creator": "Twine", "creatorVersion": "2.3.14", "schemaName": "Harlowe 3 to JSON", "schemaVersion": "0.0.6", "createdAtMs": 1630598168477, "passages": [ { "name": "West of House", "tags": "", "id": "1", "text": "This is an open field west of a white house, with a boarded front door.\n\n[[NORTH->North of House]]\n[[SOUTH->South of House]]\n[[WEST->Forest]].", "links": [ { "linkText": "NORTH", "passageName": "North of House", "original": "[[NORTH->North of House]]" }, { "linkText": "SOUTH", "passageName": "South of House", "original": "[[SOUTH->South of House]]" }, { "linkText": "WEST", "passageName": "Forest", "original": "[[WEST->Forest]]" } ], "hooks": [], "cleanText": "This is an open field west of a white house, with a boarded front door.\n\n\n\n." }, { "name": "North of House", "tags": "", "id": "2", "text": "You are facing the north side of a white house. There is no door here, and all the windows are barred.\n[[WEST->West of House]]\n[[EAST->East of House]]\n[[NORTH->Forest]]", "links": [ { "linkText": "WEST", "passageName": "West of House", "original": "[[WEST->West of House]]" }, { "linkText": "EAST", "passageName": "East of House", "original": "[[EAST->East of House]]" }, { "linkText": "NORTH", "passageName": "Forest", "original": "[[NORTH->Forest]]" } ], "hooks": [], "cleanText": "You are facing the north side of a white house. There is no door here, and all the windows are barred." }, { "name": "South of House", "tags": "", "id": "3", "text": "You are facing the south side of a white house. There is no door here, and all the windows are barred.\n[[WEST->West of House]]\n[[EAST->East of House]]\n[[SOUTH->Forest]]", "links": [ { "linkText": "WEST", "passageName": "West of House", "original": "[[WEST->West of House]]" }, { "linkText": "EAST", "passageName": "East of House", "original": "[[EAST->East of House]]" }, { "linkText": "SOUTH", "passageName": "Forest", "original": "[[SOUTH->Forest]]" } ], "hooks": [], "cleanText": "You are facing the south side of a white house. There is no door here, and all the windows are barred." }, { "name": "Forest", "tags": "", "id": "4", "text": "This is a forest, with trees in all directions around you.\n[[NORTH->Sunlit Forest]]\n[[EAST->Forest]]\n[[SOUTH->Forest]]\n[[WEST->Forest]]", "links": [ { "linkText": "NORTH", "passageName": "Sunlit Forest", "original": "[[NORTH->Sunlit Forest]]" }, { "linkText": "EAST", "passageName": "Forest", "original": "[[EAST->Forest]]" }, { "linkText": "SOUTH", "passageName": "Forest", "original": "[[SOUTH->Forest]]" }, { "linkText": "WEST", "passageName": "Forest", "original": "[[WEST->Forest]]" } ], "hooks": [], "cleanText": "This is a forest, with trees in all directions around you." }, { "name": "East of House", "tags": "", "id": "5", "text": "You are behind the white house. A path leads into the forest to the east. In one corner of the house there is a small window which is slightly ajar.\n[[NORTH->North of House]]\n[[SOUTH->South of House]]\n[[EAST->Sunlit Forest]]\n[[WEST->Kitchen]]\n[[ENTER->Kitchen]]", "links": [ { "linkText": "NORTH", "passageName": "North of House", "original": "[[NORTH->North of House]]" }, { "linkText": "SOUTH", "passageName": "South of House", "original": "[[SOUTH->South of House]]" }, { "linkText": "EAST", "passageName": "Sunlit Forest", "original": "[[EAST->Sunlit Forest]]" }, { "linkText": "WEST", "passageName": "Kitchen", "original": "[[WEST->Kitchen]]" }, { "linkText": "ENTER", "passageName": "Kitchen", "original": "[[ENTER->Kitchen]]" } ], "hooks": [], "cleanText": "You are behind the white house. A path leads into the forest to the east. In one corner of the house there is a small window which is slightly ajar." }, { "name": "Sunlit Forest", "tags": "", "id": "6", "text": "his is a dimly lit forest, with large trees all around. One particularly large tree with some low branches stands here.\n[[NORTH->Forest]]\n[[SOUTH->Forest]]\n[[EAST->Forest]]\n[[WEST->East of House]]\n[[UP->Tree]]", "links": [ { "linkText": "NORTH", "passageName": "Forest", "original": "[[NORTH->Forest]]" }, { "linkText": "SOUTH", "passageName": "Forest", "original": "[[SOUTH->Forest]]" }, { "linkText": "EAST", "passageName": "Forest", "original": "[[EAST->Forest]]" }, { "linkText": "WEST", "passageName": "East of House", "original": "[[WEST->East of House]]" }, { "linkText": "UP", "passageName": "Tree", "original": "[[UP->Tree]]" } ], "hooks": [], "cleanText": "his is a dimly lit forest, with large trees all around. One particularly large tree with some low branches stands here." }, { "name": "Kitchen", "tags": "", "id": "7", "text": "You are in the kitchen of the white house. A table seems to have been used recently for the preparation of food. A passage leads to the west and a dark staircase can be seen leading upward. A dark chimney leads down and to the east is a small window which is open.\n[[EAST->East of House]]\n[[Upward->Upstairs]]\n[[Down -> Dark Chimney]]", "links": [ { "linkText": "EAST", "passageName": "East of House", "original": "[[EAST->East of House]]" }, { "linkText": "Upward", "passageName": "Upstairs", "original": "[[Upward->Upstairs]]" }, { "linkText": "Down", "passageName": "Dark Chimney", "original": "[[Down -> Dark Chimney]]" } ], "hooks": [], "cleanText": "You are in the kitchen of the white house. A table seems to have been used recently for the preparation of food. A passage leads to the west and a dark staircase can be seen leading upward. A dark chimney leads down and to the east is a small window which is open." }, { "name": "Tree", "tags": "", "id": "8", "text": "You are about 10 feet above the ground nestled among some large branches. The nearest branch above you is above your reach. Beside you on the branch is a small bird's nest.\n[[DOWN->Sunlit Forest]]", "links": [ { "linkText": "DOWN", "passageName": "Sunlit Forest", "original": "[[DOWN->Sunlit Forest]]" } ], "hooks": [], "cleanText": "You are about 10 feet above the ground nestled among some large branches. The nearest branch above you is above your reach. Beside you on the branch is a small bird's nest." }, { "name": "Upstairs", "tags": "", "id": "9", "text": "Following the staircase, you begin to climb, each step creaking loudly, breaking the unnatural silence of the house. At the top of the Stairs, a dark hallway greets you with silence. In front of you lie 3 doors. One on your left, one on the right, and one at the end of the hall. All of the doors are locked\n[[Back->Kitchen]]", "links": [ { "linkText": "Back", "passageName": "Kitchen", "original": "[[Back->Kitchen]]" } ], "hooks": [], "cleanText": "Following the staircase, you begin to climb, each step creaking loudly, breaking the unnatural silence of the house. At the top of the Stairs, a dark hallway greets you with silence. In front of you lie 3 doors. One on your left, one on the right, and one at the end of the hall. All of the doors are locked" }, { "name": " Dark Chimney", "tags": "", "id": "10", "text": "As you walk down from the kitchen, you find yourself in the living room of the house. The old furniture is nearly rotting at this point, and the scent of mold overwhelms your senses. You are drawn to the fireplace, where you notice that the brick inside is stained dark with ash. As you investigate you notice a small hatch at the back of the chimney.\n[[Open-> Hatch]]\n[[Back ->Kitchen]]", "links": [ { "linkText": "Open", "passageName": "Hatch", "original": "[[Open-> Hatch]]" }, { "linkText": "Back", "passageName": "Kitchen", "original": "[[Back ->Kitchen]]" } ], "hooks": [], "cleanText": "As you walk down from the kitchen, you find yourself in the living room of the house. The old furniture is nearly rotting at this point, and the scent of mold overwhelms your senses. You are drawn to the fireplace, where you notice that the brick inside is stained dark with ash. As you investigate you notice a small hatch at the back of the chimney." }, { "name": " Hatch", "tags": "", "id": "11", "text": "After opening the hatch, you notice a ladder leading into the depths of the house. The bottom is too dark to see, and the stench of decay begins to waft upwards into the living room.\n[[Back->Kitchen]] \n[[Down->Hidden Cellar]]", "links": [ { "linkText": "Back", "passageName": "Kitchen", "original": "[[Back->Kitchen]]" }, { "linkText": "Down", "passageName": "Hidden Cellar", "original": "[[Down->Hidden Cellar]]" } ], "hooks": [], "cleanText": "After opening the hatch, you notice a ladder leading into the depths of the house. The bottom is too dark to see, and the stench of decay begins to waft upwards into the living room." }, { "name": "Hidden Cellar", "tags": "", "id": "12", "text": "The ladder is old and rickety, each step feels like it could be your last. As you reach the bottom, you come across an iron door, with a sliver of cold light creeping around its sillouette.\n[[Enter->Shelter]]\n[[Back->Too Late]]", "links": [ { "linkText": "Enter", "passageName": "Shelter", "original": "[[Enter->Shelter]]" }, { "linkText": "Back", "passageName": "Too Late", "original": "[[Back->Too Late]]" } ], "hooks": [], "cleanText": "The ladder is old and rickety, each step feels like it could be your last. As you reach the bottom, you come across an iron door, with a sliver of cold light creeping around its sillouette." }, { "name": "Shelter", "tags": "", "id": "13", "text": "As you Open the door, you find what you've been looking for. Your targets are in front of you, the family you've been sent to eliminate. The man you presume is the father, was wounded by you last week, and his wound has begun to fester. As you enter the room, you know what you must do.\n[[Finish The Job -> Ending 1]]\n[[Resist -> Ending 2]]", "links": [ { "linkText": "Finish The Job", "passageName": "Ending 1", "original": "[[Finish The Job -> Ending 1]]" }, { "linkText": "Resist", "passageName": "Ending 2", "original": "[[Resist -> Ending 2]]" } ], "hooks": [], "cleanText": "As you Open the door, you find what you've been looking for. Your targets are in front of you, the family you've been sent to eliminate. The man you presume is the father, was wounded by you last week, and his wound has begun to fester. As you enter the room, you know what you must do." }, { "name": "Too Late", "tags": "", "id": "14", "text": "As you attempt to turn back, something within you compels you to open the door. A savage instinct within you urges you to move forward. \"Finish your task\" a voice in your head orders you.\n[[Open->Shelter]] \n[[Resist->Finish it]]", "links": [ { "linkText": "Open", "passageName": "Shelter", "original": "[[Open->Shelter]]" }, { "linkText": "Resist", "passageName": "Finish it", "original": "[[Resist->Finish it]]" } ], "hooks": [], "cleanText": "As you attempt to turn back, something within you compels you to open the door. A savage instinct within you urges you to move forward. \"Finish your task\" a voice in your head orders you." }, { "name": "Finish it", "tags": "", "id": "15", "text": "As you resist the voice in your head yells, \"YOU MUST OBEY THE ORDER\"\n[[Resist->Ending 3]]\n[[Obey->Shelter]]", "links": [ { "linkText": "Resist", "passageName": "Ending 3", "original": "[[Resist->Ending 3]]" }, { "linkText": "Obey", "passageName": "Shelter", "original": "[[Obey->Shelter]]" } ], "hooks": [], "cleanText": "As you resist the voice in your head yells, \"YOU MUST OBEY THE ORDER\"" }, { "name": " Ending 1", "tags": "", "id": "16", "text": "You raise your rifle and open fire. Blood splatters across the wall, as gunshots reverberate in the small room. Your ears ring with pain, and your cold heart feels no remorse. You cannot allow feelings of guilt to seep into your duty. As the family lies dead, you contact your superiors to let them know. A clean up crew is on the way. And you have to get ready for the next job.\nThe End.", "links": [], "hooks": [], "cleanText": "You raise your rifle and open fire. Blood splatters across the wall, as gunshots reverberate in the small room. Your ears ring with pain, and your cold heart feels no remorse. You cannot allow feelings of guilt to seep into your duty. As the family lies dead, you contact your superiors to let them know. A clean up crew is on the way. And you have to get ready for the next job.\nThe End." }, { "name": " Ending 2", "tags": "", "id": "17", "text": "You hesitate as you look at the family in front of you, and in that moment, you hear a loud bang. For a moment, you feel a brief pain, then something wet trickles down your forehead. You catch a glimpse of a young child holding a gun across the room. Everything goes dark.\nThe End", "links": [], "hooks": [], "cleanText": "You hesitate as you look at the family in front of you, and in that moment, you hear a loud bang. For a moment, you feel a brief pain, then something wet trickles down your forehead. You catch a glimpse of a young child holding a gun across the room. Everything goes dark.\nThe End" }, { "name": "Ending 3", "tags": "", "id": "18", "text": "You begin climbing up the ladder, you find yourself back in the living room, and you push through the kithcen. The whole time, orders are being directed at you, but you ignore them. Having gone rogue, you take out the earpiece, and throw down your rifle. You will have to live your life on the run from now on. A powerful force has decided your fate, and a sense of relief washes over you. \nThe End.", "links": [], "hooks": [], "cleanText": "You begin climbing up the ladder, you find yourself back in the living room, and you push through the kithcen. The whole time, orders are being directed at you, but you ignore them. Having gone rogue, you take out the earpiece, and throw down your rifle. You will have to live your life on the run from now on. A powerful force has decided your fate, and a sense of relief washes over you. \nThe End." } ] } if "name" in world and "passages" in world: print(world["name"]) print() for passage in world["passages"]: print(passage["name"]) print(passage["cleanText"]) for link in passage["links"]: print(link["linkText"]) print()
42.68408
421
0.560114
2,190
17,159
4.388128
0.16621
0.024766
0.01488
0.008117
0.780957
0.759417
0.751717
0.730593
0.724454
0.689282
0
0.007471
0.297978
17,159
402
422
42.68408
0.790304
0.001224
0
0.388471
0
0.085213
0.679017
0.042829
0
0
0
0
0.002506
1
0
false
0.120301
0.002506
0
0.002506
0.015038
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
7
28086da53c85dcef9cb3cd1908ccb8e01fcfcaf6
18,551
py
Python
tests/test_deconstopenapi.py
madhu74/deconst-raml-preparer
9f2878e36272b7725b71d583335977c424456ae6
[ "Apache-2.0" ]
1
2018-08-02T16:07:39.000Z
2018-08-02T16:07:39.000Z
tests/test_deconstopenapi.py
madhu74/deconst-openapi-preparer
9f2878e36272b7725b71d583335977c424456ae6
[ "Apache-2.0" ]
null
null
null
tests/test_deconstopenapi.py
madhu74/deconst-openapi-preparer
9f2878e36272b7725b71d583335977c424456ae6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' test_deconstopenapi ---------------------------------- Tests for `deconstopenapi` module. ''' import unittest import subprocess import sys import os import json from unittest import mock from os import path from bs4 import BeautifulSoup sys.path.append(path.join(path.dirname(__file__), '..')) from openapipreparer.deconstopenapi import enveloper from openapipreparer.deconstopenapi import submit from openapipreparer.deconstopenapi import find_all from openapipreparer.config import Configuration import json class DeconstOPENAPITestCase(unittest.TestCase): ''' Tests for the deconstraml methods ''' def test_enveloper_pass(self): ''' Does the enveloper link things together properly? ''' self.maxDiff = None openapi_location = path.join( os.getcwd(), 'tests', 'src', 'openapi.json') html_location = path.join( os.getcwd(), 'tests', 'dest') actual_result = enveloper(openapi_location, html_location) # print("Test") # data =str(actual_result) # print(data.encode('utf-8', "strict").decode('utf-8', "strict")) # print("Test") expected_result = { 'body': '\n<h1>Swagger Petstore</h1>\n<div class="app-desc">No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)</div>\n<div class="app-desc">More information: <a href="https://helloreverb.com">https://helloreverb.com</a></div>\n<div class="app-desc">Contact Info: <a href="hello@helloreverb.com">hello@helloreverb.com</a></div>\n<div class="app-desc">Version: 1.0.0</div>\n<div class="app-desc">BasePath:/v1</div>\n<div class="license-info">MIT</div>\n<div class="license-url">http://apache.org/licenses/LICENSE-2.0.html</div>\n<h2>Access</h2>\n<h2><a name="__Methods">Methods</a></h2>\n [ Jump to <a href="#__Models">Models</a> ]\n\n <h3>Table of Contents </h3>\n<div class="method-summary"></div>\n<h4><a href="#Pets">Pets</a></h4>\n<ul>\n<li><a href="#createPets"><code><span class="http-method">post</span> /pets</code></a></li>\n<li><a href="#listPets"><code><span class="http-method">get</span> /pets</code></a></li>\n<li><a href="#showPetById"><code><span class="http-method">get</span> /pets/{petId}</code></a></li>\n</ul>\n<h1><a name="Pets">Pets</a></h1>\n<div class="method"><a name="createPets"></a>\n<div class="method-path">\n<a class="up" href="#__Methods">Up</a>\n<pre class="post"><code class="huge"><span class="http-method">post</span> /pets</code></pre></div>\n<div class="method-summary">Create a pet (<span class="nickname">createPets</span>)</div>\n<div class="method-notes"></div>\n<!--Todo: process Response Object and its headers, schema, examples -->\n<h3 class="field-label">Produces</h3>\n This API call produces the following media types according to the <span class="header">Accept</span> request header;\n the media type will be conveyed by the <span class="header">Content-Type</span> response header.\n <ul>\n<li><code>application/json</code></li>\n</ul>\n<h3 class="field-label">Responses</h3>\n<h4 class="field-label">201</h4>\n Null response\n <a href="#"></a>\n<h4 class="field-label">default</h4>\n unexpected error\n <a href="#Error">Error</a>\n</div> <!-- method -->\n<hr/>\n<div class="method"><a name="listPets"></a>\n<div class="method-path">\n<a class="up" href="#__Methods">Up</a>\n<pre class="get"><code class="huge"><span class="http-method">get</span> /pets</code></pre></div>\n<div class="method-summary">List all pets (<span class="nickname">listPets</span>)</div>\n<div class="method-notes"></div>\n<h3 class="field-label">Query parameters</h3>\n<div class="field-items">\n<div class="param">limit (optional)</div>\n<div class="param-desc"><span class="param-type">Query Parameter</span> — How many items to return at one time max 100 format: int32</div>\n</div> <!-- field-items -->\n<h3 class="field-label">Return type</h3>\n<div class="return-type">\n<a href="#Pets">Pets</a>\n</div>\n<!--Todo: process Response Object and its headers, schema, examples -->\n<h3 class="field-label">Example data</h3>\n<div class="example-data-content-type">Content-Type: application/json</div>\n<pre class="example"><code>null</code></pre>\n<h3 class="field-label">Produces</h3>\n This API call produces the following media types according to the <span class="header">Accept</span> request header;\n the media type will be conveyed by the <span class="header">Content-Type</span> response header.\n <ul>\n<li><code>application/json</code></li>\n</ul>\n<h3 class="field-label">Responses</h3>\n<h4 class="field-label">200</h4>\n An paged array of pets\n <a href="#Pets">Pets</a>\n<h4 class="field-label">default</h4>\n unexpected error\n <a href="#Error">Error</a>\n</div> <!-- method -->\n<hr/>\n<div class="method"><a name="showPetById"></a>\n<div class="method-path">\n<a class="up" href="#__Methods">Up</a>\n<pre class="get"><code class="huge"><span class="http-method">get</span> /pets/{petId}</code></pre></div>\n<div class="method-summary">Info for a specific pet (<span class="nickname">showPetById</span>)</div>\n<div class="method-notes"></div>\n<h3 class="field-label">Path parameters</h3>\n<div class="field-items">\n<div class="param">petId (required)</div>\n<div class="param-desc"><span class="param-type">Path Parameter</span> — The id of the pet to retrieve </div>\n</div> <!-- field-items -->\n<h3 class="field-label">Return type</h3>\n<div class="return-type">\n<a href="#Pets">Pets</a>\n</div>\n<!--Todo: process Response Object and its headers, schema, examples -->\n<h3 class="field-label">Example data</h3>\n<div class="example-data-content-type">Content-Type: application/json</div>\n<pre class="example"><code>null</code></pre>\n<h3 class="field-label">Produces</h3>\n This API call produces the following media types according to the <span class="header">Accept</span> request header;\n the media type will be conveyed by the <span class="header">Content-Type</span> response header.\n <ul>\n<li><code>application/json</code></li>\n</ul>\n<h3 class="field-label">Responses</h3>\n<h4 class="field-label">200</h4>\n Expected response to a valid request\n <a href="#Pets">Pets</a>\n<h4 class="field-label">default</h4>\n unexpected error\n <a href="#Error">Error</a>\n</div> <!-- method -->\n<hr/>\n<h2><a name="__Models">Models</a></h2>\n [ Jump to <a href="#__Methods">Methods</a> ]\n\n <h3>Table of Contents</h3>\n<ol>\n<li><a href="#Error"><code>Error</code> - </a></li>\n<li><a href="#Pet"><code>Pet</code> - </a></li>\n<li><a href="#Pets"><code>Pets</code> - </a></li>\n</ol>\n<div class="model">\n<h3><a name="Error"><code>Error</code> - </a> <a class="up" href="#__Models">Up</a></h3>\n<div class="model-description"></div>\n<div class="field-items">\n<div class="param">code </div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> format: int32</div>\n<div class="param">message </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> </div>\n</div> <!-- field-items -->\n</div>\n<div class="model">\n<h3><a name="Pet"><code>Pet</code> - </a> <a class="up" href="#__Models">Up</a></h3>\n<div class="model-description"></div>\n<div class="field-items">\n<div class="param">id </div><div class="param-desc"><span class="param-type"><a href="#long">Long</a></span> format: int64</div>\n<div class="param">name </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> </div>\n<div class="param">tag (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> </div>\n</div> <!-- field-items -->\n</div>\n<div class="model">\n<h3><a name="Pets"><code>Pets</code> - </a> <a class="up" href="#__Models">Up</a></h3>\n<div class="model-description"></div>\n<div class="field-items">\n</div> <!-- field-items -->\n</div>\n', 'docname': str(path.join(html_location,"index.html")), 'title': 'Swagger Petstore', 'toc': '<ul><li><a href="#Access">Access</a></li><li><a href="#Methods">Methods</a></li><ul><li><a href="#TableofContents">Table of Contents </a></li><ul><li><a href="#Pets">Pets</a></li></ul></ul><ul><li><a href="#201">201</a></li><li><a href="#default">default</a></li></ul><ul><li><a href="#200">200</a></li><li><a href="#default">default</a></li></ul><ul><li><a href="#200">200</a></li><li><a href="#default">default</a></li></ul><li><a href="#Models">Models</a></li><ul><li><a href="#TableofContents">Table of Contents</a></li></ul><ul><li><a href="#Error----Up"></a></li></ul><ul><li><a href="#Pet----Up"></a></li></ul><ul><li><a href="#Pets----Up"></a></li></ul></ul>', 'unsearchable': None, 'content_id': str(path.join(html_location,"index.html")), 'meta': { 'someKey': 'someValue', 'preferGithubIssues': True, 'github_issues_url': 'https://github.com/deconst/fake-repo/issues', 'github_edit_url': 'https://github.com/deconst/fake-repo/edit/master/tests/dest/test_is_html/index.html' }, 'asset_offsets': {}, 'addenda': None, 'per_page_meta': {}} self.assertEqual(actual_result, expected_result) def test_submit_pass(self): ''' Does the submit method pass the json properly? ''' config = Configuration(os.environ) self.maxDiff = None the_envelope_passed = { 'body': '\n<h1>Swagger Petstore</h1>\n<div class="app-desc">No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)</div>\n<div class="app-desc">More information: <a href="https://helloreverb.com">https://helloreverb.com</a></div>\n<div class="app-desc">Contact Info: <a href="hello@helloreverb.com">hello@helloreverb.com</a></div>\n<div class="app-desc">Version: 1.0.0</div>\n<div class="app-desc">BasePath:/v1</div>\n<div class="license-info">MIT</div>\n<div class="license-url">http://apache.org/licenses/LICENSE-2.0.html</div>\n<h2>Access</h2>\n<h2><a name="__Methods">Methods</a></h2>\n [ Jump to <a href="#__Models">Models</a> ]\n\n <h3>Table of Contents </h3>\n<div class="method-summary"></div>\n<h4><a href="#Pets">Pets</a></h4>\n<ul>\n<li><a href="#createPets"><code><span class="http-method">post</span> /pets</code></a></li>\n<li><a href="#listPets"><code><span class="http-method">get</span> /pets</code></a></li>\n<li><a href="#showPetById"><code><span class="http-method">get</span> /pets/{petId}</code></a></li>\n</ul>\n<h1><a name="Pets">Pets</a></h1>\n<div class="method"><a name="createPets"></a>\n<div class="method-path">\n<a class="up" href="#__Methods">Up</a>\n<pre class="post"><code class="huge"><span class="http-method">post</span> /pets</code></pre></div>\n<div class="method-summary">Create a pet (<span class="nickname">createPets</span>)</div>\n<div class="method-notes"></div>\n<!--Todo: process Response Object and its headers, schema, examples -->\n<h3 class="field-label">Produces</h3>\n This API call produces the following media types according to the <span class="header">Accept</span> request header;\n the media type will be conveyed by the <span class="header">Content-Type</span> response header.\n <ul>\n<li><code>application/json</code></li>\n</ul>\n<h3 class="field-label">Responses</h3>\n<h4 class="field-label">201</h4>\n Null response\n <a href="#"></a>\n<h4 class="field-label">default</h4>\n unexpected error\n <a href="#Error">Error</a>\n</div> <!-- method -->\n<hr/>\n<div class="method"><a name="listPets"></a>\n<div class="method-path">\n<a class="up" href="#__Methods">Up</a>\n<pre class="get"><code class="huge"><span class="http-method">get</span> /pets</code></pre></div>\n<div class="method-summary">List all pets (<span class="nickname">listPets</span>)</div>\n<div class="method-notes"></div>\n<h3 class="field-label">Query parameters</h3>\n<div class="field-items">\n<div class="param">limit (optional)</div>\n<div class="param-desc"><span class="param-type">Query Parameter</span> — How many items to return at one time max 100 format: int32</div>\n</div> <!-- field-items -->\n<h3 class="field-label">Return type</h3>\n<div class="return-type">\n<a href="#Pets">Pets</a>\n</div>\n<!--Todo: process Response Object and its headers, schema, examples -->\n<h3 class="field-label">Example data</h3>\n<div class="example-data-content-type">Content-Type: application/json</div>\n<pre class="example"><code>null</code></pre>\n<h3 class="field-label">Produces</h3>\n This API call produces the following media types according to the <span class="header">Accept</span> request header;\n the media type will be conveyed by the <span class="header">Content-Type</span> response header.\n <ul>\n<li><code>application/json</code></li>\n</ul>\n<h3 class="field-label">Responses</h3>\n<h4 class="field-label">200</h4>\n An paged array of pets\n <a href="#Pets">Pets</a>\n<h4 class="field-label">default</h4>\n unexpected error\n <a href="#Error">Error</a>\n</div> <!-- method -->\n<hr/>\n<div class="method"><a name="showPetById"></a>\n<div class="method-path">\n<a class="up" href="#__Methods">Up</a>\n<pre class="get"><code class="huge"><span class="http-method">get</span> /pets/{petId}</code></pre></div>\n<div class="method-summary">Info for a specific pet (<span class="nickname">showPetById</span>)</div>\n<div class="method-notes"></div>\n<h3 class="field-label">Path parameters</h3>\n<div class="field-items">\n<div class="param">petId (required)</div>\n<div class="param-desc"><span class="param-type">Path Parameter</span> — The id of the pet to retrieve </div>\n</div> <!-- field-items -->\n<h3 class="field-label">Return type</h3>\n<div class="return-type">\n<a href="#Pets">Pets</a>\n</div>\n<!--Todo: process Response Object and its headers, schema, examples -->\n<h3 class="field-label">Example data</h3>\n<div class="example-data-content-type">Content-Type: application/json</div>\n<pre class="example"><code>null</code></pre>\n<h3 class="field-label">Produces</h3>\n This API call produces the following media types according to the <span class="header">Accept</span> request header;\n the media type will be conveyed by the <span class="header">Content-Type</span> response header.\n <ul>\n<li><code>application/json</code></li>\n</ul>\n<h3 class="field-label">Responses</h3>\n<h4 class="field-label">200</h4>\n Expected response to a valid request\n <a href="#Pets">Pets</a>\n<h4 class="field-label">default</h4>\n unexpected error\n <a href="#Error">Error</a>\n</div> <!-- method -->\n<hr/>\n<h2><a name="__Models">Models</a></h2>\n [ Jump to <a href="#__Methods">Methods</a> ]\n\n <h3>Table of Contents</h3>\n<ol>\n<li><a href="#Error"><code>Error</code> - </a></li>\n<li><a href="#Pet"><code>Pet</code> - </a></li>\n<li><a href="#Pets"><code>Pets</code> - </a></li>\n</ol>\n<div class="model">\n<h3><a name="Error"><code>Error</code> - </a> <a class="up" href="#__Models">Up</a></h3>\n<div class="model-description"></div>\n<div class="field-items">\n<div class="param">code </div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> format: int32</div>\n<div class="param">message </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> </div>\n</div> <!-- field-items -->\n</div>\n<div class="model">\n<h3><a name="Pet"><code>Pet</code> - </a> <a class="up" href="#__Models">Up</a></h3>\n<div class="model-description"></div>\n<div class="field-items">\n<div class="param">id </div><div class="param-desc"><span class="param-type"><a href="#long">Long</a></span> format: int64</div>\n<div class="param">name </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> </div>\n<div class="param">tag (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> </div>\n</div> <!-- field-items -->\n</div>\n<div class="model">\n<h3><a name="Pets"><code>Pets</code> - </a> <a class="up" href="#__Models">Up</a></h3>\n<div class="model-description"></div>\n<div class="field-items">\n</div> <!-- field-items -->\n</div>\n', 'docname': "fake_content_id", 'title': 'Swagger Petstore', 'toc': '<ul><li><a href="#Access">Access</a></li><li><a href="#Methods">Methods</a></li><ul><li><a href="#TableofContents">Table of Contents </a></li><ul><li><a href="#Pets">Pets</a></li></ul></ul><ul><li><a href="#201">201</a></li><li><a href="#default">default</a></li></ul><ul><li><a href="#200">200</a></li><li><a href="#default">default</a></li></ul><ul><li><a href="#200">200</a></li><li><a href="#default">default</a></li></ul><li><a href="#Models">Models</a></li><ul><li><a href="#TableofContents">Table of Contents</a></li></ul><ul><li><a href="#Error----Up"></a></li></ul><ul><li><a href="#Pet----Up"></a></li></ul><ul><li><a href="#Pets----Up"></a></li></ul></ul>', 'unsearchable': None, 'content_id': "fake_content_id", 'meta': { 'someKey': 'someValue', 'preferGithubIssues': True, 'github_issues_url': 'https://github.com/deconst/fake-repo/issues', 'github_edit_url': 'https://github.com/deconst/fake-repo/edit/master/tests/dest/index.html' }, 'asset_offsets': {}, 'addenda': None, 'per_page_meta': {}} dest_path = submit(the_envelope_passed) with open(dest_path, 'r') as written_file: actual_file = json.load(written_file) fake_json_envelope = os.path.join( os.getcwd(), 'tests', 'src', 'input_file_writeout.json') with open(fake_json_envelope, 'r') as fake_envelope: expected_json_output = json.load(fake_envelope) self.assertEqual(actual_file, expected_json_output) def test_find_all_pass(self): ''' Does the find_all method really find all the openapi it can? ''' config_file = Configuration(os.environ) actual_list = find_all(config_file) expected_list = [os.path.join(os.getcwd(), 'tests', 'src', 'openapi.json'), os.path.join(os.getcwd(), 'tests', 'src','small_test', 'openapi.json')] self.assertEqual(actual_list, expected_list) # # if __name__ == '__main__': unittest.main()
173.373832
6,789
0.648105
3,018
18,551
3.943671
0.082505
0.038313
0.066543
0.044362
0.882961
0.882961
0.879852
0.869938
0.864056
0.856831
0
0.012378
0.107218
18,551
106
6,790
175.009434
0.706014
0.023826
0
0.351351
0
0.081081
0.86606
0.528876
0
0
0
0
0.040541
1
0.040541
false
0.067568
0.175676
0
0.22973
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
1
0
0
0
0
0
11
95f90d73ddff53e79c4438ef88aa82577c32ac3c
68,544
py
Python
benchmarks/SimResults/_bigLittle_hrrs_spec_tugberk_mylocality/cmp_sjeng/power.py
TugberkArkose/MLScheduler
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
[ "Unlicense" ]
null
null
null
benchmarks/SimResults/_bigLittle_hrrs_spec_tugberk_mylocality/cmp_sjeng/power.py
TugberkArkose/MLScheduler
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
[ "Unlicense" ]
null
null
null
benchmarks/SimResults/_bigLittle_hrrs_spec_tugberk_mylocality/cmp_sjeng/power.py
TugberkArkose/MLScheduler
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
[ "Unlicense" ]
null
null
null
power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate Leakage': 0.00662954, 'Peak Dynamic': 0.0, 'Runtime Dynamic': 0.0, 'Subthreshold Leakage': 0.0691322, 'Subthreshold Leakage with power gating': 0.0259246}, 'Core': [{'Area': 32.6082, 'Execution Unit/Area': 8.2042, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.122718, 'Execution Unit/Instruction Scheduler/Area': 2.17927, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.400085, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.692802, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.397342, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.49023, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.395468, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 5.65545, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0145034, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.104878, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.107261, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.104878, 'Execution Unit/Register Files/Runtime Dynamic': 0.121765, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.253428, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.66411, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 2.88417, 'Execution Unit/Subthreshold Leakage': 1.83518, 'Execution Unit/Subthreshold Leakage with power gating': 0.709678, 'Gate Leakage': 0.372997, 'Instruction Fetch Unit/Area': 5.86007, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00421304, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00421304, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00372123, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.00146881, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00154082, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.0136881, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0385481, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0590479, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.103113, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.43323, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.349007, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.350219, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.96874, 'Instruction Fetch Unit/Runtime Dynamic': 0.854575, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932587, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0109216, 'L2/Runtime Dynamic': 0.0034782, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80969, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 3.73761, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.20663, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0351387, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0808969, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0808969, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 4.12118, 'Load Store Unit/Runtime Dynamic': 1.68649, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.199478, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.398956, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591622, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283406, 'Memory Management Unit/Area': 0.434579, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0707954, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0709118, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00813591, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.399995, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0573547, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.680885, 'Memory Management Unit/Runtime Dynamic': 0.128267, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 23.9989, 'Renaming Unit/Area': 0.369768, 'Renaming Unit/FP Front End RAT/Area': 0.168486, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925, 'Renaming Unit/Free List/Area': 0.0414755, 'Renaming Unit/Free List/Gate Leakage': 4.15911e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0401324, 'Renaming Unit/Free List/Runtime Dynamic': 0.0204581, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987, 'Renaming Unit/Gate Leakage': 0.00863632, 'Renaming Unit/Int Front End RAT/Area': 0.114751, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.208516, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.228974, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 5.78595, 'Subthreshold Leakage': 6.21877, 'Subthreshold Leakage with power gating': 2.58311}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.170861, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.275592, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.13911, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.585562, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.195416, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.20526, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00716667, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0518242, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0530019, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0518242, 'Execution Unit/Register Files/Runtime Dynamic': 0.0601686, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.109179, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.285769, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.53957, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.0022954, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.0022954, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00208081, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000850098, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000761376, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00743299, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0190957, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0509521, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.24099, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.172781, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.173056, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.6168, 'Instruction Fetch Unit/Runtime Dynamic': 0.423318, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.00554225, 'L2/Runtime Dynamic': 0.00176824, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.46815, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.594101, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0398267, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0398266, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.65622, 'Load Store Unit/Runtime Dynamic': 0.830339, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0982058, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.196411, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0348536, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0349116, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.201513, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.028399, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.417494, 'Memory Management Unit/Runtime Dynamic': 0.0633106, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.4908, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00770877, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0871955, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.0949043, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.95321, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.174204, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.280985, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.141832, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.59702, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.19924, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.21274, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0073069, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0528383, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.054039, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0528383, 'Execution Unit/Register Files/Runtime Dynamic': 0.0613459, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.111315, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.291626, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.55806, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00233528, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00233528, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.0021169, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000864811, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000776275, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00756372, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0194295, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0519491, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.30441, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.176012, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.176442, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.68329, 'Instruction Fetch Unit/Runtime Dynamic': 0.431397, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.00557278, 'L2/Runtime Dynamic': 0.00179268, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.49486, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.606994, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.040691, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0406909, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.68702, 'Load Store Unit/Runtime Dynamic': 0.848359, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.100337, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.200674, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.03561, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.035669, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.205456, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0289273, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.422737, 'Memory Management Unit/Runtime Dynamic': 0.0645963, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.6008, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00785961, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0889121, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.0967717, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.00098, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.174277, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.281103, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.141891, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.597271, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.199323, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.21291, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00730997, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0528605, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0540617, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0528605, 'Execution Unit/Register Files/Runtime Dynamic': 0.0613717, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.111362, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.291744, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.55845, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00233564, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00233564, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00211723, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000864948, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000776601, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.0075651, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0194324, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0519709, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.30579, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.175944, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.176517, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.68474, 'Instruction Fetch Unit/Runtime Dynamic': 0.431429, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.00558296, 'L2/Runtime Dynamic': 0.00179122, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.49536, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.607228, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0407072, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0407071, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.68759, 'Load Store Unit/Runtime Dynamic': 0.848689, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.100377, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.200754, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0356241, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0356831, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.205542, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0289165, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.422847, 'Memory Management Unit/Runtime Dynamic': 0.0645996, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 16.6031, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00786291, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0889509, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.0968138, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.00178, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 0.39699744879785515, 'Runtime Dynamic': 0.39699744879785515, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.0222287, 'Runtime Dynamic': 0.0125424, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 73.7159, 'Peak Power': 106.828, 'Runtime Dynamic': 14.7544, 'Subthreshold Leakage': 31.5774, 'Subthreshold Leakage with power gating': 13.9484, 'Total Cores/Area': 128.669, 'Total Cores/Gate Leakage': 1.4798, 'Total Cores/Peak Dynamic': 73.6936, 'Total Cores/Runtime Dynamic': 14.7419, 'Total Cores/Subthreshold Leakage': 24.7074, 'Total Cores/Subthreshold Leakage with power gating': 10.2429, 'Total L3s/Area': 61.9075, 'Total L3s/Gate Leakage': 0.0484137, 'Total L3s/Peak Dynamic': 0.0222287, 'Total L3s/Runtime Dynamic': 0.0125424, 'Total L3s/Subthreshold Leakage': 6.80085, 'Total L3s/Subthreshold Leakage with power gating': 3.32364, 'Total Leakage': 33.1122, 'Total NoCs/Area': 1.33155, 'Total NoCs/Gate Leakage': 0.00662954, 'Total NoCs/Peak Dynamic': 0.0, 'Total NoCs/Runtime Dynamic': 0.0, 'Total NoCs/Subthreshold Leakage': 0.0691322, 'Total NoCs/Subthreshold Leakage with power gating': 0.0259246}}
74.993435
124
0.681781
8,082
68,544
5.776293
0.064835
0.123725
0.113101
0.093565
0.942336
0.934453
0.921044
0.896046
0.868392
0.84967
0
0.130886
0.224542
68,544
914
125
74.993435
0.747408
0
0
0.664114
0
0
0.658035
0.048144
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
95fee4f099f85d82e31cea71aea74746cd9ba100
255,880
py
Python
src/oci/oda/management_client.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/oda/management_client.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/oda/management_client.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. from __future__ import absolute_import from oci._vendor import requests # noqa: F401 from oci._vendor import six from oci import retry, circuit_breaker # noqa: F401 from oci.base_client import BaseClient from oci.config import get_config_value_or_default, validate_config from oci.signer import Signer from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME from .models import oda_type_mapping missing = Sentinel("Missing") class ManagementClient(object): """ API to create and maintain Oracle Digital Assistant service instances. """ def __init__(self, config, **kwargs): """ Creates a new service client :param dict config: Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__. The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config the dict using :py:meth:`~oci.config.validate_config` :param str service_endpoint: (optional) The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit need to specify a service endpoint. :param timeout: (optional) The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout. :type timeout: float or tuple(float, float) :param signer: (optional) The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values provided in the config parameter. One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__ by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument :type signer: :py:class:`~oci.signer.AbstractBaseSigner` :param obj retry_strategy: (optional) A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation. Any value provided at the operation level will override whatever is specified at the client level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` is also available. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. :param obj circuit_breaker_strategy: (optional) A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided. The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__. :param function circuit_breaker_callback: (optional) Callback function to receive any exceptions triggerred by the circuit breaker. :param allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not allow control characters to be in the response object. """ validate_config(config, signer=kwargs.get('signer')) if 'signer' in kwargs: signer = kwargs['signer'] elif AUTHENTICATION_TYPE_FIELD_NAME in config: signer = get_signer_from_authentication_type(config) else: signer = Signer( tenancy=config["tenancy"], user=config["user"], fingerprint=config["fingerprint"], private_key_file_location=config.get("key_file"), pass_phrase=get_config_value_or_default(config, "pass_phrase"), private_key_content=config.get("key_content") ) base_client_init_kwargs = { 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'base_path': '/20190506', 'service_endpoint_template': 'https://digitalassistant-api.{region}.oci.{secondLevelDomain}', 'skip_deserialization': kwargs.get('skip_deserialization', False), 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) } if 'timeout' in kwargs: base_client_init_kwargs['timeout'] = kwargs.get('timeout') if base_client_init_kwargs.get('circuit_breaker_strategy') is None: base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY if 'allow_control_chars' in kwargs: base_client_init_kwargs['allow_control_chars'] = kwargs.get('allow_control_chars') self.base_client = BaseClient("management", config, signer, oda_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') def configure_digital_assistant_parameters(self, oda_instance_id, configure_digital_assistant_parameters_details, **kwargs): """ This will store the provided parameters in the Digital Assistant instance and update any Digital Assistants with matching parameters. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param oci.oda.models.ConfigureDigitalAssistantParametersDetails configure_digital_assistant_parameters_details: (required) The parameter values to use. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param str opc_retry_token: (optional) A token that uniquely identifies a request so that you can retry the request if there's a timeout or server error without the risk of executing that same action again. Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/configure_digital_assistant_parameters.py.html>`__ to see an example of how to use configure_digital_assistant_parameters API. """ resource_path = "/odaInstances/{odaInstanceId}/actions/configureDigitalAssistantParameters" method = "POST" operation_name = "configure_digital_assistant_parameters" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/DigitalAssistantParameter/ConfigureDigitalAssistantParameters" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "configure_digital_assistant_parameters got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=configure_digital_assistant_parameters_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=configure_digital_assistant_parameters_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_authentication_provider(self, oda_instance_id, create_authentication_provider_details, **kwargs): """ Creates a new Authentication Provider :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param oci.oda.models.CreateAuthenticationProviderDetails create_authentication_provider_details: (required) Property values required to create the new Authentication Provider. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param str opc_retry_token: (optional) A token that uniquely identifies a request so that you can retry the request if there's a timeout or server error without the risk of executing that same action again. Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.AuthenticationProvider` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/create_authentication_provider.py.html>`__ to see an example of how to use create_authentication_provider API. """ resource_path = "/odaInstances/{odaInstanceId}/authenticationProviders" method = "POST" operation_name = "create_authentication_provider" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/AuthenticationProvider/CreateAuthenticationProvider" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_authentication_provider got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_authentication_provider_details, response_type="AuthenticationProvider", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_authentication_provider_details, response_type="AuthenticationProvider", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_channel(self, oda_instance_id, create_channel_details, **kwargs): """ Creates a new Channel. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param oci.oda.models.CreateChannelDetails create_channel_details: (required) Property values for creating the new Channel. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param str opc_retry_token: (optional) A token that uniquely identifies a request so that you can retry the request if there's a timeout or server error without the risk of executing that same action again. Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.CreateChannelResult` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/create_channel.py.html>`__ to see an example of how to use create_channel API. """ resource_path = "/odaInstances/{odaInstanceId}/channels" method = "POST" operation_name = "create_channel" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Channel/CreateChannel" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_channel got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_channel_details, response_type="CreateChannelResult", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_channel_details, response_type="CreateChannelResult", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_digital_assistant(self, oda_instance_id, create_digital_assistant_details, **kwargs): """ Creates a new Digital Assistant. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param oci.oda.models.CreateDigitalAssistantDetails create_digital_assistant_details: (required) Property values for creating the new Digital Assistant. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param str opc_retry_token: (optional) A token that uniquely identifies a request so that you can retry the request if there's a timeout or server error without the risk of executing that same action again. Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/create_digital_assistant.py.html>`__ to see an example of how to use create_digital_assistant API. """ resource_path = "/odaInstances/{odaInstanceId}/digitalAssistants" method = "POST" operation_name = "create_digital_assistant" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/DigitalAssistant/CreateDigitalAssistant" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_digital_assistant got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_digital_assistant_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_digital_assistant_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_skill(self, oda_instance_id, create_skill_details, **kwargs): """ Creates a new Skill from scratch. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param oci.oda.models.CreateSkillDetails create_skill_details: (required) Property values for creating the Skill. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param str opc_retry_token: (optional) A token that uniquely identifies a request so that you can retry the request if there's a timeout or server error without the risk of executing that same action again. Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/create_skill.py.html>`__ to see an example of how to use create_skill API. """ resource_path = "/odaInstances/{odaInstanceId}/skills" method = "POST" operation_name = "create_skill" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Skill/CreateSkill" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_skill got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_skill_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_skill_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_skill_parameter(self, oda_instance_id, skill_id, create_skill_parameter_details, **kwargs): """ Creates a new Skill Parameter. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str skill_id: (required) Unique Skill identifier. :param oci.oda.models.CreateSkillParameterDetails create_skill_parameter_details: (required) Property values for creating the new Skill Parameter. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param str opc_retry_token: (optional) A token that uniquely identifies a request so that you can retry the request if there's a timeout or server error without the risk of executing that same action again. Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.SkillParameter` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/create_skill_parameter.py.html>`__ to see an example of how to use create_skill_parameter API. """ resource_path = "/odaInstances/{odaInstanceId}/skills/{skillId}/parameters" method = "POST" operation_name = "create_skill_parameter" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/SkillParameter/CreateSkillParameter" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_skill_parameter got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "skillId": skill_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_skill_parameter_details, response_type="SkillParameter", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_skill_parameter_details, response_type="SkillParameter", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def create_translator(self, oda_instance_id, create_translator_details, **kwargs): """ Creates a new Translator :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param oci.oda.models.CreateTranslatorDetails create_translator_details: (required) Property values to create the new Translator. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param str opc_retry_token: (optional) A token that uniquely identifies a request so that you can retry the request if there's a timeout or server error without the risk of executing that same action again. Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.Translator` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/create_translator.py.html>`__ to see an example of how to use create_translator API. """ resource_path = "/odaInstances/{odaInstanceId}/translators" method = "POST" operation_name = "create_translator" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Translator/CreateTranslator" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "create_translator got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_translator_details, response_type="Translator", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=create_translator_details, response_type="Translator", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_authentication_provider(self, oda_instance_id, authentication_provider_id, **kwargs): """ Delete the specified Authentication Provider. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str authentication_provider_id: (required) Unique Authentication Provider identifier. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/delete_authentication_provider.py.html>`__ to see an example of how to use delete_authentication_provider API. """ resource_path = "/odaInstances/{odaInstanceId}/authenticationProviders/{authenticationProviderId}" method = "DELETE" operation_name = "delete_authentication_provider" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/AuthenticationProvider/DeleteAuthenticationProvider" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_authentication_provider got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "authenticationProviderId": authentication_provider_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_channel(self, oda_instance_id, channel_id, **kwargs): """ Delete the specified Channel. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str channel_id: (required) Unique Channel identifier. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/delete_channel.py.html>`__ to see an example of how to use delete_channel API. """ resource_path = "/odaInstances/{odaInstanceId}/channels/{channelId}" method = "DELETE" operation_name = "delete_channel" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Channel/DeleteChannel" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_channel got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "channelId": channel_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_digital_assistant(self, oda_instance_id, digital_assistant_id, **kwargs): """ Delete the specified Digital Assistant. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str digital_assistant_id: (required) Unique Digital Assistant identifier. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/delete_digital_assistant.py.html>`__ to see an example of how to use delete_digital_assistant API. """ resource_path = "/odaInstances/{odaInstanceId}/digitalAssistants/{digitalAssistantId}" method = "DELETE" operation_name = "delete_digital_assistant" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/DigitalAssistant/DeleteDigitalAssistant" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_digital_assistant got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "digitalAssistantId": digital_assistant_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_skill(self, oda_instance_id, skill_id, **kwargs): """ Delete the specified Skill. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str skill_id: (required) Unique Skill identifier. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/delete_skill.py.html>`__ to see an example of how to use delete_skill API. """ resource_path = "/odaInstances/{odaInstanceId}/skills/{skillId}" method = "DELETE" operation_name = "delete_skill" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Skill/DeleteSkill" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_skill got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "skillId": skill_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_skill_parameter(self, oda_instance_id, skill_id, parameter_name, **kwargs): """ Delete the specified Skill Parameter. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str skill_id: (required) Unique Skill identifier. :param str parameter_name: (required) The name of a Skill Parameter. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/delete_skill_parameter.py.html>`__ to see an example of how to use delete_skill_parameter API. """ resource_path = "/odaInstances/{odaInstanceId}/skills/{skillId}/parameters/{parameterName}" method = "DELETE" operation_name = "delete_skill_parameter" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/SkillParameter/DeleteSkillParameter" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_skill_parameter got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "skillId": skill_id, "parameterName": parameter_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def delete_translator(self, oda_instance_id, translator_id, **kwargs): """ Delete the specified Translator. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str translator_id: (required) Unique Translator identifier. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/delete_translator.py.html>`__ to see an example of how to use delete_translator API. """ resource_path = "/odaInstances/{odaInstanceId}/translators/{translatorId}" method = "DELETE" operation_name = "delete_translator" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Translator/DeleteTranslator" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "delete_translator got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "translatorId": translator_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def export_digital_assistant(self, oda_instance_id, digital_assistant_id, export_digital_assistant_details, **kwargs): """ Exports the specified Digital Assistant as an archive to Object Storage. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str digital_assistant_id: (required) Unique Digital Assistant identifier. :param oci.oda.models.ExportDigitalAssistantDetails export_digital_assistant_details: (required) Where in Object Storage to export the Digital Assistant to. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/export_digital_assistant.py.html>`__ to see an example of how to use export_digital_assistant API. """ resource_path = "/odaInstances/{odaInstanceId}/digitalAssistants/{digitalAssistantId}/actions/export" method = "POST" operation_name = "export_digital_assistant" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Skill/ExportDigitalAssistant" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "export_digital_assistant got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "digitalAssistantId": digital_assistant_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=export_digital_assistant_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=export_digital_assistant_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def export_skill(self, oda_instance_id, skill_id, export_skill_details, **kwargs): """ Exports the specified Skill as an archive to Object Storage. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str skill_id: (required) Unique Skill identifier. :param oci.oda.models.ExportSkillDetails export_skill_details: (required) Where in Object Storage to export the Skill to. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/export_skill.py.html>`__ to see an example of how to use export_skill API. """ resource_path = "/odaInstances/{odaInstanceId}/skills/{skillId}/actions/export" method = "POST" operation_name = "export_skill" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Skill/ExportSkill" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "export_skill got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "skillId": skill_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=export_skill_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=export_skill_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_authentication_provider(self, oda_instance_id, authentication_provider_id, **kwargs): """ Gets the specified Authentication Provider. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str authentication_provider_id: (required) Unique Authentication Provider identifier. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.AuthenticationProvider` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/get_authentication_provider.py.html>`__ to see an example of how to use get_authentication_provider API. """ resource_path = "/odaInstances/{odaInstanceId}/authenticationProviders/{authenticationProviderId}" method = "GET" operation_name = "get_authentication_provider" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/AuthenticationProvider/GetAuthenticationProvider" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_authentication_provider got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "authenticationProviderId": authentication_provider_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="AuthenticationProvider", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="AuthenticationProvider", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_channel(self, oda_instance_id, channel_id, **kwargs): """ Gets the specified Channel. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str channel_id: (required) Unique Channel identifier. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.Channel` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/get_channel.py.html>`__ to see an example of how to use get_channel API. """ resource_path = "/odaInstances/{odaInstanceId}/channels/{channelId}" method = "GET" operation_name = "get_channel" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Channel/GetChannel" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_channel got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "channelId": channel_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Channel", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Channel", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_digital_assistant(self, oda_instance_id, digital_assistant_id, **kwargs): """ Gets the specified Digital Assistant. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str digital_assistant_id: (required) Unique Digital Assistant identifier. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.DigitalAssistant` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/get_digital_assistant.py.html>`__ to see an example of how to use get_digital_assistant API. """ resource_path = "/odaInstances/{odaInstanceId}/digitalAssistants/{digitalAssistantId}" method = "GET" operation_name = "get_digital_assistant" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/DigitalAssistant/GetDigitalAssistant" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_digital_assistant got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "digitalAssistantId": digital_assistant_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="DigitalAssistant", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="DigitalAssistant", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_digital_assistant_parameter(self, oda_instance_id, digital_assistant_id, parameter_name, **kwargs): """ Gets the specified Digital Assistant Parameter. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str digital_assistant_id: (required) Unique Digital Assistant identifier. :param str parameter_name: (required) The name of a Digital Assistant Parameter. This is unique with the Digital Assistant. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.DigitalAssistantParameter` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/get_digital_assistant_parameter.py.html>`__ to see an example of how to use get_digital_assistant_parameter API. """ resource_path = "/odaInstances/{odaInstanceId}/digitalAssistants/{digitalAssistantId}/parameters/{parameterName}" method = "GET" operation_name = "get_digital_assistant_parameter" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/DigitalAssistantParameter/GetDigitalAssistantParameter" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_digital_assistant_parameter got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "digitalAssistantId": digital_assistant_id, "parameterName": parameter_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="DigitalAssistantParameter", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="DigitalAssistantParameter", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_skill(self, oda_instance_id, skill_id, **kwargs): """ Gets the specified Skill. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str skill_id: (required) Unique Skill identifier. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.Skill` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/get_skill.py.html>`__ to see an example of how to use get_skill API. """ resource_path = "/odaInstances/{odaInstanceId}/skills/{skillId}" method = "GET" operation_name = "get_skill" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Skill/GetSkill" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_skill got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "skillId": skill_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Skill", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Skill", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_skill_parameter(self, oda_instance_id, skill_id, parameter_name, **kwargs): """ Gets the specified Skill Parameter. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str skill_id: (required) Unique Skill identifier. :param str parameter_name: (required) The name of a Skill Parameter. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.SkillParameter` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/get_skill_parameter.py.html>`__ to see an example of how to use get_skill_parameter API. """ resource_path = "/odaInstances/{odaInstanceId}/skills/{skillId}/parameters/{parameterName}" method = "GET" operation_name = "get_skill_parameter" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/SkillParameter/GetSkillParameter" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_skill_parameter got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "skillId": skill_id, "parameterName": parameter_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="SkillParameter", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="SkillParameter", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def get_translator(self, oda_instance_id, translator_id, **kwargs): """ Gets the specified Translator. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str translator_id: (required) Unique Translator identifier. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.Translator` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/get_translator.py.html>`__ to see an example of how to use get_translator API. """ resource_path = "/odaInstances/{odaInstanceId}/translators/{translatorId}" method = "GET" operation_name = "get_translator" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Translator/GetTranslator" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "get_translator got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "translatorId": translator_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Translator", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Translator", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def import_bot(self, oda_instance_id, import_bot_details, **kwargs): """ Import a Bot archive from Object Storage. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param oci.oda.models.ImportBotDetails import_bot_details: (required) Properties for where in Object Storage to import the Bot archive from. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param str opc_retry_token: (optional) A token that uniquely identifies a request so that you can retry the request if there's a timeout or server error without the risk of executing that same action again. Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/import_bot.py.html>`__ to see an example of how to use import_bot API. """ resource_path = "/odaInstances/{odaInstanceId}/actions/importBot" method = "POST" operation_name = "import_bot" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Bot/ImportBot" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "import_bot got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=import_bot_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=import_bot_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_authentication_providers(self, oda_instance_id, **kwargs): """ Returns a page of Authentication Providers that belong to the specified Digital Assistant instance. If the `opc-next-page` header appears in the response, then there are more items to retrieve. To get the next page in the subsequent GET request, include the header's value as the `page` query parameter. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str id: (optional) Unique Authentication Provider identifier. :param str identity_provider: (optional) List only Authentication Providers for this Identity Provider. Allowed values are: "GENERIC", "OAM", "GOOGLE", "MICROSOFT" :param str name: (optional) List only the information for Authentication Providers with this name. Authentication Provider names are unique and may not change. Example: `MyProvider` :param str lifecycle_state: (optional) List only the resources that are in this lifecycle state. Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" :param int limit: (optional) The maximum number of items to return per page. :param str page: (optional) The page at which to start retrieving results. You get this value from the `opc-next-page` header in a previous list request. To retireve the first page, omit this query parameter. Example: `MToxMA==` :param str sort_order: (optional) Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str sort_by: (optional) Sort on this field. You can specify one sort order only. The default sort field is `timeCreated`. The default sort order for `timeCreated` and `timeUpdated` is descending. For all other sort fields the default sort order is ascending. Allowed values are: "timeCreated", "timeUpdated", "name", "identityProvider" :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.AuthenticationProviderCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/list_authentication_providers.py.html>`__ to see an example of how to use list_authentication_providers API. """ resource_path = "/odaInstances/{odaInstanceId}/authenticationProviders" method = "GET" operation_name = "list_authentication_providers" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/AuthenticationProvider/ListAuthenticationProviders" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "id", "identity_provider", "name", "lifecycle_state", "limit", "page", "sort_order", "sort_by", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_authentication_providers got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'identity_provider' in kwargs: identity_provider_allowed_values = ["GENERIC", "OAM", "GOOGLE", "MICROSOFT"] if kwargs['identity_provider'] not in identity_provider_allowed_values: raise ValueError( "Invalid value for `identity_provider`, must be one of {0}".format(identity_provider_allowed_values) ) if 'lifecycle_state' in kwargs: lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'sort_by' in kwargs: sort_by_allowed_values = ["timeCreated", "timeUpdated", "name", "identityProvider"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) query_params = { "id": kwargs.get("id", missing), "identityProvider": kwargs.get("identity_provider", missing), "name": kwargs.get("name", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="AuthenticationProviderCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="AuthenticationProviderCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_channels(self, oda_instance_id, **kwargs): """ Returns a page of Channels that belong to the specified Digital Assistant instance. If the `opc-next-page` header appears in the response, then there are more items to retrieve. To get the next page in the subsequent GET request, include the header's value as the `page` query parameter. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str id: (optional) Unique Channel identifier. :param str name: (optional) List only the information for Channels with this name. Channels names are unique and may not change. Example: `MyChannel` :param str category: (optional) List only Channels with this category. Allowed values are: "AGENT", "APPLICATION", "BOT", "BOT_AS_AGENT", "SYSTEM", "EVENT" :param str type: (optional) List only Channels of this type. Allowed values are: "ANDROID", "APPEVENT", "APPLICATION", "CORTANA", "FACEBOOK", "IOS", "MSTEAMS", "OSS", "OSVC", "SERVICECLOUD", "SLACK", "TEST", "TWILIO", "WEB", "WEBHOOK" :param str lifecycle_state: (optional) List only the resources that are in this lifecycle state. Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" :param int limit: (optional) The maximum number of items to return per page. :param str page: (optional) The page at which to start retrieving results. You get this value from the `opc-next-page` header in a previous list request. To retireve the first page, omit this query parameter. Example: `MToxMA==` :param str sort_order: (optional) Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str sort_by: (optional) Sort on this field. You can specify one sort order only. The default sort field is `timeCreated`. The default sort order for `timeCreated` and `timeUpdated` is descending, and the default sort order for `name` is ascending. Allowed values are: "timeCreated", "timeUpdated", "name" :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.ChannelCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/list_channels.py.html>`__ to see an example of how to use list_channels API. """ resource_path = "/odaInstances/{odaInstanceId}/channels" method = "GET" operation_name = "list_channels" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Channel/ListChannels" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "id", "name", "category", "type", "lifecycle_state", "limit", "page", "sort_order", "sort_by", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_channels got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'category' in kwargs: category_allowed_values = ["AGENT", "APPLICATION", "BOT", "BOT_AS_AGENT", "SYSTEM", "EVENT"] if kwargs['category'] not in category_allowed_values: raise ValueError( "Invalid value for `category`, must be one of {0}".format(category_allowed_values) ) if 'type' in kwargs: type_allowed_values = ["ANDROID", "APPEVENT", "APPLICATION", "CORTANA", "FACEBOOK", "IOS", "MSTEAMS", "OSS", "OSVC", "SERVICECLOUD", "SLACK", "TEST", "TWILIO", "WEB", "WEBHOOK"] if kwargs['type'] not in type_allowed_values: raise ValueError( "Invalid value for `type`, must be one of {0}".format(type_allowed_values) ) if 'lifecycle_state' in kwargs: lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'sort_by' in kwargs: sort_by_allowed_values = ["timeCreated", "timeUpdated", "name"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) query_params = { "id": kwargs.get("id", missing), "name": kwargs.get("name", missing), "category": kwargs.get("category", missing), "type": kwargs.get("type", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="ChannelCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="ChannelCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_digital_assistant_parameters(self, oda_instance_id, digital_assistant_id, **kwargs): """ Returns a page of Parameters that belong to the specified Digital Assistant. If the `opc-next-page` header appears in the response, then there are more items to retrieve. To get the next page in the subsequent GET request, include the header's value as the `page` query parameter. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str digital_assistant_id: (required) Unique Digital Assistant identifier. :param str name: (optional) List only Parameters with this name. :param str lifecycle_state: (optional) List only the resources that are in this lifecycle state. Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" :param int limit: (optional) The maximum number of items to return per page. :param str page: (optional) The page at which to start retrieving results. You get this value from the `opc-next-page` header in a previous list request. To retireve the first page, omit this query parameter. Example: `MToxMA==` :param str sort_order: (optional) Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str sort_by: (optional) Sort on this field. You can specify one sort order only. The default sort field is `name`. The default sort order is ascending. Allowed values are: "name", "displayName", "type" :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.DigitalAssistantParameterCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/list_digital_assistant_parameters.py.html>`__ to see an example of how to use list_digital_assistant_parameters API. """ resource_path = "/odaInstances/{odaInstanceId}/digitalAssistants/{digitalAssistantId}/parameters" method = "GET" operation_name = "list_digital_assistant_parameters" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/DigitalAssistantParameter/ListDigitalAssistantParameters" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "name", "lifecycle_state", "limit", "page", "sort_order", "sort_by", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_digital_assistant_parameters got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "digitalAssistantId": digital_assistant_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'lifecycle_state' in kwargs: lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'sort_by' in kwargs: sort_by_allowed_values = ["name", "displayName", "type"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) query_params = { "name": kwargs.get("name", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="DigitalAssistantParameterCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="DigitalAssistantParameterCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_digital_assistants(self, oda_instance_id, **kwargs): """ Returns a page of Digital Assistants that belong to the specified Digital Assistant instance. If the `opc-next-page` header appears in the response, then there are more items to retrieve. To get the next page in the subsequent GET request, include the header's value as the `page` query parameter. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str digital_assistant_id: (optional) Unique Digital Assistant identifier. :param str category: (optional) List only Bot resources with this category. :param str name: (optional) List only Bot resources with this name. Names are unique and may not change. Example: `MySkill` :param str version: (optional) List only Bot resources with this version. Versions are unique and may not change. Example: `1.0` :param str namespace: (optional) List only Bot resources with this namespace. Namespaces may not change. Example: `MyNamespace` :param str platform_version: (optional) List only Bot resources with this platform version. :param str lifecycle_state: (optional) List only the resources that are in this lifecycle state. Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" :param str lifecycle_details: (optional) List only Bot resources with this lifecycle details. :param int limit: (optional) The maximum number of items to return per page. :param str page: (optional) The page at which to start retrieving results. You get this value from the `opc-next-page` header in a previous list request. To retireve the first page, omit this query parameter. Example: `MToxMA==` :param str sort_order: (optional) Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str sort_by: (optional) Sort on this field. You can specify one sort order only. The default sort field is `timeCreated`. The default sort order for `timeCreated` and `timeUpdated` is descending. For all other sort fields the default sort order is ascending. Allowed values are: "timeCreated", "timeUpdated", "name" :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.DigitalAssistantCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/list_digital_assistants.py.html>`__ to see an example of how to use list_digital_assistants API. """ resource_path = "/odaInstances/{odaInstanceId}/digitalAssistants" method = "GET" operation_name = "list_digital_assistants" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/DigitalAssistant/ListDigitalAssistants" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "digital_assistant_id", "category", "name", "version", "namespace", "platform_version", "lifecycle_state", "lifecycle_details", "limit", "page", "sort_order", "sort_by", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_digital_assistants got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'lifecycle_state' in kwargs: lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'sort_by' in kwargs: sort_by_allowed_values = ["timeCreated", "timeUpdated", "name"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) query_params = { "digitalAssistantId": kwargs.get("digital_assistant_id", missing), "category": kwargs.get("category", missing), "name": kwargs.get("name", missing), "version": kwargs.get("version", missing), "namespace": kwargs.get("namespace", missing), "platformVersion": kwargs.get("platform_version", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "lifecycleDetails": kwargs.get("lifecycle_details", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="DigitalAssistantCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="DigitalAssistantCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_skill_parameters(self, oda_instance_id, skill_id, **kwargs): """ Returns a page of Skill Parameters that belong to the specified Skill. If the `opc-next-page` header appears in the response, then there are more items to retrieve. To get the next page in the subsequent GET request, include the header's value as the `page` query parameter. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str skill_id: (required) Unique Skill identifier. :param str name: (optional) List only Parameters with this name. :param str lifecycle_state: (optional) List only the resources that are in this lifecycle state. Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" :param int limit: (optional) The maximum number of items to return per page. :param str page: (optional) The page at which to start retrieving results. You get this value from the `opc-next-page` header in a previous list request. To retireve the first page, omit this query parameter. Example: `MToxMA==` :param str sort_order: (optional) Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str sort_by: (optional) Sort on this field. You can specify one sort order only. The default sort field is `name`. The default sort order is ascending. Allowed values are: "name", "displayName", "type" :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.SkillParameterCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/list_skill_parameters.py.html>`__ to see an example of how to use list_skill_parameters API. """ resource_path = "/odaInstances/{odaInstanceId}/skills/{skillId}/parameters" method = "GET" operation_name = "list_skill_parameters" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/SkillParameter/ListSkillParameters" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "name", "lifecycle_state", "limit", "page", "sort_order", "sort_by", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_skill_parameters got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "skillId": skill_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'lifecycle_state' in kwargs: lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'sort_by' in kwargs: sort_by_allowed_values = ["name", "displayName", "type"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) query_params = { "name": kwargs.get("name", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="SkillParameterCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="SkillParameterCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_skills(self, oda_instance_id, **kwargs): """ Returns a page of Skills that belong to the specified Digital Assistant instance. If the `opc-next-page` header appears in the response, then there are more items to retrieve. To get the next page in the subsequent GET request, include the header's value as the `page` query parameter. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str skill_id: (optional) Unique Skill identifier. :param str category: (optional) List only Bot resources with this category. :param str name: (optional) List only Bot resources with this name. Names are unique and may not change. Example: `MySkill` :param str version: (optional) List only Bot resources with this version. Versions are unique and may not change. Example: `1.0` :param str namespace: (optional) List only Bot resources with this namespace. Namespaces may not change. Example: `MyNamespace` :param str platform_version: (optional) List only Bot resources with this platform version. :param str lifecycle_state: (optional) List only the resources that are in this lifecycle state. Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" :param str lifecycle_details: (optional) List only Bot resources with this lifecycle details. :param int limit: (optional) The maximum number of items to return per page. :param str page: (optional) The page at which to start retrieving results. You get this value from the `opc-next-page` header in a previous list request. To retireve the first page, omit this query parameter. Example: `MToxMA==` :param str sort_order: (optional) Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str sort_by: (optional) Sort on this field. You can specify one sort order only. The default sort field is `timeCreated`. The default sort order for `timeCreated` and `timeUpdated` is descending. For all other sort fields the default sort order is ascending. Allowed values are: "timeCreated", "timeUpdated", "name" :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.SkillCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/list_skills.py.html>`__ to see an example of how to use list_skills API. """ resource_path = "/odaInstances/{odaInstanceId}/skills" method = "GET" operation_name = "list_skills" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Skill/ListSkills" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "skill_id", "category", "name", "version", "namespace", "platform_version", "lifecycle_state", "lifecycle_details", "limit", "page", "sort_order", "sort_by", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_skills got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'lifecycle_state' in kwargs: lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'sort_by' in kwargs: sort_by_allowed_values = ["timeCreated", "timeUpdated", "name"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) query_params = { "skillId": kwargs.get("skill_id", missing), "category": kwargs.get("category", missing), "name": kwargs.get("name", missing), "version": kwargs.get("version", missing), "namespace": kwargs.get("namespace", missing), "platformVersion": kwargs.get("platform_version", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "lifecycleDetails": kwargs.get("lifecycle_details", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="SkillCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="SkillCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def list_translators(self, oda_instance_id, **kwargs): """ Returns a page of Translators that belong to the specified Digital Assistant instance. If the `opc-next-page` header appears in the response, then there are more items to retrieve. To get the next page in the subsequent GET request, include the header's value as the `page` query parameter. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str id: (optional) Unique Translator identifier. :param str type: (optional) List only Translators of this type. Allowed values are: "GOOGLE", "MICROSOFT" :param str name: (optional) List only Translators with this name. Translator names are unique and may not change. Example: `MyTranslator` :param str lifecycle_state: (optional) List only the resources that are in this lifecycle state. Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" :param int limit: (optional) The maximum number of items to return per page. :param str page: (optional) The page at which to start retrieving results. You get this value from the `opc-next-page` header in a previous list request. To retireve the first page, omit this query parameter. Example: `MToxMA==` :param str sort_order: (optional) Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" :param str sort_by: (optional) Sort on this field. You can specify one sort order only. The default sort field is `timeCreated`. The default sort order for `timeCreated` and `timeUpdated` is descending. For all other sort fields the default sort order is ascending. Allowed values are: "timeCreated", "timeUpdated", "name", "type" :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.TranslatorCollection` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/list_translators.py.html>`__ to see an example of how to use list_translators API. """ resource_path = "/odaInstances/{odaInstanceId}/translators" method = "GET" operation_name = "list_translators" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Translator/ListTranslators" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "id", "type", "name", "lifecycle_state", "limit", "page", "sort_order", "sort_by", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_translators got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) if 'type' in kwargs: type_allowed_values = ["GOOGLE", "MICROSOFT"] if kwargs['type'] not in type_allowed_values: raise ValueError( "Invalid value for `type`, must be one of {0}".format(type_allowed_values) ) if 'lifecycle_state' in kwargs: lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) if 'sort_by' in kwargs: sort_by_allowed_values = ["timeCreated", "timeUpdated", "name", "type"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) query_params = { "id": kwargs.get("id", missing), "type": kwargs.get("type", missing), "name": kwargs.get("name", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), "sortBy": kwargs.get("sort_by", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="TranslatorCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, query_params=query_params, header_params=header_params, response_type="TranslatorCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def publish_digital_assistant(self, oda_instance_id, digital_assistant_id, **kwargs): """ Publish a draft Digital Assistant. Once published the Digital Assistant cannot be modified. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str digital_assistant_id: (required) Unique Digital Assistant identifier. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.DigitalAssistant` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/publish_digital_assistant.py.html>`__ to see an example of how to use publish_digital_assistant API. """ resource_path = "/odaInstances/{odaInstanceId}/digitalAssistants/{digitalAssistantId}/actions/publish" method = "POST" operation_name = "publish_digital_assistant" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/DigitalAssistant/PublishDigitalAssistant" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "publish_digital_assistant got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "digitalAssistantId": digital_assistant_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="DigitalAssistant", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="DigitalAssistant", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def publish_skill(self, oda_instance_id, skill_id, **kwargs): """ Publish a draft Skill. Once published it cannot be modified. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str skill_id: (required) Unique Skill identifier. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.Skill` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/publish_skill.py.html>`__ to see an example of how to use publish_skill API. """ resource_path = "/odaInstances/{odaInstanceId}/skills/{skillId}/actions/publish" method = "POST" operation_name = "publish_skill" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Skill/PublishSkill" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "publish_skill got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "skillId": skill_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Skill", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Skill", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def rotate_channel_keys(self, oda_instance_id, channel_id, **kwargs): """ This will generate new keys for any generated keys in the Channel (eg. secretKey, verifyToken). If a Channel has no generated keys then no changes will be made. Ensure that you take note of the newly generated keys in the response as they will not be returned again. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str channel_id: (required) Unique Channel identifier. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_retry_token: (optional) A token that uniquely identifies a request so that you can retry the request if there's a timeout or server error without the risk of executing that same action again. Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.CreateChannelResult` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/rotate_channel_keys.py.html>`__ to see an example of how to use rotate_channel_keys API. """ resource_path = "/odaInstances/{odaInstanceId}/channels/{channelId}/actions/rotateKeys" method = "POST" operation_name = "rotate_channel_keys" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Channel/RotateChannelKeys" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "if_match", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "rotate_channel_keys got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "channelId": channel_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="CreateChannelResult", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="CreateChannelResult", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def start_channel(self, oda_instance_id, channel_id, **kwargs): """ Starts a Channel so that it will begin accepting messages. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str channel_id: (required) Unique Channel identifier. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_retry_token: (optional) A token that uniquely identifies a request so that you can retry the request if there's a timeout or server error without the risk of executing that same action again. Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.Channel` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/start_channel.py.html>`__ to see an example of how to use start_channel API. """ resource_path = "/odaInstances/{odaInstanceId}/channels/{channelId}/actions/start" method = "POST" operation_name = "start_channel" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Channel/StartChannel" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "if_match", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "start_channel got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "channelId": channel_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Channel", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Channel", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def stop_channel(self, oda_instance_id, channel_id, **kwargs): """ Stops a Channel so that it will no longer accept messages. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str channel_id: (required) Unique Channel identifier. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_retry_token: (optional) A token that uniquely identifies a request so that you can retry the request if there's a timeout or server error without the risk of executing that same action again. Retry tokens expire after 24 hours, but they can become invalid before then if there are conflicting operations. For example, if an instance was deleted and purged from the system, then the service might reject a retry of the original creation request. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.Channel` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/stop_channel.py.html>`__ to see an example of how to use stop_channel API. """ resource_path = "/odaInstances/{odaInstanceId}/channels/{channelId}/actions/stop" method = "POST" operation_name = "stop_channel" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Channel/StopChannel" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", "if_match", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "stop_channel got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "channelId": channel_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Channel", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, response_type="Channel", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def update_authentication_provider(self, oda_instance_id, authentication_provider_id, update_authentication_provider_details, **kwargs): """ Updates the specified Authentication Provider with the information in the request body. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str authentication_provider_id: (required) Unique Authentication Provider identifier. :param oci.oda.models.UpdateAuthenticationProviderDetails update_authentication_provider_details: (required) Property values to update the Authentication Provider. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.AuthenticationProvider` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/update_authentication_provider.py.html>`__ to see an example of how to use update_authentication_provider API. """ resource_path = "/odaInstances/{odaInstanceId}/authenticationProviders/{authenticationProviderId}" method = "PUT" operation_name = "update_authentication_provider" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/AuthenticationProvider/UpdateAuthenticationProvider" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "update_authentication_provider got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "authenticationProviderId": authentication_provider_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_authentication_provider_details, response_type="AuthenticationProvider", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_authentication_provider_details, response_type="AuthenticationProvider", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def update_channel(self, oda_instance_id, channel_id, update_channel_details, **kwargs): """ Updates the specified Channel with the information in the request body. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str channel_id: (required) Unique Channel identifier. :param oci.oda.models.UpdateChannelDetails update_channel_details: (required) Property values to update the Channel. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.Channel` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/update_channel.py.html>`__ to see an example of how to use update_channel API. """ resource_path = "/odaInstances/{odaInstanceId}/channels/{channelId}" method = "PUT" operation_name = "update_channel" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Channel/UpdateChannel" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "update_channel got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "channelId": channel_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_channel_details, response_type="Channel", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_channel_details, response_type="Channel", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def update_digital_assistant(self, oda_instance_id, digital_assistant_id, update_digital_assistant_details, **kwargs): """ Updates the specified Digital Assistant with the information in the request body. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str digital_assistant_id: (required) Unique Digital Assistant identifier. :param oci.oda.models.UpdateDigitalAssistantDetails update_digital_assistant_details: (required) Property values to update the Digital Assistant. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.DigitalAssistant` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/update_digital_assistant.py.html>`__ to see an example of how to use update_digital_assistant API. """ resource_path = "/odaInstances/{odaInstanceId}/digitalAssistants/{digitalAssistantId}" method = "PUT" operation_name = "update_digital_assistant" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/DigitalAssistant/UpdateDigitalAssistant" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "update_digital_assistant got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "digitalAssistantId": digital_assistant_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_digital_assistant_details, response_type="DigitalAssistant", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_digital_assistant_details, response_type="DigitalAssistant", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def update_digital_assistant_parameter(self, oda_instance_id, digital_assistant_id, parameter_name, update_digital_assistant_parameter_details, **kwargs): """ Updates the specified Digital Assistant Parameter with the information in the request body. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str digital_assistant_id: (required) Unique Digital Assistant identifier. :param str parameter_name: (required) The name of a Digital Assistant Parameter. This is unique with the Digital Assistant. :param oci.oda.models.UpdateDigitalAssistantParameterDetails update_digital_assistant_parameter_details: (required) Property values to update the Digital Assistant Parameter. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.DigitalAssistantParameter` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/update_digital_assistant_parameter.py.html>`__ to see an example of how to use update_digital_assistant_parameter API. """ resource_path = "/odaInstances/{odaInstanceId}/digitalAssistants/{digitalAssistantId}/parameters/{parameterName}" method = "PUT" operation_name = "update_digital_assistant_parameter" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/DigitalAssistantParameter/UpdateDigitalAssistantParameter" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "update_digital_assistant_parameter got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "digitalAssistantId": digital_assistant_id, "parameterName": parameter_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_digital_assistant_parameter_details, response_type="DigitalAssistantParameter", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_digital_assistant_parameter_details, response_type="DigitalAssistantParameter", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def update_skill(self, oda_instance_id, skill_id, update_skill_details, **kwargs): """ Updates the specified Skill with the information in the request body. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str skill_id: (required) Unique Skill identifier. :param oci.oda.models.UpdateSkillDetails update_skill_details: (required) Property values to update the Skill. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.Skill` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/update_skill.py.html>`__ to see an example of how to use update_skill API. """ resource_path = "/odaInstances/{odaInstanceId}/skills/{skillId}" method = "PUT" operation_name = "update_skill" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Skill/UpdateSkill" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "update_skill got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "skillId": skill_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_skill_details, response_type="Skill", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_skill_details, response_type="Skill", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def update_skill_parameter(self, oda_instance_id, skill_id, parameter_name, update_skill_parameter_details, **kwargs): """ Updates the specified Skill Parameter with the information in the request body. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str skill_id: (required) Unique Skill identifier. :param str parameter_name: (required) The name of a Skill Parameter. :param oci.oda.models.UpdateSkillParameterDetails update_skill_parameter_details: (required) Property values to update the Skill Parameter. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.SkillParameter` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/update_skill_parameter.py.html>`__ to see an example of how to use update_skill_parameter API. """ resource_path = "/odaInstances/{odaInstanceId}/skills/{skillId}/parameters/{parameterName}" method = "PUT" operation_name = "update_skill_parameter" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/SkillParameter/UpdateSkillParameter" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "update_skill_parameter got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "skillId": skill_id, "parameterName": parameter_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_skill_parameter_details, response_type="SkillParameter", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_skill_parameter_details, response_type="SkillParameter", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) def update_translator(self, oda_instance_id, translator_id, update_translator_details, **kwargs): """ Updates the specified Translator with the information in the request body. :param str oda_instance_id: (required) Unique Digital Assistant instance identifier. :param str translator_id: (required) Unique Translator identifier. :param oci.oda.models.UpdateTranslatorDetails update_translator_details: (required) Property values to update the Translator. :param str if_match: (optional) For optimistic concurrency control in a PUT or DELETE call for a Digital Assistant instance, set the `if-match` query parameter to the value of the `ETAG` header from a previous GET or POST response for that instance. The service updates or deletes the instance only if the etag that you provide matches the instance's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. This value is included in the opc-request-id response header. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.oda.models.Translator` :rtype: :class:`~oci.response.Response` :example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/update_translator.py.html>`__ to see an example of how to use update_translator API. """ resource_path = "/odaInstances/{odaInstanceId}/translators/{translatorId}" method = "PUT" operation_name = "update_translator" api_reference_link = "https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/Translator/UpdateTranslator" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( "update_translator got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "odaInstanceId": oda_instance_id, "translatorId": translator_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} for (k, v) in six.iteritems(path_params): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_translator_details, response_type="Translator", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, body=update_translator_details, response_type="Translator", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link)
49.714397
261
0.652415
31,372
255,880
5.125749
0.018488
0.054973
0.03161
0.00579
0.953453
0.944815
0.936202
0.926762
0.918448
0.908504
0
0.002475
0.268774
255,880
5,146
262
49.724058
0.856958
0.393442
0
0.842105
0
0.015141
0.18418
0.029695
0
0
0
0
0
1
0.015501
false
0.00036
0.005768
0
0.051911
0.00036
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
2541e097972857e446db1a6e70c78079b8ead205
17,204
py
Python
hanibal/crm_gestion_faces/wizard/reporte_log_crm_prospecto_proceso_exceso_dias.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
null
null
null
hanibal/crm_gestion_faces/wizard/reporte_log_crm_prospecto_proceso_exceso_dias.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
null
null
null
hanibal/crm_gestion_faces/wizard/reporte_log_crm_prospecto_proceso_exceso_dias.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## from openerp import tools from openerp.osv import fields, osv class log_reporte(osv.osv): _name = "reporte.log.crm.prospecto.proceso.exceso.dias" _description = "Dias excedidos" _auto = False _rec_name = 'fecha_iniciativa' _columns = { 'orden':fields.float('Orden', readonly=False,), 'estado': fields.char('estado', readonly=True), 'tipo': fields.char('Iniciativa / Prospecto', readonly=True), 'comercial': fields.char('Comercial', readonly=True), 'ciudad': fields.char('Ciudad', readonly=True), 'prospecto': fields.char('prospecto', readonly=True), 'fecha_iniciativa': fields.datetime('Fecha iniciativa', readonly=True), 'dias_estado': fields.float('Dias', readonly=True,group_operator="sum"), 'titulo': fields.char('Titulo', readonly=True), 'periodo_iniciativa': fields.char('Periodo', readonly=True), 'dias_exceso': fields.float('Exceso', readonly=True,group_operator="sum"), 'observado': fields.char('Observado', readonly=True), 'ganado': fields.char('Ganado', readonly=True), } _order = 'orden desc' def _tabla(self): group_by_strxx1 = """ select 1 orden, ini.id id, '1 Identificar' estado, ini.type tipo, ven.name comercial,ciu.name ciudad,cli.name prospecto, fecha_iniciativa, coalesce(dias_identificar,0) dias_estado, ini.name titulo, to_char(fecha_iniciativa, 'yyyymm') periodo_iniciativa, case when coalesce(dias_identificar,0) <= (select tr.d_identificar from crm_tiempos_procesos_conf as tr) then 0 when coalesce(dias_identificar,0) > (select tr.d_identificar from crm_tiempos_procesos_conf as tr) then coalesce(dias_identificar,0) - (select tr.d_identificar from crm_tiempos_procesos_conf as tr) end dias_exceso, case when coalesce(dias_identificar,0) <= (select tr.d_identificar from crm_tiempos_procesos_conf as tr) then 'NO' when coalesce(dias_identificar,0) > (select tr.d_identificar from crm_tiempos_procesos_conf as tr) then 'SI' end observado, case when cs.name = 'New' then 'Proceso' when cs.name = 'Lost' then 'No' when cs.name = 'Won' then 'Si' else cs.name end ganado from crm_lead as ini left join res_users as usr on (ini.user_id = usr.id ) left join res_partner as ven on ( usr.partner_id = ven.id) inner join res_partner as cli on (ini.partner_id = cli.id ) left join log_crm_gestion as ges on (ini.id = ges.registro_id ) left join ciudades as ciu on (ciu.id = ini.ciudad_id ) left join crm_case_stage cs on (ini.stage_id = cs.id) where ini.user_id = usr.id and usr.partner_id = ven.id and ini.partner_id = cli.id union all select 2 orden, ini.id id, '2 Preparar' estado, ini.type tipo, ven.name comercial,ciu.name ciudad,cli.name prospecto, fecha_iniciativa, coalesce(dias_preparar,0) dias_estado, ini.name titulo, to_char(fecha_iniciativa, 'yyyymm') periodo_iniciativa, case when coalesce(dias_preparar,0) <= (select tr.d_preparar from crm_tiempos_procesos_conf as tr) then 0 when coalesce(dias_preparar,0) > (select tr.d_preparar from crm_tiempos_procesos_conf as tr) then coalesce(dias_preparar,0) - (select tr.d_preparar from crm_tiempos_procesos_conf as tr) end dias_exceso, case when coalesce(dias_preparar,0) <= (select tr.d_preparar from crm_tiempos_procesos_conf as tr) then 'NO' when coalesce(dias_preparar,0) > (select tr.d_preparar from crm_tiempos_procesos_conf as tr) then 'SI' end Observado, case when cs.name = 'New' then 'Proceso' when cs.name = 'Lost' then 'No' when cs.name = 'Won' then 'Si' else cs.name end ganado from crm_lead as ini left join res_users as usr on (ini.user_id = usr.id ) left join res_partner as ven on ( usr.partner_id = ven.id) inner join res_partner as cli on (ini.partner_id = cli.id ) left join log_crm_gestion as ges on (ini.id = ges.registro_id ) left join ciudades as ciu on (ciu.id = ini.ciudad_id ) left join crm_case_stage cs on (ini.stage_id = cs.id) where ini.user_id = usr.id and usr.partner_id = ven.id and ini.partner_id = cli.id union all select 3 orden,ini.id id, '3 Primera Visita' estado, ini.type tipo, ven.name comercial,ciu.name ciudad,cli.name prospecto, fecha_iniciativa, coalesce(dias_primera_visita,0) dias_estado, ini.name titulo, to_char(fecha_iniciativa, 'yyyymm') periodo_iniciativa, case when coalesce(dias_primera_visita,0) <= (select tr.d_primera_visita from crm_tiempos_procesos_conf as tr) then 0 when coalesce(dias_primera_visita,0) > (select tr.d_primera_visita from crm_tiempos_procesos_conf as tr) then coalesce(dias_preparar,0) - (select tr.d_preparar from crm_tiempos_procesos_conf as tr) end dias_exceso, case when coalesce(dias_primera_visita,0) <= (select tr.d_primera_visita from crm_tiempos_procesos_conf as tr) then 'NO' when coalesce(dias_primera_visita,0) > (select tr.d_primera_visita from crm_tiempos_procesos_conf as tr) then 'SI' end Observado , case when cs.name = 'New' then 'Proceso' when cs.name = 'Lost' then 'No' when cs.name = 'Won' then 'Si' else cs.name end ganado from crm_lead as ini left join res_users as usr on (ini.user_id = usr.id ) left join res_partner as ven on ( usr.partner_id = ven.id) inner join res_partner as cli on (ini.partner_id = cli.id ) left join log_crm_gestion as ges on (ini.id = ges.registro_id ) left join ciudades as ciu on (ciu.id = ini.ciudad_id ) left join crm_case_stage cs on (ini.stage_id = cs.id) where ini.user_id = usr.id and usr.partner_id = ven.id and ini.partner_id = cli.id union all select 4 orden,ini.id id, '4 Seguimiento' estado, ini.type tipo, ven.name comercial,ciu.name ciudad,cli.name prospecto, fecha_iniciativa, coalesce(dias_seguimiento,0) dias_estado, ini.name titulo, to_char(fecha_iniciativa, 'yyyymm') periodo_iniciativa, case when coalesce(dias_seguimiento,0) <= (select tr.d_seguimiento from crm_tiempos_procesos_conf as tr) then 0 when coalesce(dias_seguimiento,0) > (select tr.d_seguimiento from crm_tiempos_procesos_conf as tr) then coalesce(dias_seguimiento,0) - (select tr.d_seguimiento from crm_tiempos_procesos_conf as tr) end dias_exceso, case when coalesce(dias_seguimiento,0) <= (select tr.d_seguimiento from crm_tiempos_procesos_conf as tr) then 'NO' when coalesce(dias_seguimiento,0) > (select tr.d_seguimiento from crm_tiempos_procesos_conf as tr) then 'SI' end Observado, case when cs.name = 'New' then 'Proceso' when cs.name = 'Lost' then 'No' when cs.name = 'Won' then 'Si' else cs.name end ganado from crm_lead as ini left join res_users as usr on (ini.user_id = usr.id ) left join res_partner as ven on ( usr.partner_id = ven.id) inner join res_partner as cli on (ini.partner_id = cli.id ) left join log_crm_gestion as ges on (ini.id = ges.registro_id ) left join ciudades as ciu on (ciu.id = ini.ciudad_id ) left join crm_case_stage cs on (ini.stage_id = cs.id) where ini.user_id = usr.id and usr.partner_id = ven.id and ini.partner_id = cli.id union all select 5 orden,ini.id id, '5 Pruebas' estado, ini.type tipo, ven.name comercial,ciu.name ciudad,cli.name prospecto, fecha_iniciativa, coalesce(dias_pruebas,0) dias_estado, ini.name titulo, to_char(fecha_iniciativa, 'yyyymm') periodo_iniciativa, case when coalesce(dias_pruebas,0) <= (select tr.d_pruebas from crm_tiempos_procesos_conf as tr) then 0 when coalesce(dias_pruebas,0) > (select tr.d_pruebas from crm_tiempos_procesos_conf as tr) then coalesce(dias_pruebas,0) - (select tr.d_pruebas from crm_tiempos_procesos_conf as tr) end dias_exceso, case when coalesce(dias_pruebas,0) <= (select tr.d_pruebas from crm_tiempos_procesos_conf as tr) then 'NO' when coalesce(dias_pruebas,0) > (select tr.d_pruebas from crm_tiempos_procesos_conf as tr) then 'SI' end Observado, case when cs.name = 'New' then 'Proceso' when cs.name = 'Lost' then 'No' when cs.name = 'Won' then 'Si' else cs.name end ganado from crm_lead as ini left join res_users as usr on (ini.user_id = usr.id ) left join res_partner as ven on ( usr.partner_id = ven.id) inner join res_partner as cli on (ini.partner_id = cli.id ) left join log_crm_gestion as ges on (ini.id = ges.registro_id ) left join ciudades as ciu on (ciu.id = ini.ciudad_id ) left join crm_case_stage cs on (ini.stage_id = cs.id) where ini.user_id = usr.id and usr.partner_id = ven.id and ini.partner_id = cli.id union all select 6 orden,ini.id id, '6 Oferta' estado, ini.type tipo, ven.name comercial,ciu.name ciudad,cli.name prospecto, fecha_iniciativa, coalesce(dias_oferta,0) dias_estado, ini.name titulo, to_char(fecha_iniciativa, 'yyyymm') periodo_iniciativa, case when coalesce(dias_oferta,0) <= (select tr.d_oferta from crm_tiempos_procesos_conf as tr) then 0 when coalesce(dias_oferta,0) > (select tr.d_oferta from crm_tiempos_procesos_conf as tr) then coalesce(dias_oferta,0) - (select tr.d_oferta from crm_tiempos_procesos_conf as tr) end dias_exceso, case when coalesce(dias_oferta,0) <= (select tr.d_oferta from crm_tiempos_procesos_conf as tr) then 'NO' when coalesce(dias_oferta,0) > (select tr.d_oferta from crm_tiempos_procesos_conf as tr) then 'SI' end Observado, case when cs.name = 'New' then 'Proceso' when cs.name = 'Lost' then 'No' when cs.name = 'Won' then 'Si' else cs.name end ganado from crm_lead as ini left join res_users as usr on (ini.user_id = usr.id ) left join res_partner as ven on ( usr.partner_id = ven.id) inner join res_partner as cli on (ini.partner_id = cli.id ) left join log_crm_gestion as ges on (ini.id = ges.registro_id ) left join ciudades as ciu on (ciu.id = ini.ciudad_id ) left join crm_case_stage cs on (ini.stage_id = cs.id) where ini.user_id = usr.id and usr.partner_id = ven.id and ini.partner_id = cli.id and ges.estado = 'Oferta' union all select 7 orden,ini.id id, '7 Negociacion'estado, ini.type tipo, ven.name comercial,ciu.name ciudad,cli.name prospecto, fecha_iniciativa, coalesce(dias_negociacion,0) dias_estado, ini.name titulo, to_char(fecha_iniciativa, 'yyyymm') periodo_iniciativa, case when coalesce(dias_negociacion,0) <= (select tr.d_negociacion from crm_tiempos_procesos_conf as tr) then 0 when coalesce(dias_negociacion,0) > (select tr.d_negociacion from crm_tiempos_procesos_conf as tr) then coalesce(dias_negociacion,0) - (select tr.d_negociacion from crm_tiempos_procesos_conf as tr) end dias_exceso, case when coalesce(dias_negociacion,0) <= (select tr.d_negociacion from crm_tiempos_procesos_conf as tr) then 'NO' when coalesce(dias_negociacion,0) > (select tr.d_negociacion from crm_tiempos_procesos_conf as tr) then 'SI' end Observado, case when cs.name = 'New' then 'Proceso' when cs.name = 'Lost' then 'No' when cs.name = 'Won' then 'Si' else cs.name end ganado from crm_lead as ini left join res_users as usr on (ini.user_id = usr.id ) left join res_partner as ven on ( usr.partner_id = ven.id) inner join res_partner as cli on (ini.partner_id = cli.id ) left join log_crm_gestion as ges on (ini.id = ges.registro_id ) left join ciudades as ciu on (ciu.id = ini.ciudad_id ) left join crm_case_stage cs on (ini.stage_id = cs.id) where ini.user_id = usr.id and usr.partner_id = ven.id and ini.partner_id = cli.id order by 7,1 """ return group_by_strxx1 def init(self, cr): # self._table = sale_report tools.drop_view_if_exists(cr, self._table) cr.execute("""CREATE or REPLACE VIEW %s as ( %s )""" % (self._table, self._tabla())) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
46.497297
90
0.53319
2,085
17,204
4.217266
0.097362
0.057318
0.035824
0.039804
0.813147
0.8053
0.80166
0.793927
0.793927
0.793927
0
0.0076
0.388166
17,204
369
91
46.623306
0.82776
0.050744
0
0.801917
0
0
0.932524
0.13687
0
0
0
0
0
1
0.00639
false
0
0.00639
0
0.038339
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
c27b7326b81e988bc52386ad7da3a4ebadb984b5
26,660
py
Python
server/worker.py
ya13241ba/ProudPortal
3eb3e4408c0bb94c4a7be5de55c62ad59dfedc1a
[ "MIT" ]
null
null
null
server/worker.py
ya13241ba/ProudPortal
3eb3e4408c0bb94c4a7be5de55c62ad59dfedc1a
[ "MIT" ]
null
null
null
server/worker.py
ya13241ba/ProudPortal
3eb3e4408c0bb94c4a7be5de55c62ad59dfedc1a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Grant Drake <grant.drake@gmail.com>' __docformat__ = 'restructuredtext en' import json, socket, re, datetime from threading import Thread from lxml.html import fromstring, tostring from models import ItemsMelon from models import ItemsDLSite from models import ItemsFanza class WorkerCommon(Thread): def __init__(self, browser, url, search_item, relevance, result_queue, timeout): Thread.__init__(self) self.daemon = True self.browser = browser.clone_browser() self.url = url self.search_item = search_item self.relevance = relevance self.result_queue = result_queue self.timeout = timeout self.ID = "" self.title = "" self.authors = [] # self.isbn = "" self.comments = "" self.cover_url = "" self.has_cover = False self.tags = [] self.gunre = "" self.monopoly = False self.pubdate = "" self.publisher = "" self.event = "" def createRecord(self, itemsClass): authname = "" for authIdx, authElem in enumerate(self.authors): if(authIdx != 0): authname = authname + ' & ' authname = authname + authElem tagname = "" for tagIdx, tagElem in enumerate(self.tags): if(tagIdx != 0): tagname = tagname + ', ' tagname = tagname + tagElem pubdateF = "" if self.pubdate: pubdateF = datetime.datetime.strptime(self.pubdate, "%Y/%m/%d").date() record = itemsClass( item_id = self.ID, title = self.title, authors = authname, comments = self.comments, cover_url = self.cover_url, has_cover = self.has_cover, tags = tagname, gunre = self.gunre, monopoly = self.monopoly, pubdate = pubdateF, publisher = self.publisher, event = self.event, ) return record def printMetadata(self): authname = "" for authIdx, authElem in enumerate(self.authors): if(authIdx != 0): authname = authname + ' & ' authname = authname + authElem tagname = "" for tagIdx, tagElem in enumerate(self.tags): if(tagIdx != 0): tagname = tagname + ', ' tagname = tagname + tagElem print("") print("*********************************************************") print(" SEQ : " + str(self.relevance)) print(" ID : " + self.ID) print(" TITLE : " + self.title) print(" AUTHORS : " + authname) # self.isbn = "" print(" COMMENT : " + self.comments) print(" TAGS : " + tagname) print(" GUNRE : " + self.gunre) print(" SENBAI : " + str(self.monopoly)) print(" PUBDATE : " + self.pubdate) print(" PUBLISH : " + self.publisher) print(" URL : " + self.url) print(" COVER : " + self.cover_url) print(" EVENT : " + self.event) print("*********************************************************") class WorkerFanza(WorkerCommon): # Get details ''' Get book details from Fanza book page in a separate thread ''' def __init__(self, browser, url, search_item, relevance, result_queue, timeout=40): super(WorkerFanza, self).__init__(browser, url, search_item, relevance, result_queue, timeout) def createRecord(self): record = super(WorkerFanza, self).createRecord(ItemsFanza) return record def run(self): try: self.get_details() except Exception as e: print('get_details failed for url: %r'%self.url) print(e) def get_details(self): try: print('Fanza book url: %r'%self.url) raw = self.browser.open_novisit(self.url, timeout=self.timeout).read().strip() except Exception as e: if e.getcode() == 404: print('URL malformed: %r'%self.url) return attr = getattr(e, 'args', [None]) attr = attr if attr else [None] if isinstance(attr[0], socket.timeout): msg = 'Fanza timed out. Try again later.' print(msg) else: msg = 'Failed to make details query: %r'%self.url print(msg) return raw = raw.decode('utf-8', errors='replace') if '<title>404 - ' in raw: print('URL malformed: %r'%self.url) return try: root = fromstring(raw) except: msg = 'Failed to parse Fanza details page: %r'%self.url print(msg) return self.parse_details( root, self.search_item ) def parse_details(self, root, search_item): try: self.ID = self.parse_id(self.url) except: print('Error parsing Fanza id for url: %r'%self.url) self.ID = "" try: self.title = self.parse_title(root) except: print('Error parsing title for url: %r'%self.url) self.title = "" try: self.authors = self.parse_authors(root) except: print('Error parsing authors for url: %r'%self.url) self.authors = [] if not self.title or not self.ID: print('Could not find title/dlsite id for %r'%self.url) print('Fanza: %r Title: %r'%(self.ID, self.title)) return try: self.comments = self.parse_comments(root) except: print('Error parsing comments for url: %r'%self.url) self.comments = "" try: self.cover_url = self.parse_cover(root) # print('INFO cover for: %r'%self.cover_url) except: print('Error parsing cover for url: %r'%self.url) self.cover_url = "" self.has_cover = bool(self.cover_url) try: self.tags = self.parse_tags(root) except: print('Error parsing tags for url: %r'%self.url) self.tags = [] try: self.gunre = self.parse_gunre(root) except: print('Error parsing gunre for url: %r'%self.url) self.gunre = "" try: self.monopoly = self.parse_monopoly(root) except: print('Error parsing monopoly for url: %r'%self.url) self.monopoly = "" try: self.pubdate = self.parse_publish_date(root) # print('INFO pubdate for: %r'%self.pubdate) except: print('Error parsing publish date for url: %r'%self.url) self.pubdate = "" try: self.publisher = self.parse_publisher(root) except: print('Error parsing publisher for url: %r'%self.url) self.publisher = "" try: self.event = self.parse_event(root) except: print('Error parsing event for url: %r'%self.url) self.event = "" self.result_queue.append( self ) def parse_id(self, url): return re.search('/dc/doujin/-/detail/=/cid=(.*)/', url).groups(0)[0] def parse_title(self, root): title_nodes = root.xpath('//meta[@property="og:title"]/@content') if title_nodes: return title_nodes[0].strip() return "" def parse_authors(self, root): authors_nodes = "" # authors_nodes = root.xpath('//*[@id="description"]/table//th[contains(text(), "作家名")]/following-sibling::td/a') # # if authors_nodes: # tmp_authors_array = [] # for i, node in enumerate( authors_nodes, 0 ): # tmp_authors_array.append( node.text_content().strip() ) # return tmp_authors_array # # return self.parse_publisher(root) return "" def parse_comments(self, root): # description_node = root.xpath('//*[@id="description"]/table//th[contains(text(), "イベント")]/following-sibling::td/a') # if description_node: # comments = tostring(description_node[0], method='text',encoding=unicode).strip() # while comments.find(' ') >= 0: # comments = comments.replace(' ',' ') # # Since sanitize strips out line breaks, we will leave this commented out for now... # #comments = sanitize_comments_html(comments) # return comments return "" def parse_cover(self, root): imgcol_node = root.xpath('//li[@class="productPreview__item"]//img/@src') if imgcol_node: img_url = imgcol_node[0].strip() return img_url return "" def parse_gunre(self, root): gunre_nodes = root.xpath('//ul[@class="productAttribute-list"]//span[contains(@class,"c_icon_productGenre")]') if gunre_nodes: return gunre_nodes[0].text_content().strip() return "" def parse_monopoly(self, root): monopoly_nodes = root.xpath('//ul[@class="productAttribute-list"]//span[contains(text(),"専売")]') if monopoly_nodes: return True return False def parse_publish_date(self, root): pub_date_node = root.xpath('//div[@class="productInformation__item"]//dt[contains(text(), "配信開始日")]/following-sibling::dd') if pub_date_node: pub_date_text = pub_date_node[0].text_content().strip() if pub_date_text[0] == '2': pub_date_text = pub_date_text.replace('年', '/').replace('月', '/').replace('日', '')[:10] return pub_date_text return "" def parse_publisher(self, root): publisher_nodes = root.xpath('//div[@class="circleName"]//a[@class="circleName__txt"]') if publisher_nodes: return publisher_nodes[0].text_content().strip() return "" # UNUSE def parse_publisher_url(self, root): publisher_urls = root.xpath('//div[@class="circleName"]//a[@class="circleName__txt"]/@href') if publisher_urls: return publisher_urls[0].strip() return "" def parse_tags(self, root): tag_list = list() tag_nodes = root.xpath('//ul[@class="genreTagList"]//li//a') if tag_nodes: tag_list = [ tag_node.text_content().strip() for tag_node in tag_nodes ] return tag_list return tag_list def parse_event(self, root): event_node = root.xpath('//*[@id="work_outline"]//th[contains(text(), "イベント")]/following-sibling::td//a') if event_node: return event_node[0].text_content().strip() return "" class WorkerDLSite(WorkerCommon): # Get details ''' Get book details from Melonbooks book page in a separate thread ''' def __init__(self, browser, url, search_item, relevance, result_queue, timeout=40): super(WorkerDLSite, self).__init__(browser, url, search_item, relevance, result_queue, timeout) def createRecord(self): record = super(WorkerDLSite, self).createRecord(ItemsDLSite) return record def run(self): try: self.get_details() except Exception as e: print('get_details failed for url: %r'%self.url) print(e) def get_details(self): try: print('Dlsite book url: %r'%self.url) self.browser.set_simple_cookie('AUTH_ADULT','1','www.melonbooks.co.jp') raw = self.browser.open_novisit(self.url, timeout=self.timeout).read().strip() except Exception as e: if e.getcode() == 404: print('URL malformed: %r'%self.url) return attr = getattr(e, 'args', [None]) attr = attr if attr else [None] if isinstance(attr[0], socket.timeout): msg = 'Dlsite timed out. Try again later.' print(msg) else: msg = 'Failed to make details query: %r'%self.url print(msg) return raw = raw.decode('utf-8', errors='replace') if '<title>404 - ' in raw: print('URL malformed: %r'%self.url) return try: root = fromstring(raw) except: msg = 'Failed to parse dlsite details page: %r'%self.url print(msg) return self.parse_details( root, self.search_item ) def parse_details(self, root, search_item): try: self.ID = self.parse_id(self.url) except: print('Error parsing dlsite id for url: %r'%self.url) self.ID = "" try: self.title = self.parse_title(root) except: print('Error parsing title for url: %r'%self.url) self.title = "" try: self.authors = self.parse_authors(root) except: print('Error parsing authors for url: %r'%self.url) self.authors = [] if not self.title or not self.ID: print('Could not find title/dlsite id for %r'%self.url) print('Melonbooks: %r Title: %r'%(self.ID, self.title)) return try: self.comments = self.parse_comments(root) except: print('Error parsing comments for url: %r'%self.url) self.comments = "" try: self.cover_url = self.parse_cover(root) # print('INFO cover for: %r'%self.cover_url) except: print('Error parsing cover for url: %r'%self.url) self.cover_url = "" self.has_cover = bool(self.cover_url) try: self.tags = self.parse_tags(root) except: print('Error parsing tags for url: %r'%self.url) self.tags = [] try: self.gunre = self.parse_gunre(root) except: print('Error parsing gunre for url: %r'%self.url) self.gunre = "" try: self.monopoly = self.parse_monopoly(root) except: print('Error parsing monopoly for url: %r'%self.url) self.monopoly = "" try: self.pubdate = self.parse_publish_date(root) # print('INFO pubdate for: %r'%self.pubdate) except: print('Error parsing publish date for url: %r'%self.url) self.pubdate = "" try: self.publisher = self.parse_publisher(root) except: print('Error parsing publisher for url: %r'%self.url) self.publisher = "" try: self.event = self.parse_event(root) except: print('Error parsing event for url: %r'%self.url) self.event = "" self.result_queue.append( self ) def parse_id(self, url): return re.search('/maniax/work/=/product_id/(.*)\.html', url).groups(0)[0] def parse_title(self, root): title_nodes = root.xpath('//h1[@id="work_name"]') if title_nodes: return title_nodes[0].text_content().strip() return "" def parse_authors(self, root): authors_nodes = "" # authors_nodes = root.xpath('//*[@id="description"]/table//th[contains(text(), "作家名")]/following-sibling::td/a') # # if authors_nodes: # tmp_authors_array = [] # for i, node in enumerate( authors_nodes, 0 ): # tmp_authors_array.append( node.text_content().strip() ) # return tmp_authors_array # # return self.parse_publisher(root) return "" def parse_comments(self, root): # description_node = root.xpath('//*[@id="description"]/table//th[contains(text(), "イベント")]/following-sibling::td/a') # if description_node: # comments = tostring(description_node[0], method='text',encoding=unicode).strip() # while comments.find(' ') >= 0: # comments = comments.replace(' ',' ') # # Since sanitize strips out line breaks, we will leave this commented out for now... # #comments = sanitize_comments_html(comments) # return comments return "" def parse_cover(self, root): imgcol_node = ''.join(root.xpath('//*[@id="work_left"]//li[@class="slider_item active"]/img/@src')) if imgcol_node: img_url = 'https:' + imgcol_node.strip() return img_url return "" def parse_gunre(self, root): gunre_nodes = root.xpath('//*[@id="work_outline"]//th[contains(text(), "作品形式")]/following-sibling::td//a') if gunre_nodes: return gunre_nodes[0].text_content().strip() return "" def parse_monopoly(self, root): monopoly_nodes = root.xpath('//div[@id="top_wrapper"]//span[contains(text(), "専売")]') if monopoly_nodes: return True return False def parse_publish_date(self, root): pub_date_node = root.xpath('//*[@id="work_outline"]//th[contains(text(), "販売日")]/following-sibling::td/a') if pub_date_node: pub_date_text = pub_date_node[0].text_content().strip() if pub_date_text[0] == '2': pub_date_text = pub_date_text.replace('年', '/').replace('月', '/').replace('日', '')[:10] return pub_date_text return "" def parse_publisher(self, root): publisher_nodes = root.xpath('//*[@id="work_maker"]//*[@class="maker_name"]/a') if publisher_nodes: return publisher_nodes[0].text_content().strip() return "" # UNUSE def parse_publisher_url(self, root): publisher_urls = root.xpath('//*[@id="work_maker"]//*[@class="maker_name"]/a/@href') if publisher_urls: return publisher_urls[0].strip() return "" def parse_tags(self, root): # Melonbooks has multiple optional sections which can be used as tags depending on the user's preference. calibre_tags = list() return calibre_tags def parse_event(self, root): event_node = root.xpath('//*[@id="work_outline"]//th[contains(text(), "イベント")]/following-sibling::td//a') if event_node: return event_node[0].text_content().strip() return "" class WorkerMelon(WorkerCommon): # Get details ''' Get book details from Melonbooks book page in a separate thread ''' def __init__(self, browser, url, search_item, relevance, result_queue, timeout=40): super(WorkerMelon, self).__init__(browser, url, search_item, relevance, result_queue, timeout) def createRecord(self): record = super(WorkerMelon, self).createRecord(ItemsMelon) return record def run(self): try: self.get_details() except Exception as e: print('get_details failed for url: %r'%self.url) print(e) def get_details(self): try: print('Melonbooks book url: %r'%self.url) self.browser.set_simple_cookie('AUTH_ADULT','1','www.melonbooks.co.jp') raw = self.browser.open_novisit(self.url, timeout=self.timeout).read().strip() except Exception as e: if e.getcode() == 404: print('URL malformed: %r'%self.url) return attr = getattr(e, 'args', [None]) attr = attr if attr else [None] if isinstance(attr[0], socket.timeout): msg = 'Melonbooks timed out. Try again later.' print(msg) else: msg = 'Failed to make details query: %r'%self.url print(msg) return raw = raw.decode('utf-8', errors='replace') if '<title>404 - ' in raw: print('URL malformed: %r'%self.url) return try: root = fromstring(raw) except: msg = 'Failed to parse melonbooks details page: %r'%self.url print(msg) return self.parse_details( root, self.search_item ) def parse_details(self, root, search_item): try: self.ID = self.parse_id(self.url) except: print('Error parsing melon id for url: %r'%self.url) self.ID = "" try: self.title = self.parse_title(root) except: print('Error parsing title for url: %r'%self.url) self.title = "" try: self.authors = self.parse_authors(root) except: print('Error parsing authors for url: %r'%self.url) self.authors = [] if not self.title or not self.ID: print('Could not find title/authors/melon id for %r'%self.url) print('Melonbooks: %r Title: %r Authors: %r'%(self.ID, self.title, self.authors)) return try: self.comments = self.parse_comments(root) except: print('Error parsing comments for url: %r'%self.url) self.comments = "" try: self.cover_url = self.parse_cover(root) # print('INFO cover for: %r'%self.cover_url) except: print('Error parsing cover for url: %r'%self.url) self.cover_url = "" self.has_cover = bool(self.cover_url) try: self.tags = self.parse_tags(root) except: print('Error parsing tags for url: %r'%self.url) self.tags = [] try: self.gunre = self.parse_gunre(root) except: print('Error parsing gunre for url: %r'%self.url) self.gunre = "" try: self.monopoly = self.parse_monopoly(root) except: print('Error parsing monopoly for url: %r'%self.url) self.monopoly = "" try: self.pubdate = self.parse_publish_date(root) # print('INFO pubdate for: %r'%self.pubdate) except: print('Error parsing publish date for url: %r'%self.url) self.pubdate = "" try: self.publisher = self.parse_publisher(root) except: print('Error parsing publisher for url: %r'%self.url) self.publisher = "" try: self.event = self.parse_event(root) except: print('Error parsing event for url: %r'%self.url) self.event = "" self.result_queue.append( self ) def parse_id(self, url): return re.search('\/detail\/detail\.php\?product_id=(.*)', url).groups(0)[0] def parse_title(self, root): title_nodes = root.xpath('//*[@id="description"]/table//th[contains(text(), "タイトル")]/following-sibling::td') # print('[DEBUG] Title Parse result : %s'%(len(title_nodes))) if title_nodes: return title_nodes[0].text_content().strip() return "" def parse_authors(self, root): authors_nodes = root.xpath('//*[@id="description"]/table//th[contains(text(), "作家名")]/following-sibling::td/a') if authors_nodes: tmp_authors_array = [] for i, node in enumerate( authors_nodes, 0 ): tmp_authors_array.append( node.text_content().strip() ) return tmp_authors_array return self.parse_publisher(root) def parse_comments(self, root): # description_node = root.xpath('//*[@id="description"]/table//th[contains(text(), "イベント")]/following-sibling::td/a') # if description_node: # comments = tostring(description_node[0], method='text',encoding=unicode).strip() # while comments.find(' ') >= 0: # comments = comments.replace(' ',' ') # # Since sanitize strips out line breaks, we will leave this commented out for now... # #comments = sanitize_comments_html(comments) # return comments return "" def parse_cover(self, root): imgcol_node = ''.join(root.xpath('//div[@id="main"]/div[1]//img/@src')) if imgcol_node: img_url = 'https:' + imgcol_node.strip().split('&width')[0] return img_url return "" def parse_gunre(self, root): gunre_nodes = root.xpath('//li[contains(@itemtype ,"Breadcrumb")]//a') if gunre_nodes: return gunre_nodes[len(gunre_nodes)-1].text_content().strip() return "" def parse_monopoly(self, root): monopoly_nodes = root.xpath('//div[@id="title"]//span[contains(text(), "専売")]') if monopoly_nodes: return True return False def parse_publish_date(self, root): pub_date_node = root.xpath('//*[@id="description"]/table//th[contains(text(), "発行日")]/following-sibling::td') # pub_date_node = root.xpath('//*[@id="work_outline"]/tbody/tr')[0].get("id") # print('INFO pubdate for: %r'%pub_date_node) if pub_date_node: pub_date_text = pub_date_node[0].text_content().strip() if pub_date_text[0] == '2': return pub_date_text return "" def parse_publisher(self, root): publisher_nodes = root.xpath('//*[@id="description"]/table//th[contains(text(), "サークル名")]/following-sibling::td/a') if publisher_nodes: return publisher_nodes[0].text_content().strip() return "" def parse_tags(self, root): tag_list = list() # tag_nodes = root.xpath('//ul[@class="genreTagList"]//li//a') # if tag_nodes: # tag_list = [ tag_node.text_content().strip() for tag_node in tag_nodes ] # return tag_list return tag_list def parse_event(self, root): description_node = root.xpath('//*[@id="description"]/table//th[contains(text(), "イベント")]/following-sibling::td/a') if description_node: comments = tostring(description_node[0], method='text',encoding=unicode).strip() while comments.find(' ') >= 0: comments = comments.replace(' ',' ') # Since sanitize strips out line breaks, we will leave this commented out for now... #comments = sanitize_comments_html(comments) return comments return ""
34.533679
131
0.553526
3,068
26,660
4.670795
0.093872
0.031752
0.030147
0.029937
0.850384
0.844034
0.83873
0.830147
0.82596
0.804606
0
0.00507
0.312003
26,660
771
132
34.57847
0.776197
0.121305
0
0.773852
0
0.017668
0.173331
0.074181
0
0
0
0
0
1
0.09364
false
0
0.012367
0.010601
0.25265
0.14311
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
c27cbaedf07e56f7500864ba7d8946d55b6b8239
219
py
Python
__init__.py
jqueguiner/haven
7b2a5d46b08f48f1112f8903f1b97c6adadff3f4
[ "Apache-2.0" ]
26
2020-01-09T14:28:28.000Z
2020-08-09T08:03:08.000Z
__init__.py
jqueguiner/haven
7b2a5d46b08f48f1112f8903f1b97c6adadff3f4
[ "Apache-2.0" ]
null
null
null
__init__.py
jqueguiner/haven
7b2a5d46b08f48f1112f8903f1b97c6adadff3f4
[ "Apache-2.0" ]
6
2020-02-11T19:43:50.000Z
2020-05-12T01:59:59.000Z
from .haven import haven_utils from .haven import haven_results from .haven import haven_jupyter from .haven import haven_exps from .haven import haven_chk from .haven import haven_img from .haven import haven_dropbox
24.333333
32
0.835616
35
219
5.028571
0.285714
0.357955
0.596591
0.795455
0
0
0
0
0
0
0
0
0.13242
219
8
33
27.375
0.926316
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
c2a9246b8b4ddeb2e9e6f99213a292a0b768f519
101
py
Python
modules/encoders/__init__.py
tom-pelsmaeker/vae-lagging-encoder
b190239019a94c85858d188a0853886eb48ce4be
[ "MIT" ]
173
2018-12-21T16:34:04.000Z
2022-02-22T08:47:28.000Z
modules/encoders/__init__.py
tom-pelsmaeker/vae-lagging-encoder
b190239019a94c85858d188a0853886eb48ce4be
[ "MIT" ]
11
2019-01-12T22:15:20.000Z
2020-09-21T03:34:42.000Z
modules/encoders/__init__.py
tom-pelsmaeker/vae-lagging-encoder
b190239019a94c85858d188a0853886eb48ce4be
[ "MIT" ]
28
2019-01-03T16:11:41.000Z
2021-02-17T20:28:04.000Z
from .enc_lstm import * from .enc_mix import * from .enc_resnet import * from .enc_resnet_v2 import *
25.25
28
0.772277
17
101
4.294118
0.411765
0.383562
0.534247
0.520548
0
0
0
0
0
0
0
0.011628
0.148515
101
4
28
25.25
0.837209
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
6c3de2bfb8edd4ce2b7eaa7c4a7d26f7ae7e865f
42,627
py
Python
Run.py
Aristochi/Dangerous_driving_behavior_detection
596d0544c3ed8cbfbc322cc4cd7859a9ef539810
[ "MIT" ]
96
2020-03-14T10:17:34.000Z
2022-03-29T03:46:35.000Z
Run.py
ardorG-ai/Dangerous_driving_behavior_detection
596d0544c3ed8cbfbc322cc4cd7859a9ef539810
[ "MIT" ]
6
2020-09-15T05:56:15.000Z
2022-03-25T01:28:12.000Z
Run.py
ardorG-ai/Dangerous_driving_behavior_detection
596d0544c3ed8cbfbc322cc4cd7859a9ef539810
[ "MIT" ]
25
2020-04-12T11:40:27.000Z
2022-01-24T02:56:35.000Z
import datetime from PyQt5 import QtWidgets from qimage2ndarray.dynqt import QtGui from mtcnn.detector import detect_faces, show_bboxes, get_face_expression, get_head_pose, get_emotion, get_face_state from MainWindow import Ui_MainWindow import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog from PyQt5.QtCore import QTimer, QCoreApplication, QDateTime from PyQt5.QtGui import QPixmap, QImage, QTextCursor import qimage2ndarray from torch.autograd import * from detection import * import os # os.environ["CUDA_VISIBLE_DEVICES"] = "-1" from ssd_net_vgg import * from voc0712 import * import torch import torch.nn as nn import numpy as np import cv2 import utils import torch.backends.cudnn as cudnn import time class CameraShow(QMainWindow, Ui_MainWindow): def __del__(self): try: self.camera.release() # 释放资源 except: return def __init__(self, parent=None): super(CameraShow, self).__init__(parent) self.setupUi(self) self.Timer = QTimer() self.timer = QTimer() self.time_first = time.time() self.time_ing = time.time() self.Timer.timeout.connect(self.show_img) self.timer.timeout.connect(self.showTime) self.PrepCamera() self.PrepareTorch() self.CallBackFunctions() self.showTime() self.case = 0 self.frag_cap = True # self.Timer.timeout.connect(self.TimerOutFun) self.video_flg = True self.colors_tableau = [(214, 39, 40), (23, 190, 207), (188, 189, 34), (188, 34, 188), (205, 108, 8), (150, 34, 188), (105, 108, 8)] # 初始化网络 self.net = SSD() self.net = torch.nn.DataParallel(self.net) self.net.train(mode=False) # net.load_state_dict(torch.load('./weights/ssd300_VOC_100000.pth',map_location=lambda storage,loc: storage)) # self.net.load_state_dict( # torch.load('./weights/final_20200226_VOC_100000.pth', map_location=lambda storage, loc: storage)) self.net.load_state_dict(torch.load('./weights/final_20200226_VOC_100000.pth',map_location=lambda storage, loc: storage.cuda(0))) device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") self.net.to(device) if torch.cuda.is_available(): self.net = self.net.cuda() cudnn.benchmark = True self.net = self.net.cuda() self.img_mean = (104.0, 117.0, 123.0) self.max_fps = 0 filename = ('E:\PythonEye\Dataset\\3-FemaleGlasses.mp4') # 保存检测结果的List # 眼睛和嘴巴都是,张开为‘1’,闭合为‘0’ self.Image_num = 0 self.RecordPath = 'E:/PythonEye/DachuangProject/test/3-FemaleGlasses.mp4' self.VideoPath.setText(self.RecordPath) self.isRecordImg = False self.EMOTIONS = ["生气", "厌恶", "害怕", "喜悦", "悲伤", "惊讶", "普通"] # prepare def PrepCamera(self): try: self.camera = cv2.VideoCapture(0) self.Image_num = 0 self.Msg.clear() self.Msg.append('Oboard camera connected.') self.Msg.setPlainText() self.showTime() except Exception as e: self.Msg.clear() self.Msg.append(str(e)) def CallBackFunctions(self): self.BtnRecord.clicked.connect(self.setRecordImg) self.btntestcamera.clicked.connect(self.testCamera) # self.StopBt.clicked.connect(self.StopCamera) self.btn_start.clicked.connect(self.StartDection) self.btnexit.clicked.connect(self.ExitApp) self.btn_testvideo.clicked.connect(self.testVideo) self.BtnReadvideo.clicked.connect(self.setFilePath) # 显示时间 def showTime(self): # time = QDateTime.currentDateTime() now_time = datetime.datetime.now() self.timer.start() # timeDisplay = time.toString("yyyy-MM-dd hh:mm:ss dddd") hour = now_time.strftime('%H') minute = now_time.strftime('%M') second = now_time.strftime('%S') self.TimeHourLCD.display(hour) self.TimeMinuteLCD.display(minute) self.TimeSecondLCD.display(second) def ColorAdjust(self, img): try: B = img[:, :, 0] G = img[:, :, 1] R = img[:, :, 2] img1 = img img1[:, :, 0] = B img1[:, :, 1] = G img1[:, :, 2] = R return img1 except Exception as e: self.Msg.setPlainText(str(e)) # 打开相机 def testCamera(self): # self.camera = cv2.VideoCapture(0) if self.Timer.isActive() == False: flag = self.camera.open(0) if flag == False: msg = QtWidgets.QMessageBox.warning(self, u"Warning", u"请检测相机与电脑是否连接正确", buttons=QtWidgets.QMessageBox.Ok, defaultButton=QtWidgets.QMessageBox.Ok) else: self.case = 1 self.timelb = time.clock() self.btntestcamera.setText(u'关闭相机') self.btn_start.setEnabled(False) self.btn_testvideo.setEnabled(False) self.Image_num = 0 self.Timer.start(30) else: self.Timer.stop() self.camera.release() # self.Camera.clear() self.Camera_2.clear() self.btntestcamera.setText(u'打开相机') self.btn_start.setEnabled(True) self.btn_testvideo.setEnabled(True) def PrepareTorch(self): if torch.cuda.is_available(): print('-----gpu mode-----') torch.set_default_tensor_type('torch.cuda.FloatTensor') else: print('-----cpu mode-----') def TimerOutFun(self): success, img = self.camera.read() if success: self.Image = self.ColorAdjust(img) self.showTime() self.Image_num += 1 if self.Image_num % 10 == 9: frame_rate = 10 / (time.clock() - self.timelb) self.FmRateLCD.display(frame_rate) self.timelb = time.clock() else: self.Msg.clear() self.Msg.setPlainText('Image obtaining failed.') def StartDection(self): if self.Timer.isActive() == False: flag = self.camera.open(0) if flag == False: msg = QtWidgets.QMessageBox.warning(self, u"Warning", u"请检测相机与电脑是否连接正确", buttons=QtWidgets.QMessageBox.Ok, defaultButton=QtWidgets.QMessageBox.Ok) else: self.list_B = np.ones(10) # 眼睛状态List,建议根据fps修改 self.list_Y = np.zeros(50) # 嘴巴状态list,建议根据fps修改 self.list_Y1 = np.ones(8) # 如果在list_Y中存在list_Y1,则判定一次打哈欠,同上,长度建议修改 self.blink_count = 0 # 眨眼计数 self.list_blink=np.ones(60) #判断60帧的睁眼闭眼 self.danger_count=0#危险行为帧 self.yawn_count = 0#哈欠帧 self.blink_freq = 0.5 self.yawn_freq = 0 self.timelb = time.clock() self.btn_start.setText(u'停止运行') self.btntestcamera.setEnabled(False) self.btn_testvideo.setEnabled(False) self.open_t = 0 # 用于刷新眼部状态label self.danger_t=0 #用于刷新危险行为状态 self.blink_start = time.time() # 眨眼时间 self.yawn_start = time.time() # 打哈欠时间 self.danger_start=time.time()#吸烟or打电话时间 self.case = 2 self.Timer.start(30) self.time_first = time.time() self.time_ing = time.time() self.point = [] self.nod_count=0 #点头次数 self.nod_freq = 0 # 点头频率 self.nod_fps=0 #点头帧数 self.nod_start=time.time()#点头时间 self.shake_count = 0 # 摇头次数 self.shake_freq=0 #摇头频率 self.shake_start=time.time()#摇头时间 self.shake_fps_l=0 #摇头帧数 self.shake_fps_r = 0 # 摇头帧数 # 口罩检测时间 self.FaceMaskTime=time.time() self.Facemasktemp=1 else: self.Timer.stop() self.camera.release() self.Camera_2.clear() self.btn_start.setText(u'开始运行') self.btn_testvideo.setEnabled(True) self.btntestcamera.setEnabled(True) def show_img(self): global temp_t success, self.img = self.camera.read() if success: self.Image_num += 1 if self.Image_num % 10 == 9: frame_rate = 10 / (time.clock() - self.timelb) self.FmRateLCD.display(frame_rate) self.timelb = time.clock() if self.case == 0: showImg = cv2.cvtColor(self.img, cv2.COLOR_BGR2RGB) showImg = qimage2ndarray.array2qimage(showImg) self.Camera_2.setPixmap(QPixmap(showImg)) # 展示图片 self.Camera_2.show() if self.case == 1: bounding_boxes, landmarks = detect_faces(self.img) self.img = show_bboxes(self.img, bounding_boxes, landmarks) showImg = cv2.cvtColor(self.img, cv2.COLOR_BGR2RGB) showImg = qimage2ndarray.array2qimage(showImg) self.Camera_2.setPixmap(QPixmap(showImg)) # 展示图片 self.Camera_2.show() if self.case == 2: img_copy = self.img.copy() frag_gray = False self.time_ing = time.time() # point=[100,0,540,480] if self.frag_cap: bounding_boxes, landmarks = detect_faces(self.img) print('正在定位······') if len(bounding_boxes)== 1: self.point.clear() for b in bounding_boxes: b = [int(round(value)) for value in b] for i in b: self.point.append(i) self.frag_cap = False # print(point) # cv2.rectangle(draw, (b[0], b[1]), (b[2], b[3]), (0, 255, 0), 2) # 裁剪坐标为[y0:y1, x0:x1] if not self.frag_cap: if self.point[0] < 540: self.img = self.img[self.point[1] - 10:479, self.point[0] - 100:self.point[2] + 100] else: self.img = self.img[self.point[1] - 10:479, self.point[0] - 100:639] else: self.img = self.img[1:479, 1:640] if int(self.time_ing - self.time_first) % 60 == 0: self.frag_cap = True else: self.frag_cap = False bounding_boxes, landmarks = detect_faces(self.img) # 定时进行口罩检测 if time.time() -self.FaceMaskTime>self.Facemasktemp: self.Facemasktemp = 60 if len(bounding_boxes)>0: self.FaceMaskTime = time.time() label=get_face_state(get_face_expression(self.img, bounding_boxes)) if label=='nomask': self.Msg.setText("为了您的安全,请佩戴口罩!") else: self.Msg.setText("祝你旅途愉快!") #通过MTCNN人脸框判断,当检测不到人脸时判断低头or瞌睡 if len(bounding_boxes) == 0: self.nod_fps+=1 if self.nod_fps>=3: self.Head_state.setText('点头') self.nod_count+=1 if len(bounding_boxes) > 0: self.nod_fps=0 #通过头部姿态欧拉角角度变化判断是否摇头 if len(bounding_boxes) > 0: Head_Y_X_Z = get_head_pose(landmarks) # print('pitch:{}, yaw:{}, roll:{}'.format(Head_Y_X_Z[1], Head_Y_X_Z[2], Head_Y_X_Z[3])) if(Head_Y_X_Z[2]<-0.75): self.shake_fps_l+=1 if(Head_Y_X_Z[2]>=-0.75): self.shake_fps_l = 0 if self.shake_fps_l>=5: self.shake_count+=1 self.Head_state.setText('摇头') if Head_Y_X_Z[3]>=0.30: self.shake_fps_r+=1 if self.shake_fps_r>=5: self.shake_count+=1 self.Head_state.setText('摇头') if Head_Y_X_Z[3]<0.30: self.shake_fps_r=0 # print(Head_Y_X_Z[1]) # print(Head_Y_X_Z[2]) # print(Head_Y_X_Z[3]) if time.time() - self.nod_start > 3: self.Head_state.setText('') if time.time() - self.shake_start > 3: self.Head_state.setText('') # 计算低头频率 每10s计算一次 if time.time() - self.nod_start > 10: times = time.time() - self.nod_start self.nod_freq = self.nod_count / times self.nod_start = time.time() self.Nod_LCD.display(self.nod_freq) # 计算摇头频率 if time.time() - self.shake_start > 10: times = time.time() - self.shake_start self.shake_freq = self.shake_count / times self.shake_start = time.time() self.shake_LCD.display(self.shake_freq) if len(bounding_boxes)>0: Emotions = get_emotion(get_face_expression(self.img, bounding_boxes)) self.Emotion.setText(Emotions[1]) self.Emotion_pred.display(float(Emotions[0])) # print(Emotions) canvas = cv2.imread('img_resource/label_pred.jpg', flags=cv2.IMREAD_UNCHANGED) for (i, (emotion, prob)) in enumerate(zip(self.EMOTIONS, Emotions[2])): # text = "{}: {:.2f}%".format(emotion, prob * 100) text = "{:.2f}%".format(prob * 100) # 绘制表情类和对应概率的条形图 w = int(prob * 180) # print(text) # canvas = 255 * np.ones((250, 300, 3), dtype="uint8") cv2.rectangle(canvas, (0, (i * 44) + 25), (w, (i * 43) + 40), (100, 200, 130), -1) cv2.putText(canvas, text, (170, (i * 43) + 40), cv2.FONT_HERSHEY_DUPLEX, 0.6, (0, 0, 0), 1) show = cv2.cvtColor(canvas, cv2.COLOR_BGR2RGB) showImage = QtGui.QImage(show.data, show.shape[1], show.shape[0], QtGui.QImage.Format_RGB888) # cv2.imshow('test', showImage) # showImg=QPixmap(showImage) self.label_pred_img.setPixmap(QtGui.QPixmap.fromImage(showImage)) # # print('test') # print('Head_Y_X_Z') # print(Head_Y_X_Z) x = cv2.resize(self.img, (300, 300)).astype(np.float32) flag_B = True # 是否闭眼的flag flag_Y = False num_rec = 0 # 检测到的眼睛的数量 # 分界线 x -= self.img_mean x = x.astype(np.float32) x = x[:, :, ::-1].copy() x = torch.from_numpy(x).permute(2, 0, 1) xx = Variable(x.unsqueeze(0)) # if torch.cuda.is_available(): # xx = xx.cuda() xx = xx.cuda() y = self.net(xx) softmax = nn.Softmax(dim=-1) detect = Detect(config.class_num, 0, 200, 0.01, 0.45) priors = utils.default_prior_box() loc, conf = y loc = torch.cat([o.view(o.size(0), -1) for o in loc], 1) conf = torch.cat([o.view(o.size(0), -1) for o in conf], 1) detections = detect( loc.view(loc.size(0), -1, 4), softmax(conf.view(conf.size(0), -1, config.class_num)), torch.cat([o.view(-1, 4) for o in priors], 0) ).data labels = VOC_CLASSES # 将检测结果放置于图片上 scale = torch.Tensor(self.img.shape[1::-1]).repeat(2) self.img = show_bboxes(self.img, bounding_boxes, landmarks) for i in range(detections.size(1)): j = 0 while detections[0, i, j, 0] >= 0.4: score = detections[0, i, j, 0] label_name = labels[i - 1] if label_name == 'calling' and score > 0.8: self.Danger_state.setText('打电话') self.danger_count += 1 frag_gray = True if label_name == 'smoke' and score > 0.8: self.Danger_state.setText('吸烟') self.danger_count += 1 frag_gray = True if label_name!='smoke'and label_name!='calling': self.danger_t+=1 if self.danger_t>=20: self.Danger_state.setText('') self.danger_t=0 if label_name == 'open_eye': self.open_t += 1 if self.open_t >= 20: self.Eyes_state.setText('') self.open_t = 0 if label_name == 'closed_mouth': self.Mouth_state.setText(' ') if label_name == 'closed_eye': flag_B = False frag_gray = True if label_name == 'open_mouth': flag_Y = True display_txt = '%s:%.2f' % (label_name, score) pt = (detections[0, i, j, 1:] * scale).cpu().numpy() self.coords = (pt[0], pt[1]), pt[2] - pt[0] + 1, pt[3] - pt[1] + 1 color = self.colors_tableau[i] cv2.rectangle(self.img, (pt[0], pt[1]), (pt[2], pt[3]), color, 2) cv2.putText(self.img, display_txt, (int(pt[0]), int(pt[1]) + 10), cv2.FONT_HERSHEY_SIMPLEX, 0.4, (255, 255, 255), 1, 8) j += 1 num_rec += 1 # cv2.imshow('test', self.img) if num_rec > 0: if flag_B: # print(' 1:eye-open') self.list_B = np.append(self.list_B, 1) # 睁眼为‘1’ self.list_blink=np.append(self.list_blink,1) else: # print(' 0:eye-closed') self.list_B = np.append(self.list_B, 0) # 闭眼为‘0’ self.list_blink = np.append(self.list_blink, 0) self.list_blink = np.delete(self.list_blink, 0) self.list_B = np.delete(self.list_B, 0) if flag_Y: self.list_Y = np.append(self.list_Y, 1) else: self.list_Y = np.append(self.list_Y, 0) self.list_Y = np.delete(self.list_Y, 0) else: self.Msg.clear() self.Msg.setPlainText('Nothing detected.') # print(list) # 实时计算PERCLOS self.perclos = 1 - np.average(self.list_blink) # print('perclos={:f}'.format(perclos)) self.PERCLOS.display(self.perclos) if self.list_B[8] == 1 and self.list_B[9] == 0: # 如果上一帧为’1‘,此帧为’0‘则判定为眨眼 self.Eyes_state.setText('眨眼') self.blink_count += 1 frag_gray = True str = datetime.datetime.now().strftime("%H:%M:%S") self.State_record.append(str + ':眨眼') # img_copy=cv2.cvtColor(img_copy,cv2.COLOR_RGB2GRAY) blink_T = time.time() - self.blink_start if blink_T > 30: # 每30秒计算一次眨眼频率 blink_freq = self.blink_count / blink_T self.blink_start = time.time() self.blink_count = 0 print('blink_freq={:f}'.format(blink_freq)) self.Blink_freq.display(blink_freq * 2) # 检测打哈欠 # if Yawn(list_Y,list_Y1): if (self.list_Y[len(self.list_Y) - len(self.list_Y1):] == self.list_Y1).all(): # print('----------------------打哈欠----------------------') self.Mouth_state.setText('打哈欠') self.yawn_count += 1 frag_gray = True str = datetime.datetime.now().strftime("%H:%M:%S") self.State_record.append(str + ':打哈欠') self.list_Y = np.zeros(50) # 计算打哈欠频率 yawn_T = time.time() - self.yawn_start if yawn_T > 60: yawn_freq = self.yawn_count / yawn_T self.yawn_start = time.time() self.yawn_count = 0 print('yawn_freq={:f}'.format(yawn_freq)) self.Yawn_freq.display(yawn_freq) # 计算危险行为频率 DangerAct_T = time.time() - self.danger_start if DangerAct_T > 60: danger_freq = self.danger_count / DangerAct_T self.danger_start = time.time() self.danger_count = 0 print('danger_freq={:f}'.format(danger_freq)) self.Danger_LCD.display(danger_freq) if (self.perclos > 0.4): # print('疲劳') self.State.setText('疲劳') elif (self.blink_freq > 0.3): # print('疲劳') self.State.setText('疲劳') self.blink_freq = 0 # 如果因为眨眼频率判断疲劳,则初始化眨眼频率 elif (self.yawn_freq > 5.0 / 60): # print("疲劳") self.State.setText('疲劳') self.yawn_freq = 0 # 初始化,同上 else: self.State.setText('清醒') if not frag_gray: showImg = cv2.cvtColor(img_copy, cv2.COLOR_BGR2RGB) else: if self.isRecordImg: str = datetime.datetime.now().strftime("%Y_%m_%d_%H_%M_%S") temp = 'ImgRecord/' + str + '.jpg' cv2.imwrite(temp, img_copy) showImg = cv2.cvtColor(img_copy, cv2.COLOR_RGB2GRAY) showImg = qimage2ndarray.array2qimage(showImg) self.Camera_2.setPixmap(QPixmap(showImg)) # 展示图片 self.Camera_2.show() if self.case == 3: img_copy = self.img.copy() frag_gray = False self.time_ing = time.time() # point=[100,0,540,480] if self.frag_cap: bounding_boxes, landmarks = detect_faces(self.img) print('正在定位······') if len(bounding_boxes) == 1: self.point.clear() for b in bounding_boxes: b = [int(round(value)) for value in b] for i in b: self.point.append(i) self.frag_cap = False # print(point) # cv2.rectangle(draw, (b[0], b[1]), (b[2], b[3]), (0, 255, 0), 2) # 裁剪坐标为[y0:y1, x0:x1] if not self.frag_cap: if self.point[0] < 540: self.img = self.img[self.point[1] - 10:479, self.point[0] - 100:self.point[2] + 100] else: self.img = self.img[self.point[1] - 10:479, self.point[0] - 100:639] else: self.img = self.img[1:479, 1:640] if int(self.time_ing - self.time_first) % 60 == 0: self.frag_cap = True else: self.frag_cap = False bounding_boxes, landmarks = detect_faces(self.img) # 定时进行口罩检测 if time.time() - self.FaceMaskTime > self.Facemasktemp: self.Facemasktemp = 60 if len(bounding_boxes) > 0: label = get_face_state(get_face_expression(self.img, bounding_boxes)) self.FaceMaskTime=time.time() if label == 'nomask': self.Msg.setText("为了您的安全,请佩戴口罩!") else: self.Msg.setText("祝你旅途愉快!") # print(get_face_state(self.img, bounding_boxes)) # 通过MTCNN人脸框判断,当检测不到人脸时判断低头or瞌睡 if len(bounding_boxes) == 0: self.nod_fps += 1 if self.nod_fps >= 3: self.Head_state.setText('点头') self.nod_count += 1 if len(bounding_boxes) > 0: self.nod_fps = 0 # 通过头部姿态欧拉角角度变化判断是否摇头 if len(bounding_boxes) > 0: Head_Y_X_Z = get_head_pose(landmarks) # print('pitch:{}, yaw:{}, roll:{}'.format(Head_Y_X_Z[1], Head_Y_X_Z[2], Head_Y_X_Z[3])) if (Head_Y_X_Z[2] < -0.75): self.shake_fps_l += 1 if (Head_Y_X_Z[2] >= -0.75): self.shake_fps_l = 0 if self.shake_fps_l >= 5: self.shake_count += 1 self.Head_state.setText('摇头') if Head_Y_X_Z[3] >= 0.30: self.shake_fps_r += 1 if self.shake_fps_r >= 5: self.shake_count += 1 self.Head_state.setText('摇头') if Head_Y_X_Z[3] < 0.30: self.shake_fps_r = 0 # print(Head_Y_X_Z[1]) # print(Head_Y_X_Z[2]) # print(Head_Y_X_Z[3]) if time.time() - self.nod_start > 3: self.Head_state.setText('') if time.time() - self.shake_start > 3: self.Head_state.setText('') # 计算低头频率 每10s计算一次 if time.time() - self.nod_start > 10: times = time.time() - self.nod_start self.nod_freq = self.nod_count / times self.nod_start = time.time() self.Nod_LCD.display(self.nod_freq) # 计算摇头频率 if time.time() - self.shake_start > 10: times = time.time() - self.shake_start self.shake_freq = self.shake_count / times self.shake_start = time.time() self.shake_LCD.display(self.shake_freq) if len(bounding_boxes) > 0: Emotions = get_emotion(get_face_expression(self.img, bounding_boxes)) self.Emotion.setText(Emotions[1]) self.Emotion_pred.display(float(Emotions[0])) # print(Emotions) # print(get_face_state(get_face_expression(self.img, bounding_boxes))) canvas = cv2.imread('img_resource/label_pred.jpg', flags=cv2.IMREAD_UNCHANGED) for (i, (emotion, prob)) in enumerate(zip(self.EMOTIONS, Emotions[2])): # text = "{}: {:.2f}%".format(emotion, prob * 100) text = "{:.2f}%".format(prob * 100) # 绘制表情类和对应概率的条形图 w = int(prob * 180) # print(text) # canvas = 255 * np.ones((250, 300, 3), dtype="uint8") cv2.rectangle(canvas, (0, (i * 44) + 25), (w, (i * 43) + 40), (100, 200, 130), -1) cv2.putText(canvas, text, (170, (i * 43) + 40), cv2.FONT_HERSHEY_DUPLEX, 0.6, (0, 0, 0), 1) show = cv2.cvtColor(canvas, cv2.COLOR_BGR2RGB) showImage = QtGui.QImage(show.data, show.shape[1], show.shape[0], QtGui.QImage.Format_RGB888) # cv2.imshow('test', showImage) # showImg=QPixmap(showImage) self.label_pred_img.setPixmap(QtGui.QPixmap.fromImage(showImage)) # # print('test') # print('Head_Y_X_Z') # print(Head_Y_X_Z) x = cv2.resize(self.img, (300, 300)).astype(np.float32) flag_B = True # 是否闭眼的flag flag_Y = False num_rec = 0 # 检测到的眼睛的数量 # 分界线 x -= self.img_mean x = x.astype(np.float32) x = x[:, :, ::-1].copy() x = torch.from_numpy(x).permute(2, 0, 1) xx = Variable(x.unsqueeze(0)) # if torch.cuda.is_available(): # xx = xx.cuda() xx = xx.cuda() y = self.net(xx) softmax = nn.Softmax(dim=-1) detect = Detect(config.class_num, 0, 200, 0.01, 0.45) priors = utils.default_prior_box() loc, conf = y loc = torch.cat([o.view(o.size(0), -1) for o in loc], 1) conf = torch.cat([o.view(o.size(0), -1) for o in conf], 1) detections = detect( loc.view(loc.size(0), -1, 4), softmax(conf.view(conf.size(0), -1, config.class_num)), torch.cat([o.view(-1, 4) for o in priors], 0) ).data labels = VOC_CLASSES # 将检测结果放置于图片上 scale = torch.Tensor(self.img.shape[1::-1]).repeat(2) self.img = show_bboxes(self.img, bounding_boxes, landmarks) for i in range(detections.size(1)): j = 0 while detections[0, i, j, 0] >= 0.4: score = detections[0, i, j, 0] label_name = labels[i - 1] if label_name == 'calling' and score > 0.8: self.Danger_state.setText('打电话') self.danger_count += 1 frag_gray = True if label_name == 'smoke' and score > 0.8: self.Danger_state.setText('吸烟') self.danger_count += 1 frag_gray = True if label_name != 'smoke' and label_name != 'calling': self.danger_t += 1 if self.danger_t >= 20: self.Danger_state.setText('') self.danger_t = 0 if label_name == 'open_eye': self.open_t += 1 if self.open_t >= 20: self.Eyes_state.setText('') self.open_t = 0 if label_name == 'closed_mouth': self.Mouth_state.setText(' ') if label_name == 'closed_eye': flag_B = False frag_gray = True if label_name == 'open_mouth': flag_Y = True display_txt = '%s:%.2f' % (label_name, score) pt = (detections[0, i, j, 1:] * scale).cpu().numpy() self.coords = (pt[0], pt[1]), pt[2] - pt[0] + 1, pt[3] - pt[1] + 1 color = self.colors_tableau[i] cv2.rectangle(self.img, (pt[0], pt[1]), (pt[2], pt[3]), color, 2) cv2.putText(self.img, display_txt, (int(pt[0]), int(pt[1]) + 10), cv2.FONT_HERSHEY_SIMPLEX, 0.4, (255, 255, 255), 1, 8) j += 1 num_rec += 1 # cv2.imshow('test', self.img) if num_rec > 0: if flag_B: # print(' 1:eye-open') self.list_B = np.append(self.list_B, 1) # 睁眼为‘1’ self.list_blink = np.append(self.list_blink, 1) else: # print(' 0:eye-closed') self.list_B = np.append(self.list_B, 0) # 闭眼为‘0’ self.list_blink = np.append(self.list_blink, 0) self.list_blink = np.delete(self.list_blink, 0) self.list_B = np.delete(self.list_B, 0) if flag_Y: self.list_Y = np.append(self.list_Y, 1) else: self.list_Y = np.append(self.list_Y, 0) self.list_Y = np.delete(self.list_Y, 0) else: self.Msg.clear() # self.Msg.setPlainText('Nothing detected.') # print(list) # 实时计算PERCLOS self.perclos = 1 - np.average(self.list_blink) # print('perclos={:f}'.format(perclos)) self.PERCLOS.display(self.perclos) if self.list_B[8] == 1 and self.list_B[9] == 0: # 如果上一帧为’1‘,此帧为’0‘则判定为眨眼 self.Eyes_state.setText('眨眼') self.blink_count += 1 frag_gray = True str = datetime.datetime.now().strftime("%H:%M:%S") self.State_record.append(str + ':眨眼') # img_copy=cv2.cvtColor(img_copy,cv2.COLOR_RGB2GRAY) blink_T = time.time() - self.blink_start if blink_T > 30: # 每30秒计算一次眨眼频率 blink_freq = self.blink_count / blink_T self.blink_start = time.time() self.blink_count = 0 print('blink_freq={:f}'.format(blink_freq)) self.Blink_freq.display(blink_freq * 2) # 检测打哈欠 # if Yawn(list_Y,list_Y1): if (self.list_Y[len(self.list_Y) - len(self.list_Y1):] == self.list_Y1).all(): # print('----------------------打哈欠----------------------') self.Mouth_state.setText('打哈欠') self.yawn_count += 1 frag_gray = True str = datetime.datetime.now().strftime("%H:%M:%S") self.State_record.append(str + ':打哈欠') self.list_Y = np.zeros(50) # 计算打哈欠频率 yawn_T = time.time() - self.yawn_start if yawn_T > 60: yawn_freq = self.yawn_count / yawn_T self.yawn_start = time.time() self.yawn_count = 0 print('yawn_freq={:f}'.format(yawn_freq)) self.Yawn_freq.display(yawn_freq) # 计算危险行为频率 DangerAct_T = time.time() - self.danger_start if DangerAct_T > 60: danger_freq = self.danger_count / DangerAct_T self.danger_start = time.time() self.danger_count = 0 print('danger_freq={:f}'.format(danger_freq)) self.Danger_LCD.display(danger_freq) if (self.perclos > 0.4): # print('疲劳') self.State.setText('疲劳') elif (self.blink_freq > 0.3): # print('疲劳') self.State.setText('疲劳') self.blink_freq = 0 # 如果因为眨眼频率判断疲劳,则初始化眨眼频率 elif (self.yawn_freq > 5.0 / 60): # print("疲劳") self.State.setText('疲劳') self.yawn_freq = 0 # 初始化,同上 else: self.State.setText('清醒') if not frag_gray: showImg = cv2.cvtColor(img_copy, cv2.COLOR_BGR2RGB) else: if self.isRecordImg: str = datetime.datetime.now().strftime("%Y_%m_%d_%H_%M_%S") temp = 'ImgRecord/' + str + '.jpg' cv2.imwrite(temp, img_copy) showImg = cv2.cvtColor(img_copy, cv2.COLOR_RGB2GRAY) self.State_record.moveCursor(QTextCursor.End) showImg = qimage2ndarray.array2qimage(showImg) self.Camera_2.setPixmap(QPixmap(showImg)) # 展示图片 self.Camera_2.show() #测试视频 def testVideo(self): if self.Timer.isActive() == False: flag = self.camera.open(0) if flag == False: msg = QtWidgets.QMessageBox.warning(self, u"Warning", u"请检测相机与电脑是否连接正确", buttons=QtWidgets.QMessageBox.Ok, defaultButton=QtWidgets.QMessageBox.Ok) else: path=self.RecordPath self.camera = cv2.VideoCapture(path) self.list_B = np.ones(10) # 眼睛状态List,建议根据fps修改 self.list_Y = np.zeros(50) # 嘴巴状态list,建议根据fps修改 self.list_Y1 = np.ones(8) # 如果在list_Y中存在list_Y1,则判定一次打哈欠,同上,长度建议修改 self.blink_count = 0 # 眨眼计数 self.list_blink = np.ones(60) # 判断60帧的睁眼闭眼 self.danger_count = 0 # 危险行为帧 self.yawn_count = 0 # 哈欠帧 self.blink_freq = 0.5 self.yawn_freq = 0 self.timelb = time.clock() self.btn_testvideo.setText(u'停止测试') self.btntestcamera.setEnabled(False) self.btn_start.setEnabled(False) self.open_t = 0 # 用于刷新眼部状态label self.danger_t = 0 # 用于刷新危险行为状态 self.blink_start = time.time() # 眨眼时间 self.yawn_start = time.time() # 打哈欠时间 self.danger_start = time.time() # 吸烟or打电话时间 self.case = 3 self.Timer.start(30) self.time_first = time.time() self.time_ing = time.time() self.point = [] self.nod_count = 0 # 点头次数 self.nod_freq = 0 # 点头频率 self.nod_fps = 0 # 点头帧数 self.nod_start = time.time() # 点头时间 self.shake_count = 0 # 摇头次数 self.shake_freq = 0 # 摇头频率 self.shake_start = time.time() # 摇头时间 self.shake_fps_l = 0 # 摇头帧数 self.shake_fps_r = 0 # 摇头帧数 # 口罩检测时间 self.FaceMaskTime = time.time() self.Facemasktemp = 1 else: self.Timer.stop() self.camera.release() self.camera=cv2.VideoCapture(0) self.Camera_2.clear() self.btn_testvideo.setText(u'测试视频') self.btn_start.setEnabled(True) self.btntestcamera.setEnabled(True) # 退出程序 def ExitApp(self, event): ok = QtWidgets.QPushButton() cacel = QtWidgets.QPushButton() msg = QtWidgets.QMessageBox(QtWidgets.QMessageBox.Warning, u"关闭", u"是否关闭!") msg.addButton(ok, QtWidgets.QMessageBox.ActionRole) msg.addButton(cacel, QtWidgets.QMessageBox.RejectRole) ok.setText(u'确定') cacel.setText(u'取消') # msg.setDetailedText('sdfsdff') if msg.exec_() == QtWidgets.QMessageBox.RejectRole: event.ignore() else: # self.socket_client.send_command(self.socket_client.current_user_command) if self.camera.isOpened(): self.camera.release() if self.Timer.isActive(): self.Timer.stop() event.accept() # 是否记录 def setRecordImg(self): tag=self.BtnRecord.text() if tag=='记录图像': self.BtnRecord.setText('停止记录') self.isRecordImg=True elif tag=='停止记录': self.BtnRecord.setText('记录图像') self.isRecordImg=False #文件路径 def setFilePath(self): # dirname = QFileDialog.getExistingDirectory(self, "浏览", '.*') fileName1, filetype = QFileDialog.getOpenFileName(self, "选取文件") if fileName1: self.RecordPath = fileName1 self.VideoPath.setText(self.RecordPath) # 关闭 X def closeEvent(self, event): ok = QtWidgets.QPushButton() cacel = QtWidgets.QPushButton() msg = QtWidgets.QMessageBox(QtWidgets.QMessageBox.Warning, u"关闭", u"是否关闭!") msg.addButton(ok, QtWidgets.QMessageBox.ActionRole) msg.addButton(cacel, QtWidgets.QMessageBox.RejectRole) ok.setText(u'确定') cacel.setText(u'取消') # msg.setDetailedText('sdfsdff') if msg.exec_() == QtWidgets.QMessageBox.RejectRole: event.ignore() else: # self.socket_client.send_command(self.socket_client.current_user_command) if self.camera.isOpened(): self.camera.release() if self.Timer.isActive(): self.Timer.stop() event.accept() if __name__ == '__main__': app = QApplication(sys.argv) ui = CameraShow() ui.show() sys.exit(app.exec_())
43.144737
137
0.467309
4,606
42,627
4.170647
0.113548
0.024987
0.023738
0.009474
0.844144
0.82202
0.799427
0.793857
0.786257
0.781572
0
0.039025
0.419898
42,627
987
138
43.18845
0.737342
0.08633
0
0.827451
0
0
0.024532
0.005391
0
0
0
0
0
1
0.020915
false
0
0.028758
0
0.053595
0.013072
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
6c8db67a4996e0350f365c5b3b343baa6e57e872
45,391
py
Python
Protheus_WebApp/Modules/SIGAFIN/FINA050TESTCASE.py
98llm/tir-script-samples
0bff8393b79356aa562e9e6512c11ee6e039b177
[ "MIT" ]
17
2018-09-24T17:27:08.000Z
2021-09-16T19:09:46.000Z
Protheus_WebApp/Modules/SIGAFIN/FINA050TESTCASE.py
98llm/tir-script-samples
0bff8393b79356aa562e9e6512c11ee6e039b177
[ "MIT" ]
4
2018-09-24T17:30:32.000Z
2022-01-03T11:39:30.000Z
Protheus_WebApp/Modules/SIGAFIN/FINA050TESTCASE.py
98llm/tir-script-samples
0bff8393b79356aa562e9e6512c11ee6e039b177
[ "MIT" ]
18
2019-06-07T17:41:34.000Z
2022-01-31T18:17:31.000Z
import unittest import time from tir import Webapp from datetime import datetime DateSystem = datetime.today().strftime('%d/%m/%Y') """------------------------------------------------------------------- /*/{Protheus.doc} FINA050TestCase TIR - Casos de testes da rotina contas a pagar @author Karen Honda @since 07/05/2020 @version 12 -------------------------------------------------------------------""" class FINA050(unittest.TestCase): #------------------------------------------- # Inicialiação setUpClass para TIR - FINA050 #------------------------------------------- @classmethod def setUpClass(inst): inst.oHelper = Webapp() inst.oHelper.Setup("SIGAFIN",DateSystem,"T1","D MG 01 ","06") inst.oHelper.Program('FINA050') #----------------------------------------- #{Protheus.doc} FINA050_CT028 #Inclusão de desdobramento, com rateio múltiplas naturezas e centro de custo #MV_RATDESD = 1 ( Sem impostos ) #author Vitor Duca #since 13/12/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T40666 #----------------------------------------- def test_FINA050_CT028(self): self.oHelper.AddParameter("MV_RATDESD","","1","1","1") self.oHelper.AddParameter("MV_MULNATP","",".T.",".T.",".T.") self.oHelper.SetParameters() self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO','FIN') self.oHelper.SetValue('E2_NUM','FN050_028') self.oHelper.SetValue('E2_TIPO','NF') self.oHelper.SetValue('E2_NATUREZ','AUT0000001') self.oHelper.SetValue('E2_FORNECE','FIN001') self.oHelper.SetValue('E2_LOJA','01') self.oHelper.SetValue('E2_EMISSAO',DateSystem) self.oHelper.SetValue('E2_VENCTO',DateSystem) self.oHelper.SetKey("Enter") self.oHelper.SetValue('E2_VALOR','5.000,00') self.oHelper.ClickFolder('Administrativo') self.oHelper.SetValue('E2_DESDOBR','S') #Tela do desdobramento self.oHelper.SetKey("Enter") self.oHelper.SetValue('Numero de Parcelas','2') self.oHelper.SetKey("Enter") self.oHelper.SetValue('Periodo de Vencto. (em dias)','30') self.oHelper.SetValue('Historico','Teste de dedobramento') self.oHelper.SetButton('Ok') self.oHelper.SetValue('E2_MULTNAT','1') self.oHelper.SetButton('Salvar') #Tela de rateio por multiplas-naturezas #Primeira linha self.oHelper.SetValue('Natureza','AUT0000002', grid=True, grid_number=1) self.oHelper.SetValue('Vlr.Movim.','2.500,00', grid=True, grid_number=1) self.oHelper.LoadGrid() #Segunda linha self.oHelper.SetKey("DOWN", grid=True, grid_number=1) self.oHelper.SetValue('Natureza','AUT0000003', grid=True, grid_number=1) self.oHelper.SetValue('Vlr.Movim.','2.500,00', grid=True, grid_number=1) self.oHelper.LoadGrid() self.oHelper.SetButton('Confirmar') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() self.oHelper.RestoreParameters() #----------------------------------------- #{Protheus.doc} FINA050_CT034 #Substituição de titulos provisorios sem impostos #author Vitor Duca #since 19/05/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T51321 #----------------------------------------- def test_FINA050_CT034(self): chavePR = "D MG 01 FINFN050_034 PR TIR00101" chaveNF = "D MG 01 FINFN050_034 NF TIR00101" self.oHelper.WaitShow("Contas a Pagar") #Altera pergunte da rotina self.oHelper.SetKey("F12") self.oHelper.WaitShow("Parametros") self.oHelper.SetValue("Mostra Lanc Contab ?" ,"Nao") self.oHelper.SetButton('Ok') #Pesquisa titulo provisorio self.oHelper.SearchBrowse(f'{chavePR}', key=1, index=True) self.oHelper.SetButton('Outras Ações',sub_item='Substituição de Provisórios') #Tela de seleção de filiais time.sleep(5) self.oHelper.SetKey("Enter", grid=True, grid_number=1) self.oHelper.SetButton('Confirmar') self.oHelper.SetValue('Fornecedor :', 'TIR001') self.oHelper.SetValue('Loja :','01') self.oHelper.SetButton('Ok') self.oHelper.SetButton('Confirmar') time.sleep(5) self.oHelper.SetButton('Outras Ações',sub_item='Pesquisar') self.oHelper.SetButton('Ok') #Posiciona no item da grid de seleção e simula um "Enter", para selecionar o item self.oHelper.ClickBox("No. Titulo", "FN050_034") self.oHelper.SetButton('Confirmar') self.oHelper.SetValue('E2_TIPO',"NF") self.oHelper.SetKey("Enter") self.oHelper.SetButton('Confirmar') #Deseja cadastrar os valores acessórios deste título agora? self.oHelper.SetButton('Não') #Exclusão do titulo efetivos, estorno da substituição #self.oHelper.SearchBrowse(f'{chaveNF}', key=1, index=True) #self.oHelper.SetButton('Outras Ações',sub_item='Excluir') #self.oHelper.SetButton('Sim') #self.oHelper.SetButton('Confirmar') #Restaura pergunte da rotina self.oHelper.SetKey("F12") self.oHelper.WaitShow("Parametros") self.oHelper.SetValue('Mostra Lanc Contab ?', "Sim") self.oHelper.SetButton('Ok') self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT040 #Inclusão de titulo a pagar com desdobramento #author Vitor Duca #since 19/05/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T51324 #----------------------------------------- def test_FINA050_CT040(self): self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO','FIN') self.oHelper.SetValue('E2_NUM','FN050_040') self.oHelper.SetValue('E2_TIPO','NF') self.oHelper.SetValue('E2_NATUREZ','TIR001') self.oHelper.SetValue('E2_FORNECE','TIR001') self.oHelper.SetValue('E2_LOJA','01') self.oHelper.SetValue('E2_EMISSAO',DateSystem) self.oHelper.SetValue('E2_VENCTO',DateSystem) self.oHelper.SetKey("Enter") self.oHelper.SetValue('E2_VALOR','10.000,00') self.oHelper.ClickFolder('Administrativo') self.oHelper.SetValue('E2_DESDOBR','S') #Tela do desdobramento self.oHelper.SetKey("Enter") self.oHelper.SetValue('Numero de Parcelas','2') self.oHelper.SetKey("Enter") self.oHelper.SetValue('Periodo de Vencto. (em dias)','30') self.oHelper.SetValue('Historico','Teste de dedobramento') self.oHelper.SetButton('Ok') self.oHelper.SetButton('Salvar') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #Exclusão self.oHelper.SetButton("Outras Ações", "Canc.Desdobr.") self.oHelper.SetButton('Confirmar') time.sleep(5) #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT041 #Inclusão de Pagamento antecipado sem impostos, com movimento bancario #author Vitor Duca #since 19/05/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T51325 #----------------------------------------- def test_FINA050_CT041(self): self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO','FIN') self.oHelper.SetValue('E2_NUM','FN050_041') self.oHelper.SetValue('E2_TIPO','PA') #Informações bancarias do PA self.oHelper.SetValue('Banco','001') self.oHelper.SetValue('Agência','00001') self.oHelper.SetValue('Conta','0000000001') self.oHelper.SetButton('Ok') self.oHelper.SetValue('E2_NATUREZ','TIR001') self.oHelper.SetValue('E2_FORNECE','TIR001') self.oHelper.SetValue('E2_LOJA','01') self.oHelper.SetValue('E2_EMISSAO',DateSystem) self.oHelper.SetValue('E2_VENCTO',DateSystem) self.oHelper.SetKey("Enter") self.oHelper.SetValue('E2_VALOR','10.000,00') self.oHelper.SetButton('Salvar') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT043 #Exclusão de titulo NF sem impostos com pendencia de contabilização online #author Vitor Duca #since 19/05/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T51326 #----------------------------------------- def test_FINA050_CT043(self): chaveTit = "D MG 01 FINFN050_043 NF TIR00101" self.oHelper.WaitShow("Contas a Pagar") #Pesquisa titulo que sera excluido self.oHelper.SearchBrowse(f'{chaveTit}', key=1, index=True) self.oHelper.SetButton('Outras Ações',sub_item='Excluir') self.oHelper.SetButton('Confirmar') #Tela de pendencias de contabilização self.oHelper.CheckResult("Motivo Baixa", "ES", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Histórico", "Estorno de Baixa", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Valor", "1000", grid=True, line=1, grid_number=1) self.oHelper.LoadGrid() self.oHelper.SetButton('Confirma') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") #Restaura o filtro de pesquisa da browse chaveTit = " " self.oHelper.SearchBrowse(f'{chaveTit}', key=1, index=True) self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT045 #Inclusão de abatimento contendo mais de um titulo a #pagar com a chave (E2_PREFIXO+E2_NUM+E2_PARCELA) igual #author Vitor Duca #since 19/05/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T51328 #----------------------------------------- def test_FINA050_CT045(self): self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO','FIN') self.oHelper.SetValue('E2_NUM','FN050_045') self.oHelper.SetValue('E2_TIPO','AB-') #Tela de seleção do pai do abatimento #Primeira linha self.oHelper.CheckResult("Prefixo", "FIN", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("No. Titulo", "FN050_045", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Parcela", " ", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Tipo", "BOL", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Vlr.Titulo", "2000", grid=True, line=1, grid_number=1) #Segunda linha self.oHelper.CheckResult("Prefixo", "FIN", grid=True, line=2, grid_number=1) self.oHelper.CheckResult("No. Titulo", "FN050_045", grid=True, line=2, grid_number=1) self.oHelper.CheckResult("Parcela", " ", grid=True, line=2, grid_number=1) self.oHelper.CheckResult("Tipo", "NF", grid=True, line=2, grid_number=1) self.oHelper.CheckResult("Vlr.Titulo", "2000", grid=True, line=2, grid_number=1) self.oHelper.LoadGrid() self.oHelper.SetButton('Ok') #Checagem dos dados herdados do titulo pai self.oHelper.CheckResult('E2_NATUREZ','TIR001') self.oHelper.CheckResult('E2_FORNECE','TIR001') self.oHelper.CheckResult('E2_LOJA','01') self.oHelper.CheckResult('E2_EMISSAO','19/05/2020') self.oHelper.CheckResult('E2_VENCTO','19/05/2020') self.oHelper.SetValue('E2_VALOR','50,00') self.oHelper.SetButton('Salvar') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT046 #Visualização do rateio contabil #author Vitor Duca #since 19/05/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T51331 #----------------------------------------- def test_FINA050_CT046(self): chaveTit = "D MG 01 FINFN050_046 NF 00000201" self.oHelper.WaitShow("Contas a Pagar") #Pesquisa titulo que sera visualizado self.oHelper.SearchBrowse(f'{chaveTit}', key=1, index=True) self.oHelper.SetButton('Outras Ações',sub_item='Vis Rateio') #Tela de Visualização dos rateios contabeis #Primeira linha self.oHelper.CheckResult("Conta Debito", "001LH001", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Conta Credit", "", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Percentual", "50,00", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Valor Rateio", "2.500,00", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Historico", "TESTE DE RATEIO", grid=True, line=1, grid_number=1) #Segunda linha self.oHelper.CheckResult("Conta Debito", "", grid=True, line=2, grid_number=1) self.oHelper.CheckResult("Conta Credit", "001LH002", grid=True, line=2, grid_number=1) self.oHelper.CheckResult("Percentual", "50,00", grid=True, line=2, grid_number=1) self.oHelper.CheckResult("Valor Rateio", "2.500,00", grid=True, line=2, grid_number=1) self.oHelper.CheckResult("Historico", "TESTE DE RATEIO", grid=True, line=2, grid_number=1) self.oHelper.LoadGrid() self.oHelper.SetButton('Confirmar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT047 #Inclusão de titulo a pagar com rateio contabil por centro de custo #author Vitor Duca #since 22/05/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T51333 #----------------------------------------- def test_FINA050_CT047(self): self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO','FIN') self.oHelper.SetValue('E2_NUM','FN050_047') self.oHelper.SetValue('E2_TIPO','NF') self.oHelper.SetValue('E2_NATUREZ','TIR001') self.oHelper.SetValue('E2_FORNECE','TIR001') self.oHelper.SetValue('E2_LOJA','01') self.oHelper.SetValue('E2_EMISSAO',DateSystem) self.oHelper.SetValue('E2_VENCTO',DateSystem) self.oHelper.SetValue('E2_VALOR','10.000,00') self.oHelper.ClickFolder('Contábil') self.oHelper.SetValue('E2_RATEIO','S') #Tela para escolher o tipo de rateio self.oHelper.SetValue('Historico','TIR RATEIO') self.oHelper.SetButton('Ok') #Tela de cadastro dos rateios contabeis #Primeira linha self.oHelper.SetValue('Conta Debito','001LH001', grid=True, grid_number=1) self.oHelper.SetValue('Percentual','50,00', grid=True, grid_number=1) self.oHelper.SetValue("Valor Rateio","5.000,00", grid=True, grid_number=1) self.oHelper.CheckResult("Valor Rateio", "5.000,00", grid=True, line=1, grid_number=1) self.oHelper.SetValue('Historico','TESTE DE RATEIO', grid=True, grid_number=1) self.oHelper.SetValue('C Custo Deb','002', grid=True, grid_number=1) self.oHelper.LoadGrid() #Segunda linha self.oHelper.SetKey("DOWN", grid=True, grid_number=1) self.oHelper.SetValue('Conta Credit','001LH002', grid=True, grid_number=1) self.oHelper.SetValue('Percentual','50,00', grid=True, grid_number=1) self.oHelper.SetValue("Valor Rateio","5.000,00", grid=True, grid_number=1) self.oHelper.CheckResult("Valor Rateio", "5.000,00", grid=True, line=2, grid_number=1) self.oHelper.SetValue('Historico','TESTE DE RATEIO', grid=True, grid_number=1) self.oHelper.SetValue('C Custo Crd','003', grid=True, grid_number=1) self.oHelper.LoadGrid() self.oHelper.SetButton('Salvar') #Confirma inclusão do titulo self.oHelper.SetButton('Salvar') #Deseja cadastrar os valores acessórios deste título agora? self.oHelper.SetButton('Não') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT050 #Inclusão de titulo a pagar com valores acessorios #author Vitor Duca #since 22/05/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T51336 #----------------------------------------- def test_FINA050_CT050(self): self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO','FIN') self.oHelper.SetValue('E2_NUM','FN050_050') self.oHelper.SetValue('E2_TIPO','NF') self.oHelper.SetValue('E2_NATUREZ','TIR001') self.oHelper.SetValue('E2_FORNECE','TIR001') self.oHelper.SetValue('E2_LOJA','01') self.oHelper.SetValue('E2_EMISSAO',DateSystem) self.oHelper.SetValue('E2_VENCTO',DateSystem) self.oHelper.SetValue('E2_VALOR','1500,00') #Confirma inclusão do titulo self.oHelper.SetButton('Salvar') #Deseja cadastrar os valores acessórios deste título agora? self.oHelper.SetButton('Sim') #Tela de valores acessorios do titulo self.oHelper.WaitShow("Valores Acessórios") self.oHelper.SetValue('Código','000002', grid=True, grid_number=1) self.oHelper.SetValue('Valor','100,00', grid=True, grid_number=1) self.oHelper.LoadGrid() #Confirma inclusão do valor acessorio self.oHelper.SetButton('Confirmar') self.oHelper.SetButton('Fechar') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT051 #Visualização de titulo a pagar com impostos retidos pelo configurador de tributos #author Vitor Duca #since 22/05/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T51337 #----------------------------------------- def test_FINA050_CT051(self): chaveTit = "D MG 01 FINFN050_051 NF TIR00201" self.oHelper.WaitShow("Contas a Pagar") #Pesquisa titulo a pagar self.oHelper.SearchBrowse(f'{chaveTit}', key=1, index=True) self.oHelper.SetButton('Visualizar') self.oHelper.CheckResult("E2_VALOR", "10.000,00") self.oHelper.ClickFolder('Impostos') self.oHelper.CheckResult("E2_PIS", "0,00") self.oHelper.CheckResult("E2_CSLL", "0,00") self.oHelper.CheckResult("E2_COFINS", "0,00") self.oHelper.SetButton('Outras Ações',sub_item='Consulta de Retenções') #Tela de impostos calculados e retidos pelo configurador de tributos self.oHelper.WaitShow("Consulta de Impostos por Título") self.oHelper.ClickFolder('Baixas') #Informações de baixas self.oHelper.CheckResult("Valor Baixa", "9.535,00", grid=True, line=1, grid_number=1) self.oHelper.LoadGrid() #Impostos calculados - Baixa #Linha 01 self.oHelper.CheckResult("Tipo Imposto", "PCC001", grid=True, line=1, grid_number=2) self.oHelper.CheckResult("Imposto Calc", "INB", grid=True, line=1, grid_number=2) self.oHelper.CheckResult("Base Calculo", "10.000,00", grid=True, line=1, grid_number=2) self.oHelper.CheckResult("Valor Calc.", "65,00", grid=True, line=1, grid_number=2) self.oHelper.CheckResult("Situação", "Retido", grid=True, line=1, grid_number=2) self.oHelper.LoadGrid() #Linha 02 self.oHelper.CheckResult("Tipo Imposto", "PCC002", grid=True, line=2, grid_number=2) self.oHelper.CheckResult("Imposto Calc", "INB", grid=True, line=2, grid_number=2) self.oHelper.CheckResult("Base Calculo", "10.000,00", grid=True, line=2, grid_number=2) self.oHelper.CheckResult("Valor Calc.", "300,00", grid=True, line=2, grid_number=2) self.oHelper.CheckResult("Situação", "Retido", grid=True, line=2, grid_number=2) self.oHelper.LoadGrid() #Linha 03 self.oHelper.CheckResult("Tipo Imposto", "PCC003", grid=True, line=3, grid_number=2) self.oHelper.CheckResult("Imposto Calc", "INB", grid=True, line=3, grid_number=2) self.oHelper.CheckResult("Base Calculo", "10.000,00", grid=True, line=3, grid_number=2) self.oHelper.CheckResult("Valor Calc.", "100,00", grid=True, line=3, grid_number=2) self.oHelper.CheckResult("Situação", "Retido", grid=True, line=3, grid_number=2) self.oHelper.LoadGrid() #Impostos retidos - Baixa #Linha 01 self.oHelper.ClickGridCell("Tipo Imposto", 1, 2) self.oHelper.CheckResult("Título de Imposto Gerado", "D MG 01 |FIN|FN050_051|1|TX |UNIAO |00", grid=True, line=1, grid_number=3) self.oHelper.LoadGrid() #Linha 02 self.oHelper.ScrollGrid("Tipo Imposto", "PCC002", grid_number=2) self.oHelper.CheckResult("Título de Imposto Gerado", "D MG 01 |FIN|FN050_051|2|TX |UNIAO |00", grid=True, line=1, grid_number=3) self.oHelper.LoadGrid() #Linha 03 self.oHelper.ScrollGrid("Tipo Imposto", "PCC003", grid_number=2) self.oHelper.CheckResult("Título de Imposto Gerado", "D MG 01 |FIN|FN050_051|3|TX |UNIAO |00", grid=True, line=1, grid_number=3) self.oHelper.LoadGrid() self.oHelper.SetButton('Fechar') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") chaveTit = "D MG 01 FINFN050_0511TX UNIAO 00" #Pesquisa titulo a pagar self.oHelper.SearchBrowse(f'{chaveTit}', key=1, index=True) #Tentar excluir o titulo de imposto self.oHelper.SetButton('Outras Ações',sub_item='Excluir') self.oHelper.CheckHelp(text='NO_DELETE2',button='Fechar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT064 #Estorno da substituição de titulos provisorios sem impostos #author Vitor Duca #since 19/05/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T56310 #----------------------------------------- def test_FINA050_CT064(self): chaveNF = "D MG 01 FINFN050_064 NF TIR00101" self.oHelper.WaitShow("Contas a Pagar") #Altera pergunte da rotina self.oHelper.SetKey("F12") self.oHelper.WaitShow("Parametros") self.oHelper.SetValue("Mostra Lanc Contab ?" ,"Nao") self.oHelper.SetButton('Ok') #Exclusão do titulo efetivos, estorno da substituição self.oHelper.SearchBrowse(f'{chaveNF}', key=1, index=True) self.oHelper.SetButton('Outras Ações',sub_item='Excluir') self.oHelper.SetButton('Sim') self.oHelper.SetButton('Confirmar') #Restaura pergunte da rotina self.oHelper.SetKey("F12") self.oHelper.WaitShow("Parametros") self.oHelper.SetValue('Mostra Lanc Contab ?', "Sim") self.oHelper.SetButton('Ok') self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT162 #Inclusão de título a pagar com rateio de IR por CPF 20/30/50 #author Karen Honda #since 07/05/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T50872 #----------------------------------------- def test_FINA050_CT162(self): cPrefixo = "FIN" cTitulo = "FN050_162" cTipo = "NF" cNatureza = "FINIRPROG" cFornece = "FIRP06" cLoja = "01" self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO', cPrefixo) self.oHelper.SetValue('E2_NUM',cTitulo) self.oHelper.SetValue('E2_TIPO',cTipo) self.oHelper.SetValue('E2_NATUREZ',cNatureza) self.oHelper.SetValue('E2_FORNECE',cFornece) self.oHelper.SetValue('E2_LOJA',cLoja) self.oHelper.SetValue('E2_EMISSAO','07/05/2020') self.oHelper.SetValue('E2_VENCTO','07/05/2020') self.oHelper.SetValue('E2_VENCREA','07/05/2020') self.oHelper.SetValue('E2_VALOR','10.000,00') self.oHelper.ClickFolder('Impostos') self.oHelper.SetValue('E2_DIRF','1') self.oHelper.SetValue('E2_CODRET','3208') self.oHelper.CheckResult("E2_IRRF", "679,74") self.oHelper.SetButton('Outras Ações',sub_item='Rateio de IR Progressivo') self.oHelper.WaitShow("Rateio de IR progressivo") self.oHelper.CheckResult("Rendimento total", "5000.00", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Imposto a ser retido", "548.85", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Rendimento total", "2000.00", grid=True, line=2, grid_number=1) self.oHelper.CheckResult("Imposto a ser retido", "15.92", grid=True, line=2, grid_number=1) self.oHelper.CheckResult("Rendimento total", "3000.00", grid=True, line=3, grid_number=1) self.oHelper.CheckResult("Imposto a ser retido", "114.97", grid=True, line=3, grid_number=1) self.oHelper.LoadGrid() self.oHelper.SetButton('Fechar') self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Cancelar') self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT163 #Inclusão de título a pagar com rateio de IR com título gerado no legado #author Karen Honda #since 07/05/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T50887 #----------------------------------------- def test_FINA050_CT163(self): cPrefixo = "FIN" cTitulo = "FIN163_2" cTipo = "NF" cNatureza = "FINIRPROG" cFornece = "FIRP07" cLoja = "01" self.oHelper.SetButton("x") self.oHelper.ChangeEnvironment("07/05/2020","T1", "D MG 01 ","06") time.sleep(10) self.oHelper.SetLateralMenu('Atualizações > Contas a Pagar > Contas a Pagar') self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO', cPrefixo) self.oHelper.SetValue('E2_NUM',cTitulo) self.oHelper.SetValue('E2_TIPO',cTipo) self.oHelper.SetValue('E2_NATUREZ',cNatureza) self.oHelper.SetValue('E2_FORNECE',cFornece) self.oHelper.SetValue('E2_LOJA',cLoja) self.oHelper.SetValue('E2_EMISSAO','07/05/2020') self.oHelper.SetValue('E2_VENCTO','07/05/2020') self.oHelper.SetValue('E2_VENCREA','07/05/2020') self.oHelper.SetValue('E2_VALOR','10.000,00') self.oHelper.ClickFolder('Impostos') self.oHelper.SetValue('E2_DIRF','1') self.oHelper.SetValue('E2_CODRET','3208') self.oHelper.CheckResult("E2_IRRF", "4.673,85") self.oHelper.SetButton('Salvar') self.oHelper.CheckHelp(text='IRPROGLEGADO',button='Fechar') self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Cancelar') self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT173 #Substituição de provisório para NF #author Leandro Fini #since 04/06/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/193969 #----------------------------------------- def test_FINA050_CT173(self): prefixo = 'AUT' titulo = 'LF005' parcela = '1' tipo = 'PR' fornecedor = 'LF005' loja = '00' self.oHelper.WaitShow("Contas a Pagar") #Pesquisa titulo provisorio self.oHelper.SetButton('Outras Ações',sub_item='Substituição de Provisórios') #Tela de seleção de filiais self.oHelper.SetButton('Marca Todos -') self.oHelper.SetButton('Confirmar') self.oHelper.SetValue('Fornecedor :', fornecedor) self.oHelper.SetValue('Loja :',loja) self.oHelper.SetValue('Moeda :','02 DOLAR') self.oHelper.SetButton('Ok') self.oHelper.SetButton('Confirmar') self.oHelper.ClickBox("No. Titulo", titulo) self.oHelper.SetButton('Confirmar') self.oHelper.SetValue('E2_TIPO',"NF") self.oHelper.SetValue('E2_NATUREZ',"LF005") self.oHelper.CheckResult("E2_VALOR", "1.000,00") self.oHelper.SetButton('Cancelar') self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT182 # Inclusão de Abatimento, selecionando titulo Pai, sem inserir # Prefixo, Número e Parcela #author Rafael Sarracini #since 02/07/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T52422 #----------------------------------------- def test_FINA050_CT182(self): chaveTit = "D MG 01 RS RS4.1 1NF RS002 00" self.oHelper.WaitShow("Contas a Pagar") #Pesquisa titulo NF self.oHelper.SearchBrowse(f'{chaveTit}', key=1, index=True) #Inclusão de Abatimento sem colocar Prefixo,Numero e Parcela self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_TIPO','AB-') self.oHelper.SetKey("Enter") self.oHelper.SetValue('E2_VALOR','500,00') self.oHelper.SetKey("Enter") #Confirma inclusão do titulo self.oHelper.SetButton('Salvar') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT187 # Inclusão de título NF com complemento de título de INSS #author Leandro Fini #since 28/07/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T52939 #----------------------------------------- def test_FINA050_CT187(self): cPrefixo = "FIN" cTitulo = "LF008" cTipo = "NF" cNatureza = "LF006" cFornece = "LF008" cLoja = "00" self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO', cPrefixo) self.oHelper.SetValue('E2_NUM',cTitulo) self.oHelper.SetValue('E2_TIPO',cTipo) self.oHelper.SetValue('E2_NATUREZ',cNatureza) self.oHelper.SetValue('E2_FORNECE',cFornece) self.oHelper.SetValue('E2_LOJA',cLoja) self.oHelper.SetValue('E2_EMISSAO','28/07/2020') self.oHelper.SetValue('E2_VENCTO','28/07/2020') self.oHelper.SetValue('E2_VENCREA','28/07/2020') self.oHelper.SetValue('E2_VALOR','433,25') self.oHelper.SetButton('Outras Ações',sub_item='Complemento do título') time.sleep(2) self.oHelper.ClickFolder('Complemento do Imposto X Títulos') #Tela de complemento de título self.oHelper.SetValue('Código','FIN054', grid=True, grid_number=1) self.oHelper.SetValue('Base de Calc','433,25', grid=True, grid_number=1) self.oHelper.LoadGrid() #Confirma inclusão do complemento de título self.oHelper.SetButton('Confirmar') self.oHelper.SetButton('Sim') self.oHelper.SetButton('Fechar') self.oHelper.WaitShow("Contas a Pagar") self.oHelper.CheckResult("E2_VALOR", "376,94") self.oHelper.ClickFolder('Impostos') self.oHelper.CheckResult("E2_INSS", "56,31") self.oHelper.SetButton('Cancelar') self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT206 # Alteração no agendamento de vencimento de um titulo a pagar, verificando # o conteudo do campo E2_DATAAGE #author Vitor Duca #since 09/11/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T55522 #----------------------------------------- def test_FINA050_CT206(self): chaveTit = "D MG 01 FINFN050_206 NF TIR00101" self.oHelper.WaitShow("Contas a Pagar") #Pesquisa titulo a pagar self.oHelper.SearchBrowse(f'{chaveTit}', key=1, index=True) self.oHelper.SetButton('Outras Ações',sub_item='Agendamento') #Tela de agendamento do vencimento time.sleep(3) self.oHelper.SetValue('Data de Agendamento:', '09/11/2020') self.oHelper.SetButton('Confirmar') #Visualização do campo E2_DATAAGE self.oHelper.SetButton('Visualizar') self.oHelper.ClickFolder('Banco') self.oHelper.CheckResult("E2_DATAAGE", "09/11/2020") self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT207 # Validação da recomposição de base na modalidade de retenção do PCC #author Vitor Duca #since 09/11/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T55540 #----------------------------------------- def test_FINA050_CT207(self): self.oHelper.AddParameter("MV_BX10925","","2","2","2") self.oHelper.SetParameters() cPrefixo = "FIN" cTitulo = "FN050_207" cTipo = "NF " cNatureza = "003" cFornece = "FIN008" cLoja = "01" self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO', cPrefixo) self.oHelper.SetValue('E2_NUM',cTitulo) self.oHelper.SetValue('E2_TIPO',cTipo) self.oHelper.SetValue('E2_NATUREZ',cNatureza) self.oHelper.SetValue('E2_FORNECE',cFornece) self.oHelper.SetValue('E2_LOJA',cLoja) self.oHelper.SetValue('E2_EMISSAO','09/11/2020') self.oHelper.SetValue('E2_VENCTO','09/11/2020') self.oHelper.SetValue('E2_VENCREA','09/11/2020') self.oHelper.SetValue('E2_VALOR','10.000,00') #Verifica valor dos impostos self.oHelper.ClickFolder('Impostos') self.oHelper.CheckResult("E2_COFINS", '300,00') self.oHelper.CheckResult("E2_PIS", '65,00') self.oHelper.CheckResult("E2_CSLL", '100,00') #Verifica valor liquido do titulo self.oHelper.ClickFolder('Dados Gerais') self.oHelper.CheckResult("E2_VALOR", '9.535,00') #Tela de modalidade de retenção do PCC time.sleep(2) self.oHelper.SetButton('Outras Ações',sub_item='Impostos') self.oHelper.SetValue('Nao efetua retencäo', True, grid=False) self.oHelper.SetButton('Ok') #Verifica valor recomposto do titulo self.oHelper.ClickFolder('Dados Gerais') self.oHelper.CheckResult("E2_VALOR", '10.000,00') #Verifica valor dos impostos self.oHelper.ClickFolder('Impostos') self.oHelper.CheckResult("E2_COFINS", '0,00') self.oHelper.CheckResult("E2_PIS", '0,00') self.oHelper.CheckResult("E2_CSLL", '0,00') #Tela de modalidade de retenção do PCC time.sleep(2) self.oHelper.SetButton('Outras Ações',sub_item='Impostos') self.oHelper.SetValue('Calculado pelo sistema', True, grid=False) self.oHelper.SetButton('Ok') #Verifica valor recomposto do titulo self.oHelper.ClickFolder('Dados Gerais') self.oHelper.CheckResult("E2_VALOR", '9.535,00') #Verifica valor dos impostos self.oHelper.ClickFolder('Impostos') self.oHelper.CheckResult("E2_COFINS", '300,00') self.oHelper.CheckResult("E2_PIS", '65,00') self.oHelper.CheckResult("E2_CSLL", '100,00') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() self.oHelper.RestoreParameters() #----------------------------------------- #{Protheus.doc} FINA050_CT208 # Visualização do rastreio de contratos #author Vitor Duca #since 09/11/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T55544 #----------------------------------------- def test_FINA050_CT208(self): chaveTit = "D MG 01 GCTCTCN12188 NF GCT00101" self.oHelper.WaitShow("Contas a Pagar") #Pesquisa titulo a pagar self.oHelper.SearchBrowse(f'{chaveTit}', key=1, index=True) self.oHelper.SetButton('Outras Ações',sub_item='Rastr.Contrato') #Tela de rastreio de contratos time.sleep(3) self.oHelper.ClickTree("Nota fiscal de entrada / Serie - CTCN12188/GCT > Titulo - Fornecedor/Loja/Prefixo/Numero/Parcela/Tipo - GCT001/01/GCT/CTCN12188/ /NF ") self.oHelper.SetButton('Ok') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT209 #Manutenção de documentos no titulo a pagar #author Vitor Duca #since 10/11/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T55631 #----------------------------------------- def test_FINA050_CT209(self): chaveTit = "D MG 01 FINFN050_209 NF 001 00" self.oHelper.WaitShow("Contas a Pagar") #Pesquisa titulo a pagar self.oHelper.SearchBrowse(f'{chaveTit}', key=1, index=True) self.oHelper.SetButton('Outras Ações',sub_item='Documentos') #Tela de manutenção dos documentos #Primeira linha time.sleep(5) self.oHelper.CheckResult("Cod.Document", "011", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Descricao", "DOCUMENTO TIR", grid=True, line=1, grid_number=1) self.oHelper.CheckResult("Recebido", "Nao", grid=True, line=1, grid_number=1) self.oHelper.LoadGrid() #inclusão da segunda linha self.oHelper.SetKey("DOWN", grid=True) self.oHelper.LoadGrid() self.oHelper.SetValue("Cod.Document", "001", grid=True, grid_number=1, ignore_case = True, row=2) self.oHelper.LoadGrid() self.oHelper.CheckResult("Cod.Document", "001", grid=True, line=2, grid_number=1) self.oHelper.CheckResult("Descricao", "TIPO DOCUMENTO GCT", grid=True, line=2, grid_number=1) self.oHelper.CheckResult("Recebido", "Nao", grid=True, line=2, grid_number=1) self.oHelper.LoadGrid() self.oHelper.SetButton('Confirmar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") #Restaura o filtro de pesquisa da browse chaveTit = " " self.oHelper.SearchBrowse(f'{chaveTit}', key=1, index=True) self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT211 #Alteração de titulo gravando informações na tabela FI2 #instruções de cobrança MV_INCOBBC #author Vitor Duca #since 30/11/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T56070 #----------------------------------------- def test_FINA050_CT211(self): self.oHelper.AddParameter("MV_INCOBBC","","2","2","2") self.oHelper.SetParameters() chaveTit = "D MG 01 FINFN050_211 NF 001 00" self.oHelper.WaitShow("Contas a Pagar") #Pesquisa titulo a pagar self.oHelper.SearchBrowse(f'{chaveTit}', key=1, index=True) self.oHelper.SetButton('Alterar') self.oHelper.SetValue('E2_NATUREZ',"001") #Tela de justificativa self.oHelper.SetButton('Outras Ações',sub_item='Justificativa') self.oHelper.SetButton('Salvar') self.oHelper.SetButton('Salvar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") #Restaura o filtro de pesquisa da browse chaveTit = " " self.oHelper.SearchBrowse(f'{chaveTit}', key=1, index=True) self.oHelper.AssertTrue() self.oHelper.RestoreParameters() #----------------------------------------- #{Protheus.doc} FINA050_CT212 # Inclusão de um titulo com ISS para validar a mensagem "Titulo com ISS: Municipio exige CPOM?" #author Vitor Duca #since 07/12/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T56204 #----------------------------------------- def test_FINA050_CT212(self): cPrefixo = "FIN" cTitulo = "FN050_212" cTipo = "NF " cNatureza = "CPOM" cFornece = "CPOM01" cLoja = "01" self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('M SP 02') self.oHelper.SetValue('E2_PREFIXO', cPrefixo) self.oHelper.SetValue('E2_NUM',cTitulo) self.oHelper.SetValue('E2_TIPO',cTipo) self.oHelper.SetValue('E2_NATUREZ',cNatureza) self.oHelper.SetValue('E2_FORNECE',cFornece) self.oHelper.SetValue('E2_LOJA',cLoja) self.oHelper.SetValue('E2_EMISSAO','08/12/2020') self.oHelper.SetValue('E2_VENCTO','08/12/2020') self.oHelper.SetValue('E2_VENCREA','08/12/2020') self.oHelper.SetValue('E2_VALOR','10.000,00') #Verifica valor dos impostos self.oHelper.ClickFolder('Impostos') self.oHelper.CheckResult("E2_ISS", '500,00') #Verificação do Help self.oHelper.SetButton('Salvar') self.oHelper.SetButton('Sim') self.oHelper.CheckHelp(text='F050CODSER',button='Fechar') self.oHelper.SetButton('Salvar') self.oHelper.SetButton('Não') #Deseja cadastrar os valores acessórios deste título agora? self.oHelper.SetButton('Não') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT213 # Inclusão de NF a pagar informando o valor dos impostos manualmente #author Vitor Duca #since 08/12/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T56242 #----------------------------------------- def test_FINA050_CT213(self): self.oHelper.AddParameter("MV_BX10925","","2","2","2") self.oHelper.SetParameters() cPrefixo = "FIN" cTitulo = "FN050_213" cTipo = "NF " cNatureza = "001" cFornece = "FIN008" cLoja = "01" self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO', cPrefixo) self.oHelper.SetValue('E2_NUM',cTitulo) self.oHelper.SetValue('E2_TIPO',cTipo) self.oHelper.SetValue('E2_NATUREZ',cNatureza) self.oHelper.SetValue('E2_FORNECE',cFornece) self.oHelper.SetValue('E2_LOJA',cLoja) self.oHelper.SetValue('E2_EMISSAO','08/12/2020') self.oHelper.SetValue('E2_VENCTO','08/12/2020') self.oHelper.SetValue('E2_VENCREA','08/12/2020') self.oHelper.SetValue('E2_VALOR','10.000,00') #Verifica valor dos impostos self.oHelper.ClickFolder('Impostos') self.oHelper.SetValue('E2_COFINS','300,00') self.oHelper.SetValue('E2_PIS','65,00') self.oHelper.SetValue('E2_CSLL','100,00') self.oHelper.SetValue('E2_IRRF','150,00') self.oHelper.SetValue('E2_INSS','110,00') #Verifica valor liquido do titulo self.oHelper.ClickFolder('Dados Gerais') self.oHelper.CheckResult("E2_VALOR", '9.275,00') self.oHelper.SetButton('Salvar') #Deseja cadastrar os valores acessórios deste título agora? self.oHelper.SetButton('Não') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() self.oHelper.RestoreParameters() #----------------------------------------- #{Protheus.doc} FINA050_CT214 #Inclusão de titulo a pagar com rateio contabil pré-configurado #author Vitor Duca #since 09/12/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T56262 #----------------------------------------- def test_FINA050_CT214(self): self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO','FIN') self.oHelper.SetValue('E2_NUM','FN050_214') self.oHelper.SetValue('E2_TIPO','NF') self.oHelper.SetValue('E2_NATUREZ','TIR001') self.oHelper.SetValue('E2_FORNECE','TIR001') self.oHelper.SetValue('E2_LOJA','01') self.oHelper.SetValue('E2_EMISSAO',DateSystem) self.oHelper.SetValue('E2_VENCTO',DateSystem) self.oHelper.SetValue('E2_VALOR','10.000,00') self.oHelper.ClickFolder('Contábil') self.oHelper.SetValue('E2_RATEIO','S') #Tela para escolher o tipo de rateio self.oHelper.SetValue('Pre-Configurado', True, grid=False) self.oHelper.SetValue('Codigo Rateio:','0001 ') self.oHelper.SetValue('Historico','TIR RATEIO CONF') self.oHelper.SetButton('Ok') #Tela de cadastro dos rateios contabeis self.oHelper.SetButton('Salvar') #Confirma inclusão do titulo self.oHelper.SetButton('Salvar') #Deseja cadastrar os valores acessórios deste título agora? self.oHelper.SetButton('Não') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #----------------------------------------- #{Protheus.doc} FINA050_CT217 #Inclusão de titulo a pagar validando o codigo de barras e linha digitavel #author Vitor Duca #since 22/12/2020 #version 1.0 #See https://jiraproducao.totvs.com.br/secure/Tests.jspa#/testCase/GTSER-T56540 #----------------------------------------- def test_FINA050_CT217(self): self.oHelper.WaitShow("Contas a Pagar") self.oHelper.SetButton('Incluir') self.oHelper.SetBranch('D MG 01') self.oHelper.SetValue('E2_PREFIXO','FIN') self.oHelper.SetValue('E2_NUM','FN050_217') self.oHelper.SetValue('E2_TIPO','NF') self.oHelper.SetValue('E2_NATUREZ','TIR001') self.oHelper.SetValue('E2_FORNECE','TIR001') self.oHelper.SetValue('E2_LOJA','01') self.oHelper.SetValue('E2_EMISSAO',DateSystem) self.oHelper.SetValue('E2_VENCTO',DateSystem) self.oHelper.SetValue('E2_VALOR','1.000,00') #Codigo de barras / linha digitavel self.oHelper.SetButton('Outras Ações',sub_item='Código de barras') self.oHelper.SetValue("Código de barras / linha digitável",'10499541322200010001012405542742484800000084564') self.oHelper.SetButton("OK") self.oHelper.ClickFolder('Banco') self.oHelper.CheckResult('E2_CODBAR','10494848000000845649541322000100011240554274') self.oHelper.CheckResult('E2_LINDIG','10499541322200010001012405542742484800000084564 ') #Confirma inclusão do titulo self.oHelper.SetButton('Salvar') #Deseja cadastrar os valores acessórios deste título agora? self.oHelper.SetButton('Não') self.oHelper.SetButton('Cancelar') #Verifica se voltou para a browse do contas a pagar self.oHelper.WaitShow("Contas a Pagar") self.oHelper.AssertTrue() #------------------------------------------- # Encerramento class para TIR - FINA050 #------------------------------------------- @classmethod def tearDownClass(inst): inst.oHelper.TearDown() if __name__ == '__main__': unittest.main()
34.335098
161
0.691877
6,011
45,391
5.157711
0.093662
0.213592
0.117666
0.099571
0.828339
0.775473
0.752798
0.725059
0.701384
0.68245
0
0.059621
0.116124
45,391
1,322
162
34.335098
0.713136
0.259545
0
0.645892
0
0.001416
0.236963
0.006215
0
0
0
0
0.036827
1
0.038244
false
0
0.005666
0
0.045326
0
0
0
0
null
1
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
6668b41bd2286d4e80cfc42c4c8313ebb3ecb9c6
9,211
py
Python
tests/marltoolbox/examples_and_experiments/manual_test_end_to_end.py
longtermrisk/marltoolbox
cae1ba94ccb44700b66a32e0734a0f11c9c6c7fe
[ "MIT" ]
17
2021-01-17T21:21:08.000Z
2022-01-27T00:57:30.000Z
tests/marltoolbox/examples_and_experiments/manual_test_end_to_end.py
longtermrisk/marltoolbox
cae1ba94ccb44700b66a32e0734a0f11c9c6c7fe
[ "MIT" ]
5
2021-02-21T21:43:00.000Z
2021-05-04T12:27:23.000Z
tests/marltoolbox/examples_and_experiments/manual_test_end_to_end.py
longtermrisk/marltoolbox
cae1ba94ccb44700b66a32e0734a0f11c9c6c7fe
[ "MIT" ]
3
2021-02-21T11:38:22.000Z
2022-03-04T12:06:19.000Z
# Run this directly with # pytest file_path.py import ray from marltoolbox.utils import postprocessing from marltoolbox.utils.miscellaneous import check_learning_achieved def print_metrics_available(tune_analysis): print("metric available in tune_analysis:", tune_analysis.results_df.columns.tolist()) def test_pg_ipd(): from marltoolbox.examples.rllib_api.pg_ipd import main # Restart Ray defensively in case the ray connection is lost. ray.shutdown() tune_analysis = main(debug=False) print_metrics_available(tune_analysis) check_learning_achieved( tune_results=tune_analysis, max_=-75) check_learning_achieved( tune_results=tune_analysis, min_=0.9, metric="custom_metrics.DD_freq/player_row_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.9, metric="custom_metrics.DD_freq/player_col_mean") def test_ltft_ipd(): from marltoolbox.experiments.rllib_api.ltft_various_env import main ray.shutdown() tune_analysis_self_play, tune_analysis_against_opponent = main( debug=False, env="IteratedPrisonersDilemma", train_n_replicates=1, against_naive_opp=True) print_metrics_available(tune_analysis_self_play) check_learning_achieved( tune_results=tune_analysis_self_play, min_=-42) check_learning_achieved( tune_results=tune_analysis_self_play, min_=0.9, metric="custom_metrics.CC_freq/player_row_mean") check_learning_achieved( tune_results=tune_analysis_self_play, min_=0.9, metric="custom_metrics.CC_freq/player_col_mean") print_metrics_available(tune_analysis_against_opponent) check_learning_achieved( tune_results=tune_analysis_against_opponent, max_=-75) check_learning_achieved( tune_results=tune_analysis_against_opponent, min_=0.9, metric="custom_metrics.DD_freq/player_row_mean") check_learning_achieved( tune_results=tune_analysis_against_opponent, min_=0.9, metric="custom_metrics.DD_freq/player_col_mean") def test_amtft_ipd(): from marltoolbox.experiments.rllib_api.amtft_various_env import main ray.shutdown() tune_analysis_per_welfare, analysis_metrics_per_mode = main( debug=False, train_n_replicates=1, filter_utilitarian=False, env="IteratedPrisonersDilemma") for welfare_name, tune_analysis in tune_analysis_per_welfare.items(): print("welfare_name", welfare_name) print_metrics_available(tune_analysis) check_learning_achieved( tune_results=tune_analysis, min_=-204) check_learning_achieved( tune_results=tune_analysis, min_=0.9, metric="custom_metrics.CC_freq/player_row_mean" ) check_learning_achieved( tune_results=tune_analysis, min_=0.9, metric="custom_metrics.CC_freq/player_col_mean" ) def test_ppo_asym_coin_game(): from marltoolbox.examples.rllib_api.ppo_coin_game import main ray.shutdown() tune_analysis = main(debug=False, stop_iters=200) print_metrics_available(tune_analysis) check_learning_achieved( tune_results=tune_analysis, min_=15) check_learning_achieved( tune_results=tune_analysis, min_=0.30, metric="custom_metrics.pick_speed/player_red_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.30, metric="custom_metrics.pick_speed/player_blue_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.40, max_=0.60, metric="custom_metrics.pick_own_color/player_red_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.40, max_=0.60, metric="custom_metrics.pick_own_color/player_blue_mean") def test_dqn_coin_game(): from marltoolbox.examples.rllib_api.dqn_coin_game import main ray.shutdown() tune_analysis = main(debug=False) print_metrics_available(tune_analysis) check_learning_achieved( tune_results=tune_analysis, max_=20) check_learning_achieved( tune_results=tune_analysis, min_=0.5, metric="custom_metrics.pick_speed/player_red_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.5, metric="custom_metrics.pick_speed/player_blue_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.40, max_=0.6, metric="custom_metrics.pick_own_color/player_red_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.40, max_=0.6, metric="custom_metrics.pick_own_color/player_blue_mean") def test_dqn_wt_utilitarian_welfare_coin_game(): from marltoolbox.examples.rllib_api.dqn_wt_welfare import main ray.shutdown() tune_analysis = main(debug=False) print_metrics_available(tune_analysis) check_learning_achieved( tune_results=tune_analysis, min_=50) check_learning_achieved( tune_results=tune_analysis, min_=0.3, metric="custom_metrics.pick_speed/player_red_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.3, metric="custom_metrics.pick_speed/player_blue_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.95, metric="custom_metrics.pick_own_color/player_red_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.95, metric="custom_metrics.pick_own_color/player_blue_mean") def test_dqn_wt_inequity_aversion_welfare_coin_game(): from marltoolbox.examples.rllib_api.dqn_wt_welfare import main ray.shutdown() tune_analysis = main(debug=False, welfare=postprocessing.WELFARE_INEQUITY_AVERSION) print_metrics_available(tune_analysis) check_learning_achieved( tune_results=tune_analysis, min_=50) check_learning_achieved( tune_results=tune_analysis, min_=0.25, metric="custom_metrics.pick_speed/player_red_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.25, metric="custom_metrics.pick_speed/player_blue_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.9, metric="custom_metrics.pick_own_color/player_red_mean") check_learning_achieved( tune_results=tune_analysis, min_=0.9, metric="custom_metrics.pick_own_color/player_blue_mean") def test_ltft_coin_game(): from marltoolbox.experiments.rllib_api.ltft_various_env import main ray.shutdown() tune_analysis_self_play, tune_analysis_against_opponent = main( debug=False, env="CoinGame", train_n_replicates=1, against_naive_opp=True) print_metrics_available(tune_analysis_self_play) check_learning_achieved( tune_results=tune_analysis_self_play, min_=50) check_learning_achieved( tune_results=tune_analysis_self_play, min_=0.3, metric="custom_metrics.pick_speed/player_red_mean") check_learning_achieved( tune_results=tune_analysis_self_play, min_=0.3, metric="custom_metrics.pick_speed/player_blue_mean") check_learning_achieved( tune_results=tune_analysis_self_play, min_=0.9, metric="custom_metrics.pick_own_color/player_red_mean") check_learning_achieved( tune_results=tune_analysis_self_play, min_=0.9, metric="custom_metrics.pick_own_color/player_blue_mean") print_metrics_available(tune_analysis_against_opponent) check_learning_achieved( tune_results=tune_analysis_against_opponent, max_=20) check_learning_achieved( tune_results=tune_analysis_against_opponent, min_=0.3, metric="custom_metrics.pick_speed/player_red_mean") check_learning_achieved( tune_results=tune_analysis_against_opponent, min_=0.3, metric="custom_metrics.pick_speed/player_blue_mean") check_learning_achieved( tune_results=tune_analysis_against_opponent, max_=0.6, metric="custom_metrics.pick_own_color/player_red_mean") check_learning_achieved( tune_results=tune_analysis_against_opponent, max_=0.6, metric="custom_metrics.pick_own_color/player_blue_mean") def test_amtft_coin_game(): from marltoolbox.experiments.rllib_api.amtft_various_env import main ray.shutdown() tune_analysis_per_welfare, analysis_metrics_per_mode = main( debug=False, train_n_replicates=1, filter_utilitarian=False, env="CoinGame") for welfare_name, tune_analysis in tune_analysis_per_welfare.items(): print("welfare_name", welfare_name) print_metrics_available(tune_analysis) check_learning_achieved( tune_results=tune_analysis, min_=40) check_learning_achieved( tune_results=tune_analysis, min_=0.25, metric="custom_metrics.pick_speed/player_red_mean")
35.426923
74
0.719683
1,167
9,211
5.193659
0.0994
0.144531
0.155915
0.181488
0.92163
0.911071
0.908926
0.899852
0.892922
0.891272
0
0.015988
0.205515
9,211
259
75
35.563707
0.812244
0.011074
0
0.82906
0
0
0.165953
0.157825
0
0
0
0
0
1
0.042735
false
0
0.051282
0
0.094017
0.064103
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
66d2daf4e77ec54634191bcb9bbed0ab021fd1ae
1,852
py
Python
py/tests/problems/linkedlist/k_last_test.py
bmoretz/Daily-Coding-Problem
f79e062e9f6e7b18b7e95c071fbe71ad104affcb
[ "MIT" ]
1
2020-06-26T13:28:43.000Z
2020-06-26T13:28:43.000Z
py/tests/problems/linkedlist/k_last_test.py
bmoretz/Daily-Coding-Problem
f79e062e9f6e7b18b7e95c071fbe71ad104affcb
[ "MIT" ]
7
2021-11-18T19:46:08.000Z
2022-03-12T01:03:01.000Z
py/tests/problems/linkedlist/k_last_test.py
bmoretz/Daily-Coding-Problem
f79e062e9f6e7b18b7e95c071fbe71ad104affcb
[ "MIT" ]
null
null
null
import unittest from dcp.problems.linkedlist.single import build_list from dcp.problems.linkedlist.kth_last import klast1, klast2 class Test_KLast1(unittest.TestCase): def setUp(self): pass def test_case1(self): assert klast1(None, 0) == None def test_case2(self): values = build_list([1, 2, 3, 4, 5, 6, 7]) actual = klast1(values, 0) expected = 7 assert actual == expected def test_case3(self): values = build_list([1, 2, 3, 4, 5, 6, 7]) actual = klast1(values, 2) expected = 5 assert actual == expected def test_case4(self): values = build_list([1, 2, 3, 4, 5, 6, 7]) actual = klast1(values, 6) expected = 1 assert actual == expected def test_case5(self): values = build_list([1, 2, 3, 4, 5, 6, 7]) actual = klast1(values, 3) expected = 4 assert expected == actual class Test_KLast2(unittest.TestCase): def setUp(self): pass def test_case1(self): assert klast2(None, 0) == None def test_case2(self): values = build_list([1, 2, 3, 4, 5, 6, 7]) actual = klast2(values, 0) expected = 7 assert actual == expected def test_case3(self): values = build_list([1, 2, 3, 4, 5, 6, 7]) actual = klast2(values, 2) expected = 5 assert actual == expected def test_case4(self): values = build_list([1, 2, 3, 4, 5, 6, 7]) actual = klast2(values, 6) expected = 1 assert actual == expected def test_case5(self): values = build_list([1, 2, 3, 4, 5, 6, 7]) actual = klast2(values, 3) expected = 4 assert expected == actual
19.702128
59
0.533477
239
1,852
4.041841
0.158996
0.072464
0.124224
0.15735
0.84265
0.84265
0.84265
0.780538
0.780538
0.780538
0
0.082146
0.355832
1,852
94
60
19.702128
0.727578
0
0
0.716981
0
0
0
0
0
0
0
0
0.188679
1
0.226415
false
0.037736
0.056604
0
0.320755
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
8
66eda3d332520ebcd4e7abe80a18b2533dac249d
195
py
Python
nz_django/day6/error_view_demo/errors/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_django/day6/error_view_demo/errors/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_django/day6/error_view_demo/errors/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from django.shortcuts import render def view_403(request): return render(request,'errors/403.html',status=403) def view_400(request): return render(request,'errors/400.html',status=400)
27.857143
55
0.764103
29
195
5.068966
0.482759
0.095238
0.258503
0.353742
0.435374
0
0
0
0
0
0
0.103448
0.107692
195
7
56
27.857143
0.741379
0
0
0
0
0
0.153061
0
0
0
0
0
0
1
0.4
false
0
0.2
0.4
1
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
7
dd4b8946637a549292a29510dfed57222080de0f
4,543
py
Python
tests/services/test_webhook.py
AntoineAugusti/croquemort
eb972ebee6a17c16ac838edffdaa1d3c3ea23b6e
[ "MIT" ]
14
2015-05-26T12:23:48.000Z
2016-03-11T16:01:32.000Z
tests/services/test_webhook.py
AntoineAugusti/croquemort
eb972ebee6a17c16ac838edffdaa1d3c3ea23b6e
[ "MIT" ]
79
2016-08-11T06:32:15.000Z
2019-08-21T08:07:29.000Z
tests/services/test_webhook.py
AntoineAugusti/croquemort
eb972ebee6a17c16ac838edffdaa1d3c3ea23b6e
[ "MIT" ]
4
2019-08-27T23:31:45.000Z
2021-02-09T09:52:28.000Z
import requests import requests_mock from nameko.standalone.events import event_dispatcher from nameko.testing.services import entrypoint_waiter, replace_dependencies from croquemort.webhook import WebhookService from ..utils import filter_mock_requests @requests_mock.Mocker(kw='rmock', real_http=True) def test_webhook_valid_call( web_container_config, container_factory, rmock=None): test_url = 'http://example.org' test_cb_url = 'http://example.org/cb' container = container_factory(WebhookService, web_container_config) storage = replace_dependencies(container, 'storage') storage.get_webhooks_for_url = lambda url: [test_cb_url] container.start() dispatch = event_dispatcher(web_container_config) rmock.post(test_cb_url, text='xxx') with entrypoint_waiter(container, 'send_response'): dispatch('url_crawler', 'url_crawled', {'checked-url': test_url}) requests_l = filter_mock_requests(test_cb_url, rmock.request_history) assert len(requests_l) == 1 request = requests_l[0] assert request.method == 'POST' assert request.url == test_cb_url assert request.json() == {'data': {'checked-url': test_url}} @requests_mock.Mocker(kw='rmock', real_http=True) def test_webhook_retry( web_container_config, container_factory, rmock=None): test_url = 'http://example.org' test_cb_url = 'http://example.org/cb' web_container_config['WEBHOOK_DELAY_INTERVAL'] = 1 web_container_config['WEBHOOK_BACKOFF_FACTOR'] = 1 container = container_factory(WebhookService, web_container_config) storage = replace_dependencies(container, 'storage') storage.get_webhooks_for_url = lambda url: [test_cb_url] container.start() dispatch = event_dispatcher(web_container_config) # 1 failed response and then a valid one rmock.post(test_cb_url, [{'status_code': 404}, {'status_code': 200}]) with entrypoint_waiter(container, 'send_response'): dispatch('url_crawler', 'url_crawled', {'checked-url': test_url}) requests_l = filter_mock_requests(test_cb_url, rmock.request_history) assert len(requests_l) == 2 request = requests_l[-1] assert request.method == 'POST' assert request.url == test_cb_url assert request.json() == {'data': {'checked-url': test_url}} @requests_mock.Mocker(kw='rmock', real_http=True) def test_webhook_timeout_retry( web_container_config, container_factory, rmock=None): test_url = 'http://example.org' test_cb_url = 'http://example.org/cb' web_container_config['WEBHOOK_DELAY_INTERVAL'] = 1 web_container_config['WEBHOOK_BACKOFF_FACTOR'] = 1 container = container_factory(WebhookService, web_container_config) storage = replace_dependencies(container, 'storage') storage.get_webhooks_for_url = lambda url: [test_cb_url] container.start() dispatch = event_dispatcher(web_container_config) # 1 failed response and then a valid one rmock.post(test_cb_url, [{'exc': requests.exceptions.ConnectTimeout}, {'status_code': 200}]) with entrypoint_waiter(container, 'send_response'): dispatch('url_crawler', 'url_crawled', {'checked-url': test_url}) requests_l = filter_mock_requests(test_cb_url, rmock.request_history) assert len(requests_l) == 2 request = requests_l[-1] assert request.method == 'POST' assert request.url == test_cb_url assert request.json() == {'data': {'checked-url': test_url}} @requests_mock.Mocker(kw='rmock', real_http=True) def test_webhook_multiple_urls( web_container_config, container_factory, rmock=None): test_url = 'http://example.org' test_cb_url = 'http://example.org/cb' test_cb_url_2 = 'http://example.org/cb2' container = container_factory(WebhookService, web_container_config) storage = replace_dependencies(container, 'storage') storage.get_webhooks_for_url = lambda url: [test_cb_url, test_cb_url_2] container.start() dispatch = event_dispatcher(web_container_config) rmock.post(test_cb_url, text='xxx') rmock.post(test_cb_url_2, text='xxx') with entrypoint_waiter(container, 'send_response'): dispatch('url_crawler', 'url_crawled', {'checked-url': test_url}) requests_l = filter_mock_requests(test_cb_url, rmock.request_history) assert len(requests_l) == 2 for request in requests_l: assert request.method == 'POST' assert request.url == test_cb_url or test_cb_url_2 assert request.json() == {'data': {'checked-url': test_url}}
44.539216
75
0.728593
598
4,543
5.200669
0.148829
0.046302
0.069453
0.034727
0.876527
0.87074
0.87074
0.87074
0.858521
0.858521
0
0.007042
0.156064
4,543
101
76
44.980198
0.804121
0.016949
0
0.775281
0
0
0.138696
0.019718
0
0
0
0
0.179775
1
0.044944
false
0
0.067416
0
0.11236
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
dd781348885e402acb97a0d32dcb24f4622559dc
3,543
py
Python
tests/XXX_test_simu_call_event.py
manatlan/gtag
1e31cf9483a121cc769831ff6b94e7663a1eb0bf
[ "Apache-2.0" ]
10
2020-05-19T07:17:37.000Z
2021-11-15T09:40:30.000Z
tests/XXX_test_simu_call_event.py
manatlan/gtag
1e31cf9483a121cc769831ff6b94e7663a1eb0bf
[ "Apache-2.0" ]
1
2020-06-19T11:48:22.000Z
2020-06-19T15:13:11.000Z
tests/XXX_test_simu_call_event.py
manatlan/gtag
1e31cf9483a121cc769831ff6b94e7663a1eb0bf
[ "Apache-2.0" ]
1
2020-10-02T00:52:58.000Z
2020-10-02T00:52:58.000Z
# #!/usr/bin/python3 -u # import pytest # from gtag import GTag,Tag,render # from . import GSimu # def myexec(x): # return {} # cbs=dict( # execute=myexec, # getSessionId= lambda: None, # GID is None # ) # @pytest.mark.parametrize("webMode", [False,True]) # def testSimple(webMode): # class My(GTag): # def build(self): # return "Hello" # def evt(self,p): # self.r=p # s=GSimu( My(),webMode ,cbs) # s.callEvent( s.main.id, "evt",1) # assert s.main.r==1 # @pytest.mark.parametrize("webMode", [False,True]) # def testSimpleBad(webMode): # class My(GTag): # def build(self): # return "Hello" # def evt(self,p): # return "yyy" # wtf ?! # s=GSimu( My(),webMode ,cbs) # with pytest.raises(Exception): # s.callEvent( s.main.id, "evt",1) # @pytest.mark.parametrize("webMode", [False,True]) # def testSimpleBadAsync(webMode): # class My(GTag): # def build(self): # return "Hello" # async def evt(self,p): # return "yyy" # wtf ?! # s=GSimu( My(),webMode ,cbs) # with pytest.raises(Exception): # s.callEvent( s.main.id, "evt",1) # @pytest.mark.parametrize("webMode", [False,True]) # def testSimpleBadAsyncGen(webMode): # class My(GTag): # def build(self): # return "Hello" # async def evt(self,p): # yield "yyy" # wtf ?! # s=GSimu( My(),webMode ,cbs) # with pytest.raises(Exception): # s.callEvent( s.main.id, "evt",1) # @pytest.mark.parametrize("webMode", [False,True]) # def testSimple2(webMode): # class My(GTag): # def build(self): # return "Hello" # async def evt(self,p): # self.r=p # s=GSimu( My(),webMode , cbs) # s.callEvent( s.main.id, "evt",1) # assert s.main.r==1 # @pytest.mark.parametrize("webMode", [False,True]) # def testTheComplex(webMode): # class My(GTag): # def build(self): # return "Hello" # @render.local # async def evt(self,a,b=10,c=20): # print("render") # yield # print("render") # self.r=a+b+c # s=GSimu( My(),webMode,cbs ) # s.callEvent( s.main.id, "evt",1,c=30) # assert s.main.r==41 # @pytest.mark.parametrize("webMode", [False,True]) # def testStartAsyncGen(webMode): # class My(GTag): # def build(self): # return "Hello" # async def evt(self,a,b=10,c=20): # print("render") # yield # print("render") # self.r=a+b+c # def assertRender(x): # assert "self.bindUpdate(" in x # assert ',GID,\'_start\',[],{},{})' in x # return {} # cbs=dict( # execute=assertRender, # getSessionId= lambda: None, # GID is None # ) # app=My() # app._call = app.evt(1,c=30) # s=GSimu( app,webMode,cbs) # @pytest.mark.parametrize("webMode", [False,True]) # def testStartAsync(webMode): # class My(GTag): # def build(self): # return "Hello" # async def evt(self,a,b=10,c=20): # self.r=a+b+c # def assertRender(x): # assert "self.bindUpdate(" in x # assert ',GID,\'_start\',[],{},{})' in x # return {} # cbs=dict( # execute=assertRender, # getSessionId= lambda: None, # GID is None # ) # app=My() # app._call = app.evt(1,c=30) # s=GSimu( app,webMode,cbs)
23.62
51
0.521874
434
3,543
4.251152
0.165899
0.02439
0.091057
0.121409
0.873171
0.861789
0.844986
0.779946
0.779946
0.757724
0
0.012914
0.300593
3,543
149
52
23.778523
0.731638
0.923793
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
8
dd7f3868a48189fbfd928e485ff09abba502eef4
1,717
py
Python
examples/selenium/conftest.py
echo2477/demo-python
adc55aa8075dbd46f94d1ae68f2acfd8f20720d5
[ "MIT" ]
42
2019-02-27T03:28:52.000Z
2022-01-25T21:18:45.000Z
examples/selenium/conftest.py
echo2477/demo-python
adc55aa8075dbd46f94d1ae68f2acfd8f20720d5
[ "MIT" ]
12
2019-05-10T23:43:55.000Z
2021-11-05T21:20:02.000Z
examples/selenium/conftest.py
echo2477/demo-python
adc55aa8075dbd46f94d1ae68f2acfd8f20720d5
[ "MIT" ]
38
2019-02-27T03:28:52.000Z
2022-02-17T07:27:08.000Z
import os import pytest import urllib3 from selenium import webdriver from selenium.webdriver.chrome.options import Options as ChromeOptions urllib3.disable_warnings() @pytest.fixture() def headless_driver(request): options = ChromeOptions() options.browser_version = 'latest' options.platform_name = 'Windows 10' options.headless = True sauce_options = {'username': os.environ["SAUCE_USERNAME"], 'accessKey': os.environ["SAUCE_ACCESS_KEY"], 'name': request.node.name} options.set_capability('sauce:options', sauce_options) sauce_url = "https://ondemand.us-west-1.saucelabs.com/wd/hub" driver = webdriver.Remote(command_executor=sauce_url, options=options) yield driver if driver is not None: sauce_result = "failed" if request.session.testsfailed == 1 else "passed" driver.execute_script("sauce:job-result={}".format(sauce_result)) driver.quit() @pytest.fixture() def driver(request): options = ChromeOptions() options.browser_version = 'latest' options.platform_name = 'Windows 10' sauce_options = {'username': os.environ["SAUCE_USERNAME"], 'accessKey': os.environ["SAUCE_ACCESS_KEY"], 'name': request.node.name} options.set_capability('sauce:options', sauce_options) sauce_url = "https://ondemand.us-west-1.saucelabs.com/wd/hub" driver = webdriver.Remote(command_executor=sauce_url, options=options) yield driver if driver is not None: sauce_result = "failed" if request.session.testsfailed == 1 else "passed" driver.execute_script("sauce:job-result={}".format(sauce_result)) driver.quit()
30.660714
81
0.684333
202
1,717
5.668317
0.316832
0.062882
0.048908
0.057642
0.822707
0.822707
0.822707
0.822707
0.822707
0.822707
0
0.007262
0.19802
1,717
55
82
31.218182
0.824256
0
0
0.769231
0
0
0.184042
0
0
0
0
0
0
1
0.051282
false
0.051282
0.128205
0
0.179487
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
8
dd8bd665ff0ea21697e6ff81bf55becb45e36493
139
py
Python
part7/import_registry_decorator.py
nazariinyzhnyk/fluent-python
466303a5191c2cae9c9fd986fb8b71c3eeea8479
[ "MIT" ]
null
null
null
part7/import_registry_decorator.py
nazariinyzhnyk/fluent-python
466303a5191c2cae9c9fd986fb8b71c3eeea8479
[ "MIT" ]
null
null
null
part7/import_registry_decorator.py
nazariinyzhnyk/fluent-python
466303a5191c2cae9c9fd986fb8b71c3eeea8479
[ "MIT" ]
null
null
null
import part7.registry_decorator print(part7.registry_decorator.registry) # when imported also decorator is executed and f1 f2 registered
34.75
105
0.841727
19
139
6.052632
0.736842
0.226087
0.382609
0
0
0
0
0
0
0
0
0.03252
0.115108
139
3
106
46.333333
0.902439
0.438849
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
7
b0771c5efcc27e6f44a3695312eaf4c7108a7543
1,869
py
Python
mvpa_itab/script/carlo/analysis.py
robbisg/mvpa_itab_wu
e3cdb198a21349672f601cd34381e0895fa6484c
[ "MIT" ]
1
2022-01-12T08:59:22.000Z
2022-01-12T08:59:22.000Z
mvpa_itab/script/carlo/analysis.py
robbisg/mvpa_itab_wu
e3cdb198a21349672f601cd34381e0895fa6484c
[ "MIT" ]
46
2016-08-04T14:49:37.000Z
2022-03-09T08:47:48.000Z
mvpa_itab/script/carlo/analysis.py
robbisg/mvpa_itab_wu
e3cdb198a21349672f601cd34381e0895fa6484c
[ "MIT" ]
null
null
null
import numpy as np def carlo_memory_set_targets(ds, configuration, **conditions): evidence = conditions['evidence'] task = conditions['task'] conf = dict() # label managing if task == 'memory': conf['field'] = 'stim' conf['label_dropped'] = 'F0' conf['label_included'] = 'N'+evidence+','+'O'+evidence elif task == "decision": # decision conf['field'] = 'decision' conf['label_dropped'] = 'FIX0' conf['label_included'] = 'NEW'+evidence+','+'OLD'+evidence field_ = conf.pop('field') configuration.update(conf) targets = np.core.defchararray.add(np.array(ds.sa[field_].value, dtype=np.str), np.array(ds.sa.evidence, dtype= np.str)) return targets, configuration def carlo_ofp_set_targets(ds, configuration, **conditions): evidence = conditions['evidence'] task = conditions['task'] conf = dict() # label managing if task == 'memory': conf['field'] = 'stim' conf['label_dropped'] = 'N0' conf['label_included'] = 'F'+evidence+','+'L'+evidence else: # decision conf['field'] = 'decision' conf['label_dropped'] = 'N0' conf['label_included'] = 'F'+evidence+','+'L'+evidence field_ = conf.pop('field') configuration.update(conf) targets = np.core.defchararray.add(np.array(ds.sa[field_].value, dtype=np.str), np.array(ds.sa.evidence, dtype= np.str)) return targets, configuration
28.318182
69
0.483681
172
1,869
5.151163
0.273256
0.081264
0.072235
0.049661
0.851016
0.851016
0.851016
0.776524
0.776524
0.776524
0
0.003466
0.382558
1,869
65
70
28.753846
0.764298
0.025147
0
0.769231
0
0
0.127753
0
0.102564
0
0
0
0
1
0.051282
false
0
0.025641
0
0.128205
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
b08caf44eff456510b935e501277e43cbe492a96
108
py
Python
hiddenconsolestart/main.py
RDCH106/hidden_console_start
302165fa628d4ba27075432bb0bc1c0ac262ee0a
[ "MIT" ]
1
2019-01-22T23:44:17.000Z
2019-01-22T23:44:17.000Z
hiddenconsolestart/main.py
RDCH106/hidden_console_start
302165fa628d4ba27075432bb0bc1c0ac262ee0a
[ "MIT" ]
null
null
null
hiddenconsolestart/main.py
RDCH106/hidden_console_start
302165fa628d4ba27075432bb0bc1c0ac262ee0a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import hiddenconsolestart.hcs def main(): hiddenconsolestart.hcs.HCS().run()
13.5
38
0.657407
12
108
5.916667
0.75
0.591549
0
0
0
0
0
0
0
0
0
0.010989
0.157407
108
7
39
15.428571
0.769231
0.194444
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
7
b0f14801e1142f7807d1ce5c78ec6f478489fc90
175
py
Python
redtrics/core/settings.py
Redmart/redtrics
3af32593faebe543a89f922cd3b53d1e594cc586
[ "MIT" ]
2
2016-05-05T15:27:06.000Z
2016-05-06T07:29:44.000Z
redtrics/core/settings.py
Redmart/redtrics
3af32593faebe543a89f922cd3b53d1e594cc586
[ "MIT" ]
null
null
null
redtrics/core/settings.py
Redmart/redtrics
3af32593faebe543a89f922cd3b53d1e594cc586
[ "MIT" ]
1
2020-03-03T07:41:03.000Z
2020-03-03T07:41:03.000Z
# -*- coding: utf-8 -*- import imp from default_settings import * # NOQA imp.load_source('my_settings', '/opt/redtrics/etc/settings.py') from my_settings import * # NOQA
19.444444
63
0.702857
25
175
4.76
0.64
0.235294
0.302521
0
0
0
0
0
0
0
0
0.006711
0.148571
175
8
64
21.875
0.791946
0.177143
0
0
0
0
0.285714
0.207143
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
7c06997458d7fbb185f0f21206eeafd3ee8ca6b2
655
py
Python
train_covid19china_timm-regnetx_002_random_brightness_contrast.py
BrunoKrinski/segtool
cb604b5f38104c43a76450136e37c3d1c4b6d275
[ "MIT" ]
null
null
null
train_covid19china_timm-regnetx_002_random_brightness_contrast.py
BrunoKrinski/segtool
cb604b5f38104c43a76450136e37c3d1c4b6d275
[ "MIT" ]
null
null
null
train_covid19china_timm-regnetx_002_random_brightness_contrast.py
BrunoKrinski/segtool
cb604b5f38104c43a76450136e37c3d1c4b6d275
[ "MIT" ]
null
null
null
import os ls=["python main.py --configs configs/train_covid19china_unetplusplus_timm-regnetx_002_fold0_random_brightness_contrast.yml", "python main.py --configs configs/train_covid19china_unetplusplus_timm-regnetx_002_fold1_random_brightness_contrast.yml", "python main.py --configs configs/train_covid19china_unetplusplus_timm-regnetx_002_fold2_random_brightness_contrast.yml", "python main.py --configs configs/train_covid19china_unetplusplus_timm-regnetx_002_fold3_random_brightness_contrast.yml", "python main.py --configs configs/train_covid19china_unetplusplus_timm-regnetx_002_fold4_random_brightness_contrast.yml", ] for l in ls: os.system(l)
59.545455
125
0.873282
90
655
5.911111
0.288889
0.093985
0.112782
0.178571
0.851504
0.851504
0.851504
0.851504
0.851504
0.851504
0
0.048077
0.047328
655
11
126
59.545455
0.804487
0
0
0
0
0
0.89939
0.708841
0
0
0
0
0
1
0
false
0
0.111111
0
0.111111
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
9fde34f5972ce67f1af660a1757c365b44b4d792
16,596
py
Python
yandex/cloud/containerregistry/v1/repository_service_pb2_grpc.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
36
2018-12-23T13:51:50.000Z
2022-03-25T07:48:24.000Z
yandex/cloud/containerregistry/v1/repository_service_pb2_grpc.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
15
2019-02-28T04:55:09.000Z
2022-03-06T23:17:24.000Z
yandex/cloud/containerregistry/v1/repository_service_pb2_grpc.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
18
2019-02-23T07:10:57.000Z
2022-03-28T14:41:08.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from yandex.cloud.access import access_pb2 as yandex_dot_cloud_dot_access_dot_access__pb2 from yandex.cloud.containerregistry.v1 import repository_pb2 as yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__pb2 from yandex.cloud.containerregistry.v1 import repository_service_pb2 as yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2 from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2 class RepositoryServiceStub(object): """A set of methods for managing Repository resources. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.Get = channel.unary_unary( '/yandex.cloud.containerregistry.v1.RepositoryService/Get', request_serializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.GetRepositoryRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__pb2.Repository.FromString, ) self.GetByName = channel.unary_unary( '/yandex.cloud.containerregistry.v1.RepositoryService/GetByName', request_serializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.GetRepositoryByNameRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__pb2.Repository.FromString, ) self.List = channel.unary_unary( '/yandex.cloud.containerregistry.v1.RepositoryService/List', request_serializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.ListRepositoriesRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.ListRepositoriesResponse.FromString, ) self.ListAccessBindings = channel.unary_unary( '/yandex.cloud.containerregistry.v1.RepositoryService/ListAccessBindings', request_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsResponse.FromString, ) self.Upsert = channel.unary_unary( '/yandex.cloud.containerregistry.v1.RepositoryService/Upsert', request_serializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.UpsertRepositoryRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) self.Delete = channel.unary_unary( '/yandex.cloud.containerregistry.v1.RepositoryService/Delete', request_serializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.DeleteRepositoryRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) self.SetAccessBindings = channel.unary_unary( '/yandex.cloud.containerregistry.v1.RepositoryService/SetAccessBindings', request_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.SetAccessBindingsRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) self.UpdateAccessBindings = channel.unary_unary( '/yandex.cloud.containerregistry.v1.RepositoryService/UpdateAccessBindings', request_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.UpdateAccessBindingsRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) class RepositoryServiceServicer(object): """A set of methods for managing Repository resources. """ def Get(self, request, context): """Returns the specified Repository resource. To get the list of available Repository resources, make a [List] request. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def GetByName(self, request, context): """Returns the specified Repository resource. To get the list of available Repository resources, make a [List] request. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def List(self, request, context): """Retrieves the list of Repository resources in the specified registry. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def ListAccessBindings(self, request, context): """access Lists access bindings for the specified repository. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def Upsert(self, request, context): """Upserts a repository in the specified registry. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def Delete(self, request, context): """Deletes the specified repository. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def SetAccessBindings(self, request, context): """Sets access bindings for the specified repository. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def UpdateAccessBindings(self, request, context): """Updates access bindings for the specified repository. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_RepositoryServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'Get': grpc.unary_unary_rpc_method_handler( servicer.Get, request_deserializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.GetRepositoryRequest.FromString, response_serializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__pb2.Repository.SerializeToString, ), 'GetByName': grpc.unary_unary_rpc_method_handler( servicer.GetByName, request_deserializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.GetRepositoryByNameRequest.FromString, response_serializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__pb2.Repository.SerializeToString, ), 'List': grpc.unary_unary_rpc_method_handler( servicer.List, request_deserializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.ListRepositoriesRequest.FromString, response_serializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.ListRepositoriesResponse.SerializeToString, ), 'ListAccessBindings': grpc.unary_unary_rpc_method_handler( servicer.ListAccessBindings, request_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsRequest.FromString, response_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsResponse.SerializeToString, ), 'Upsert': grpc.unary_unary_rpc_method_handler( servicer.Upsert, request_deserializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.UpsertRepositoryRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), 'Delete': grpc.unary_unary_rpc_method_handler( servicer.Delete, request_deserializer=yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.DeleteRepositoryRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), 'SetAccessBindings': grpc.unary_unary_rpc_method_handler( servicer.SetAccessBindings, request_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.SetAccessBindingsRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), 'UpdateAccessBindings': grpc.unary_unary_rpc_method_handler( servicer.UpdateAccessBindings, request_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.UpdateAccessBindingsRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'yandex.cloud.containerregistry.v1.RepositoryService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API. class RepositoryService(object): """A set of methods for managing Repository resources. """ @staticmethod def Get(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.containerregistry.v1.RepositoryService/Get', yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.GetRepositoryRequest.SerializeToString, yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__pb2.Repository.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def GetByName(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.containerregistry.v1.RepositoryService/GetByName', yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.GetRepositoryByNameRequest.SerializeToString, yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__pb2.Repository.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def List(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.containerregistry.v1.RepositoryService/List', yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.ListRepositoriesRequest.SerializeToString, yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.ListRepositoriesResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def ListAccessBindings(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.containerregistry.v1.RepositoryService/ListAccessBindings', yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsRequest.SerializeToString, yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def Upsert(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.containerregistry.v1.RepositoryService/Upsert', yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.UpsertRepositoryRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def Delete(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.containerregistry.v1.RepositoryService/Delete', yandex_dot_cloud_dot_containerregistry_dot_v1_dot_repository__service__pb2.DeleteRepositoryRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def SetAccessBindings(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.containerregistry.v1.RepositoryService/SetAccessBindings', yandex_dot_cloud_dot_access_dot_access__pb2.SetAccessBindingsRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def UpdateAccessBindings(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.containerregistry.v1.RepositoryService/UpdateAccessBindings', yandex_dot_cloud_dot_access_dot_access__pb2.UpdateAccessBindingsRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
52.188679
158
0.712581
1,592
16,596
6.994975
0.078518
0.042026
0.065374
0.079382
0.891882
0.887662
0.871857
0.842223
0.780442
0.761764
0
0.007848
0.224512
16,596
317
159
52.353312
0.85742
0.060195
0
0.572549
1
0
0.098098
0.068914
0
0
0
0
0
1
0.070588
false
0
0.019608
0.031373
0.133333
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
b01d590a284af24a7f81efaa5e5693332a8c7398
9,928
py
Python
DatabasePy/Weather_index/Health_index.py
HaruHuey/HaruHueyApis
3223ded277bb7012d4d81624feaa6a72c2c36245
[ "Apache-2.0" ]
1
2019-04-22T09:29:14.000Z
2019-04-22T09:29:14.000Z
DatabasePy/Weather_index/Health_index.py
HaruHuey/HaruHueyApis
3223ded277bb7012d4d81624feaa6a72c2c36245
[ "Apache-2.0" ]
7
2019-10-21T19:39:22.000Z
2021-06-10T21:22:35.000Z
DatabasePy/Weather_index/Health_index.py
HaruHuey/HaruHueyApis
3223ded277bb7012d4d81624feaa6a72c2c36245
[ "Apache-2.0" ]
null
null
null
import datetime import json from pprint import pprint import urllib.request from DatabasePy.models import Health_index # 공식 API문서 잘못 작성 된 부분 보고 # 기상청 주무관님이 DATA.GO.KR에 수정 반영 요청 후 반영 됨 # 단계 및 범위 # 낮음 - 0 # 보통 - 1 # 높음 - 2 # 매우높음 - 3 # 데이터 갱신(생산) 06시, 18시 # 오전 6시 5분과 오후 6시 5분에 데이터 갱신 # 오후 6시 이후 데이터는 당일 데이터가 없으므로 기존 데이터 이용 # 6시 이후에는 06 Key 데이터 조회 # 18시 이후에는 18 Key 데이터 조회 + 06 Key 데이터 조회 # 월 가져오기 def time_m(): time_con = datetime.datetime.now().strftime('%m') time_dt = int(time_con) return time_dt def Health_index_Data(): time_con = datetime.datetime.now().strftime('%m') time_dt = int(time_con) TimeData = str(datetime.datetime.now().strftime("%Y%m%d%H")) DateTime = str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M")) H_time = int(datetime.datetime.now().strftime('%H')) # 감기 가능 지수 / 9월 ~ 4월 def inflWho(): if time_dt in [9, 10, 11, 12, 1, 2, 3, 4]: try: URL = "http://newsky2.kma.go.kr/iros/RetrieveWhoIndexService2/getInflWhoList?areaNo=1135062500&ServiceKey=" ServiceKey = "{{ SERVICE_KEY }}" GET_KEY = "&time=" + TimeData + "&_type=" + "json" SET_URL = URL + ServiceKey + GET_KEY Open_URL = urllib.request.urlopen(SET_URL, timeout=10).read().decode("utf-8") Read_URL = json.loads(Open_URL) JsonData = Read_URL["Response"]["body"]["indexModel"] todayData = str(JsonData["today"]) tomorrowData = str(JsonData["tomorrow"]) reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData except: todayData = "정보 없음" tomorrowData = "정보 없음" reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData else: todayData = "기간 아님" tomorrowData = "기간 아님" reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData # 천식 · 폐질환 가능 지수 / 연중 제공 def AsthmaWho(): try: URL = "http://newsky2.kma.go.kr/iros/RetrieveWhoIndexService2/getAsthmaWhoList?areaNo=1135062500&ServiceKey=" ServiceKey = "{{ SERVICE_KEY }}" GET_KEY = "&time=" + TimeData + "&_type=" + "json" SET_URL = URL + ServiceKey + GET_KEY Open_URL = urllib.request.urlopen(SET_URL, timeout=10).read().decode("utf-8") Read_URL = json.loads(Open_URL) JsonData = Read_URL["Response"]["body"]["indexModel"] todayData = str(JsonData["today"]) tomorrowData = str(JsonData["tomorrow"]) reqData = {"today":todayData, "tomorrow":tomorrowData} return reqData except: todayData = "정보 없음" tomorrowData = "정보 없음" reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData # 뇌졸중 가능 지수 / 연중 제공 def BrainWho(): try: URL = "http://newsky2.kma.go.kr/iros/RetrieveWhoIndexService2/getBrainWhoList?areaNo=1135062500&ServiceKey=" ServiceKey = "{{ SERVICE_KEY }}" GET_KEY = "&time=" + TimeData + "&_type=" + "json" SET_URL = URL + ServiceKey + GET_KEY Open_URL = urllib.request.urlopen(SET_URL, timeout=10).read().decode("utf-8") Read_URL = json.loads(Open_URL) JsonData = Read_URL["Response"]["body"]["indexModel"] todayData = str(JsonData["today"]) tomorrowData = str(JsonData["tomorrow"]) reqData = {"today":todayData, "tomorrow":tomorrowData} return reqData except: todayData = "정보 없음" tomorrowData = "정보 없음" reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData # 피부 질환 가능 지수 / 연중 제공 def SkinWho(): try: URL = "http://newsky2.kma.go.kr/iros/RetrieveWhoIndexService2/getSkinWhoList?areaNo=1135062500&ServiceKey=" ServiceKey = "{{ SERVICE_KEY }}" GET_KEY = "&time=" + TimeData + "&_type=" + "json" SET_URL = URL + ServiceKey + GET_KEY Open_URL = urllib.request.urlopen(SET_URL, timeout=10).read().decode("utf-8") Read_URL = json.loads(Open_URL) JsonData = Read_URL["Response"]["body"]["indexModel"] todayData = str(JsonData["today"]) tomorrowData = str(JsonData["tomorrow"]) reqData = {"today":todayData, "tomorrow":tomorrowData} return reqData except: todayData = "정보 없음" tomorrowData = "정보 없음" reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData # 꽃가루 농도 위험 지수 ( 참나무 ) / 4월 ~ 5월 def FlowerWoodyWho(): if time_dt in [4, 5]: try: URL = "http://newsky2.kma.go.kr/iros/RetrieveWhoIndexService2/getFlowerWoodyWhoList?areaNo=1135062500&ServiceKey=" ServiceKey = "{{ SERVICE_KEY }}" GET_KEY = "&time=" + TimeData + "&_type=" + "json" SET_URL = URL + ServiceKey + GET_KEY Open_URL = urllib.request.urlopen(SET_URL, timeout=10).read().decode("utf-8") Read_URL = json.loads(Open_URL) JsonData = Read_URL["Response"]["body"]["indexModel"] todayData = str(JsonData["today"]) tomorrowData = str(JsonData["tomorrow"]) reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData except: todayData = "정보 없음" tomorrowData = "정보 없음" reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData else: todayData = "기간 아님" tomorrowData = "기간 아님" reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData # 꽃가루 농도 위험 지수 ( 소나무 ) / 4월 ~ 5월 def FlowerPineWho(): if time_dt in [4, 5]: try: URL = "http://newsky2.kma.go.kr/iros/RetrieveWhoIndexService2/getFlowerPineWhoList?areaNo=1135062500&ServiceKey=" ServiceKey = "{{ SERVICE_KEY }}" GET_KEY = "&time=" + TimeData + "&_type=" + "json" SET_URL = URL + ServiceKey + GET_KEY Open_URL = urllib.request.urlopen(SET_URL, timeout=10).read().decode("utf-8") Read_URL = json.loads(Open_URL) JsonData = Read_URL["Response"]["body"]["indexModel"] todayData = str(JsonData["today"]) tomorrowData = str(JsonData["tomorrow"]) reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData except: todayData = "정보 없음" tomorrowData = "정보 없음" reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData else: todayData = "기간 아님" tomorrowData = "기간 아님" reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData # 꽃가루 농도 위험 지수 ( 잡초류 ) / 9월 ~ 10월 def FlowerWeedsWho(): if time_dt in [9, 10]: try: URL = "http://newsky2.kma.go.kr/iros/RetrieveWhoIndexService2/getFlowerWeedsWhoList?areaNo=1135062500&ServiceKey=" ServiceKey = "{{ SERVICE_KEY }}" GET_KEY = "&time=" + TimeData + "&_type=" + "json" SET_URL = URL + ServiceKey + GET_KEY Open_URL = urllib.request.urlopen(SET_URL, timeout=10).read().decode("utf-8") Read_URL = json.loads(Open_URL) JsonData = Read_URL["Response"]["body"]["indexModel"] todayData = str(JsonData["today"]) tomorrowData = str(JsonData["tomorrow"]) reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData except: todayData = "정보 없음" tomorrowData = "정보 없음" reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData else: todayData = "기간 아님" tomorrowData = "기간 아님" reqData = {"today": todayData, "tomorrow": tomorrowData} return reqData if H_time in [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]: # 추가 / 오늘 Health_index.objects.create(DateTime=DateTime, inflWho=inflWho()["today"], AsthmaWho=AsthmaWho()["today"], BrainWho=BrainWho()["today"], SkinWho=SkinWho()["today"], FlowerWoodyWho=FlowerWoodyWho()["today"], FlowerPineWho=FlowerPineWho()["today"], FlowerWeedsWho=FlowerWeedsWho()["today"]) elif H_time in [20, 21, 22, 23, 24, 1, 2, 3, 4, 5, 6]: # 업데이트 / 내일 Health_index.objects.update(DateTime=DateTime, inflWho=inflWho()["tomorrow"], AsthmaWho=AsthmaWho()["tomorrow"], BrainWho=BrainWho()["tomorrow"], SkinWho=SkinWho()["tomorrow"], FlowerWoodyWho=FlowerWoodyWho()["tomorrow"], FlowerPineWho=FlowerPineWho()["tomorrow"], FlowerWeedsWho=FlowerWeedsWho()["tomorrow"]) pass else: # 추가 / 오늘 Health_index.objects.create(DateTime=DateTime, inflWho=inflWho()["today"], AsthmaWho=AsthmaWho()["today"], BrainWho=BrainWho()["today"], SkinWho=SkinWho()["today"], FlowerWoodyWho=FlowerWoodyWho()["today"], FlowerPineWho=FlowerPineWho()["today"], FlowerWeedsWho=FlowerWeedsWho()["today"]) pass return "저장 완료"
34.957746
130
0.539786
993
9,928
5.306143
0.183283
0.040995
0.07174
0.09907
0.82027
0.814006
0.809072
0.809072
0.809072
0.746821
0
0.029119
0.332393
9,928
284
131
34.957746
0.765691
0.045326
0
0.814208
0
0.038251
0.183712
0
0.038251
0
0
0
0
1
0.04918
false
0.010929
0.027322
0
0.185792
0.005464
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
b029b712a9346ce6bd9343a8c4f33e489efb4e40
19,684
py
Python
build/PureCloudPlatformClientV2/apis/user_recordings_api.py
cjohnson-ctl/platform-client-sdk-python
38ce53bb8012b66e8a43cc8bd6ff00cf6cc99100
[ "MIT" ]
10
2019-02-22T00:27:08.000Z
2021-09-12T23:23:44.000Z
libs/PureCloudPlatformClientV2/apis/user_recordings_api.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
5
2018-06-07T08:32:00.000Z
2021-07-28T17:37:26.000Z
libs/PureCloudPlatformClientV2/apis/user_recordings_api.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
6
2020-04-09T17:43:07.000Z
2022-02-17T08:48:05.000Z
# coding: utf-8 """ UserRecordingsApi.py Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ from __future__ import absolute_import import sys import os import re # python 2 and python 3 compatibility library from six import iteritems from ..configuration import Configuration from ..api_client import ApiClient class UserRecordingsApi(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): config = Configuration() if api_client: self.api_client = api_client else: if not config.api_client: config.api_client = ApiClient() self.api_client = config.api_client def delete_userrecording(self, recording_id, **kwargs): """ Delete a user recording. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_userrecording(recording_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str recording_id: User Recording ID (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['recording_id'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_userrecording" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'recording_id' is set if ('recording_id' not in params) or (params['recording_id'] is None): raise ValueError("Missing the required parameter `recording_id` when calling `delete_userrecording`") resource_path = '/api/v2/userrecordings/{recordingId}'.replace('{format}', 'json') path_params = {} if 'recording_id' in params: path_params['recordingId'] = params['recording_id'] query_params = {} header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['PureCloud OAuth'] response = self.api_client.call_api(resource_path, 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, callback=params.get('callback')) return response def get_userrecording(self, recording_id, **kwargs): """ Get a user recording. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_userrecording(recording_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str recording_id: User Recording ID (required) :param list[str] expand: Which fields, if any, to expand. :return: UserRecording If the method is called asynchronously, returns the request thread. """ all_params = ['recording_id', 'expand'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_userrecording" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'recording_id' is set if ('recording_id' not in params) or (params['recording_id'] is None): raise ValueError("Missing the required parameter `recording_id` when calling `get_userrecording`") resource_path = '/api/v2/userrecordings/{recordingId}'.replace('{format}', 'json') path_params = {} if 'recording_id' in params: path_params['recordingId'] = params['recording_id'] query_params = {} if 'expand' in params: query_params['expand'] = params['expand'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['PureCloud OAuth'] response = self.api_client.call_api(resource_path, 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='UserRecording', auth_settings=auth_settings, callback=params.get('callback')) return response def get_userrecording_media(self, recording_id, **kwargs): """ Download a user recording. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_userrecording_media(recording_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str recording_id: User Recording ID (required) :param str format_id: The desired media format. :return: DownloadResponse If the method is called asynchronously, returns the request thread. """ all_params = ['recording_id', 'format_id'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_userrecording_media" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'recording_id' is set if ('recording_id' not in params) or (params['recording_id'] is None): raise ValueError("Missing the required parameter `recording_id` when calling `get_userrecording_media`") resource_path = '/api/v2/userrecordings/{recordingId}/media'.replace('{format}', 'json') path_params = {} if 'recording_id' in params: path_params['recordingId'] = params['recording_id'] query_params = {} if 'format_id' in params: query_params['formatId'] = params['format_id'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['PureCloud OAuth'] response = self.api_client.call_api(resource_path, 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DownloadResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def get_userrecordings(self, **kwargs): """ Get a list of user recordings. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_userrecordings(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param int page_size: Page size :param int page_number: Page number :param list[str] expand: Which fields, if any, to expand. :return: UserRecordingEntityListing If the method is called asynchronously, returns the request thread. """ all_params = ['page_size', 'page_number', 'expand'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_userrecordings" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v2/userrecordings'.replace('{format}', 'json') path_params = {} query_params = {} if 'page_size' in params: query_params['pageSize'] = params['page_size'] if 'page_number' in params: query_params['pageNumber'] = params['page_number'] if 'expand' in params: query_params['expand'] = params['expand'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['PureCloud OAuth'] response = self.api_client.call_api(resource_path, 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='UserRecordingEntityListing', auth_settings=auth_settings, callback=params.get('callback')) return response def get_userrecordings_summary(self, **kwargs): """ Get user recording summary This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_userrecordings_summary(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: FaxSummary If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_userrecordings_summary" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v2/userrecordings/summary'.replace('{format}', 'json') path_params = {} query_params = {} header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['PureCloud OAuth'] response = self.api_client.call_api(resource_path, 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FaxSummary', auth_settings=auth_settings, callback=params.get('callback')) return response def put_userrecording(self, recording_id, body, **kwargs): """ Update a user recording. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.put_userrecording(recording_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str recording_id: User Recording ID (required) :param UserRecording body: UserRecording (required) :param list[str] expand: Which fields, if any, to expand. :return: UserRecording If the method is called asynchronously, returns the request thread. """ all_params = ['recording_id', 'body', 'expand'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method put_userrecording" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'recording_id' is set if ('recording_id' not in params) or (params['recording_id'] is None): raise ValueError("Missing the required parameter `recording_id` when calling `put_userrecording`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `put_userrecording`") resource_path = '/api/v2/userrecordings/{recordingId}'.replace('{format}', 'json') path_params = {} if 'recording_id' in params: path_params['recordingId'] = params['recording_id'] query_params = {} if 'expand' in params: query_params['expand'] = params['expand'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['PureCloud OAuth'] response = self.api_client.call_api(resource_path, 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='UserRecording', auth_settings=auth_settings, callback=params.get('callback')) return response
37.280303
116
0.546688
1,901
19,684
5.479221
0.109942
0.046467
0.02621
0.021889
0.834581
0.822869
0.818836
0.812596
0.807988
0.807988
0
0.001373
0.37091
19,684
527
117
37.351044
0.83978
0.270524
0
0.766667
0
0
0.17125
0.024082
0
0
0
0
0
1
0.025926
false
0
0.025926
0
0.077778
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
b049220734ee26c26ec5d751b9e05bb15e20a497
465,904
py
Python
netapp/santricity/api/symbol/g_api.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
5
2016-08-23T17:52:22.000Z
2019-05-16T08:45:30.000Z
netapp/santricity/api/symbol/g_api.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
2
2016-11-10T05:30:21.000Z
2019-04-05T15:03:37.000Z
netapp/santricity/api/symbol/g_api.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
7
2016-08-25T16:11:44.000Z
2021-02-22T05:31:25.000Z
#!/usr/bin/env python # coding: utf-8 """ GApi.py The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of NetApp, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ from __future__ import absolute_import import sys import os # python 2 and python 3 compatibility library from six import iteritems from ....santricity.configuration import Configuration from ....santricity.api_client import ApiClient class GApi(object): def __init__(self, api_client=None): config = Configuration() if api_client: self.api_client = api_client else: if not config.api_client: config.api_client = ApiClient(context_path='/devmgr/v2') self.api_client = config.api_client def symbol_generate_certificate_signing_request(self, system_id, body, **kwargs): """ Generates a Key Management Server (KMS) Client Certificate Signing Request (CSR) that needs to be signed by a Certificate Authority (CA). The resulting signed certificate or client certificate is installed on the storage array for authenticating with the KMIP server. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_generate_certificate_signing_request(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param KMSClientCSRDescriptor body: (required) :param str controller: Controller selection :param bool verbose_error_response: :return: KMSCertificateFileReturn If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_generate_certificate_signing_request" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_generate_certificate_signing_request`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_generate_certificate_signing_request`") resource_path = '/storage-systems/{system-id}/symbol/generateCertificateSigningRequest'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='KMSCertificateFileReturn', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_alertable_mel_entries(self, system_id, body, **kwargs): """ Allows a client to fetch a set of entries that have the alertable, needs attention, or collect support bundle flag set from the array's MEL for analysis or display. Documented return codes: ok, error. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_alertable_mel_entries(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param MelExtent body: The range of MEL entries. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: MelEntryList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_alertable_mel_entries" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_alertable_mel_entries`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_alertable_mel_entries`") resource_path = '/storage-systems/{system-id}/symbol/getAlertableMelEntries'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='MelEntryList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_asup_status(self, system_id, **kwargs): """ This procedure is used to get the current Autosupport status values. Documented return codes: ok, notImplemented. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_asup_status(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: AsupStatusReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_asup_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_asup_status`") resource_path = '/storage-systems/{system-id}/symbol/getAsupStatus'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AsupStatusReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_async_mirror_group_remote_connections(self, system_id, body, **kwargs): """ This procedure returns information on the connections established to a remote array for an existing AsyncMirrorGroup. This will return connection information for both controllers. Documented return codes: ok, notImplemented. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_async_mirror_group_remote_connections(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ScsiRemoteConnectionsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_async_mirror_group_remote_connections" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_async_mirror_group_remote_connections`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_async_mirror_group_remote_connections`") resource_path = '/storage-systems/{system-id}/symbol/getAsyncMirrorGroupRemoteConnections'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ScsiRemoteConnectionsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_async_mirror_group_sync_progress(self, system_id, body, **kwargs): """ This procedure will return sync progress information for Async Mirror Groups and their associated members. Calls to this procedure are valid even when a sync is not running. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_async_mirror_group_sync_progress(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param AsyncMirrorGroupRefList body: A list of Asynchronous Mirror Group references. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: AsyncMirrorGroupSyncProgressListReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_async_mirror_group_sync_progress" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_async_mirror_group_sync_progress`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_async_mirror_group_sync_progress`") resource_path = '/storage-systems/{system-id}/symbol/getAsyncMirrorGroupSyncProgress'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AsyncMirrorGroupSyncProgressListReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_async_mirror_repository_utilization(self, system_id, body, **kwargs): """ This procedure will return repository utilization information for async mirror members. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_async_mirror_repository_utilization(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param AsyncMirrorGroupMemberRefList body: A list of Asynchronous Mirror Group member references. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: AsyncMirrorRepositoryUtilizationListReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_async_mirror_repository_utilization" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_async_mirror_repository_utilization`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_async_mirror_repository_utilization`") resource_path = '/storage-systems/{system-id}/symbol/getAsyncMirrorRepositoryUtilization'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AsyncMirrorRepositoryUtilizationListReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_async_mirror_sync_statistics(self, system_id, body, **kwargs): """ This procedure will return synchronization time statistics for a list of mirror members. Documented return codes: ok, notImplemented. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_async_mirror_sync_statistics(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param AsyncMirrorSyncStatisticsRequestDescriptor body: (required) :param str controller: Controller selection :param bool verbose_error_response: :return: AsyncMirrorSyncStatisticsListReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_async_mirror_sync_statistics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_async_mirror_sync_statistics`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_async_mirror_sync_statistics`") resource_path = '/storage-systems/{system-id}/symbol/getAsyncMirrorSyncStatistics'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AsyncMirrorSyncStatisticsListReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_auto_config_candidates(self, system_id, body, **kwargs): """ This procedure automatically gets the configuration candidates. Documented return codes: ok, illegalParam, noHeap, driveNotExist, internalError, invalidSegmentsize, raid6FeatureUnsupported, raid6FeatureDisabled. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_auto_config_candidates(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param AutoConfigTemplateList body: This object contains a list of automatic configuration templates. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: AutoConfigCandidateList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_auto_config_candidates" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_auto_config_candidates`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_auto_config_candidates`") resource_path = '/storage-systems/{system-id}/symbol/getAutoConfigCandidates'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AutoConfigCandidateList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_base_controller_diagnostic_status(self, system_id, **kwargs): """ Retrieves the status of a running, interrupted, or completed base controller diagnostic test. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_base_controller_diagnostic_status(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: FruDiagReturn If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_base_controller_diagnostic_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_base_controller_diagnostic_status`") resource_path = '/storage-systems/{system-id}/symbol/getBaseControllerDiagnosticStatus'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FruDiagReturn', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_cache_backup_device_diagnostic_status(self, system_id, **kwargs): """ Retrieves the status of a running, interrupted, or completed cache backup device diagnostic test. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_cache_backup_device_diagnostic_status(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: FruDiagReturn If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_cache_backup_device_diagnostic_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_cache_backup_device_diagnostic_status`") resource_path = '/storage-systems/{system-id}/symbol/getCacheBackupDeviceDiagnosticStatus'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FruDiagReturn', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_cache_memory_diagnostic_status(self, system_id, **kwargs): """ Retrieves the status of a running, interrupted, or completed cache memory diagnostic test. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_cache_memory_diagnostic_status(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: FruDiagReturn If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_cache_memory_diagnostic_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_cache_memory_diagnostic_status`") resource_path = '/storage-systems/{system-id}/symbol/getCacheMemoryDiagnosticStatus'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FruDiagReturn', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_change_state(self, system_id, body, **kwargs): """ This procedure is used by clients to query the controller for indications of state changes that have occurred and which would necessitate that the client refresh its view of the storage array's state. If no state changes need to be reported, the controller will generally hold this request, without responding, for up to the amount of time specified in the argument. If, at any time during the hold period, a state change occurs, the controller will return immediately with the new configuration generation number and/or MEL sequence number. By using this hanging poll approach, the amount of traffic between the client and the server is reduced to an insignificant level, and yet near-immediate notification of changes is still possible. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_change_state(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param ChangeQueryDescriptor body: A ChangeQueryDescriptor object that identifies the caller's current understanding of the storage array's state, along with an indication of the maximum hold time for this request. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ChangeState If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_change_state" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_change_state`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_change_state`") resource_path = '/storage-systems/{system-id}/symbol/getChangeState'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ChangeState', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_channel_diagnostics_results(self, system_id, **kwargs): """ This procedure reports the results of drive channel fault isolation diagnostic tests that were initiated by the startChannelDIagnostics procedure. Documented return codes: ok, channelDiagsRunning, channelDiagsResultsPartial, channelDiagsResultsNotAvailable. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_channel_diagnostics_results(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ChannelDiagResultsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_channel_diagnostics_results" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_channel_diagnostics_results`") resource_path = '/storage-systems/{system-id}/symbol/getChannelDiagnosticsResults'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ChannelDiagResultsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_cluster_performance_limitation_values(self, system_id, body, **kwargs): """ This procedures returns the performance limitation values for a host cluster. Those values include the limits on the IOPs and throughput (MB/s). The number of IOPs impacted by the performance limits is also returned. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_cluster_performance_limitation_values(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: This procedure takes a cluster reference as an input parameter. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ClusterPerformanceLimitationValuesReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_cluster_performance_limitation_values" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_cluster_performance_limitation_values`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_cluster_performance_limitation_values`") resource_path = '/storage-systems/{system-id}/symbol/getClusterPerformanceLimitationValues'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ClusterPerformanceLimitationValuesReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_controller_debug_information(self, system_id, body, **kwargs): """ This procedure replaces the deprecated stateCapture procedure. It returns a single \"chunk\" of debug information and must be used in a series of like calls in order to retrieve the complete set of debug information. Documented return codes: ok, illegalParam, tryAlternate, noSuchDebugChunk, debugInfoConfigChanged. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_controller_debug_information(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param DebugInfoExtent body: A DebugInfoExtent structure containing three pieces of information: a reference to the controller that is to return the data, a \"handle\" identifying a single mutually-consistent set of chunks, and a chunk number that identifies the specific chunk to be returned. On the request for the initial chunk (chunk zero), the handle is not significant. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: DebugInfoReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_controller_debug_information" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_controller_debug_information`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_controller_debug_information`") resource_path = '/storage-systems/{system-id}/symbol/getControllerDebugInformation'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DebugInfoReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_controller_host_interfaces(self, system_id, **kwargs): """ This procedure is used by clients to query the referenced controller for up-to-date information about its host-side I/O interfaces. Since this interface information is highly volatile, the object graph data contains only a point-in-time snapshot of the interface data. This procedure can be used to obtain current information that may not be reflected in the most recent object graph. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_controller_host_interfaces(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: IOInterfaceTypeDataList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_controller_host_interfaces" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_controller_host_interfaces`") resource_path = '/storage-systems/{system-id}/symbol/getControllerHostInterfaces'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='IOInterfaceTypeDataList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_controller_host_io_interfaces(self, system_id, body, **kwargs): """ NOTE: object graph data may not be the most recent. Documented return codes: ok, tryAlternate. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_controller_host_io_interfaces(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: A reference to the controller for which the I/O interface information is desired. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ControllerHostIoInterfacesReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_controller_host_io_interfaces" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_controller_host_io_interfaces`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_controller_host_io_interfaces`") resource_path = '/storage-systems/{system-id}/symbol/getControllerHostIoInterfaces'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ControllerHostIoInterfacesReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_controller_nvsram(self, system_id, body, **kwargs): """ This procedure allows a client to fetch the data that resides within a designated region of the controller's NVSRAM. Note that the NVSRAM data is obtained only from the controller to which this request is directed. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_controller_nvsram(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: An NVSRAMRegionId value that identifies the region whose data is to be retrieved. The caller is allowed to specify that all NVSRAM regions be obtained, if desired. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: NVSRAMRegionList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_controller_nvsram" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_controller_nvsram`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_controller_nvsram`") resource_path = '/storage-systems/{system-id}/symbol/getControllerNVSRAM'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='NVSRAMRegionList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_controller_time(self, system_id, **kwargs): """ This procedure gets the internal clock from the controllers. The time is expressed in seconds since midnight (GMT) on 1/1/1970. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_controller_time(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ControllerTime If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_controller_time" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_controller_time`") resource_path = '/storage-systems/{system-id}/symbol/getControllerTime'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ControllerTime', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_critical_mel_entries(self, system_id, body, **kwargs): """ This procedure allows a client to fetch a set of entries with a priority value of EVENT_PRIORITY_CRITICAL from the storage array's Major Event Log for analysis or display. If there are less critical MEL events than MEL_MAX_XFER_COUNT, all the critical events will be displayed on the first call. If the client receives a number of critical MEL events that is equal to MEL_MAX_XFER_COUNT, then the user must increment the first sequence number to be the highest sequence number in the list of entries returned and repeat the procedure. This process must be repeated until the number of entries returned is less than MEL_MAX_XFER_COUNT. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_critical_mel_entries(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param MelExtent body: A MelExtent object that provides the sequence number of the first and last MEL entries to be retrieved. All critical entries between these two numbers (inclusive) will be transferred to the caller as the result of the operation. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: MelEntryList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_critical_mel_entries" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_critical_mel_entries`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_critical_mel_entries`") resource_path = '/storage-systems/{system-id}/symbol/getCriticalMelEntries'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='MelEntryList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_ctl_lock_down_info(self, system_id, **kwargs): """ Returns a structure containing information about the controller if it is locked down. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_ctl_lock_down_info(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: LockDownInfoReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_ctl_lock_down_info" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_ctl_lock_down_info`") resource_path = '/storage-systems/{system-id}/symbol/getCtlLockDownInfo'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='LockDownInfoReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_cumulative_statistics_bundle(self, system_id, body, **kwargs): """ This procedure returns up to two groups of statistical counters, one per controller, bundled together. A counter group is a set of related statistical counters, accumulated over a period of time, along with the associated base time. Documented return codes: ok, error, illegalParam, invalidRequest. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_cumulative_statistics_bundle(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param CumulativeStatisticsDescriptor body: A CumulativeStatisticsDescriptor structure describing the statistics of interest. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: CumulativeStatisticsBundleReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_cumulative_statistics_bundle" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_cumulative_statistics_bundle`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_cumulative_statistics_bundle`") resource_path = '/storage-systems/{system-id}/symbol/getCumulativeStatisticsBundle'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CumulativeStatisticsBundleReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_cumulative_statistics_bundles(self, system_id, body, **kwargs): """ This procedure is used to request a list of bundles of statistical data. The argument describes the statistics being requested. Documented return codes: ok, error, illegalParam, invalidRequest. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_cumulative_statistics_bundles(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param CumulativeStatisticsListDescriptor body: An object containing all of the required elements for the procedure. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: CumulativeStatisticsBundleListReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_cumulative_statistics_bundles" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_cumulative_statistics_bundles`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_cumulative_statistics_bundles`") resource_path = '/storage-systems/{system-id}/symbol/getCumulativeStatisticsBundles'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CumulativeStatisticsBundleListReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_current_ssd_wear_life_stats(self, system_id, body, **kwargs): """ This procedure collects the wear life statistic information for the requested devices and returns this up to date information. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_current_ssd_wear_life_stats(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param CurrentSSDWearLifeStatsDescriptor body: Descriptor specifying details of the get current SSD wear life statistics request. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: CurrentSSDWearLifeStatsResults If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_current_ssd_wear_life_stats" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_current_ssd_wear_life_stats`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_current_ssd_wear_life_stats`") resource_path = '/storage-systems/{system-id}/symbol/getCurrentSSDWearLifeStats'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CurrentSSDWearLifeStatsResults', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_dacstore_incompatible_volumes(self, system_id, body, **kwargs): """ This procedure gets a list of volumes encroaching the requested Dacstore area. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_dacstore_incompatible_volumes(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param int body: A number representing the size of a Dacstore in bytes. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: AbstractVolRefList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_dacstore_incompatible_volumes" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_dacstore_incompatible_volumes`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_dacstore_incompatible_volumes`") resource_path = '/storage-systems/{system-id}/symbol/getDacstoreIncompatibleVolumes'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AbstractVolRefList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_database_metadata(self, system_id, **kwargs): """ This procedure is used to retrieve stable store database metadata. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_database_metadata(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: DatabaseMetadataReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_database_metadata" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_database_metadata`") resource_path = '/storage-systems/{system-id}/symbol/getDatabaseMetadata'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DatabaseMetadataReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_ddc_log(self, system_id, body, **kwargs): """ This procedure allows a client to retrieve diagnostic information from the storage array's diagnostic data capture. The client must specify a correct tag and appropriate chunk number. In case of failure, the client must either (1) retry the current chunk number or (2) discard any partially-received log data and retry from the first chunk number (which is one - zero is not a valid chunk number). Documented return codes: ok, illegalParam, ddcUnavail, invalidDdcTag. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_ddc_log(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param DdcExtent body: A DdcExtent structure specifying the chunk to be retrieved. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: DdcLogDataReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_ddc_log" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_ddc_log`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_ddc_log`") resource_path = '/storage-systems/{system-id}/symbol/getDdcLog'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DdcLogDataReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_discrete_time_series_bundle(self, system_id, body, **kwargs): """ This returns up to two groups of discrete time series statistics, one per controller Documented return codes: ok, error, illegalParam, invalidRequest. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_discrete_time_series_bundle(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param int body: A StatStreamId object that identifies the discrete time series statistics to return. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: DiscreteTimeSeriesBundleReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_discrete_time_series_bundle" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_discrete_time_series_bundle`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_discrete_time_series_bundle`") resource_path = '/storage-systems/{system-id}/symbol/getDiscreteTimeSeriesBundle'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DiscreteTimeSeriesBundleReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_disk_pool_expansion_candidates(self, system_id, body, **kwargs): """ This procedure returns a list of drive sets that are candidates for use in expanding the given Disk Pool. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_disk_pool_expansion_candidates(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: A reference to the Disk Pool to be expanded. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ExpansionCandidatesReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_disk_pool_expansion_candidates" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_disk_pool_expansion_candidates`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_disk_pool_expansion_candidates`") resource_path = '/storage-systems/{system-id}/symbol/getDiskPoolExpansionCandidates'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ExpansionCandidatesReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_disk_pool_max_reserved_drive_count(self, system_id, body, **kwargs): """ This procedure will return the maximum Reserved Drive Count possible on a disk pool. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_disk_pool_max_reserved_drive_count(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: A reference to the Disk Pool for which you want the maximum reserved drive count. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: DiskPoolMaxReservedDriveCountReturn If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_disk_pool_max_reserved_drive_count" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_disk_pool_max_reserved_drive_count`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_disk_pool_max_reserved_drive_count`") resource_path = '/storage-systems/{system-id}/symbol/getDiskPoolMaxReservedDriveCount'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DiskPoolMaxReservedDriveCountReturn', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_disk_pool_reduction_drive_count(self, system_id, body, **kwargs): """ This procedure calculates the maximum number of drives that can be removed from a disk pool. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_disk_pool_reduction_drive_count(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: (required) :param str controller: Controller selection :param bool verbose_error_response: :return: DiskPoolReductionDriveCountReturn If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_disk_pool_reduction_drive_count" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_disk_pool_reduction_drive_count`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_disk_pool_reduction_drive_count`") resource_path = '/storage-systems/{system-id}/symbol/getDiskPoolReductionDriveCount'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DiskPoolReductionDriveCountReturn', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_dpl_core_dump_information(self, system_id, body, **kwargs): """ This procedure is used to request the information about a DPL core dump. The parameter is a DPL Core Dump Tag. The value of the tag is unique for each core dump and may be obtained from the DPLCoreDumpData structure in StorageArray. Documented return codes: ok, dplCoreDumpInvalidTag. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_dpl_core_dump_information(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param int body: The integer value of the dplCoreDumpTag for which you are requesting information. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: DPLCoreDumpInfoReturn If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_dpl_core_dump_information" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_dpl_core_dump_information`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_dpl_core_dump_information`") resource_path = '/storage-systems/{system-id}/symbol/getDPLCoreDumpInformation'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DPLCoreDumpInfoReturn', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_drive_channel_statistics(self, system_id, **kwargs): """ This procedure gets statistical information about all of the drive channels. Documented return codes: ok, error, noHeap. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_drive_channel_statistics(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: DriveChannelList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_drive_channel_statistics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_drive_channel_statistics`") resource_path = '/storage-systems/{system-id}/symbol/getDriveChannelStatistics'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DriveChannelList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_drive_firmware_download_progress(self, system_id, **kwargs): """ This procedure gets the progress of the firmware download. Documented return codes: ok, error, illegalParam, noHeap, tryAlternate, invalidRequest, cacheSyncFailure, downloadInProgress, missingData, quiescenceFailed, allFailed, partialOk. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_drive_firmware_download_progress(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: DriveFirmwareStatus If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_drive_firmware_download_progress" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_drive_firmware_download_progress`") resource_path = '/storage-systems/{system-id}/symbol/getDriveFirmwareDownloadProgress'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DriveFirmwareStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_drive_log_data(self, system_id, body, **kwargs): """ This procedure gets the drive's log sense pages. Documented return codes: ok, noHeap, internalError, invalidDriveref. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_drive_log_data(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: This object contains information identifying all drives that are affected by this operation. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: DriveLogData If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_drive_log_data" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_drive_log_data`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_drive_log_data`") resource_path = '/storage-systems/{system-id}/symbol/getDriveLogData'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DriveLogData', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_drive_temperatures(self, system_id, **kwargs): """ This procedure retrieves temperature data for drives in the storage array. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_drive_temperatures(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: DriveTemperatureReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_drive_temperatures" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_drive_temperatures`") resource_path = '/storage-systems/{system-id}/symbol/getDriveTemperatures'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DriveTemperatureReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_enclosure_state_capture_data(self, system_id, body, **kwargs): """ This procedure will retrieve state capture information from controller and expansion enclosures, including DCMs, if any. Send the command to both controllers if the tray is an RBOD. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_enclosure_state_capture_data(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: The ref corresponding to the enclosure for which the data is requested. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ReturnCodeWithOpaqueData If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_enclosure_state_capture_data" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_enclosure_state_capture_data`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_enclosure_state_capture_data`") resource_path = '/storage-systems/{system-id}/symbol/getEnclosureStateCaptureData'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ReturnCodeWithOpaqueData', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_enclosure_temperatures(self, system_id, **kwargs): """ This procedure retrieves temperature data for each thermal sensor in each enclosure in the storage array. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_enclosure_temperatures(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: TrayTemperatureReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_enclosure_temperatures" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_enclosure_temperatures`") resource_path = '/storage-systems/{system-id}/symbol/getEnclosureTemperatures'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TrayTemperatureReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_energy_star_data(self, system_id, **kwargs): """ This procedure is used to request Energy Star data from all power supplies. Documented return codes: ok, unsupportedEsmRequest. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_energy_star_data(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: EnergyStarDataReturn If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_energy_star_data" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_energy_star_data`") resource_path = '/storage-systems/{system-id}/symbol/getEnergyStarData'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EnergyStarDataReturn', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_enhanced_ib_statistics(self, system_id, **kwargs): """ This procedure returns the InfiniBand statistics, which consists of start-of-day-relative interface statistics and baseline-relative statistics. It supersedes the deprecated getIbStatistics () routine. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_enhanced_ib_statistics(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: EnhancedIbStatisticsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_enhanced_ib_statistics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_enhanced_ib_statistics`") resource_path = '/storage-systems/{system-id}/symbol/getEnhancedIbStatistics'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EnhancedIbStatisticsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_env_card_log_data(self, system_id, body, **kwargs): """ This procedure gets the log data for the indicated environmental card. Documented return codes: ok, noHeap, internalError, invalidEsmref. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_env_card_log_data(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: The argument is a component reference indicating the environmental card which is to have its log data returned. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: EnvCardLogDataReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_env_card_log_data" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_env_card_log_data`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_env_card_log_data`") resource_path = '/storage-systems/{system-id}/symbol/getEnvCardLogData'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='EnvCardLogDataReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_export_dependencies(self, system_id, body, **kwargs): """ This procedure returns a list of volume group export dependencies for the identified volume group. The returned list consists of the input volume group's immediate export dependencies only. The procedure does not return transitive dependencies. It is up to the caller to create the complete dependency graph through successive calls to this procedure. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_export_dependencies(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: A SYMbol VolumeGroupRef identifying the volume group for which export dependencies are to be reported. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ExportDependenciesReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_export_dependencies" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_export_dependencies`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_export_dependencies`") resource_path = '/storage-systems/{system-id}/symbol/getExportDependencies'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ExportDependenciesReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_flash_cache_analytics(self, system_id, body, **kwargs): """ This procedure retrieves analytics data from the last capture period. It returns the cache hits for various sizes of flash cache. Documented return codes: ok, error, illegalParam, internalError, invalidVolumeref, notFlashcacheVol, flashcacheInvalidAnalyticsState. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_flash_cache_analytics(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: (required) :param str controller: Controller selection :param bool verbose_error_response: :return: FlashCacheAnalyticsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_flash_cache_analytics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_flash_cache_analytics`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_flash_cache_analytics`") resource_path = '/storage-systems/{system-id}/symbol/getFlashCacheAnalytics'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FlashCacheAnalyticsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_flash_cache_statistics(self, system_id, body, **kwargs): """ This procedure is used to retrieve flash cache statistics. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_flash_cache_statistics(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: (required) :param str controller: Controller selection :param bool verbose_error_response: :return: FlashCacheStatisticsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_flash_cache_statistics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_flash_cache_statistics`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_flash_cache_statistics`") resource_path = '/storage-systems/{system-id}/symbol/getFlashCacheStatistics'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FlashCacheStatisticsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_histogram_bundle(self, system_id, body, **kwargs): """ This procedure returns up to two groups of histogram statistics, one per controller, Documented return codes: ok, error, illegalParam, invalidRequest. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_histogram_bundle(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param int body: A StatStreamId object that identifies the histogram statistics to return. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: HistogramBundleReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_histogram_bundle" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_histogram_bundle`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_histogram_bundle`") resource_path = '/storage-systems/{system-id}/symbol/getHistogramBundle'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='HistogramBundleReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_host_card_diagnostic_status(self, system_id, **kwargs): """ Retrieves the status of a running, interrupted, or completed host card diagnostic test. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_host_card_diagnostic_status(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: FruDiagReturn If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_host_card_diagnostic_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_host_card_diagnostic_status`") resource_path = '/storage-systems/{system-id}/symbol/getHostCardDiagnosticStatus'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FruDiagReturn', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_host_specific_nvsram(self, system_id, body, **kwargs): """ This procedure allows the Host Specific NVSRAM region to be read to obtain information for a specific host. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_host_specific_nvsram(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param NVSRAMRegionIdAndHostIndex body: An NVSRAMRegionIDAndHostIndex object that specifies the region ID (in this case 0xF2) and the host index for a specific host. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: NVSRAMRegionList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_host_specific_nvsram" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_host_specific_nvsram`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_host_specific_nvsram`") resource_path = '/storage-systems/{system-id}/symbol/getHostSpecificNVSRAM'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='NVSRAMRegionList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_hot_spare_candidates(self, system_id, body, **kwargs): """ This procedure returns a list of hot spare candidates with the volume groups that they potentially cover. Documented return codes: ok, noHeap, internalError. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_hot_spare_candidates(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: This object contains information describing the physical drive types supported. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: HotSpareCandidateList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_hot_spare_candidates" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_hot_spare_candidates`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_hot_spare_candidates`") resource_path = '/storage-systems/{system-id}/symbol/getHotSpareCandidates'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='HotSpareCandidateList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_hot_spare_coverage(self, system_id, **kwargs): """ This procedure returns a list of all hot spare drives and their volume groups. Documented return codes: ok, noHeap, volumeNotExist. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_hot_spare_coverage(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: HotSpareCoverageList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_hot_spare_coverage" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_hot_spare_coverage`") resource_path = '/storage-systems/{system-id}/symbol/getHotSpareCoverage'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='HotSpareCoverageList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_ib_ioc_attributes(self, system_id, **kwargs): """ This procedure returns attribute information for each InfiniBand I/O controller that is part of the Infiniband I/O Unit. An InfiniBand I/O Controller is a logical entity defined in the InfiniBand Architecture. It does not correlate one-to-one with a storage array controller Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_ib_ioc_attributes(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: IbIocAttributesReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_ib_ioc_attributes" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_ib_ioc_attributes`") resource_path = '/storage-systems/{system-id}/symbol/getIbIocAttributes'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='IbIocAttributesReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_ib_port_partition_tables(self, system_id, **kwargs): """ This procedure returns a group of InfiniBand port partition tables, one table for each InfiniBand port of the Infiniband I/O Unit (i.e., storage array). Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_ib_port_partition_tables(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: IbPortPartitionTablesReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_ib_port_partition_tables" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_ib_port_partition_tables`") resource_path = '/storage-systems/{system-id}/symbol/getIbPortPartitionTables'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='IbPortPartitionTablesReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_ib_rdma_channels(self, system_id, **kwargs): """ This procedure returns various items of information about InfiniBand RDMA channels that are presently active in the Infiniband I/O Unit (i.e., storage array). Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_ib_rdma_channels(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: IbRdmaChannelsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_ib_rdma_channels" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_ib_rdma_channels`") resource_path = '/storage-systems/{system-id}/symbol/getIbRdmaChannels'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='IbRdmaChannelsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_ib_statistics(self, system_id, **kwargs): """ This procedure returns the InfiniBand statistics, which consist of start-of-day-relative interface statistics, baseline-relative interface statistics, target channel adapter statistics, and RDMA channel statistics. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_ib_statistics(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: IbStatisticsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_ib_statistics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_ib_statistics`") resource_path = '/storage-systems/{system-id}/symbol/getIbStatistics'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='IbStatisticsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_import_dependencies(self, system_id, body, **kwargs): """ This procedure returns a list of volume group import dependencies for the identified volume group. The reported information identifies the types of dependencies that exist for the volume group. It is necessary for this procedure to spin up the drives in the volume group so that their configuration databases can be read. An error is returned if the volume group is not in the exported or forced state. Documented return codes: ok, volumeGroupStateNotValid, driveSpinUpError. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_import_dependencies(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: A SYMbol VolumeGroupRef identifying the volume group for which import dependencies are to be reported. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ImportDependenciesReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_import_dependencies" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_import_dependencies`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_import_dependencies`") resource_path = '/storage-systems/{system-id}/symbol/getImportDependencies'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ImportDependenciesReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_ioc_dump_information(self, system_id, body, **kwargs): """ This procedure is used to request information about an IOC Dump. The parameter is an IOC Dump Tag. The value of the tag is unique for each dump and may be obtained from the IOCDumpData structure in StorageArray. Documented return codes: ok, iocDumpInvalidTag. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_ioc_dump_information(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param int body: (required) :param str controller: Controller selection :param bool verbose_error_response: :return: IOCDumpInfoReturn If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_ioc_dump_information" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_ioc_dump_information`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_ioc_dump_information`") resource_path = '/storage-systems/{system-id}/symbol/getIOCDumpInformation'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='IOCDumpInfoReturn', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_iscsi_copper_cable_diagnostics(self, system_id, body, **kwargs): """ This procedure will perform diagnostic tests on all channels of a given iSCSI HIC. These diagnostics are dependent on the PHY used on a particular HIC, so they may not be available on all ports of the controller. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_iscsi_copper_cable_diagnostics(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param IscsiCableDiagnosticsDescriptor body: Information used to start iSCSI cable diagnostics. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: IscsiCableDiagnosticsReturn If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_iscsi_copper_cable_diagnostics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_iscsi_copper_cable_diagnostics`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_iscsi_copper_cable_diagnostics`") resource_path = '/storage-systems/{system-id}/symbol/getIscsiCopperCableDiagnostics'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='IscsiCableDiagnosticsReturn', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_iscsi_negotiation_defaults(self, system_id, **kwargs): """ This procedure returns the default values for negotiable settings for sessions and connections. These represent the storage array's starting point for negotiations. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_iscsi_negotiation_defaults(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: IscsiNegotiationDefaultsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_iscsi_negotiation_defaults" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_iscsi_negotiation_defaults`") resource_path = '/storage-systems/{system-id}/symbol/getIscsiNegotiationDefaults'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='IscsiNegotiationDefaultsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_iscsi_sessions(self, system_id, body, **kwargs): """ This procedure returns data about active iSCSI sessions. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_iscsi_sessions(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param GetIscsiSessionsFilter body: A GetIscsiSessionsFilter object that indicates that either all or a subset of the session data should be returned. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: IscsiSessionsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_iscsi_sessions" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_iscsi_sessions`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_iscsi_sessions`") resource_path = '/storage-systems/{system-id}/symbol/getIscsiSessions'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='IscsiSessionsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_iscsi_statistics(self, system_id, body, **kwargs): """ This procedure returns iSCSI statistical data collected by the storage array. The caller may request either the \"raw\" counts, which are relative to controller start-of-day, or baseline-relative counters, which are relative to the baseline which was last set using the setIscsiStatisticsBaselilne procedure. If the user has not set a baseline since controller start-of-day, then the time at start-of-day is the default baseline time. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_iscsi_statistics(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: An IscsiStatisticsReportType object that indicates if the reported statistics should be the raw or baseline-relative counters. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: IscsiStatisticsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_iscsi_statistics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_iscsi_statistics`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_iscsi_statistics`") resource_path = '/storage-systems/{system-id}/symbol/getIscsiStatistics'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='IscsiStatisticsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_long_lived_ops_progress(self, system_id, **kwargs): """ This procedure will report progress on each actively running long-lived operation. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_long_lived_ops_progress(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: LongLivedOpsProgressReturn If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_long_lived_ops_progress" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_long_lived_ops_progress`") resource_path = '/storage-systems/{system-id}/symbol/getLongLivedOpsProgress'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='LongLivedOpsProgressReturn', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_lun_mappings(self, system_id, body, **kwargs): """ This procedure returns a list of LUN mappings that apply to the object identified by the argument SYMbolRef. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_lun_mappings(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: The SYMbolRef value of the entity for which applicable LUN mappings are to be returned. For example, to find all LUN mappings that apply to a particular Cluster object, the associated ClusterRef would be used as the argument. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: LUNMappings If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_lun_mappings" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_lun_mappings`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_lun_mappings`") resource_path = '/storage-systems/{system-id}/symbol/getLUNMappings'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='LUNMappings', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_mel_entries(self, system_id, body, **kwargs): """ This procedure allows a client to fetch a set of entries from the storage array's Major Event Log for analysis or display. Note that the MEL_MAX_XFER_COUNT constant specifies that maximum number of entries that can be requested in one operation. If more entries are needed, the client must fetch them iteratively, ensuring that no single request exceeds the transfer limit. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_mel_entries(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param MelExtent body: A MelExtent object that provides the sequence number of the first and last MEL entries to be retrieved. All entries between these two numbers (inclusive) will be transferred to the caller as a result of this operation. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: MelEntryList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_mel_entries" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_mel_entries`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_mel_entries`") resource_path = '/storage-systems/{system-id}/symbol/getMelEntries'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='MelEntryList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_mel_extent(self, system_id, **kwargs): """ This procedure is used to determine the head and tail sequence numbers of entries in the storage array's Major Event Log. The client can use these values to manage controlled fetching of log entries. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_mel_extent(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: MelExtent If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_mel_extent" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_mel_extent`") resource_path = '/storage-systems/{system-id}/symbol/getMelExtent'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='MelExtent', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_metadata_volume_capacity(self, system_id, body, **kwargs): """ This procedure returns the amount of storage required for a metadata volume. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_metadata_volume_capacity(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: The metadata volume type e.g. remote volume mirror metadata. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: int If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_metadata_volume_capacity" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_metadata_volume_capacity`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_metadata_volume_capacity`") resource_path = '/storage-systems/{system-id}/symbol/getMetadataVolumeCapacity'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_nvmeof_statistics(self, system_id, **kwargs): """ This procedure returns the NVMeoF statistics, which consist of start-of-day-relative interface/queue statistics and baseline-relative interface/queue statistics. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_nvmeof_statistics(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: NVMeoFStatisticsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_nvmeof_statistics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_nvmeof_statistics`") resource_path = '/storage-systems/{system-id}/symbol/getNVMeoFStatistics'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='NVMeoFStatisticsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_object_graph(self, system_id, **kwargs): """ This procedure causes all configuration and state information to be returned to the requester. The information is conveyed in the form of an object graph. The ObjectBundle object contains a set of all known logical and physical components. The reference values within these objects can be analyzed to determine the interrelationships and linkages between the key objects, and thus to establish the true graph-oriented image of the storage array state. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_object_graph(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ObjectBundle If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_object_graph" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_object_graph`") resource_path = '/storage-systems/{system-id}/symbol/getObjectGraph'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ObjectBundle', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_p_registrations(self, system_id, **kwargs): """ This procedure returns a list of persistent registrations on the array. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_p_registrations(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: PRegistrationList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_p_registrations" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_p_registrations`") resource_path = '/storage-systems/{system-id}/symbol/getPRegistrations'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PRegistrationList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_p_registrations_for_volume(self, system_id, body, **kwargs): """ This procedure returns a list of the persistent registrations for the specified volume. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_p_registrations_for_volume(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: The AbstractVolRef object for the specific volume. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: PRegistrationList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_p_registrations_for_volume" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_p_registrations_for_volume`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_p_registrations_for_volume`") resource_path = '/storage-systems/{system-id}/symbol/getPRegistrationsForVolume'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PRegistrationList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_parity_check_progress(self, system_id, body, **kwargs): """ This procedure returns an indication of the progress of an explicit parity check operation on a particular volume. This procedure is deprecated. The scanVolume procedure should be used instead. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_parity_check_progress(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: The AbstractVolRef value for the volume whose parity check operation is being queried. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: int If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_parity_check_progress" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_parity_check_progress`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_parity_check_progress`") resource_path = '/storage-systems/{system-id}/symbol/getParityCheckProgress'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_pending_hosts(self, system_id, **kwargs): """ Documented return codes: ok, noHeap, internalError. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_pending_hosts(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: CheckedPendingHostListReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_pending_hosts" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_pending_hosts`") resource_path = '/storage-systems/{system-id}/symbol/getPendingHosts'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CheckedPendingHostListReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_persistent_registrations(self, system_id, **kwargs): """ Get the list of persistent registrations on the array OBSOLETE: Any call to getPersistantReservations will get a return status indicating the command is obsolete. Please use the new command getPRegistrations. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_persistent_registrations(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: PersistentRegistrationList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_persistent_registrations" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_persistent_registrations`") resource_path = '/storage-systems/{system-id}/symbol/getPersistentRegistrations'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PersistentRegistrationList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_persistent_registrations_for_volume(self, system_id, body, **kwargs): """ Get the persistent registrations for the specified volume. The list will contain no more than one PersistentRegistration element. OBSOLETE: Any call to getPersistantReservationsForVolume will get a return status indicating the command is obsolete. Please use the new commands getPRegistrationsForVolume. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_persistent_registrations_for_volume(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: (required) :param str controller: Controller selection :param bool verbose_error_response: :return: PersistentRegistrationList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_persistent_registrations_for_volume" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_persistent_registrations_for_volume`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_persistent_registrations_for_volume`") resource_path = '/storage-systems/{system-id}/symbol/getPersistentRegistrationsForVolume'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PersistentRegistrationList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_pit_group_repository_utilization(self, system_id, body, **kwargs): """ This procedure will return repository utilization information for PiT groups. Documented return codes: ok, invalidPitGroupRef. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_pit_group_repository_utilization(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param PITGroupRefList body: A list of PiT groups for which to return repository utilization. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: PITGroupRepositoryUtilizationListReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_pit_group_repository_utilization" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_pit_group_repository_utilization`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_pit_group_repository_utilization`") resource_path = '/storage-systems/{system-id}/symbol/getPITGroupRepositoryUtilization'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PITGroupRepositoryUtilizationListReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_pit_view_repository_utilization(self, system_id, body, **kwargs): """ This procedure will return repository utilization information for PiT Views. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_pit_view_repository_utilization(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param PITViewRefList body: A list of PiT Views for which to return repository utilization. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: PITViewRepositoryUtilizationListReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_pit_view_repository_utilization" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_pit_view_repository_utilization`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_pit_view_repository_utilization`") resource_path = '/storage-systems/{system-id}/symbol/getPITViewRepositoryUtilization'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PITViewRepositoryUtilizationListReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_product_capabilities(self, system_id, **kwargs): """ This procedure retrieves a list of product capabilities supported by the array. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_product_capabilities(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ProductCapabilityList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_product_capabilities" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_product_capabilities`") resource_path = '/storage-systems/{system-id}/symbol/getProductCapabilities'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ProductCapabilityList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_psu_firmware_update_progress(self, system_id, **kwargs): """ This procedure is used to check the progress of a power supply firmware update operation. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_psu_firmware_update_progress(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: PSUFirmwareUpdateStatus If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_psu_firmware_update_progress" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_psu_firmware_update_progress`") resource_path = '/storage-systems/{system-id}/symbol/getPSUFirmwareUpdateProgress'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PSUFirmwareUpdateStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_read_link_status(self, system_id, body, **kwargs): """ This procedure returns the Read Link Status information. Documented return codes: ok, dstNotFibre. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_read_link_status(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param RLSCommandDescriptor body: A RLS Command Descriptor that provides the type of RLS command. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: RLSResults If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_read_link_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_read_link_status`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_read_link_status`") resource_path = '/storage-systems/{system-id}/symbol/getReadLinkStatus'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RLSResults', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_recovery_failure_list(self, system_id, **kwargs): """ This procedure is used by clients to obtain information about all component or logic failures on the storage array that require some form of recovery action. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_recovery_failure_list(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: FailureTypeList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_recovery_failure_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_recovery_failure_list`") resource_path = '/storage-systems/{system-id}/symbol/getRecoveryFailureList'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FailureTypeList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_remote_connections(self, system_id, body, **kwargs): """ This procedure returns information on the available connections between two arrays. This can be used prior to creation of an AsyncMirrorGroup to determine if there are wiring or other connection configuration issues between the two arrays. A call to this procedure acts like a ping test between the arrays and returns back information on the connections that succeed. This must be issued to each controller independently and should be called in fibre channel environments after activation of fibre channel remote mirroring. Documented return codes: ok, notImplemented. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_remote_connections(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param InitiatorTargetInitialProperties body: (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ScsiRemoteConnectionsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_remote_connections" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_remote_connections`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_remote_connections`") resource_path = '/storage-systems/{system-id}/symbol/getRemoteConnections'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ScsiRemoteConnectionsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_repository_utilization(self, system_id, body, **kwargs): """ This procedure is used by clients to obtain information about the utilization of the repository volume for selected snapshots. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_repository_utilization(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param SnapshotRefList body: A list of snapshot volume reference values. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: RepositoryUtilizationList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_repository_utilization" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_repository_utilization`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_repository_utilization`") resource_path = '/storage-systems/{system-id}/symbol/getRepositoryUtilization'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RepositoryUtilizationList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_sa_data(self, system_id, **kwargs): """ This procedure returns an object that contains high-level status information about the storage array as a whole. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_sa_data(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: SAData If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_sa_data" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_sa_data`") resource_path = '/storage-systems/{system-id}/symbol/getSAData'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SAData', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_sa_port(self, system_id, body, **kwargs): """ Retrieves a storage array port. OBSOLETE: Any call to getSAPort will get a return status indicating the command is obsolete. No alternative procedure is available. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_sa_port(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param SAPortGetDescriptor body: (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ReturnCodeWithRef If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_sa_port" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_sa_port`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_sa_port`") resource_path = '/storage-systems/{system-id}/symbol/getSAPort'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ReturnCodeWithRef', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_sa_view_password_digest(self, system_id, **kwargs): """ This procedure is used to retrieve the digest of the view array password and its associated salt value which are saved in the array by the setViewPassword procedure. If the view array password isn't set, the procedure returns a random salt value and the digest of the salt value message. Documented return codes: ok, adminPasswordNotSet. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_sa_view_password_digest(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: SAViewPasswordDigestReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_sa_view_password_digest" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_sa_view_password_digest`") resource_path = '/storage-systems/{system-id}/symbol/getSAViewPasswordDigest'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SAViewPasswordDigestReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_sas_error_statistics(self, system_id, **kwargs): """ This procedure returns the SAS PHY error statistics for all SAS devices in the storage array. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_sas_error_statistics(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: SasStatisticsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_sas_error_statistics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_sas_error_statistics`") resource_path = '/storage-systems/{system-id}/symbol/getSasErrorStatistics'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SasStatisticsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_soc_error_statistics(self, system_id, body, **kwargs): """ This procedure returns SOC error statistics. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_soc_error_statistics(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param SocCommandDescriptor body: A SOC command descriptor that indicates the devices for which statistics should be returned. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: SocStatisticsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_soc_error_statistics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_soc_error_statistics`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_soc_error_statistics`") resource_path = '/storage-systems/{system-id}/symbol/getSocErrorStatistics'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SocStatisticsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_ssd_block_allocation_scan_status(self, system_id, **kwargs): """ This procedure is used to retrieve the information collected by a SSD Block Allocation Scan. The requested devices and type of scan is set by the startSSDBlockAllocationScan procedure. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_ssd_block_allocation_scan_status(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: SSDBlockAllocationScanStatusResults If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_ssd_block_allocation_scan_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_ssd_block_allocation_scan_status`") resource_path = '/storage-systems/{system-id}/symbol/getSSDBlockAllocationScanStatus'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SSDBlockAllocationScanStatusResults', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_system_attribute_defaults(self, system_id, **kwargs): """ This procedure returns the default values for system attributes. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_system_attribute_defaults(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: SystemAttributeDefaultsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_system_attribute_defaults" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_system_attribute_defaults`") resource_path = '/storage-systems/{system-id}/symbol/getSystemAttributeDefaults'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SystemAttributeDefaultsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_thin_volume_consumed_capacity(self, system_id, body, **kwargs): """ This procedure will retrieve a thin volume's Expandable Repository Volume consumed capacity. Documented return codes: ok, noHeap, invalidVolumeref, alternateRequiredForOperation, illegalVolume. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_thin_volume_consumed_capacity(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param ThinVolumeRefList body: A reference to the thin volume for which you want the consumed capacity. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ThinVolumeConsumedCapacityReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_thin_volume_consumed_capacity" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_thin_volume_consumed_capacity`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_thin_volume_consumed_capacity`") resource_path = '/storage-systems/{system-id}/symbol/getThinVolumeConsumedCapacity'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ThinVolumeConsumedCapacityReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_thin_volume_expansion_history(self, system_id, body, **kwargs): """ This procedure will retrieve a thin volume's repository expansion history. Documented return codes: ok, illegalParam, invalidVolumeref. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_thin_volume_expansion_history(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: A reference to the thin volume for which you want the repository expansion history. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ThinVolumeRepositoryExpansionHistoryListReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_thin_volume_expansion_history" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_thin_volume_expansion_history`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_thin_volume_expansion_history`") resource_path = '/storage-systems/{system-id}/symbol/getThinVolumeExpansionHistory'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ThinVolumeRepositoryExpansionHistoryListReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_unconfigured_initiators(self, system_id, **kwargs): """ This procedure returns a list of initiators that have been detected by the storage array, but which are not configured into the storage array topology. An initiator is considered unconfigured if it is not associated with a host. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_unconfigured_initiators(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: UnconfiguredInitiatorsReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_unconfigured_initiators" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_unconfigured_initiators`") resource_path = '/storage-systems/{system-id}/symbol/getUnconfiguredInitiators'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='UnconfiguredInitiatorsReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_unlabeled_host_ports(self, system_id, **kwargs): """ This procedure returns information about host ports whose world-wide names are known to the controller, but which have not been defined as full HostPort objects via the SYMbol interface. Note that you only need to send the request to one of the controllers, and that the same list of unlabeled host ports are returned, regardless of which controller receives the request. This procedure does not apply to iSCSI. The getUnconfiguredInitiators procedure should be used instead. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_unlabeled_host_ports(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: str If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_unlabeled_host_ports" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_unlabeled_host_ports`") resource_path = '/storage-systems/{system-id}/symbol/getUnlabeledHostPorts'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_volume_action_progress(self, system_id, body, **kwargs): """ This procedure returns an indication of the extent to which a long-running operation on a volume has completed. The set of supported long-running operations is defined by the VolumeAction enumeration. This procedure can also be called for a snapshot volume. The set of supported long-running operations for snapshot volumes is defined by the SnapshotAction enumeration. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_volume_action_progress(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: The value of the AbstractVolRef for the volume whose long-running operation is being queried. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: VolumeActionProgress If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_volume_action_progress" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_volume_action_progress`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_volume_action_progress`") resource_path = '/storage-systems/{system-id}/symbol/getVolumeActionProgress'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='VolumeActionProgress', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_volume_candidates(self, system_id, body, **kwargs): """ This procedure returns a list of volume candidates that can be used in an ensuing volume creation request. Documented return codes: error, invalidSecurity, noFdeDrives, volumeGroupSecure. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_volume_candidates(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param VolumeCandidateRequest body: A VolumeCandidateRequest descriptor that specifies the type of volume candidates to be returned to the caller. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: VolumeCandidateList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_volume_candidates" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_volume_candidates`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_volume_candidates`") resource_path = '/storage-systems/{system-id}/symbol/getVolumeCandidates'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='VolumeCandidateList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_volume_copy_source_candidates(self, system_id, **kwargs): """ This procedure returns a list of volume source candidates for creating a volume copy. Documented return codes: ok, illegalParam, noHeap, tryAlternate, iconFailure, maxVolumeCopysExceeded, volcopyFeatureDisabled. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_volume_copy_source_candidates(system_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: VolumeCopyCandidateList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_volume_copy_source_candidates" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_volume_copy_source_candidates`") resource_path = '/storage-systems/{system-id}/symbol/getVolumeCopySourceCandidates'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='VolumeCopyCandidateList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_volume_copy_target_candidates(self, system_id, body, **kwargs): """ This procedure returns a list of volume target candidates for creating a volume copy. Documented return codes: ok, illegalParam, noHeap, tryAlternate, iconFailure, maxVolumeCopysExceeded, volcopyFeatureDisabled. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_volume_copy_target_candidates(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: An AbstractVolRef descriptor that specifies the source volume for which the target candidates are requested (i.e. the source volume in the candidate copy relationship\u2026 the SYMbol client is requesting valid target volumes to use with this source volume). (required) :param str controller: Controller selection :param bool verbose_error_response: :return: VolumeCopyCandidateList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_volume_copy_target_candidates" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_volume_copy_target_candidates`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_volume_copy_target_candidates`") resource_path = '/storage-systems/{system-id}/symbol/getVolumeCopyTargetCandidates'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='VolumeCopyCandidateList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_volume_group_expansion_candidates(self, system_id, body, **kwargs): """ The firmware prioritizes the properties of candidates for constructing the return list, subject to the volume group having a given property in the first place. The prioritization and ordering of the list is as follows: Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_volume_group_expansion_candidates(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param str body: A reference to the volume group to which the candidates are to apply. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: ExpansionCandidatesReturned If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_volume_group_expansion_candidates" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_volume_group_expansion_candidates`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_volume_group_expansion_candidates`") resource_path = '/storage-systems/{system-id}/symbol/getVolumeGroupExpansionCandidates'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ExpansionCandidatesReturned', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_volume_list_for_mirroring(self, system_id, body, **kwargs): """ This procedure returns a list of mirror volume candidates that can be used in an ensuing mirror volume creation request. Documented return codes: ok, illegalParam, noHeap, internalError, invalidVolumeref, ghostVolume, metadataVolNonexistent, rvmFeatureDisabled, maxMirrorsExceeded, invalidMirrorCandidateVol, noValidMirrorCandidate, remoteMaxMirrorsExceeded, remoteRvmFeatureDisabled, remoteMetadataVolNonexistent, rvmVersionMismatch, rvmRemoteArrayError, rvmCommunicationError. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_volume_list_for_mirroring(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param MirrorCandidateDescriptor body: A MirrorVolumeCandidateRequest descriptor that specifies the type of mirror volume candidates to be returned to the caller. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: MirrorVolumeCandidateList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_volume_list_for_mirroring" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_volume_list_for_mirroring`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_volume_list_for_mirroring`") resource_path = '/storage-systems/{system-id}/symbol/getVolumeListForMirroring'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='MirrorVolumeCandidateList', auth_settings=auth_settings, callback=params.get('callback')) return response def symbol_get_volume_performance(self, system_id, body, **kwargs): """ This procedure is used by the client to retrieve performance monitoring data for one or more volumes. Documented return codes: ok. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.symbol_get_volume_performance(system_id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str system_id: The unique identifier of the storage-system. This may be the id or the WWN. (required) :param AbstractVolRefList body: A list of AbstractVolRef values of the volumes for which the caller wishes to obtain performance monitoring information. (required) :param str controller: Controller selection :param bool verbose_error_response: :return: VolumePerformanceList If the method is called asynchronously, returns the request thread. :raises: ValueError If the required params are not provided or if the response data format is unknown. TypeError: When the data type of response data is different from what we are expecting ApiException: Occurs when we get a HTTP error code (422 and above). """ all_params = ['system_id', 'body', 'controller', 'verbose_error_response'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method symbol_get_volume_performance" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'system_id' is set if ('system_id' not in params) or (params['system_id'] is None): raise ValueError("Missing the required parameter `system_id` when calling `symbol_get_volume_performance`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `symbol_get_volume_performance`") resource_path = '/storage-systems/{system-id}/symbol/getVolumePerformance'.replace('{format}', 'json') path_params = {} if 'system_id' in params: path_params['system-id'] = params['system_id'] query_params = {} if 'controller' in params: query_params['controller'] = params['controller'] if 'verbose_error_response' in params: query_params['verboseErrorResponse'] = params['verbose_error_response'] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['basicAuth'] response = self.api_client.call_api(resource_path, 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='VolumePerformanceList', auth_settings=auth_settings, callback=params.get('callback')) return response
39.597484
845
0.529789
43,986
465,904
5.43332
0.026304
0.039366
0.032805
0.021323
0.909716
0.901402
0.893996
0.881706
0.870267
0.860417
0
0.001141
0.401982
465,904
11,765
846
39.60085
0.856621
0.316445
0
0.862572
0
0
0.211777
0.079871
0
0
0
0
0
1
0.021258
false
0.001074
0.002577
0
0.045093
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
c65ad1fad9ec8b8e558d31e4efcef5621662f08c
68
py
Python
python/baseline/tf/__init__.py
domyounglee/baseline
2261abfb7e770cc6f3d63a7f6e0015238d0e11f8
[ "Apache-2.0" ]
1
2019-08-13T21:35:20.000Z
2019-08-13T21:35:20.000Z
python/baseline/tf/__init__.py
domyounglee/baseline
2261abfb7e770cc6f3d63a7f6e0015238d0e11f8
[ "Apache-2.0" ]
null
null
null
python/baseline/tf/__init__.py
domyounglee/baseline
2261abfb7e770cc6f3d63a7f6e0015238d0e11f8
[ "Apache-2.0" ]
3
2019-05-27T04:52:21.000Z
2022-02-15T00:22:53.000Z
from baseline.tf.tfy import * from baseline.tf.transformer import *
22.666667
37
0.794118
10
68
5.4
0.6
0.444444
0.518519
0
0
0
0
0
0
0
0
0
0.117647
68
2
38
34
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
c680e5267c37a4b0a4400240eb67ad579d3c45ed
12,104
py
Python
lang/python/github/com/metaprov/modelaapi/services/featureset/v1/featureset_pb2_grpc.py
metaprov/modeldapi
ee05693832051dcd990ee4f061715d7ae0787340
[ "Apache-2.0" ]
5
2022-02-18T03:40:10.000Z
2022-03-01T16:11:24.000Z
lang/python/github/com/metaprov/modelaapi/services/featureset/v1/featureset_pb2_grpc.py
metaprov/modeldapi
ee05693832051dcd990ee4f061715d7ae0787340
[ "Apache-2.0" ]
1
2022-01-07T19:59:25.000Z
2022-02-04T01:21:14.000Z
lang/python/github/com/metaprov/modelaapi/services/featureset/v1/featureset_pb2_grpc.py
metaprov/modeldapi
ee05693832051dcd990ee4f061715d7ae0787340
[ "Apache-2.0" ]
1
2022-03-25T10:21:43.000Z
2022-03-25T10:21:43.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from github.com.metaprov.modelaapi.services.featureset.v1 import featureset_pb2 as github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2 class FeaturesetServiceStub(object): """Missing associated documentation comment in .proto file.""" def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.ListFeaturesets = channel.unary_unary( '/github.com.metaprov.modelaapi.services.featureset.v1.FeaturesetService/ListFeaturesets', request_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.ListFeaturesetRequest.SerializeToString, response_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.ListFeaturesetResponse.FromString, ) self.CreateFeatureset = channel.unary_unary( '/github.com.metaprov.modelaapi.services.featureset.v1.FeaturesetService/CreateFeatureset', request_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.CreateFeaturesetRequest.SerializeToString, response_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.CreateFeaturesetResponse.FromString, ) self.GetFeatureset = channel.unary_unary( '/github.com.metaprov.modelaapi.services.featureset.v1.FeaturesetService/GetFeatureset', request_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.GetFeaturesetRequest.SerializeToString, response_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.GetFeaturesetResponse.FromString, ) self.UpdateFeatureset = channel.unary_unary( '/github.com.metaprov.modelaapi.services.featureset.v1.FeaturesetService/UpdateFeatureset', request_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.UpdateFeaturesetRequest.SerializeToString, response_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.UpdateFeaturesetResponse.FromString, ) self.DeleteFeatureset = channel.unary_unary( '/github.com.metaprov.modelaapi.services.featureset.v1.FeaturesetService/DeleteFeatureset', request_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.DeleteFeaturesetRequest.SerializeToString, response_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.DeleteFeaturesetResponse.FromString, ) class FeaturesetServiceServicer(object): """Missing associated documentation comment in .proto file.""" def ListFeaturesets(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CreateFeatureset(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def GetFeatureset(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def UpdateFeatureset(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def DeleteFeatureset(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_FeaturesetServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'ListFeaturesets': grpc.unary_unary_rpc_method_handler( servicer.ListFeaturesets, request_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.ListFeaturesetRequest.FromString, response_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.ListFeaturesetResponse.SerializeToString, ), 'CreateFeatureset': grpc.unary_unary_rpc_method_handler( servicer.CreateFeatureset, request_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.CreateFeaturesetRequest.FromString, response_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.CreateFeaturesetResponse.SerializeToString, ), 'GetFeatureset': grpc.unary_unary_rpc_method_handler( servicer.GetFeatureset, request_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.GetFeaturesetRequest.FromString, response_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.GetFeaturesetResponse.SerializeToString, ), 'UpdateFeatureset': grpc.unary_unary_rpc_method_handler( servicer.UpdateFeatureset, request_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.UpdateFeaturesetRequest.FromString, response_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.UpdateFeaturesetResponse.SerializeToString, ), 'DeleteFeatureset': grpc.unary_unary_rpc_method_handler( servicer.DeleteFeatureset, request_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.DeleteFeaturesetRequest.FromString, response_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.DeleteFeaturesetResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'github.com.metaprov.modelaapi.services.featureset.v1.FeaturesetService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API. class FeaturesetService(object): """Missing associated documentation comment in .proto file.""" @staticmethod def ListFeaturesets(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/github.com.metaprov.modelaapi.services.featureset.v1.FeaturesetService/ListFeaturesets', github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.ListFeaturesetRequest.SerializeToString, github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.ListFeaturesetResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def CreateFeatureset(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/github.com.metaprov.modelaapi.services.featureset.v1.FeaturesetService/CreateFeatureset', github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.CreateFeaturesetRequest.SerializeToString, github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.CreateFeaturesetResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def GetFeatureset(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/github.com.metaprov.modelaapi.services.featureset.v1.FeaturesetService/GetFeatureset', github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.GetFeaturesetRequest.SerializeToString, github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.GetFeaturesetResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def UpdateFeatureset(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/github.com.metaprov.modelaapi.services.featureset.v1.FeaturesetService/UpdateFeatureset', github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.UpdateFeaturesetRequest.SerializeToString, github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.UpdateFeaturesetResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def DeleteFeatureset(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/github.com.metaprov.modelaapi.services.featureset.v1.FeaturesetService/DeleteFeatureset', github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.DeleteFeaturesetRequest.SerializeToString, github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_featureset_dot_v1_dot_featureset__pb2.DeleteFeaturesetResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
60.824121
180
0.750744
1,233
12,104
6.870235
0.089213
0.095148
0.043915
0.054893
0.884075
0.884075
0.884075
0.856215
0.842403
0.811002
0
0.007648
0.189855
12,104
198
181
61.131313
0.85621
0.056675
0
0.493827
1
0
0.110043
0.083061
0
0
0
0
0
1
0.074074
false
0
0.012346
0.030864
0.135802
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
c6a226d1ea7ea45aad43731218a88efe7c1b4781
17
py
Python
wav2rec/nn/__init__.py
TariqAHassan/wav2rec
8d3f33291f246d80a4935cf7aa2cc75f110d9c15
[ "MIT" ]
10
2021-11-12T03:58:05.000Z
2022-02-19T08:13:30.000Z
wav2rec/nn/__init__.py
TariqAHassan/wav2rec
8d3f33291f246d80a4935cf7aa2cc75f110d9c15
[ "MIT" ]
null
null
null
wav2rec/nn/__init__.py
TariqAHassan/wav2rec
8d3f33291f246d80a4935cf7aa2cc75f110d9c15
[ "MIT" ]
1
2021-11-12T03:58:05.000Z
2021-11-12T03:58:05.000Z
""" NN """
2.833333
6
0.117647
1
17
2
1
0
0
0
0
0
0
0
0
0
0
0
0.529412
17
5
7
3.4
0.25
0.117647
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
7
c6a8f0811624446c741fde00931eb1c86afd2c21
8,353
py
Python
ubike/vis/migrations/0003_auto_20190719_0519.py
alberthsies/taipei-ubike-visualization
d1c51b5b9c96d930f9552404a3af6d39c0f70ba7
[ "MIT" ]
null
null
null
ubike/vis/migrations/0003_auto_20190719_0519.py
alberthsies/taipei-ubike-visualization
d1c51b5b9c96d930f9552404a3af6d39c0f70ba7
[ "MIT" ]
19
2019-06-04T03:16:37.000Z
2022-02-10T10:08:52.000Z
ubike/vis/migrations/0003_auto_20190719_0519.py
alberthsies/taipei-ubike-visualization
d1c51b5b9c96d930f9552404a3af6d39c0f70ba7
[ "MIT" ]
null
null
null
# Generated by Django 2.2.2 on 2019-07-19 05:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('vis', '0002_auto_20190702_0906'), ] operations = [ migrations.CreateModel( name='AutoRainData', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('lat', models.FloatField()), ('lon', models.FloatField()), ('locationName', models.TextField()), ('stationId', models.TextField()), ('obsTime', models.DateTimeField()), ('elementName', models.FloatField()), ('ELEV', models.FloatField()), ('RAIN', models.FloatField()), ('MIN_10', models.FloatField()), ('HOUR_3', models.FloatField()), ('HOUR_6', models.FloatField()), ('HOUR_12', models.FloatField()), ('HOUR_24', models.FloatField()), ('NOW', models.FloatField()), ('latest_2days', models.FloatField()), ('latest_3days', models.FloatField()), ('CITY', models.TextField()), ('CITY_SN', models.IntegerField()), ('TOWN', models.TextField()), ('TOWN_SN', models.IntegerField()), ('ATTRIBUTE', models.TextField()), ], options={ 'ordering': ['-stationId'], }, ), migrations.CreateModel( name='AutoRainStation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('lat', models.FloatField()), ('lon', models.FloatField()), ('locationName', models.TextField()), ('stationId', models.TextField()), ('CITY', models.TextField()), ('CITY_SN', models.IntegerField()), ('TOWN', models.TextField()), ('TOWN_SN', models.IntegerField()), ('ATTRIBUTE', models.TextField()), ], options={ 'ordering': ['-stationId'], }, ), migrations.CreateModel( name='AutoWeatherData', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('lat', models.FloatField()), ('lon', models.FloatField()), ('locationName', models.TextField()), ('stationId', models.TextField()), ('obsTime', models.DateTimeField()), ('ELE', models.FloatField()), ('WDIR', models.FloatField()), ('WDSD', models.FloatField()), ('TEMP', models.FloatField()), ('HUMD', models.FloatField()), ('PRES', models.FloatField()), ('SUN', models.FloatField()), ('H_24R', models.FloatField()), ('H_FX', models.FloatField()), ('H_XD', models.FloatField()), ('H_FXT', models.FloatField()), ('D_TX', models.FloatField()), ('D_TXT', models.FloatField()), ('D_TN', models.FloatField()), ('D_TNT', models.FloatField()), ('CITY', models.TextField()), ('CITY_SN', models.FloatField()), ('TOWN', models.TextField()), ('TOWN_SN', models.FloatField()), ], options={ 'ordering': ['-stationId'], }, ), migrations.CreateModel( name='AutoWeatherStation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('lat', models.FloatField()), ('lon', models.FloatField()), ('locationName', models.TextField()), ('stationId', models.TextField()), ('CITY', models.TextField()), ('CITY_SN', models.IntegerField()), ('TOWN', models.TextField()), ('TOWN_SN', models.IntegerField()), ], options={ 'ordering': ['-stationId'], }, ), migrations.CreateModel( name='BureauWeatherData', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('lat', models.FloatField()), ('lon', models.FloatField()), ('locationName', models.TextField()), ('stationId', models.TextField()), ('obsTime', models.DateTimeField()), ('ELEV', models.FloatField()), ('WDIR', models.FloatField()), ('WDSD', models.FloatField()), ('TEMP', models.FloatField()), ('HUMD', models.FloatField()), ('PRES', models.FloatField()), ('R24R', models.FloatField()), ('H_FX', models.FloatField()), ('H_XD', models.FloatField()), ('H_FXT', models.FloatField()), ('H_F10', models.FloatField()), ('H_10D', models.FloatField()), ('H_F10T', models.FloatField()), ('H_UVI', models.FloatField()), ('D_TX', models.FloatField()), ('D_TXT', models.FloatField()), ('D_TN', models.FloatField()), ('D_TNT', models.FloatField()), ('D_TS', models.FloatField()), ('H_VIS', models.FloatField()), ('H_Weather', models.TextField()), ('CITY', models.TextField()), ('CITY_SN', models.IntegerField()), ('TOWN', models.TextField()), ('TOWN_SN', models.IntegerField()), ], options={ 'ordering': ['-stationId'], }, ), migrations.CreateModel( name='BureauWeatherStation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('lat', models.FloatField()), ('lon', models.FloatField()), ('locationName', models.TextField()), ('stationId', models.TextField()), ('CITY', models.TextField()), ('CITY_SN', models.IntegerField()), ('TOWN', models.TextField()), ('TOWN_SN', models.IntegerField()), ], options={ 'ordering': ['-stationId'], }, ), migrations.CreateModel( name='FetchAutoRainDataRecord', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('num', models.BigIntegerField()), ('mday', models.DateTimeField()), ], options={ 'ordering': ['-num'], }, ), migrations.CreateModel( name='FetchAutoWeatherDataRecord', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('num', models.BigIntegerField()), ('mday', models.DateTimeField()), ], options={ 'ordering': ['-num'], }, ), migrations.CreateModel( name='FetchBureauWeatherDataRecord', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('num', models.BigIntegerField()), ('mday', models.DateTimeField()), ], options={ 'ordering': ['-num'], }, ), migrations.RenameModel( old_name='FetchDataRecord', new_name='FetchUbikeDataRecord', ), ]
40.746341
114
0.463307
594
8,353
6.392256
0.176768
0.252831
0.058204
0.054517
0.788781
0.788781
0.767711
0.767711
0.755333
0.755333
0
0.009716
0.371603
8,353
204
115
40.946078
0.71366
0.005387
0
0.742424
1
0
0.121238
0.012039
0
0
0
0
0
1
0
false
0
0.005051
0
0.020202
0
0
0
0
null
1
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
c6d49936b956ba20cf61b0411e5980229e4117b2
630
py
Python
txstripe/test/mocks/plan.py
lextoumbourou/txstripe
fa42279f40f5f0facfa8ef14f26423598622969d
[ "MIT" ]
1
2017-03-28T00:55:21.000Z
2017-03-28T00:55:21.000Z
txstripe/test/mocks/plan.py
lextoumbourou/txstripe
fa42279f40f5f0facfa8ef14f26423598622969d
[ "MIT" ]
2
2017-03-29T05:03:35.000Z
2021-04-30T20:29:52.000Z
txstripe/test/mocks/plan.py
lextoumbourou/txstripe
fa42279f40f5f0facfa8ef14f26423598622969d
[ "MIT" ]
null
null
null
import json create_success = json.loads('''{ "interval": "month", "name": "Gold Special", "created": 1442136520, "amount": 2000, "currency": "aud", "id": "gold", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null, "metadata": {}, "statement_descriptor": null }''') retrieve_success = json.loads('''{ "interval": "month", "name": "Test!", "created": 1442136520, "amount": 2000, "currency": "aud", "id": "gold", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null, "metadata": {}, "statement_descriptor": null }''')
19.090909
34
0.598413
65
630
5.646154
0.492308
0.059946
0.087193
0.13079
0.893733
0.893733
0.713896
0.713896
0.713896
0.713896
0
0.057692
0.174603
630
32
35
19.6875
0.648077
0
0
0.827586
0
0
0.85873
0.073016
0
0
0
0
0
1
0
false
0
0.034483
0
0.034483
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
05d016f0a076714b8c12ae9069ce25755a81d5c7
180
py
Python
oscrypto/_pure/external/pkcs1/__init__.py
skelsec/oscrypto
84f4c84238d0b981618907c6f102e0ba070beddb
[ "MIT" ]
null
null
null
oscrypto/_pure/external/pkcs1/__init__.py
skelsec/oscrypto
84f4c84238d0b981618907c6f102e0ba070beddb
[ "MIT" ]
null
null
null
oscrypto/_pure/external/pkcs1/__init__.py
skelsec/oscrypto
84f4c84238d0b981618907c6f102e0ba070beddb
[ "MIT" ]
null
null
null
from . import rsassa_pkcs1_v15 from . import rsassa_pss from . import rsaes_oaep from . import rsaes_pkcs1_v15 from . import keys from . import primitives __VERSION__ = (0, 9, 6)
20
30
0.772222
28
180
4.607143
0.5
0.465116
0.248062
0.27907
0
0
0
0
0
0
0
0.06
0.166667
180
8
31
22.5
0.8
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.857143
0
0.857143
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
7
05ff1fc970d6052fa3089355413297b93102ff27
2,229
py
Python
examples/python/vggModel.py
monaj07/Vizdoom
3537793ced50273cdd9e513155ce9ef3bacca67b
[ "MIT" ]
null
null
null
examples/python/vggModel.py
monaj07/Vizdoom
3537793ced50273cdd9e513155ce9ef3bacca67b
[ "MIT" ]
null
null
null
examples/python/vggModel.py
monaj07/Vizdoom
3537793ced50273cdd9e513155ce9ef3bacca67b
[ "MIT" ]
null
null
null
from keras.layers import ZeroPadding2D, Convolution2D, MaxPooling2D, Dense, Dropout from keras.layers import Flatten from keras.models import Sequential def vggModel(weights_path=None, DROP_RATIO=0.5): CNN_model = Sequential() CNN_model.add(ZeroPadding2D((1,1),input_shape=(3,224,224))) CNN_model.add(Convolution2D(64, 3, 3, activation='relu')) CNN_model.add(ZeroPadding2D((1,1))) CNN_model.add(Convolution2D(64, 3, 3, activation='relu')) CNN_model.add(MaxPooling2D((2,2), strides=(2,2))) CNN_model.add(ZeroPadding2D((1,1))) CNN_model.add(Convolution2D(128, 3, 3, activation='relu')) CNN_model.add(ZeroPadding2D((1,1))) CNN_model.add(Convolution2D(128, 3, 3, activation='relu')) CNN_model.add(MaxPooling2D((2,2), strides=(2,2))) CNN_model.add(ZeroPadding2D((1,1))) CNN_model.add(Convolution2D(256, 3, 3, activation='relu')) CNN_model.add(ZeroPadding2D((1,1))) CNN_model.add(Convolution2D(256, 3, 3, activation='relu')) CNN_model.add(ZeroPadding2D((1,1))) CNN_model.add(Convolution2D(256, 3, 3, activation='relu')) CNN_model.add(MaxPooling2D((2,2), strides=(2,2))) CNN_model.add(ZeroPadding2D((1,1))) CNN_model.add(Convolution2D(512, 3, 3, activation='relu')) CNN_model.add(ZeroPadding2D((1,1))) CNN_model.add(Convolution2D(512, 3, 3, activation='relu')) CNN_model.add(ZeroPadding2D((1,1))) CNN_model.add(Convolution2D(512, 3, 3, activation='relu')) CNN_model.add(MaxPooling2D((2,2), strides=(2,2))) CNN_model.add(ZeroPadding2D((1,1))) CNN_model.add(Convolution2D(512, 3, 3, activation='relu')) CNN_model.add(ZeroPadding2D((1,1))) CNN_model.add(Convolution2D(512, 3, 3, activation='relu')) CNN_model.add(ZeroPadding2D((1,1))) CNN_model.add(Convolution2D(512, 3, 3, activation='relu')) CNN_model.add(MaxPooling2D((2,2), strides=(2,2))) CNN_model.add(Flatten()) CNN_model.add(Dense(4096, activation='relu')) CNN_model.add(Dropout(DROP_RATIO)) CNN_model.add(Dense(4096, activation='relu')) CNN_model.add(Dropout(DROP_RATIO)) CNN_model.add(Dense(1000, activation='softmax')) if weights_path is not None: CNN_model.load_weights(weights_path) return CNN_model
41.277778
83
0.698968
328
2,229
4.603659
0.137195
0.211921
0.269536
0.218543
0.803974
0.803974
0.786755
0.786755
0.786755
0.786755
0
0.08458
0.130103
2,229
53
84
42.056604
0.694172
0
0
0.755556
0
0
0.030072
0
0
0
0
0
0
1
0.022222
false
0
0.066667
0
0.111111
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
af6012b8be81cb888918bf825797fc6102d088dd
6,136
py
Python
tests/test_util.py
goodmase/django-bitfield-manager
fbb08e1f47c356b23d8a2d6af0cec1bd0647b682
[ "MIT" ]
2
2017-01-28T00:10:22.000Z
2019-06-06T07:09:08.000Z
tests/test_util.py
goodmase/django-bitfield-manager
fbb08e1f47c356b23d8a2d6af0cec1bd0647b682
[ "MIT" ]
null
null
null
tests/test_util.py
goodmase/django-bitfield-manager
fbb08e1f47c356b23d8a2d6af0cec1bd0647b682
[ "MIT" ]
null
null
null
from django.test import TestCase from bitfield_manager import utils from bitfield.types import Bit, BitHandler from .models import ChildTestModel1, ParentTestModel from .test_models import create_default_parent class TestBitfieldUtilWithDjangoBitfield(TestCase): def test_flag_set(self): flag_5 = Bit(5) status_1 = 0 status_1 = utils.set_flag_for_status(status_1, flag_5) status_2 = 0 status_2 = utils.set_flag_field_for_status(status_2, flag_5) self.assertEqual(status_1, status_2) self.assertEqual(status_1, 32) self.assertEqual(utils.is_flag_field_set_for_status(status_2, flag_5), True) self.assertEqual(utils.is_flag_field_set_for_status(status_1, Bit(6)), False) self.assertEqual(utils.is_flag_set_for_status(status_1, flag_5), True) def test_bithandler_int_mismatch(self): status_bithandler = BitHandler(36, [Bit(5), Bit(2)]) status = 36 self.assertEqual(utils.is_flag_field_set_for_status(status, Bit(5)), True) self.assertEqual(utils.is_flag_field_set_for_status(status_bithandler, Bit(5)), True) self.assertEqual(utils.is_flag_set_for_status(status, Bit(5)), True) self.assertEqual(utils.is_flag_set_for_status(status_bithandler, Bit(5)), True) def test_multi_flag_set(self): flag_5 = Bit(5) flag_2 = Bit(2) flag_3 = Bit(3) status_2 = utils.set_flag_field_for_status(0, flag_5) multi_mask_flag = flag_5 | flag_2 status_3 = utils.set_flag_field_for_status(multi_mask_flag, flag_3) # should be false because not all elements match self.assertEqual(utils.is_flag_set_for_status(status_2, multi_mask_flag), False) self.assertEqual(utils.is_flag_set_for_status(status_3, multi_mask_flag), True) def test_flag_unset(self): flag_5 = Bit(5) flag_2 = Bit(2) status = flag_5 | flag_2 s1 = utils.unset_flag_field_for_status(status, flag_5) self.assertEqual(utils.is_flag_field_set_for_status(s1, flag_5), False) self.assertEqual(utils.is_flag_field_set_for_status(s1, flag_2), True) self.assertEqual(utils.is_flag_set_for_status(s1, flag_5), False) self.assertEqual(utils.is_flag_set_for_status(s1, flag_2), True) def test_multi_flag_unset(self): status = 0 for i in range(5): status |= Bit(i) for i in range(5): self.assertEqual(utils.is_flag_field_set_for_status(status, Bit(i)), True) multi_mask_flag = Bit(4) | Bit(2) s1 = utils.unset_flag_for_status(status, multi_mask_flag) self.assertEqual(utils.is_flag_field_set_for_status(s1, Bit(4)), False) self.assertEqual(utils.is_flag_field_set_for_status(s1, Bit(3)), True) self.assertEqual(utils.is_flag_field_set_for_status(s1, Bit(2)), False) self.assertEqual(utils.is_flag_field_set_for_status(s1, Bit(1)), True) self.assertEqual(utils.is_flag_field_set_for_status(s1, Bit(0)), True) class TestBitfieldUtil(TestCase): def test_flag_set(self): status_1 = 0 status_1 = utils.set_flag_for_status(status_1, (1 << 5)) status_2 = 0 status_2 = utils.set_flag_field_for_status(status_2, 5) self.assertEqual(status_1, status_2) self.assertEqual(status_1, 32) self.assertEqual(utils.is_flag_field_set_for_status(status_2, 5), True) self.assertEqual(utils.is_flag_field_set_for_status(status_1, 6), False) self.assertEqual(utils.is_flag_set_for_status(status_1, (1 << 5)), True) def test_multi_flag_set(self): status_2 = utils.set_flag_field_for_status(0, 5) multi_mask_flag = (1 << 5) | (1 << 2) status_3 = utils.set_flag_field_for_status(multi_mask_flag, 3) # should be false because not all elements match self.assertEqual(utils.is_flag_set_for_status(status_2, multi_mask_flag), False) self.assertEqual(utils.is_flag_set_for_status(status_3, multi_mask_flag), True) def test_flag_unset(self): status = (1 << 5) | (1 << 2) s1 = utils.unset_flag_field_for_status(status, 5) self.assertEqual(utils.is_flag_field_set_for_status(s1, 5), False) self.assertEqual(utils.is_flag_field_set_for_status(s1, 2), True) self.assertEqual(utils.is_flag_set_for_status(s1, (1 << 5)), False) self.assertEqual(utils.is_flag_set_for_status(s1, (1 << 2)), True) def test_multi_flag_unset(self): status = 0 for i in range(5): status |= (1 << i) for i in range(5): self.assertEqual(utils.is_flag_field_set_for_status(status, i), True) multi_mask_flag = (1 << 4) | (1 << 2) s1 = utils.unset_flag_for_status(status, multi_mask_flag) self.assertEqual(utils.is_flag_field_set_for_status(s1, 4), False) self.assertEqual(utils.is_flag_field_set_for_status(s1, 3), True) self.assertEqual(utils.is_flag_field_set_for_status(s1, 2), False) self.assertEqual(utils.is_flag_field_set_for_status(s1, 1), True) self.assertEqual(utils.is_flag_field_set_for_status(s1, 0), True) class TestStringUtils(TestCase): def test_get_field_from_source(self): source = "parent.status" field = utils.get_field_from_source(source) self.assertEqual(field, "status") source = "parent.child.status" field = utils.get_field_from_source(source) self.assertEqual(field, "status") def test_get_django_qs(self): source = "parent.status" qs = utils.get_django_query_string_from_source(source) self.assertEqual(qs, "parent") source = "parent.child.child.status" qs = utils.get_django_query_string_from_source(source) self.assertEqual(qs, "parent__child__child") class TestGetModel(TestCase): def test_get_parent(self): p = create_default_parent('parent1') c = ChildTestModel1.objects.create(parent=p) parent = utils.get_parent_model(c, "parent.status") self.assertEqual(isinstance(parent, ParentTestModel), True)
43.828571
93
0.697197
916
6,136
4.296943
0.076419
0.105183
0.172764
0.190041
0.803608
0.794461
0.778709
0.773628
0.754573
0.708333
0
0.031001
0.200945
6,136
139
94
44.143885
0.771772
0.015156
0
0.362832
0
0
0.021192
0.004139
0
0
0
0
0.380531
1
0.106195
false
0
0.044248
0
0.185841
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
af8f1ae67cead87338ec0eb0607a20c998e87c89
105
py
Python
torchcv/visualizations/__init__.py
qqadssp/DSOD-Pytorch
76d7558bb20e7289ebf6acf50be4cef75d568499
[ "MIT" ]
13
2018-08-15T08:44:31.000Z
2021-04-16T01:54:01.000Z
torchcv/visualizations/__init__.py
qqadssp/DSOD-Pytorch
76d7558bb20e7289ebf6acf50be4cef75d568499
[ "MIT" ]
1
2022-03-11T08:55:17.000Z
2022-03-12T05:42:53.000Z
torchcv/visualizations/__init__.py
qqadssp/DSOD-Pytorch
76d7558bb20e7289ebf6acf50be4cef75d568499
[ "MIT" ]
5
2018-10-13T17:06:51.000Z
2020-06-20T03:48:57.000Z
from torchcv.visualizations.vis_image import vis_image from torchcv.visualizations.vis import Visualizer
35
54
0.885714
14
105
6.5
0.5
0.241758
0.549451
0.615385
0
0
0
0
0
0
0
0
0.07619
105
2
55
52.5
0.938144
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
afb76a3423c6d387dacf474912b7e671a532d4f7
775
py
Python
WPA-PSK/WEP/RC4.py
SwordYork/NetworkTool
edc97903d60935b0c70e35d43498b90953171bb0
[ "MIT" ]
18
2015-07-06T10:57:01.000Z
2020-04-17T15:24:01.000Z
WPA-PSK/WEP/RC4.py
SwordYork/NetworkTool
edc97903d60935b0c70e35d43498b90953171bb0
[ "MIT" ]
null
null
null
WPA-PSK/WEP/RC4.py
SwordYork/NetworkTool
edc97903d60935b0c70e35d43498b90953171bb0
[ "MIT" ]
14
2015-10-14T06:42:11.000Z
2021-06-10T15:07:57.000Z
from Crypto.Cipher import ARC4 import binascii key = binascii.a2b_hex('7da2a7'+binascii.b2a_hex('52977')) cipher = ARC4.new(key) msg = cipher.encrypt(binascii.a2b_hex("0100020000001080e0c3b6bacbe834233fe094e49c975b55553a56560b6614cff5135c172cbb1ff43b38905da7d89c2a10d985b66df7d290f49be85a8ca947011b652f1deb7397fa299a3600b6f1242eb500c04be5ac8a97a66edd6d54c435564806f89d94eab5e549e9180a76825274c99f80bd26e2846027c17024bfbf071836ab88ade43a6619")) print "Origin: 56d2cc9138ef6ca906b5423cac31101fb3e14169f9808b904925231b01fc24c6e2ddb715b31ba1d130da3d72f563988d0b6d4a93b77705e121e31deb9c2d6f3c893fe3932d5f8d42625103dd9a03ea1f43c027cc72fd5ed0bb9468766fb92e982cff950ece35c508d924cfdb91e87995751d6b4ee9cdf452a7a3dee18bd53cd32d47c46a25cd16dd" print "Cracked:",binascii.b2a_hex(msg)
77.5
314
0.923871
36
775
19.777778
0.555556
0.030899
0.039326
0
0
0
0
0
0
0
0
0.484043
0.029677
775
9
315
86.111111
0.462766
0
0
0
0
0
0.738065
0.701935
0
1
0
0
0
0
null
null
0
0.285714
null
null
0.285714
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
1
1
null
1
0
0
0
1
0
0
0
0
0
0
0
0
8
bb7abcded94c17c14f713f3dd803b4594c95559d
35,105
py
Python
spark_fhir_schemas/stu3/complex_types/procedurerequest.py
icanbwell/SparkFhirSchemas
8c828313c39850b65f8676e67f526ee92b7d624e
[ "Apache-2.0" ]
2
2020-10-31T23:25:01.000Z
2021-06-09T14:12:42.000Z
spark_fhir_schemas/stu3/complex_types/procedurerequest.py
icanbwell/SparkFhirSchemas
8c828313c39850b65f8676e67f526ee92b7d624e
[ "Apache-2.0" ]
null
null
null
spark_fhir_schemas/stu3/complex_types/procedurerequest.py
icanbwell/SparkFhirSchemas
8c828313c39850b65f8676e67f526ee92b7d624e
[ "Apache-2.0" ]
null
null
null
from typing import Union, List, Optional from pyspark.sql.types import ( StructType, StructField, StringType, ArrayType, BooleanType, DataType, TimestampType, ) # This file is auto-generated by generate_schema so do not edit manually # noinspection PyPep8Naming class ProcedureRequestSchema: """ A record of a request for diagnostic investigations, treatments, or operations to be performed. """ # noinspection PyDefaultArgument @staticmethod def get_schema( max_nesting_depth: Optional[int] = 6, nesting_depth: int = 0, nesting_list: List[str] = [], max_recursion_limit: Optional[int] = 2, include_extension: Optional[bool] = False, extension_fields: Optional[List[str]] = [ "valueBoolean", "valueCode", "valueDate", "valueDateTime", "valueDecimal", "valueId", "valueInteger", "valuePositiveInt", "valueString", "valueTime", "valueUnsignedInt", "valueUri", "valueQuantity", ], extension_depth: int = 0, max_extension_depth: Optional[int] = 2, ) -> Union[StructType, DataType]: """ A record of a request for diagnostic investigations, treatments, or operations to be performed. id: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes. extension: May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. meta: The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. implicitRules: A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. language: The base language in which the resource is written. text: A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety. contained: These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope. resourceType: This is a ProcedureRequest resource identifier: Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller. definition: Protocol or definition followed by this request. basedOn: Plan/proposal/order fulfilled by this request. replaces: The request takes the place of the referenced completed or terminated request(s). requisition: A shared identifier common to all procedure or diagnostic requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier. status: The status of the order. intent: Whether the request is a proposal, plan, an original order or a reflex order. priority: Indicates how quickly the ProcedureRequest should be addressed with respect to other requests. doNotPerform: Set this to true if the record is saying that the procedure should NOT be performed. category: A code that classifies the procedure for searching, sorting and display purposes (e.g. "Surgical Procedure"). code: A code that identifies a particular procedure, diagnostic investigation, or panel of investigations, that have been requested. subject: On whom or what the procedure or diagnostic is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans). context: An encounter or episode of care that provides additional information about the healthcare context in which this request is made. occurrenceDateTime: The date/time at which the diagnostic testing should occur. occurrencePeriod: The date/time at which the diagnostic testing should occur. occurrenceTiming: The date/time at which the diagnostic testing should occur. asNeededBoolean: If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example "pain", "on flare-up", etc. asNeededCodeableConcept: If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example "pain", "on flare-up", etc. authoredOn: When the request transitioned to being actionable. requester: The individual who initiated the request and has responsibility for its activation. performerType: Desired type of performer for doing the diagnostic testing. performer: The desired perfomer for doing the diagnostic testing. For example, the surgeon, dermatopathologist, endoscopist, etc. reasonCode: An explanation or justification for why this diagnostic investigation is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in supportingInformation. reasonReference: Indicates another resource that provides a justification for why this diagnostic investigation is being requested. May relate to the resources referred to in supportingInformation. supportingInfo: Additional clinical information about the patient or specimen that may influence the procedure or diagnostics or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as "ask at order entry questions (AOEs)". This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements. specimen: One or more specimens that the laboratory procedure will use. bodySite: Anatomic location where the procedure should be performed. This is the target site. note: Any other notes and comments made about the service request. For example, letting provider know that "patient hates needles" or other provider instructions. relevantHistory: Key events in the history of the request. """ from spark_fhir_schemas.stu3.complex_types.extension import ExtensionSchema from spark_fhir_schemas.stu3.complex_types.meta import MetaSchema from spark_fhir_schemas.stu3.complex_types.narrative import NarrativeSchema from spark_fhir_schemas.stu3.simple_types.resourcelist import ResourceListSchema from spark_fhir_schemas.stu3.complex_types.identifier import IdentifierSchema from spark_fhir_schemas.stu3.complex_types.reference import ReferenceSchema from spark_fhir_schemas.stu3.complex_types.codeableconcept import ( CodeableConceptSchema, ) from spark_fhir_schemas.stu3.complex_types.period import PeriodSchema from spark_fhir_schemas.stu3.complex_types.timing import TimingSchema from spark_fhir_schemas.stu3.complex_types.procedurerequest_requester import ( ProcedureRequest_RequesterSchema, ) from spark_fhir_schemas.stu3.complex_types.annotation import AnnotationSchema if ( max_recursion_limit and nesting_list.count("ProcedureRequest") >= max_recursion_limit ) or (max_nesting_depth and nesting_depth >= max_nesting_depth): return StructType([StructField("id", StringType(), True)]) # add my name to recursion list for later my_nesting_list: List[str] = nesting_list + ["ProcedureRequest"] schema = StructType( [ # The logical id of the resource, as used in the URL for the resource. Once # assigned, this value never changes. StructField("id", StringType(), True), # May be used to represent additional information that is not part of the basic # definition of the resource. In order to make the use of extensions safe and # manageable, there is a strict set of governance applied to the definition and # use of extensions. Though any implementer is allowed to define an extension, # there is a set of requirements that SHALL be met as part of the definition of # the extension. StructField( "extension", ArrayType( ExtensionSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # The metadata about the resource. This is content that is maintained by the # infrastructure. Changes to the content may not always be associated with # version changes to the resource. StructField( "meta", MetaSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # A reference to a set of rules that were followed when the resource was # constructed, and which must be understood when processing the content. StructField("implicitRules", StringType(), True), # The base language in which the resource is written. StructField("language", StringType(), True), # A human-readable narrative that contains a summary of the resource, and may be # used to represent the content of the resource to a human. The narrative need # not encode all the structured data, but is required to contain sufficient # detail to make it "clinically safe" for a human to just read the narrative. # Resource definitions may define what content should be represented in the # narrative to ensure clinical safety. StructField( "text", NarrativeSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # These resources do not have an independent existence apart from the resource # that contains them - they cannot be identified independently, and nor can they # have their own independent transaction scope. StructField( "contained", ArrayType( ResourceListSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # This is a ProcedureRequest resource StructField("resourceType", StringType(), True), # Identifiers assigned to this order instance by the orderer and/or the receiver # and/or order fulfiller. StructField( "identifier", ArrayType( IdentifierSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # Protocol or definition followed by this request. StructField( "definition", ArrayType( ReferenceSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # Plan/proposal/order fulfilled by this request. StructField( "basedOn", ArrayType( ReferenceSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # The request takes the place of the referenced completed or terminated # request(s). StructField( "replaces", ArrayType( ReferenceSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # A shared identifier common to all procedure or diagnostic requests that were # authorized more or less simultaneously by a single author, representing the # composite or group identifier. StructField( "requisition", IdentifierSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # The status of the order. StructField("status", StringType(), True), # Whether the request is a proposal, plan, an original order or a reflex order. StructField("intent", StringType(), True), # Indicates how quickly the ProcedureRequest should be addressed with respect to # other requests. StructField("priority", StringType(), True), # Set this to true if the record is saying that the procedure should NOT be # performed. StructField("doNotPerform", BooleanType(), True), # A code that classifies the procedure for searching, sorting and display # purposes (e.g. "Surgical Procedure"). StructField( "category", ArrayType( CodeableConceptSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # A code that identifies a particular procedure, diagnostic investigation, or # panel of investigations, that have been requested. StructField( "code", CodeableConceptSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # On whom or what the procedure or diagnostic is to be performed. This is # usually a human patient, but can also be requested on animals, groups of # humans or animals, devices such as dialysis machines, or even locations # (typically for environmental scans). StructField( "subject", ReferenceSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # An encounter or episode of care that provides additional information about the # healthcare context in which this request is made. StructField( "context", ReferenceSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # The date/time at which the diagnostic testing should occur. StructField("occurrenceDateTime", TimestampType(), True), # The date/time at which the diagnostic testing should occur. StructField( "occurrencePeriod", PeriodSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # The date/time at which the diagnostic testing should occur. StructField( "occurrenceTiming", TimingSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # If a CodeableConcept is present, it indicates the pre-condition for performing # the procedure. For example "pain", "on flare-up", etc. StructField("asNeededBoolean", BooleanType(), True), # If a CodeableConcept is present, it indicates the pre-condition for performing # the procedure. For example "pain", "on flare-up", etc. StructField( "asNeededCodeableConcept", CodeableConceptSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # When the request transitioned to being actionable. StructField("authoredOn", StringType(), True), # The individual who initiated the request and has responsibility for its # activation. StructField( "requester", ProcedureRequest_RequesterSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # Desired type of performer for doing the diagnostic testing. StructField( "performerType", CodeableConceptSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # The desired perfomer for doing the diagnostic testing. For example, the # surgeon, dermatopathologist, endoscopist, etc. StructField( "performer", ReferenceSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # An explanation or justification for why this diagnostic investigation is being # requested in coded or textual form. This is often for billing purposes. May # relate to the resources referred to in supportingInformation. StructField( "reasonCode", ArrayType( CodeableConceptSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # Indicates another resource that provides a justification for why this # diagnostic investigation is being requested. May relate to the resources # referred to in supportingInformation. StructField( "reasonReference", ArrayType( ReferenceSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # Additional clinical information about the patient or specimen that may # influence the procedure or diagnostics or their interpretations. This # information includes diagnosis, clinical findings and other observations. In # laboratory ordering these are typically referred to as "ask at order entry # questions (AOEs)". This includes observations explicitly requested by the # producer (filler) to provide context or supporting information needed to # complete the order. For example, reporting the amount of inspired oxygen for # blood gas measurements. StructField( "supportingInfo", ArrayType( ReferenceSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # One or more specimens that the laboratory procedure will use. StructField( "specimen", ArrayType( ReferenceSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # Anatomic location where the procedure should be performed. This is the target # site. StructField( "bodySite", ArrayType( CodeableConceptSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # Any other notes and comments made about the service request. For example, # letting provider know that "patient hates needles" or other provider # instructions. StructField( "note", ArrayType( AnnotationSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # Key events in the history of the request. StructField( "relevantHistory", ArrayType( ReferenceSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), ] ) if not include_extension: schema.fields = [ c if c.name != "extension" else StructField("extension", StringType(), True) for c in schema.fields ] return schema
50.438218
111
0.545592
3,152
35,105
5.858503
0.132931
0.070833
0.044677
0.067584
0.851728
0.842413
0.842413
0.809596
0.805914
0.795949
0
0.002667
0.412534
35,105
695
112
50.510791
0.892741
0.312434
0
0.728814
0
0
0.024298
0.000986
0
0
0
0
0
1
0.002119
false
0
0.027542
0
0.036017
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
bb8eed09c4aad9dcea97793f38a212a0e7713655
225
py
Python
mabel/data/internals/storage_classes/__init__.py
mabel-dev/mabel
4b06e9e5ce108e8a3267e44685fd61fc9802eb0a
[ "Apache-2.0" ]
null
null
null
mabel/data/internals/storage_classes/__init__.py
mabel-dev/mabel
4b06e9e5ce108e8a3267e44685fd61fc9802eb0a
[ "Apache-2.0" ]
287
2021-05-14T21:25:26.000Z
2022-03-30T12:02:51.000Z
mabel/data/internals/storage_classes/__init__.py
mabel-dev/mabel
4b06e9e5ce108e8a3267e44685fd61fc9802eb0a
[ "Apache-2.0" ]
null
null
null
from .base_storage_class import BaseStorageClass from .storage_class_compressed_memory import StorageClassCompressedMemory from .storage_class_disk import StorageClassDisk from .storage_class_memory import StorageClassMemory
45
73
0.911111
25
225
7.84
0.48
0.244898
0.244898
0
0
0
0
0
0
0
0
0
0.071111
225
4
74
56.25
0.937799
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
bbbd4e9fa214bd8bf23ff5b15dab2194f9d8ec34
99,208
py
Python
Tests/Test.py
lundman/FSMegaInfo
f9d5a25c117a86c1f1782f1e1fd5b6ca976401c5
[ "AML" ]
1
2022-01-25T05:18:45.000Z
2022-01-25T05:18:45.000Z
Tests/Test.py
cooljeanius/FSMegaInfo
d00d6d929cc80c46976e08ab6c02ee4d226da7ed
[ "AML" ]
null
null
null
Tests/Test.py
cooljeanius/FSMegaInfo
d00d6d929cc80c46976e08ab6c02ee4d226da7ed
[ "AML" ]
null
null
null
#! /usr/bin/python # # File: Test.py # # Contains: A test script for the FSMegaInfo program. # # Written by: DTS # # Copyright: Copyright (c) 2008 Apple Inc. All Rights Reserved. # # Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. # ("Apple") in consideration of your agreement to the following # terms, and your use, installation, modification or # redistribution of this Apple software constitutes acceptance of # these terms. If you do not agree with these terms, please do # not use, install, modify or redistribute this Apple software. # # In consideration of your agreement to abide by the following # terms, and subject to these terms, Apple grants you a personal, # non-exclusive license, under Apple's copyrights in this # original Apple software (the "Apple Software"), to use, # reproduce, modify and redistribute the Apple Software, with or # without modifications, in source and/or binary forms; provided # that if you redistribute the Apple Software in its entirety and # without modifications, you must retain this notice and the # following text and disclaimers in all such redistributions of # the Apple Software. Neither the name, trademarks, service marks # or logos of Apple Inc. may be used to endorse or promote # products derived from the Apple Software without specific prior # written permission from Apple. Except as expressly stated in # this notice, no other rights or licenses, express or implied, # are granted by Apple herein, including but not limited to any # patent rights that may be infringed by your derivative works or # by other works in which the Apple Software may be incorporated. # # The Apple Software is provided by Apple on an "AS IS" basis. # APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING # WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING # THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN # COMBINATION WITH YOUR PRODUCTS. # # IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, # INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY # OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION # OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY # OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR # OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # import sys import re import os import getopt import struct gDebug = 0 gNativeArch = None # The subprocess module is part of Python 2.5, which is NOT installed by default # on 10.4. So if I cannot import subprocess, then I implement runTool using # popen2. This is less than ideal because popen2 is just not as nice as # subprocess. Specifically, there is no easy way to read both stdout and stderr # simultaneously, which is necessary to avoid pipe deadlocks. try: import subprocess def runTool(args): if gDebug >= 1: print >> sys.stderr, args s = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) resultOut, resultErr = s.communicate() result = (s.wait(), resultOut, resultErr) if gDebug >= 2: print result return result except: import popen2 def runTool(args): if gDebug >= 1: print >> sys.stderr, args child = popen2.Popen3(args, capturestderr=True) # This is /so/ bodgy. We really need to read both stdout and stderr # until both of them hit EOF, but that is hard to do. This code works # well enough for my specific needs, but do NOT even /think/ about # reordering the next two lines! resultOut = child.fromchild.read() resultErr = child.childerr.read() result = (child.wait(), resultOut, resultErr) if gDebug >= 2: print result return result def runFSMegaInfo(args, arch=""): if arch == "": result = runTool(["build/Debug/FSMegaInfo"] + list(args)) else: result = runTool(["arch", "-" + arch, "build/Debug/FSMegaInfo"] + list(args)) return result def fixStatFS(results, arch): if arch == "i386" or arch == "ppc": results = (results[0], re.sub("f_flags = 0x", "f_flags = 0x00000000", results[1]), results[2]) return results def fixTellDir(results, arch): return (results[0], re.sub("telldir = [0-9]+", "telldir = xxx", results[1]), results[2]) def fixFTSPointers(results, arch): tmp = re.sub("(fts_statp +|fts_accpath +|fts_path +)= 0x[0-9a-f]+", "\\1= 0xxxx", results[1]) tmp = re.sub("fts_cycle = 0x[0-9a-f]+", "fts_cycle = 0xxxx", tmp) return (results[0], tmp, results[2]) def fixVolumeDates(results, arch): # FSGetVolumeInfo returns bogus results for the createDate and checkedDate # in 64-bit code <rdar://problem/5740217>, so we just ignore those fields # in our test. # # I also nix the modifyDate because, when you have an AFP server mounted, # things can differ slightly in 64-bit vs 32-bit. tmp = re.sub("(createDate +|checkedDate +|modifyDate +)= [0-9]+\\.[0-9]+\\.[0-9]+ \\([a-zA-Z0-9 :,\\+]+\\)", "\\1= xxx", results[1]) return (results[0], tmp, results[2]) def fixVolParmsPointers(results, arch): return (results[0], re.sub("vMDeviceID = 0x[0-9a-f]+", "vMDeviceID = 0xxxx", results[1]), results[2]) def fixCatInfoPermissions(results, arch): # The last 4 bytes (8 bytes in the 64-bit case) of the permissions are a # pointer, which we want to remove. return (results[0], re.sub("permissions = (?P<first>([0-9a-f][0-9a-f] ){12})([0-9a-f][0-9a-f] ){4}(\\n +(?P<third>([0-9a-f][0-9a-f] ){4}))?", "permissions = \\g<first>", results[1]), results[2]) def fixFileSecOwner(results, arch): # For some reason the fsec_owner and fsec_group fields are coming back # different on i386 and x86_64. Neither of them looks particularly # valid. I am going to ignore this for the moment because I am out of time. return (results[0], re.sub("(fsec_owner|fsec_group) = .*", "\\1 = xxx", results[1]), results[2]) def fixAliasVolumeCreateDate(results, arch): return (results[0], re.sub("volumeCreateDate = .*\n", "", results[1]), results[2]) def byteSwapValue(text, fieldName, fmt): def swapper(m): swappedValue = struct.unpack(">" + fmt, struct.pack("<" + fmt, long(m.group('value'))))[0] return m.group('prefix') + str(swappedValue) return re.sub("(?P<prefix>" + fieldName + " += )(?P<value>[0-9]+)", swapper, text) def byteSwapValueHex(text, fieldName, fmt): def swapper(m): swappedValue = struct.unpack(">" + fmt, struct.pack("<" + fmt, long(m.group('value'), 16)))[0] if fmt == "q": outFmt = "%016x" else: outFmt = "%08x" return ("%s0x" + outFmt) % (m.group('prefix'), swappedValue) return re.sub("(?P<prefix>" + fieldName + " += )(?P<value>0x[0-9]+)", swapper, text) def fixRosettaIDs(results, arch): # Necessary to work around <rdar://problem/5745429>. if arch == "ppc" and gNativeArch == "i386": output = results[1] output = byteSwapValue(output, "ATTR_CMN_FILEID", "Q") output = byteSwapValue(output, "ATTR_CMN_PARENTID", "Q") output = byteSwapValue(output, "ATTR_DIR_LINKCOUNT", "I") output = byteSwapValue(output, "ATTR_DIR_ENTRYCOUNT", "I") output = byteSwapValueHex(output, "ATTR_DIR_MOUNTSTATUS", "I") output = re.sub("DIR_MNTSTATUS_MNTPOINT = NO\n ... and others \\(0x1000000\\)", "DIR_MNTSTATUS_MNTPOINT = YES", output) results = (results[0], output, results[2]) return results def printResultsSideBySide(columnWidth, left, right): if left != '' and right != '': left = left.splitlines() right = right.splitlines() for lineIndex in xrange(0, max(len(left), len(right))): if lineIndex < len(left): l1 = left[lineIndex] else: l1 = "" if lineIndex < len(right): l2 = right[lineIndex] else: l2 = "" if l1 == l2: mark = " " else: mark = "!" print >> sys.stderr, "%-*s %s %s" % (columnWidth, l1[:columnWidth], mark, l2[:columnWidth]) def compareResultsForArchitectures(archList): # stty will fail when running on 10.4 because my subprocess compatibility # code, which Popen3, sets stdin to be a pipe, not be the tty device. # This is NOT a big deal so I am just going to ignore the error here. try: numberOfColumns = int(runTool(['stty', 'size'])[1].split()[1]) except: print >> sys.stderr, "*** stty failed; using a default value for the number of columns" numberOfColumns = 80 columnWidth = (numberOfColumns - 5) / 2 regressionTest = True commands = [] if regressionTest: commands += [ (('stat', '/'), ()), (('lstat', '/'), ()), (('stat', '/mach_kernel'), ()), (('lstat', '/mach_kernel'), ()), (('-v', 'stat', '/'), ()), (('-v', 'lstat', '/'), ()), (('-v', 'stat', '/mach_kernel'), ()), (('-v', 'lstat', '/mach_kernel'), ()), (('statfs', '/'), (fixStatFS,)), (('lstatfs', '/'), (fixStatFS,)), (('statfs', '/mach_kernel'), (fixStatFS,)), (('lstatfs', '/mach_kernel'), (fixStatFS,)), (('-v', 'statfs', '/'), (fixStatFS,)), (('-v', 'lstatfs', '/'), (fixStatFS,)), (('-v', 'statfs', '/mach_kernel'), (fixStatFS,)), (('-v', 'lstatfs', '/mach_kernel'), (fixStatFS,)), (('getfsstat',), (fixStatFS,)), (('getfsstat', '-r'), (fixStatFS,)), (('-v', 'getfsstat',), (fixStatFS,)), (('-v', 'getfsstat', '-r'), (fixStatFS,)), (('-vv', 'getfsstat',), (fixStatFS,)), (('-vv', 'getfsstat', '-r'), (fixStatFS,)), ] if regressionTest: commands += [ (('getdirentries', '/System/Library/CoreServices/'), ()), (('getdirentries', '-bufSize', '10240', '/System/Library/CoreServices/'), ()), (('getdirentries', '-r', '/System/Library/CoreServices/'), ()), (('-v', 'getdirentries', '/System/Library/CoreServices/'), ()), (('-v', 'getdirentries', '-bufSize', '10240', '/System/Library/CoreServices/'), ()), (('-v', 'getdirentries', '-r', '/System/Library/CoreServices/'), ()), (('readdir', '/System/Library/CoreServices/'), ()), (('readdir', '-r', '/System/Library/CoreServices/'), ()), (('-v', 'readdir', '/System/Library/CoreServices/'), (fixTellDir,)), (('-v', 'readdir', '-r', '/System/Library/CoreServices/'), (fixTellDir,)), (('fts', '/System/Library/CoreServices/Finder.app'), (fixFTSPointers,)), # fts has a bunch of options arguments but I cannot be bothered # exercising those cases. ] if regressionTest: commands += [ (('listxattr', '/System/Library/CoreServices/Finder'), ()), (('listxattr', '-bufSize', '10240', '/System/Library/CoreServices/Finder'), ()), (('getxattr', '/System/Library/CoreServices/Finder', 'com.apple.FinderInfo'), ()), (('getxattr', '/System/Library/CoreServices/Finder', 'com.apple.ResourceFork'), ()), (('-v', 'getxattr', '/System/Library/CoreServices/Finder', 'com.apple.FinderInfo'), ()), (('-v', 'getxattr', '/System/Library/CoreServices/Finder', 'com.apple.ResourceFork'), ()), (('-vv', 'getxattr', '/System/Library/CoreServices/Finder', 'com.apple.FinderInfo'), ()), (('-vv', 'getxattr', '/System/Library/CoreServices/Finder', 'com.apple.ResourceFork'), ()), ] # In the commented out cases below it seems to be that getattrlist is # misbehaving. I seem to remember seeing this problem because... of # something, but I do NOT have time to investigate right now. if regressionTest: commands += [ (('getattrlist', '/'), ()), (('getattrlist', '-ATTR_CMN_NAME', '/'), ()), (('getattrlist', '-ATTR_CMN_NAME', '/mach_kernel'), ()), (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/'), ()), (('getattrlist', '-ATTR_VOL_INFO,ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/'), ()), (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/mach_kernel'), ()), (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/System/Library/CoreServices/Finder'), ()), (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID', '/'), (fixRosettaIDs,)), (('getattrlist', '-ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/'), ()), (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), # (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), # (('getattrlist', '-ATTR_VOL_INFO,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/'), (fixRosettaIDs,)), (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), (fixRosettaIDs,)), (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), (fixRosettaIDs,)), (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/mach_kernel'), (fixRosettaIDs,)), # (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/mach_kernel'), ()), # (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/mach_kernel'), ()), # (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), # (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/mach_kernel'), ()), (('-v', 'getattrlist', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_NAME', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_NAME', '/mach_kernel'), ()), (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/'), ()), (('-v', 'getattrlist', '-ATTR_VOL_INFO,ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/mach_kernel'), ()), (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/System/Library/CoreServices/Finder'), ()), (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID', '/'), (fixRosettaIDs,)), (('-v', 'getattrlist', '-ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), # (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), # (('-v', 'getattrlist', '-ATTR_VOL_INFO,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/'), (fixRosettaIDs,)), (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), (fixRosettaIDs,)), (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), (fixRosettaIDs,)), (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/mach_kernel'), (fixRosettaIDs,)), # (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/mach_kernel'), ()), # (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/mach_kernel'), ()), # (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), # (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/mach_kernel'), ()), (('-vv', 'getattrlist', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_NAME', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_NAME', '/mach_kernel'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/'), ()), (('-vv', 'getattrlist', '-ATTR_VOL_INFO,ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/mach_kernel'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/System/Library/CoreServices/Finder'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID', '/'), (fixRosettaIDs,)), (('-vv', 'getattrlist', '-ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), # (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), # (('-vv', 'getattrlist', '-ATTR_VOL_INFO,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/'), (fixRosettaIDs,)), (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), (fixRosettaIDs,)), (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), (fixRosettaIDs,)), (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/mach_kernel'), (fixRosettaIDs,)), # (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/mach_kernel'), ()), # (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/mach_kernel'), ()), # (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), # (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/mach_kernel'), ()), ] if regressionTest: commands += [ (('DADiskCopyDescription', 'disk0'), ()), ] if regressionTest: #*Rosetta commands += [ (('FSGetVolumeInfo', '/'), (fixVolumeDates,)), (('FSGetVolumeInfo', 'all'), (fixVolumeDates,)), (('-v', 'FSGetVolumeInfo', '/'), (fixVolumeDates,)), (('-v', 'FSGetVolumeInfo', 'all'), (fixVolumeDates,)), (('FSGetVolumeParms', '/'), (fixVolParmsPointers,)), (('-v', 'FSGetVolumeParms', '/'), (fixVolParmsPointers,)), (('FSCopyDiskIDForVolume', '/'), (fixVolParmsPointers,)), ] # These tests require that you have an AFP server mounted. if regressionTest: if os.path.exists('/Volumes/Fluffy'): commands += [ (('FSGetVolumeMountInfo', '/Volumes/Fluffy'), ()), (('-v', 'FSGetVolumeMountInfo', '/Volumes/Fluffy'), ()), (('FSCopyURLForVolume', '/Volumes/Fluffy'), ()), ] else: print >> sys.stderr, '*** Skipped network volume tests' if regressionTest: commands += [ (('FSGetCatalogInfo', '/'), ()), (('FSGetCatalogInfo', '/mach_kernel'), ()), (('FSGetCatalogInfo', '/Applications'), ()), (('FSGetCatalogInfo', '/System/Library/CoreServices/Finder'), ()), (('FSGetCatalogInfo', '-parent', '/'), ()), #*Rosetta (('FSGetCatalogInfo', '-parent', '/mach_kernel'), ()), #*Rosetta (('FSGetCatalogInfo', '-parent', '/Applications'), ()), #*Rosetta (('FSGetCatalogInfo', '-parent', '/System/Library/CoreServices/Finder'), ()), #*Rosetta (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/'), (fixCatInfoPermissions,)), #*Rosetta (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/mach_kernel'), (fixCatInfoPermissions,)), #*Rosetta (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/Applications'), (fixCatInfoPermissions,)), #*Rosetta (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/System/Library/CoreServices/Finder'), (fixCatInfoPermissions,)), #*Rosetta (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/'), ()), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/mach_kernel'), ()), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/Applications'), ()), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/System/Library/CoreServices/Finder'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/mach_kernel'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/Applications'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/System/Library/CoreServices/Finder'), ()), (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/'), (fixCatInfoPermissions, fixFileSecOwner)), #*Rosetta (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/mach_kernel'), (fixCatInfoPermissions, fixFileSecOwner)), #*Rosetta (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/Applications'), (fixCatInfoPermissions, fixFileSecOwner)), #*Rosetta (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/System/Library/CoreServices/Finder'), (fixCatInfoPermissions, fixFileSecOwner)), #*Rosetta (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/'), (fixFileSecOwner,)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/mach_kernel'), (fixFileSecOwner,)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/Applications'), (fixFileSecOwner,)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/System/Library/CoreServices/Finder'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/mach_kernel'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/Applications'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/System/Library/CoreServices/Finder'), (fixFileSecOwner,)), ] if regressionTest: commands += [ (('FSGetCatalogInfoBulk', '/'), ()), (('FSGetCatalogInfoBulk', '/Applications'), ()), (('FSGetCatalogInfoBulk', '-refs', '/'), ()), #*Rosetta (('FSGetCatalogInfoBulk', '-refs', '/Applications'), ()), #*Rosetta (('FSGetCatalogInfoBulk', '-count', '5', '/'), ()), (('FSGetCatalogInfoBulk', '-count', '5', '/Applications'), ()), (('FSGetCatalogInfoBulk', '-kFSCatInfoGettableInfo', '/'), (fixCatInfoPermissions,)), #*Rosetta (('FSGetCatalogInfoBulk', '-kFSCatInfoGettableInfo', '/Applications'), (fixCatInfoPermissions,)), #*Rosetta (('-v', 'FSGetCatalogInfoBulk', '-kFSCatInfoGettableInfo', '/'), (fixCatInfoPermissions,)), (('-v', 'FSGetCatalogInfoBulk', '-kFSCatInfoGettableInfo', '/Applications'), (fixCatInfoPermissions,)), (('-vv', 'FSGetCatalogInfoBulk', '-kFSCatInfoGettableInfo', '/'), (fixCatInfoPermissions,)), (('-vv', 'FSGetCatalogInfoBulk', '-kFSCatInfoGettableInfo', '/Applications'), (fixCatInfoPermissions,)), (('FSGetCatalogInfoBulk', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/'), (fixCatInfoPermissions, fixFileSecOwner)), #*Rosetta (('FSGetCatalogInfoBulk', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/Applications'), (fixCatInfoPermissions, fixFileSecOwner)), #*Rosetta (('-v', 'FSGetCatalogInfoBulk', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/'), (fixCatInfoPermissions, fixFileSecOwner)), (('-v', 'FSGetCatalogInfoBulk', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/Applications'), (fixCatInfoPermissions, fixFileSecOwner)), (('-vv', 'FSGetCatalogInfoBulk', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/'), (fixCatInfoPermissions, fixFileSecOwner)), (('-vv', 'FSGetCatalogInfoBulk', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/Applications'), (fixCatInfoPermissions, fixFileSecOwner)), ] if regressionTest: commands += [ (('FSFindFolder', 'kOnSystemDisk', 'temp'), ()), (('FSFindFolder', 'kOnAppropriateDisk', 'temp'), ()), (('FSFindFolder', 'kSystemDomain', 'temp'), ()), (('FSFindFolder', 'kLocalDomain', 'temp'), ()), (('FSFindFolder', 'kNetworkDomain', 'temp'), ()), (('FSFindFolder', 'kUserDomain', 'temp'), ()), (('FSFindFolder', '/', 'temp'), ()), (('FSFindFolder', 'kOnSystemDisk', 'dlib'), ()), (('FSFindFolder', 'kOnAppropriateDisk', 'dlib'), ()), (('FSFindFolder', 'kSystemDomain', 'dlib'), ()), (('FSFindFolder', 'kLocalDomain', 'dlib'), ()), (('FSFindFolder', 'kUserDomain', 'dlib'), ()), (('FSFindFolder', '/', 'dlib'), ()), (('FSFindFolder', 'kOnSystemDisk', '0x757469C4'), ()), (('FSFindFolder', 'kOnAppropriateDisk', '0x757469C4'), ()), (('FSFindFolder', 'kSystemDomain', '0x757469C4'), ()), (('FSFindFolder', 'kLocalDomain', '0x757469C4'), ()), (('FSFindFolder', 'kUserDomain', '0x757469C4'), ()), (('FSFindFolder', '/', '0x757469C4'), ()), ] if regressionTest: commands += [ (('FSCopyAliasInfo', '/'), (fixAliasVolumeCreateDate,)), (('FSCopyAliasInfo', '/mach_kernel'), (fixAliasVolumeCreateDate,)), (('FSCopyAliasInfo', '/System/Library/CoreServices/Finder'), (fixAliasVolumeCreateDate,)), ] if regressionTest: commands += [ (('pathconf', '_PC_LINK_MAX', '/'), ()), (('pathconf', '_PC_MAX_CANON', '/dev/ttys000'), ()), (('pathconf', '_PC_MAX_INPUT', '/dev/ttys000'), ()), (('pathconf', '_PC_NAME_MAX', '/'), ()), (('pathconf', '_PC_PATH_MAX', '/'), ()), (('pathconf', '_PC_PIPE_BUF', '/'), ()), (('pathconf', '_PC_CHOWN_RESTRICTED', '/'), ()), (('pathconf', '_PC_NO_TRUNC', '/'), ()), (('pathconf', '_PC_VDISABLE', '/dev/ttys000'), ()), (('pathconf', '_PC_NAME_CHARS_MAX', '/'), ()), (('pathconf', '_PC_CASE_SENSITIVE', '/'), ()), (('pathconf', '_PC_CASE_PRESERVING', '/'), ()), (('pathconf', '_PC_EXTENDED_SECURITY_NP', '/'), ()), (('pathconf', '_PC_AUTH_OPAQUE_NP', '/'), ()), (('pathconf', '_PC_2_SYMLINKS', '/'), ()), (('pathconf', '_PC_ALLOC_SIZE_MIN', '/'), ()), (('pathconf', '_PC_ASYNC_IO', '/'), ()), (('pathconf', '_PC_FILESIZEBITS', '/'), ()), (('pathconf', '_PC_PRIO_IO', '/'), ()), (('pathconf', '_PC_REC_INCR_XFER_SIZE', '/'), ()), (('pathconf', '_PC_REC_MAX_XFER_SIZE', '/'), ()), (('pathconf', '_PC_REC_MIN_XFER_SIZE', '/'), ()), (('pathconf', '_PC_REC_XFER_ALIGN', '/'), ()), (('pathconf', '_PC_SYMLINK_MAX', '/'), ()), (('pathconf', '_PC_SYNC_IO', '/'), ()), ] for command in commands: canonicalResults = runFSMegaInfo(command[0], archList[0]) for fix in command[1]: canonicalResults = fix(canonicalResults, archList[0]) for arch in archList[1:]: results = runFSMegaInfo(command[0], arch) for fix in command[1]: results = fix(results, arch) if gDebug >= 2 or results != canonicalResults: if results != canonicalResults: print >> sys.stderr, "*** Test failure" else: print >> sys.stderr, "*** Debug output" print >> sys.stderr, "compareResultsForArchitectures" print >> sys.stderr, "args: %s" % str(command[0]) print >> sys.stderr, "%-*s %s" % (columnWidth, "canonical", "returned") print >> sys.stderr, "%-*s %s" % (columnWidth, archList[0], arch) if canonicalResults[0] == results[0]: mark = " " else: mark = "!" print >> sys.stderr, "%-*d %s %d" % (columnWidth, canonicalResults[0], mark, results[0]) print >> sys.stderr, "---" printResultsSideBySide(columnWidth, canonicalResults[1], results[1]) # stdout print >> sys.stderr, "---" printResultsSideBySide(columnWidth, canonicalResults[2], results[2]) # stderr print >> sys.stderr, "---" if results != canonicalResults: sys.exit(1) def runCrossArchitectureTest(): if gNativeArch in ["x86_64", "i386"]: compareResultsForArchitectures(["x86_64", "i386"]) #*Rosetta compareResultsForArchitectures(["x86_64", "ppc"]) elif gNativeArch in ["ppc64", "ppc"]: compareResultsForArchitectures(["ppc64", "ppc"]) else: print >> sys.stderr, "What architecture?" assert False def generateFingerPrint(pathToTestVolume, arch): fullDump = True commands = [] if fullDump: commands += [ (('stat', '/'), ()), (('lstat', '/'), ()), (('stat', '/meg1'), ()), (('lstat', '/meg2'), ()), (('stat', '/rsrc'), ()), (('lstat', '/rsrc'), ()), (('stat', '/linksrc'), ()), (('lstat', '/linksrc'), ()), (('stat', '/linkdest'), ()), (('lstat', '/linkdest'), ()), (('stat', '/dir'), ()), (('lstat', '/dir'), ()), (('stat', '/dir/dir2'), ()), (('lstat', '/dir/dir2'), ()), (('stat', '/dir/nested'), ()), (('lstat', '/dir/nested'), ()), (('-v', 'stat', '/'), ()), (('-v', 'lstat', '/'), ()), (('-v', 'stat', '/meg1'), ()), (('-v', 'lstat', '/meg2'), ()), (('-v', 'stat', '/rsrc'), ()), (('-v', 'lstat', '/rsrc'), ()), (('-v', 'stat', '/linksrc'), ()), (('-v', 'lstat', '/linksrc'), ()), (('-v', 'stat', '/linkdest'), ()), (('-v', 'lstat', '/linkdest'), ()), (('-v', 'stat', '/dir'), ()), (('-v', 'lstat', '/dir'), ()), (('-v', 'stat', '/dir/dir2'), ()), (('-v', 'lstat', '/dir/dir2'), ()), (('-v', 'stat', '/dir/nested'), ()), (('-v', 'lstat', '/dir/nested'), ()), (('statfs', '/'), (fixStatFS,)), (('lstatfs', '/'), (fixStatFS,)), (('statfs', '/meg1'), (fixStatFS,)), (('lstatfs', '/meg1'), (fixStatFS,)), (('-v', 'statfs', '/'), (fixStatFS,)), (('-v', 'lstatfs', '/'), (fixStatFS,)), (('-v', 'statfs', '/meg1'), (fixStatFS,)), (('-v', 'lstatfs', '/meg1'), (fixStatFS,)), ] if fullDump: commands += [ (('getdirentries', '/'), ()), (('getdirentries', '/dir'), ()), (('getdirentries', '/dir/dir2'), ()), (('getdirentries', '-bufSize', '10240', '/'), ()), (('getdirentries', '-r', '/'), ()), (('-v', 'getdirentries', '/'), ()), (('-v', 'getdirentries', '/dir'), ()), (('-v', 'getdirentries', '/dir/dir2'), ()), (('-v', 'getdirentries', '-bufSize', '10240', '/'), ()), (('-v', 'getdirentries', '-r', '/'), ()), (('readdir', '/'), ()), (('readdir', '/dir'), ()), (('readdir', '/dir/dir2'), ()), (('readdir', '-r', '/'), ()), (('-v', 'readdir', '/'), (fixTellDir,)), (('-v', 'readdir', '/dir'), (fixTellDir,)), (('-v', 'readdir', '/dir/dir2'), (fixTellDir,)), (('-v', 'readdir', '-r', '/'), (fixTellDir,)), (('fts', '/'), (fixFTSPointers,)), # fts has a bunch of options arguments but I cannot be bothered # exercising those cases. ] if fullDump: commands += [ (('listxattr', '/meg1'), ()), (('listxattr', '/xattr'), ()), (('listxattr', '/rsrc'), ()), (('listxattr', '-bufSize', '10240', '/xattr'), ()), (('getxattr', '/xattr', 'com.apple.FinderInfo'), ()), (('getxattr', '/rsrc', 'com.apple.ResourceFork'), ()), (('-v', 'getxattr', '/xattr', 'com.apple.FinderInfo'), ()), (('-v', 'getxattr', '/rsrc', 'com.apple.ResourceFork'), ()), (('-vv', 'getxattr', '/xattr', 'com.apple.FinderInfo'), ()), (('-vv', 'getxattr', '/rsrc', 'com.apple.ResourceFork'), ()), ] # In the commented out cases below it seems to be that getattrlist is # misbehaving. I seem to remember seeing this problem because... of # something, but I do NOT have time to investigate right now. if fullDump: commands += [ (('getattrlist', '/'), ()), (('getattrlist', '-ATTR_CMN_NAME', '/'), ()), (('getattrlist', '-ATTR_CMN_NAME', '/meg1'), ()), (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/'), ()), (('getattrlist', '-ATTR_VOL_INFO,ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/'), ()), (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/meg1'), ()), (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/xattr'), ()), (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID', '/'), ()), (('getattrlist', '-ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/'), ()), (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), # (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), # (('getattrlist', '-ATTR_VOL_INFO,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/'), ()), (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/meg1'), ()), # (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/meg1'), ()), # (('getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/meg1'), ()), # (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), # (('getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/meg1'), ()), (('-v', 'getattrlist', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_NAME', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_NAME', '/meg1'), ()), (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/'), ()), (('-v', 'getattrlist', '-ATTR_VOL_INFO,ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/meg1'), ()), (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/xattr'), ()), (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID', '/'), ()), (('-v', 'getattrlist', '-ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), # (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), # (('-v', 'getattrlist', '-ATTR_VOL_INFO,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/meg1'), ()), # (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/meg1'), ()), # (('-v', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/meg1'), ()), # (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), # (('-v', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/meg1'), ()), (('-vv', 'getattrlist', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_NAME', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_NAME', '/meg1'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/'), ()), (('-vv', 'getattrlist', '-ATTR_VOL_INFO,ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/meg1'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_CMN_FNDRINFO', '/xattr'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID', '/'), ()), (('-vv', 'getattrlist', '-ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), # (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), # (('-vv', 'getattrlist', '-ATTR_VOL_INFO,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_VOL_FSTYPE,ATTR_VOL_SIGNATURE,ATTR_VOL_SIZE,ATTR_VOL_SPACEFREE,ATTR_VOL_SPACEAVAIL,ATTR_VOL_MINALLOCATION,ATTR_VOL_ALLOCATIONCLUMP,ATTR_VOL_IOBLOCKSIZE,ATTR_VOL_OBJCOUNT,ATTR_VOL_FILECOUNT,ATTR_VOL_DIRCOUNT,ATTR_VOL_MAXOBJCOUNT,ATTR_VOL_MOUNTPOINT,ATTR_VOL_NAME,ATTR_VOL_MOUNTFLAGS,ATTR_VOL_MOUNTEDDEVICE,ATTR_VOL_ENCODINGSUSED,ATTR_VOL_CAPABILITIES,ATTR_VOL_ATTRIBUTES', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS', '/meg1'), ()), # (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/meg1'), ()), # (('-vv', 'getattrlist', '-ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_CMN_NAME,ATTR_CMN_DEVID,ATTR_CMN_FSID,ATTR_CMN_OBJTYPE,ATTR_CMN_OBJTAG,ATTR_CMN_OBJID,ATTR_CMN_OBJPERMANENTID,ATTR_CMN_PAROBJID,ATTR_CMN_SCRIPT,ATTR_CMN_CRTIME,ATTR_CMN_MODTIME,ATTR_CMN_CHGTIME,ATTR_CMN_ACCTIME,ATTR_CMN_BKUPTIME,ATTR_CMN_FNDRINFO,ATTR_CMN_OWNERID,ATTR_CMN_GRPID,ATTR_CMN_ACCESSMASK,ATTR_CMN_FLAGS,ATTR_CMN_USERACCESS,ATTR_CMN_EXTENDED_SECURITY,ATTR_CMN_UUID,ATTR_CMN_GRPUUID,ATTR_CMN_FILEID,ATTR_CMN_PARENTID,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/meg1'), ()), # (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/'), ()), # (('-vv', 'getattrlist', '-ATTR_CMN_OBJTYPE,ATTR_DIR_LINKCOUNT,ATTR_DIR_ENTRYCOUNT,ATTR_DIR_MOUNTSTATUS,ATTR_FILE_LINKCOUNT,ATTR_FILE_TOTALSIZE,ATTR_FILE_ALLOCSIZE,ATTR_FILE_IOBLOCKSIZE,ATTR_FILE_CLUMPSIZE,ATTR_FILE_DEVTYPE,ATTR_FILE_DATALENGTH,ATTR_FILE_DATAALLOCSIZE,ATTR_FILE_DATAEXTENTS,ATTR_FILE_RSRCLENGTH,ATTR_FILE_RSRCALLOCSIZE,ATTR_FILE_RSRCEXTENTS', '/meg1'), ()), ] if fullDump: commands += [ (('FSGetVolumeInfo', '/'), (fixVolumeDates,)), (('-v', 'FSGetVolumeInfo', '/'), (fixVolumeDates,)), (('FSGetVolumeParms', '/'), (fixVolParmsPointers,)), (('-v', 'FSGetVolumeParms', '/'), (fixVolParmsPointers,)), ] if fullDump: commands += [ (('FSGetCatalogInfo', '/'), ()), (('FSGetCatalogInfo', '/meg1'), ()), (('FSGetCatalogInfo', '/meg2'), ()), (('FSGetCatalogInfo', '/dir'), ()), (('FSGetCatalogInfo', '/acl'), ()), (('FSGetCatalogInfo', '/linksrc'), ()), (('FSGetCatalogInfo', '/linkdest'), ()), (('FSGetCatalogInfo', '/rsrc'), ()), (('FSGetCatalogInfo', '/xattr'), ()), (('FSGetCatalogInfo', '-parent', '/'), ()), (('FSGetCatalogInfo', '-parent', '/meg1'), ()), (('FSGetCatalogInfo', '-parent', '/meg2'), ()), (('FSGetCatalogInfo', '-parent', '/dir'), ()), (('FSGetCatalogInfo', '-parent', '/acl'), ()), (('FSGetCatalogInfo', '-parent', '/linksrc'), ()), (('FSGetCatalogInfo', '-parent', '/linkdest'), ()), (('FSGetCatalogInfo', '-parent', '/rsrc'), ()), (('FSGetCatalogInfo', '-parent', '/xattr'), ()), (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/'), (fixCatInfoPermissions,)), (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/meg1'), (fixCatInfoPermissions,)), (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/meg2'), (fixCatInfoPermissions,)), (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/dir'), (fixCatInfoPermissions,)), (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/acl'), (fixCatInfoPermissions,)), (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/linksrc'), (fixCatInfoPermissions,)), (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/linkdest'), (fixCatInfoPermissions,)), (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/rsrc'), (fixCatInfoPermissions,)), (('FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/xattr'), (fixCatInfoPermissions,)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/'), ()), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/meg1'), ()), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/meg2'), ()), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/dir'), ()), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/acl'), ()), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/linksrc'), ()), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/linkdest'), ()), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/rsrc'), ()), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/xattr'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/meg1'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/meg2'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/dir'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/acl'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/linksrc'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/linkdest'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/rsrc'), ()), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoGettableInfo', '/xattr'), ()), (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/'), (fixCatInfoPermissions, fixFileSecOwner)), (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/meg1'), (fixCatInfoPermissions, fixFileSecOwner)), (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/meg2'), (fixCatInfoPermissions, fixFileSecOwner)), (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/dir'), (fixCatInfoPermissions, fixFileSecOwner)), (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/acl'), (fixCatInfoPermissions, fixFileSecOwner)), (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/linksrc'), (fixCatInfoPermissions, fixFileSecOwner)), (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/linkdest'), (fixCatInfoPermissions, fixFileSecOwner)), (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/rsrc'), (fixCatInfoPermissions, fixFileSecOwner)), (('FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/xattr'), (fixCatInfoPermissions, fixFileSecOwner)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/'), (fixFileSecOwner,)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/meg1'), (fixFileSecOwner,)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/meg2'), (fixFileSecOwner,)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/dir'), (fixFileSecOwner,)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/acl'), (fixFileSecOwner,)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/linksrc'), (fixFileSecOwner,)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/linkdest'), (fixFileSecOwner,)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/rsrc'), (fixFileSecOwner,)), (('-v', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/xattr'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/meg1'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/meg2'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/dir'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/acl'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/linksrc'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/linkdest'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/rsrc'), (fixFileSecOwner,)), (('-vv', 'FSGetCatalogInfo', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/xattr'), (fixFileSecOwner,)), ] if fullDump: commands += [ (('FSGetCatalogInfoBulk', '/meg1'), ()), (('FSGetCatalogInfoBulk', '/dir'), ()), (('FSGetCatalogInfoBulk', '-refs', '/'), ()), (('FSGetCatalogInfoBulk', '-refs', '/dir'), ()), (('FSGetCatalogInfoBulk', '-count', '2', '/'), ()), (('FSGetCatalogInfoBulk', '-count', '2', '/dir'), ()), (('FSGetCatalogInfoBulk', '-kFSCatInfoGettableInfo', '/'), (fixCatInfoPermissions,)), (('FSGetCatalogInfoBulk', '-kFSCatInfoGettableInfo', '/dir'), (fixCatInfoPermissions,)), (('-v', 'FSGetCatalogInfoBulk', '-kFSCatInfoGettableInfo', '/'), (fixCatInfoPermissions,)), (('-v', 'FSGetCatalogInfoBulk', '-kFSCatInfoGettableInfo', '/dir'), (fixCatInfoPermissions,)), (('-vv', 'FSGetCatalogInfoBulk', '-kFSCatInfoGettableInfo', '/'), (fixCatInfoPermissions,)), (('-vv', 'FSGetCatalogInfoBulk', '-kFSCatInfoGettableInfo', '/dir'), (fixCatInfoPermissions,)), (('FSGetCatalogInfoBulk', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/'), (fixCatInfoPermissions, fixFileSecOwner)), (('FSGetCatalogInfoBulk', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/dir'), (fixCatInfoPermissions, fixFileSecOwner)), (('-v', 'FSGetCatalogInfoBulk', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/'), (fixCatInfoPermissions, fixFileSecOwner)), (('-v', 'FSGetCatalogInfoBulk', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/dir'), (fixCatInfoPermissions, fixFileSecOwner)), (('-vv', 'FSGetCatalogInfoBulk', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/'), (fixCatInfoPermissions, fixFileSecOwner)), (('-vv', 'FSGetCatalogInfoBulk', '-kFSCatInfoPermissions,kFSCatInfoFSFileSecurityRef', '/dir'), (fixCatInfoPermissions, fixFileSecOwner)), ] if fullDump: commands += [ (('FSFindFolder', '/', 'asup'), ()), ] if fullDump: commands += [ (('FSCopyAliasInfo', '/'), (fixAliasVolumeCreateDate,)), (('FSCopyAliasInfo', '/meg1'), (fixAliasVolumeCreateDate,)), (('FSCopyAliasInfo', '/xattr'), (fixAliasVolumeCreateDate,)), ] # There is no /dev/tty on the test volume. Maybe it could be linked there? # Right now that is too much work for the benefit that I will get. if fullDump: commands += [ (('pathconf', '_PC_LINK_MAX', '/'), ()), # (('pathconf', '_PC_MAX_CANON', '/dev/tty'), ()), # (('pathconf', '_PC_MAX_INPUT', '/dev/tty'), ()), (('pathconf', '_PC_NAME_MAX', '/'), ()), (('pathconf', '_PC_PATH_MAX', '/'), ()), (('pathconf', '_PC_PIPE_BUF', '/'), ()), (('pathconf', '_PC_CHOWN_RESTRICTED', '/'), ()), (('pathconf', '_PC_NO_TRUNC', '/'), ()), # (('pathconf', '_PC_VDISABLE', '/dev/tty'), ()), (('pathconf', '_PC_NAME_CHARS_MAX', '/'), ()), (('pathconf', '_PC_CASE_SENSITIVE', '/'), ()), (('pathconf', '_PC_CASE_PRESERVING', '/'), ()), (('pathconf', '_PC_EXTENDED_SECURITY_NP', '/'), ()), (('pathconf', '_PC_AUTH_OPAQUE_NP', '/'), ()), (('pathconf', '_PC_2_SYMLINKS', '/'), ()), (('pathconf', '_PC_ALLOC_SIZE_MIN', '/'), ()), (('pathconf', '_PC_ASYNC_IO', '/'), ()), (('pathconf', '_PC_FILESIZEBITS', '/'), ()), (('pathconf', '_PC_PRIO_IO', '/'), ()), (('pathconf', '_PC_REC_INCR_XFER_SIZE', '/'), ()), (('pathconf', '_PC_REC_MAX_XFER_SIZE', '/'), ()), (('pathconf', '_PC_REC_MIN_XFER_SIZE', '/'), ()), (('pathconf', '_PC_REC_XFER_ALIGN', '/'), ()), (('pathconf', '_PC_SYMLINK_MAX', '/'), ()), (('pathconf', '_PC_SYNC_IO', '/'), ()), ] print >> sys.stdout, "arch: %s" % arch print >> sys.stdout, "version: %s" % runTool(["sw_vers", "-productVersion"])[1].strip() print >> sys.stdout for command in commands: args = [] for arg in command[0]: if arg[:1] == "/": args += [os.path.join(pathToTestVolume, arg[1:])] else: args += [arg] results = runFSMegaInfo(args, arch) for fix in command[1]: results = fix(results, arch) testStatus = results[0] testOutput = results[1] testError = results[2] if testOutput == '': testOutput = [] else: testOutput = testOutput.splitlines() if testError == '': testError = [] else: testError = testError.splitlines() print >> sys.stdout, "args: %s" % str(command[0]) print >> sys.stdout, "results: %d %d %d" % (testStatus, len(testOutput), len(testError)) print >> sys.stdout, "---" for l in testOutput: print >> sys.stdout, l print >> sys.stdout, "---" for l in testError: print >> sys.stdout, l print >> sys.stdout, "---" sys.stdout.flush() def printUsage(): print >> sys.stderr, "usage: %s [ pathToTestVolume [ arch ] ]" % os.path.basename(sys.argv[0]) try: opts, args = getopt.getopt(sys.argv[1:], "d") except getopt.GetoptError, e: printUsage() sys.exit(1) for opt in opts: if opt[0] == "-d": gDebug += 1 gNativeArch = runTool(["arch"])[1].strip() if len(args) == 0: print >> sys.stdout, "Test.py: len(args) is 0, so we are running the CrossArchitectureTest" runCrossArchitectureTest() elif len(args) == 1: print >> sys.stdout, "Test.py: len(args) is 1, so we are generating a FingerPrint" generateFingerPrint(args[0], "") elif len(args) == 2: print >> sys.stdout, "Test.py: len(args) is 2, so we are generating an arch-specific FingerPrint" generateFingerPrint(args[0], arch) else: printUsage() sys.exit(1) # EOF
101.856263
1,240
0.731514
11,778
99,208
5.674733
0.054763
0.181815
0.023879
0.030702
0.814938
0.763559
0.730763
0.7221
0.707901
0.698969
0
0.004508
0.132368
99,208
973
1,241
101.960946
0.771981
0.325649
0
0.357041
0
0.062589
0.601363
0.453513
0
0
0.001184
0
0.001422
0
null
null
0
0.009957
null
null
0.054054
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
1
1
null
0
0
0
0
1
0
0
0
0
0
0
0
0
11
bbe37b5583f44110b034e58daca9ad81e7df19a8
2,610
py
Python
WEST/HFSS_antenna_front_face/HFSS_script_export_EH_2D_flat_dielectric.py
Hash--/ICRH
b9da71f8eaa1f05f90453473fc90d61259a3c56a
[ "MIT" ]
null
null
null
WEST/HFSS_antenna_front_face/HFSS_script_export_EH_2D_flat_dielectric.py
Hash--/ICRH
b9da71f8eaa1f05f90453473fc90d61259a3c56a
[ "MIT" ]
null
null
null
WEST/HFSS_antenna_front_face/HFSS_script_export_EH_2D_flat_dielectric.py
Hash--/ICRH
b9da71f8eaa1f05f90453473fc90d61259a3c56a
[ "MIT" ]
null
null
null
# ---------------------------------------------- # Script Recorded by ANSYS Electronics Desktop Version 2020.2.0 # 12:48:39 mai 20, 2020 # ---------------------------------------------- import ScriptEnv ScriptEnv.Initialize("Ansoft.ElectronicsDesktop") oDesktop.RestoreWindow() oProject = oDesktop.SetActiveProject("WEST_ICRH_front_face") oDesign = oProject.SetActiveDesign("Front Face Flat Dielectric") oModule = oDesign.GetModule("FieldsReporter") oModule.CalcStack("clear") oModule.CopyNamedExprToStack("Real_vector_E") oModule.ExportToFile("C:\\Users\\JH218595\\Documents\\ICRH\\WEST\\HFSS_antenna_front_face\\WEST_ICRH_Flat_Dielectric_2D_Ereal.fld", "C:\\Users\\JH218595\\Documents\\ICRH\\WEST\\HFSS_antenna_front_face\\points.pts", "Setup1 : LastAdaptive", [ "$epsr_dielectric:=" , "1", "$shift_X:=" , "50mm", "Freq:=" , "0.05GHz", "Phase:=" , "0deg", "power_at_port:=" , "1000W", "vac_length:=" , "200mm", "vac_width:=" , "1200mm", "x0:=" , "5mm" ], True) oModule.CalcStack("clear") oModule.CopyNamedExprToStack("Real_vector_H") oModule.ExportToFile("C:\\Users\\JH218595\\Documents\\ICRH\\WEST\\HFSS_antenna_front_face\\WEST_ICRH_Flat_Dielectric_2D_Hreal.fld", "C:\\Users\\JH218595\\Documents\\ICRH\\WEST\\HFSS_antenna_front_face\\points.pts", "Setup1 : LastAdaptive", [ "$epsr_dielectric:=" , "1", "$shift_X:=" , "50mm", "Freq:=" , "0.05GHz", "Phase:=" , "0deg", "power_at_port:=" , "1000W", "vac_length:=" , "200mm", "vac_width:=" , "1200mm", "x0:=" , "5mm" ], True) oModule.CalcStack("clear") oModule.CopyNamedExprToStack("Imag_vector_E") oModule.ExportToFile("C:\\Users\\JH218595\\Documents\\ICRH\\WEST\\HFSS_antenna_front_face\\WEST_ICRH_Flat_Dielectric_2D_Eimag.fld", "C:\\Users\\JH218595\\Documents\\ICRH\\WEST\\HFSS_antenna_front_face\\points.pts", "Setup1 : LastAdaptive", [ "$epsr_dielectric:=" , "1", "$shift_X:=" , "50mm", "Freq:=" , "0.05GHz", "Phase:=" , "0deg", "power_at_port:=" , "1000W", "vac_length:=" , "200mm", "vac_width:=" , "1200mm", "x0:=" , "5mm" ], True) oModule.CalcStack("clear") oModule.CopyNamedExprToStack("Imag_vector_H") oModule.ExportToFile("C:\\Users\\JH218595\\Documents\\ICRH\\WEST\\HFSS_antenna_front_face\\WEST_ICRH_Flat_Dielectric_2D_Himag.fld", "C:\\Users\\JH218595\\Documents\\ICRH\\WEST\\HFSS_antenna_front_face\\points.pts", "Setup1 : LastAdaptive", [ "$epsr_dielectric:=" , "1", "$shift_X:=" , "50mm", "Freq:=" , "0.05GHz", "Phase:=" , "0deg", "power_at_port:=" , "1000W", "vac_length:=" , "200mm", "vac_width:=" , "1200mm", "x0:=" , "5mm" ], True)
39.545455
240
0.654406
302
2,610
5.39404
0.268212
0.055249
0.068754
0.112953
0.812769
0.812769
0.812769
0.778392
0.778392
0.778392
0
0.066038
0.106513
2,610
66
241
39.545455
0.632504
0.068199
0
0.689655
0
0
0.600082
0.316722
0
0
0
0
0
1
0
false
0
0.017241
0
0.017241
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
3c3e9f5541d16b90934a94b3c0c1287bd107e6cb
4,053
py
Python
03_wave/plot_sol.py
ShotaDeguchi/PINN_TF2
76320b08029aa175e8aa28c34fa6d227b4da35ce
[ "Apache-2.0" ]
null
null
null
03_wave/plot_sol.py
ShotaDeguchi/PINN_TF2
76320b08029aa175e8aa28c34fa6d227b4da35ce
[ "Apache-2.0" ]
1
2022-02-20T15:18:15.000Z
2022-02-20T15:23:42.000Z
03_wave/plot_sol.py
ShotaDeguchi/PINNs_TF2
4675e53fbc8dd89912fd15b6d9f048bb5d382355
[ "Apache-2.0" ]
null
null
null
""" ******************************************************************************** plots solutions ******************************************************************************** """ import numpy as np from scipy.interpolate import griddata import matplotlib.pyplot as plt def plot_sol0(X_star, phi1): lb = X_star.min(0) ub = X_star.max(0) nn = 200 x, y = np.linspace(lb[0], ub[0], nn), np.linspace(lb[1], ub[1], nn); x, y = np.meshgrid(x, y) PHI_I = griddata(X_star, phi1.flatten(), (x, y), method = "linear") plt.figure(figsize = (5, 4)) plt.xlabel("x", fontstyle = "italic") plt.ylabel("y", fontstyle = "italic") plt.title("$ \phi $") plt.xticks(np.arange(-10, 10, 1)); plt.yticks(np.arange(-10, 10, 1)) plt.pcolor(x, y, PHI_I, cmap = "coolwarm", shading = "auto") plt.colorbar() plt.show() def plot_sol1(X_star, phi1, v0, v1, ticks): lb = X_star.min(0) ub = X_star.max(0) nn = 200 x, y = np.linspace(lb[0], ub[0], nn), np.linspace(lb[1], ub[1], nn); x, y = np.meshgrid(x, y) PHI_I = griddata(X_star, phi1.flatten(), (x, y), method = "linear") plt.figure(figsize = (5, 4)) plt.xlabel("x", fontstyle = "italic") plt.ylabel("y", fontstyle = "italic") plt.xticks(np.arange(-10, 10, 1)); plt.yticks(np.arange(-10, 10, 1)) plt.pcolor(x, y, PHI_I, cmap = "coolwarm", shading = "auto", vmin = v0, vmax = v1) plt.colorbar(ticks = np.arange(-10, 10, ticks)) plt.show() def plot_sol2(X_star, phi1, phi2, v0, v1, ticks): lb = X_star.min(0) ub = X_star.max(0) nn = 200 x, y = np.linspace(lb[0], ub[0], nn), np.linspace(lb[1], ub[1], nn); x, y = np.meshgrid(x, y) PHI_I = griddata(X_star, phi1.flatten(), (x, y), method = "linear") PHI_II = griddata(X_star, phi2.flatten(), (x, y), method = "linear") plt.figure(figsize = (16, 3)) plt.subplot(1, 3, 1) plt.xlabel("x") plt.ylabel("y") plt.title("$ \phi_1 $") plt.xticks(np.arange(-10, 10, 1)) plt.yticks(np.arange(-10, 10, 1)) plt.pcolor(x, y, PHI_I, cmap = "coolwarm", shading = "auto", vmin = v0, vmax = v1) plt.colorbar(ticks = np.arange(-10, 10, ticks)) plt.subplot(1, 3, 2) plt.xlabel("x") plt.ylabel("y") plt.title("$ \phi_2 $") plt.xticks(np.arange(-10, 10, 1)) plt.yticks(np.arange(-10, 10, 1)) plt.pcolor(x, y, PHI_II, cmap = "coolwarm", shading = "auto", vmin = v0, vmax = v1) plt.colorbar(ticks = np.arange(-10, 10, ticks)) plt.show() def plot_diff(X_star, phi1, phi2, v0, v1, vt, d0, d1, dt): lb = X_star.min(0) ub = X_star.max(0) nn = 200 x, y = np.linspace(lb[0], ub[0], nn), np.linspace(lb[1], ub[1], nn); x, y = np.meshgrid(x, y) PHI_I = griddata(X_star, phi1.flatten(), (x, y), method = "linear") PHI_II = griddata(X_star, phi2.flatten(), (x, y), method = "linear") PHI_III = griddata(X_star, (phi2 - phi1).flatten(), (x, y), method = "linear") plt.figure(figsize = (16, 2)) plt.subplot(1, 3, 1) plt.xlabel("x", fontstyle = "italic") plt.ylabel("y", fontstyle = "italic") plt.title("$ \phi_1 $") plt.xticks(np.arange(-10, 10, 1)) plt.yticks(np.arange(-10, 10, 1)) plt.pcolor(x, y, PHI_I, cmap = "coolwarm", shading = "auto", vmin = v0, vmax = v1) plt.colorbar(ticks = np.arange(-3, 3, vt)) plt.subplot(1, 3, 2) plt.xlabel("x", fontstyle = "italic") plt.ylabel("y", fontstyle = "italic") plt.title("$ \phi_2 $") plt.xticks(np.arange(-10, 10, 1)) plt.yticks(np.arange(-10, 10, 1)) plt.pcolor(x, y, PHI_II, cmap = "coolwarm", shading = "auto", vmin = v0, vmax = v1) plt.colorbar(ticks = np.arange(-3, 3, vt)) plt.subplot(1, 3, 3) plt.xlabel("x", fontstyle = "italic") plt.ylabel("y", fontstyle = "italic") plt.title("$ \phi_2 - \phi_1 $") plt.xticks(np.arange(-10, 10, 1)) plt.yticks(np.arange(-10, 10, 1)) plt.pcolor(x, y, PHI_III, cmap = "coolwarm", shading = "auto", vmin = d0, vmax = d1) plt.colorbar(ticks = np.arange(-3, 3, dt)) plt.show()
37.527778
97
0.553911
650
4,053
3.387692
0.113846
0.023615
0.077203
0.092643
0.905995
0.893733
0.878747
0.866939
0.850136
0.804269
0
0.059443
0.203059
4,053
107
98
37.878505
0.622291
0.043671
0
0.808989
0
0
0.069028
0
0
0
0
0
0
1
0.044944
false
0
0.033708
0
0.078652
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
3c472bbbb01b48ffd59b38de197b248c5a2529c7
23,144
py
Python
Crypto/Octopus/octo.py
stevenyu113228/AIS3_2020_pre_Exam_Writeup
5c32eeed89ac3a4dd9627aa15a60d4e6b1841693
[ "WTFPL" ]
7
2020-07-01T06:46:58.000Z
2021-04-28T11:01:25.000Z
Crypto/Octopus/octo.py
stevenyu113228/AIS3_2020_pre_Exam_Writeup
5c32eeed89ac3a4dd9627aa15a60d4e6b1841693
[ "WTFPL" ]
null
null
null
Crypto/Octopus/octo.py
stevenyu113228/AIS3_2020_pre_Exam_Writeup
5c32eeed89ac3a4dd9627aa15a60d4e6b1841693
[ "WTFPL" ]
1
2021-03-18T17:15:17.000Z
2021-03-18T17:15:17.000Z
import numpy as np # qubit # →: 1j # ↑: 1+0j # ↘: 0.707-0.707j # ↗: 0.707+0.707j def Q(x): return { '1j': 1j, '(1+0j)': 1+0j, '(0.707-0.707j)': 0.707-0.707j, '(0.707+0.707j)': 0.707+0.707j }[x] LEN = 1024 basis = ['+', '+', '+', '+', '+', '+', 'x', '+', 'x', '+', '+', '+', 'x', '+', 'x', 'x', '+', 'x', 'x', '+', '+', '+', 'x', 'x', '+', '+', '+', 'x', '+', 'x', 'x', '+', '+', 'x', '+', 'x', '+', '+', 'x', 'x', '+', '+', 'x', '+', '+', '+', '+', 'x', 'x', '+', '+', 'x', 'x', 'x', 'x', 'x', 'x', '+', 'x', '+', '+', 'x', '+', '+', 'x', 'x', '+', '+', '+', '+', '+', 'x', '+', '+', 'x', 'x', 'x', 'x', 'x', 'x', 'x', '+', '+', 'x', '+', 'x', 'x', '+', '+', '+', '+', 'x', 'x', 'x', '+', '+', '+', 'x', 'x', 'x', 'x', '+', 'x', 'x', '+', 'x', '+', 'x', '+', 'x', '+', '+', '+', 'x', 'x', 'x', 'x', 'x', '+', 'x', '+', '+', '+', '+', '+', '+', '+', '+', 'x', 'x', 'x', 'x', '+', '+', '+', '+', '+', 'x', 'x', '+', 'x', 'x', 'x', 'x', '+', 'x', 'x', '+', 'x', 'x', '+', '+', '+', '+', '+', 'x', '+', '+', '+', 'x', '+', '+', 'x', 'x', '+', '+', 'x', 'x', 'x', '+', 'x', '+', '+', 'x', 'x', 'x', 'x', '+', 'x', 'x', 'x', 'x', 'x', 'x', 'x', '+', 'x', '+', 'x', 'x', 'x', '+', '+', 'x', 'x', '+', 'x', '+', 'x', 'x', '+', '+', 'x', '+', '+', '+', 'x', 'x', '+', 'x', '+', '+', '+', '+', '+', '+', 'x', '+', '+', 'x', 'x', 'x', '+', 'x', 'x', 'x', 'x', 'x', '+', 'x', 'x', 'x', '+', '+', 'x', 'x', '+', 'x', 'x', '+', '+', 'x', '+', '+', 'x', 'x', '+', '+', '+', 'x', '+', 'x', '+', '+', '+', '+', 'x', '+', '+', 'x', '+', '+', '+', 'x', 'x', 'x', '+', '+', '+', '+', 'x', 'x', '+', 'x', '+', 'x', '+', '+', 'x', 'x', 'x', '+', 'x', '+', '+', 'x', '+', 'x', '+', '+', 'x', 'x', '+', 'x', '+', '+', '+', 'x', '+', '+', '+', '+', '+', '+', 'x', '+', '+', '+', 'x', '+', '+', 'x', '+', 'x', 'x', '+', 'x', '+', 'x', '+', 'x', 'x', 'x', 'x', 'x', '+', '+', 'x', 'x', 'x', '+', '+', '+', '+', 'x', '+', 'x', 'x', '+', 'x', '+', 'x', 'x', 'x', 'x', '+', 'x', 'x', 'x', 'x', 'x', '+', '+', '+', '+', '+', '+', 'x', '+', 'x', '+', 'x', 'x', 'x', '+', '+', '+', '+', '+', '+', 'x', 'x', 'x', 'x', '+', 'x', 'x', '+', 'x', '+', 'x', '+', 'x', '+', 'x', 'x', '+', 'x', 'x', '+', 'x', '+', '+', 'x', '+', '+', 'x', 'x', '+', 'x', 'x', 'x', 'x', 'x', '+', 'x', '+', '+', '+', '+', 'x', '+', '+', '+', 'x', '+', 'x', '+', 'x', 'x', '+', '+', '+', 'x', 'x', 'x', '+', 'x', '+', 'x', '+', '+', 'x', '+', 'x', '+', 'x', 'x', 'x', 'x', '+', 'x', '+', 'x', 'x', '+', '+', '+', '+', 'x', 'x', '+', '+', '+', 'x', '+', 'x', '+', 'x', '+', 'x', '+', 'x', '+', 'x', '+', 'x', '+', '+', '+', 'x', 'x', '+', 'x', 'x', 'x', 'x', '+', 'x', '+', 'x', 'x', '+', 'x', '+', 'x', '+', 'x', 'x', 'x', 'x', 'x', 'x', '+', 'x', 'x', '+', '+', '+', 'x', '+', '+', 'x', '+', 'x', 'x', 'x', '+', '+', '+', '+', '+', 'x', 'x', '+', '+', '+', '+', '+', '+', 'x', '+', 'x', 'x', 'x', '+', 'x', 'x', '+', '+', 'x', 'x', 'x', '+', '+', '+', 'x', '+', 'x', '+', 'x', 'x', 'x', '+', 'x', '+', '+', 'x', 'x', '+', 'x', 'x', '+', '+', 'x', 'x', 'x', '+', 'x', 'x', 'x', 'x', 'x', '+', 'x', '+', '+', '+', '+', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', '+', '+', 'x', 'x', '+', 'x', '+', 'x', 'x', 'x', '+', '+', 'x', '+', '+', 'x', '+', '+', 'x', '+', '+', 'x', 'x', 'x', 'x', 'x', 'x', '+', 'x', 'x', 'x', 'x', '+', '+', 'x', 'x', '+', 'x', 'x', '+', 'x', '+', '+', '+', 'x', '+', '+', '+', '+', '+', '+', '+', '+', 'x', 'x', '+', '+', '+', 'x', 'x', 'x', '+', 'x', '+', 'x', 'x', 'x', '+', '+', 'x', '+', '+', 'x', '+', 'x', 'x', 'x', 'x', '+', 'x', '+', 'x', '+', 'x', '+', '+', 'x', 'x', '+', '+', '+', 'x', 'x', '+', 'x', 'x', '+', '+', '+', '+', 'x', '+', 'x', 'x', '+', 'x', 'x', '+', 'x', '+', '+', '+', 'x', 'x', '+', 'x', '+', 'x', 'x', '+', 'x', 'x', '+', 'x', 'x', 'x', 'x', '+', 'x', 'x', 'x', '+', 'x', '+', '+', 'x', 'x', '+', '+', '+', 'x', '+', '+', 'x', 'x', '+', '+', '+', 'x', 'x', 'x', '+', '+', 'x', 'x', 'x', 'x', '+', '+', 'x', 'x', 'x', '+', '+', '+', 'x', 'x', '+', '+', 'x', '+', '+', '+', 'x', 'x', 'x', '+', '+', '+', '+', '+', 'x', 'x', 'x', '+', 'x', 'x', '+', 'x', 'x', '+', 'x', 'x', '+', '+', '+', '+', 'x', '+', 'x', '+', 'x', 'x', '+', 'x', '+', 'x', '+', '+', '+', '+', 'x', '+', '+', 'x', 'x', '+', 'x', '+', '+', 'x', '+', '+', 'x', 'x', 'x', 'x', '+', '+', '+', '+', 'x', 'x', '+', 'x', 'x', '+', '+', '+', 'x', '+', 'x', 'x', 'x', 'x', '+', '+', 'x', '+', '+', '+', 'x', '+', 'x', '+', '+', 'x', 'x', 'x', 'x', '+', 'x', 'x', '+', '+', '+', 'x', 'x', '+', 'x', 'x', 'x', '+', '+', 'x', 'x', '+', 'x', '+', 'x', 'x', 'x', 'x', 'x', 'x', '+', 'x', '+', '+', 'x', 'x', '+', '+', 'x', '+', '+', '+', '+', 'x', 'x', '+', '+', '+', 'x', '+', 'x', 'x', 'x', '+', 'x', '+', '+', 'x', 'x', '+', '+', '+', '+', '+', 'x', 'x', '+', '+', '+', 'x', 'x', '+', 'x', 'x', '+', '+', 'x', 'x', 'x', '+', '+', 'x', 'x', '+', '+', '+', 'x', 'x', 'x', '+', '+', 'x', '+', 'x', '+', 'x', 'x', '+', 'x', '+', 'x', 'x', '+', '+', '+', '+', 'x', '+', '+', 'x', '+', 'x', '+', '+', '+', '+', '+', '+', '+', 'x', '+', '+', '+', '+', 'x', '+', '+', 'x', '+', 'x', '+', 'x', '+', 'x', 'x', '+', 'x', 'x', '+', 'x', 'x', '+', '+', '+', 'x', '+', 'x', 'x', '+', '+', 'x', '+', 'x', '+', 'x', 'x', '+', '+', '+', 'x', '+', 'x', 'x', '+', '+', 'x', 'x', '+', '+', 'x', '+', '+', '+', '+', '+', 'x', 'x', '+', '+', 'x', 'x', '+', 'x', 'x', 'x', 'x', '+', 'x', '+', '+', '+', 'x'] qubits = [1j, 1j, (1+0j), (1+0j), 1j, 1j, (0.707+0.707j), (1+0j), (0.707+0.707j), (1+0j), (1+0j), 1j, (0.707-0.707j), 1j, (0.707+0.707j), (0.707+0.707j), 1j, (0.707+0.707j), (0.707-0.707j), (1+0j), 1j, (1+0j), (0.707-0.707j), (0.707+0.707j), (1+0j), 1j, 1j, (0.707+0.707j), (1+0j), (0.707+0.707j), (0.707-0.707j), (1+0j), (1+0j), (0.707-0.707j), (1+0j), (0.707+0.707j), (1+0j), (1+0j), (0.707-0.707j), (0.707-0.707j), (1+0j), (1+0j), (0.707-0.707j), (1+0j), 1j, (1+0j), 1j, (0.707+0.707j), (0.707+0.707j), (1+0j), 1j, (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), (1+0j), (0.707-0.707j), (1+0j), (1+0j), (0.707+0.707j), (1+0j), 1j, (0.707+0.707j), (0.707+0.707j), (1+0j), 1j, 1j, (1+0j), (1+0j), (0.707+0.707j), 1j, (1+0j), (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (0.707-0.707j), 1j, 1j, (0.707+0.707j), (1+0j), (0.707+0.707j), (0.707-0.707j), (1+0j), (1+0j), 1j, 1j, (0.707-0.707j), (0.707-0.707j), (0.707+0.707j), (1+0j), (1+0j), 1j, (0.707+0.707j), (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), 1j, (0.707-0.707j), (0.707+0.707j), 1j, (0.707-0.707j), 1j, (0.707-0.707j), 1j, (0.707-0.707j), (1+0j), 1j, (1+0j), (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), 1j, (0.707-0.707j), (1+0j), (1+0j), 1j, (1+0j), 1j, 1j, (1+0j), (1+0j), (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), 1j, (1+0j), (1+0j), 1j, (1+0j), (0.707-0.707j), (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), 1j, (0.707+0.707j), (0.707-0.707j), (1+0j), (0.707+0.707j), (0.707-0.707j), 1j, 1j, (1+0j), (1+0j), 1j, (0.707+0.707j), 1j, (1+0j), 1j, (0.707-0.707j), 1j, 1j, (0.707-0.707j), (0.707-0.707j), 1j, (1+0j), (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), (1+0j), (0.707-0.707j), (1+0j), (1+0j), (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), (1+0j), (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), (1+0j), (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707-0.707j), (0.707+0.707j), (1+0j), 1j, (0.707-0.707j), (0.707-0.707j), 1j, (0.707+0.707j), 1j, (0.707-0.707j), (0.707-0.707j), (1+0j), 1j, (0.707-0.707j), (1+0j), (1+0j), 1j, (0.707+0.707j), (0.707-0.707j), 1j, (0.707-0.707j), (1+0j), 1j, 1j, (1+0j), (1+0j), (1+0j), (0.707+0.707j), (1+0j), 1j, (0.707-0.707j), (0.707-0.707j), (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), 1j, 1j, (0.707-0.707j), (0.707+0.707j), 1j, (0.707-0.707j), (0.707-0.707j), (1+0j), (1+0j), (0.707+0.707j), (1+0j), (1+0j), (0.707-0.707j), (0.707+0.707j), (1+0j), (1+0j), 1j, (0.707+0.707j), 1j, (0.707+0.707j), 1j, 1j, 1j, 1j, (0.707+0.707j), 1j, (1+0j), (0.707-0.707j), (1+0j), 1j, 1j, (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), (1+0j), (1+0j), (1+0j), 1j, (0.707+0.707j), (0.707-0.707j), 1j, (0.707-0.707j), 1j, (0.707-0.707j), 1j, 1j, (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), (1+0j), (0.707+0.707j), (1+0j), 1j, (0.707+0.707j), (1+0j), (0.707-0.707j), 1j, 1j, (0.707+0.707j), (0.707-0.707j), (1+0j), (0.707-0.707j), 1j, 1j, (1+0j), (0.707+0.707j), 1j, (1+0j), (1+0j), (1+0j), (1+0j), 1j, (0.707-0.707j), 1j, (1+0j), (1+0j), (0.707+0.707j), 1j, 1j, (0.707-0.707j), 1j, (0.707+0.707j), (0.707+0.707j), 1j, (0.707+0.707j), 1j, (0.707-0.707j), 1j, (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), (1+0j), (1+0j), (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), 1j, (1+0j), 1j, 1j, (0.707-0.707j), 1j, (0.707-0.707j), (0.707-0.707j), 1j, (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), (0.707+0.707j), 1j, 1j, (1+0j), (1+0j), (1+0j), 1j, (0.707+0.707j), (1+0j), (0.707+0.707j), 1j, (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (1+0j), (1+0j), 1j, (1+0j), 1j, 1j, (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), 1j, (0.707-0.707j), (0.707-0.707j), (1+0j), (0.707+0.707j), 1j, (0.707+0.707j), (1+0j), (0.707+0.707j), (1+0j), (0.707+0.707j), (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707-0.707j), 1j, (0.707-0.707j), 1j, 1j, (0.707-0.707j), 1j, 1j, (0.707+0.707j), (0.707-0.707j), (1+0j), (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), (1+0j), (0.707+0.707j), (1+0j), 1j, 1j, 1j, (0.707+0.707j), (1+0j), (1+0j), (1+0j), (0.707-0.707j), (1+0j), (0.707-0.707j), (1+0j), (0.707-0.707j), (0.707+0.707j), (1+0j), 1j, (1+0j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (1+0j), (0.707+0.707j), (1+0j), (0.707+0.707j), (1+0j), 1j, (0.707+0.707j), (1+0j), (0.707+0.707j), 1j, (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), 1j, (0.707+0.707j), 1j, (0.707-0.707j), (0.707+0.707j), (1+0j), (1+0j), 1j, 1j, (0.707-0.707j), (0.707+0.707j), (1+0j), 1j, 1j, (0.707-0.707j), 1j, (0.707-0.707j), 1j, (0.707-0.707j), 1j, (0.707+0.707j), 1j, (0.707-0.707j), 1j, (0.707-0.707j), (1+0j), (0.707+0.707j), 1j, 1j, 1j, (0.707-0.707j), (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), 1j, (0.707+0.707j), (1+0j), (0.707+0.707j), (0.707+0.707j), (1+0j), (0.707-0.707j), (1+0j), (0.707+0.707j), 1j, (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707-0.707j), (1+0j), (1+0j), 1j, (0.707+0.707j), (1+0j), 1j, (0.707-0.707j), (1+0j), (0.707-0.707j), (0.707-0.707j), (0.707+0.707j), (1+0j), (1+0j), (1+0j), 1j, (1+0j), (0.707+0.707j), (0.707+0.707j), (1+0j), 1j, 1j, 1j, 1j, (1+0j), (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (1+0j), (0.707-0.707j), (0.707-0.707j), 1j, 1j, (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (1+0j), (1+0j), (1+0j), (0.707+0.707j), (1+0j), (0.707-0.707j), (1+0j), (0.707+0.707j), (0.707-0.707j), (0.707-0.707j), 1j, (0.707-0.707j), (1+0j), (1+0j), (0.707-0.707j), (0.707+0.707j), (1+0j), (0.707+0.707j), (0.707-0.707j), (1+0j), (1+0j), (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), 1j, (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), (1+0j), (0.707+0.707j), (1+0j), (1+0j), (1+0j), 1j, (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), 1j, 1j, (0.707-0.707j), (0.707+0.707j), (1+0j), (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), 1j, (1+0j), (0.707-0.707j), 1j, 1j, (0.707+0.707j), (1+0j), (1+0j), (0.707+0.707j), 1j, 1j, (0.707-0.707j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (0.707-0.707j), (0.707-0.707j), 1j, (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), (1+0j), (1+0j), (0.707+0.707j), (0.707+0.707j), (1+0j), (0.707+0.707j), (0.707+0.707j), (1+0j), (0.707+0.707j), (1+0j), (1+0j), 1j, (0.707+0.707j), (1+0j), (1+0j), 1j, (1+0j), (1+0j), 1j, 1j, 1j, (0.707-0.707j), (0.707-0.707j), (1+0j), 1j, 1j, (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), 1j, (0.707+0.707j), (1+0j), (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), (1+0j), (1+0j), (0.707-0.707j), 1j, 1j, (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), 1j, (0.707-0.707j), 1j, (0.707-0.707j), 1j, (0.707+0.707j), (1+0j), 1j, (0.707-0.707j), (0.707-0.707j), (1+0j), 1j, (1+0j), (0.707-0.707j), (0.707-0.707j), 1j, (0.707-0.707j), (0.707-0.707j), (1+0j), (1+0j), (1+0j), 1j, (0.707-0.707j), 1j, (0.707+0.707j), (0.707-0.707j), 1j, (0.707-0.707j), (0.707+0.707j), 1j, (0.707-0.707j), (1+0j), (1+0j), 1j, (0.707+0.707j), (0.707+0.707j), (1+0j), (0.707-0.707j), 1j, (0.707+0.707j), (0.707+0.707j), 1j, (0.707-0.707j), (0.707-0.707j), 1j, (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), 1j, (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), (1+0j), (0.707+0.707j), 1j, 1j, (0.707-0.707j), (0.707+0.707j), (1+0j), 1j, 1j, (0.707-0.707j), (1+0j), 1j, (0.707+0.707j), (0.707-0.707j), (1+0j), 1j, 1j, (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (1+0j), (1+0j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (0.707-0.707j), 1j, (1+0j), (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), 1j, (1+0j), 1j, (0.707-0.707j), (0.707+0.707j), (1+0j), 1j, (0.707-0.707j), 1j, 1j, 1j, (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), 1j, 1j, (1+0j), (1+0j), 1j, (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), 1j, (0.707-0.707j), (0.707+0.707j), (1+0j), (0.707-0.707j), (0.707-0.707j), 1j, (0.707+0.707j), (0.707+0.707j), (1+0j), 1j, 1j, 1j, (0.707-0.707j), (1+0j), (0.707+0.707j), (1+0j), (0.707+0.707j), (0.707+0.707j), (1+0j), (0.707+0.707j), (1+0j), (0.707+0.707j), 1j, (1+0j), (1+0j), (1+0j), (0.707-0.707j), (1+0j), 1j, (0.707-0.707j), (0.707-0.707j), 1j, (0.707+0.707j), (1+0j), (1+0j), (0.707+0.707j), (1+0j), (1+0j), (0.707+0.707j), (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), 1j, (1+0j), (1+0j), (1+0j), (0.707-0.707j), (0.707-0.707j), (1+0j), (0.707+0.707j), (0.707-0.707j), 1j, 1j, (1+0j), (0.707-0.707j), 1j, (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), 1j, 1j, (0.707+0.707j), 1j, 1j, 1j, (0.707-0.707j), 1j, (0.707-0.707j), 1j, (1+0j), (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (1+0j), (0.707+0.707j), (0.707-0.707j), (1+0j), 1j, 1j, (0.707+0.707j), (0.707+0.707j), 1j, (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), 1j, 1j, (0.707+0.707j), (0.707-0.707j), (1+0j), (0.707-0.707j), (1+0j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), 1j, (0.707+0.707j), 1j, (1+0j), (0.707-0.707j), (0.707+0.707j), (1+0j), (1+0j), (0.707+0.707j), 1j, (1+0j), 1j, 1j, (0.707-0.707j), (0.707-0.707j), 1j, (1+0j), 1j, (0.707+0.707j), 1j, (0.707-0.707j), (0.707+0.707j), (0.707+0.707j), 1j, (0.707+0.707j), 1j, (1+0j), (0.707+0.707j), (0.707+0.707j), (1+0j), 1j, 1j, 1j, 1j, (0.707-0.707j), (0.707+0.707j), (1+0j), (1+0j), 1j, (0.707+0.707j), (0.707-0.707j), (1+0j), (0.707-0.707j), (0.707+0.707j), (1+0j), (1+0j), (0.707+0.707j), (0.707-0.707j), (0.707+0.707j), 1j, 1j, (0.707-0.707j), (0.707+0.707j), 1j, (1+0j), 1j, (0.707-0.707j), (0.707+0.707j), (0.707-0.707j), (1+0j), (1+0j), (0.707+0.707j), (1+0j), (0.707-0.707j), (1+0j), (0.707-0.707j), (0.707-0.707j), 1j, (0.707-0.707j), (1+0j), (0.707-0.707j), (0.707+0.707j), 1j, (1+0j), 1j, 1j, (0.707+0.707j), (1+0j), 1j, (0.707-0.707j), 1j, (0.707+0.707j), 1j, 1j, (1+0j), 1j, 1j, (1+0j), 1j, (0.707+0.707j), (1+0j), 1j, (1+0j), 1j, (0.707-0.707j), 1j, 1j, (0.707-0.707j), 1j, (0.707+0.707j), (1+0j), (0.707-0.707j), (1+0j), (0.707-0.707j), (0.707-0.707j), 1j, (0.707+0.707j), (0.707-0.707j), 1j, (0.707+0.707j), (0.707-0.707j), (1+0j), (1+0j), (1+0j), (0.707+0.707j), 1j, (0.707-0.707j), (0.707-0.707j), 1j, 1j, (0.707+0.707j), (1+0j), (0.707+0.707j), (1+0j), (0.707+0.707j), (0.707-0.707j), 1j, 1j, (1+0j), (0.707-0.707j), (1+0j), (0.707-0.707j), (0.707+0.707j), 1j, 1j, (0.707+0.707j), (0.707-0.707j), 1j, 1j, (0.707+0.707j), (1+0j), (1+0j), (1+0j), (1+0j), (1+0j), (0.707-0.707j), (0.707+0.707j), (1+0j), (1+0j), (0.707-0.707j), (0.707-0.707j), (1+0j), (0.707+0.707j), (0.707+0.707j), (0.707-0.707j), (0.707-0.707j), 1j, (0.707+0.707j), (1+0j), (1+0j), (1+0j), (0.707-0.707j)] my_basis = ['+', 'x', '+', '+', 'x', '+', 'x', '+', 'x', 'x', '+', '+', 'x', '+', '+', 'x', 'x', '+', 'x', '+', '+', '+', '+', 'x', 'x', 'x', 'x', '+', '+', '+', 'x', '+', '+', '+', '+', 'x', 'x', '+', '+', 'x', '+', 'x', 'x', '+', '+', 'x', '+', '+', '+', '+', '+', 'x', 'x', '+', 'x', 'x', 'x', '+', '+', '+', 'x', '+', '+', '+', '+', '+', '+', '+', '+', 'x', '+', '+', 'x', '+', '+', 'x', '+', '+', '+', 'x', '+', 'x', '+', '+', 'x', '+', '+', 'x', '+', 'x', 'x', 'x', '+', '+', '+', '+', 'x', 'x', '+', '+', '+', 'x', 'x', 'x', '+', 'x', '+', '+', 'x', '+', '+', 'x', '+', 'x', '+', '+', '+', '+', 'x', 'x', '+', 'x', 'x', 'x', 'x', '+', 'x', '+', 'x', 'x', 'x', '+', '+', 'x', 'x', 'x', 'x', '+', '+', 'x', 'x', 'x', 'x', '+', 'x', '+', '+', 'x', '+', '+', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', '+', 'x', 'x', '+', '+', '+', '+', 'x', '+', '+', '+', 'x', '+', '+', '+', 'x', 'x', 'x', 'x', 'x', '+', 'x', '+', '+', '+', 'x', '+', 'x', 'x', '+', '+', '+', '+', 'x', '+', '+', 'x', 'x', 'x', '+', '+', 'x', '+', 'x', 'x', '+', '+', 'x', 'x', '+', '+', 'x', 'x', '+', '+', '+', 'x', '+', 'x', '+', 'x', '+', '+', '+', 'x', '+', '+', '+', '+', 'x', 'x', '+', '+', '+', 'x', 'x', '+', 'x', 'x', 'x', '+', 'x', 'x', '+', '+', 'x', '+', 'x', 'x', '+', '+', 'x', '+', 'x', '+', 'x', 'x', 'x', '+', '+', 'x', '+', '+', 'x', '+', 'x', '+', 'x', '+', 'x', '+', 'x', 'x', '+', '+', '+', 'x', '+', 'x', '+', '+', 'x', '+', '+', 'x', '+', 'x', 'x', 'x', '+', 'x', 'x', '+', '+', '+', 'x', '+', 'x', '+', '+', 'x', '+', '+', 'x', '+', 'x', '+', 'x', 'x', '+', 'x', '+', 'x', 'x', 'x', 'x', 'x', 'x', '+', '+', '+', '+', 'x', '+', '+', '+', '+', '+', '+', '+', 'x', 'x', 'x', '+', '+', 'x', 'x', 'x', 'x', '+', 'x', 'x', 'x', '+', '+', '+', 'x', '+', '+', 'x', '+', '+', '+', 'x', 'x', 'x', 'x', '+', '+', 'x', 'x', '+', 'x', 'x', '+', '+', '+', 'x', '+', '+', '+', 'x', '+', '+', '+', '+', 'x', 'x', 'x', 'x', '+', 'x', 'x', '+', '+', '+', '+', '+', 'x', 'x', 'x', '+', 'x', '+', '+', '+', '+', '+', '+', 'x', 'x', 'x', '+', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', '+', 'x', '+', 'x', '+', 'x', 'x', 'x', 'x', '+', '+', 'x', '+', 'x', 'x', 'x', '+', 'x', 'x', '+', '+', 'x', 'x', '+', 'x', 'x', '+', '+', '+', '+', '+', 'x', '+', 'x', '+', 'x', 'x', 'x', '+', '+', '+', '+', 'x', '+', '+', 'x', 'x', '+', 'x', '+', '+', '+', '+', '+', 'x', 'x', '+', 'x', '+', '+', 'x', 'x', 'x', 'x', 'x', '+', 'x', '+', 'x', 'x', 'x', 'x', '+', '+', '+', 'x', '+', 'x', 'x', 'x', '+', 'x', '+', '+', '+', 'x', 'x', '+', '+', 'x', 'x', '+', '+', '+', '+', '+', '+', '+', 'x', 'x', '+', '+', '+', 'x', 'x', '+', '+', '+', 'x', '+', '+', '+', 'x', '+', '+', '+', '+', 'x', '+', 'x', '+', 'x', '+', 'x', 'x', '+', 'x', '+', 'x', 'x', '+', '+', '+', 'x', 'x', '+', 'x', '+', '+', 'x', 'x', '+', 'x', 'x', 'x', 'x', '+', '+', 'x', 'x', 'x', 'x', '+', 'x', 'x', '+', '+', '+', 'x', 'x', '+', 'x', 'x', '+', '+', '+', '+', '+', 'x', '+', 'x', '+', '+', '+', '+', 'x', '+', 'x', '+', 'x', '+', 'x', '+', 'x', 'x', 'x', 'x', '+', 'x', '+', '+', 'x', '+', '+', 'x', '+', 'x', '+', 'x', '+', 'x', '+', 'x', '+', 'x', '+', '+', 'x', 'x', '+', '+', 'x', 'x', '+', 'x', 'x', '+', '+', 'x', '+', 'x', '+', '+', 'x', '+', '+', 'x', 'x', '+', '+', '+', 'x', 'x', '+', '+', '+', 'x', 'x', 'x', '+', 'x', '+', '+', '+', '+', 'x', 'x', 'x', '+', '+', '+', 'x', '+', 'x', 'x', '+', '+', '+', 'x', 'x', 'x', 'x', 'x', '+', '+', 'x', '+', '+', '+', 'x', '+', 'x', '+', '+', 'x', '+', '+', '+', '+', '+', '+', 'x', '+', 'x', '+', 'x', 'x', '+', 'x', 'x', '+', '+', 'x', '+', '+', '+', '+', 'x', '+', '+', 'x', '+', 'x', 'x', 'x', 'x', '+', 'x', 'x', '+', 'x', '+', '+', '+', 'x', '+', '+', 'x', '+', 'x', '+', '+', '+', '+', 'x', 'x', '+', '+', '+', '+', '+', 'x', '+', 'x', '+', '+', '+', '+', '+', '+', '+', 'x', '+', 'x', '+', 'x', 'x', 'x', '+', '+', 'x', '+', '+', '+', 'x', 'x', '+', 'x', '+', '+', '+', 'x', '+', 'x', 'x', '+', 'x', 'x', '+', '+', 'x', 'x', 'x', 'x', '+', '+', 'x', 'x', 'x', 'x', '+', 'x', '+', 'x', '+', 'x', '+', '+', '+', '+', '+', '+', 'x', '+', 'x', 'x', 'x', '+', '+', '+', 'x', 'x', 'x', '+', '+', '+', 'x', '+', '+', 'x', '+', 'x', '+', 'x', '+', 'x', 'x', '+', 'x', '+', '+', '+', '+', '+', 'x', 'x', 'x', 'x', '+', '+', '+', 'x', 'x', '+', 'x', '+', '+', 'x', 'x', '+', 'x', '+', '+', 'x', '+', 'x', 'x', 'x', '+', '+', '+', '+', '+', 'x', 'x', '+', '+', '+', '+', 'x', 'x', '+', '+', 'x', 'x', '+', '+', '+', 'x', 'x', '+', '+', 'x', 'x', 'x', 'x', 'x', '+', 'x', '+', 'x', '+', 'x', '+', '+', '+', '+', '+', 'x', '+', 'x', '+', 'x', '+', 'x', '+', 'x', 'x', '+', 'x', 'x', '+', 'x', '+', '+', '+', 'x', 'x', 'x', 'x', '+', '+', 'x', 'x', 'x', '+', '+', '+', 'x', '+', '+', '+', '+', '+', '+', 'x', 'x', '+', '+', 'x', 'x', '+', 'x', '+', 'x', 'x', 'x', '+', '+', 'x', 'x', 'x', '+', 'x', 'x', 'x', 'x', '+', '+', '+', '+', '+', '+', 'x', '+', '+', '+', 'x', '+', '+', '+', 'x', 'x', '+', '+', 'x', '+', '+', 'x', '+', '+', '+', '+', '+', 'x', '+', 'x', '+', 'x', '+', 'x', '+', '+', '+', 'x', 'x', '+', 'x', '+', 'x', '+', 'x', 'x', '+', 'x', '+', '+', 'x', '+', '+', 'x', 'x', 'x', 'x', 'x', '+', '+', '+', '+', 'x', 'x', 'x', '+', 'x', '+'] final = 2114605261815340712424659413225647507317872952942366497800823462312932228799031989657646284020761432666257418566252521668 def rotate(q): # For diagonal basis measure return q * complex(0.707, -0.707) # recover initial bitstream bitstream = '' for i in range(LEN): # print(qubits[i] == '1j') if basis[i] == '+' and qubits[i] == 1j: bitstream += '0' elif basis[i] == '+' and qubits[i] == 1+0j: bitstream += '1' elif basis[i] == 'x' and qubits[i] == 0.707-0.707j: bitstream += '0' elif basis[i] == 'x' and qubits[i] == 0.707+0.707j: bitstream += '1' print(bitstream) # print(len(bitstream)) # len = 1024 measured_bits = '' for q, b in zip(qubits, basis): if b == 'x': q = rotate(q) probability_zero = round(pow(q.real, 2), 1) # if not correct, swap the two probability_one = round(pow(q.imag, 2), 1) measured_bits += str(np.random.choice(np.arange(0, 2), p=[probability_zero, probability_one])) print(measured_bits) # print(len(measured_bits)) # len = 1024 shared_key = '' for bit, tx_base, rx_base in zip(measured_bits, basis, my_basis): if tx_base == rx_base: shared_key += bit print(shared_key) print(len(shared_key)) flag = int(shared_key[:400],2) ^ int(final) flag_bin = hex(flag)[2:] for i in range(0,len(flag_bin),2): print(chr(int(flag_bin[i:i+2],16)),end='')
312.756757
11,241
0.339613
4,046
23,144
1.937963
0.019031
0.249713
0.373804
0.497386
0.896059
0.890065
0.890065
0.8893
0.888407
0.888024
0
0.257649
0.148419
23,144
73
11,242
317.041096
0.139987
0.009938
0
0.090909
0
0
0.091397
0
0
0
0
0
0
1
0.045455
false
0
0.022727
0.045455
0.113636
0.113636
0
0
1
null
1
1
1
1
1
1
1
1
1
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
14
b1b4ed7b4fc83b230470db985e6310c5fa696de3
149
py
Python
tests/test_comments.py
2m/isort
db1de6b1f2769cb8f2854ff468c0a74bfe271b40
[ "MIT" ]
null
null
null
tests/test_comments.py
2m/isort
db1de6b1f2769cb8f2854ff468c0a74bfe271b40
[ "MIT" ]
null
null
null
tests/test_comments.py
2m/isort
db1de6b1f2769cb8f2854ff468c0a74bfe271b40
[ "MIT" ]
null
null
null
from hypothesis_auto import auto_pytest_magic from isort import comments auto_pytest_magic(comments.parse) auto_pytest_magic(comments.add_to_line)
21.285714
45
0.879195
23
149
5.304348
0.521739
0.245902
0.368852
0.377049
0
0
0
0
0
0
0
0
0.080537
149
6
46
24.833333
0.890511
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
b1c12b5fb561855cd2a49acad86d4816d054cc19
105
py
Python
rq/r3.py
kumarisneha/task_queue
656907958d81d8781c422679308fb98a1863663c
[ "MIT" ]
null
null
null
rq/r3.py
kumarisneha/task_queue
656907958d81d8781c422679308fb98a1863663c
[ "MIT" ]
null
null
null
rq/r3.py
kumarisneha/task_queue
656907958d81d8781c422679308fb98a1863663c
[ "MIT" ]
null
null
null
from r1 import count_words_at_url import r2 result = r2.q.enqueue(count_words_at_url, 'http://nvie.com')
26.25
60
0.790476
20
105
3.85
0.7
0.25974
0.311688
0.38961
0
0
0
0
0
0
0
0.031579
0.095238
105
3
61
35
0.778947
0
0
0
0
0
0.142857
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
7
3cc7c1cbb707ba94e1ab090a67ade7242718ea52
214
py
Python
layer/computing/__init__.py
hslee1539/NN
8b60a858c1137785ef684dd548b008bcc46b8d6d
[ "MIT" ]
null
null
null
layer/computing/__init__.py
hslee1539/NN
8b60a858c1137785ef684dd548b008bcc46b8d6d
[ "MIT" ]
null
null
null
layer/computing/__init__.py
hslee1539/NN
8b60a858c1137785ef684dd548b008bcc46b8d6d
[ "MIT" ]
null
null
null
from . import affine_module from . import relu_module from . import sigmoid_module from . import softmax_module from . import batchnormalization_module from . import shift_module from . import cross_entropy_module
26.75
39
0.836449
29
214
5.896552
0.37931
0.409357
0.561404
0
0
0
0
0
0
0
0
0
0.130841
214
7
40
30.571429
0.919355
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
599b61d663261d26dd285bd09aa3698e7bde4e26
87
py
Python
Python practice/Mit opencourceware(2.7)/checkset.py
chiranjeevbitp/Python27new
d366efee57857402bae16cabf1df94c657490750
[ "bzip2-1.0.6" ]
null
null
null
Python practice/Mit opencourceware(2.7)/checkset.py
chiranjeevbitp/Python27new
d366efee57857402bae16cabf1df94c657490750
[ "bzip2-1.0.6" ]
null
null
null
Python practice/Mit opencourceware(2.7)/checkset.py
chiranjeevbitp/Python27new
d366efee57857402bae16cabf1df94c657490750
[ "bzip2-1.0.6" ]
null
null
null
mys1={1,2,'c'} mys2={1,'b','c'} print mys1-mys2 print mys1&mys2 print mys1|mys2
12.428571
17
0.609195
17
87
3.117647
0.411765
0.509434
0.735849
0.679245
0.735849
0.735849
0
0
0
0
0
0.152778
0.172414
87
6
18
14.5
0.583333
0
0
0
0
0
0.0375
0
0
0
0
0
0
0
null
null
0
0
null
null
0.6
1
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
8
ab7892b7a09e20ddd089b5c8ec1e974374696eed
9,600
py
Python
core/test_factories.py
UW-GAC/pie
89ae277f5ba1357580d78c3527f26200686308a6
[ "MIT" ]
null
null
null
core/test_factories.py
UW-GAC/pie
89ae277f5ba1357580d78c3527f26200686308a6
[ "MIT" ]
3
2020-01-02T20:17:06.000Z
2020-01-04T21:13:09.000Z
core/test_factories.py
UW-GAC/pie
89ae277f5ba1357580d78c3527f26200686308a6
[ "MIT" ]
1
2021-10-29T22:15:27.000Z
2021-10-29T22:15:27.000Z
"""Test the factory functions, which are used for testing.""" from django.contrib.auth import get_user_model from django.test import TestCase from profiles.models import Profile import trait_browser.models from . import factories from .build_test_db import build_test_db User = get_user_model() class UserFactoryTest(TestCase): def test_user_factory_build(self): """Test that a User instance is returned by UserFactory.build().""" user = factories.UserFactory.build() self.assertIsInstance(user, User) def test_user_factory_create(self): """Test that a User instance is returned by UserFactory.create().""" user = factories.UserFactory.create() self.assertIsInstance(user, User) def test_user_factory_build_batch(self): """Test that a User instance is returned by UserFactory.build_batch(5).""" users = factories.UserFactory.build_batch(5) for one in users: self.assertIsInstance(one, User) def test_user_factory_create_batch(self): """Test that a User instance is returned by UserFactory.create_batch(5).""" users = factories.UserFactory.create_batch(5) for one in users: self.assertIsInstance(one, User) def test_profile_created(self): """Creating a user automatically creates an associated Profile.""" users = factories.UserFactory.create_batch(5) for one in users: self.assertIsInstance(one.profile, Profile) class SuperUserFactoryTest(TestCase): def test_admin_user_factory_build(self): """Test that a User instance is returned by factories.SuperUserFactory.build().""" user = factories.SuperUserFactory.build() self.assertIsInstance(user, User) def test_admin_user_factory_create(self): """Test that a User instance is returned by factories.SuperUserFactory.create().""" user = factories.SuperUserFactory.create() self.assertIsInstance(user, User) def test_admin_user_factory_build_batch(self): """Test that a User instance is returned by factories.SuperUserFactory.build_batch(5).""" users = factories.SuperUserFactory.build_batch(5) for one in users: self.assertIsInstance(one, User) def test_admin_user_factory_create_batch(self): """Test that a User instance is returned by factories.SuperUserFactory.create_batch(5).""" users = factories.SuperUserFactory.create_batch(5) for one in users: self.assertIsInstance(one, User) def test_admin_user_factory_is_superuser(self): """Test that a User instance is returned by factories.SuperUserFactory.create().""" user = factories.SuperUserFactory.create() self.assertTrue(user.is_superuser) self.assertTrue(user.is_staff) class BuildTestDbTest(TestCase): def test_build_db_global_studies_error(self): """Raises ValueError for too small a value of n_global_studies.""" with self.assertRaises(ValueError): build_test_db( n_global_studies=1, n_subcohort_range=(2, 3), n_dataset_range=(3, 9), n_trait_range=(2, 16), n_enc_value_range=(2, 9)) def test_build_db_trait_range_error(self): """Raises ValueError for invalid values of n_trait_range.""" with self.assertRaises(ValueError): build_test_db( n_global_studies=3, n_subcohort_range=(2, 3), n_dataset_range=(3, 9), n_trait_range=(23, 16), n_enc_value_range=(2, 9)) def test_build_db_trait_range_error2(self): """Raises ValueError for invalid values of n_trait_range.""" with self.assertRaises(ValueError): build_test_db( n_global_studies=3, n_subcohort_range=(2, 3), n_dataset_range=(3, 9), n_trait_range=(1, 16), n_enc_value_range=(2, 9)) def test_build_db_dataset_range_error(self): """Raises ValueError for invalid values of n_dataset_range.""" with self.assertRaises(ValueError): build_test_db( n_global_studies=3, n_subcohort_range=(2, 3), n_dataset_range=(9, 3), n_trait_range=(22, 16), n_enc_value_range=(2, 9)) def test_build_db_n_tags_errors(self): """Raises ValueError for negative n_tags value.""" with self.assertRaises(ValueError): build_test_db( n_global_studies=3, n_subcohort_range=(2, 3), n_dataset_range=(3, 9), n_trait_range=(3, 16), n_enc_value_range=(2, 9), n_tags=-2) def test_build_db_n_taggedtrait_range(self): """Raises ValueError for invalid values of n_taggedtrait_range.""" with self.assertRaises(ValueError): build_test_db( n_global_studies=3, n_subcohort_range=(2, 3), n_dataset_range=(3, 9), n_trait_range=(3, 16), n_enc_value_range=(2, 9), n_tags=2, n_taggedtrait_range=(9, 3)) def test_build_db1(self): """Test that building a db of fake data works. Run the same test several times with different values.""" build_test_db( n_global_studies=3, n_subcohort_range=(2, 3), n_dataset_range=(3, 9), n_trait_range=(3, 16), n_enc_value_range=(2, 9)) # Make sure there are saved objects for each of the models. self.assertTrue(trait_browser.models.GlobalStudy.objects.count() > 0) self.assertTrue(trait_browser.models.Study.objects.count() > 0) self.assertTrue(trait_browser.models.Subcohort.objects.count() > 0) self.assertTrue(trait_browser.models.SourceStudyVersion.objects.count() > 0) self.assertTrue(trait_browser.models.SourceDataset.objects.count() > 0) self.assertTrue(trait_browser.models.SourceTrait.objects.count() > 0) self.assertTrue(trait_browser.models.SourceTraitEncodedValue.objects.count() > 0) self.assertTrue(trait_browser.models.HarmonizedTraitSet.objects.count() > 0) self.assertTrue(trait_browser.models.HarmonizedTrait.objects.count() > 0) self.assertTrue(trait_browser.models.HarmonizedTraitEncodedValue.objects.count() > 0) def test_build_db2(self): """Test that building a db of fake data works. Run the same test several times with different values.""" build_test_db( n_global_studies=10, n_subcohort_range=(2, 3), n_dataset_range=(3, 9), n_trait_range=(3, 16), n_enc_value_range=(2, 9)) # Make sure there are saved objects for each of the models. self.assertTrue(trait_browser.models.GlobalStudy.objects.count() > 0) self.assertTrue(trait_browser.models.Study.objects.count() > 0) self.assertTrue(trait_browser.models.Subcohort.objects.count() > 0) self.assertTrue(trait_browser.models.SourceStudyVersion.objects.count() > 0) self.assertTrue(trait_browser.models.SourceDataset.objects.count() > 0) self.assertTrue(trait_browser.models.SourceTrait.objects.count() > 0) self.assertTrue(trait_browser.models.SourceTraitEncodedValue.objects.count() > 0) self.assertTrue(trait_browser.models.HarmonizedTraitSet.objects.count() > 0) self.assertTrue(trait_browser.models.HarmonizedTrait.objects.count() > 0) self.assertTrue(trait_browser.models.HarmonizedTraitEncodedValue.objects.count() > 0) def test_build_db3(self): """Test that building a db of fake data works. Run the same test several times with different values.""" build_test_db( n_global_studies=3, n_subcohort_range=(1, 2), n_dataset_range=(1, 2), n_trait_range=(3, 4), n_enc_value_range=(1, 2)) # Make sure there are saved objects for each of the models. self.assertTrue(trait_browser.models.GlobalStudy.objects.count() > 0) self.assertTrue(trait_browser.models.Study.objects.count() > 0) self.assertTrue(trait_browser.models.Subcohort.objects.count() > 0) self.assertTrue(trait_browser.models.SourceStudyVersion.objects.count() > 0) self.assertTrue(trait_browser.models.SourceDataset.objects.count() > 0) self.assertTrue(trait_browser.models.SourceTrait.objects.count() > 0) self.assertTrue(trait_browser.models.SourceTraitEncodedValue.objects.count() > 0) self.assertTrue(trait_browser.models.HarmonizedTraitSet.objects.count() > 0) self.assertTrue(trait_browser.models.HarmonizedTrait.objects.count() > 0) self.assertTrue(trait_browser.models.HarmonizedTraitEncodedValue.objects.count() > 0) def test_build_db_defaults(self): """Test that building a db of fake data works with the default arg values.""" build_test_db() # Make sure there are saved objects for each of the models. self.assertTrue(trait_browser.models.GlobalStudy.objects.count() > 0) self.assertTrue(trait_browser.models.Study.objects.count() > 0) self.assertTrue(trait_browser.models.Subcohort.objects.count() > 0) self.assertTrue(trait_browser.models.SourceStudyVersion.objects.count() > 0) self.assertTrue(trait_browser.models.SourceDataset.objects.count() > 0) self.assertTrue(trait_browser.models.SourceTrait.objects.count() > 0) self.assertTrue(trait_browser.models.SourceTraitEncodedValue.objects.count() > 0) self.assertTrue(trait_browser.models.HarmonizedTraitSet.objects.count() > 0) self.assertTrue(trait_browser.models.HarmonizedTrait.objects.count() > 0) self.assertTrue(trait_browser.models.HarmonizedTraitEncodedValue.objects.count() > 0)
51.336898
112
0.697396
1,237
9,600
5.192401
0.097817
0.091546
0.1149
0.161918
0.867352
0.842441
0.840573
0.838082
0.821112
0.809279
0
0.019331
0.197083
9,600
186
113
51.612903
0.81396
0.178958
0
0.607692
0
0
0
0
0
0
0
0
0.438462
1
0.153846
false
0
0.046154
0
0.223077
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
8
aba8b8ae398bca97acff8eeb62103769a82ebd8b
261
py
Python
config.dist.py
lucashenning/ntag424-backend
bfa442969d82357b9e9fc482dfe1a32f0827709a
[ "MIT" ]
null
null
null
config.dist.py
lucashenning/ntag424-backend
bfa442969d82357b9e9fc482dfe1a32f0827709a
[ "MIT" ]
null
null
null
config.dist.py
lucashenning/ntag424-backend
bfa442969d82357b9e9fc482dfe1a32f0827709a
[ "MIT" ]
null
null
null
SDM_META_READ_KEY = b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" SDM_FILE_READ_KEY = b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" ENC_PICC_DATA_PARAM = "picc_data" ENC_FILE_DATA_PARAM = "enc" SDMMAC_PARAM = "cmac"
37.285714
87
0.758621
56
261
3.285714
0.232143
0.978261
1.369565
1.695652
0.608696
0.608696
0.608696
0.608696
0.608696
0.608696
0
0.261224
0.061303
261
6
88
43.5
0.489796
0
0
0
0
0.4
0.551724
0.490421
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
1
1
0
0
0
0
0
1
0
1
0
0
1
0
0
1
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
abb323e2ab377e5adb0944df30f1596c7114816d
262,358
py
Python
source/deepsecurity/models/system_settings.py
felipecosta09/cloudone-workload-controltower-lifecycle
7927c84d164058b034fc872701b5ee117641f4d1
[ "Apache-2.0" ]
1
2021-10-30T16:40:09.000Z
2021-10-30T16:40:09.000Z
source/deepsecurity/models/system_settings.py
felipecosta09/cloudone-workload-controltower-lifecycle
7927c84d164058b034fc872701b5ee117641f4d1
[ "Apache-2.0" ]
1
2021-07-28T20:19:03.000Z
2021-07-28T20:19:03.000Z
source/deepsecurity/models/system_settings.py
felipecosta09/cloudone-workload-controltower-lifecycle
7927c84d164058b034fc872701b5ee117641f4d1
[ "Apache-2.0" ]
1
2021-10-30T16:40:02.000Z
2021-10-30T16:40:02.000Z
# coding: utf-8 """ Trend Micro Deep Security API Copyright 2018 - 2020 Trend Micro Incorporated.<br/>Get protected, stay secured, and keep informed with Trend Micro Deep Security's new RESTful API. Access system data and manage security configurations to automate your security workflows and integrate Deep Security into your CI/CD pipeline. # noqa: E501 OpenAPI spec version: 12.5.841 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from deepsecurity.models.setting_value import SettingValue # noqa: F401,E501 class SystemSettings(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'platform_setting_saml_identity_provider_certificate_expiry_warning_days': 'SettingValue', 'platform_setting_update_agent_security_on_missing_deep_security_manager_enabled': 'SettingValue', 'platform_setting_ddan_manual_source_server_url': 'SettingValue', 'platform_setting_smart_protection_feedback_threat_detections_threshold': 'SettingValue', 'intrusion_prevention_setting_event_rank_severity_filter_medium': 'SettingValue', 'firewall_setting_intranet_connectivity_test_expected_content_regex': 'SettingValue', 'platform_setting_event_forwarding_sns_enabled': 'SettingValue', 'platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout': 'SettingValue', 'web_reputation_setting_event_rank_risk_blocked_by_administrator_rank': 'SettingValue', 'anti_malware_setting_event_email_recipients': 'SettingValue', 'firewall_setting_intranet_connectivity_test_url': 'SettingValue', 'platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled': 'SettingValue', 'platform_setting_exported_diagnostic_package_locale': 'SettingValue', 'intrusion_prevention_setting_event_rank_severity_filter_critical': 'SettingValue', 'platform_setting_demo_mode_enabled': 'SettingValue', 'platform_setting_trend_micro_xdr_common_log_receiver_url': 'SettingValue', 'platform_setting_managed_detect_response_company_guid': 'SettingValue', 'platform_setting_alert_default_email_address': 'SettingValue', 'platform_setting_agent_initiated_activation_reactivate_cloned_enabled': 'SettingValue', 'platform_setting_managed_detect_response_server_url': 'SettingValue', 'platform_setting_syslog_config_id': 'SettingValue', 'platform_setting_smtp_start_tls_enabled': 'SettingValue', 'platform_setting_user_password_require_letters_and_numbers_enabled': 'SettingValue', 'platform_setting_managed_detect_response_enabled': 'SettingValue', 'platform_setting_update_rules_policy_auto_apply_enabled': 'SettingValue', 'platform_setting_user_password_require_not_same_as_username_enabled': 'SettingValue', 'log_inspection_setting_event_rank_severity_medium': 'SettingValue', 'anti_malware_setting_retain_event_duration': 'SettingValue', 'platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled': 'SettingValue', 'firewall_setting_event_rank_severity_log_only': 'SettingValue', 'application_control_setting_retain_event_duration': 'SettingValue', 'platform_setting_windows_upgrade_on_activation_enabled': 'SettingValue', 'platform_setting_system_event_forwarding_snmp_port': 'SettingValue', 'firewall_setting_event_rank_severity_deny': 'SettingValue', 'intrusion_prevention_setting_event_rank_severity_filter_low': 'SettingValue', 'platform_setting_managed_detect_response_service_token': 'SettingValue', 'platform_setting_trend_micro_xdr_api_user': 'SettingValue', 'log_inspection_setting_retain_event_duration': 'SettingValue', 'platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled': 'SettingValue', 'anti_malware_setting_event_email_body_template': 'SettingValue', 'platform_setting_retain_security_updates_max': 'SettingValue', 'platform_setting_connected_threat_defense_control_manager_source_option': 'SettingValue', 'anti_malware_setting_event_email_enabled': 'SettingValue', 'platform_setting_recommendation_ongoing_scans_enabled': 'SettingValue', 'platform_setting_user_password_length_min': 'SettingValue', 'platform_setting_aws_manager_identity_use_instance_role_enabled': 'SettingValue', 'platform_setting_alert_agent_update_pending_threshold': 'SettingValue', 'platform_setting_user_password_require_special_characters_enabled': 'SettingValue', 'platform_setting_update_appliance_default_agent_version': 'SettingValue', 'platform_setting_system_event_forwarding_snmp_enabled': 'SettingValue', 'platform_setting_smtp_bounce_email_address': 'SettingValue', 'platform_setting_update_relay_security_support_agent9_and_earlier_enabled': 'SettingValue', 'platform_setting_managed_detect_response_proxy_id': 'SettingValue', 'platform_setting_trend_micro_xdr_log_server_url': 'SettingValue', 'platform_setting_inactive_agent_cleanup_enabled': 'SettingValue', 'platform_setting_user_session_idle_timeout': 'SettingValue', 'anti_malware_setting_event_email_subject': 'SettingValue', 'platform_setting_connected_threat_defense_control_manager_use_proxy_enabled': 'SettingValue', 'platform_setting_aws_manager_identity_access_key': 'SettingValue', 'platform_setting_connected_threat_defense_control_manager_proxy_id': 'SettingValue', 'platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled': 'SettingValue', 'platform_setting_connected_threat_defense_control_manager_manual_source_server_url': 'SettingValue', 'platform_setting_user_password_require_mixed_case_enabled': 'SettingValue', 'platform_setting_trend_micro_xdr_identity_provider_api_url': 'SettingValue', 'platform_setting_smart_protection_feedback_for_suspicious_file_enabled': 'SettingValue', 'platform_setting_smart_protection_feedback_industry_type': 'SettingValue', 'web_reputation_setting_retain_event_duration': 'SettingValue', 'integrity_monitoring_setting_event_rank_severity_medium': 'SettingValue', 'platform_setting_update_relay_security_all_regions_patterns_download_enabled': 'SettingValue', 'platform_setting_ddan_submission_enabled': 'SettingValue', 'web_reputation_setting_event_rank_risk_suspicious': 'SettingValue', 'integrity_monitoring_setting_event_rank_severity_critical': 'SettingValue', 'platform_setting_smtp_from_email_address': 'SettingValue', 'firewall_setting_global_stateful_config_id': 'SettingValue', 'platform_setting_event_forwarding_sns_topic_arn': 'SettingValue', 'firewall_setting_internet_connectivity_test_expected_content_regex': 'SettingValue', 'platform_setting_connected_threat_defense_control_manager_manual_source_api_key': 'SettingValue', 'platform_setting_update_security_primary_source_mode': 'SettingValue', 'web_reputation_setting_event_rank_risk_dangerous': 'SettingValue', 'platform_setting_user_hide_unlicensed_modules_enabled': 'SettingValue', 'platform_setting_capture_encrypted_traffic_enabled': 'SettingValue', 'platform_setting_retain_system_event_duration': 'SettingValue', 'platform_setting_user_password_expiry': 'SettingValue', 'platform_setting_smart_protection_feedback_enabled': 'SettingValue', 'integrity_monitoring_setting_retain_event_duration': 'SettingValue', 'log_inspection_setting_event_rank_severity_critical': 'SettingValue', 'platform_setting_ddan_proxy_id': 'SettingValue', 'platform_setting_agent_initiated_activation_within_ip_list_id': 'SettingValue', 'platform_setting_update_security_primary_source_url': 'SettingValue', 'platform_setting_agentless_vcloud_protection_enabled': 'SettingValue', 'platform_setting_linux_upgrade_on_activation_enabled': 'SettingValue', 'platform_setting_trend_micro_xdr_enabled': 'SettingValue', 'platform_setting_active_sessions_max_exceeded_action': 'SettingValue', 'platform_setting_update_hostname_on_ip_change_enabled': 'SettingValue', 'log_inspection_setting_event_rank_severity_high': 'SettingValue', 'platform_setting_smtp_requires_authentication_enabled': 'SettingValue', 'platform_setting_active_sessions_max': 'SettingValue', 'platform_setting_aws_external_id_retrieval_enabled': 'SettingValue', 'log_inspection_setting_event_rank_severity_low': 'SettingValue', 'platform_setting_smtp_username': 'SettingValue', 'platform_setting_event_forwarding_sns_advanced_config_enabled': 'SettingValue', 'firewall_setting_internet_connectivity_test_interval': 'SettingValue', 'platform_setting_whois_url': 'SettingValue', 'platform_setting_ddan_source_option': 'SettingValue', 'platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled': 'SettingValue', 'platform_setting_exported_file_character_encoding': 'SettingValue', 'platform_setting_user_session_duration_max': 'SettingValue', 'platform_setting_update_software_alternate_update_server_urls': 'SettingValue', 'platform_setting_retain_counters_duration': 'SettingValue', 'platform_setting_smart_protection_feedback_interval': 'SettingValue', 'platform_setting_system_event_forwarding_snmp_address': 'SettingValue', 'platform_setting_smtp_server_address': 'SettingValue', 'platform_setting_smtp_password': 'SettingValue', 'platform_setting_event_forwarding_sns_config_json': 'SettingValue', 'firewall_setting_retain_event_duration': 'SettingValue', 'web_reputation_setting_event_rank_risk_untested': 'SettingValue', 'platform_setting_managed_detect_response_use_proxy_enabled': 'SettingValue', 'platform_setting_event_forwarding_sns_secret_key': 'SettingValue', 'platform_setting_aws_manager_identity_secret_key': 'SettingValue', 'web_reputation_setting_event_rank_risk_highly_suspicious': 'SettingValue', 'platform_setting_user_password_expiry_send_email_enabled': 'SettingValue', 'platform_setting_user_sign_in_attempts_allowed_number': 'SettingValue', 'platform_setting_ddan_use_proxy_enabled': 'SettingValue', 'platform_setting_agent_initiated_activation_enabled': 'SettingValue', 'platform_setting_smart_protection_feedback_bandwidth_max_kbytes': 'SettingValue', 'firewall_setting_event_rank_severity_packet_rejection': 'SettingValue', 'platform_setting_managed_detect_response_use_primary_tenant_settings_enabled': 'SettingValue', 'platform_setting_event_forwarding_sns_access_key': 'SettingValue', 'platform_setting_agent_initiated_activation_specify_hostname_enabled': 'SettingValue', 'platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled': 'SettingValue', 'platform_setting_inactive_agent_cleanup_duration': 'SettingValue', 'platform_setting_agent_initiated_activation_duplicate_hostname_mode': 'SettingValue', 'platform_setting_agent_initiated_activation_reactivate_unknown_enabled': 'SettingValue', 'platform_setting_agent_initiated_activation_policy_id': 'SettingValue', 'platform_setting_trend_micro_xdr_api_server_url': 'SettingValue', 'platform_setting_retain_agent_installers_per_platform_max': 'SettingValue', 'application_control_setting_serve_rulesets_from_relays_enabled': 'SettingValue', 'integrity_monitoring_setting_event_rank_severity_high': 'SettingValue', 'platform_setting_saml_retain_inactive_external_administrators_duration': 'SettingValue', 'intrusion_prevention_setting_retain_event_duration': 'SettingValue', 'firewall_setting_internet_connectivity_test_url': 'SettingValue', 'platform_setting_proxy_agent_update_proxy_id': 'SettingValue', 'platform_setting_ddan_auto_submission_enabled': 'SettingValue', 'platform_setting_ddan_manual_source_api_key': 'SettingValue', 'intrusion_prevention_setting_event_rank_severity_filter_error': 'SettingValue', 'intrusion_prevention_setting_event_rank_severity_filter_high': 'SettingValue', 'platform_setting_trend_micro_xdr_api_key': 'SettingValue', 'integrity_monitoring_setting_event_rank_severity_low': 'SettingValue', 'platform_setting_trend_micro_xdr_company_id': 'SettingValue' } attribute_map = { 'platform_setting_saml_identity_provider_certificate_expiry_warning_days': 'platformSettingSamlIdentityProviderCertificateExpiryWarningDays', 'platform_setting_update_agent_security_on_missing_deep_security_manager_enabled': 'platformSettingUpdateAgentSecurityOnMissingDeepSecurityManagerEnabled', 'platform_setting_ddan_manual_source_server_url': 'platformSettingDdanManualSourceServerUrl', 'platform_setting_smart_protection_feedback_threat_detections_threshold': 'platformSettingSmartProtectionFeedbackThreatDetectionsThreshold', 'intrusion_prevention_setting_event_rank_severity_filter_medium': 'intrusionPreventionSettingEventRankSeverityFilterMedium', 'firewall_setting_intranet_connectivity_test_expected_content_regex': 'firewallSettingIntranetConnectivityTestExpectedContentRegex', 'platform_setting_event_forwarding_sns_enabled': 'platformSettingEventForwardingSnsEnabled', 'platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout': 'platformSettingTenantAutoRevokeImpersonationByPrimaryTenantTimeout', 'web_reputation_setting_event_rank_risk_blocked_by_administrator_rank': 'webReputationSettingEventRankRiskBlockedByAdministratorRank', 'anti_malware_setting_event_email_recipients': 'antiMalwareSettingEventEmailRecipients', 'firewall_setting_intranet_connectivity_test_url': 'firewallSettingIntranetConnectivityTestUrl', 'platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled': 'platformSettingTenantUseDefaultRelayGroupFromPrimaryTenantEnabled', 'platform_setting_exported_diagnostic_package_locale': 'platformSettingExportedDiagnosticPackageLocale', 'intrusion_prevention_setting_event_rank_severity_filter_critical': 'intrusionPreventionSettingEventRankSeverityFilterCritical', 'platform_setting_demo_mode_enabled': 'platformSettingDemoModeEnabled', 'platform_setting_trend_micro_xdr_common_log_receiver_url': 'platformSettingTrendMicroXdrCommonLogReceiverUrl', 'platform_setting_managed_detect_response_company_guid': 'platformSettingManagedDetectResponseCompanyGuid', 'platform_setting_alert_default_email_address': 'platformSettingAlertDefaultEmailAddress', 'platform_setting_agent_initiated_activation_reactivate_cloned_enabled': 'platformSettingAgentInitiatedActivationReactivateClonedEnabled', 'platform_setting_managed_detect_response_server_url': 'platformSettingManagedDetectResponseServerUrl', 'platform_setting_syslog_config_id': 'platformSettingSyslogConfigId', 'platform_setting_smtp_start_tls_enabled': 'platformSettingSmtpStartTlsEnabled', 'platform_setting_user_password_require_letters_and_numbers_enabled': 'platformSettingUserPasswordRequireLettersAndNumbersEnabled', 'platform_setting_managed_detect_response_enabled': 'platformSettingManagedDetectResponseEnabled', 'platform_setting_update_rules_policy_auto_apply_enabled': 'platformSettingUpdateRulesPolicyAutoApplyEnabled', 'platform_setting_user_password_require_not_same_as_username_enabled': 'platformSettingUserPasswordRequireNotSameAsUsernameEnabled', 'log_inspection_setting_event_rank_severity_medium': 'logInspectionSettingEventRankSeverityMedium', 'anti_malware_setting_retain_event_duration': 'antiMalwareSettingRetainEventDuration', 'platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled': 'platformSettingUpdateAgentSecurityContactPrimarySourceOnMissingRelayEnabled', 'firewall_setting_event_rank_severity_log_only': 'firewallSettingEventRankSeverityLogOnly', 'application_control_setting_retain_event_duration': 'applicationControlSettingRetainEventDuration', 'platform_setting_windows_upgrade_on_activation_enabled': 'platformSettingWindowsUpgradeOnActivationEnabled', 'platform_setting_system_event_forwarding_snmp_port': 'platformSettingSystemEventForwardingSnmpPort', 'firewall_setting_event_rank_severity_deny': 'firewallSettingEventRankSeverityDeny', 'intrusion_prevention_setting_event_rank_severity_filter_low': 'intrusionPreventionSettingEventRankSeverityFilterLow', 'platform_setting_managed_detect_response_service_token': 'platformSettingManagedDetectResponseServiceToken', 'platform_setting_trend_micro_xdr_api_user': 'platformSettingTrendMicroXdrApiUser', 'log_inspection_setting_retain_event_duration': 'logInspectionSettingRetainEventDuration', 'platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled': 'platformSettingTenantAutoRevokeImpersonationByPrimaryTenantEnabled', 'anti_malware_setting_event_email_body_template': 'antiMalwareSettingEventEmailBodyTemplate', 'platform_setting_retain_security_updates_max': 'platformSettingRetainSecurityUpdatesMax', 'platform_setting_connected_threat_defense_control_manager_source_option': 'platformSettingConnectedThreatDefenseControlManagerSourceOption', 'anti_malware_setting_event_email_enabled': 'antiMalwareSettingEventEmailEnabled', 'platform_setting_recommendation_ongoing_scans_enabled': 'platformSettingRecommendationOngoingScansEnabled', 'platform_setting_user_password_length_min': 'platformSettingUserPasswordLengthMin', 'platform_setting_aws_manager_identity_use_instance_role_enabled': 'platformSettingAwsManagerIdentityUseInstanceRoleEnabled', 'platform_setting_alert_agent_update_pending_threshold': 'platformSettingAlertAgentUpdatePendingThreshold', 'platform_setting_user_password_require_special_characters_enabled': 'platformSettingUserPasswordRequireSpecialCharactersEnabled', 'platform_setting_update_appliance_default_agent_version': 'platformSettingUpdateApplianceDefaultAgentVersion', 'platform_setting_system_event_forwarding_snmp_enabled': 'platformSettingSystemEventForwardingSnmpEnabled', 'platform_setting_smtp_bounce_email_address': 'platformSettingSmtpBounceEmailAddress', 'platform_setting_update_relay_security_support_agent9_and_earlier_enabled': 'platformSettingUpdateRelaySecuritySupportAgent9AndEarlierEnabled', 'platform_setting_managed_detect_response_proxy_id': 'platformSettingManagedDetectResponseProxyId', 'platform_setting_trend_micro_xdr_log_server_url': 'platformSettingTrendMicroXdrLogServerUrl', 'platform_setting_inactive_agent_cleanup_enabled': 'platformSettingInactiveAgentCleanupEnabled', 'platform_setting_user_session_idle_timeout': 'platformSettingUserSessionIdleTimeout', 'anti_malware_setting_event_email_subject': 'antiMalwareSettingEventEmailSubject', 'platform_setting_connected_threat_defense_control_manager_use_proxy_enabled': 'platformSettingConnectedThreatDefenseControlManagerUseProxyEnabled', 'platform_setting_aws_manager_identity_access_key': 'platformSettingAwsManagerIdentityAccessKey', 'platform_setting_connected_threat_defense_control_manager_proxy_id': 'platformSettingConnectedThreatDefenseControlManagerProxyId', 'platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled': 'platformSettingTenantAllowImpersonationByPrimaryTenantEnabled', 'platform_setting_connected_threat_defense_control_manager_manual_source_server_url': 'platformSettingConnectedThreatDefenseControlManagerManualSourceServerUrl', 'platform_setting_user_password_require_mixed_case_enabled': 'platformSettingUserPasswordRequireMixedCaseEnabled', 'platform_setting_trend_micro_xdr_identity_provider_api_url': 'platformSettingTrendMicroXdrIdentityProviderApiUrl', 'platform_setting_smart_protection_feedback_for_suspicious_file_enabled': 'platformSettingSmartProtectionFeedbackForSuspiciousFileEnabled', 'platform_setting_smart_protection_feedback_industry_type': 'platformSettingSmartProtectionFeedbackIndustryType', 'web_reputation_setting_retain_event_duration': 'webReputationSettingRetainEventDuration', 'integrity_monitoring_setting_event_rank_severity_medium': 'integrityMonitoringSettingEventRankSeverityMedium', 'platform_setting_update_relay_security_all_regions_patterns_download_enabled': 'platformSettingUpdateRelaySecurityAllRegionsPatternsDownloadEnabled', 'platform_setting_ddan_submission_enabled': 'platformSettingDdanSubmissionEnabled', 'web_reputation_setting_event_rank_risk_suspicious': 'webReputationSettingEventRankRiskSuspicious', 'integrity_monitoring_setting_event_rank_severity_critical': 'integrityMonitoringSettingEventRankSeverityCritical', 'platform_setting_smtp_from_email_address': 'platformSettingSmtpFromEmailAddress', 'firewall_setting_global_stateful_config_id': 'firewallSettingGlobalStatefulConfigId', 'platform_setting_event_forwarding_sns_topic_arn': 'platformSettingEventForwardingSnsTopicArn', 'firewall_setting_internet_connectivity_test_expected_content_regex': 'firewallSettingInternetConnectivityTestExpectedContentRegex', 'platform_setting_connected_threat_defense_control_manager_manual_source_api_key': 'platformSettingConnectedThreatDefenseControlManagerManualSourceApiKey', 'platform_setting_update_security_primary_source_mode': 'platformSettingUpdateSecurityPrimarySourceMode', 'web_reputation_setting_event_rank_risk_dangerous': 'webReputationSettingEventRankRiskDangerous', 'platform_setting_user_hide_unlicensed_modules_enabled': 'platformSettingUserHideUnlicensedModulesEnabled', 'platform_setting_capture_encrypted_traffic_enabled': 'platformSettingCaptureEncryptedTrafficEnabled', 'platform_setting_retain_system_event_duration': 'platformSettingRetainSystemEventDuration', 'platform_setting_user_password_expiry': 'platformSettingUserPasswordExpiry', 'platform_setting_smart_protection_feedback_enabled': 'platformSettingSmartProtectionFeedbackEnabled', 'integrity_monitoring_setting_retain_event_duration': 'integrityMonitoringSettingRetainEventDuration', 'log_inspection_setting_event_rank_severity_critical': 'logInspectionSettingEventRankSeverityCritical', 'platform_setting_ddan_proxy_id': 'platformSettingDdanProxyId', 'platform_setting_agent_initiated_activation_within_ip_list_id': 'platformSettingAgentInitiatedActivationWithinIpListId', 'platform_setting_update_security_primary_source_url': 'platformSettingUpdateSecurityPrimarySourceUrl', 'platform_setting_agentless_vcloud_protection_enabled': 'platformSettingAgentlessVcloudProtectionEnabled', 'platform_setting_linux_upgrade_on_activation_enabled': 'platformSettingLinuxUpgradeOnActivationEnabled', 'platform_setting_trend_micro_xdr_enabled': 'platformSettingTrendMicroXdrEnabled', 'platform_setting_active_sessions_max_exceeded_action': 'platformSettingActiveSessionsMaxExceededAction', 'platform_setting_update_hostname_on_ip_change_enabled': 'platformSettingUpdateHostnameOnIpChangeEnabled', 'log_inspection_setting_event_rank_severity_high': 'logInspectionSettingEventRankSeverityHigh', 'platform_setting_smtp_requires_authentication_enabled': 'platformSettingSmtpRequiresAuthenticationEnabled', 'platform_setting_active_sessions_max': 'platformSettingActiveSessionsMax', 'platform_setting_aws_external_id_retrieval_enabled': 'platformSettingAwsExternalIdRetrievalEnabled', 'log_inspection_setting_event_rank_severity_low': 'logInspectionSettingEventRankSeverityLow', 'platform_setting_smtp_username': 'platformSettingSmtpUsername', 'platform_setting_event_forwarding_sns_advanced_config_enabled': 'platformSettingEventForwardingSnsAdvancedConfigEnabled', 'firewall_setting_internet_connectivity_test_interval': 'firewallSettingInternetConnectivityTestInterval', 'platform_setting_whois_url': 'platformSettingWhoisUrl', 'platform_setting_ddan_source_option': 'platformSettingDdanSourceOption', 'platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled': 'platformSettingConnectedThreatDefenseControlManagerSuspiciousObjectListComparisonEnabled', 'platform_setting_exported_file_character_encoding': 'platformSettingExportedFileCharacterEncoding', 'platform_setting_user_session_duration_max': 'platformSettingUserSessionDurationMax', 'platform_setting_update_software_alternate_update_server_urls': 'platformSettingUpdateSoftwareAlternateUpdateServerUrls', 'platform_setting_retain_counters_duration': 'platformSettingRetainCountersDuration', 'platform_setting_smart_protection_feedback_interval': 'platformSettingSmartProtectionFeedbackInterval', 'platform_setting_system_event_forwarding_snmp_address': 'platformSettingSystemEventForwardingSnmpAddress', 'platform_setting_smtp_server_address': 'platformSettingSmtpServerAddress', 'platform_setting_smtp_password': 'platformSettingSmtpPassword', 'platform_setting_event_forwarding_sns_config_json': 'platformSettingEventForwardingSnsConfigJson', 'firewall_setting_retain_event_duration': 'firewallSettingRetainEventDuration', 'web_reputation_setting_event_rank_risk_untested': 'webReputationSettingEventRankRiskUntested', 'platform_setting_managed_detect_response_use_proxy_enabled': 'platformSettingManagedDetectResponseUseProxyEnabled', 'platform_setting_event_forwarding_sns_secret_key': 'platformSettingEventForwardingSnsSecretKey', 'platform_setting_aws_manager_identity_secret_key': 'platformSettingAwsManagerIdentitySecretKey', 'web_reputation_setting_event_rank_risk_highly_suspicious': 'webReputationSettingEventRankRiskHighlySuspicious', 'platform_setting_user_password_expiry_send_email_enabled': 'platformSettingUserPasswordExpirySendEmailEnabled', 'platform_setting_user_sign_in_attempts_allowed_number': 'platformSettingUserSignInAttemptsAllowedNumber', 'platform_setting_ddan_use_proxy_enabled': 'platformSettingDdanUseProxyEnabled', 'platform_setting_agent_initiated_activation_enabled': 'platformSettingAgentInitiatedActivationEnabled', 'platform_setting_smart_protection_feedback_bandwidth_max_kbytes': 'platformSettingSmartProtectionFeedbackBandwidthMaxKbytes', 'firewall_setting_event_rank_severity_packet_rejection': 'firewallSettingEventRankSeverityPacketRejection', 'platform_setting_managed_detect_response_use_primary_tenant_settings_enabled': 'platformSettingManagedDetectResponseUsePrimaryTenantSettingsEnabled', 'platform_setting_event_forwarding_sns_access_key': 'platformSettingEventForwardingSnsAccessKey', 'platform_setting_agent_initiated_activation_specify_hostname_enabled': 'platformSettingAgentInitiatedActivationSpecifyHostnameEnabled', 'platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled': 'platformSettingConnectedThreatDefensesUsePrimaryTenantServerSettingsEnabled', 'platform_setting_inactive_agent_cleanup_duration': 'platformSettingInactiveAgentCleanupDuration', 'platform_setting_agent_initiated_activation_duplicate_hostname_mode': 'platformSettingAgentInitiatedActivationDuplicateHostnameMode', 'platform_setting_agent_initiated_activation_reactivate_unknown_enabled': 'platformSettingAgentInitiatedActivationReactivateUnknownEnabled', 'platform_setting_agent_initiated_activation_policy_id': 'platformSettingAgentInitiatedActivationPolicyId', 'platform_setting_trend_micro_xdr_api_server_url': 'platformSettingTrendMicroXdrApiServerUrl', 'platform_setting_retain_agent_installers_per_platform_max': 'platformSettingRetainAgentInstallersPerPlatformMax', 'application_control_setting_serve_rulesets_from_relays_enabled': 'applicationControlSettingServeRulesetsFromRelaysEnabled', 'integrity_monitoring_setting_event_rank_severity_high': 'integrityMonitoringSettingEventRankSeverityHigh', 'platform_setting_saml_retain_inactive_external_administrators_duration': 'platformSettingSamlRetainInactiveExternalAdministratorsDuration', 'intrusion_prevention_setting_retain_event_duration': 'intrusionPreventionSettingRetainEventDuration', 'firewall_setting_internet_connectivity_test_url': 'firewallSettingInternetConnectivityTestUrl', 'platform_setting_proxy_agent_update_proxy_id': 'platformSettingProxyAgentUpdateProxyId', 'platform_setting_ddan_auto_submission_enabled': 'platformSettingDdanAutoSubmissionEnabled', 'platform_setting_ddan_manual_source_api_key': 'platformSettingDdanManualSourceApiKey', 'intrusion_prevention_setting_event_rank_severity_filter_error': 'intrusionPreventionSettingEventRankSeverityFilterError', 'intrusion_prevention_setting_event_rank_severity_filter_high': 'intrusionPreventionSettingEventRankSeverityFilterHigh', 'platform_setting_trend_micro_xdr_api_key': 'platformSettingTrendMicroXdrApiKey', 'integrity_monitoring_setting_event_rank_severity_low': 'integrityMonitoringSettingEventRankSeverityLow', 'platform_setting_trend_micro_xdr_company_id': 'platformSettingTrendMicroXdrCompanyId' } def __init__(self, platform_setting_saml_identity_provider_certificate_expiry_warning_days=None, platform_setting_update_agent_security_on_missing_deep_security_manager_enabled=None, platform_setting_ddan_manual_source_server_url=None, platform_setting_smart_protection_feedback_threat_detections_threshold=None, intrusion_prevention_setting_event_rank_severity_filter_medium=None, firewall_setting_intranet_connectivity_test_expected_content_regex=None, platform_setting_event_forwarding_sns_enabled=None, platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout=None, web_reputation_setting_event_rank_risk_blocked_by_administrator_rank=None, anti_malware_setting_event_email_recipients=None, firewall_setting_intranet_connectivity_test_url=None, platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled=None, platform_setting_exported_diagnostic_package_locale=None, intrusion_prevention_setting_event_rank_severity_filter_critical=None, platform_setting_demo_mode_enabled=None, platform_setting_trend_micro_xdr_common_log_receiver_url=None, platform_setting_managed_detect_response_company_guid=None, platform_setting_alert_default_email_address=None, platform_setting_agent_initiated_activation_reactivate_cloned_enabled=None, platform_setting_managed_detect_response_server_url=None, platform_setting_syslog_config_id=None, platform_setting_smtp_start_tls_enabled=None, platform_setting_user_password_require_letters_and_numbers_enabled=None, platform_setting_managed_detect_response_enabled=None, platform_setting_update_rules_policy_auto_apply_enabled=None, platform_setting_user_password_require_not_same_as_username_enabled=None, log_inspection_setting_event_rank_severity_medium=None, anti_malware_setting_retain_event_duration=None, platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled=None, firewall_setting_event_rank_severity_log_only=None, application_control_setting_retain_event_duration=None, platform_setting_windows_upgrade_on_activation_enabled=None, platform_setting_system_event_forwarding_snmp_port=None, firewall_setting_event_rank_severity_deny=None, intrusion_prevention_setting_event_rank_severity_filter_low=None, platform_setting_managed_detect_response_service_token=None, platform_setting_trend_micro_xdr_api_user=None, log_inspection_setting_retain_event_duration=None, platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled=None, anti_malware_setting_event_email_body_template=None, platform_setting_retain_security_updates_max=None, platform_setting_connected_threat_defense_control_manager_source_option=None, anti_malware_setting_event_email_enabled=None, platform_setting_recommendation_ongoing_scans_enabled=None, platform_setting_user_password_length_min=None, platform_setting_aws_manager_identity_use_instance_role_enabled=None, platform_setting_alert_agent_update_pending_threshold=None, platform_setting_user_password_require_special_characters_enabled=None, platform_setting_update_appliance_default_agent_version=None, platform_setting_system_event_forwarding_snmp_enabled=None, platform_setting_smtp_bounce_email_address=None, platform_setting_update_relay_security_support_agent9_and_earlier_enabled=None, platform_setting_managed_detect_response_proxy_id=None, platform_setting_trend_micro_xdr_log_server_url=None, platform_setting_inactive_agent_cleanup_enabled=None, platform_setting_user_session_idle_timeout=None, anti_malware_setting_event_email_subject=None, platform_setting_connected_threat_defense_control_manager_use_proxy_enabled=None, platform_setting_aws_manager_identity_access_key=None, platform_setting_connected_threat_defense_control_manager_proxy_id=None, platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled=None, platform_setting_connected_threat_defense_control_manager_manual_source_server_url=None, platform_setting_user_password_require_mixed_case_enabled=None, platform_setting_trend_micro_xdr_identity_provider_api_url=None, platform_setting_smart_protection_feedback_for_suspicious_file_enabled=None, platform_setting_smart_protection_feedback_industry_type=None, web_reputation_setting_retain_event_duration=None, integrity_monitoring_setting_event_rank_severity_medium=None, platform_setting_update_relay_security_all_regions_patterns_download_enabled=None, platform_setting_ddan_submission_enabled=None, web_reputation_setting_event_rank_risk_suspicious=None, integrity_monitoring_setting_event_rank_severity_critical=None, platform_setting_smtp_from_email_address=None, firewall_setting_global_stateful_config_id=None, platform_setting_event_forwarding_sns_topic_arn=None, firewall_setting_internet_connectivity_test_expected_content_regex=None, platform_setting_connected_threat_defense_control_manager_manual_source_api_key=None, platform_setting_update_security_primary_source_mode=None, web_reputation_setting_event_rank_risk_dangerous=None, platform_setting_user_hide_unlicensed_modules_enabled=None, platform_setting_capture_encrypted_traffic_enabled=None, platform_setting_retain_system_event_duration=None, platform_setting_user_password_expiry=None, platform_setting_smart_protection_feedback_enabled=None, integrity_monitoring_setting_retain_event_duration=None, log_inspection_setting_event_rank_severity_critical=None, platform_setting_ddan_proxy_id=None, platform_setting_agent_initiated_activation_within_ip_list_id=None, platform_setting_update_security_primary_source_url=None, platform_setting_agentless_vcloud_protection_enabled=None, platform_setting_linux_upgrade_on_activation_enabled=None, platform_setting_trend_micro_xdr_enabled=None, platform_setting_active_sessions_max_exceeded_action=None, platform_setting_update_hostname_on_ip_change_enabled=None, log_inspection_setting_event_rank_severity_high=None, platform_setting_smtp_requires_authentication_enabled=None, platform_setting_active_sessions_max=None, platform_setting_aws_external_id_retrieval_enabled=None, log_inspection_setting_event_rank_severity_low=None, platform_setting_smtp_username=None, platform_setting_event_forwarding_sns_advanced_config_enabled=None, firewall_setting_internet_connectivity_test_interval=None, platform_setting_whois_url=None, platform_setting_ddan_source_option=None, platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled=None, platform_setting_exported_file_character_encoding=None, platform_setting_user_session_duration_max=None, platform_setting_update_software_alternate_update_server_urls=None, platform_setting_retain_counters_duration=None, platform_setting_smart_protection_feedback_interval=None, platform_setting_system_event_forwarding_snmp_address=None, platform_setting_smtp_server_address=None, platform_setting_smtp_password=None, platform_setting_event_forwarding_sns_config_json=None, firewall_setting_retain_event_duration=None, web_reputation_setting_event_rank_risk_untested=None, platform_setting_managed_detect_response_use_proxy_enabled=None, platform_setting_event_forwarding_sns_secret_key=None, platform_setting_aws_manager_identity_secret_key=None, web_reputation_setting_event_rank_risk_highly_suspicious=None, platform_setting_user_password_expiry_send_email_enabled=None, platform_setting_user_sign_in_attempts_allowed_number=None, platform_setting_ddan_use_proxy_enabled=None, platform_setting_agent_initiated_activation_enabled=None, platform_setting_smart_protection_feedback_bandwidth_max_kbytes=None, firewall_setting_event_rank_severity_packet_rejection=None, platform_setting_managed_detect_response_use_primary_tenant_settings_enabled=None, platform_setting_event_forwarding_sns_access_key=None, platform_setting_agent_initiated_activation_specify_hostname_enabled=None, platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled=None, platform_setting_inactive_agent_cleanup_duration=None, platform_setting_agent_initiated_activation_duplicate_hostname_mode=None, platform_setting_agent_initiated_activation_reactivate_unknown_enabled=None, platform_setting_agent_initiated_activation_policy_id=None, platform_setting_trend_micro_xdr_api_server_url=None, platform_setting_retain_agent_installers_per_platform_max=None, application_control_setting_serve_rulesets_from_relays_enabled=None, integrity_monitoring_setting_event_rank_severity_high=None, platform_setting_saml_retain_inactive_external_administrators_duration=None, intrusion_prevention_setting_retain_event_duration=None, firewall_setting_internet_connectivity_test_url=None, platform_setting_proxy_agent_update_proxy_id=None, platform_setting_ddan_auto_submission_enabled=None, platform_setting_ddan_manual_source_api_key=None, intrusion_prevention_setting_event_rank_severity_filter_error=None, intrusion_prevention_setting_event_rank_severity_filter_high=None, platform_setting_trend_micro_xdr_api_key=None, integrity_monitoring_setting_event_rank_severity_low=None, platform_setting_trend_micro_xdr_company_id=None): # noqa: E501 """SystemSettings - a model defined in Swagger""" # noqa: E501 self._platform_setting_saml_identity_provider_certificate_expiry_warning_days = None self._platform_setting_update_agent_security_on_missing_deep_security_manager_enabled = None self._platform_setting_ddan_manual_source_server_url = None self._platform_setting_smart_protection_feedback_threat_detections_threshold = None self._intrusion_prevention_setting_event_rank_severity_filter_medium = None self._firewall_setting_intranet_connectivity_test_expected_content_regex = None self._platform_setting_event_forwarding_sns_enabled = None self._platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout = None self._web_reputation_setting_event_rank_risk_blocked_by_administrator_rank = None self._anti_malware_setting_event_email_recipients = None self._firewall_setting_intranet_connectivity_test_url = None self._platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled = None self._platform_setting_exported_diagnostic_package_locale = None self._intrusion_prevention_setting_event_rank_severity_filter_critical = None self._platform_setting_demo_mode_enabled = None self._platform_setting_trend_micro_xdr_common_log_receiver_url = None self._platform_setting_managed_detect_response_company_guid = None self._platform_setting_alert_default_email_address = None self._platform_setting_agent_initiated_activation_reactivate_cloned_enabled = None self._platform_setting_managed_detect_response_server_url = None self._platform_setting_syslog_config_id = None self._platform_setting_smtp_start_tls_enabled = None self._platform_setting_user_password_require_letters_and_numbers_enabled = None self._platform_setting_managed_detect_response_enabled = None self._platform_setting_update_rules_policy_auto_apply_enabled = None self._platform_setting_user_password_require_not_same_as_username_enabled = None self._log_inspection_setting_event_rank_severity_medium = None self._anti_malware_setting_retain_event_duration = None self._platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled = None self._firewall_setting_event_rank_severity_log_only = None self._application_control_setting_retain_event_duration = None self._platform_setting_windows_upgrade_on_activation_enabled = None self._platform_setting_system_event_forwarding_snmp_port = None self._firewall_setting_event_rank_severity_deny = None self._intrusion_prevention_setting_event_rank_severity_filter_low = None self._platform_setting_managed_detect_response_service_token = None self._platform_setting_trend_micro_xdr_api_user = None self._log_inspection_setting_retain_event_duration = None self._platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled = None self._anti_malware_setting_event_email_body_template = None self._platform_setting_retain_security_updates_max = None self._platform_setting_connected_threat_defense_control_manager_source_option = None self._anti_malware_setting_event_email_enabled = None self._platform_setting_recommendation_ongoing_scans_enabled = None self._platform_setting_user_password_length_min = None self._platform_setting_aws_manager_identity_use_instance_role_enabled = None self._platform_setting_alert_agent_update_pending_threshold = None self._platform_setting_user_password_require_special_characters_enabled = None self._platform_setting_update_appliance_default_agent_version = None self._platform_setting_system_event_forwarding_snmp_enabled = None self._platform_setting_smtp_bounce_email_address = None self._platform_setting_update_relay_security_support_agent9_and_earlier_enabled = None self._platform_setting_managed_detect_response_proxy_id = None self._platform_setting_trend_micro_xdr_log_server_url = None self._platform_setting_inactive_agent_cleanup_enabled = None self._platform_setting_user_session_idle_timeout = None self._anti_malware_setting_event_email_subject = None self._platform_setting_connected_threat_defense_control_manager_use_proxy_enabled = None self._platform_setting_aws_manager_identity_access_key = None self._platform_setting_connected_threat_defense_control_manager_proxy_id = None self._platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled = None self._platform_setting_connected_threat_defense_control_manager_manual_source_server_url = None self._platform_setting_user_password_require_mixed_case_enabled = None self._platform_setting_trend_micro_xdr_identity_provider_api_url = None self._platform_setting_smart_protection_feedback_for_suspicious_file_enabled = None self._platform_setting_smart_protection_feedback_industry_type = None self._web_reputation_setting_retain_event_duration = None self._integrity_monitoring_setting_event_rank_severity_medium = None self._platform_setting_update_relay_security_all_regions_patterns_download_enabled = None self._platform_setting_ddan_submission_enabled = None self._web_reputation_setting_event_rank_risk_suspicious = None self._integrity_monitoring_setting_event_rank_severity_critical = None self._platform_setting_smtp_from_email_address = None self._firewall_setting_global_stateful_config_id = None self._platform_setting_event_forwarding_sns_topic_arn = None self._firewall_setting_internet_connectivity_test_expected_content_regex = None self._platform_setting_connected_threat_defense_control_manager_manual_source_api_key = None self._platform_setting_update_security_primary_source_mode = None self._web_reputation_setting_event_rank_risk_dangerous = None self._platform_setting_user_hide_unlicensed_modules_enabled = None self._platform_setting_capture_encrypted_traffic_enabled = None self._platform_setting_retain_system_event_duration = None self._platform_setting_user_password_expiry = None self._platform_setting_smart_protection_feedback_enabled = None self._integrity_monitoring_setting_retain_event_duration = None self._log_inspection_setting_event_rank_severity_critical = None self._platform_setting_ddan_proxy_id = None self._platform_setting_agent_initiated_activation_within_ip_list_id = None self._platform_setting_update_security_primary_source_url = None self._platform_setting_agentless_vcloud_protection_enabled = None self._platform_setting_linux_upgrade_on_activation_enabled = None self._platform_setting_trend_micro_xdr_enabled = None self._platform_setting_active_sessions_max_exceeded_action = None self._platform_setting_update_hostname_on_ip_change_enabled = None self._log_inspection_setting_event_rank_severity_high = None self._platform_setting_smtp_requires_authentication_enabled = None self._platform_setting_active_sessions_max = None self._platform_setting_aws_external_id_retrieval_enabled = None self._log_inspection_setting_event_rank_severity_low = None self._platform_setting_smtp_username = None self._platform_setting_event_forwarding_sns_advanced_config_enabled = None self._firewall_setting_internet_connectivity_test_interval = None self._platform_setting_whois_url = None self._platform_setting_ddan_source_option = None self._platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled = None self._platform_setting_exported_file_character_encoding = None self._platform_setting_user_session_duration_max = None self._platform_setting_update_software_alternate_update_server_urls = None self._platform_setting_retain_counters_duration = None self._platform_setting_smart_protection_feedback_interval = None self._platform_setting_system_event_forwarding_snmp_address = None self._platform_setting_smtp_server_address = None self._platform_setting_smtp_password = None self._platform_setting_event_forwarding_sns_config_json = None self._firewall_setting_retain_event_duration = None self._web_reputation_setting_event_rank_risk_untested = None self._platform_setting_managed_detect_response_use_proxy_enabled = None self._platform_setting_event_forwarding_sns_secret_key = None self._platform_setting_aws_manager_identity_secret_key = None self._web_reputation_setting_event_rank_risk_highly_suspicious = None self._platform_setting_user_password_expiry_send_email_enabled = None self._platform_setting_user_sign_in_attempts_allowed_number = None self._platform_setting_ddan_use_proxy_enabled = None self._platform_setting_agent_initiated_activation_enabled = None self._platform_setting_smart_protection_feedback_bandwidth_max_kbytes = None self._firewall_setting_event_rank_severity_packet_rejection = None self._platform_setting_managed_detect_response_use_primary_tenant_settings_enabled = None self._platform_setting_event_forwarding_sns_access_key = None self._platform_setting_agent_initiated_activation_specify_hostname_enabled = None self._platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled = None self._platform_setting_inactive_agent_cleanup_duration = None self._platform_setting_agent_initiated_activation_duplicate_hostname_mode = None self._platform_setting_agent_initiated_activation_reactivate_unknown_enabled = None self._platform_setting_agent_initiated_activation_policy_id = None self._platform_setting_trend_micro_xdr_api_server_url = None self._platform_setting_retain_agent_installers_per_platform_max = None self._application_control_setting_serve_rulesets_from_relays_enabled = None self._integrity_monitoring_setting_event_rank_severity_high = None self._platform_setting_saml_retain_inactive_external_administrators_duration = None self._intrusion_prevention_setting_retain_event_duration = None self._firewall_setting_internet_connectivity_test_url = None self._platform_setting_proxy_agent_update_proxy_id = None self._platform_setting_ddan_auto_submission_enabled = None self._platform_setting_ddan_manual_source_api_key = None self._intrusion_prevention_setting_event_rank_severity_filter_error = None self._intrusion_prevention_setting_event_rank_severity_filter_high = None self._platform_setting_trend_micro_xdr_api_key = None self._integrity_monitoring_setting_event_rank_severity_low = None self._platform_setting_trend_micro_xdr_company_id = None self.discriminator = None if platform_setting_saml_identity_provider_certificate_expiry_warning_days is not None: self.platform_setting_saml_identity_provider_certificate_expiry_warning_days = platform_setting_saml_identity_provider_certificate_expiry_warning_days if platform_setting_update_agent_security_on_missing_deep_security_manager_enabled is not None: self.platform_setting_update_agent_security_on_missing_deep_security_manager_enabled = platform_setting_update_agent_security_on_missing_deep_security_manager_enabled if platform_setting_ddan_manual_source_server_url is not None: self.platform_setting_ddan_manual_source_server_url = platform_setting_ddan_manual_source_server_url if platform_setting_smart_protection_feedback_threat_detections_threshold is not None: self.platform_setting_smart_protection_feedback_threat_detections_threshold = platform_setting_smart_protection_feedback_threat_detections_threshold if intrusion_prevention_setting_event_rank_severity_filter_medium is not None: self.intrusion_prevention_setting_event_rank_severity_filter_medium = intrusion_prevention_setting_event_rank_severity_filter_medium if firewall_setting_intranet_connectivity_test_expected_content_regex is not None: self.firewall_setting_intranet_connectivity_test_expected_content_regex = firewall_setting_intranet_connectivity_test_expected_content_regex if platform_setting_event_forwarding_sns_enabled is not None: self.platform_setting_event_forwarding_sns_enabled = platform_setting_event_forwarding_sns_enabled if platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout is not None: self.platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout = platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout if web_reputation_setting_event_rank_risk_blocked_by_administrator_rank is not None: self.web_reputation_setting_event_rank_risk_blocked_by_administrator_rank = web_reputation_setting_event_rank_risk_blocked_by_administrator_rank if anti_malware_setting_event_email_recipients is not None: self.anti_malware_setting_event_email_recipients = anti_malware_setting_event_email_recipients if firewall_setting_intranet_connectivity_test_url is not None: self.firewall_setting_intranet_connectivity_test_url = firewall_setting_intranet_connectivity_test_url if platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled is not None: self.platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled = platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled if platform_setting_exported_diagnostic_package_locale is not None: self.platform_setting_exported_diagnostic_package_locale = platform_setting_exported_diagnostic_package_locale if intrusion_prevention_setting_event_rank_severity_filter_critical is not None: self.intrusion_prevention_setting_event_rank_severity_filter_critical = intrusion_prevention_setting_event_rank_severity_filter_critical if platform_setting_demo_mode_enabled is not None: self.platform_setting_demo_mode_enabled = platform_setting_demo_mode_enabled if platform_setting_trend_micro_xdr_common_log_receiver_url is not None: self.platform_setting_trend_micro_xdr_common_log_receiver_url = platform_setting_trend_micro_xdr_common_log_receiver_url if platform_setting_managed_detect_response_company_guid is not None: self.platform_setting_managed_detect_response_company_guid = platform_setting_managed_detect_response_company_guid if platform_setting_alert_default_email_address is not None: self.platform_setting_alert_default_email_address = platform_setting_alert_default_email_address if platform_setting_agent_initiated_activation_reactivate_cloned_enabled is not None: self.platform_setting_agent_initiated_activation_reactivate_cloned_enabled = platform_setting_agent_initiated_activation_reactivate_cloned_enabled if platform_setting_managed_detect_response_server_url is not None: self.platform_setting_managed_detect_response_server_url = platform_setting_managed_detect_response_server_url if platform_setting_syslog_config_id is not None: self.platform_setting_syslog_config_id = platform_setting_syslog_config_id if platform_setting_smtp_start_tls_enabled is not None: self.platform_setting_smtp_start_tls_enabled = platform_setting_smtp_start_tls_enabled if platform_setting_user_password_require_letters_and_numbers_enabled is not None: self.platform_setting_user_password_require_letters_and_numbers_enabled = platform_setting_user_password_require_letters_and_numbers_enabled if platform_setting_managed_detect_response_enabled is not None: self.platform_setting_managed_detect_response_enabled = platform_setting_managed_detect_response_enabled if platform_setting_update_rules_policy_auto_apply_enabled is not None: self.platform_setting_update_rules_policy_auto_apply_enabled = platform_setting_update_rules_policy_auto_apply_enabled if platform_setting_user_password_require_not_same_as_username_enabled is not None: self.platform_setting_user_password_require_not_same_as_username_enabled = platform_setting_user_password_require_not_same_as_username_enabled if log_inspection_setting_event_rank_severity_medium is not None: self.log_inspection_setting_event_rank_severity_medium = log_inspection_setting_event_rank_severity_medium if anti_malware_setting_retain_event_duration is not None: self.anti_malware_setting_retain_event_duration = anti_malware_setting_retain_event_duration if platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled is not None: self.platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled = platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled if firewall_setting_event_rank_severity_log_only is not None: self.firewall_setting_event_rank_severity_log_only = firewall_setting_event_rank_severity_log_only if application_control_setting_retain_event_duration is not None: self.application_control_setting_retain_event_duration = application_control_setting_retain_event_duration if platform_setting_windows_upgrade_on_activation_enabled is not None: self.platform_setting_windows_upgrade_on_activation_enabled = platform_setting_windows_upgrade_on_activation_enabled if platform_setting_system_event_forwarding_snmp_port is not None: self.platform_setting_system_event_forwarding_snmp_port = platform_setting_system_event_forwarding_snmp_port if firewall_setting_event_rank_severity_deny is not None: self.firewall_setting_event_rank_severity_deny = firewall_setting_event_rank_severity_deny if intrusion_prevention_setting_event_rank_severity_filter_low is not None: self.intrusion_prevention_setting_event_rank_severity_filter_low = intrusion_prevention_setting_event_rank_severity_filter_low if platform_setting_managed_detect_response_service_token is not None: self.platform_setting_managed_detect_response_service_token = platform_setting_managed_detect_response_service_token if platform_setting_trend_micro_xdr_api_user is not None: self.platform_setting_trend_micro_xdr_api_user = platform_setting_trend_micro_xdr_api_user if log_inspection_setting_retain_event_duration is not None: self.log_inspection_setting_retain_event_duration = log_inspection_setting_retain_event_duration if platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled is not None: self.platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled = platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled if anti_malware_setting_event_email_body_template is not None: self.anti_malware_setting_event_email_body_template = anti_malware_setting_event_email_body_template if platform_setting_retain_security_updates_max is not None: self.platform_setting_retain_security_updates_max = platform_setting_retain_security_updates_max if platform_setting_connected_threat_defense_control_manager_source_option is not None: self.platform_setting_connected_threat_defense_control_manager_source_option = platform_setting_connected_threat_defense_control_manager_source_option if anti_malware_setting_event_email_enabled is not None: self.anti_malware_setting_event_email_enabled = anti_malware_setting_event_email_enabled if platform_setting_recommendation_ongoing_scans_enabled is not None: self.platform_setting_recommendation_ongoing_scans_enabled = platform_setting_recommendation_ongoing_scans_enabled if platform_setting_user_password_length_min is not None: self.platform_setting_user_password_length_min = platform_setting_user_password_length_min if platform_setting_aws_manager_identity_use_instance_role_enabled is not None: self.platform_setting_aws_manager_identity_use_instance_role_enabled = platform_setting_aws_manager_identity_use_instance_role_enabled if platform_setting_alert_agent_update_pending_threshold is not None: self.platform_setting_alert_agent_update_pending_threshold = platform_setting_alert_agent_update_pending_threshold if platform_setting_user_password_require_special_characters_enabled is not None: self.platform_setting_user_password_require_special_characters_enabled = platform_setting_user_password_require_special_characters_enabled if platform_setting_update_appliance_default_agent_version is not None: self.platform_setting_update_appliance_default_agent_version = platform_setting_update_appliance_default_agent_version if platform_setting_system_event_forwarding_snmp_enabled is not None: self.platform_setting_system_event_forwarding_snmp_enabled = platform_setting_system_event_forwarding_snmp_enabled if platform_setting_smtp_bounce_email_address is not None: self.platform_setting_smtp_bounce_email_address = platform_setting_smtp_bounce_email_address if platform_setting_update_relay_security_support_agent9_and_earlier_enabled is not None: self.platform_setting_update_relay_security_support_agent9_and_earlier_enabled = platform_setting_update_relay_security_support_agent9_and_earlier_enabled if platform_setting_managed_detect_response_proxy_id is not None: self.platform_setting_managed_detect_response_proxy_id = platform_setting_managed_detect_response_proxy_id if platform_setting_trend_micro_xdr_log_server_url is not None: self.platform_setting_trend_micro_xdr_log_server_url = platform_setting_trend_micro_xdr_log_server_url if platform_setting_inactive_agent_cleanup_enabled is not None: self.platform_setting_inactive_agent_cleanup_enabled = platform_setting_inactive_agent_cleanup_enabled if platform_setting_user_session_idle_timeout is not None: self.platform_setting_user_session_idle_timeout = platform_setting_user_session_idle_timeout if anti_malware_setting_event_email_subject is not None: self.anti_malware_setting_event_email_subject = anti_malware_setting_event_email_subject if platform_setting_connected_threat_defense_control_manager_use_proxy_enabled is not None: self.platform_setting_connected_threat_defense_control_manager_use_proxy_enabled = platform_setting_connected_threat_defense_control_manager_use_proxy_enabled if platform_setting_aws_manager_identity_access_key is not None: self.platform_setting_aws_manager_identity_access_key = platform_setting_aws_manager_identity_access_key if platform_setting_connected_threat_defense_control_manager_proxy_id is not None: self.platform_setting_connected_threat_defense_control_manager_proxy_id = platform_setting_connected_threat_defense_control_manager_proxy_id if platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled is not None: self.platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled = platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled if platform_setting_connected_threat_defense_control_manager_manual_source_server_url is not None: self.platform_setting_connected_threat_defense_control_manager_manual_source_server_url = platform_setting_connected_threat_defense_control_manager_manual_source_server_url if platform_setting_user_password_require_mixed_case_enabled is not None: self.platform_setting_user_password_require_mixed_case_enabled = platform_setting_user_password_require_mixed_case_enabled if platform_setting_trend_micro_xdr_identity_provider_api_url is not None: self.platform_setting_trend_micro_xdr_identity_provider_api_url = platform_setting_trend_micro_xdr_identity_provider_api_url if platform_setting_smart_protection_feedback_for_suspicious_file_enabled is not None: self.platform_setting_smart_protection_feedback_for_suspicious_file_enabled = platform_setting_smart_protection_feedback_for_suspicious_file_enabled if platform_setting_smart_protection_feedback_industry_type is not None: self.platform_setting_smart_protection_feedback_industry_type = platform_setting_smart_protection_feedback_industry_type if web_reputation_setting_retain_event_duration is not None: self.web_reputation_setting_retain_event_duration = web_reputation_setting_retain_event_duration if integrity_monitoring_setting_event_rank_severity_medium is not None: self.integrity_monitoring_setting_event_rank_severity_medium = integrity_monitoring_setting_event_rank_severity_medium if platform_setting_update_relay_security_all_regions_patterns_download_enabled is not None: self.platform_setting_update_relay_security_all_regions_patterns_download_enabled = platform_setting_update_relay_security_all_regions_patterns_download_enabled if platform_setting_ddan_submission_enabled is not None: self.platform_setting_ddan_submission_enabled = platform_setting_ddan_submission_enabled if web_reputation_setting_event_rank_risk_suspicious is not None: self.web_reputation_setting_event_rank_risk_suspicious = web_reputation_setting_event_rank_risk_suspicious if integrity_monitoring_setting_event_rank_severity_critical is not None: self.integrity_monitoring_setting_event_rank_severity_critical = integrity_monitoring_setting_event_rank_severity_critical if platform_setting_smtp_from_email_address is not None: self.platform_setting_smtp_from_email_address = platform_setting_smtp_from_email_address if firewall_setting_global_stateful_config_id is not None: self.firewall_setting_global_stateful_config_id = firewall_setting_global_stateful_config_id if platform_setting_event_forwarding_sns_topic_arn is not None: self.platform_setting_event_forwarding_sns_topic_arn = platform_setting_event_forwarding_sns_topic_arn if firewall_setting_internet_connectivity_test_expected_content_regex is not None: self.firewall_setting_internet_connectivity_test_expected_content_regex = firewall_setting_internet_connectivity_test_expected_content_regex if platform_setting_connected_threat_defense_control_manager_manual_source_api_key is not None: self.platform_setting_connected_threat_defense_control_manager_manual_source_api_key = platform_setting_connected_threat_defense_control_manager_manual_source_api_key if platform_setting_update_security_primary_source_mode is not None: self.platform_setting_update_security_primary_source_mode = platform_setting_update_security_primary_source_mode if web_reputation_setting_event_rank_risk_dangerous is not None: self.web_reputation_setting_event_rank_risk_dangerous = web_reputation_setting_event_rank_risk_dangerous if platform_setting_user_hide_unlicensed_modules_enabled is not None: self.platform_setting_user_hide_unlicensed_modules_enabled = platform_setting_user_hide_unlicensed_modules_enabled if platform_setting_capture_encrypted_traffic_enabled is not None: self.platform_setting_capture_encrypted_traffic_enabled = platform_setting_capture_encrypted_traffic_enabled if platform_setting_retain_system_event_duration is not None: self.platform_setting_retain_system_event_duration = platform_setting_retain_system_event_duration if platform_setting_user_password_expiry is not None: self.platform_setting_user_password_expiry = platform_setting_user_password_expiry if platform_setting_smart_protection_feedback_enabled is not None: self.platform_setting_smart_protection_feedback_enabled = platform_setting_smart_protection_feedback_enabled if integrity_monitoring_setting_retain_event_duration is not None: self.integrity_monitoring_setting_retain_event_duration = integrity_monitoring_setting_retain_event_duration if log_inspection_setting_event_rank_severity_critical is not None: self.log_inspection_setting_event_rank_severity_critical = log_inspection_setting_event_rank_severity_critical if platform_setting_ddan_proxy_id is not None: self.platform_setting_ddan_proxy_id = platform_setting_ddan_proxy_id if platform_setting_agent_initiated_activation_within_ip_list_id is not None: self.platform_setting_agent_initiated_activation_within_ip_list_id = platform_setting_agent_initiated_activation_within_ip_list_id if platform_setting_update_security_primary_source_url is not None: self.platform_setting_update_security_primary_source_url = platform_setting_update_security_primary_source_url if platform_setting_agentless_vcloud_protection_enabled is not None: self.platform_setting_agentless_vcloud_protection_enabled = platform_setting_agentless_vcloud_protection_enabled if platform_setting_linux_upgrade_on_activation_enabled is not None: self.platform_setting_linux_upgrade_on_activation_enabled = platform_setting_linux_upgrade_on_activation_enabled if platform_setting_trend_micro_xdr_enabled is not None: self.platform_setting_trend_micro_xdr_enabled = platform_setting_trend_micro_xdr_enabled if platform_setting_active_sessions_max_exceeded_action is not None: self.platform_setting_active_sessions_max_exceeded_action = platform_setting_active_sessions_max_exceeded_action if platform_setting_update_hostname_on_ip_change_enabled is not None: self.platform_setting_update_hostname_on_ip_change_enabled = platform_setting_update_hostname_on_ip_change_enabled if log_inspection_setting_event_rank_severity_high is not None: self.log_inspection_setting_event_rank_severity_high = log_inspection_setting_event_rank_severity_high if platform_setting_smtp_requires_authentication_enabled is not None: self.platform_setting_smtp_requires_authentication_enabled = platform_setting_smtp_requires_authentication_enabled if platform_setting_active_sessions_max is not None: self.platform_setting_active_sessions_max = platform_setting_active_sessions_max if platform_setting_aws_external_id_retrieval_enabled is not None: self.platform_setting_aws_external_id_retrieval_enabled = platform_setting_aws_external_id_retrieval_enabled if log_inspection_setting_event_rank_severity_low is not None: self.log_inspection_setting_event_rank_severity_low = log_inspection_setting_event_rank_severity_low if platform_setting_smtp_username is not None: self.platform_setting_smtp_username = platform_setting_smtp_username if platform_setting_event_forwarding_sns_advanced_config_enabled is not None: self.platform_setting_event_forwarding_sns_advanced_config_enabled = platform_setting_event_forwarding_sns_advanced_config_enabled if firewall_setting_internet_connectivity_test_interval is not None: self.firewall_setting_internet_connectivity_test_interval = firewall_setting_internet_connectivity_test_interval if platform_setting_whois_url is not None: self.platform_setting_whois_url = platform_setting_whois_url if platform_setting_ddan_source_option is not None: self.platform_setting_ddan_source_option = platform_setting_ddan_source_option if platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled is not None: self.platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled = platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled if platform_setting_exported_file_character_encoding is not None: self.platform_setting_exported_file_character_encoding = platform_setting_exported_file_character_encoding if platform_setting_user_session_duration_max is not None: self.platform_setting_user_session_duration_max = platform_setting_user_session_duration_max if platform_setting_update_software_alternate_update_server_urls is not None: self.platform_setting_update_software_alternate_update_server_urls = platform_setting_update_software_alternate_update_server_urls if platform_setting_retain_counters_duration is not None: self.platform_setting_retain_counters_duration = platform_setting_retain_counters_duration if platform_setting_smart_protection_feedback_interval is not None: self.platform_setting_smart_protection_feedback_interval = platform_setting_smart_protection_feedback_interval if platform_setting_system_event_forwarding_snmp_address is not None: self.platform_setting_system_event_forwarding_snmp_address = platform_setting_system_event_forwarding_snmp_address if platform_setting_smtp_server_address is not None: self.platform_setting_smtp_server_address = platform_setting_smtp_server_address if platform_setting_smtp_password is not None: self.platform_setting_smtp_password = platform_setting_smtp_password if platform_setting_event_forwarding_sns_config_json is not None: self.platform_setting_event_forwarding_sns_config_json = platform_setting_event_forwarding_sns_config_json if firewall_setting_retain_event_duration is not None: self.firewall_setting_retain_event_duration = firewall_setting_retain_event_duration if web_reputation_setting_event_rank_risk_untested is not None: self.web_reputation_setting_event_rank_risk_untested = web_reputation_setting_event_rank_risk_untested if platform_setting_managed_detect_response_use_proxy_enabled is not None: self.platform_setting_managed_detect_response_use_proxy_enabled = platform_setting_managed_detect_response_use_proxy_enabled if platform_setting_event_forwarding_sns_secret_key is not None: self.platform_setting_event_forwarding_sns_secret_key = platform_setting_event_forwarding_sns_secret_key if platform_setting_aws_manager_identity_secret_key is not None: self.platform_setting_aws_manager_identity_secret_key = platform_setting_aws_manager_identity_secret_key if web_reputation_setting_event_rank_risk_highly_suspicious is not None: self.web_reputation_setting_event_rank_risk_highly_suspicious = web_reputation_setting_event_rank_risk_highly_suspicious if platform_setting_user_password_expiry_send_email_enabled is not None: self.platform_setting_user_password_expiry_send_email_enabled = platform_setting_user_password_expiry_send_email_enabled if platform_setting_user_sign_in_attempts_allowed_number is not None: self.platform_setting_user_sign_in_attempts_allowed_number = platform_setting_user_sign_in_attempts_allowed_number if platform_setting_ddan_use_proxy_enabled is not None: self.platform_setting_ddan_use_proxy_enabled = platform_setting_ddan_use_proxy_enabled if platform_setting_agent_initiated_activation_enabled is not None: self.platform_setting_agent_initiated_activation_enabled = platform_setting_agent_initiated_activation_enabled if platform_setting_smart_protection_feedback_bandwidth_max_kbytes is not None: self.platform_setting_smart_protection_feedback_bandwidth_max_kbytes = platform_setting_smart_protection_feedback_bandwidth_max_kbytes if firewall_setting_event_rank_severity_packet_rejection is not None: self.firewall_setting_event_rank_severity_packet_rejection = firewall_setting_event_rank_severity_packet_rejection if platform_setting_managed_detect_response_use_primary_tenant_settings_enabled is not None: self.platform_setting_managed_detect_response_use_primary_tenant_settings_enabled = platform_setting_managed_detect_response_use_primary_tenant_settings_enabled if platform_setting_event_forwarding_sns_access_key is not None: self.platform_setting_event_forwarding_sns_access_key = platform_setting_event_forwarding_sns_access_key if platform_setting_agent_initiated_activation_specify_hostname_enabled is not None: self.platform_setting_agent_initiated_activation_specify_hostname_enabled = platform_setting_agent_initiated_activation_specify_hostname_enabled if platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled is not None: self.platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled = platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled if platform_setting_inactive_agent_cleanup_duration is not None: self.platform_setting_inactive_agent_cleanup_duration = platform_setting_inactive_agent_cleanup_duration if platform_setting_agent_initiated_activation_duplicate_hostname_mode is not None: self.platform_setting_agent_initiated_activation_duplicate_hostname_mode = platform_setting_agent_initiated_activation_duplicate_hostname_mode if platform_setting_agent_initiated_activation_reactivate_unknown_enabled is not None: self.platform_setting_agent_initiated_activation_reactivate_unknown_enabled = platform_setting_agent_initiated_activation_reactivate_unknown_enabled if platform_setting_agent_initiated_activation_policy_id is not None: self.platform_setting_agent_initiated_activation_policy_id = platform_setting_agent_initiated_activation_policy_id if platform_setting_trend_micro_xdr_api_server_url is not None: self.platform_setting_trend_micro_xdr_api_server_url = platform_setting_trend_micro_xdr_api_server_url if platform_setting_retain_agent_installers_per_platform_max is not None: self.platform_setting_retain_agent_installers_per_platform_max = platform_setting_retain_agent_installers_per_platform_max if application_control_setting_serve_rulesets_from_relays_enabled is not None: self.application_control_setting_serve_rulesets_from_relays_enabled = application_control_setting_serve_rulesets_from_relays_enabled if integrity_monitoring_setting_event_rank_severity_high is not None: self.integrity_monitoring_setting_event_rank_severity_high = integrity_monitoring_setting_event_rank_severity_high if platform_setting_saml_retain_inactive_external_administrators_duration is not None: self.platform_setting_saml_retain_inactive_external_administrators_duration = platform_setting_saml_retain_inactive_external_administrators_duration if intrusion_prevention_setting_retain_event_duration is not None: self.intrusion_prevention_setting_retain_event_duration = intrusion_prevention_setting_retain_event_duration if firewall_setting_internet_connectivity_test_url is not None: self.firewall_setting_internet_connectivity_test_url = firewall_setting_internet_connectivity_test_url if platform_setting_proxy_agent_update_proxy_id is not None: self.platform_setting_proxy_agent_update_proxy_id = platform_setting_proxy_agent_update_proxy_id if platform_setting_ddan_auto_submission_enabled is not None: self.platform_setting_ddan_auto_submission_enabled = platform_setting_ddan_auto_submission_enabled if platform_setting_ddan_manual_source_api_key is not None: self.platform_setting_ddan_manual_source_api_key = platform_setting_ddan_manual_source_api_key if intrusion_prevention_setting_event_rank_severity_filter_error is not None: self.intrusion_prevention_setting_event_rank_severity_filter_error = intrusion_prevention_setting_event_rank_severity_filter_error if intrusion_prevention_setting_event_rank_severity_filter_high is not None: self.intrusion_prevention_setting_event_rank_severity_filter_high = intrusion_prevention_setting_event_rank_severity_filter_high if platform_setting_trend_micro_xdr_api_key is not None: self.platform_setting_trend_micro_xdr_api_key = platform_setting_trend_micro_xdr_api_key if integrity_monitoring_setting_event_rank_severity_low is not None: self.integrity_monitoring_setting_event_rank_severity_low = integrity_monitoring_setting_event_rank_severity_low if platform_setting_trend_micro_xdr_company_id is not None: self.platform_setting_trend_micro_xdr_company_id = platform_setting_trend_micro_xdr_company_id @property def platform_setting_saml_identity_provider_certificate_expiry_warning_days(self): """Gets the platform_setting_saml_identity_provider_certificate_expiry_warning_days of this SystemSettings. # noqa: E501 Warn when a SAML identity provider certificate will expire within (days) # noqa: E501 :return: The platform_setting_saml_identity_provider_certificate_expiry_warning_days of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_saml_identity_provider_certificate_expiry_warning_days @platform_setting_saml_identity_provider_certificate_expiry_warning_days.setter def platform_setting_saml_identity_provider_certificate_expiry_warning_days(self, platform_setting_saml_identity_provider_certificate_expiry_warning_days): """Sets the platform_setting_saml_identity_provider_certificate_expiry_warning_days of this SystemSettings. Warn when a SAML identity provider certificate will expire within (days) # noqa: E501 :param platform_setting_saml_identity_provider_certificate_expiry_warning_days: The platform_setting_saml_identity_provider_certificate_expiry_warning_days of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_saml_identity_provider_certificate_expiry_warning_days = platform_setting_saml_identity_provider_certificate_expiry_warning_days @property def platform_setting_update_agent_security_on_missing_deep_security_manager_enabled(self): """Gets the platform_setting_update_agent_security_on_missing_deep_security_manager_enabled of this SystemSettings. # noqa: E501 Allow Agents/Appliances to download security updates when Deep Security Manager is not accessible # noqa: E501 :return: The platform_setting_update_agent_security_on_missing_deep_security_manager_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_update_agent_security_on_missing_deep_security_manager_enabled @platform_setting_update_agent_security_on_missing_deep_security_manager_enabled.setter def platform_setting_update_agent_security_on_missing_deep_security_manager_enabled(self, platform_setting_update_agent_security_on_missing_deep_security_manager_enabled): """Sets the platform_setting_update_agent_security_on_missing_deep_security_manager_enabled of this SystemSettings. Allow Agents/Appliances to download security updates when Deep Security Manager is not accessible # noqa: E501 :param platform_setting_update_agent_security_on_missing_deep_security_manager_enabled: The platform_setting_update_agent_security_on_missing_deep_security_manager_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_update_agent_security_on_missing_deep_security_manager_enabled = platform_setting_update_agent_security_on_missing_deep_security_manager_enabled @property def platform_setting_ddan_manual_source_server_url(self): """Gets the platform_setting_ddan_manual_source_server_url of this SystemSettings. # noqa: E501 Server URL (ex: \"https://[server]/\") # noqa: E501 :return: The platform_setting_ddan_manual_source_server_url of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_ddan_manual_source_server_url @platform_setting_ddan_manual_source_server_url.setter def platform_setting_ddan_manual_source_server_url(self, platform_setting_ddan_manual_source_server_url): """Sets the platform_setting_ddan_manual_source_server_url of this SystemSettings. Server URL (ex: \"https://[server]/\") # noqa: E501 :param platform_setting_ddan_manual_source_server_url: The platform_setting_ddan_manual_source_server_url of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_ddan_manual_source_server_url = platform_setting_ddan_manual_source_server_url @property def platform_setting_smart_protection_feedback_threat_detections_threshold(self): """Gets the platform_setting_smart_protection_feedback_threat_detections_threshold of this SystemSettings. # noqa: E501 Feedback Interval by threats # noqa: E501 :return: The platform_setting_smart_protection_feedback_threat_detections_threshold of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smart_protection_feedback_threat_detections_threshold @platform_setting_smart_protection_feedback_threat_detections_threshold.setter def platform_setting_smart_protection_feedback_threat_detections_threshold(self, platform_setting_smart_protection_feedback_threat_detections_threshold): """Sets the platform_setting_smart_protection_feedback_threat_detections_threshold of this SystemSettings. Feedback Interval by threats # noqa: E501 :param platform_setting_smart_protection_feedback_threat_detections_threshold: The platform_setting_smart_protection_feedback_threat_detections_threshold of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smart_protection_feedback_threat_detections_threshold = platform_setting_smart_protection_feedback_threat_detections_threshold @property def intrusion_prevention_setting_event_rank_severity_filter_medium(self): """Gets the intrusion_prevention_setting_event_rank_severity_filter_medium of this SystemSettings. # noqa: E501 Medium # noqa: E501 :return: The intrusion_prevention_setting_event_rank_severity_filter_medium of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._intrusion_prevention_setting_event_rank_severity_filter_medium @intrusion_prevention_setting_event_rank_severity_filter_medium.setter def intrusion_prevention_setting_event_rank_severity_filter_medium(self, intrusion_prevention_setting_event_rank_severity_filter_medium): """Sets the intrusion_prevention_setting_event_rank_severity_filter_medium of this SystemSettings. Medium # noqa: E501 :param intrusion_prevention_setting_event_rank_severity_filter_medium: The intrusion_prevention_setting_event_rank_severity_filter_medium of this SystemSettings. # noqa: E501 :type: SettingValue """ self._intrusion_prevention_setting_event_rank_severity_filter_medium = intrusion_prevention_setting_event_rank_severity_filter_medium @property def firewall_setting_intranet_connectivity_test_expected_content_regex(self): """Gets the firewall_setting_intranet_connectivity_test_expected_content_regex of this SystemSettings. # noqa: E501 Regular Expression for returned content used to confirm Intranet Connectivity # noqa: E501 :return: The firewall_setting_intranet_connectivity_test_expected_content_regex of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._firewall_setting_intranet_connectivity_test_expected_content_regex @firewall_setting_intranet_connectivity_test_expected_content_regex.setter def firewall_setting_intranet_connectivity_test_expected_content_regex(self, firewall_setting_intranet_connectivity_test_expected_content_regex): """Sets the firewall_setting_intranet_connectivity_test_expected_content_regex of this SystemSettings. Regular Expression for returned content used to confirm Intranet Connectivity # noqa: E501 :param firewall_setting_intranet_connectivity_test_expected_content_regex: The firewall_setting_intranet_connectivity_test_expected_content_regex of this SystemSettings. # noqa: E501 :type: SettingValue """ self._firewall_setting_intranet_connectivity_test_expected_content_regex = firewall_setting_intranet_connectivity_test_expected_content_regex @property def platform_setting_event_forwarding_sns_enabled(self): """Gets the platform_setting_event_forwarding_sns_enabled of this SystemSettings. # noqa: E501 Publish Events to Amazon Simple Notification Service # noqa: E501 :return: The platform_setting_event_forwarding_sns_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_event_forwarding_sns_enabled @platform_setting_event_forwarding_sns_enabled.setter def platform_setting_event_forwarding_sns_enabled(self, platform_setting_event_forwarding_sns_enabled): """Sets the platform_setting_event_forwarding_sns_enabled of this SystemSettings. Publish Events to Amazon Simple Notification Service # noqa: E501 :param platform_setting_event_forwarding_sns_enabled: The platform_setting_event_forwarding_sns_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_event_forwarding_sns_enabled = platform_setting_event_forwarding_sns_enabled @property def platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout(self): """Gets the platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout of this SystemSettings. # noqa: E501 Automatically revoke Primary Tenant access after # noqa: E501 :return: The platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout @platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout.setter def platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout(self, platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout): """Sets the platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout of this SystemSettings. Automatically revoke Primary Tenant access after # noqa: E501 :param platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout: The platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout = platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_timeout @property def web_reputation_setting_event_rank_risk_blocked_by_administrator_rank(self): """Gets the web_reputation_setting_event_rank_risk_blocked_by_administrator_rank of this SystemSettings. # noqa: E501 Blocked By Administrator # noqa: E501 :return: The web_reputation_setting_event_rank_risk_blocked_by_administrator_rank of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._web_reputation_setting_event_rank_risk_blocked_by_administrator_rank @web_reputation_setting_event_rank_risk_blocked_by_administrator_rank.setter def web_reputation_setting_event_rank_risk_blocked_by_administrator_rank(self, web_reputation_setting_event_rank_risk_blocked_by_administrator_rank): """Sets the web_reputation_setting_event_rank_risk_blocked_by_administrator_rank of this SystemSettings. Blocked By Administrator # noqa: E501 :param web_reputation_setting_event_rank_risk_blocked_by_administrator_rank: The web_reputation_setting_event_rank_risk_blocked_by_administrator_rank of this SystemSettings. # noqa: E501 :type: SettingValue """ self._web_reputation_setting_event_rank_risk_blocked_by_administrator_rank = web_reputation_setting_event_rank_risk_blocked_by_administrator_rank @property def anti_malware_setting_event_email_recipients(self): """Gets the anti_malware_setting_event_email_recipients of this SystemSettings. # noqa: E501 Email Recipients # noqa: E501 :return: The anti_malware_setting_event_email_recipients of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._anti_malware_setting_event_email_recipients @anti_malware_setting_event_email_recipients.setter def anti_malware_setting_event_email_recipients(self, anti_malware_setting_event_email_recipients): """Sets the anti_malware_setting_event_email_recipients of this SystemSettings. Email Recipients # noqa: E501 :param anti_malware_setting_event_email_recipients: The anti_malware_setting_event_email_recipients of this SystemSettings. # noqa: E501 :type: SettingValue """ self._anti_malware_setting_event_email_recipients = anti_malware_setting_event_email_recipients @property def firewall_setting_intranet_connectivity_test_url(self): """Gets the firewall_setting_intranet_connectivity_test_url of this SystemSettings. # noqa: E501 URL for testing Intranet Connectivity Status # noqa: E501 :return: The firewall_setting_intranet_connectivity_test_url of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._firewall_setting_intranet_connectivity_test_url @firewall_setting_intranet_connectivity_test_url.setter def firewall_setting_intranet_connectivity_test_url(self, firewall_setting_intranet_connectivity_test_url): """Sets the firewall_setting_intranet_connectivity_test_url of this SystemSettings. URL for testing Intranet Connectivity Status # noqa: E501 :param firewall_setting_intranet_connectivity_test_url: The firewall_setting_intranet_connectivity_test_url of this SystemSettings. # noqa: E501 :type: SettingValue """ self._firewall_setting_intranet_connectivity_test_url = firewall_setting_intranet_connectivity_test_url @property def platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled(self): """Gets the platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled of this SystemSettings. # noqa: E501 Use the Primary Tenant Relay Group as my Default Relay Group # noqa: E501 :return: The platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled @platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled.setter def platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled(self, platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled): """Sets the platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled of this SystemSettings. Use the Primary Tenant Relay Group as my Default Relay Group # noqa: E501 :param platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled: The platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled = platform_setting_tenant_use_default_relay_group_from_primary_tenant_enabled @property def platform_setting_exported_diagnostic_package_locale(self): """Gets the platform_setting_exported_diagnostic_package_locale of this SystemSettings. # noqa: E501 Exported Diagnostic Package Language # noqa: E501 :return: The platform_setting_exported_diagnostic_package_locale of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_exported_diagnostic_package_locale @platform_setting_exported_diagnostic_package_locale.setter def platform_setting_exported_diagnostic_package_locale(self, platform_setting_exported_diagnostic_package_locale): """Sets the platform_setting_exported_diagnostic_package_locale of this SystemSettings. Exported Diagnostic Package Language # noqa: E501 :param platform_setting_exported_diagnostic_package_locale: The platform_setting_exported_diagnostic_package_locale of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_exported_diagnostic_package_locale = platform_setting_exported_diagnostic_package_locale @property def intrusion_prevention_setting_event_rank_severity_filter_critical(self): """Gets the intrusion_prevention_setting_event_rank_severity_filter_critical of this SystemSettings. # noqa: E501 Critical # noqa: E501 :return: The intrusion_prevention_setting_event_rank_severity_filter_critical of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._intrusion_prevention_setting_event_rank_severity_filter_critical @intrusion_prevention_setting_event_rank_severity_filter_critical.setter def intrusion_prevention_setting_event_rank_severity_filter_critical(self, intrusion_prevention_setting_event_rank_severity_filter_critical): """Sets the intrusion_prevention_setting_event_rank_severity_filter_critical of this SystemSettings. Critical # noqa: E501 :param intrusion_prevention_setting_event_rank_severity_filter_critical: The intrusion_prevention_setting_event_rank_severity_filter_critical of this SystemSettings. # noqa: E501 :type: SettingValue """ self._intrusion_prevention_setting_event_rank_severity_filter_critical = intrusion_prevention_setting_event_rank_severity_filter_critical @property def platform_setting_demo_mode_enabled(self): """Gets the platform_setting_demo_mode_enabled of this SystemSettings. # noqa: E501 Demo Mode Enabled # noqa: E501 :return: The platform_setting_demo_mode_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_demo_mode_enabled @platform_setting_demo_mode_enabled.setter def platform_setting_demo_mode_enabled(self, platform_setting_demo_mode_enabled): """Sets the platform_setting_demo_mode_enabled of this SystemSettings. Demo Mode Enabled # noqa: E501 :param platform_setting_demo_mode_enabled: The platform_setting_demo_mode_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_demo_mode_enabled = platform_setting_demo_mode_enabled @property def platform_setting_trend_micro_xdr_common_log_receiver_url(self): """Gets the platform_setting_trend_micro_xdr_common_log_receiver_url of this SystemSettings. # noqa: E501 Common Log Receiver URL # noqa: E501 :return: The platform_setting_trend_micro_xdr_common_log_receiver_url of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_trend_micro_xdr_common_log_receiver_url @platform_setting_trend_micro_xdr_common_log_receiver_url.setter def platform_setting_trend_micro_xdr_common_log_receiver_url(self, platform_setting_trend_micro_xdr_common_log_receiver_url): """Sets the platform_setting_trend_micro_xdr_common_log_receiver_url of this SystemSettings. Common Log Receiver URL # noqa: E501 :param platform_setting_trend_micro_xdr_common_log_receiver_url: The platform_setting_trend_micro_xdr_common_log_receiver_url of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_trend_micro_xdr_common_log_receiver_url = platform_setting_trend_micro_xdr_common_log_receiver_url @property def platform_setting_managed_detect_response_company_guid(self): """Gets the platform_setting_managed_detect_response_company_guid of this SystemSettings. # noqa: E501 Company GUID # noqa: E501 :return: The platform_setting_managed_detect_response_company_guid of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_managed_detect_response_company_guid @platform_setting_managed_detect_response_company_guid.setter def platform_setting_managed_detect_response_company_guid(self, platform_setting_managed_detect_response_company_guid): """Sets the platform_setting_managed_detect_response_company_guid of this SystemSettings. Company GUID # noqa: E501 :param platform_setting_managed_detect_response_company_guid: The platform_setting_managed_detect_response_company_guid of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_managed_detect_response_company_guid = platform_setting_managed_detect_response_company_guid @property def platform_setting_alert_default_email_address(self): """Gets the platform_setting_alert_default_email_address of this SystemSettings. # noqa: E501 Alert Email Address - The email address to which all alert emails should be sent # noqa: E501 :return: The platform_setting_alert_default_email_address of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_alert_default_email_address @platform_setting_alert_default_email_address.setter def platform_setting_alert_default_email_address(self, platform_setting_alert_default_email_address): """Sets the platform_setting_alert_default_email_address of this SystemSettings. Alert Email Address - The email address to which all alert emails should be sent # noqa: E501 :param platform_setting_alert_default_email_address: The platform_setting_alert_default_email_address of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_alert_default_email_address = platform_setting_alert_default_email_address @property def platform_setting_agent_initiated_activation_reactivate_cloned_enabled(self): """Gets the platform_setting_agent_initiated_activation_reactivate_cloned_enabled of this SystemSettings. # noqa: E501 Reactivate cloned Agents # noqa: E501 :return: The platform_setting_agent_initiated_activation_reactivate_cloned_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_agent_initiated_activation_reactivate_cloned_enabled @platform_setting_agent_initiated_activation_reactivate_cloned_enabled.setter def platform_setting_agent_initiated_activation_reactivate_cloned_enabled(self, platform_setting_agent_initiated_activation_reactivate_cloned_enabled): """Sets the platform_setting_agent_initiated_activation_reactivate_cloned_enabled of this SystemSettings. Reactivate cloned Agents # noqa: E501 :param platform_setting_agent_initiated_activation_reactivate_cloned_enabled: The platform_setting_agent_initiated_activation_reactivate_cloned_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_agent_initiated_activation_reactivate_cloned_enabled = platform_setting_agent_initiated_activation_reactivate_cloned_enabled @property def platform_setting_managed_detect_response_server_url(self): """Gets the platform_setting_managed_detect_response_server_url of this SystemSettings. # noqa: E501 Server URL (ex: \"https://[server]/\") # noqa: E501 :return: The platform_setting_managed_detect_response_server_url of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_managed_detect_response_server_url @platform_setting_managed_detect_response_server_url.setter def platform_setting_managed_detect_response_server_url(self, platform_setting_managed_detect_response_server_url): """Sets the platform_setting_managed_detect_response_server_url of this SystemSettings. Server URL (ex: \"https://[server]/\") # noqa: E501 :param platform_setting_managed_detect_response_server_url: The platform_setting_managed_detect_response_server_url of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_managed_detect_response_server_url = platform_setting_managed_detect_response_server_url @property def platform_setting_syslog_config_id(self): """Gets the platform_setting_syslog_config_id of this SystemSettings. # noqa: E501 Forward System Events to a remote computer (via Syslog) using configuration # noqa: E501 :return: The platform_setting_syslog_config_id of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_syslog_config_id @platform_setting_syslog_config_id.setter def platform_setting_syslog_config_id(self, platform_setting_syslog_config_id): """Sets the platform_setting_syslog_config_id of this SystemSettings. Forward System Events to a remote computer (via Syslog) using configuration # noqa: E501 :param platform_setting_syslog_config_id: The platform_setting_syslog_config_id of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_syslog_config_id = platform_setting_syslog_config_id @property def platform_setting_smtp_start_tls_enabled(self): """Gets the platform_setting_smtp_start_tls_enabled of this SystemSettings. # noqa: E501 STARTTLS # noqa: E501 :return: The platform_setting_smtp_start_tls_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smtp_start_tls_enabled @platform_setting_smtp_start_tls_enabled.setter def platform_setting_smtp_start_tls_enabled(self, platform_setting_smtp_start_tls_enabled): """Sets the platform_setting_smtp_start_tls_enabled of this SystemSettings. STARTTLS # noqa: E501 :param platform_setting_smtp_start_tls_enabled: The platform_setting_smtp_start_tls_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smtp_start_tls_enabled = platform_setting_smtp_start_tls_enabled @property def platform_setting_user_password_require_letters_and_numbers_enabled(self): """Gets the platform_setting_user_password_require_letters_and_numbers_enabled of this SystemSettings. # noqa: E501 User password requires both letters and numbers # noqa: E501 :return: The platform_setting_user_password_require_letters_and_numbers_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_user_password_require_letters_and_numbers_enabled @platform_setting_user_password_require_letters_and_numbers_enabled.setter def platform_setting_user_password_require_letters_and_numbers_enabled(self, platform_setting_user_password_require_letters_and_numbers_enabled): """Sets the platform_setting_user_password_require_letters_and_numbers_enabled of this SystemSettings. User password requires both letters and numbers # noqa: E501 :param platform_setting_user_password_require_letters_and_numbers_enabled: The platform_setting_user_password_require_letters_and_numbers_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_user_password_require_letters_and_numbers_enabled = platform_setting_user_password_require_letters_and_numbers_enabled @property def platform_setting_managed_detect_response_enabled(self): """Gets the platform_setting_managed_detect_response_enabled of this SystemSettings. # noqa: E501 Enable the MDR service # noqa: E501 :return: The platform_setting_managed_detect_response_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_managed_detect_response_enabled @platform_setting_managed_detect_response_enabled.setter def platform_setting_managed_detect_response_enabled(self, platform_setting_managed_detect_response_enabled): """Sets the platform_setting_managed_detect_response_enabled of this SystemSettings. Enable the MDR service # noqa: E501 :param platform_setting_managed_detect_response_enabled: The platform_setting_managed_detect_response_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_managed_detect_response_enabled = platform_setting_managed_detect_response_enabled @property def platform_setting_update_rules_policy_auto_apply_enabled(self): """Gets the platform_setting_update_rules_policy_auto_apply_enabled of this SystemSettings. # noqa: E501 Automatically apply Rule Updates to Policies # noqa: E501 :return: The platform_setting_update_rules_policy_auto_apply_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_update_rules_policy_auto_apply_enabled @platform_setting_update_rules_policy_auto_apply_enabled.setter def platform_setting_update_rules_policy_auto_apply_enabled(self, platform_setting_update_rules_policy_auto_apply_enabled): """Sets the platform_setting_update_rules_policy_auto_apply_enabled of this SystemSettings. Automatically apply Rule Updates to Policies # noqa: E501 :param platform_setting_update_rules_policy_auto_apply_enabled: The platform_setting_update_rules_policy_auto_apply_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_update_rules_policy_auto_apply_enabled = platform_setting_update_rules_policy_auto_apply_enabled @property def platform_setting_user_password_require_not_same_as_username_enabled(self): """Gets the platform_setting_user_password_require_not_same_as_username_enabled of this SystemSettings. # noqa: E501 User password cannot match username or username spelled backward # noqa: E501 :return: The platform_setting_user_password_require_not_same_as_username_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_user_password_require_not_same_as_username_enabled @platform_setting_user_password_require_not_same_as_username_enabled.setter def platform_setting_user_password_require_not_same_as_username_enabled(self, platform_setting_user_password_require_not_same_as_username_enabled): """Sets the platform_setting_user_password_require_not_same_as_username_enabled of this SystemSettings. User password cannot match username or username spelled backward # noqa: E501 :param platform_setting_user_password_require_not_same_as_username_enabled: The platform_setting_user_password_require_not_same_as_username_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_user_password_require_not_same_as_username_enabled = platform_setting_user_password_require_not_same_as_username_enabled @property def log_inspection_setting_event_rank_severity_medium(self): """Gets the log_inspection_setting_event_rank_severity_medium of this SystemSettings. # noqa: E501 Medium # noqa: E501 :return: The log_inspection_setting_event_rank_severity_medium of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._log_inspection_setting_event_rank_severity_medium @log_inspection_setting_event_rank_severity_medium.setter def log_inspection_setting_event_rank_severity_medium(self, log_inspection_setting_event_rank_severity_medium): """Sets the log_inspection_setting_event_rank_severity_medium of this SystemSettings. Medium # noqa: E501 :param log_inspection_setting_event_rank_severity_medium: The log_inspection_setting_event_rank_severity_medium of this SystemSettings. # noqa: E501 :type: SettingValue """ self._log_inspection_setting_event_rank_severity_medium = log_inspection_setting_event_rank_severity_medium @property def anti_malware_setting_retain_event_duration(self): """Gets the anti_malware_setting_retain_event_duration of this SystemSettings. # noqa: E501 Automatically delete Anti-Malware Events older than # noqa: E501 :return: The anti_malware_setting_retain_event_duration of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._anti_malware_setting_retain_event_duration @anti_malware_setting_retain_event_duration.setter def anti_malware_setting_retain_event_duration(self, anti_malware_setting_retain_event_duration): """Sets the anti_malware_setting_retain_event_duration of this SystemSettings. Automatically delete Anti-Malware Events older than # noqa: E501 :param anti_malware_setting_retain_event_duration: The anti_malware_setting_retain_event_duration of this SystemSettings. # noqa: E501 :type: SettingValue """ self._anti_malware_setting_retain_event_duration = anti_malware_setting_retain_event_duration @property def platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled(self): """Gets the platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled of this SystemSettings. # noqa: E501 Allow Agents/Appliances to download security updates directly from Primary Security Update Source if Relays are not accessible # noqa: E501 :return: The platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled @platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled.setter def platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled(self, platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled): """Sets the platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled of this SystemSettings. Allow Agents/Appliances to download security updates directly from Primary Security Update Source if Relays are not accessible # noqa: E501 :param platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled: The platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled = platform_setting_update_agent_security_contact_primary_source_on_missing_relay_enabled @property def firewall_setting_event_rank_severity_log_only(self): """Gets the firewall_setting_event_rank_severity_log_only of this SystemSettings. # noqa: E501 Log Only # noqa: E501 :return: The firewall_setting_event_rank_severity_log_only of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._firewall_setting_event_rank_severity_log_only @firewall_setting_event_rank_severity_log_only.setter def firewall_setting_event_rank_severity_log_only(self, firewall_setting_event_rank_severity_log_only): """Sets the firewall_setting_event_rank_severity_log_only of this SystemSettings. Log Only # noqa: E501 :param firewall_setting_event_rank_severity_log_only: The firewall_setting_event_rank_severity_log_only of this SystemSettings. # noqa: E501 :type: SettingValue """ self._firewall_setting_event_rank_severity_log_only = firewall_setting_event_rank_severity_log_only @property def application_control_setting_retain_event_duration(self): """Gets the application_control_setting_retain_event_duration of this SystemSettings. # noqa: E501 Automatically delete Application Control Events older than # noqa: E501 :return: The application_control_setting_retain_event_duration of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._application_control_setting_retain_event_duration @application_control_setting_retain_event_duration.setter def application_control_setting_retain_event_duration(self, application_control_setting_retain_event_duration): """Sets the application_control_setting_retain_event_duration of this SystemSettings. Automatically delete Application Control Events older than # noqa: E501 :param application_control_setting_retain_event_duration: The application_control_setting_retain_event_duration of this SystemSettings. # noqa: E501 :type: SettingValue """ self._application_control_setting_retain_event_duration = application_control_setting_retain_event_duration @property def platform_setting_windows_upgrade_on_activation_enabled(self): """Gets the platform_setting_windows_upgrade_on_activation_enabled of this SystemSettings. # noqa: E501 Automatically upgrade Windows agents on activation # noqa: E501 :return: The platform_setting_windows_upgrade_on_activation_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_windows_upgrade_on_activation_enabled @platform_setting_windows_upgrade_on_activation_enabled.setter def platform_setting_windows_upgrade_on_activation_enabled(self, platform_setting_windows_upgrade_on_activation_enabled): """Sets the platform_setting_windows_upgrade_on_activation_enabled of this SystemSettings. Automatically upgrade Windows agents on activation # noqa: E501 :param platform_setting_windows_upgrade_on_activation_enabled: The platform_setting_windows_upgrade_on_activation_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_windows_upgrade_on_activation_enabled = platform_setting_windows_upgrade_on_activation_enabled @property def platform_setting_system_event_forwarding_snmp_port(self): """Gets the platform_setting_system_event_forwarding_snmp_port of this SystemSettings. # noqa: E501 UDP port to which events should be sent # noqa: E501 :return: The platform_setting_system_event_forwarding_snmp_port of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_system_event_forwarding_snmp_port @platform_setting_system_event_forwarding_snmp_port.setter def platform_setting_system_event_forwarding_snmp_port(self, platform_setting_system_event_forwarding_snmp_port): """Sets the platform_setting_system_event_forwarding_snmp_port of this SystemSettings. UDP port to which events should be sent # noqa: E501 :param platform_setting_system_event_forwarding_snmp_port: The platform_setting_system_event_forwarding_snmp_port of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_system_event_forwarding_snmp_port = platform_setting_system_event_forwarding_snmp_port @property def firewall_setting_event_rank_severity_deny(self): """Gets the firewall_setting_event_rank_severity_deny of this SystemSettings. # noqa: E501 Deny # noqa: E501 :return: The firewall_setting_event_rank_severity_deny of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._firewall_setting_event_rank_severity_deny @firewall_setting_event_rank_severity_deny.setter def firewall_setting_event_rank_severity_deny(self, firewall_setting_event_rank_severity_deny): """Sets the firewall_setting_event_rank_severity_deny of this SystemSettings. Deny # noqa: E501 :param firewall_setting_event_rank_severity_deny: The firewall_setting_event_rank_severity_deny of this SystemSettings. # noqa: E501 :type: SettingValue """ self._firewall_setting_event_rank_severity_deny = firewall_setting_event_rank_severity_deny @property def intrusion_prevention_setting_event_rank_severity_filter_low(self): """Gets the intrusion_prevention_setting_event_rank_severity_filter_low of this SystemSettings. # noqa: E501 Low # noqa: E501 :return: The intrusion_prevention_setting_event_rank_severity_filter_low of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._intrusion_prevention_setting_event_rank_severity_filter_low @intrusion_prevention_setting_event_rank_severity_filter_low.setter def intrusion_prevention_setting_event_rank_severity_filter_low(self, intrusion_prevention_setting_event_rank_severity_filter_low): """Sets the intrusion_prevention_setting_event_rank_severity_filter_low of this SystemSettings. Low # noqa: E501 :param intrusion_prevention_setting_event_rank_severity_filter_low: The intrusion_prevention_setting_event_rank_severity_filter_low of this SystemSettings. # noqa: E501 :type: SettingValue """ self._intrusion_prevention_setting_event_rank_severity_filter_low = intrusion_prevention_setting_event_rank_severity_filter_low @property def platform_setting_managed_detect_response_service_token(self): """Gets the platform_setting_managed_detect_response_service_token of this SystemSettings. # noqa: E501 Data Source GUID # noqa: E501 :return: The platform_setting_managed_detect_response_service_token of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_managed_detect_response_service_token @platform_setting_managed_detect_response_service_token.setter def platform_setting_managed_detect_response_service_token(self, platform_setting_managed_detect_response_service_token): """Sets the platform_setting_managed_detect_response_service_token of this SystemSettings. Data Source GUID # noqa: E501 :param platform_setting_managed_detect_response_service_token: The platform_setting_managed_detect_response_service_token of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_managed_detect_response_service_token = platform_setting_managed_detect_response_service_token @property def platform_setting_trend_micro_xdr_api_user(self): """Gets the platform_setting_trend_micro_xdr_api_user of this SystemSettings. # noqa: E501 API User # noqa: E501 :return: The platform_setting_trend_micro_xdr_api_user of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_trend_micro_xdr_api_user @platform_setting_trend_micro_xdr_api_user.setter def platform_setting_trend_micro_xdr_api_user(self, platform_setting_trend_micro_xdr_api_user): """Sets the platform_setting_trend_micro_xdr_api_user of this SystemSettings. API User # noqa: E501 :param platform_setting_trend_micro_xdr_api_user: The platform_setting_trend_micro_xdr_api_user of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_trend_micro_xdr_api_user = platform_setting_trend_micro_xdr_api_user @property def log_inspection_setting_retain_event_duration(self): """Gets the log_inspection_setting_retain_event_duration of this SystemSettings. # noqa: E501 Automatically delete Log Inspection Events older than # noqa: E501 :return: The log_inspection_setting_retain_event_duration of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._log_inspection_setting_retain_event_duration @log_inspection_setting_retain_event_duration.setter def log_inspection_setting_retain_event_duration(self, log_inspection_setting_retain_event_duration): """Sets the log_inspection_setting_retain_event_duration of this SystemSettings. Automatically delete Log Inspection Events older than # noqa: E501 :param log_inspection_setting_retain_event_duration: The log_inspection_setting_retain_event_duration of this SystemSettings. # noqa: E501 :type: SettingValue """ self._log_inspection_setting_retain_event_duration = log_inspection_setting_retain_event_duration @property def platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled(self): """Gets the platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled of this SystemSettings. # noqa: E501 Automatically revoke Primary Tenant access after # noqa: E501 :return: The platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled @platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled.setter def platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled(self, platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled): """Sets the platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled of this SystemSettings. Automatically revoke Primary Tenant access after # noqa: E501 :param platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled: The platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled = platform_setting_tenant_auto_revoke_impersonation_by_primary_tenant_enabled @property def anti_malware_setting_event_email_body_template(self): """Gets the anti_malware_setting_event_email_body_template of this SystemSettings. # noqa: E501 Email Template # noqa: E501 :return: The anti_malware_setting_event_email_body_template of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._anti_malware_setting_event_email_body_template @anti_malware_setting_event_email_body_template.setter def anti_malware_setting_event_email_body_template(self, anti_malware_setting_event_email_body_template): """Sets the anti_malware_setting_event_email_body_template of this SystemSettings. Email Template # noqa: E501 :param anti_malware_setting_event_email_body_template: The anti_malware_setting_event_email_body_template of this SystemSettings. # noqa: E501 :type: SettingValue """ self._anti_malware_setting_event_email_body_template = anti_malware_setting_event_email_body_template @property def platform_setting_retain_security_updates_max(self): """Gets the platform_setting_retain_security_updates_max of this SystemSettings. # noqa: E501 Number of older Rule Updates to keep # noqa: E501 :return: The platform_setting_retain_security_updates_max of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_retain_security_updates_max @platform_setting_retain_security_updates_max.setter def platform_setting_retain_security_updates_max(self, platform_setting_retain_security_updates_max): """Sets the platform_setting_retain_security_updates_max of this SystemSettings. Number of older Rule Updates to keep # noqa: E501 :param platform_setting_retain_security_updates_max: The platform_setting_retain_security_updates_max of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_retain_security_updates_max = platform_setting_retain_security_updates_max @property def platform_setting_connected_threat_defense_control_manager_source_option(self): """Gets the platform_setting_connected_threat_defense_control_manager_source_option of this SystemSettings. # noqa: E501 Suspicious Object List Source # noqa: E501 :return: The platform_setting_connected_threat_defense_control_manager_source_option of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_connected_threat_defense_control_manager_source_option @platform_setting_connected_threat_defense_control_manager_source_option.setter def platform_setting_connected_threat_defense_control_manager_source_option(self, platform_setting_connected_threat_defense_control_manager_source_option): """Sets the platform_setting_connected_threat_defense_control_manager_source_option of this SystemSettings. Suspicious Object List Source # noqa: E501 :param platform_setting_connected_threat_defense_control_manager_source_option: The platform_setting_connected_threat_defense_control_manager_source_option of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_connected_threat_defense_control_manager_source_option = platform_setting_connected_threat_defense_control_manager_source_option @property def anti_malware_setting_event_email_enabled(self): """Gets the anti_malware_setting_event_email_enabled of this SystemSettings. # noqa: E501 Anti-Malware Email Notifications Enabled # noqa: E501 :return: The anti_malware_setting_event_email_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._anti_malware_setting_event_email_enabled @anti_malware_setting_event_email_enabled.setter def anti_malware_setting_event_email_enabled(self, anti_malware_setting_event_email_enabled): """Sets the anti_malware_setting_event_email_enabled of this SystemSettings. Anti-Malware Email Notifications Enabled # noqa: E501 :param anti_malware_setting_event_email_enabled: The anti_malware_setting_event_email_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._anti_malware_setting_event_email_enabled = anti_malware_setting_event_email_enabled @property def platform_setting_recommendation_ongoing_scans_enabled(self): """Gets the platform_setting_recommendation_ongoing_scans_enabled of this SystemSettings. # noqa: E501 Perform ongoing Recommendation Scans # noqa: E501 :return: The platform_setting_recommendation_ongoing_scans_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_recommendation_ongoing_scans_enabled @platform_setting_recommendation_ongoing_scans_enabled.setter def platform_setting_recommendation_ongoing_scans_enabled(self, platform_setting_recommendation_ongoing_scans_enabled): """Sets the platform_setting_recommendation_ongoing_scans_enabled of this SystemSettings. Perform ongoing Recommendation Scans # noqa: E501 :param platform_setting_recommendation_ongoing_scans_enabled: The platform_setting_recommendation_ongoing_scans_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_recommendation_ongoing_scans_enabled = platform_setting_recommendation_ongoing_scans_enabled @property def platform_setting_user_password_length_min(self): """Gets the platform_setting_user_password_length_min of this SystemSettings. # noqa: E501 User password minimum length # noqa: E501 :return: The platform_setting_user_password_length_min of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_user_password_length_min @platform_setting_user_password_length_min.setter def platform_setting_user_password_length_min(self, platform_setting_user_password_length_min): """Sets the platform_setting_user_password_length_min of this SystemSettings. User password minimum length # noqa: E501 :param platform_setting_user_password_length_min: The platform_setting_user_password_length_min of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_user_password_length_min = platform_setting_user_password_length_min @property def platform_setting_aws_manager_identity_use_instance_role_enabled(self): """Gets the platform_setting_aws_manager_identity_use_instance_role_enabled of this SystemSettings. # noqa: E501 Use Instance Role # noqa: E501 :return: The platform_setting_aws_manager_identity_use_instance_role_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_aws_manager_identity_use_instance_role_enabled @platform_setting_aws_manager_identity_use_instance_role_enabled.setter def platform_setting_aws_manager_identity_use_instance_role_enabled(self, platform_setting_aws_manager_identity_use_instance_role_enabled): """Sets the platform_setting_aws_manager_identity_use_instance_role_enabled of this SystemSettings. Use Instance Role # noqa: E501 :param platform_setting_aws_manager_identity_use_instance_role_enabled: The platform_setting_aws_manager_identity_use_instance_role_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_aws_manager_identity_use_instance_role_enabled = platform_setting_aws_manager_identity_use_instance_role_enabled @property def platform_setting_alert_agent_update_pending_threshold(self): """Gets the platform_setting_alert_agent_update_pending_threshold of this SystemSettings. # noqa: E501 Length of time an Update can be pending before raising an Alert # noqa: E501 :return: The platform_setting_alert_agent_update_pending_threshold of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_alert_agent_update_pending_threshold @platform_setting_alert_agent_update_pending_threshold.setter def platform_setting_alert_agent_update_pending_threshold(self, platform_setting_alert_agent_update_pending_threshold): """Sets the platform_setting_alert_agent_update_pending_threshold of this SystemSettings. Length of time an Update can be pending before raising an Alert # noqa: E501 :param platform_setting_alert_agent_update_pending_threshold: The platform_setting_alert_agent_update_pending_threshold of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_alert_agent_update_pending_threshold = platform_setting_alert_agent_update_pending_threshold @property def platform_setting_user_password_require_special_characters_enabled(self): """Gets the platform_setting_user_password_require_special_characters_enabled of this SystemSettings. # noqa: E501 User password requires non-alphanumeric characters # noqa: E501 :return: The platform_setting_user_password_require_special_characters_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_user_password_require_special_characters_enabled @platform_setting_user_password_require_special_characters_enabled.setter def platform_setting_user_password_require_special_characters_enabled(self, platform_setting_user_password_require_special_characters_enabled): """Sets the platform_setting_user_password_require_special_characters_enabled of this SystemSettings. User password requires non-alphanumeric characters # noqa: E501 :param platform_setting_user_password_require_special_characters_enabled: The platform_setting_user_password_require_special_characters_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_user_password_require_special_characters_enabled = platform_setting_user_password_require_special_characters_enabled @property def platform_setting_update_appliance_default_agent_version(self): """Gets the platform_setting_update_appliance_default_agent_version of this SystemSettings. # noqa: E501 Upon deployment, update Deep Security Virtual Appliances to # noqa: E501 :return: The platform_setting_update_appliance_default_agent_version of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_update_appliance_default_agent_version @platform_setting_update_appliance_default_agent_version.setter def platform_setting_update_appliance_default_agent_version(self, platform_setting_update_appliance_default_agent_version): """Sets the platform_setting_update_appliance_default_agent_version of this SystemSettings. Upon deployment, update Deep Security Virtual Appliances to # noqa: E501 :param platform_setting_update_appliance_default_agent_version: The platform_setting_update_appliance_default_agent_version of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_update_appliance_default_agent_version = platform_setting_update_appliance_default_agent_version @property def platform_setting_system_event_forwarding_snmp_enabled(self): """Gets the platform_setting_system_event_forwarding_snmp_enabled of this SystemSettings. # noqa: E501 Forward System Events to a remote computer (via SNMP) # noqa: E501 :return: The platform_setting_system_event_forwarding_snmp_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_system_event_forwarding_snmp_enabled @platform_setting_system_event_forwarding_snmp_enabled.setter def platform_setting_system_event_forwarding_snmp_enabled(self, platform_setting_system_event_forwarding_snmp_enabled): """Sets the platform_setting_system_event_forwarding_snmp_enabled of this SystemSettings. Forward System Events to a remote computer (via SNMP) # noqa: E501 :param platform_setting_system_event_forwarding_snmp_enabled: The platform_setting_system_event_forwarding_snmp_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_system_event_forwarding_snmp_enabled = platform_setting_system_event_forwarding_snmp_enabled @property def platform_setting_smtp_bounce_email_address(self): """Gets the platform_setting_smtp_bounce_email_address of this SystemSettings. # noqa: E501 \"Bounce\" email address (optional) - The email address to which delivery failure notifications should be sent # noqa: E501 :return: The platform_setting_smtp_bounce_email_address of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smtp_bounce_email_address @platform_setting_smtp_bounce_email_address.setter def platform_setting_smtp_bounce_email_address(self, platform_setting_smtp_bounce_email_address): """Sets the platform_setting_smtp_bounce_email_address of this SystemSettings. \"Bounce\" email address (optional) - The email address to which delivery failure notifications should be sent # noqa: E501 :param platform_setting_smtp_bounce_email_address: The platform_setting_smtp_bounce_email_address of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smtp_bounce_email_address = platform_setting_smtp_bounce_email_address @property def platform_setting_update_relay_security_support_agent9_and_earlier_enabled(self): """Gets the platform_setting_update_relay_security_support_agent9_and_earlier_enabled of this SystemSettings. # noqa: E501 Allow supported 8.0 and 9.0 Agents to be updated # noqa: E501 :return: The platform_setting_update_relay_security_support_agent9_and_earlier_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_update_relay_security_support_agent9_and_earlier_enabled @platform_setting_update_relay_security_support_agent9_and_earlier_enabled.setter def platform_setting_update_relay_security_support_agent9_and_earlier_enabled(self, platform_setting_update_relay_security_support_agent9_and_earlier_enabled): """Sets the platform_setting_update_relay_security_support_agent9_and_earlier_enabled of this SystemSettings. Allow supported 8.0 and 9.0 Agents to be updated # noqa: E501 :param platform_setting_update_relay_security_support_agent9_and_earlier_enabled: The platform_setting_update_relay_security_support_agent9_and_earlier_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_update_relay_security_support_agent9_and_earlier_enabled = platform_setting_update_relay_security_support_agent9_and_earlier_enabled @property def platform_setting_managed_detect_response_proxy_id(self): """Gets the platform_setting_managed_detect_response_proxy_id of this SystemSettings. # noqa: E501 Use Proxy when accessing MDR server # noqa: E501 :return: The platform_setting_managed_detect_response_proxy_id of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_managed_detect_response_proxy_id @platform_setting_managed_detect_response_proxy_id.setter def platform_setting_managed_detect_response_proxy_id(self, platform_setting_managed_detect_response_proxy_id): """Sets the platform_setting_managed_detect_response_proxy_id of this SystemSettings. Use Proxy when accessing MDR server # noqa: E501 :param platform_setting_managed_detect_response_proxy_id: The platform_setting_managed_detect_response_proxy_id of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_managed_detect_response_proxy_id = platform_setting_managed_detect_response_proxy_id @property def platform_setting_trend_micro_xdr_log_server_url(self): """Gets the platform_setting_trend_micro_xdr_log_server_url of this SystemSettings. # noqa: E501 Log Server URL # noqa: E501 :return: The platform_setting_trend_micro_xdr_log_server_url of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_trend_micro_xdr_log_server_url @platform_setting_trend_micro_xdr_log_server_url.setter def platform_setting_trend_micro_xdr_log_server_url(self, platform_setting_trend_micro_xdr_log_server_url): """Sets the platform_setting_trend_micro_xdr_log_server_url of this SystemSettings. Log Server URL # noqa: E501 :param platform_setting_trend_micro_xdr_log_server_url: The platform_setting_trend_micro_xdr_log_server_url of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_trend_micro_xdr_log_server_url = platform_setting_trend_micro_xdr_log_server_url @property def platform_setting_inactive_agent_cleanup_enabled(self): """Gets the platform_setting_inactive_agent_cleanup_enabled of this SystemSettings. # noqa: E501 Delete Agents that have been inactive for: # noqa: E501 :return: The platform_setting_inactive_agent_cleanup_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_inactive_agent_cleanup_enabled @platform_setting_inactive_agent_cleanup_enabled.setter def platform_setting_inactive_agent_cleanup_enabled(self, platform_setting_inactive_agent_cleanup_enabled): """Sets the platform_setting_inactive_agent_cleanup_enabled of this SystemSettings. Delete Agents that have been inactive for: # noqa: E501 :param platform_setting_inactive_agent_cleanup_enabled: The platform_setting_inactive_agent_cleanup_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_inactive_agent_cleanup_enabled = platform_setting_inactive_agent_cleanup_enabled @property def platform_setting_user_session_idle_timeout(self): """Gets the platform_setting_user_session_idle_timeout of this SystemSettings. # noqa: E501 Session idle timeout # noqa: E501 :return: The platform_setting_user_session_idle_timeout of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_user_session_idle_timeout @platform_setting_user_session_idle_timeout.setter def platform_setting_user_session_idle_timeout(self, platform_setting_user_session_idle_timeout): """Sets the platform_setting_user_session_idle_timeout of this SystemSettings. Session idle timeout # noqa: E501 :param platform_setting_user_session_idle_timeout: The platform_setting_user_session_idle_timeout of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_user_session_idle_timeout = platform_setting_user_session_idle_timeout @property def anti_malware_setting_event_email_subject(self): """Gets the anti_malware_setting_event_email_subject of this SystemSettings. # noqa: E501 Email Subject Text # noqa: E501 :return: The anti_malware_setting_event_email_subject of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._anti_malware_setting_event_email_subject @anti_malware_setting_event_email_subject.setter def anti_malware_setting_event_email_subject(self, anti_malware_setting_event_email_subject): """Sets the anti_malware_setting_event_email_subject of this SystemSettings. Email Subject Text # noqa: E501 :param anti_malware_setting_event_email_subject: The anti_malware_setting_event_email_subject of this SystemSettings. # noqa: E501 :type: SettingValue """ self._anti_malware_setting_event_email_subject = anti_malware_setting_event_email_subject @property def platform_setting_connected_threat_defense_control_manager_use_proxy_enabled(self): """Gets the platform_setting_connected_threat_defense_control_manager_use_proxy_enabled of this SystemSettings. # noqa: E501 When accessing Apex Central, use proxy: # noqa: E501 :return: The platform_setting_connected_threat_defense_control_manager_use_proxy_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_connected_threat_defense_control_manager_use_proxy_enabled @platform_setting_connected_threat_defense_control_manager_use_proxy_enabled.setter def platform_setting_connected_threat_defense_control_manager_use_proxy_enabled(self, platform_setting_connected_threat_defense_control_manager_use_proxy_enabled): """Sets the platform_setting_connected_threat_defense_control_manager_use_proxy_enabled of this SystemSettings. When accessing Apex Central, use proxy: # noqa: E501 :param platform_setting_connected_threat_defense_control_manager_use_proxy_enabled: The platform_setting_connected_threat_defense_control_manager_use_proxy_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_connected_threat_defense_control_manager_use_proxy_enabled = platform_setting_connected_threat_defense_control_manager_use_proxy_enabled @property def platform_setting_aws_manager_identity_access_key(self): """Gets the platform_setting_aws_manager_identity_access_key of this SystemSettings. # noqa: E501 Access Key - The Access Key of an AWS User used for the manager identity # noqa: E501 :return: The platform_setting_aws_manager_identity_access_key of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_aws_manager_identity_access_key @platform_setting_aws_manager_identity_access_key.setter def platform_setting_aws_manager_identity_access_key(self, platform_setting_aws_manager_identity_access_key): """Sets the platform_setting_aws_manager_identity_access_key of this SystemSettings. Access Key - The Access Key of an AWS User used for the manager identity # noqa: E501 :param platform_setting_aws_manager_identity_access_key: The platform_setting_aws_manager_identity_access_key of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_aws_manager_identity_access_key = platform_setting_aws_manager_identity_access_key @property def platform_setting_connected_threat_defense_control_manager_proxy_id(self): """Gets the platform_setting_connected_threat_defense_control_manager_proxy_id of this SystemSettings. # noqa: E501 Use Proxy when accessing Apex Central # noqa: E501 :return: The platform_setting_connected_threat_defense_control_manager_proxy_id of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_connected_threat_defense_control_manager_proxy_id @platform_setting_connected_threat_defense_control_manager_proxy_id.setter def platform_setting_connected_threat_defense_control_manager_proxy_id(self, platform_setting_connected_threat_defense_control_manager_proxy_id): """Sets the platform_setting_connected_threat_defense_control_manager_proxy_id of this SystemSettings. Use Proxy when accessing Apex Central # noqa: E501 :param platform_setting_connected_threat_defense_control_manager_proxy_id: The platform_setting_connected_threat_defense_control_manager_proxy_id of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_connected_threat_defense_control_manager_proxy_id = platform_setting_connected_threat_defense_control_manager_proxy_id @property def platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled(self): """Gets the platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled of this SystemSettings. # noqa: E501 Allow Primary Tenant access to my Deep Security Environment # noqa: E501 :return: The platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled @platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled.setter def platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled(self, platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled): """Sets the platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled of this SystemSettings. Allow Primary Tenant access to my Deep Security Environment # noqa: E501 :param platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled: The platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled = platform_setting_tenant_allow_impersonation_by_primary_tenant_enabled @property def platform_setting_connected_threat_defense_control_manager_manual_source_server_url(self): """Gets the platform_setting_connected_threat_defense_control_manager_manual_source_server_url of this SystemSettings. # noqa: E501 Server URL (ex: \"https://[server]/webapp\") # noqa: E501 :return: The platform_setting_connected_threat_defense_control_manager_manual_source_server_url of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_connected_threat_defense_control_manager_manual_source_server_url @platform_setting_connected_threat_defense_control_manager_manual_source_server_url.setter def platform_setting_connected_threat_defense_control_manager_manual_source_server_url(self, platform_setting_connected_threat_defense_control_manager_manual_source_server_url): """Sets the platform_setting_connected_threat_defense_control_manager_manual_source_server_url of this SystemSettings. Server URL (ex: \"https://[server]/webapp\") # noqa: E501 :param platform_setting_connected_threat_defense_control_manager_manual_source_server_url: The platform_setting_connected_threat_defense_control_manager_manual_source_server_url of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_connected_threat_defense_control_manager_manual_source_server_url = platform_setting_connected_threat_defense_control_manager_manual_source_server_url @property def platform_setting_user_password_require_mixed_case_enabled(self): """Gets the platform_setting_user_password_require_mixed_case_enabled of this SystemSettings. # noqa: E501 User password requires both upper and lower case characters # noqa: E501 :return: The platform_setting_user_password_require_mixed_case_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_user_password_require_mixed_case_enabled @platform_setting_user_password_require_mixed_case_enabled.setter def platform_setting_user_password_require_mixed_case_enabled(self, platform_setting_user_password_require_mixed_case_enabled): """Sets the platform_setting_user_password_require_mixed_case_enabled of this SystemSettings. User password requires both upper and lower case characters # noqa: E501 :param platform_setting_user_password_require_mixed_case_enabled: The platform_setting_user_password_require_mixed_case_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_user_password_require_mixed_case_enabled = platform_setting_user_password_require_mixed_case_enabled @property def platform_setting_trend_micro_xdr_identity_provider_api_url(self): """Gets the platform_setting_trend_micro_xdr_identity_provider_api_url of this SystemSettings. # noqa: E501 Service Platform Identity Provider API URL # noqa: E501 :return: The platform_setting_trend_micro_xdr_identity_provider_api_url of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_trend_micro_xdr_identity_provider_api_url @platform_setting_trend_micro_xdr_identity_provider_api_url.setter def platform_setting_trend_micro_xdr_identity_provider_api_url(self, platform_setting_trend_micro_xdr_identity_provider_api_url): """Sets the platform_setting_trend_micro_xdr_identity_provider_api_url of this SystemSettings. Service Platform Identity Provider API URL # noqa: E501 :param platform_setting_trend_micro_xdr_identity_provider_api_url: The platform_setting_trend_micro_xdr_identity_provider_api_url of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_trend_micro_xdr_identity_provider_api_url = platform_setting_trend_micro_xdr_identity_provider_api_url @property def platform_setting_smart_protection_feedback_for_suspicious_file_enabled(self): """Gets the platform_setting_smart_protection_feedback_for_suspicious_file_enabled of this SystemSettings. # noqa: E501 Send suspicious file signatures along with feedback # noqa: E501 :return: The platform_setting_smart_protection_feedback_for_suspicious_file_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smart_protection_feedback_for_suspicious_file_enabled @platform_setting_smart_protection_feedback_for_suspicious_file_enabled.setter def platform_setting_smart_protection_feedback_for_suspicious_file_enabled(self, platform_setting_smart_protection_feedback_for_suspicious_file_enabled): """Sets the platform_setting_smart_protection_feedback_for_suspicious_file_enabled of this SystemSettings. Send suspicious file signatures along with feedback # noqa: E501 :param platform_setting_smart_protection_feedback_for_suspicious_file_enabled: The platform_setting_smart_protection_feedback_for_suspicious_file_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smart_protection_feedback_for_suspicious_file_enabled = platform_setting_smart_protection_feedback_for_suspicious_file_enabled @property def platform_setting_smart_protection_feedback_industry_type(self): """Gets the platform_setting_smart_protection_feedback_industry_type of this SystemSettings. # noqa: E501 Your industry (optional): # noqa: E501 :return: The platform_setting_smart_protection_feedback_industry_type of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smart_protection_feedback_industry_type @platform_setting_smart_protection_feedback_industry_type.setter def platform_setting_smart_protection_feedback_industry_type(self, platform_setting_smart_protection_feedback_industry_type): """Sets the platform_setting_smart_protection_feedback_industry_type of this SystemSettings. Your industry (optional): # noqa: E501 :param platform_setting_smart_protection_feedback_industry_type: The platform_setting_smart_protection_feedback_industry_type of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smart_protection_feedback_industry_type = platform_setting_smart_protection_feedback_industry_type @property def web_reputation_setting_retain_event_duration(self): """Gets the web_reputation_setting_retain_event_duration of this SystemSettings. # noqa: E501 Automatically delete Web Reputation Events older than # noqa: E501 :return: The web_reputation_setting_retain_event_duration of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._web_reputation_setting_retain_event_duration @web_reputation_setting_retain_event_duration.setter def web_reputation_setting_retain_event_duration(self, web_reputation_setting_retain_event_duration): """Sets the web_reputation_setting_retain_event_duration of this SystemSettings. Automatically delete Web Reputation Events older than # noqa: E501 :param web_reputation_setting_retain_event_duration: The web_reputation_setting_retain_event_duration of this SystemSettings. # noqa: E501 :type: SettingValue """ self._web_reputation_setting_retain_event_duration = web_reputation_setting_retain_event_duration @property def integrity_monitoring_setting_event_rank_severity_medium(self): """Gets the integrity_monitoring_setting_event_rank_severity_medium of this SystemSettings. # noqa: E501 Medium # noqa: E501 :return: The integrity_monitoring_setting_event_rank_severity_medium of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._integrity_monitoring_setting_event_rank_severity_medium @integrity_monitoring_setting_event_rank_severity_medium.setter def integrity_monitoring_setting_event_rank_severity_medium(self, integrity_monitoring_setting_event_rank_severity_medium): """Sets the integrity_monitoring_setting_event_rank_severity_medium of this SystemSettings. Medium # noqa: E501 :param integrity_monitoring_setting_event_rank_severity_medium: The integrity_monitoring_setting_event_rank_severity_medium of this SystemSettings. # noqa: E501 :type: SettingValue """ self._integrity_monitoring_setting_event_rank_severity_medium = integrity_monitoring_setting_event_rank_severity_medium @property def platform_setting_update_relay_security_all_regions_patterns_download_enabled(self): """Gets the platform_setting_update_relay_security_all_regions_patterns_download_enabled of this SystemSettings. # noqa: E501 Download Patterns for all Regions # noqa: E501 :return: The platform_setting_update_relay_security_all_regions_patterns_download_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_update_relay_security_all_regions_patterns_download_enabled @platform_setting_update_relay_security_all_regions_patterns_download_enabled.setter def platform_setting_update_relay_security_all_regions_patterns_download_enabled(self, platform_setting_update_relay_security_all_regions_patterns_download_enabled): """Sets the platform_setting_update_relay_security_all_regions_patterns_download_enabled of this SystemSettings. Download Patterns for all Regions # noqa: E501 :param platform_setting_update_relay_security_all_regions_patterns_download_enabled: The platform_setting_update_relay_security_all_regions_patterns_download_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_update_relay_security_all_regions_patterns_download_enabled = platform_setting_update_relay_security_all_regions_patterns_download_enabled @property def platform_setting_ddan_submission_enabled(self): """Gets the platform_setting_ddan_submission_enabled of this SystemSettings. # noqa: E501 Enable submission of suspicious files to Deep Discovery Analyzer # noqa: E501 :return: The platform_setting_ddan_submission_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_ddan_submission_enabled @platform_setting_ddan_submission_enabled.setter def platform_setting_ddan_submission_enabled(self, platform_setting_ddan_submission_enabled): """Sets the platform_setting_ddan_submission_enabled of this SystemSettings. Enable submission of suspicious files to Deep Discovery Analyzer # noqa: E501 :param platform_setting_ddan_submission_enabled: The platform_setting_ddan_submission_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_ddan_submission_enabled = platform_setting_ddan_submission_enabled @property def web_reputation_setting_event_rank_risk_suspicious(self): """Gets the web_reputation_setting_event_rank_risk_suspicious of this SystemSettings. # noqa: E501 Suspicious # noqa: E501 :return: The web_reputation_setting_event_rank_risk_suspicious of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._web_reputation_setting_event_rank_risk_suspicious @web_reputation_setting_event_rank_risk_suspicious.setter def web_reputation_setting_event_rank_risk_suspicious(self, web_reputation_setting_event_rank_risk_suspicious): """Sets the web_reputation_setting_event_rank_risk_suspicious of this SystemSettings. Suspicious # noqa: E501 :param web_reputation_setting_event_rank_risk_suspicious: The web_reputation_setting_event_rank_risk_suspicious of this SystemSettings. # noqa: E501 :type: SettingValue """ self._web_reputation_setting_event_rank_risk_suspicious = web_reputation_setting_event_rank_risk_suspicious @property def integrity_monitoring_setting_event_rank_severity_critical(self): """Gets the integrity_monitoring_setting_event_rank_severity_critical of this SystemSettings. # noqa: E501 Critical # noqa: E501 :return: The integrity_monitoring_setting_event_rank_severity_critical of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._integrity_monitoring_setting_event_rank_severity_critical @integrity_monitoring_setting_event_rank_severity_critical.setter def integrity_monitoring_setting_event_rank_severity_critical(self, integrity_monitoring_setting_event_rank_severity_critical): """Sets the integrity_monitoring_setting_event_rank_severity_critical of this SystemSettings. Critical # noqa: E501 :param integrity_monitoring_setting_event_rank_severity_critical: The integrity_monitoring_setting_event_rank_severity_critical of this SystemSettings. # noqa: E501 :type: SettingValue """ self._integrity_monitoring_setting_event_rank_severity_critical = integrity_monitoring_setting_event_rank_severity_critical @property def platform_setting_smtp_from_email_address(self): """Gets the platform_setting_smtp_from_email_address of this SystemSettings. # noqa: E501 \"From\" email address - The email address from which outgoing emails should be sent # noqa: E501 :return: The platform_setting_smtp_from_email_address of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smtp_from_email_address @platform_setting_smtp_from_email_address.setter def platform_setting_smtp_from_email_address(self, platform_setting_smtp_from_email_address): """Sets the platform_setting_smtp_from_email_address of this SystemSettings. \"From\" email address - The email address from which outgoing emails should be sent # noqa: E501 :param platform_setting_smtp_from_email_address: The platform_setting_smtp_from_email_address of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smtp_from_email_address = platform_setting_smtp_from_email_address @property def firewall_setting_global_stateful_config_id(self): """Gets the firewall_setting_global_stateful_config_id of this SystemSettings. # noqa: E501 Global Firewall Stateful Configuration # noqa: E501 :return: The firewall_setting_global_stateful_config_id of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._firewall_setting_global_stateful_config_id @firewall_setting_global_stateful_config_id.setter def firewall_setting_global_stateful_config_id(self, firewall_setting_global_stateful_config_id): """Sets the firewall_setting_global_stateful_config_id of this SystemSettings. Global Firewall Stateful Configuration # noqa: E501 :param firewall_setting_global_stateful_config_id: The firewall_setting_global_stateful_config_id of this SystemSettings. # noqa: E501 :type: SettingValue """ self._firewall_setting_global_stateful_config_id = firewall_setting_global_stateful_config_id @property def platform_setting_event_forwarding_sns_topic_arn(self): """Gets the platform_setting_event_forwarding_sns_topic_arn of this SystemSettings. # noqa: E501 SNS Topic ARN # noqa: E501 :return: The platform_setting_event_forwarding_sns_topic_arn of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_event_forwarding_sns_topic_arn @platform_setting_event_forwarding_sns_topic_arn.setter def platform_setting_event_forwarding_sns_topic_arn(self, platform_setting_event_forwarding_sns_topic_arn): """Sets the platform_setting_event_forwarding_sns_topic_arn of this SystemSettings. SNS Topic ARN # noqa: E501 :param platform_setting_event_forwarding_sns_topic_arn: The platform_setting_event_forwarding_sns_topic_arn of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_event_forwarding_sns_topic_arn = platform_setting_event_forwarding_sns_topic_arn @property def firewall_setting_internet_connectivity_test_expected_content_regex(self): """Gets the firewall_setting_internet_connectivity_test_expected_content_regex of this SystemSettings. # noqa: E501 Regular Expression for returned content used to confirm Connectivity # noqa: E501 :return: The firewall_setting_internet_connectivity_test_expected_content_regex of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._firewall_setting_internet_connectivity_test_expected_content_regex @firewall_setting_internet_connectivity_test_expected_content_regex.setter def firewall_setting_internet_connectivity_test_expected_content_regex(self, firewall_setting_internet_connectivity_test_expected_content_regex): """Sets the firewall_setting_internet_connectivity_test_expected_content_regex of this SystemSettings. Regular Expression for returned content used to confirm Connectivity # noqa: E501 :param firewall_setting_internet_connectivity_test_expected_content_regex: The firewall_setting_internet_connectivity_test_expected_content_regex of this SystemSettings. # noqa: E501 :type: SettingValue """ self._firewall_setting_internet_connectivity_test_expected_content_regex = firewall_setting_internet_connectivity_test_expected_content_regex @property def platform_setting_connected_threat_defense_control_manager_manual_source_api_key(self): """Gets the platform_setting_connected_threat_defense_control_manager_manual_source_api_key of this SystemSettings. # noqa: E501 API Key # noqa: E501 :return: The platform_setting_connected_threat_defense_control_manager_manual_source_api_key of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_connected_threat_defense_control_manager_manual_source_api_key @platform_setting_connected_threat_defense_control_manager_manual_source_api_key.setter def platform_setting_connected_threat_defense_control_manager_manual_source_api_key(self, platform_setting_connected_threat_defense_control_manager_manual_source_api_key): """Sets the platform_setting_connected_threat_defense_control_manager_manual_source_api_key of this SystemSettings. API Key # noqa: E501 :param platform_setting_connected_threat_defense_control_manager_manual_source_api_key: The platform_setting_connected_threat_defense_control_manager_manual_source_api_key of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_connected_threat_defense_control_manager_manual_source_api_key = platform_setting_connected_threat_defense_control_manager_manual_source_api_key @property def platform_setting_update_security_primary_source_mode(self): """Gets the platform_setting_update_security_primary_source_mode of this SystemSettings. # noqa: E501 Relay Update Source # noqa: E501 :return: The platform_setting_update_security_primary_source_mode of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_update_security_primary_source_mode @platform_setting_update_security_primary_source_mode.setter def platform_setting_update_security_primary_source_mode(self, platform_setting_update_security_primary_source_mode): """Sets the platform_setting_update_security_primary_source_mode of this SystemSettings. Relay Update Source # noqa: E501 :param platform_setting_update_security_primary_source_mode: The platform_setting_update_security_primary_source_mode of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_update_security_primary_source_mode = platform_setting_update_security_primary_source_mode @property def web_reputation_setting_event_rank_risk_dangerous(self): """Gets the web_reputation_setting_event_rank_risk_dangerous of this SystemSettings. # noqa: E501 Dangerous # noqa: E501 :return: The web_reputation_setting_event_rank_risk_dangerous of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._web_reputation_setting_event_rank_risk_dangerous @web_reputation_setting_event_rank_risk_dangerous.setter def web_reputation_setting_event_rank_risk_dangerous(self, web_reputation_setting_event_rank_risk_dangerous): """Sets the web_reputation_setting_event_rank_risk_dangerous of this SystemSettings. Dangerous # noqa: E501 :param web_reputation_setting_event_rank_risk_dangerous: The web_reputation_setting_event_rank_risk_dangerous of this SystemSettings. # noqa: E501 :type: SettingValue """ self._web_reputation_setting_event_rank_risk_dangerous = web_reputation_setting_event_rank_risk_dangerous @property def platform_setting_user_hide_unlicensed_modules_enabled(self): """Gets the platform_setting_user_hide_unlicensed_modules_enabled of this SystemSettings. # noqa: E501 Hide unlicensed Protection Modules for new Users # noqa: E501 :return: The platform_setting_user_hide_unlicensed_modules_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_user_hide_unlicensed_modules_enabled @platform_setting_user_hide_unlicensed_modules_enabled.setter def platform_setting_user_hide_unlicensed_modules_enabled(self, platform_setting_user_hide_unlicensed_modules_enabled): """Sets the platform_setting_user_hide_unlicensed_modules_enabled of this SystemSettings. Hide unlicensed Protection Modules for new Users # noqa: E501 :param platform_setting_user_hide_unlicensed_modules_enabled: The platform_setting_user_hide_unlicensed_modules_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_user_hide_unlicensed_modules_enabled = platform_setting_user_hide_unlicensed_modules_enabled @property def platform_setting_capture_encrypted_traffic_enabled(self): """Gets the platform_setting_capture_encrypted_traffic_enabled of this SystemSettings. # noqa: E501 Allow packet data capture on encrypted traffic (SSL) # noqa: E501 :return: The platform_setting_capture_encrypted_traffic_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_capture_encrypted_traffic_enabled @platform_setting_capture_encrypted_traffic_enabled.setter def platform_setting_capture_encrypted_traffic_enabled(self, platform_setting_capture_encrypted_traffic_enabled): """Sets the platform_setting_capture_encrypted_traffic_enabled of this SystemSettings. Allow packet data capture on encrypted traffic (SSL) # noqa: E501 :param platform_setting_capture_encrypted_traffic_enabled: The platform_setting_capture_encrypted_traffic_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_capture_encrypted_traffic_enabled = platform_setting_capture_encrypted_traffic_enabled @property def platform_setting_retain_system_event_duration(self): """Gets the platform_setting_retain_system_event_duration of this SystemSettings. # noqa: E501 Automatically delete System Events older than # noqa: E501 :return: The platform_setting_retain_system_event_duration of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_retain_system_event_duration @platform_setting_retain_system_event_duration.setter def platform_setting_retain_system_event_duration(self, platform_setting_retain_system_event_duration): """Sets the platform_setting_retain_system_event_duration of this SystemSettings. Automatically delete System Events older than # noqa: E501 :param platform_setting_retain_system_event_duration: The platform_setting_retain_system_event_duration of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_retain_system_event_duration = platform_setting_retain_system_event_duration @property def platform_setting_user_password_expiry(self): """Gets the platform_setting_user_password_expiry of this SystemSettings. # noqa: E501 User password expires # noqa: E501 :return: The platform_setting_user_password_expiry of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_user_password_expiry @platform_setting_user_password_expiry.setter def platform_setting_user_password_expiry(self, platform_setting_user_password_expiry): """Sets the platform_setting_user_password_expiry of this SystemSettings. User password expires # noqa: E501 :param platform_setting_user_password_expiry: The platform_setting_user_password_expiry of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_user_password_expiry = platform_setting_user_password_expiry @property def platform_setting_smart_protection_feedback_enabled(self): """Gets the platform_setting_smart_protection_feedback_enabled of this SystemSettings. # noqa: E501 Enable Trend Micro Smart Feedback (recommended) # noqa: E501 :return: The platform_setting_smart_protection_feedback_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smart_protection_feedback_enabled @platform_setting_smart_protection_feedback_enabled.setter def platform_setting_smart_protection_feedback_enabled(self, platform_setting_smart_protection_feedback_enabled): """Sets the platform_setting_smart_protection_feedback_enabled of this SystemSettings. Enable Trend Micro Smart Feedback (recommended) # noqa: E501 :param platform_setting_smart_protection_feedback_enabled: The platform_setting_smart_protection_feedback_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smart_protection_feedback_enabled = platform_setting_smart_protection_feedback_enabled @property def integrity_monitoring_setting_retain_event_duration(self): """Gets the integrity_monitoring_setting_retain_event_duration of this SystemSettings. # noqa: E501 Automatically delete Integrity Monitoring Events older than # noqa: E501 :return: The integrity_monitoring_setting_retain_event_duration of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._integrity_monitoring_setting_retain_event_duration @integrity_monitoring_setting_retain_event_duration.setter def integrity_monitoring_setting_retain_event_duration(self, integrity_monitoring_setting_retain_event_duration): """Sets the integrity_monitoring_setting_retain_event_duration of this SystemSettings. Automatically delete Integrity Monitoring Events older than # noqa: E501 :param integrity_monitoring_setting_retain_event_duration: The integrity_monitoring_setting_retain_event_duration of this SystemSettings. # noqa: E501 :type: SettingValue """ self._integrity_monitoring_setting_retain_event_duration = integrity_monitoring_setting_retain_event_duration @property def log_inspection_setting_event_rank_severity_critical(self): """Gets the log_inspection_setting_event_rank_severity_critical of this SystemSettings. # noqa: E501 Critical # noqa: E501 :return: The log_inspection_setting_event_rank_severity_critical of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._log_inspection_setting_event_rank_severity_critical @log_inspection_setting_event_rank_severity_critical.setter def log_inspection_setting_event_rank_severity_critical(self, log_inspection_setting_event_rank_severity_critical): """Sets the log_inspection_setting_event_rank_severity_critical of this SystemSettings. Critical # noqa: E501 :param log_inspection_setting_event_rank_severity_critical: The log_inspection_setting_event_rank_severity_critical of this SystemSettings. # noqa: E501 :type: SettingValue """ self._log_inspection_setting_event_rank_severity_critical = log_inspection_setting_event_rank_severity_critical @property def platform_setting_ddan_proxy_id(self): """Gets the platform_setting_ddan_proxy_id of this SystemSettings. # noqa: E501 Use Proxy when accessing Deep Discovery Analyzer # noqa: E501 :return: The platform_setting_ddan_proxy_id of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_ddan_proxy_id @platform_setting_ddan_proxy_id.setter def platform_setting_ddan_proxy_id(self, platform_setting_ddan_proxy_id): """Sets the platform_setting_ddan_proxy_id of this SystemSettings. Use Proxy when accessing Deep Discovery Analyzer # noqa: E501 :param platform_setting_ddan_proxy_id: The platform_setting_ddan_proxy_id of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_ddan_proxy_id = platform_setting_ddan_proxy_id @property def platform_setting_agent_initiated_activation_within_ip_list_id(self): """Gets the platform_setting_agent_initiated_activation_within_ip_list_id of this SystemSettings. # noqa: E501 Agent-Initiated Activation IP List # noqa: E501 :return: The platform_setting_agent_initiated_activation_within_ip_list_id of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_agent_initiated_activation_within_ip_list_id @platform_setting_agent_initiated_activation_within_ip_list_id.setter def platform_setting_agent_initiated_activation_within_ip_list_id(self, platform_setting_agent_initiated_activation_within_ip_list_id): """Sets the platform_setting_agent_initiated_activation_within_ip_list_id of this SystemSettings. Agent-Initiated Activation IP List # noqa: E501 :param platform_setting_agent_initiated_activation_within_ip_list_id: The platform_setting_agent_initiated_activation_within_ip_list_id of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_agent_initiated_activation_within_ip_list_id = platform_setting_agent_initiated_activation_within_ip_list_id @property def platform_setting_update_security_primary_source_url(self): """Gets the platform_setting_update_security_primary_source_url of this SystemSettings. # noqa: E501 URL # noqa: E501 :return: The platform_setting_update_security_primary_source_url of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_update_security_primary_source_url @platform_setting_update_security_primary_source_url.setter def platform_setting_update_security_primary_source_url(self, platform_setting_update_security_primary_source_url): """Sets the platform_setting_update_security_primary_source_url of this SystemSettings. URL # noqa: E501 :param platform_setting_update_security_primary_source_url: The platform_setting_update_security_primary_source_url of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_update_security_primary_source_url = platform_setting_update_security_primary_source_url @property def platform_setting_agentless_vcloud_protection_enabled(self): """Gets the platform_setting_agentless_vcloud_protection_enabled of this SystemSettings. # noqa: E501 Allow Appliance protection of vCloud VMs # noqa: E501 :return: The platform_setting_agentless_vcloud_protection_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_agentless_vcloud_protection_enabled @platform_setting_agentless_vcloud_protection_enabled.setter def platform_setting_agentless_vcloud_protection_enabled(self, platform_setting_agentless_vcloud_protection_enabled): """Sets the platform_setting_agentless_vcloud_protection_enabled of this SystemSettings. Allow Appliance protection of vCloud VMs # noqa: E501 :param platform_setting_agentless_vcloud_protection_enabled: The platform_setting_agentless_vcloud_protection_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_agentless_vcloud_protection_enabled = platform_setting_agentless_vcloud_protection_enabled @property def platform_setting_linux_upgrade_on_activation_enabled(self): """Gets the platform_setting_linux_upgrade_on_activation_enabled of this SystemSettings. # noqa: E501 Automatically upgrade Linux agents on activation # noqa: E501 :return: The platform_setting_linux_upgrade_on_activation_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_linux_upgrade_on_activation_enabled @platform_setting_linux_upgrade_on_activation_enabled.setter def platform_setting_linux_upgrade_on_activation_enabled(self, platform_setting_linux_upgrade_on_activation_enabled): """Sets the platform_setting_linux_upgrade_on_activation_enabled of this SystemSettings. Automatically upgrade Linux agents on activation # noqa: E501 :param platform_setting_linux_upgrade_on_activation_enabled: The platform_setting_linux_upgrade_on_activation_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_linux_upgrade_on_activation_enabled = platform_setting_linux_upgrade_on_activation_enabled @property def platform_setting_trend_micro_xdr_enabled(self): """Gets the platform_setting_trend_micro_xdr_enabled of this SystemSettings. # noqa: E501 Forward activity data to Trend Micro XDR data lake # noqa: E501 :return: The platform_setting_trend_micro_xdr_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_trend_micro_xdr_enabled @platform_setting_trend_micro_xdr_enabled.setter def platform_setting_trend_micro_xdr_enabled(self, platform_setting_trend_micro_xdr_enabled): """Sets the platform_setting_trend_micro_xdr_enabled of this SystemSettings. Forward activity data to Trend Micro XDR data lake # noqa: E501 :param platform_setting_trend_micro_xdr_enabled: The platform_setting_trend_micro_xdr_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_trend_micro_xdr_enabled = platform_setting_trend_micro_xdr_enabled @property def platform_setting_active_sessions_max_exceeded_action(self): """Gets the platform_setting_active_sessions_max_exceeded_action of this SystemSettings. # noqa: E501 Action when concurrent session limit is exceeded # noqa: E501 :return: The platform_setting_active_sessions_max_exceeded_action of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_active_sessions_max_exceeded_action @platform_setting_active_sessions_max_exceeded_action.setter def platform_setting_active_sessions_max_exceeded_action(self, platform_setting_active_sessions_max_exceeded_action): """Sets the platform_setting_active_sessions_max_exceeded_action of this SystemSettings. Action when concurrent session limit is exceeded # noqa: E501 :param platform_setting_active_sessions_max_exceeded_action: The platform_setting_active_sessions_max_exceeded_action of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_active_sessions_max_exceeded_action = platform_setting_active_sessions_max_exceeded_action @property def platform_setting_update_hostname_on_ip_change_enabled(self): """Gets the platform_setting_update_hostname_on_ip_change_enabled of this SystemSettings. # noqa: E501 Update the \"Hostname\" entry if an IP is used as a hostname and a change in IP is detected on the computer after Agent/Appliance-initiated communication or discovery # noqa: E501 :return: The platform_setting_update_hostname_on_ip_change_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_update_hostname_on_ip_change_enabled @platform_setting_update_hostname_on_ip_change_enabled.setter def platform_setting_update_hostname_on_ip_change_enabled(self, platform_setting_update_hostname_on_ip_change_enabled): """Sets the platform_setting_update_hostname_on_ip_change_enabled of this SystemSettings. Update the \"Hostname\" entry if an IP is used as a hostname and a change in IP is detected on the computer after Agent/Appliance-initiated communication or discovery # noqa: E501 :param platform_setting_update_hostname_on_ip_change_enabled: The platform_setting_update_hostname_on_ip_change_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_update_hostname_on_ip_change_enabled = platform_setting_update_hostname_on_ip_change_enabled @property def log_inspection_setting_event_rank_severity_high(self): """Gets the log_inspection_setting_event_rank_severity_high of this SystemSettings. # noqa: E501 High # noqa: E501 :return: The log_inspection_setting_event_rank_severity_high of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._log_inspection_setting_event_rank_severity_high @log_inspection_setting_event_rank_severity_high.setter def log_inspection_setting_event_rank_severity_high(self, log_inspection_setting_event_rank_severity_high): """Sets the log_inspection_setting_event_rank_severity_high of this SystemSettings. High # noqa: E501 :param log_inspection_setting_event_rank_severity_high: The log_inspection_setting_event_rank_severity_high of this SystemSettings. # noqa: E501 :type: SettingValue """ self._log_inspection_setting_event_rank_severity_high = log_inspection_setting_event_rank_severity_high @property def platform_setting_smtp_requires_authentication_enabled(self): """Gets the platform_setting_smtp_requires_authentication_enabled of this SystemSettings. # noqa: E501 Mail server requires authentication # noqa: E501 :return: The platform_setting_smtp_requires_authentication_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smtp_requires_authentication_enabled @platform_setting_smtp_requires_authentication_enabled.setter def platform_setting_smtp_requires_authentication_enabled(self, platform_setting_smtp_requires_authentication_enabled): """Sets the platform_setting_smtp_requires_authentication_enabled of this SystemSettings. Mail server requires authentication # noqa: E501 :param platform_setting_smtp_requires_authentication_enabled: The platform_setting_smtp_requires_authentication_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smtp_requires_authentication_enabled = platform_setting_smtp_requires_authentication_enabled @property def platform_setting_active_sessions_max(self): """Gets the platform_setting_active_sessions_max of this SystemSettings. # noqa: E501 Number of concurrent sessions allowed per User # noqa: E501 :return: The platform_setting_active_sessions_max of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_active_sessions_max @platform_setting_active_sessions_max.setter def platform_setting_active_sessions_max(self, platform_setting_active_sessions_max): """Sets the platform_setting_active_sessions_max of this SystemSettings. Number of concurrent sessions allowed per User # noqa: E501 :param platform_setting_active_sessions_max: The platform_setting_active_sessions_max of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_active_sessions_max = platform_setting_active_sessions_max @property def platform_setting_aws_external_id_retrieval_enabled(self): """Gets the platform_setting_aws_external_id_retrieval_enabled of this SystemSettings. # noqa: E501 Enable retrieval and viewing of AWS External ID # noqa: E501 :return: The platform_setting_aws_external_id_retrieval_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_aws_external_id_retrieval_enabled @platform_setting_aws_external_id_retrieval_enabled.setter def platform_setting_aws_external_id_retrieval_enabled(self, platform_setting_aws_external_id_retrieval_enabled): """Sets the platform_setting_aws_external_id_retrieval_enabled of this SystemSettings. Enable retrieval and viewing of AWS External ID # noqa: E501 :param platform_setting_aws_external_id_retrieval_enabled: The platform_setting_aws_external_id_retrieval_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_aws_external_id_retrieval_enabled = platform_setting_aws_external_id_retrieval_enabled @property def log_inspection_setting_event_rank_severity_low(self): """Gets the log_inspection_setting_event_rank_severity_low of this SystemSettings. # noqa: E501 Low # noqa: E501 :return: The log_inspection_setting_event_rank_severity_low of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._log_inspection_setting_event_rank_severity_low @log_inspection_setting_event_rank_severity_low.setter def log_inspection_setting_event_rank_severity_low(self, log_inspection_setting_event_rank_severity_low): """Sets the log_inspection_setting_event_rank_severity_low of this SystemSettings. Low # noqa: E501 :param log_inspection_setting_event_rank_severity_low: The log_inspection_setting_event_rank_severity_low of this SystemSettings. # noqa: E501 :type: SettingValue """ self._log_inspection_setting_event_rank_severity_low = log_inspection_setting_event_rank_severity_low @property def platform_setting_smtp_username(self): """Gets the platform_setting_smtp_username of this SystemSettings. # noqa: E501 SMTP username # noqa: E501 :return: The platform_setting_smtp_username of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smtp_username @platform_setting_smtp_username.setter def platform_setting_smtp_username(self, platform_setting_smtp_username): """Sets the platform_setting_smtp_username of this SystemSettings. SMTP username # noqa: E501 :param platform_setting_smtp_username: The platform_setting_smtp_username of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smtp_username = platform_setting_smtp_username @property def platform_setting_event_forwarding_sns_advanced_config_enabled(self): """Gets the platform_setting_event_forwarding_sns_advanced_config_enabled of this SystemSettings. # noqa: E501 Amazon SNS Advanced Configuration # noqa: E501 :return: The platform_setting_event_forwarding_sns_advanced_config_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_event_forwarding_sns_advanced_config_enabled @platform_setting_event_forwarding_sns_advanced_config_enabled.setter def platform_setting_event_forwarding_sns_advanced_config_enabled(self, platform_setting_event_forwarding_sns_advanced_config_enabled): """Sets the platform_setting_event_forwarding_sns_advanced_config_enabled of this SystemSettings. Amazon SNS Advanced Configuration # noqa: E501 :param platform_setting_event_forwarding_sns_advanced_config_enabled: The platform_setting_event_forwarding_sns_advanced_config_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_event_forwarding_sns_advanced_config_enabled = platform_setting_event_forwarding_sns_advanced_config_enabled @property def firewall_setting_internet_connectivity_test_interval(self): """Gets the firewall_setting_internet_connectivity_test_interval of this SystemSettings. # noqa: E501 Test Interval # noqa: E501 :return: The firewall_setting_internet_connectivity_test_interval of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._firewall_setting_internet_connectivity_test_interval @firewall_setting_internet_connectivity_test_interval.setter def firewall_setting_internet_connectivity_test_interval(self, firewall_setting_internet_connectivity_test_interval): """Sets the firewall_setting_internet_connectivity_test_interval of this SystemSettings. Test Interval # noqa: E501 :param firewall_setting_internet_connectivity_test_interval: The firewall_setting_internet_connectivity_test_interval of this SystemSettings. # noqa: E501 :type: SettingValue """ self._firewall_setting_internet_connectivity_test_interval = firewall_setting_internet_connectivity_test_interval @property def platform_setting_whois_url(self): """Gets the platform_setting_whois_url of this SystemSettings. # noqa: E501 Whois URL - The full URL to a Whois lookup with the IP represented as [IP] # noqa: E501 :return: The platform_setting_whois_url of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_whois_url @platform_setting_whois_url.setter def platform_setting_whois_url(self, platform_setting_whois_url): """Sets the platform_setting_whois_url of this SystemSettings. Whois URL - The full URL to a Whois lookup with the IP represented as [IP] # noqa: E501 :param platform_setting_whois_url: The platform_setting_whois_url of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_whois_url = platform_setting_whois_url @property def platform_setting_ddan_source_option(self): """Gets the platform_setting_ddan_source_option of this SystemSettings. # noqa: E501 Deep Discovery Analyzer Source # noqa: E501 :return: The platform_setting_ddan_source_option of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_ddan_source_option @platform_setting_ddan_source_option.setter def platform_setting_ddan_source_option(self, platform_setting_ddan_source_option): """Sets the platform_setting_ddan_source_option of this SystemSettings. Deep Discovery Analyzer Source # noqa: E501 :param platform_setting_ddan_source_option: The platform_setting_ddan_source_option of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_ddan_source_option = platform_setting_ddan_source_option @property def platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled(self): """Gets the platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled of this SystemSettings. # noqa: E501 Compare objects against Suspicious Object List # noqa: E501 :return: The platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled @platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled.setter def platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled(self, platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled): """Sets the platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled of this SystemSettings. Compare objects against Suspicious Object List # noqa: E501 :param platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled: The platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled = platform_setting_connected_threat_defense_control_manager_suspicious_object_list_comparison_enabled @property def platform_setting_exported_file_character_encoding(self): """Gets the platform_setting_exported_file_character_encoding of this SystemSettings. # noqa: E501 Exported file Character Encoding # noqa: E501 :return: The platform_setting_exported_file_character_encoding of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_exported_file_character_encoding @platform_setting_exported_file_character_encoding.setter def platform_setting_exported_file_character_encoding(self, platform_setting_exported_file_character_encoding): """Sets the platform_setting_exported_file_character_encoding of this SystemSettings. Exported file Character Encoding # noqa: E501 :param platform_setting_exported_file_character_encoding: The platform_setting_exported_file_character_encoding of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_exported_file_character_encoding = platform_setting_exported_file_character_encoding @property def platform_setting_user_session_duration_max(self): """Gets the platform_setting_user_session_duration_max of this SystemSettings. # noqa: E501 Maximum session duration # noqa: E501 :return: The platform_setting_user_session_duration_max of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_user_session_duration_max @platform_setting_user_session_duration_max.setter def platform_setting_user_session_duration_max(self, platform_setting_user_session_duration_max): """Sets the platform_setting_user_session_duration_max of this SystemSettings. Maximum session duration # noqa: E501 :param platform_setting_user_session_duration_max: The platform_setting_user_session_duration_max of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_user_session_duration_max = platform_setting_user_session_duration_max @property def platform_setting_update_software_alternate_update_server_urls(self): """Gets the platform_setting_update_software_alternate_update_server_urls of this SystemSettings. # noqa: E501 Alternate Software Update Web Server(s) # noqa: E501 :return: The platform_setting_update_software_alternate_update_server_urls of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_update_software_alternate_update_server_urls @platform_setting_update_software_alternate_update_server_urls.setter def platform_setting_update_software_alternate_update_server_urls(self, platform_setting_update_software_alternate_update_server_urls): """Sets the platform_setting_update_software_alternate_update_server_urls of this SystemSettings. Alternate Software Update Web Server(s) # noqa: E501 :param platform_setting_update_software_alternate_update_server_urls: The platform_setting_update_software_alternate_update_server_urls of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_update_software_alternate_update_server_urls = platform_setting_update_software_alternate_update_server_urls @property def platform_setting_retain_counters_duration(self): """Gets the platform_setting_retain_counters_duration of this SystemSettings. # noqa: E501 Automatically delete Counters older than # noqa: E501 :return: The platform_setting_retain_counters_duration of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_retain_counters_duration @platform_setting_retain_counters_duration.setter def platform_setting_retain_counters_duration(self, platform_setting_retain_counters_duration): """Sets the platform_setting_retain_counters_duration of this SystemSettings. Automatically delete Counters older than # noqa: E501 :param platform_setting_retain_counters_duration: The platform_setting_retain_counters_duration of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_retain_counters_duration = platform_setting_retain_counters_duration @property def platform_setting_smart_protection_feedback_interval(self): """Gets the platform_setting_smart_protection_feedback_interval of this SystemSettings. # noqa: E501 Feedback Interval (min) # noqa: E501 :return: The platform_setting_smart_protection_feedback_interval of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smart_protection_feedback_interval @platform_setting_smart_protection_feedback_interval.setter def platform_setting_smart_protection_feedback_interval(self, platform_setting_smart_protection_feedback_interval): """Sets the platform_setting_smart_protection_feedback_interval of this SystemSettings. Feedback Interval (min) # noqa: E501 :param platform_setting_smart_protection_feedback_interval: The platform_setting_smart_protection_feedback_interval of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smart_protection_feedback_interval = platform_setting_smart_protection_feedback_interval @property def platform_setting_system_event_forwarding_snmp_address(self): """Gets the platform_setting_system_event_forwarding_snmp_address of this SystemSettings. # noqa: E501 Hostname or IP address to which events should be sent # noqa: E501 :return: The platform_setting_system_event_forwarding_snmp_address of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_system_event_forwarding_snmp_address @platform_setting_system_event_forwarding_snmp_address.setter def platform_setting_system_event_forwarding_snmp_address(self, platform_setting_system_event_forwarding_snmp_address): """Sets the platform_setting_system_event_forwarding_snmp_address of this SystemSettings. Hostname or IP address to which events should be sent # noqa: E501 :param platform_setting_system_event_forwarding_snmp_address: The platform_setting_system_event_forwarding_snmp_address of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_system_event_forwarding_snmp_address = platform_setting_system_event_forwarding_snmp_address @property def platform_setting_smtp_server_address(self): """Gets the platform_setting_smtp_server_address of this SystemSettings. # noqa: E501 SMTP mail server address (optionally include :port) # noqa: E501 :return: The platform_setting_smtp_server_address of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smtp_server_address @platform_setting_smtp_server_address.setter def platform_setting_smtp_server_address(self, platform_setting_smtp_server_address): """Sets the platform_setting_smtp_server_address of this SystemSettings. SMTP mail server address (optionally include :port) # noqa: E501 :param platform_setting_smtp_server_address: The platform_setting_smtp_server_address of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smtp_server_address = platform_setting_smtp_server_address @property def platform_setting_smtp_password(self): """Gets the platform_setting_smtp_password of this SystemSettings. # noqa: E501 SMTP password # noqa: E501 :return: The platform_setting_smtp_password of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smtp_password @platform_setting_smtp_password.setter def platform_setting_smtp_password(self, platform_setting_smtp_password): """Sets the platform_setting_smtp_password of this SystemSettings. SMTP password # noqa: E501 :param platform_setting_smtp_password: The platform_setting_smtp_password of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smtp_password = platform_setting_smtp_password @property def platform_setting_event_forwarding_sns_config_json(self): """Gets the platform_setting_event_forwarding_sns_config_json of this SystemSettings. # noqa: E501 Amazon SNS Configuration # noqa: E501 :return: The platform_setting_event_forwarding_sns_config_json of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_event_forwarding_sns_config_json @platform_setting_event_forwarding_sns_config_json.setter def platform_setting_event_forwarding_sns_config_json(self, platform_setting_event_forwarding_sns_config_json): """Sets the platform_setting_event_forwarding_sns_config_json of this SystemSettings. Amazon SNS Configuration # noqa: E501 :param platform_setting_event_forwarding_sns_config_json: The platform_setting_event_forwarding_sns_config_json of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_event_forwarding_sns_config_json = platform_setting_event_forwarding_sns_config_json @property def firewall_setting_retain_event_duration(self): """Gets the firewall_setting_retain_event_duration of this SystemSettings. # noqa: E501 Automatically delete Firewall Events older than # noqa: E501 :return: The firewall_setting_retain_event_duration of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._firewall_setting_retain_event_duration @firewall_setting_retain_event_duration.setter def firewall_setting_retain_event_duration(self, firewall_setting_retain_event_duration): """Sets the firewall_setting_retain_event_duration of this SystemSettings. Automatically delete Firewall Events older than # noqa: E501 :param firewall_setting_retain_event_duration: The firewall_setting_retain_event_duration of this SystemSettings. # noqa: E501 :type: SettingValue """ self._firewall_setting_retain_event_duration = firewall_setting_retain_event_duration @property def web_reputation_setting_event_rank_risk_untested(self): """Gets the web_reputation_setting_event_rank_risk_untested of this SystemSettings. # noqa: E501 Untested # noqa: E501 :return: The web_reputation_setting_event_rank_risk_untested of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._web_reputation_setting_event_rank_risk_untested @web_reputation_setting_event_rank_risk_untested.setter def web_reputation_setting_event_rank_risk_untested(self, web_reputation_setting_event_rank_risk_untested): """Sets the web_reputation_setting_event_rank_risk_untested of this SystemSettings. Untested # noqa: E501 :param web_reputation_setting_event_rank_risk_untested: The web_reputation_setting_event_rank_risk_untested of this SystemSettings. # noqa: E501 :type: SettingValue """ self._web_reputation_setting_event_rank_risk_untested = web_reputation_setting_event_rank_risk_untested @property def platform_setting_managed_detect_response_use_proxy_enabled(self): """Gets the platform_setting_managed_detect_response_use_proxy_enabled of this SystemSettings. # noqa: E501 When accessing MDR server, use proxy: # noqa: E501 :return: The platform_setting_managed_detect_response_use_proxy_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_managed_detect_response_use_proxy_enabled @platform_setting_managed_detect_response_use_proxy_enabled.setter def platform_setting_managed_detect_response_use_proxy_enabled(self, platform_setting_managed_detect_response_use_proxy_enabled): """Sets the platform_setting_managed_detect_response_use_proxy_enabled of this SystemSettings. When accessing MDR server, use proxy: # noqa: E501 :param platform_setting_managed_detect_response_use_proxy_enabled: The platform_setting_managed_detect_response_use_proxy_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_managed_detect_response_use_proxy_enabled = platform_setting_managed_detect_response_use_proxy_enabled @property def platform_setting_event_forwarding_sns_secret_key(self): """Gets the platform_setting_event_forwarding_sns_secret_key of this SystemSettings. # noqa: E501 Secret Key - The Secret Key of an AWS User with access to the SNS Topic # noqa: E501 :return: The platform_setting_event_forwarding_sns_secret_key of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_event_forwarding_sns_secret_key @platform_setting_event_forwarding_sns_secret_key.setter def platform_setting_event_forwarding_sns_secret_key(self, platform_setting_event_forwarding_sns_secret_key): """Sets the platform_setting_event_forwarding_sns_secret_key of this SystemSettings. Secret Key - The Secret Key of an AWS User with access to the SNS Topic # noqa: E501 :param platform_setting_event_forwarding_sns_secret_key: The platform_setting_event_forwarding_sns_secret_key of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_event_forwarding_sns_secret_key = platform_setting_event_forwarding_sns_secret_key @property def platform_setting_aws_manager_identity_secret_key(self): """Gets the platform_setting_aws_manager_identity_secret_key of this SystemSettings. # noqa: E501 Secret Key - The Secret Access Key of an AWS User used for the manager identity # noqa: E501 :return: The platform_setting_aws_manager_identity_secret_key of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_aws_manager_identity_secret_key @platform_setting_aws_manager_identity_secret_key.setter def platform_setting_aws_manager_identity_secret_key(self, platform_setting_aws_manager_identity_secret_key): """Sets the platform_setting_aws_manager_identity_secret_key of this SystemSettings. Secret Key - The Secret Access Key of an AWS User used for the manager identity # noqa: E501 :param platform_setting_aws_manager_identity_secret_key: The platform_setting_aws_manager_identity_secret_key of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_aws_manager_identity_secret_key = platform_setting_aws_manager_identity_secret_key @property def web_reputation_setting_event_rank_risk_highly_suspicious(self): """Gets the web_reputation_setting_event_rank_risk_highly_suspicious of this SystemSettings. # noqa: E501 Highly Suspicious # noqa: E501 :return: The web_reputation_setting_event_rank_risk_highly_suspicious of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._web_reputation_setting_event_rank_risk_highly_suspicious @web_reputation_setting_event_rank_risk_highly_suspicious.setter def web_reputation_setting_event_rank_risk_highly_suspicious(self, web_reputation_setting_event_rank_risk_highly_suspicious): """Sets the web_reputation_setting_event_rank_risk_highly_suspicious of this SystemSettings. Highly Suspicious # noqa: E501 :param web_reputation_setting_event_rank_risk_highly_suspicious: The web_reputation_setting_event_rank_risk_highly_suspicious of this SystemSettings. # noqa: E501 :type: SettingValue """ self._web_reputation_setting_event_rank_risk_highly_suspicious = web_reputation_setting_event_rank_risk_highly_suspicious @property def platform_setting_user_password_expiry_send_email_enabled(self): """Gets the platform_setting_user_password_expiry_send_email_enabled of this SystemSettings. # noqa: E501 Send email when a user's password is about to expire # noqa: E501 :return: The platform_setting_user_password_expiry_send_email_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_user_password_expiry_send_email_enabled @platform_setting_user_password_expiry_send_email_enabled.setter def platform_setting_user_password_expiry_send_email_enabled(self, platform_setting_user_password_expiry_send_email_enabled): """Sets the platform_setting_user_password_expiry_send_email_enabled of this SystemSettings. Send email when a user's password is about to expire # noqa: E501 :param platform_setting_user_password_expiry_send_email_enabled: The platform_setting_user_password_expiry_send_email_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_user_password_expiry_send_email_enabled = platform_setting_user_password_expiry_send_email_enabled @property def platform_setting_user_sign_in_attempts_allowed_number(self): """Gets the platform_setting_user_sign_in_attempts_allowed_number of this SystemSettings. # noqa: E501 Number of incorrect sign-in attempts allowed (before lock out) # noqa: E501 :return: The platform_setting_user_sign_in_attempts_allowed_number of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_user_sign_in_attempts_allowed_number @platform_setting_user_sign_in_attempts_allowed_number.setter def platform_setting_user_sign_in_attempts_allowed_number(self, platform_setting_user_sign_in_attempts_allowed_number): """Sets the platform_setting_user_sign_in_attempts_allowed_number of this SystemSettings. Number of incorrect sign-in attempts allowed (before lock out) # noqa: E501 :param platform_setting_user_sign_in_attempts_allowed_number: The platform_setting_user_sign_in_attempts_allowed_number of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_user_sign_in_attempts_allowed_number = platform_setting_user_sign_in_attempts_allowed_number @property def platform_setting_ddan_use_proxy_enabled(self): """Gets the platform_setting_ddan_use_proxy_enabled of this SystemSettings. # noqa: E501 When accessing Deep Discovery Analyzer, use proxy: # noqa: E501 :return: The platform_setting_ddan_use_proxy_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_ddan_use_proxy_enabled @platform_setting_ddan_use_proxy_enabled.setter def platform_setting_ddan_use_proxy_enabled(self, platform_setting_ddan_use_proxy_enabled): """Sets the platform_setting_ddan_use_proxy_enabled of this SystemSettings. When accessing Deep Discovery Analyzer, use proxy: # noqa: E501 :param platform_setting_ddan_use_proxy_enabled: The platform_setting_ddan_use_proxy_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_ddan_use_proxy_enabled = platform_setting_ddan_use_proxy_enabled @property def platform_setting_agent_initiated_activation_enabled(self): """Gets the platform_setting_agent_initiated_activation_enabled of this SystemSettings. # noqa: E501 Allow Agent-Initiated Activation # noqa: E501 :return: The platform_setting_agent_initiated_activation_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_agent_initiated_activation_enabled @platform_setting_agent_initiated_activation_enabled.setter def platform_setting_agent_initiated_activation_enabled(self, platform_setting_agent_initiated_activation_enabled): """Sets the platform_setting_agent_initiated_activation_enabled of this SystemSettings. Allow Agent-Initiated Activation # noqa: E501 :param platform_setting_agent_initiated_activation_enabled: The platform_setting_agent_initiated_activation_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_agent_initiated_activation_enabled = platform_setting_agent_initiated_activation_enabled @property def platform_setting_smart_protection_feedback_bandwidth_max_kbytes(self): """Gets the platform_setting_smart_protection_feedback_bandwidth_max_kbytes of this SystemSettings. # noqa: E501 Maximum bandwidth: # noqa: E501 :return: The platform_setting_smart_protection_feedback_bandwidth_max_kbytes of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_smart_protection_feedback_bandwidth_max_kbytes @platform_setting_smart_protection_feedback_bandwidth_max_kbytes.setter def platform_setting_smart_protection_feedback_bandwidth_max_kbytes(self, platform_setting_smart_protection_feedback_bandwidth_max_kbytes): """Sets the platform_setting_smart_protection_feedback_bandwidth_max_kbytes of this SystemSettings. Maximum bandwidth: # noqa: E501 :param platform_setting_smart_protection_feedback_bandwidth_max_kbytes: The platform_setting_smart_protection_feedback_bandwidth_max_kbytes of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_smart_protection_feedback_bandwidth_max_kbytes = platform_setting_smart_protection_feedback_bandwidth_max_kbytes @property def firewall_setting_event_rank_severity_packet_rejection(self): """Gets the firewall_setting_event_rank_severity_packet_rejection of this SystemSettings. # noqa: E501 Packet Rejection # noqa: E501 :return: The firewall_setting_event_rank_severity_packet_rejection of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._firewall_setting_event_rank_severity_packet_rejection @firewall_setting_event_rank_severity_packet_rejection.setter def firewall_setting_event_rank_severity_packet_rejection(self, firewall_setting_event_rank_severity_packet_rejection): """Sets the firewall_setting_event_rank_severity_packet_rejection of this SystemSettings. Packet Rejection # noqa: E501 :param firewall_setting_event_rank_severity_packet_rejection: The firewall_setting_event_rank_severity_packet_rejection of this SystemSettings. # noqa: E501 :type: SettingValue """ self._firewall_setting_event_rank_severity_packet_rejection = firewall_setting_event_rank_severity_packet_rejection @property def platform_setting_managed_detect_response_use_primary_tenant_settings_enabled(self): """Gets the platform_setting_managed_detect_response_use_primary_tenant_settings_enabled of this SystemSettings. # noqa: E501 Use default server settings # noqa: E501 :return: The platform_setting_managed_detect_response_use_primary_tenant_settings_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_managed_detect_response_use_primary_tenant_settings_enabled @platform_setting_managed_detect_response_use_primary_tenant_settings_enabled.setter def platform_setting_managed_detect_response_use_primary_tenant_settings_enabled(self, platform_setting_managed_detect_response_use_primary_tenant_settings_enabled): """Sets the platform_setting_managed_detect_response_use_primary_tenant_settings_enabled of this SystemSettings. Use default server settings # noqa: E501 :param platform_setting_managed_detect_response_use_primary_tenant_settings_enabled: The platform_setting_managed_detect_response_use_primary_tenant_settings_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_managed_detect_response_use_primary_tenant_settings_enabled = platform_setting_managed_detect_response_use_primary_tenant_settings_enabled @property def platform_setting_event_forwarding_sns_access_key(self): """Gets the platform_setting_event_forwarding_sns_access_key of this SystemSettings. # noqa: E501 Access Key - The Access Key of an AWS User with access to the SNS Topic # noqa: E501 :return: The platform_setting_event_forwarding_sns_access_key of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_event_forwarding_sns_access_key @platform_setting_event_forwarding_sns_access_key.setter def platform_setting_event_forwarding_sns_access_key(self, platform_setting_event_forwarding_sns_access_key): """Sets the platform_setting_event_forwarding_sns_access_key of this SystemSettings. Access Key - The Access Key of an AWS User with access to the SNS Topic # noqa: E501 :param platform_setting_event_forwarding_sns_access_key: The platform_setting_event_forwarding_sns_access_key of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_event_forwarding_sns_access_key = platform_setting_event_forwarding_sns_access_key @property def platform_setting_agent_initiated_activation_specify_hostname_enabled(self): """Gets the platform_setting_agent_initiated_activation_specify_hostname_enabled of this SystemSettings. # noqa: E501 Allow Agent to specify hostname # noqa: E501 :return: The platform_setting_agent_initiated_activation_specify_hostname_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_agent_initiated_activation_specify_hostname_enabled @platform_setting_agent_initiated_activation_specify_hostname_enabled.setter def platform_setting_agent_initiated_activation_specify_hostname_enabled(self, platform_setting_agent_initiated_activation_specify_hostname_enabled): """Sets the platform_setting_agent_initiated_activation_specify_hostname_enabled of this SystemSettings. Allow Agent to specify hostname # noqa: E501 :param platform_setting_agent_initiated_activation_specify_hostname_enabled: The platform_setting_agent_initiated_activation_specify_hostname_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_agent_initiated_activation_specify_hostname_enabled = platform_setting_agent_initiated_activation_specify_hostname_enabled @property def platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled(self): """Gets the platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled of this SystemSettings. # noqa: E501 Use default server settings # noqa: E501 :return: The platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled @platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled.setter def platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled(self, platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled): """Sets the platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled of this SystemSettings. Use default server settings # noqa: E501 :param platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled: The platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled = platform_setting_connected_threat_defenses_use_primary_tenant_server_settings_enabled @property def platform_setting_inactive_agent_cleanup_duration(self): """Gets the platform_setting_inactive_agent_cleanup_duration of this SystemSettings. # noqa: E501 Delete Agents that have been inactive for: # noqa: E501 :return: The platform_setting_inactive_agent_cleanup_duration of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_inactive_agent_cleanup_duration @platform_setting_inactive_agent_cleanup_duration.setter def platform_setting_inactive_agent_cleanup_duration(self, platform_setting_inactive_agent_cleanup_duration): """Sets the platform_setting_inactive_agent_cleanup_duration of this SystemSettings. Delete Agents that have been inactive for: # noqa: E501 :param platform_setting_inactive_agent_cleanup_duration: The platform_setting_inactive_agent_cleanup_duration of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_inactive_agent_cleanup_duration = platform_setting_inactive_agent_cleanup_duration @property def platform_setting_agent_initiated_activation_duplicate_hostname_mode(self): """Gets the platform_setting_agent_initiated_activation_duplicate_hostname_mode of this SystemSettings. # noqa: E501 If a computer with the same name already exists # noqa: E501 :return: The platform_setting_agent_initiated_activation_duplicate_hostname_mode of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_agent_initiated_activation_duplicate_hostname_mode @platform_setting_agent_initiated_activation_duplicate_hostname_mode.setter def platform_setting_agent_initiated_activation_duplicate_hostname_mode(self, platform_setting_agent_initiated_activation_duplicate_hostname_mode): """Sets the platform_setting_agent_initiated_activation_duplicate_hostname_mode of this SystemSettings. If a computer with the same name already exists # noqa: E501 :param platform_setting_agent_initiated_activation_duplicate_hostname_mode: The platform_setting_agent_initiated_activation_duplicate_hostname_mode of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_agent_initiated_activation_duplicate_hostname_mode = platform_setting_agent_initiated_activation_duplicate_hostname_mode @property def platform_setting_agent_initiated_activation_reactivate_unknown_enabled(self): """Gets the platform_setting_agent_initiated_activation_reactivate_unknown_enabled of this SystemSettings. # noqa: E501 Reactivate unknown Agents # noqa: E501 :return: The platform_setting_agent_initiated_activation_reactivate_unknown_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_agent_initiated_activation_reactivate_unknown_enabled @platform_setting_agent_initiated_activation_reactivate_unknown_enabled.setter def platform_setting_agent_initiated_activation_reactivate_unknown_enabled(self, platform_setting_agent_initiated_activation_reactivate_unknown_enabled): """Sets the platform_setting_agent_initiated_activation_reactivate_unknown_enabled of this SystemSettings. Reactivate unknown Agents # noqa: E501 :param platform_setting_agent_initiated_activation_reactivate_unknown_enabled: The platform_setting_agent_initiated_activation_reactivate_unknown_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_agent_initiated_activation_reactivate_unknown_enabled = platform_setting_agent_initiated_activation_reactivate_unknown_enabled @property def platform_setting_agent_initiated_activation_policy_id(self): """Gets the platform_setting_agent_initiated_activation_policy_id of this SystemSettings. # noqa: E501 Policy to assign (if Policy not assigned by activation script): # noqa: E501 :return: The platform_setting_agent_initiated_activation_policy_id of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_agent_initiated_activation_policy_id @platform_setting_agent_initiated_activation_policy_id.setter def platform_setting_agent_initiated_activation_policy_id(self, platform_setting_agent_initiated_activation_policy_id): """Sets the platform_setting_agent_initiated_activation_policy_id of this SystemSettings. Policy to assign (if Policy not assigned by activation script): # noqa: E501 :param platform_setting_agent_initiated_activation_policy_id: The platform_setting_agent_initiated_activation_policy_id of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_agent_initiated_activation_policy_id = platform_setting_agent_initiated_activation_policy_id @property def platform_setting_trend_micro_xdr_api_server_url(self): """Gets the platform_setting_trend_micro_xdr_api_server_url of this SystemSettings. # noqa: E501 API Server URL # noqa: E501 :return: The platform_setting_trend_micro_xdr_api_server_url of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_trend_micro_xdr_api_server_url @platform_setting_trend_micro_xdr_api_server_url.setter def platform_setting_trend_micro_xdr_api_server_url(self, platform_setting_trend_micro_xdr_api_server_url): """Sets the platform_setting_trend_micro_xdr_api_server_url of this SystemSettings. API Server URL # noqa: E501 :param platform_setting_trend_micro_xdr_api_server_url: The platform_setting_trend_micro_xdr_api_server_url of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_trend_micro_xdr_api_server_url = platform_setting_trend_micro_xdr_api_server_url @property def platform_setting_retain_agent_installers_per_platform_max(self): """Gets the platform_setting_retain_agent_installers_per_platform_max of this SystemSettings. # noqa: E501 Number of older software versions to keep per platform # noqa: E501 :return: The platform_setting_retain_agent_installers_per_platform_max of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_retain_agent_installers_per_platform_max @platform_setting_retain_agent_installers_per_platform_max.setter def platform_setting_retain_agent_installers_per_platform_max(self, platform_setting_retain_agent_installers_per_platform_max): """Sets the platform_setting_retain_agent_installers_per_platform_max of this SystemSettings. Number of older software versions to keep per platform # noqa: E501 :param platform_setting_retain_agent_installers_per_platform_max: The platform_setting_retain_agent_installers_per_platform_max of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_retain_agent_installers_per_platform_max = platform_setting_retain_agent_installers_per_platform_max @property def application_control_setting_serve_rulesets_from_relays_enabled(self): """Gets the application_control_setting_serve_rulesets_from_relays_enabled of this SystemSettings. # noqa: E501 Serve application control rulesets from relays # noqa: E501 :return: The application_control_setting_serve_rulesets_from_relays_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._application_control_setting_serve_rulesets_from_relays_enabled @application_control_setting_serve_rulesets_from_relays_enabled.setter def application_control_setting_serve_rulesets_from_relays_enabled(self, application_control_setting_serve_rulesets_from_relays_enabled): """Sets the application_control_setting_serve_rulesets_from_relays_enabled of this SystemSettings. Serve application control rulesets from relays # noqa: E501 :param application_control_setting_serve_rulesets_from_relays_enabled: The application_control_setting_serve_rulesets_from_relays_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._application_control_setting_serve_rulesets_from_relays_enabled = application_control_setting_serve_rulesets_from_relays_enabled @property def integrity_monitoring_setting_event_rank_severity_high(self): """Gets the integrity_monitoring_setting_event_rank_severity_high of this SystemSettings. # noqa: E501 High # noqa: E501 :return: The integrity_monitoring_setting_event_rank_severity_high of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._integrity_monitoring_setting_event_rank_severity_high @integrity_monitoring_setting_event_rank_severity_high.setter def integrity_monitoring_setting_event_rank_severity_high(self, integrity_monitoring_setting_event_rank_severity_high): """Sets the integrity_monitoring_setting_event_rank_severity_high of this SystemSettings. High # noqa: E501 :param integrity_monitoring_setting_event_rank_severity_high: The integrity_monitoring_setting_event_rank_severity_high of this SystemSettings. # noqa: E501 :type: SettingValue """ self._integrity_monitoring_setting_event_rank_severity_high = integrity_monitoring_setting_event_rank_severity_high @property def platform_setting_saml_retain_inactive_external_administrators_duration(self): """Gets the platform_setting_saml_retain_inactive_external_administrators_duration of this SystemSettings. # noqa: E501 Automatically delete inactive identity provider users after (days) # noqa: E501 :return: The platform_setting_saml_retain_inactive_external_administrators_duration of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_saml_retain_inactive_external_administrators_duration @platform_setting_saml_retain_inactive_external_administrators_duration.setter def platform_setting_saml_retain_inactive_external_administrators_duration(self, platform_setting_saml_retain_inactive_external_administrators_duration): """Sets the platform_setting_saml_retain_inactive_external_administrators_duration of this SystemSettings. Automatically delete inactive identity provider users after (days) # noqa: E501 :param platform_setting_saml_retain_inactive_external_administrators_duration: The platform_setting_saml_retain_inactive_external_administrators_duration of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_saml_retain_inactive_external_administrators_duration = platform_setting_saml_retain_inactive_external_administrators_duration @property def intrusion_prevention_setting_retain_event_duration(self): """Gets the intrusion_prevention_setting_retain_event_duration of this SystemSettings. # noqa: E501 Automatically delete Intrusion Prevention Events older than # noqa: E501 :return: The intrusion_prevention_setting_retain_event_duration of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._intrusion_prevention_setting_retain_event_duration @intrusion_prevention_setting_retain_event_duration.setter def intrusion_prevention_setting_retain_event_duration(self, intrusion_prevention_setting_retain_event_duration): """Sets the intrusion_prevention_setting_retain_event_duration of this SystemSettings. Automatically delete Intrusion Prevention Events older than # noqa: E501 :param intrusion_prevention_setting_retain_event_duration: The intrusion_prevention_setting_retain_event_duration of this SystemSettings. # noqa: E501 :type: SettingValue """ self._intrusion_prevention_setting_retain_event_duration = intrusion_prevention_setting_retain_event_duration @property def firewall_setting_internet_connectivity_test_url(self): """Gets the firewall_setting_internet_connectivity_test_url of this SystemSettings. # noqa: E501 URL for testing Internet Connectivity Status # noqa: E501 :return: The firewall_setting_internet_connectivity_test_url of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._firewall_setting_internet_connectivity_test_url @firewall_setting_internet_connectivity_test_url.setter def firewall_setting_internet_connectivity_test_url(self, firewall_setting_internet_connectivity_test_url): """Sets the firewall_setting_internet_connectivity_test_url of this SystemSettings. URL for testing Internet Connectivity Status # noqa: E501 :param firewall_setting_internet_connectivity_test_url: The firewall_setting_internet_connectivity_test_url of this SystemSettings. # noqa: E501 :type: SettingValue """ self._firewall_setting_internet_connectivity_test_url = firewall_setting_internet_connectivity_test_url @property def platform_setting_proxy_agent_update_proxy_id(self): """Gets the platform_setting_proxy_agent_update_proxy_id of this SystemSettings. # noqa: E501 Primary Security Update Proxy used by Agents, Appliances, and Relays: # noqa: E501 :return: The platform_setting_proxy_agent_update_proxy_id of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_proxy_agent_update_proxy_id @platform_setting_proxy_agent_update_proxy_id.setter def platform_setting_proxy_agent_update_proxy_id(self, platform_setting_proxy_agent_update_proxy_id): """Sets the platform_setting_proxy_agent_update_proxy_id of this SystemSettings. Primary Security Update Proxy used by Agents, Appliances, and Relays: # noqa: E501 :param platform_setting_proxy_agent_update_proxy_id: The platform_setting_proxy_agent_update_proxy_id of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_proxy_agent_update_proxy_id = platform_setting_proxy_agent_update_proxy_id @property def platform_setting_ddan_auto_submission_enabled(self): """Gets the platform_setting_ddan_auto_submission_enabled of this SystemSettings. # noqa: E501 Enable automatic file submission # noqa: E501 :return: The platform_setting_ddan_auto_submission_enabled of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_ddan_auto_submission_enabled @platform_setting_ddan_auto_submission_enabled.setter def platform_setting_ddan_auto_submission_enabled(self, platform_setting_ddan_auto_submission_enabled): """Sets the platform_setting_ddan_auto_submission_enabled of this SystemSettings. Enable automatic file submission # noqa: E501 :param platform_setting_ddan_auto_submission_enabled: The platform_setting_ddan_auto_submission_enabled of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_ddan_auto_submission_enabled = platform_setting_ddan_auto_submission_enabled @property def platform_setting_ddan_manual_source_api_key(self): """Gets the platform_setting_ddan_manual_source_api_key of this SystemSettings. # noqa: E501 API Key # noqa: E501 :return: The platform_setting_ddan_manual_source_api_key of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_ddan_manual_source_api_key @platform_setting_ddan_manual_source_api_key.setter def platform_setting_ddan_manual_source_api_key(self, platform_setting_ddan_manual_source_api_key): """Sets the platform_setting_ddan_manual_source_api_key of this SystemSettings. API Key # noqa: E501 :param platform_setting_ddan_manual_source_api_key: The platform_setting_ddan_manual_source_api_key of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_ddan_manual_source_api_key = platform_setting_ddan_manual_source_api_key @property def intrusion_prevention_setting_event_rank_severity_filter_error(self): """Gets the intrusion_prevention_setting_event_rank_severity_filter_error of this SystemSettings. # noqa: E501 Error # noqa: E501 :return: The intrusion_prevention_setting_event_rank_severity_filter_error of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._intrusion_prevention_setting_event_rank_severity_filter_error @intrusion_prevention_setting_event_rank_severity_filter_error.setter def intrusion_prevention_setting_event_rank_severity_filter_error(self, intrusion_prevention_setting_event_rank_severity_filter_error): """Sets the intrusion_prevention_setting_event_rank_severity_filter_error of this SystemSettings. Error # noqa: E501 :param intrusion_prevention_setting_event_rank_severity_filter_error: The intrusion_prevention_setting_event_rank_severity_filter_error of this SystemSettings. # noqa: E501 :type: SettingValue """ self._intrusion_prevention_setting_event_rank_severity_filter_error = intrusion_prevention_setting_event_rank_severity_filter_error @property def intrusion_prevention_setting_event_rank_severity_filter_high(self): """Gets the intrusion_prevention_setting_event_rank_severity_filter_high of this SystemSettings. # noqa: E501 High # noqa: E501 :return: The intrusion_prevention_setting_event_rank_severity_filter_high of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._intrusion_prevention_setting_event_rank_severity_filter_high @intrusion_prevention_setting_event_rank_severity_filter_high.setter def intrusion_prevention_setting_event_rank_severity_filter_high(self, intrusion_prevention_setting_event_rank_severity_filter_high): """Sets the intrusion_prevention_setting_event_rank_severity_filter_high of this SystemSettings. High # noqa: E501 :param intrusion_prevention_setting_event_rank_severity_filter_high: The intrusion_prevention_setting_event_rank_severity_filter_high of this SystemSettings. # noqa: E501 :type: SettingValue """ self._intrusion_prevention_setting_event_rank_severity_filter_high = intrusion_prevention_setting_event_rank_severity_filter_high @property def platform_setting_trend_micro_xdr_api_key(self): """Gets the platform_setting_trend_micro_xdr_api_key of this SystemSettings. # noqa: E501 API Key # noqa: E501 :return: The platform_setting_trend_micro_xdr_api_key of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_trend_micro_xdr_api_key @platform_setting_trend_micro_xdr_api_key.setter def platform_setting_trend_micro_xdr_api_key(self, platform_setting_trend_micro_xdr_api_key): """Sets the platform_setting_trend_micro_xdr_api_key of this SystemSettings. API Key # noqa: E501 :param platform_setting_trend_micro_xdr_api_key: The platform_setting_trend_micro_xdr_api_key of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_trend_micro_xdr_api_key = platform_setting_trend_micro_xdr_api_key @property def integrity_monitoring_setting_event_rank_severity_low(self): """Gets the integrity_monitoring_setting_event_rank_severity_low of this SystemSettings. # noqa: E501 Low # noqa: E501 :return: The integrity_monitoring_setting_event_rank_severity_low of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._integrity_monitoring_setting_event_rank_severity_low @integrity_monitoring_setting_event_rank_severity_low.setter def integrity_monitoring_setting_event_rank_severity_low(self, integrity_monitoring_setting_event_rank_severity_low): """Sets the integrity_monitoring_setting_event_rank_severity_low of this SystemSettings. Low # noqa: E501 :param integrity_monitoring_setting_event_rank_severity_low: The integrity_monitoring_setting_event_rank_severity_low of this SystemSettings. # noqa: E501 :type: SettingValue """ self._integrity_monitoring_setting_event_rank_severity_low = integrity_monitoring_setting_event_rank_severity_low @property def platform_setting_trend_micro_xdr_company_id(self): """Gets the platform_setting_trend_micro_xdr_company_id of this SystemSettings. # noqa: E501 Company ID # noqa: E501 :return: The platform_setting_trend_micro_xdr_company_id of this SystemSettings. # noqa: E501 :rtype: SettingValue """ return self._platform_setting_trend_micro_xdr_company_id @platform_setting_trend_micro_xdr_company_id.setter def platform_setting_trend_micro_xdr_company_id(self, platform_setting_trend_micro_xdr_company_id): """Sets the platform_setting_trend_micro_xdr_company_id of this SystemSettings. Company ID # noqa: E501 :param platform_setting_trend_micro_xdr_company_id: The platform_setting_trend_micro_xdr_company_id of this SystemSettings. # noqa: E501 :type: SettingValue """ self._platform_setting_trend_micro_xdr_company_id = platform_setting_trend_micro_xdr_company_id def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(SystemSettings, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, SystemSettings): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
61.514185
9,020
0.797044
30,419
262,358
6.278675
0.020645
0.164144
0.062411
0.05617
0.951579
0.940783
0.899309
0.832673
0.728254
0.635627
0
0.010477
0.16362
262,358
4,264
9,021
61.528612
0.859915
0.346012
0
0.089721
0
0
0.158702
0.147078
0
0
0
0
0
1
0.18063
false
0.048128
0.002377
0
0.276887
0.001188
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
abf589bd41b712749e120e18cf0f69ffb5523765
39
py
Python
python/dino/examples/__init__.py
danielsuo/dino
4f635fa3cd6bcf30380230cfda8ceef3cee52841
[ "MIT" ]
null
null
null
python/dino/examples/__init__.py
danielsuo/dino
4f635fa3cd6bcf30380230cfda8ceef3cee52841
[ "MIT" ]
null
null
null
python/dino/examples/__init__.py
danielsuo/dino
4f635fa3cd6bcf30380230cfda8ceef3cee52841
[ "MIT" ]
null
null
null
from .graph_simple import graph_simple
19.5
38
0.871795
6
39
5.333333
0.666667
0.6875
0
0
0
0
0
0
0
0
0
0
0.102564
39
1
39
39
0.914286
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
e61c8343707af24d44e29ae053967765871f7efe
218
py
Python
tvutil/viz/__init__.py
tvlearn/tvutil
05ff223684cc82b3562042c78353809f09f53440
[ "AFL-3.0" ]
null
null
null
tvutil/viz/__init__.py
tvlearn/tvutil
05ff223684cc82b3562042c78353809f09f53440
[ "AFL-3.0" ]
null
null
null
tvutil/viz/__init__.py
tvlearn/tvutil
05ff223684cc82b3562042c78353809f09f53440
[ "AFL-3.0" ]
null
null
null
from .image_grid import make_grid, scale, make_grid_with_black_boxes_and_white_background, save_grid __all__ = [ "make_grid", "scale", "make_grid_with_black_boxes_and_white_background", "save_grid", ]
24.222222
100
0.766055
31
218
4.645161
0.451613
0.222222
0.180556
0.236111
0.847222
0.847222
0.847222
0.847222
0.847222
0.847222
0
0
0.146789
218
8
101
27.25
0.774194
0
0
0
0
0
0.321101
0.215596
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
055e1d52ab5b6fc44f2f62ae710fccf565478ecc
188
py
Python
meetings/__init__.py
MaxwellCudlitz/Proj8-quickpatch
ceedfaf000550d3a7ae9f7cc78b097b6185a1522
[ "Artistic-2.0" ]
null
null
null
meetings/__init__.py
MaxwellCudlitz/Proj8-quickpatch
ceedfaf000550d3a7ae9f7cc78b097b6185a1522
[ "Artistic-2.0" ]
null
null
null
meetings/__init__.py
MaxwellCudlitz/Proj8-quickpatch
ceedfaf000550d3a7ae9f7cc78b097b6185a1522
[ "Artistic-2.0" ]
null
null
null
import flask from .modules.processing import free_times def test_freetime(): free_times.test_empty_calc() free_times.test_free_calc() free_times.test_malformed_prams()
23.5
43
0.760638
26
188
5.076923
0.538462
0.272727
0.295455
0.257576
0
0
0
0
0
0
0
0
0.164894
188
7
44
26.857143
0.840764
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
true
0
0.333333
0
0.5
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
55518ed922c857e4d5b5d4aa18cbe242f96f67a2
10,584
py
Python
Ekansh.py
sergeiissaev/March_Break_Camp
dc523cb0b1a6a27758bd16efa6e90bf7f90f3b0b
[ "Apache-2.0" ]
null
null
null
Ekansh.py
sergeiissaev/March_Break_Camp
dc523cb0b1a6a27758bd16efa6e90bf7f90f3b0b
[ "Apache-2.0" ]
null
null
null
Ekansh.py
sergeiissaev/March_Break_Camp
dc523cb0b1a6a27758bd16efa6e90bf7f90f3b0b
[ "Apache-2.0" ]
null
null
null
import sys health=100 print ('Welcome to the Computer Trivia!!!!!!!!!!!') print () print ('You have 100 health. For each question you get correct you get +50 health,') print ('for each incorrect question, you will lose 60 health. The max health you can') print ('get is 500 health. If you have 0 health then GAME OVER!! And you cant use any') print (' search engine for eg. Bing, Google, etc. You cant do an invalid choice or the') print (' game will be over. Good Luck player') #Question 1 user_input= input('Do you want to play(1) or quit(2)?: ') if user_input=='1': print('Get ready for the 1st question!') print () q1= input('''What storage device has a disk that spins? (1)HDD (2) SSD (3)Flash Storage: ''') if q1=='1': print ('CORRECT. You get +50 health') health+=50 print ('Your health is', health) elif q1=='2': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') elif q1=='3': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') else: print ('INVALID ENTRY, BYE') sys.exit() elif user_input=='2': print ('Your health is:',health) print ('BYE') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() #QUESTION 2 print() user_input= input('Do you want to play(1) or quit(2)?: ') if user_input=='1': print('Get ready for the 2nd question!') print () q1= input('''What does the motherboard do? (1)Removes Malvare (2) It passes electricity from one component to another (3)It Is a Storage Device: ''') if q1=='2': print ('CORRECT. You get +50 health') health+=50 print ('Your health is', health) elif q1=='1': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() elif q1=='3': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() elif user_input=='2': print ('Your health is:',health) print ('BYE') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() #QUESTION 3 print() user_input= input('Do you want to play(1) or quit(2)?: ') if user_input=='1': print('Get ready for the 3rd question!') print () q1= input('''What is Trojan? (1)It is a storage device (2)It is a hardware component (3)It is a Computer Virus: ''') if q1=='3': print ('CORRECT. You get +50 health') health+=50 print ('Your health is', health) elif q1=='1': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() elif q1=='2': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() elif user_input=='2': print ('Your health is:',health) print ('BYE') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() #QUESTION 4 print() user_input= input('Do you want to play(1) or quit(2)?: ') if user_input=='1': print('Get ready for the 4th question!') print () q1= input('''What kind of storage do phones use? (1)Floppy Disk (2)CD storage (3)Flash Storage: ''') if q1=='3': print ('CORRECT. You get +50 health') health+=50 print ('Your health is', health) elif q1=='1': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() elif q1=='2': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() elif user_input=='2': print ('Your health is:',health) print ('BYE') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() #QUESTION 5 print() user_input= input('Do you want to play(1) or quit(2)?: ') if user_input=='1': print('Get ready for the 5th question!') print () q1= input('''What kind of operating system is Android, or IOS? (1)DOS (2)LINUX (3)UNIX: ''') if q1=='2': print ('CORRECT. You get +50 health') health+=50 print ('Your health is', health) elif q1=='1': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() elif q1=='3': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() elif user_input=='2': print ('Your health is:',health) print ('BYE') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() #QUESTION 6 print() user_input= input('Do you want to play(1) or quit(2)?: ') if user_input=='1': print('Get ready for the 6th question!') print () q1= input('''What kind of operating system is UBUNTU? (1)QDOS (2)UNIX (3)LINUX: ''') if q1=='3': print ('CORRECT. You get +50 health') health+=50 print ('Your health is', health) elif q1=='1': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() elif q1=='2': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() elif user_input=='2': print ('Your health is:',health) print ('BYE') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() #QUESTION 7 print() user_input= input('Do you want to play(1) or quit(2)?: ') if user_input=='1': print('Get ready for the 7th question!') print () q1= input('''(Fill in the blank) Kali __ is an OS used for hacking? (1)MSDOS (2)LINUX (3)UNIX: ''') if q1=='2': print ('CORRECT. You get +50 health') health+=50 print ('Your health is', health) elif q1=='3': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() elif q1=='1': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() elif user_input=='2': print ('Your health is:',health) print ('BYE') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() #QUESTION 8 print() user_input= input('Do you want to play(1) or quit(2)?: ') if user_input=='1': print('Get ready for the 8th question!') print () q1= input('''What does Trojan do? (1)It helps remove malware (2)It hacks your computer and encrypts your files (3)It is an antivrus: ''') if q1=='2': print ('CORRECT. You get +50 health') health+=50 print ('Your health is', health) print ('YOU WIN WITH', health, 'HEALTH') elif q1=='3': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() elif q1=='1': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() elif user_input=='2': print ('Your health is:',health) print ('BYE') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() #QUESTION 9 print() user_input= input('Do you want to play(1) or quit(2)?: ') if user_input=='1': print('Get ready for the 9th question!') print () q1= input('''Is windows 10 more secure than Linux? (1)Yes (2)No (3)They both are same: ''') if q1=='1': print ('CORRECT. You get +50 health') health+=50 print ('Your health is', health) print ('YOU WIN WITH', health, 'HEALTH') elif q1=='3': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() elif q1=='2': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() elif user_input=='2': print ('Your health is:',health) print ('BYE') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() #QUESTION 10 print() user_input= input('Do you want to play(1) or quit(2)?: ') if user_input=='1': print('Get ready for the 10th question!') print () q1= input('''What is LINUX based on? (1)MSDOS (2)UNIX (3)QDOS: ''') if q1=='2': print ('CORRECT. You get +50 health') health+=50 print ('Your health is', health) print ('YOU WIN WITH', health, 'HEALTH') elif q1=='3': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() elif q1=='1': print ('INCORRECT You get -60 health') health-=60 print ('You have', health, 'health') if health<=0: print ('GAME OVER') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit() elif user_input=='2': print ('Your health is:',health) print ('BYE') sys.exit() else: print ('INVALID ENTRY, BYE') sys.exit()
28.918033
107
0.543745
1,454
10,584
3.936039
0.103851
0.111131
0.05242
0.059409
0.84938
0.830683
0.811812
0.80657
0.80657
0.80657
0
0.042813
0.302627
10,584
365
108
28.99726
0.732557
0.009543
0
0.892958
0
0.008451
0.380693
0
0
0
0
0
0
1
0
false
0.002817
0.002817
0
0.002817
0.442254
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
8
555c9524def06a1e4607e2d4a30938a3e1224c1d
5,996
py
Python
commissioning/nicmos_rn_cases.py
dobos/pysynphot
5d2e0b52ceda78890940ac9239c2d88e149e0bed
[ "BSD-3-Clause" ]
24
2015-01-04T23:38:21.000Z
2022-02-01T00:11:07.000Z
commissioning/nicmos_rn_cases.py
dobos/pysynphot
5d2e0b52ceda78890940ac9239c2d88e149e0bed
[ "BSD-3-Clause" ]
126
2015-01-29T14:50:37.000Z
2022-02-15T01:58:13.000Z
commissioning/nicmos_rn_cases.py
dobos/pysynphot
5d2e0b52ceda78890940ac9239c2d88e149e0bed
[ "BSD-3-Clause" ]
25
2015-02-09T12:12:02.000Z
2021-09-09T13:06:54.000Z
import basecase class nicmosC1(basecase.calcspecCase): def setUp(self): self.spectrum='rn(bb(5000),band(bessell,h),23,abmag)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC2(basecase.calcspecCase): def setUp(self): self.spectrum='rn(crgridkc96$sb_template.fits,band(nicmos,3,f110w),23,abmag)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC3(basecase.calcspecCase): def setUp(self): self.spectrum='rn(bb(5000),band(bessell,h),18,stmag)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC4(basecase.calcspecCase): def setUp(self): self.spectrum='rn(crgridkc96$sb_template.fits,band(nicmos,3,f110w),18,stmag)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC5(basecase.calcspecCase): def setUp(self): self.spectrum='rn(bb(5000),band(bessell,h),5,obmag)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC6(basecase.calcspecCase): def setUp(self): self.spectrum='rn(crgridkc96$sb_template.fits,band(nicmos,1,f090m),5,obmag)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC7(basecase.calcspecCase): def setUp(self): self.spectrum='rn(z(crgridkc96$sb_template.fits,2.0),band(bessell,k),5,obmag)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC8(basecase.calcspecCase): def setUp(self): self.spectrum='rn(bb(5000),band(bessell,h),1.0e-27,fnu)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC9(basecase.calcspecCase): def setUp(self): self.spectrum='rn(crgridkc96$sb_template.fits,band(nicmos,1,f090m),1.e-27,fnu)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC10(basecase.calcspecCase): def setUp(self): self.spectrum='rn(z(crgridkc96$sb_template.fits,2.0),band(bessell,h),1.0e-26,fnu)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC11(basecase.calcspecCase): def setUp(self): self.spectrum='rn(bb(5000),band(bessell,h),1.0e-14,photnu)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC12(basecase.calcspecCase): def setUp(self): self.spectrum='rn(crgridkc96$sb_template.fits,band(nicmos,1,f090m),1.0e-14,photnu)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC13(basecase.calcspecCase): def setUp(self): self.spectrum='rn(z(crgridkc96$sb_template.fits,2.0),band(bessell,h),1.0e-14,photnu)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC14(basecase.calcspecCase): def setUp(self): self.spectrum='rn(bb(5000),band(bessell,h),1.0e-4,photlam)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC15(basecase.calcspecCase): def setUp(self): self.spectrum='rn(crgridkc96$sb_template.fits,band(nicmos,1,f090m),1.0e-4,photlam)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC16(basecase.calcspecCase): def setUp(self): self.spectrum='rn(z(crgridkc96$sb_template.fits,2.0),band(nicmos,2,f237m),1.0e-4,photlam)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC17(basecase.calcspecCase): def setUp(self): self.spectrum='rn(bb(5000),band(bessell,h),5000,counts)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC18(basecase.calcspecCase): def setUp(self): self.spectrum='rn(bb(5000),band(nicmos,2,f237m),25000,counts)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC19(basecase.calcspecCase): def setUp(self): self.spectrum='rn(crgridkc96$sb_template.fits,band(nicmos,1,f090m),10000,counts)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC20(basecase.calcspecCase): def setUp(self): self.spectrum='rn(z(crgridkc96$sb_template.fits,1.5),band(nicmos,2,f237m),100000,counts)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC21(basecase.calcspecCase): def setUp(self): self.spectrum='rn(bb(5000),band(bessell,h),2.0e-7,jy)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC22(basecase.calcspecCase): def setUp(self): self.spectrum='rn(crgridkc96$sb_template.fits,band(nicmos,1,f090m),0.5,jy)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC23(basecase.calcspecCase): def setUp(self): self.spectrum='rn(z(crgridkc96$sb_template.fits,2.0),band(nicmos,2,f237m),0.5,jy)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC24(basecase.calcspecCase): def setUp(self): self.spectrum='rn(bb(5000),band(bessell,h),10,mjy)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC25(basecase.calcspecCase): def setUp(self): self.spectrum='rn(bb(5000),band(nicmos,3,f108n),30,mjy)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC26(basecase.calcspecCase): def setUp(self): self.spectrum='rn(z(crgridkc96$sb_template.fits,2.5),band(nicmos,3,f215n),20,mjy)' self.obsmode=None self.setglobal(__file__) self.runpy() class nicmosC27(basecase.calcspecCase): def setUp(self): self.spectrum='rn(z(crgridkc96$sb_template.fits,1.0),band(nicmos,2,f205w),20,mjy)' self.obsmode=None self.setglobal(__file__) self.runpy()
31.39267
98
0.654937
770
5,996
4.938961
0.114286
0.141993
0.163292
0.19879
0.908493
0.908493
0.908493
0.908493
0.908493
0.908493
0
0.057543
0.202969
5,996
190
99
31.557895
0.73823
0
0
0.662577
0
0.07362
0.246872
0.246872
0
0
0
0
0
1
0.165644
false
0
0.006135
0
0.337423
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
e9607603647999dcdff9266be263c9e58bfee6b4
105
py
Python
morgana/DatasetTools/fluorescence/__init__.py
Nikoula86/organoidSegment
b5d00256c15302ccd76b8b7a412852750476504b
[ "MIT" ]
8
2021-09-08T10:49:53.000Z
2022-02-25T13:28:03.000Z
morgana/DatasetTools/fluorescence/__init__.py
Nikoula86/organoidSegment
b5d00256c15302ccd76b8b7a412852750476504b
[ "MIT" ]
null
null
null
morgana/DatasetTools/fluorescence/__init__.py
Nikoula86/organoidSegment
b5d00256c15302ccd76b8b7a412852750476504b
[ "MIT" ]
1
2021-11-24T08:10:41.000Z
2021-11-24T08:10:41.000Z
import morgana.DatasetTools.fluorescence.io import morgana.DatasetTools.fluorescence.computefluorescence
35
60
0.904762
10
105
9.5
0.6
0.273684
0.526316
0.778947
0
0
0
0
0
0
0
0
0.038095
105
2
61
52.5
0.940594
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
e96783bdacef91668d396687ed8e0a5327ed2b7d
265
py
Python
time_template.py
Naunter/bdocn_client_en
a1c7e0330abf281b1b4e376d3bb9ae6e1e21147f
[ "MIT" ]
2
2021-06-24T04:18:32.000Z
2021-11-28T05:42:37.000Z
time_template.py
Naunter/bdocn_client_en
a1c7e0330abf281b1b4e376d3bb9ae6e1e21147f
[ "MIT" ]
null
null
null
time_template.py
Naunter/bdocn_client_en
a1c7e0330abf281b1b4e376d3bb9ae6e1e21147f
[ "MIT" ]
null
null
null
# @Time : 2021/03/23 # @Author : Naunter # @Page : https://github.com/Naunter # @Page : https://github.com/Naunter/bdocn_client_en from time import strftime,localtime def time_template(): print("\n" + str(strftime("%Y-%m-%d %H:%M:%S", localtime())))
29.444444
65
0.637736
38
265
4.368421
0.710526
0.13253
0.192771
0.26506
0.343373
0.343373
0
0
0
0
0
0.035874
0.158491
265
9
65
29.444444
0.70852
0.498113
0
0
0
0
0.147287
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0
0.666667
0.333333
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
7
75f33f49b6118f9dd3d077a49fefa78d441c2c6a
4,075
py
Python
data/typing/numpy.lib.stride_tricks.py
pydata-apis/python-api-record
684cffbbb6dc6e81f9de4e02619c8b0ebc557b2b
[ "MIT" ]
67
2020-08-17T11:53:26.000Z
2021-11-08T20:16:06.000Z
data/typing/numpy.lib.stride_tricks.py
data-apis/python-record-api
684cffbbb6dc6e81f9de4e02619c8b0ebc557b2b
[ "MIT" ]
36
2020-08-17T11:09:51.000Z
2021-12-15T18:09:47.000Z
data/typing/numpy.lib.stride_tricks.py
pydata-apis/python-api-record
684cffbbb6dc6e81f9de4e02619c8b0ebc557b2b
[ "MIT" ]
7
2020-08-19T05:06:47.000Z
2020-11-04T05:10:38.000Z
from typing import * @overload def as_strided(x: numpy.ndarray, shape: Tuple[int, int], strides: Tuple[int, int]): """ usage.matplotlib: 5 usage.scipy: 13 usage.skimage: 1 usage.statsmodels: 1 """ ... @overload def as_strided(x: numpy.ndarray, shape: Tuple[int], strides: Tuple[int]): """ usage.skimage: 1 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[int, int, int], strides: Tuple[int, int, int] ): """ usage.skimage: 1 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[ numpy.int64, numpy.int64, numpy.int64, numpy.int64, numpy.int64, numpy.int64 ], strides: Tuple[numpy.int64, numpy.int64, numpy.int64, int, int, int], ): """ usage.skimage: 1 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[numpy.int64, numpy.int64, numpy.int64, numpy.int64], strides: Tuple[numpy.int64, numpy.int64, int, int], ): """ usage.skimage: 3 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[numpy.int64, numpy.int64, numpy.int64, numpy.int64], strides: Tuple[int, int, numpy.int64, numpy.int64], ): """ usage.skimage: 2 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[numpy.int64, numpy.int64], strides: Tuple[int, numpy.int64], ): """ usage.skimage: 1 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[numpy.int64, numpy.int64], strides: Tuple[numpy.int64, int], ): """ usage.skimage: 1 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[int, int, int, int], strides: Tuple[int, int, int, int], writeable: bool, ): """ usage.xarray: 2 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[int, int], strides: Tuple[int, int], writeable: bool ): """ usage.xarray: 4 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[int, int, int], strides: Tuple[int, int, int], writeable: bool, ): """ usage.xarray: 2 """ ... @overload def as_strided( x: object, shape: Tuple[int, int, int], strides: Tuple[int, int, int], writeable: bool, ): """ usage.xarray: 1 """ ... @overload def as_strided( x: object, shape: Tuple[int, int, int, int], strides: Tuple[int, int, int, int], writeable: bool, ): """ usage.xarray: 1 """ ... @overload def as_strided(x: numpy.ndarray, shape: Tuple[int, ...], strides: Tuple[int, ...]): """ usage.pandas: 3 """ ... @overload def as_strided(x: numpy.ndarray, shape: Tuple[int]): """ usage.scipy: 1 """ ... @overload def as_strided(x: numpy.ndarray, shape: Tuple[int, int, int], strides: List[int]): """ usage.scipy: 7 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[int, int, int, int], strides: Tuple[int, int, int, int], ): """ usage.scipy: 1 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[numpy.int64, numpy.int64, numpy.int64, int, int, int], strides: Tuple[int, int, int, int, int, int], ): """ usage.sklearn: 3 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[numpy.int64, int], strides: Tuple[int, int] ): """ usage.sklearn: 1 """ ... @overload def as_strided( x: numpy.ndarray, shape: Tuple[numpy.int64, numpy.int64, int, int], strides: Tuple[int, int, int, int], ): """ usage.sklearn: 2 """ ... def as_strided( x: object, shape: Tuple[Union[numpy.int64, int], ...], writeable: bool = ..., strides: Union[Tuple[Union[numpy.int64, int], ...], List[int]] = ..., ): """ usage.matplotlib: 5 usage.pandas: 3 usage.scipy: 22 usage.skimage: 11 usage.sklearn: 6 usage.statsmodels: 1 usage.xarray: 10 """ ... class DummyArray: # usage.matplotlib: 2 base: object
16.365462
87
0.563926
500
4,075
4.554
0.084
0.137022
0.106719
0.119895
0.873518
0.837945
0.802811
0.784805
0.780413
0.754502
0
0.034837
0.260368
4,075
248
88
16.431452
0.720637
0.130061
0
0.807692
0
0
0
0
0
0
0
0
0
1
0.161538
false
0
0.007692
0
0.184615
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
f9428909a357c8a97f0aba66e06217cb8aec6ed4
109,610
py
Python
production_code/plot.py
dalakada/TwiCSv2
40672a99a201f6e2aab9dd085e1f4a29e8253f3b
[ "MIT" ]
2
2019-04-01T00:54:39.000Z
2021-06-22T18:02:47.000Z
production_code/plot.py
dalakada/TwiCSv2
40672a99a201f6e2aab9dd085e1f4a29e8253f3b
[ "MIT" ]
null
null
null
production_code/plot.py
dalakada/TwiCSv2
40672a99a201f6e2aab9dd085e1f4a29e8253f3b
[ "MIT" ]
2
2018-06-20T14:50:03.000Z
2020-08-27T01:55:34.000Z
#uncomment till here---> plot starts from mpl_toolkits import mplot3d import matplotlib.pyplot as plt import numpy as np import pandas as pd from scipy.optimize import curve_fit from scipy.optimize import leastsq,least_squares import matplotlib.cm as mplcm import matplotlib.colors as colors # #------------------------------------------with sketching derived from ambiguous entity and non-entity classes---------------------------------- # #----------------------------these are absolute top-15 values # ranking_effectiveness_single_sketch=[ 1.0, 0.8333333333333334, 0.8571428571428571, 0.76, 0.7586206896551724, 0.7222222222222222, 0.7441860465116279, 0.7169811320754716, 0.6885245901639344, 0.6818181818181818, 0.6619718309859155, 0.64, 0.6363636363636364, 0.6219512195121951, 0.5714285714285714, 0.5670103092783505, 0.5943396226415094, 0.6, 0.5948275862068966] # ranking_effectiveness_multi_sketch_cosine=[ 1.0, 0.8333333333333334, 0.7857142857142857, 0.68, 0.6896551724137931, 0.6111111111111112, 0.627906976744186, 0.5849056603773585, 0.5573770491803278, 0.5151515151515151, 0.5070422535211268, 0.5066666666666667, 0.5064935064935064, 0.4878048780487805, 0.4725274725274725, 0.4742268041237113, 0.5188679245283019, 0.5272727272727272, 0.5258620689655172] # ranking_effectiveness_multi_sketch_euclidean=[ 1.0, 0.8333333333333334, 0.7857142857142857, 0.68, 0.6551724137931034, 0.5555555555555556, 0.5813953488372093, 0.5471698113207547, 0.5245901639344263, 0.48484848484848486, 0.4788732394366197, 0.48, 0.4935064935064935, 0.4878048780487805, 0.4725274725274725, 0.4845360824742268, 0.5283018867924528, 0.5454545454545454, 0.5431034482758621] # combined_ranking_effectiveness=[ 1.0, 0.8333333333333334, 0.8571428571428571, 0.8, 0.8275862068965517, 0.7777777777777778, 0.7906976744186046, 0.7735849056603774, 0.7704918032786885, 0.7575757575757576, 0.7605633802816901, 0.76, 0.7662337662337663, 0.7560975609756098, 0.7252747252747253, 0.7216494845360825, 0.7452830188679245, 0.7545454545454545, 0.75] # ranking_effectiveness_single_sketch_amb= [1.0, 1.0, 0.6875, 0.56, 0.5, 0.45714285714285713, 0.40476190476190477, 0.33962264150943394, 0.3114754098360656, 0.2835820895522388, 0.2857142857142857, 0.2702702702702703, 0.2597402597402597, 0.23809523809523808, 0.23076923076923078, 0.24742268041237114, 0.2897196261682243, 0.2882882882882883, 0.30434782608695654] # ranking_effectiveness_multi_sketch_cosine_amb= [1.0, 0.8571428571428571, 0.625, 0.48, 0.42857142857142855, 0.4, 0.35714285714285715, 0.3018867924528302, 0.29508196721311475, 0.26865671641791045, 0.2571428571428571, 0.24324324324324326, 0.23376623376623376, 0.21428571428571427, 0.2087912087912088, 0.2268041237113402, 0.2523364485981308, 0.26126126126126126, 0.2782608695652174] # ranking_effectiveness_multi_sketch_euclidean_amb= [1.0, 0.8571428571428571, 0.5625, 0.44, 0.39285714285714285, 0.34285714285714286, 0.2857142857142857, 0.24528301886792453, 0.22950819672131148, 0.208955223880597, 0.2, 0.1891891891891892, 0.18181818181818182, 0.16666666666666666, 0.15384615384615385, 0.16494845360824742, 0.205607476635514, 0.21621621621621623, 0.23478260869565218] # combined_ranking_effectiveness_amb= [1.0, 1.0, 0.75, 0.64, 0.5714285714285714, 0.5142857142857142, 0.4523809523809524, 0.37735849056603776, 0.36065573770491804, 0.3283582089552239, 0.32857142857142857, 0.3108108108108108, 0.2987012987012987, 0.27380952380952384, 0.26373626373626374, 0.27835051546391754, 0.32710280373831774, 0.3333333333333333, 0.34782608695652173] # all_combined_ranking_effectiveness= [1.0, 1.0, 1.0, 1.0, 1.0, 0.9428571428571428, 0.9047619047619048, 0.8867924528301887, 0.9016393442622951, 0.8805970149253731, 0.8714285714285714, 0.8648648648648649, 0.8571428571428571, 0.8452380952380952, 0.8241758241758241, 0.8350515463917526, 0.8504672897196262, 0.8558558558558559, 0.8608695652173913] # # #----------------------------these are top-15 percent values # # ranking_effectiveness_single_sketch_amb= [0.0, 0.125, 0.16666666666666666, 0.14814814814814814, 0.12121212121212122, 0.13513513513513514, 0.14583333333333334, 0.14035087719298245, 0.13846153846153847, 0.13513513513513514, 0.14285714285714285, 0.1375, 0.13953488372093023, 0.1348314606741573, 0.14583333333333334, 0.15841584158415842, 0.1651376146788991, 0.17391304347826086, 0.17094017094017094] # # ranking_effectiveness_multi_sketch_cosine_amb= [0.0, 0.125, 0.16666666666666666, 0.2222222222222222, 0.18181818181818182, 0.1891891891891892, 0.1875, 0.17543859649122806, 0.16923076923076924, 0.16216216216216217, 0.16883116883116883, 0.1625, 0.16279069767441862, 0.15730337078651685, 0.16666666666666666, 0.1782178217821782, 0.1926605504587156, 0.2, 0.20512820512820512] # # ranking_effectiveness_multi_sketch_euclidean_amb= [0.0, 0.125, 0.1111111111111111, 0.14814814814814814, 0.12121212121212122, 0.13513513513513514, 0.10416666666666667, 0.10526315789473684, 0.1076923076923077, 0.10810810810810811, 0.1038961038961039, 0.1, 0.10465116279069768, 0.10112359550561797, 0.11458333333333333, 0.10891089108910891, 0.12844036697247707, 0.1391304347826087, 0.13675213675213677] # # combined_ranking_effectiveness_amb= [0.0, 0.125, 0.2222222222222222, 0.25925925925925924, 0.21212121212121213, 0.21621621621621623, 0.22916666666666666, 0.21052631578947367, 0.23076923076923078, 0.21621621621621623, 0.22077922077922077, 0.2125, 0.20930232558139536, 0.20224719101123595, 0.20833333333333334, 0.21782178217821782, 0.22935779816513763, 0.23478260869565218, 0.23931623931623933] # # all_combined_ranking_effectiveness= [0.5, 0.625, 0.6666666666666666, 0.7777777777777778, 0.7878787878787878, 0.7837837837837838, 0.7708333333333334, 0.7894736842105263, 0.8, 0.7702702702702703, 0.7662337662337663, 0.7625, 0.7674418604651163, 0.7752808988764045, 0.7916666666666666, 0.7920792079207921, 0.7981651376146789, 0.7913043478260869, 0.7948717948717948] # batches= range(1,20) # # for i in range(10,30,5): # # print(i) # #adding comment for pseudo push # # print(len(ranking_effectiveness_single_sketch),len(ranking_effectiveness_multi_sketch_cosine),len(ranking_effectiveness_multi_sketch_euclidean),len(combined_ranking_effectiveness)) # fig = plt.figure() # plt.hold(True) # plt.xticks(np.arange(1, 20, 1.0)) # plt.scatter(batches,ranking_effectiveness_single_sketch,label='single entity/non-entity sketch, cosine distance') # plt.scatter(batches,ranking_effectiveness_multi_sketch_cosine,label='multiple entity/non-entity sketches, cosine distance') # plt.scatter(batches,ranking_effectiveness_multi_sketch_euclidean,label='multiple entity/non-entity sketches, euclidean distance') # plt.scatter(batches,combined_ranking_effectiveness,label='multiple entity/non-entity sketching techniques combined') # plt.scatter(batches,ranking_effectiveness_single_sketch_amb,label='single ambiguous sketch, cosine distance') # plt.scatter(batches,ranking_effectiveness_multi_sketch_cosine_amb,label='multiple ambiguous sketches, cosine distance') # plt.scatter(batches,ranking_effectiveness_multi_sketch_euclidean_amb,label='multiple ambiguous sketches, euclidean distance') # plt.scatter(batches,combined_ranking_effectiveness_amb,label='multiple ambiguous sketching techniques combined') # plt.scatter(batches,all_combined_ranking_effectiveness,label='all sketching techniques combined') # plt.title("Ranking Function Effectiveness") # # plt.ylabel('ranking fucntion top-15 effectiveness') # plt.ylabel('ranking fucntion top-15 percent effectiveness') # plt.xlabel('Current Batch') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # # plt.savefig('effectiveness-sketching.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.savefig('effectiveness-sketching-top-15-percent.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # #determining optimal top-k in ranking; absolute k # k_values=[10,15,20,25,30] # ranking_effectiveness_single_sketch= [[1.0, 1.0, 1.0, 1.0, 1.0], [0.8571428571428571, 0.8571428571428571, 0.8571428571428571, 1.0, 1.0], [0.7333333333333333, 0.8666666666666667, 0.9333333333333333, 1.0, 1.0], [0.64, 0.76, 0.8, 0.96, 0.96], [0.6666666666666666, 0.7666666666666667, 0.8, 0.9333333333333333, 0.9333333333333333], [0.6571428571428571, 0.7714285714285715, 0.8285714285714286, 0.9428571428571428, 0.9428571428571428], [0.627906976744186, 0.7441860465116279, 0.7906976744186046, 0.8837209302325582, 0.8837209302325582], [0.6153846153846154, 0.7307692307692307, 0.7884615384615384, 0.8653846153846154, 0.8846153846153846], [0.5573770491803278, 0.6885245901639344, 0.7540983606557377, 0.819672131147541, 0.8360655737704918], [0.5303030303030303, 0.6666666666666666, 0.7272727272727273, 0.803030303030303, 0.8181818181818182], [0.5285714285714286, 0.6571428571428571, 0.7142857142857143, 0.7857142857142857, 0.8142857142857143], [0.5135135135135135, 0.6351351351351351, 0.6891891891891891, 0.7702702702702703, 0.7972972972972973], [0.5194805194805194, 0.6363636363636364, 0.6883116883116883, 0.7662337662337663, 0.8051948051948052], [0.5060240963855421, 0.6144578313253012, 0.6746987951807228, 0.7590361445783133, 0.7951807228915663], [0.4725274725274725, 0.5714285714285714, 0.6373626373626373, 0.7362637362637363, 0.7692307692307693], [0.4742268041237113, 0.5670103092783505, 0.6288659793814433, 0.7319587628865979, 0.7628865979381443], [0.4953271028037383, 0.5981308411214953, 0.6542056074766355, 0.7570093457943925, 0.7850467289719626], [0.48672566371681414, 0.5929203539823009, 0.6548672566371682, 0.7699115044247787, 0.7964601769911505], [0.4956521739130435, 0.6, 0.6608695652173913, 0.7739130434782608, 0.8]] # ranking_effectiveness_multi_sketch_cosine= [[1.0, 1.0, 1.0, 1.0, 1.0], [0.8571428571428571, 0.8571428571428571, 1.0, 1.0, 1.0], [0.6666666666666666, 0.8666666666666667, 0.9333333333333333, 0.9333333333333333, 1.0], [0.52, 0.76, 0.84, 0.84, 0.96], [0.5, 0.7333333333333333, 0.8666666666666667, 0.8666666666666667, 0.9666666666666667], [0.45714285714285713, 0.6857142857142857, 0.8571428571428571, 0.8857142857142857, 0.9714285714285714], [0.4418604651162791, 0.6511627906976745, 0.8372093023255814, 0.8604651162790697, 0.9302325581395349], [0.4423076923076923, 0.6153846153846154, 0.7884615384615384, 0.8461538461538461, 0.9230769230769231], [0.4426229508196721, 0.5901639344262295, 0.7377049180327869, 0.8032786885245902, 0.9016393442622951], [0.4090909090909091, 0.5454545454545454, 0.6818181818181818, 0.7727272727272727, 0.8787878787878788], [0.4142857142857143, 0.5428571428571428, 0.6714285714285714, 0.7714285714285715, 0.8857142857142857], [0.4189189189189189, 0.5405405405405406, 0.6621621621621622, 0.7567567567567568, 0.8783783783783784], [0.4155844155844156, 0.5454545454545454, 0.6623376623376623, 0.7532467532467533, 0.8701298701298701], [0.40963855421686746, 0.5301204819277109, 0.6626506024096386, 0.7469879518072289, 0.8554216867469879], [0.4065934065934066, 0.5164835164835165, 0.6373626373626373, 0.7362637362637363, 0.8351648351648352], [0.3917525773195876, 0.5154639175257731, 0.6391752577319587, 0.7319587628865979, 0.8247422680412371], [0.411214953271028, 0.5607476635514018, 0.6728971962616822, 0.7570093457943925, 0.8411214953271028], [0.415929203539823, 0.5663716814159292, 0.6814159292035398, 0.7699115044247787, 0.8495575221238938], [0.40869565217391307, 0.5652173913043478, 0.6782608695652174, 0.7739130434782608, 0.8521739130434782]] # ranking_effectiveness_multi_sketch_euclidean= [[1.0, 1.0, 1.0, 1.0, 1.0], [0.8571428571428571, 0.8571428571428571, 1.0, 1.0, 1.0], [0.6666666666666666, 0.8, 0.9333333333333333, 0.9333333333333333, 0.9333333333333333], [0.52, 0.72, 0.84, 0.84, 0.92], [0.5, 0.7, 0.8666666666666667, 0.8666666666666667, 0.9333333333333333], [0.45714285714285713, 0.6571428571428571, 0.8571428571428571, 0.8857142857142857, 0.9428571428571428], [0.4418604651162791, 0.627906976744186, 0.8372093023255814, 0.8604651162790697, 0.9069767441860465], [0.4230769230769231, 0.5961538461538461, 0.7884615384615384, 0.8461538461538461, 0.9038461538461539], [0.4262295081967213, 0.5737704918032787, 0.7377049180327869, 0.8032786885245902, 0.8852459016393442], [0.3939393939393939, 0.5303030303030303, 0.6818181818181818, 0.7575757575757576, 0.8636363636363636], [0.4, 0.5285714285714286, 0.6714285714285714, 0.7571428571428571, 0.8714285714285714], [0.40540540540540543, 0.527027027027027, 0.6621621621621622, 0.7432432432432432, 0.8648648648648649], [0.4025974025974026, 0.5324675324675324, 0.6623376623376623, 0.7402597402597403, 0.8571428571428571], [0.39759036144578314, 0.5301204819277109, 0.6626506024096386, 0.7349397590361446, 0.8433734939759037], [0.38461538461538464, 0.5164835164835165, 0.6483516483516484, 0.7142857142857143, 0.8241758241758241], [0.3711340206185567, 0.5257731958762887, 0.6494845360824743, 0.711340206185567, 0.8144329896907216], [0.3925233644859813, 0.5700934579439252, 0.6822429906542056, 0.7383177570093458, 0.8317757009345794], [0.39823008849557523, 0.584070796460177, 0.6902654867256637, 0.7522123893805309, 0.8407079646017699], [0.391304347826087, 0.5826086956521739, 0.6956521739130435, 0.7565217391304347, 0.8434782608695652]] # combined_ranking_effectiveness= [[1.0, 1.0, 1.0, 1.0, 1.0], [0.8571428571428571, 0.8571428571428571, 1.0, 1.0, 1.0], [0.8, 0.8666666666666667, 1.0, 1.0, 1.0], [0.72, 0.8, 0.88, 0.96, 0.96], [0.7333333333333333, 0.8, 0.9, 0.9666666666666667, 0.9666666666666667], [0.7142857142857143, 0.8, 0.9142857142857143, 0.9714285714285714, 0.9714285714285714], [0.6744186046511628, 0.7674418604651163, 0.8837209302325582, 0.9302325581395349, 0.9302325581395349], [0.6730769230769231, 0.7692307692307693, 0.8846153846153846, 0.9230769230769231, 0.9423076923076923], [0.6557377049180327, 0.7704918032786885, 0.8852459016393442, 0.9180327868852459, 0.9344262295081968], [0.6212121212121212, 0.7424242424242424, 0.8484848484848485, 0.9090909090909091, 0.9242424242424242], [0.6428571428571429, 0.7571428571428571, 0.8571428571428571, 0.9142857142857143, 0.9285714285714286], [0.6486486486486487, 0.7567567567567568, 0.8513513513513513, 0.918918918918919, 0.9324324324324325], [0.6493506493506493, 0.7532467532467533, 0.8441558441558441, 0.9090909090909091, 0.935064935064935], [0.6506024096385542, 0.7469879518072289, 0.8433734939759037, 0.9156626506024096, 0.9397590361445783], [0.6373626373626373, 0.7252747252747253, 0.8351648351648352, 0.9230769230769231, 0.945054945054945], [0.6288659793814433, 0.7216494845360825, 0.8247422680412371, 0.9175257731958762, 0.9381443298969072], [0.6542056074766355, 0.7476635514018691, 0.8411214953271028, 0.9252336448598131, 0.9439252336448598], [0.6548672566371682, 0.7522123893805309, 0.8407079646017699, 0.9292035398230089, 0.9469026548672567], [0.6608695652173913, 0.7565217391304347, 0.8434782608695652, 0.9304347826086956, 0.9478260869565217]] # ranking_effectiveness_ambiguous_single_sketch= [[0.3333333333333333, 0.8333333333333334, 1.0, 1.0, 1.0], [0.36363636363636365, 0.7272727272727273, 0.9090909090909091, 1.0, 1.0], [0.3333333333333333, 0.6111111111111112, 0.7777777777777778, 0.8333333333333334, 0.8888888888888888], [0.23076923076923078, 0.5, 0.7307692307692307, 0.8461538461538461, 0.8846153846153846], [0.17647058823529413, 0.5, 0.6764705882352942, 0.8235294117647058, 0.8529411764705882], [0.18421052631578946, 0.47368421052631576, 0.631578947368421, 0.7894736842105263, 0.8157894736842105], [0.1836734693877551, 0.42857142857142855, 0.5510204081632653, 0.7346938775510204, 0.7959183673469388], [0.16393442622950818, 0.39344262295081966, 0.4918032786885246, 0.6721311475409836, 0.7377049180327869], [0.14925373134328357, 0.3880597014925373, 0.4925373134328358, 0.6567164179104478, 0.7164179104477612], [0.13157894736842105, 0.3815789473684211, 0.4868421052631579, 0.631578947368421, 0.7105263157894737], [0.1282051282051282, 0.38461538461538464, 0.48717948717948717, 0.6282051282051282, 0.717948717948718], [0.12345679012345678, 0.37037037037037035, 0.4691358024691358, 0.6296296296296297, 0.7160493827160493], [0.11235955056179775, 0.33707865168539325, 0.43820224719101125, 0.5842696629213483, 0.6741573033707865], [0.10869565217391304, 0.32608695652173914, 0.43478260869565216, 0.5760869565217391, 0.6630434782608695], [0.1111111111111111, 0.31313131313131315, 0.41414141414141414, 0.5555555555555556, 0.6464646464646465], [0.1262135922330097, 0.32038834951456313, 0.4174757281553398, 0.5533980582524272, 0.6407766990291263], [0.14285714285714285, 0.3482142857142857, 0.45535714285714285, 0.5892857142857143, 0.6696428571428571], [0.16666666666666666, 0.36666666666666664, 0.48333333333333334, 0.6083333333333333, 0.6833333333333333], [0.184, 0.376, 0.496, 0.616, 0.696]] # ranking_effectiveness_ambiguous_multi_sketch_cosine= [[0.5, 1.0, 1.0, 1.0, 1.0], [0.5454545454545454, 0.8181818181818182, 0.8181818181818182, 0.9090909090909091, 1.0], [0.4444444444444444, 0.6111111111111112, 0.6111111111111112, 0.7222222222222222, 0.8333333333333334], [0.38461538461538464, 0.5769230769230769, 0.5769230769230769, 0.6923076923076923, 0.8076923076923077], [0.35294117647058826, 0.5588235294117647, 0.5588235294117647, 0.6470588235294118, 0.7352941176470589], [0.34210526315789475, 0.5263157894736842, 0.5263157894736842, 0.631578947368421, 0.7105263157894737], [0.2857142857142857, 0.46938775510204084, 0.4897959183673469, 0.5714285714285714, 0.6530612244897959], [0.26229508196721313, 0.4098360655737705, 0.4262295081967213, 0.5081967213114754, 0.5737704918032787], [0.23880597014925373, 0.40298507462686567, 0.43283582089552236, 0.5074626865671642, 0.5671641791044776], [0.2236842105263158, 0.39473684210526316, 0.4342105263157895, 0.5, 0.5789473684210527], [0.21794871794871795, 0.3974358974358974, 0.44871794871794873, 0.5128205128205128, 0.5897435897435898], [0.20987654320987653, 0.38271604938271603, 0.43209876543209874, 0.5185185185185185, 0.5925925925925926], [0.19101123595505617, 0.3595505617977528, 0.4044943820224719, 0.48314606741573035, 0.5617977528089888], [0.18478260869565216, 0.358695652173913, 0.40217391304347827, 0.4782608695652174, 0.5543478260869565], [0.18181818181818182, 0.3434343434343434, 0.3838383838383838, 0.46464646464646464, 0.5353535353535354], [0.18446601941747573, 0.34951456310679613, 0.3883495145631068, 0.46601941747572817, 0.5339805825242718], [0.20535714285714285, 0.36607142857142855, 0.41964285714285715, 0.5, 0.5714285714285714], [0.225, 0.38333333333333336, 0.43333333333333335, 0.5166666666666667, 0.5833333333333334], [0.24, 0.392, 0.448, 0.528, 0.592]] # ranking_effectiveness_ambiguous_multi_sketch_euclidean= [[0.5, 1.0, 1.0, 1.0, 1.0], [0.5454545454545454, 0.8181818181818182, 0.8181818181818182, 0.9090909090909091, 1.0], [0.3888888888888889, 0.5555555555555556, 0.6111111111111112, 0.7222222222222222, 0.8333333333333334], [0.3076923076923077, 0.46153846153846156, 0.6153846153846154, 0.6923076923076923, 0.8461538461538461], [0.29411764705882354, 0.4411764705882353, 0.5882352941176471, 0.6470588235294118, 0.7941176470588235], [0.2631578947368421, 0.42105263157894735, 0.5789473684210527, 0.631578947368421, 0.7631578947368421], [0.22448979591836735, 0.3469387755102041, 0.5102040816326531, 0.5510204081632653, 0.6938775510204082], [0.19672131147540983, 0.3114754098360656, 0.4426229508196721, 0.47540983606557374, 0.5901639344262295], [0.19402985074626866, 0.29850746268656714, 0.417910447761194, 0.4626865671641791, 0.5970149253731343], [0.18421052631578946, 0.3026315789473684, 0.42105263157894735, 0.47368421052631576, 0.5921052631578947], [0.1794871794871795, 0.2948717948717949, 0.4230769230769231, 0.47435897435897434, 0.6025641025641025], [0.1728395061728395, 0.2839506172839506, 0.4074074074074074, 0.4567901234567901, 0.5925925925925926], [0.16853932584269662, 0.2696629213483146, 0.38202247191011235, 0.42696629213483145, 0.550561797752809], [0.17391304347826086, 0.2717391304347826, 0.3804347826086957, 0.42391304347826086, 0.5434782608695652], [0.16161616161616163, 0.25252525252525254, 0.36363636363636365, 0.41414141414141414, 0.5353535353535354], [0.1553398058252427, 0.24271844660194175, 0.3592233009708738, 0.4077669902912621, 0.5339805825242718], [0.17857142857142858, 0.26785714285714285, 0.39285714285714285, 0.44642857142857145, 0.5714285714285714], [0.2, 0.2916666666666667, 0.4083333333333333, 0.4666666666666667, 0.5916666666666667], [0.2, 0.296, 0.424, 0.48, 0.6]] # combined_ranking_ambiguous_sketch_effectiveness= [[0.6666666666666666, 1.0, 1.0, 1.0, 1.0], [0.6363636363636364, 0.9090909090909091, 0.9090909090909091, 1.0, 1.0], [0.5555555555555556, 0.7222222222222222, 0.7777777777777778, 0.8333333333333334, 0.8888888888888888], [0.46153846153846156, 0.6923076923076923, 0.7692307692307693, 0.8461538461538461, 0.8846153846153846], [0.4411764705882353, 0.6470588235294118, 0.7058823529411765, 0.8235294117647058, 0.8529411764705882], [0.42105263157894735, 0.6052631578947368, 0.6842105263157895, 0.7894736842105263, 0.8157894736842105], [0.3673469387755102, 0.5510204081632653, 0.6326530612244898, 0.7346938775510204, 0.7959183673469388], [0.32786885245901637, 0.4918032786885246, 0.5573770491803278, 0.6721311475409836, 0.7377049180327869], [0.31343283582089554, 0.4925373134328358, 0.5522388059701493, 0.6567164179104478, 0.7313432835820896], [0.3026315789473684, 0.47368421052631576, 0.5394736842105263, 0.6447368421052632, 0.7236842105263158], [0.2948717948717949, 0.47435897435897434, 0.5512820512820513, 0.6538461538461539, 0.7307692307692307], [0.2839506172839506, 0.4567901234567901, 0.5308641975308642, 0.654320987654321, 0.7283950617283951], [0.2696629213483146, 0.42696629213483145, 0.4943820224719101, 0.6067415730337079, 0.6853932584269663], [0.2717391304347826, 0.42391304347826086, 0.4891304347826087, 0.5978260869565217, 0.6739130434782609], [0.26262626262626265, 0.40404040404040403, 0.46464646464646464, 0.5858585858585859, 0.6666666666666666], [0.27184466019417475, 0.4077669902912621, 0.46601941747572817, 0.5825242718446602, 0.6601941747572816], [0.2857142857142857, 0.4375, 0.5, 0.6160714285714286, 0.6875], [0.30833333333333335, 0.4583333333333333, 0.525, 0.6333333333333333, 0.7], [0.32, 0.464, 0.544, 0.648, 0.712]] # combined_ranking_all_sketches_effectiveness= [[1.0, 1.0, 1.0, 1.0, 1.0], [0.9090909090909091, 1.0, 1.0, 1.0, 1.0], [0.8333333333333334, 0.9444444444444444, 1.0, 1.0, 1.0], [0.8846153846153846, 0.9615384615384616, 1.0, 1.0, 1.0], [0.8823529411764706, 0.9705882352941176, 1.0, 1.0, 1.0], [0.868421052631579, 0.9736842105263158, 1.0, 1.0, 1.0], [0.8163265306122449, 0.9387755102040817, 0.9795918367346939, 1.0, 1.0], [0.7704918032786885, 0.9016393442622951, 0.9508196721311475, 0.9836065573770492, 1.0], [0.746268656716418, 0.8955223880597015, 0.9402985074626866, 0.9701492537313433, 1.0], [0.7236842105263158, 0.881578947368421, 0.9210526315789473, 0.9605263157894737, 1.0], [0.7307692307692307, 0.8846153846153846, 0.9230769230769231, 0.9615384615384616, 1.0], [0.7160493827160493, 0.8888888888888888, 0.9259259259259259, 0.9629629629629629, 1.0], [0.7078651685393258, 0.8651685393258427, 0.9101123595505618, 0.9438202247191011, 0.9887640449438202], [0.7065217391304348, 0.8586956521739131, 0.9130434782608695, 0.9456521739130435, 0.9891304347826086], [0.696969696969697, 0.8383838383838383, 0.898989898989899, 0.9494949494949495, 0.98989898989899], [0.7087378640776699, 0.8446601941747572, 0.9029126213592233, 0.9514563106796117, 0.9902912621359223], [0.7321428571428571, 0.8571428571428571, 0.9107142857142857, 0.9553571428571429, 0.9910714285714286], [0.7416666666666667, 0.8666666666666667, 0.9166666666666666, 0.9583333333333334, 0.9916666666666667], [0.744, 0.864, 0.92, 0.96, 0.992]] # #determining optimal top-k in ranking; percentage k # k_values=[20,25,30,35,40] # ranking_effectiveness_single_sketch= [[0.25, 0.5, 0.5, 0.5, 0.5], [0.375, 0.625, 0.625, 0.625, 0.625], [0.2777777777777778, 0.5, 0.5555555555555556, 0.6111111111111112, 0.7222222222222222], [0.3333333333333333, 0.5185185185185185, 0.5555555555555556, 0.5925925925925926, 0.6666666666666666], [0.36363636363636365, 0.5757575757575758, 0.6060606060606061, 0.6363636363636364, 0.696969696969697], [0.40540540540540543, 0.5945945945945946, 0.6486486486486487, 0.6756756756756757, 0.7297297297297297], [0.4375, 0.625, 0.6666666666666666, 0.6875, 0.75], [0.45614035087719296, 0.6491228070175439, 0.6842105263157895, 0.7017543859649122, 0.7543859649122807], [0.46153846153846156, 0.6307692307692307, 0.676923076923077, 0.6923076923076923, 0.7384615384615385], [0.44594594594594594, 0.5945945945945946, 0.6351351351351351, 0.6621621621621622, 0.7162162162162162], [0.45454545454545453, 0.5974025974025974, 0.6363636363636364, 0.6623376623376623, 0.7142857142857143], [0.45, 0.5875, 0.625, 0.6625, 0.7125], [0.4418604651162791, 0.5697674418604651, 0.6046511627906976, 0.6511627906976745, 0.7093023255813954], [0.4606741573033708, 0.5842696629213483, 0.6179775280898876, 0.6629213483146067, 0.7191011235955056], [0.4375, 0.5729166666666666, 0.6041666666666666, 0.6458333333333334, 0.7083333333333334], [0.44554455445544555, 0.5742574257425742, 0.6039603960396039, 0.6435643564356436, 0.7128712871287128], [0.44036697247706424, 0.5688073394495413, 0.5963302752293578, 0.6422018348623854, 0.7064220183486238], [0.4260869565217391, 0.5565217391304348, 0.591304347826087, 0.6347826086956522, 0.7043478260869566], [0.42735042735042733, 0.5641025641025641, 0.5982905982905983, 0.6410256410256411, 0.7094017094017094]] # ranking_effectiveness_multi_sketch_cosine= [[0.25, 0.25, 0.25, 0.25, 0.25], [0.375, 0.5, 0.5, 0.5, 0.5], [0.3333333333333333, 0.3888888888888889, 0.4444444444444444, 0.5555555555555556, 0.6111111111111112], [0.3333333333333333, 0.4074074074074074, 0.4444444444444444, 0.5555555555555556, 0.6666666666666666], [0.3333333333333333, 0.42424242424242425, 0.45454545454545453, 0.5757575757575758, 0.696969696969697], [0.32432432432432434, 0.40540540540540543, 0.4594594594594595, 0.5945945945945946, 0.7027027027027027], [0.3125, 0.4166666666666667, 0.4583333333333333, 0.625, 0.7291666666666666], [0.3333333333333333, 0.42105263157894735, 0.47368421052631576, 0.6140350877192983, 0.7368421052631579], [0.35384615384615387, 0.4307692307692308, 0.47692307692307695, 0.6153846153846154, 0.7230769230769231], [0.32432432432432434, 0.3918918918918919, 0.43243243243243246, 0.5540540540540541, 0.6891891891891891], [0.3116883116883117, 0.37662337662337664, 0.4155844155844156, 0.5454545454545454, 0.6753246753246753], [0.3125, 0.375, 0.4125, 0.5375, 0.6625], [0.3488372093023256, 0.4069767441860465, 0.4418604651162791, 0.5581395348837209, 0.6744186046511628], [0.34831460674157305, 0.4157303370786517, 0.449438202247191, 0.5617977528089888, 0.6741573033707865], [0.3541666666666667, 0.4375, 0.46875, 0.5729166666666666, 0.6770833333333334], [0.3465346534653465, 0.43564356435643564, 0.4752475247524752, 0.5841584158415841, 0.6831683168316832], [0.3394495412844037, 0.43119266055045874, 0.47706422018348627, 0.5871559633027523, 0.6788990825688074], [0.34782608695652173, 0.43478260869565216, 0.4782608695652174, 0.5826086956521739, 0.6782608695652174], [0.3418803418803419, 0.42735042735042733, 0.4700854700854701, 0.5811965811965812, 0.6752136752136753]] # ranking_effectiveness_multi_sketch_euclidean= [[0.25, 0.25, 0.25, 0.5, 0.5], [0.375, 0.5, 0.5, 0.625, 0.625], [0.3333333333333333, 0.4444444444444444, 0.4444444444444444, 0.6111111111111112, 0.6666666666666666], [0.3333333333333333, 0.4444444444444444, 0.48148148148148145, 0.6296296296296297, 0.7037037037037037], [0.36363636363636365, 0.45454545454545453, 0.48484848484848486, 0.6363636363636364, 0.7272727272727273], [0.35135135135135137, 0.43243243243243246, 0.4864864864864865, 0.6486486486486487, 0.7297297297297297], [0.3541666666666667, 0.4375, 0.4791666666666667, 0.6458333333333334, 0.75], [0.3684210526315789, 0.43859649122807015, 0.47368421052631576, 0.631578947368421, 0.7543859649122807], [0.38461538461538464, 0.4461538461538462, 0.47692307692307695, 0.6307692307692307, 0.7384615384615385], [0.35135135135135137, 0.40540540540540543, 0.43243243243243246, 0.5675675675675675, 0.7027027027027027], [0.33766233766233766, 0.38961038961038963, 0.4155844155844156, 0.5584415584415584, 0.6883116883116883], [0.3375, 0.3875, 0.4125, 0.55, 0.675], [0.37209302325581395, 0.4186046511627907, 0.4418604651162791, 0.5697674418604651, 0.686046511627907], [0.38202247191011235, 0.42696629213483145, 0.449438202247191, 0.5730337078651685, 0.6966292134831461], [0.3958333333333333, 0.4375, 0.46875, 0.5833333333333334, 0.6979166666666666], [0.38613861386138615, 0.43564356435643564, 0.48514851485148514, 0.594059405940594, 0.7029702970297029], [0.3761467889908257, 0.43119266055045874, 0.48623853211009177, 0.5963302752293578, 0.7064220183486238], [0.3826086956521739, 0.43478260869565216, 0.48695652173913045, 0.591304347826087, 0.7043478260869566], [0.37606837606837606, 0.42735042735042733, 0.47863247863247865, 0.5897435897435898, 0.7008547008547008]] # combined_ranking_effectiveness= [[0.25, 0.5, 0.5, 0.5, 0.5], [0.375, 0.625, 0.625, 0.625, 0.625], [0.3333333333333333, 0.6111111111111112, 0.6666666666666666, 0.6666666666666666, 0.7777777777777778], [0.4444444444444444, 0.6666666666666666, 0.7037037037037037, 0.7037037037037037, 0.7777777777777778], [0.45454545454545453, 0.696969696969697, 0.7272727272727273, 0.7272727272727273, 0.8181818181818182], [0.4864864864864865, 0.7027027027027027, 0.7567567567567568, 0.7567567567567568, 0.8378378378378378], [0.5, 0.7083333333333334, 0.75, 0.7708333333333334, 0.8541666666666666], [0.5263157894736842, 0.7368421052631579, 0.7719298245614035, 0.7894736842105263, 0.8596491228070176], [0.5538461538461539, 0.7384615384615385, 0.7846153846153846, 0.8, 0.8615384615384616], [0.5405405405405406, 0.7027027027027027, 0.7432432432432432, 0.7702702702702703, 0.8513513513513513], [0.5454545454545454, 0.7012987012987013, 0.7402597402597403, 0.7662337662337663, 0.8441558441558441], [0.55, 0.7, 0.7375, 0.775, 0.85], [0.5697674418604651, 0.7093023255813954, 0.7441860465116279, 0.7906976744186046, 0.8604651162790697], [0.5842696629213483, 0.7191011235955056, 0.7528089887640449, 0.797752808988764, 0.8651685393258427], [0.59375, 0.7395833333333334, 0.7708333333333334, 0.8125, 0.875], [0.594059405940594, 0.7326732673267327, 0.7722772277227723, 0.8118811881188119, 0.8811881188118812], [0.5871559633027523, 0.7247706422018348, 0.7706422018348624, 0.8165137614678899, 0.8807339449541285], [0.5826086956521739, 0.7217391304347827, 0.7739130434782608, 0.8173913043478261, 0.8869565217391304], [0.5811965811965812, 0.7264957264957265, 0.7777777777777778, 0.8205128205128205, 0.8888888888888888]] # ranking_effectiveness_ambiguous_single_sketch= [[0.0, 0.0, 0.0, 0.0, 0.0], [0.125, 0.125, 0.25, 0.25, 0.25], [0.16666666666666666, 0.16666666666666666, 0.2777777777777778, 0.3333333333333333, 0.3333333333333333], [0.1111111111111111, 0.14814814814814814, 0.2962962962962963, 0.37037037037037035, 0.4074074074074074], [0.09090909090909091, 0.12121212121212122, 0.24242424242424243, 0.3333333333333333, 0.36363636363636365], [0.10810810810810811, 0.13513513513513514, 0.24324324324324326, 0.32432432432432434, 0.3783783783783784], [0.10416666666666667, 0.14583333333333334, 0.22916666666666666, 0.3333333333333333, 0.4375], [0.10526315789473684, 0.14035087719298245, 0.21052631578947367, 0.3333333333333333, 0.42105263157894735], [0.09230769230769231, 0.13846153846153847, 0.2, 0.3384615384615385, 0.4307692307692308], [0.0945945945945946, 0.13513513513513514, 0.20270270270270271, 0.33783783783783783, 0.4189189189189189], [0.09090909090909091, 0.14285714285714285, 0.2077922077922078, 0.33766233766233766, 0.4155844155844156], [0.0875, 0.1375, 0.2, 0.325, 0.425], [0.08139534883720931, 0.13953488372093023, 0.19767441860465115, 0.32558139534883723, 0.4186046511627907], [0.07865168539325842, 0.1348314606741573, 0.19101123595505617, 0.3146067415730337, 0.4044943820224719], [0.08333333333333333, 0.14583333333333334, 0.19791666666666666, 0.3333333333333333, 0.4166666666666667], [0.09900990099009901, 0.15841584158415842, 0.2079207920792079, 0.33663366336633666, 0.4158415841584158], [0.11009174311926606, 0.1651376146788991, 0.21100917431192662, 0.3394495412844037, 0.42201834862385323], [0.12173913043478261, 0.17391304347826086, 0.22608695652173913, 0.34782608695652173, 0.43478260869565216], [0.11965811965811966, 0.17094017094017094, 0.23076923076923078, 0.3504273504273504, 0.4358974358974359]] # ranking_effectiveness_ambiguous_multi_sketch_cosine= [[0.0, 0.0, 0.0, 0.0, 0.0], [0.125, 0.125, 0.25, 0.375, 0.375], [0.1111111111111111, 0.16666666666666666, 0.2222222222222222, 0.2777777777777778, 0.3333333333333333], [0.14814814814814814, 0.2222222222222222, 0.2962962962962963, 0.37037037037037035, 0.4444444444444444], [0.12121212121212122, 0.18181818181818182, 0.2727272727272727, 0.3333333333333333, 0.3939393939393939], [0.13513513513513514, 0.1891891891891892, 0.2702702702702703, 0.32432432432432434, 0.3783783783783784], [0.10416666666666667, 0.1875, 0.2708333333333333, 0.3333333333333333, 0.375], [0.10526315789473684, 0.17543859649122806, 0.24561403508771928, 0.2982456140350877, 0.3333333333333333], [0.09230769230769231, 0.16923076923076924, 0.24615384615384617, 0.2923076923076923, 0.3384615384615385], [0.0945945945945946, 0.16216216216216217, 0.24324324324324326, 0.28378378378378377, 0.32432432432432434], [0.09090909090909091, 0.16883116883116883, 0.24675324675324675, 0.2987012987012987, 0.33766233766233766], [0.0875, 0.1625, 0.2375, 0.3, 0.3375], [0.08139534883720931, 0.16279069767441862, 0.23255813953488372, 0.29069767441860467, 0.32558139534883723], [0.07865168539325842, 0.15730337078651685, 0.2247191011235955, 0.2808988764044944, 0.3146067415730337], [0.08333333333333333, 0.16666666666666666, 0.22916666666666666, 0.2916666666666667, 0.3333333333333333], [0.0891089108910891, 0.1782178217821782, 0.2376237623762376, 0.297029702970297, 0.33663366336633666], [0.10091743119266056, 0.1926605504587156, 0.25688073394495414, 0.3119266055045872, 0.3486238532110092], [0.11304347826086956, 0.2, 0.2608695652173913, 0.3130434782608696, 0.3565217391304348], [0.11965811965811966, 0.20512820512820512, 0.26495726495726496, 0.3162393162393162, 0.358974358974359]] # ranking_effectiveness_ambiguous_multi_sketch_euclidean= [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.125, 0.25, 0.25, 0.25], [0.05555555555555555, 0.1111111111111111, 0.2222222222222222, 0.2777777777777778, 0.2777777777777778], [0.07407407407407407, 0.14814814814814814, 0.2962962962962963, 0.3333333333333333, 0.3333333333333333], [0.06060606060606061, 0.12121212121212122, 0.24242424242424243, 0.30303030303030304, 0.30303030303030304], [0.05405405405405406, 0.13513513513513514, 0.24324324324324326, 0.32432432432432434, 0.32432432432432434], [0.041666666666666664, 0.10416666666666667, 0.20833333333333334, 0.2916666666666667, 0.2916666666666667], [0.05263157894736842, 0.10526315789473684, 0.19298245614035087, 0.2631578947368421, 0.2631578947368421], [0.046153846153846156, 0.1076923076923077, 0.18461538461538463, 0.26153846153846155, 0.27692307692307694], [0.05405405405405406, 0.10810810810810811, 0.1891891891891892, 0.2702702702702703, 0.28378378378378377], [0.05194805194805195, 0.1038961038961039, 0.19480519480519481, 0.2727272727272727, 0.2987012987012987], [0.05, 0.1, 0.1875, 0.2625, 0.2875], [0.05813953488372093, 0.10465116279069768, 0.18604651162790697, 0.2558139534883721, 0.29069767441860467], [0.056179775280898875, 0.10112359550561797, 0.1797752808988764, 0.25842696629213485, 0.29213483146067415], [0.07291666666666667, 0.11458333333333333, 0.19791666666666666, 0.2708333333333333, 0.3020833333333333], [0.06930693069306931, 0.10891089108910891, 0.19801980198019803, 0.26732673267326734, 0.297029702970297], [0.08256880733944955, 0.12844036697247707, 0.21100917431192662, 0.28440366972477066, 0.3211009174311927], [0.09565217391304348, 0.1391304347826087, 0.21739130434782608, 0.28695652173913044, 0.33043478260869563], [0.09401709401709402, 0.13675213675213677, 0.21367521367521367, 0.2905982905982906, 0.3333333333333333]] # combined_ranking_ambiguous_sketch_effectiveness= [[0.0, 0.0, 0.0, 0.0, 0.0], [0.125, 0.125, 0.375, 0.375, 0.375], [0.2222222222222222, 0.2222222222222222, 0.3888888888888889, 0.3888888888888889, 0.4444444444444444], [0.2222222222222222, 0.25925925925925924, 0.4074074074074074, 0.4444444444444444, 0.5185185185185185], [0.18181818181818182, 0.21212121212121213, 0.36363636363636365, 0.3939393939393939, 0.45454545454545453], [0.1891891891891892, 0.21621621621621623, 0.35135135135135137, 0.40540540540540543, 0.4594594594594595], [0.16666666666666666, 0.22916666666666666, 0.3333333333333333, 0.4166666666666667, 0.5], [0.15789473684210525, 0.21052631578947367, 0.2982456140350877, 0.40350877192982454, 0.47368421052631576], [0.13846153846153847, 0.23076923076923078, 0.3076923076923077, 0.4, 0.49230769230769234], [0.13513513513513514, 0.21621621621621623, 0.2972972972972973, 0.3918918918918919, 0.47297297297297297], [0.12987012987012986, 0.22077922077922077, 0.2987012987012987, 0.4025974025974026, 0.4935064935064935], [0.125, 0.2125, 0.2875, 0.4, 0.5], [0.12790697674418605, 0.20930232558139536, 0.27906976744186046, 0.3953488372093023, 0.4883720930232558], [0.12359550561797752, 0.20224719101123595, 0.2696629213483146, 0.39325842696629215, 0.48314606741573035], [0.13541666666666666, 0.20833333333333334, 0.28125, 0.40625, 0.4895833333333333], [0.1485148514851485, 0.21782178217821782, 0.2871287128712871, 0.40594059405940597, 0.48514851485148514], [0.1651376146788991, 0.22935779816513763, 0.30275229357798167, 0.41284403669724773, 0.4954128440366973], [0.17391304347826086, 0.23478260869565218, 0.3130434782608696, 0.41739130434782606, 0.5043478260869565], [0.1794871794871795, 0.23931623931623933, 0.3162393162393162, 0.4188034188034188, 0.5042735042735043]] # combined_ranking_all_sketches_effectiveness= [[0.25, 0.5, 0.5, 0.5, 0.5], [0.375, 0.625, 0.75, 0.75, 0.75], [0.4444444444444444, 0.6666666666666666, 0.7777777777777778, 0.7777777777777778, 0.8888888888888888], [0.5555555555555556, 0.7777777777777778, 0.8518518518518519, 0.8518518518518519, 0.9259259259259259], [0.5454545454545454, 0.7878787878787878, 0.8787878787878788, 0.8787878787878788, 0.9393939393939394], [0.5675675675675675, 0.7837837837837838, 0.8918918918918919, 0.8918918918918919, 0.9459459459459459], [0.5833333333333334, 0.7708333333333334, 0.8541666666666666, 0.875, 0.9583333333333334], [0.5964912280701754, 0.7894736842105263, 0.8596491228070176, 0.8771929824561403, 0.9473684210526315], [0.6153846153846154, 0.8, 0.8615384615384616, 0.8769230769230769, 0.9538461538461539], [0.6081081081081081, 0.7702702702702703, 0.8243243243243243, 0.8513513513513513, 0.9459459459459459], [0.6103896103896104, 0.7662337662337663, 0.8181818181818182, 0.8441558441558441, 0.948051948051948], [0.6125, 0.7625, 0.8125, 0.85, 0.95], [0.627906976744186, 0.7674418604651163, 0.813953488372093, 0.8604651162790697, 0.9534883720930233], [0.6404494382022472, 0.7752808988764045, 0.8202247191011236, 0.8651685393258427, 0.9550561797752809], [0.6458333333333334, 0.7916666666666666, 0.8333333333333334, 0.875, 0.9583333333333334], [0.6534653465346535, 0.7920792079207921, 0.8415841584158416, 0.8811881188118812, 0.9603960396039604], [0.6605504587155964, 0.7981651376146789, 0.8440366972477065, 0.8899082568807339, 0.963302752293578], [0.6521739130434783, 0.7913043478260869, 0.8434782608695652, 0.8869565217391304, 0.9652173913043478], [0.6581196581196581, 0.7948717948717948, 0.8461538461538461, 0.8888888888888888, 0.9658119658119658]] # ############## entity/non-entity sketches # #plotting single sketch effectiveness values # fig1 = plt.figure() # plt.hold(True) # ranking_effectiveness_single_sketch= [[0.25, 0.5, 0.5, 0.5, 0.5], [0.375, 0.625, 0.625, 0.625, 0.625], [0.2777777777777778, 0.5, 0.5555555555555556, 0.6111111111111112, 0.7222222222222222], [0.3333333333333333, 0.5185185185185185, 0.5555555555555556, 0.5925925925925926, 0.6666666666666666], [0.36363636363636365, 0.5757575757575758, 0.6060606060606061, 0.6363636363636364, 0.696969696969697], [0.40540540540540543, 0.5945945945945946, 0.6486486486486487, 0.6756756756756757, 0.7297297297297297], [0.4375, 0.625, 0.6666666666666666, 0.6875, 0.75], [0.45614035087719296, 0.6491228070175439, 0.6842105263157895, 0.7017543859649122, 0.7543859649122807], [0.46153846153846156, 0.6307692307692307, 0.676923076923077, 0.6923076923076923, 0.7384615384615385], [0.44594594594594594, 0.5945945945945946, 0.6351351351351351, 0.6621621621621622, 0.7162162162162162], [0.45454545454545453, 0.5974025974025974, 0.6363636363636364, 0.6623376623376623, 0.7142857142857143], [0.45, 0.5875, 0.625, 0.6625, 0.7125], [0.4418604651162791, 0.5697674418604651, 0.6046511627906976, 0.6511627906976745, 0.7093023255813954], [0.4606741573033708, 0.5842696629213483, 0.6179775280898876, 0.6629213483146067, 0.7191011235955056], [0.4375, 0.5729166666666666, 0.6041666666666666, 0.6458333333333334, 0.7083333333333334], [0.44554455445544555, 0.5742574257425742, 0.6039603960396039, 0.6435643564356436, 0.7128712871287128], [0.44036697247706424, 0.5688073394495413, 0.5963302752293578, 0.6422018348623854, 0.7064220183486238], [0.4260869565217391, 0.5565217391304348, 0.591304347826087, 0.6347826086956522, 0.7043478260869566], [0.42735042735042733, 0.5641025641025641, 0.5982905982905983, 0.6410256410256411, 0.7094017094017094]] # for array_index in range(0,19): # array_to_plot= ranking_effectiveness_single_sketch[array_index] # plt.plot(k_values,array_to_plot,label='batch '+str(array_index+1)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('ranking function top-k percent effectiveness') # plt.xlabel('k-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # # plt.title('Ranking Function top-k effectiveness with single entity/non-entity sketches') # plt.title('Ranking Function top-k percent effectiveness with single entity/non-entity sketches') # # plt.savefig('top-k-with-single-entity-non-entity-sketches.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.savefig('top-k-percent-with-single-entity-non-entity-sketches.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # #plotting multi sketch cosine effectiveness values # fig1 = plt.figure() # plt.hold(True) # ranking_effectiveness_multi_sketch_cosine= [[0.25, 0.25, 0.25, 0.25, 0.25], [0.375, 0.5, 0.5, 0.5, 0.5], [0.3333333333333333, 0.3888888888888889, 0.4444444444444444, 0.5555555555555556, 0.6111111111111112], [0.3333333333333333, 0.4074074074074074, 0.4444444444444444, 0.5555555555555556, 0.6666666666666666], [0.3333333333333333, 0.42424242424242425, 0.45454545454545453, 0.5757575757575758, 0.696969696969697], [0.32432432432432434, 0.40540540540540543, 0.4594594594594595, 0.5945945945945946, 0.7027027027027027], [0.3125, 0.4166666666666667, 0.4583333333333333, 0.625, 0.7291666666666666], [0.3333333333333333, 0.42105263157894735, 0.47368421052631576, 0.6140350877192983, 0.7368421052631579], [0.35384615384615387, 0.4307692307692308, 0.47692307692307695, 0.6153846153846154, 0.7230769230769231], [0.32432432432432434, 0.3918918918918919, 0.43243243243243246, 0.5540540540540541, 0.6891891891891891], [0.3116883116883117, 0.37662337662337664, 0.4155844155844156, 0.5454545454545454, 0.6753246753246753], [0.3125, 0.375, 0.4125, 0.5375, 0.6625], [0.3488372093023256, 0.4069767441860465, 0.4418604651162791, 0.5581395348837209, 0.6744186046511628], [0.34831460674157305, 0.4157303370786517, 0.449438202247191, 0.5617977528089888, 0.6741573033707865], [0.3541666666666667, 0.4375, 0.46875, 0.5729166666666666, 0.6770833333333334], [0.3465346534653465, 0.43564356435643564, 0.4752475247524752, 0.5841584158415841, 0.6831683168316832], [0.3394495412844037, 0.43119266055045874, 0.47706422018348627, 0.5871559633027523, 0.6788990825688074], [0.34782608695652173, 0.43478260869565216, 0.4782608695652174, 0.5826086956521739, 0.6782608695652174], [0.3418803418803419, 0.42735042735042733, 0.4700854700854701, 0.5811965811965812, 0.6752136752136753]] # for array_index in range(0,19): # array_to_plot= ranking_effectiveness_multi_sketch_cosine[array_index] # plt.plot(k_values,array_to_plot,label='batch '+str(array_index+1)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('ranking function top-k percent effectiveness') # plt.xlabel('k-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # # plt.title('Ranking Function top-k effectiveness with multiple entity/non-entity sketches (cosine)') # # plt.savefig('top-k-multiple-entity-non-entity-sketches-cosine.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.title('Ranking Function top-k percent effectiveness with multiple entity/non-entity sketches (cosine)') # plt.savefig('top-k-percent-multiple-entity-non-entity-sketches-cosine.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # #plotting multi sketch euclidean effectiveness values # fig1 = plt.figure() # plt.hold(True) # ranking_effectiveness_multi_sketch_euclidean= [[0.25, 0.25, 0.25, 0.5, 0.5], [0.375, 0.5, 0.5, 0.625, 0.625], [0.3333333333333333, 0.4444444444444444, 0.4444444444444444, 0.6111111111111112, 0.6666666666666666], [0.3333333333333333, 0.4444444444444444, 0.48148148148148145, 0.6296296296296297, 0.7037037037037037], [0.36363636363636365, 0.45454545454545453, 0.48484848484848486, 0.6363636363636364, 0.7272727272727273], [0.35135135135135137, 0.43243243243243246, 0.4864864864864865, 0.6486486486486487, 0.7297297297297297], [0.3541666666666667, 0.4375, 0.4791666666666667, 0.6458333333333334, 0.75], [0.3684210526315789, 0.43859649122807015, 0.47368421052631576, 0.631578947368421, 0.7543859649122807], [0.38461538461538464, 0.4461538461538462, 0.47692307692307695, 0.6307692307692307, 0.7384615384615385], [0.35135135135135137, 0.40540540540540543, 0.43243243243243246, 0.5675675675675675, 0.7027027027027027], [0.33766233766233766, 0.38961038961038963, 0.4155844155844156, 0.5584415584415584, 0.6883116883116883], [0.3375, 0.3875, 0.4125, 0.55, 0.675], [0.37209302325581395, 0.4186046511627907, 0.4418604651162791, 0.5697674418604651, 0.686046511627907], [0.38202247191011235, 0.42696629213483145, 0.449438202247191, 0.5730337078651685, 0.6966292134831461], [0.3958333333333333, 0.4375, 0.46875, 0.5833333333333334, 0.6979166666666666], [0.38613861386138615, 0.43564356435643564, 0.48514851485148514, 0.594059405940594, 0.7029702970297029], [0.3761467889908257, 0.43119266055045874, 0.48623853211009177, 0.5963302752293578, 0.7064220183486238], [0.3826086956521739, 0.43478260869565216, 0.48695652173913045, 0.591304347826087, 0.7043478260869566], [0.37606837606837606, 0.42735042735042733, 0.47863247863247865, 0.5897435897435898, 0.7008547008547008]] # for array_index in range(0,19): # array_to_plot= ranking_effectiveness_multi_sketch_euclidean[array_index] # plt.plot(k_values,array_to_plot,label='batch '+str(array_index+1)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('ranking function top-k percent effectiveness') # plt.xlabel('k-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # # plt.title('Ranking Function top-k effectiveness with multiple entity/non-entity sketches (euclidean)') # # plt.savefig('top-k-multiple-entity-non-entity-sketches-euclidean.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.title('Ranking Function top-k percent effectiveness with multiple entity/non-entity sketches (euclidean)') # plt.savefig('top-k-percent-multiple-entity-non-entity-sketches-euclidean.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # #plotting combined sketching effectiveness values ent/non-ent sketches # fig1 = plt.figure() # plt.hold(True) # combined_ranking_effectiveness= [[0.25, 0.5, 0.5, 0.5, 0.5], [0.375, 0.625, 0.625, 0.625, 0.625], [0.3333333333333333, 0.6111111111111112, 0.6666666666666666, 0.6666666666666666, 0.7777777777777778], [0.4444444444444444, 0.6666666666666666, 0.7037037037037037, 0.7037037037037037, 0.7777777777777778], [0.45454545454545453, 0.696969696969697, 0.7272727272727273, 0.7272727272727273, 0.8181818181818182], [0.4864864864864865, 0.7027027027027027, 0.7567567567567568, 0.7567567567567568, 0.8378378378378378], [0.5, 0.7083333333333334, 0.75, 0.7708333333333334, 0.8541666666666666], [0.5263157894736842, 0.7368421052631579, 0.7719298245614035, 0.7894736842105263, 0.8596491228070176], [0.5538461538461539, 0.7384615384615385, 0.7846153846153846, 0.8, 0.8615384615384616], [0.5405405405405406, 0.7027027027027027, 0.7432432432432432, 0.7702702702702703, 0.8513513513513513], [0.5454545454545454, 0.7012987012987013, 0.7402597402597403, 0.7662337662337663, 0.8441558441558441], [0.55, 0.7, 0.7375, 0.775, 0.85], [0.5697674418604651, 0.7093023255813954, 0.7441860465116279, 0.7906976744186046, 0.8604651162790697], [0.5842696629213483, 0.7191011235955056, 0.7528089887640449, 0.797752808988764, 0.8651685393258427], [0.59375, 0.7395833333333334, 0.7708333333333334, 0.8125, 0.875], [0.594059405940594, 0.7326732673267327, 0.7722772277227723, 0.8118811881188119, 0.8811881188118812], [0.5871559633027523, 0.7247706422018348, 0.7706422018348624, 0.8165137614678899, 0.8807339449541285], [0.5826086956521739, 0.7217391304347827, 0.7739130434782608, 0.8173913043478261, 0.8869565217391304], [0.5811965811965812, 0.7264957264957265, 0.7777777777777778, 0.8205128205128205, 0.8888888888888888]] # for array_index in range(0,19): # array_to_plot= combined_ranking_effectiveness[array_index] # plt.plot(k_values,array_to_plot,label='batch '+str(array_index+1)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('ranking function top-k percent effectiveness') # plt.xlabel('k-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # # plt.title('Ranking Function top-k effectiveness with a combination of sketches') # # plt.savefig('top-k-entity-non-entity-combined-sketching.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.title('Ranking Function top-k percent effectiveness with a combination of sketches') # plt.savefig('top-k-percent-entity-non-entity-combined-sketching.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # #plotting single sketch ambiguous effectiveness values # fig1 = plt.figure() # plt.hold(True) # ranking_effectiveness_ambiguous_single_sketch= [[0.0, 0.0, 0.0, 0.0, 0.0], [0.125, 0.125, 0.25, 0.25, 0.25], [0.16666666666666666, 0.16666666666666666, 0.2777777777777778, 0.3333333333333333, 0.3333333333333333], [0.1111111111111111, 0.14814814814814814, 0.2962962962962963, 0.37037037037037035, 0.4074074074074074], [0.09090909090909091, 0.12121212121212122, 0.24242424242424243, 0.3333333333333333, 0.36363636363636365], [0.10810810810810811, 0.13513513513513514, 0.24324324324324326, 0.32432432432432434, 0.3783783783783784], [0.10416666666666667, 0.14583333333333334, 0.22916666666666666, 0.3333333333333333, 0.4375], [0.10526315789473684, 0.14035087719298245, 0.21052631578947367, 0.3333333333333333, 0.42105263157894735], [0.09230769230769231, 0.13846153846153847, 0.2, 0.3384615384615385, 0.4307692307692308], [0.0945945945945946, 0.13513513513513514, 0.20270270270270271, 0.33783783783783783, 0.4189189189189189], [0.09090909090909091, 0.14285714285714285, 0.2077922077922078, 0.33766233766233766, 0.4155844155844156], [0.0875, 0.1375, 0.2, 0.325, 0.425], [0.08139534883720931, 0.13953488372093023, 0.19767441860465115, 0.32558139534883723, 0.4186046511627907], [0.07865168539325842, 0.1348314606741573, 0.19101123595505617, 0.3146067415730337, 0.4044943820224719], [0.08333333333333333, 0.14583333333333334, 0.19791666666666666, 0.3333333333333333, 0.4166666666666667], [0.09900990099009901, 0.15841584158415842, 0.2079207920792079, 0.33663366336633666, 0.4158415841584158], [0.11009174311926606, 0.1651376146788991, 0.21100917431192662, 0.3394495412844037, 0.42201834862385323], [0.12173913043478261, 0.17391304347826086, 0.22608695652173913, 0.34782608695652173, 0.43478260869565216], [0.11965811965811966, 0.17094017094017094, 0.23076923076923078, 0.3504273504273504, 0.4358974358974359]] # for array_index in range(0,19): # array_to_plot= ranking_effectiveness_ambiguous_single_sketch[array_index] # plt.plot(k_values,array_to_plot,label='batch '+str(array_index+1)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('ranking function top-k percent effectiveness') # plt.xlabel('k-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # # plt.title('Ranking Function top-k effectiveness with single ambiguous sketches') # # plt.savefig('top-k-with-single-ambiguous-sketches.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.title('Ranking Function top-k percent effectiveness with single ambiguous sketches') # plt.savefig('top-k-percent-with-single-ambiguous-sketches.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # #plotting multi sketch ambiguous cosine effectiveness values # fig1 = plt.figure() # plt.hold(True) # ranking_effectiveness_ambiguous_multi_sketch_cosine= [[0.0, 0.0, 0.0, 0.0, 0.0], [0.125, 0.125, 0.25, 0.375, 0.375], [0.1111111111111111, 0.16666666666666666, 0.2222222222222222, 0.2777777777777778, 0.3333333333333333], [0.14814814814814814, 0.2222222222222222, 0.2962962962962963, 0.37037037037037035, 0.4444444444444444], [0.12121212121212122, 0.18181818181818182, 0.2727272727272727, 0.3333333333333333, 0.3939393939393939], [0.13513513513513514, 0.1891891891891892, 0.2702702702702703, 0.32432432432432434, 0.3783783783783784], [0.10416666666666667, 0.1875, 0.2708333333333333, 0.3333333333333333, 0.375], [0.10526315789473684, 0.17543859649122806, 0.24561403508771928, 0.2982456140350877, 0.3333333333333333], [0.09230769230769231, 0.16923076923076924, 0.24615384615384617, 0.2923076923076923, 0.3384615384615385], [0.0945945945945946, 0.16216216216216217, 0.24324324324324326, 0.28378378378378377, 0.32432432432432434], [0.09090909090909091, 0.16883116883116883, 0.24675324675324675, 0.2987012987012987, 0.33766233766233766], [0.0875, 0.1625, 0.2375, 0.3, 0.3375], [0.08139534883720931, 0.16279069767441862, 0.23255813953488372, 0.29069767441860467, 0.32558139534883723], [0.07865168539325842, 0.15730337078651685, 0.2247191011235955, 0.2808988764044944, 0.3146067415730337], [0.08333333333333333, 0.16666666666666666, 0.22916666666666666, 0.2916666666666667, 0.3333333333333333], [0.0891089108910891, 0.1782178217821782, 0.2376237623762376, 0.297029702970297, 0.33663366336633666], [0.10091743119266056, 0.1926605504587156, 0.25688073394495414, 0.3119266055045872, 0.3486238532110092], [0.11304347826086956, 0.2, 0.2608695652173913, 0.3130434782608696, 0.3565217391304348], [0.11965811965811966, 0.20512820512820512, 0.26495726495726496, 0.3162393162393162, 0.358974358974359]] # for array_index in range(0,19): # array_to_plot= ranking_effectiveness_ambiguous_multi_sketch_cosine[array_index] # plt.plot(k_values,array_to_plot,label='batch '+str(array_index+1)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('ranking function top-k percent effectiveness') # plt.xlabel('k-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # # plt.title('Ranking Function top-k effectiveness with multiple ambiguous sketches (cosine)') # # plt.savefig('top-k-multiple-ambiguous-sketches-cosine.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.title('Ranking Function top-k percent effectiveness with multiple ambiguous sketches (cosine)') # plt.savefig('top-k-percent-multiple-ambiguous-sketches-cosine.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # #plotting multi sketch ambiguous euclidean effectiveness values # fig1 = plt.figure() # plt.hold(True) # ranking_effectiveness_ambiguous_multi_sketch_euclidean= [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.125, 0.25, 0.25, 0.25], [0.05555555555555555, 0.1111111111111111, 0.2222222222222222, 0.2777777777777778, 0.2777777777777778], [0.07407407407407407, 0.14814814814814814, 0.2962962962962963, 0.3333333333333333, 0.3333333333333333], [0.06060606060606061, 0.12121212121212122, 0.24242424242424243, 0.30303030303030304, 0.30303030303030304], [0.05405405405405406, 0.13513513513513514, 0.24324324324324326, 0.32432432432432434, 0.32432432432432434], [0.041666666666666664, 0.10416666666666667, 0.20833333333333334, 0.2916666666666667, 0.2916666666666667], [0.05263157894736842, 0.10526315789473684, 0.19298245614035087, 0.2631578947368421, 0.2631578947368421], [0.046153846153846156, 0.1076923076923077, 0.18461538461538463, 0.26153846153846155, 0.27692307692307694], [0.05405405405405406, 0.10810810810810811, 0.1891891891891892, 0.2702702702702703, 0.28378378378378377], [0.05194805194805195, 0.1038961038961039, 0.19480519480519481, 0.2727272727272727, 0.2987012987012987], [0.05, 0.1, 0.1875, 0.2625, 0.2875], [0.05813953488372093, 0.10465116279069768, 0.18604651162790697, 0.2558139534883721, 0.29069767441860467], [0.056179775280898875, 0.10112359550561797, 0.1797752808988764, 0.25842696629213485, 0.29213483146067415], [0.07291666666666667, 0.11458333333333333, 0.19791666666666666, 0.2708333333333333, 0.3020833333333333], [0.06930693069306931, 0.10891089108910891, 0.19801980198019803, 0.26732673267326734, 0.297029702970297], [0.08256880733944955, 0.12844036697247707, 0.21100917431192662, 0.28440366972477066, 0.3211009174311927], [0.09565217391304348, 0.1391304347826087, 0.21739130434782608, 0.28695652173913044, 0.33043478260869563], [0.09401709401709402, 0.13675213675213677, 0.21367521367521367, 0.2905982905982906, 0.3333333333333333]] # for array_index in range(0,19): # array_to_plot= ranking_effectiveness_ambiguous_multi_sketch_euclidean[array_index] # plt.plot(k_values,array_to_plot,label='batch '+str(array_index+1)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('ranking function top-k percent effectiveness') # plt.xlabel('k-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # # plt.title('Ranking Function top-k effectiveness with multiple ambiguous sketches (euclidean)') # # plt.savefig('top-k-multiple-ambiguous-sketches-euclidean.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.title('Ranking Function top-k percent effectiveness with multiple ambiguous sketches (euclidean)') # plt.savefig('top-k-percent-multiple-ambiguous-sketches-euclidean.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # #plotting combined sketching ambiguous effectiveness values # fig1 = plt.figure() # plt.hold(True) # combined_ranking_ambiguous_sketch_effectiveness= [[0.0, 0.0, 0.0, 0.0, 0.0], [0.125, 0.125, 0.375, 0.375, 0.375], [0.2222222222222222, 0.2222222222222222, 0.3888888888888889, 0.3888888888888889, 0.4444444444444444], [0.2222222222222222, 0.25925925925925924, 0.4074074074074074, 0.4444444444444444, 0.5185185185185185], [0.18181818181818182, 0.21212121212121213, 0.36363636363636365, 0.3939393939393939, 0.45454545454545453], [0.1891891891891892, 0.21621621621621623, 0.35135135135135137, 0.40540540540540543, 0.4594594594594595], [0.16666666666666666, 0.22916666666666666, 0.3333333333333333, 0.4166666666666667, 0.5], [0.15789473684210525, 0.21052631578947367, 0.2982456140350877, 0.40350877192982454, 0.47368421052631576], [0.13846153846153847, 0.23076923076923078, 0.3076923076923077, 0.4, 0.49230769230769234], [0.13513513513513514, 0.21621621621621623, 0.2972972972972973, 0.3918918918918919, 0.47297297297297297], [0.12987012987012986, 0.22077922077922077, 0.2987012987012987, 0.4025974025974026, 0.4935064935064935], [0.125, 0.2125, 0.2875, 0.4, 0.5], [0.12790697674418605, 0.20930232558139536, 0.27906976744186046, 0.3953488372093023, 0.4883720930232558], [0.12359550561797752, 0.20224719101123595, 0.2696629213483146, 0.39325842696629215, 0.48314606741573035], [0.13541666666666666, 0.20833333333333334, 0.28125, 0.40625, 0.4895833333333333], [0.1485148514851485, 0.21782178217821782, 0.2871287128712871, 0.40594059405940597, 0.48514851485148514], [0.1651376146788991, 0.22935779816513763, 0.30275229357798167, 0.41284403669724773, 0.4954128440366973], [0.17391304347826086, 0.23478260869565218, 0.3130434782608696, 0.41739130434782606, 0.5043478260869565], [0.1794871794871795, 0.23931623931623933, 0.3162393162393162, 0.4188034188034188, 0.5042735042735043]] # for array_index in range(0,19): # array_to_plot= combined_ranking_ambiguous_sketch_effectiveness[array_index] # plt.plot(k_values,array_to_plot,label='batch '+str(array_index+1)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('ranking function top-k percent effectiveness') # plt.xlabel('k-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # # plt.title('Ranking Function top-k effectiveness with a combination of ambiguous class sketches') # # plt.savefig('top-k-ambiguous-combined-sketching.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.title('Ranking Function top-k percent effectiveness with a combination of ambiguous class sketches') # plt.savefig('top-k-percent-ambiguous-combined-sketching.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # #plotting combined sketching effectiveness values # fig1 = plt.figure() # plt.hold(True) # combined_ranking_all_sketches_effectiveness= [[0.25, 0.5, 0.5, 0.5, 0.5], [0.375, 0.625, 0.75, 0.75, 0.75], [0.4444444444444444, 0.6666666666666666, 0.7777777777777778, 0.7777777777777778, 0.8888888888888888], [0.5555555555555556, 0.7777777777777778, 0.8518518518518519, 0.8518518518518519, 0.9259259259259259], [0.5454545454545454, 0.7878787878787878, 0.8787878787878788, 0.8787878787878788, 0.9393939393939394], [0.5675675675675675, 0.7837837837837838, 0.8918918918918919, 0.8918918918918919, 0.9459459459459459], [0.5833333333333334, 0.7708333333333334, 0.8541666666666666, 0.875, 0.9583333333333334], [0.5964912280701754, 0.7894736842105263, 0.8596491228070176, 0.8771929824561403, 0.9473684210526315], [0.6153846153846154, 0.8, 0.8615384615384616, 0.8769230769230769, 0.9538461538461539], [0.6081081081081081, 0.7702702702702703, 0.8243243243243243, 0.8513513513513513, 0.9459459459459459], [0.6103896103896104, 0.7662337662337663, 0.8181818181818182, 0.8441558441558441, 0.948051948051948], [0.6125, 0.7625, 0.8125, 0.85, 0.95], [0.627906976744186, 0.7674418604651163, 0.813953488372093, 0.8604651162790697, 0.9534883720930233], [0.6404494382022472, 0.7752808988764045, 0.8202247191011236, 0.8651685393258427, 0.9550561797752809], [0.6458333333333334, 0.7916666666666666, 0.8333333333333334, 0.875, 0.9583333333333334], [0.6534653465346535, 0.7920792079207921, 0.8415841584158416, 0.8811881188118812, 0.9603960396039604], [0.6605504587155964, 0.7981651376146789, 0.8440366972477065, 0.8899082568807339, 0.963302752293578], [0.6521739130434783, 0.7913043478260869, 0.8434782608695652, 0.8869565217391304, 0.9652173913043478], [0.6581196581196581, 0.7948717948717948, 0.8461538461538461, 0.8888888888888888, 0.9658119658119658]] # for array_index in range(0,19): # array_to_plot= combined_ranking_all_sketches_effectiveness[array_index] # plt.plot(k_values,array_to_plot,label='batch '+str(array_index+1)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('ranking function top-k percent effectiveness') # plt.xlabel('k-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # # plt.title('Ranking Function top-k effectiveness with a combination of sketches') # # plt.savefig('top-k-all-combined-sketching.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.title('Ranking Function top-k percent effectiveness with a combination of sketches') # plt.savefig('top-k-percent-all-combined-sketching.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # #------------------------------------------with sketching derived from ambiguous entity and non-entity classes---------------------------------- #------------------------------------------for eviction----------------------------------------------------- # eviction_ranking_precision_ent_nonEnt_single_sketch= [[0.9, 0.8, 0.8, 0.84, 0.8666666666666667, 0.8571428571428571, 0.85], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.95], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 0.9333333333333333, 0.9, 0.92, 0.9333333333333333, 0.9428571428571428, 0.95], [0.9, 0.9333333333333333, 0.95, 0.92, 0.9333333333333333, 0.9428571428571428, 0.95], [1.0, 1.0, 1.0, 1.0, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 0.9333333333333333, 0.9428571428571428, 0.95], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9428571428571428, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.975], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] # eviction_ranking_precision_ent_nonEnt_multi_sketch_cosine= [[0.9, 0.9333333333333333, 0.95, 0.88, 0.8666666666666667, 0.8285714285714286, 0.825], [1.0, 1.0, 1.0, 0.96, 0.9333333333333333, 0.8857142857142857, 0.875], [1.0, 1.0, 1.0, 1.0, 0.9666666666666667, 0.9428571428571428, 0.9], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] # eviction_ranking_precision_ent_nonEnt_multi_sketch_euclidean= [[0.9, 0.9333333333333333, 0.95, 0.92, 0.8666666666666667, 0.8571428571428571, 0.825], [1.0, 1.0, 1.0, 0.96, 0.9333333333333333, 0.8857142857142857, 0.875], [1.0, 1.0, 1.0, 1.0, 0.9666666666666667, 0.9428571428571428, 0.9], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] # eviction_ranking_precision_ent_nonEnt_multi_sketch_combined= [[0.5, 0.4666666666666667, 0.55, 0.52, 0.6, 0.6, 0.625], [0.5, 0.6666666666666666, 0.65, 0.6, 0.7333333333333333, 0.6857142857142857, 0.65], [0.6, 0.6, 0.7, 0.68, 0.7, 0.7142857142857143, 0.65], [0.6, 0.4666666666666667, 0.6, 0.6, 0.5666666666666667, 0.6285714285714286, 0.675], [0.6, 0.6, 0.5, 0.6, 0.6, 0.6285714285714286, 0.65], [0.6, 0.4666666666666667, 0.5, 0.6, 0.5666666666666667, 0.6, 0.625], [0.7, 0.6, 0.65, 0.6, 0.5666666666666667, 0.5428571428571428, 0.55], [0.7, 0.6, 0.65, 0.6, 0.5666666666666667, 0.5428571428571428, 0.575], [0.8, 0.8, 0.55, 0.64, 0.6666666666666666, 0.6285714285714286, 0.575], [0.6, 0.6, 0.55, 0.68, 0.6666666666666666, 0.6571428571428571, 0.625], [0.6, 0.5333333333333333, 0.5, 0.6, 0.5666666666666667, 0.6285714285714286, 0.675], [0.5, 0.5333333333333333, 0.55, 0.56, 0.6333333333333333, 0.6571428571428571, 0.625], [0.6, 0.4666666666666667, 0.55, 0.56, 0.6333333333333333, 0.6571428571428571, 0.65], [0.6, 0.5333333333333333, 0.55, 0.6, 0.6333333333333333, 0.6, 0.625], [0.6, 0.5333333333333333, 0.6, 0.64, 0.6666666666666666, 0.6, 0.625], [0.5, 0.5333333333333333, 0.55, 0.6, 0.7, 0.6285714285714286, 0.6], [0.8, 0.6666666666666666, 0.55, 0.6, 0.6333333333333333, 0.6571428571428571, 0.6571428571428571], [0.9, 0.9, 0.9, 0.44, 0.5666666666666667, 0.6285714285714286, 0.65]] # eviction_ranking_precision_ambiguous_single_sketch= [[0.9, 0.8666666666666667, 0.85, 0.84, 0.8, 0.8285714285714286, 0.825], [0.7, 0.8, 0.85, 0.84, 0.8333333333333334, 0.8571428571428571, 0.875], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9333333333333333, 0.8857142857142857, 0.875], [0.9, 0.8666666666666667, 0.9, 0.92, 0.9333333333333333, 0.9142857142857143, 0.9], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.7, 0.8, 0.85, 0.88, 0.9, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 1.0, 0.9666666666666667, 0.9714285714285714, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.975], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.9333333333333333, 0.9, 0.92, 0.9333333333333333, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] # eviction_ranking_precision_ambiguous_multi_sketch_cosine= [[0.7, 0.7333333333333333, 0.75, 0.8, 0.8333333333333334, 0.8285714285714286, 0.85], [0.7, 0.6666666666666666, 0.7, 0.76, 0.8, 0.8285714285714286, 0.85], [0.9, 0.9333333333333333, 0.95, 0.92, 0.9, 0.9142857142857143, 0.9], [0.7, 0.8, 0.8, 0.84, 0.8666666666666667, 0.8571428571428571, 0.85], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.8, 0.85, 0.88, 0.8666666666666667, 0.8857142857142857, 0.9], [0.9, 0.8666666666666667, 0.85, 0.8, 0.8333333333333334, 0.8571428571428571, 0.875], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9428571428571428, 0.95], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9333333333333333, 0.9428571428571428, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.95, 0.92, 0.9333333333333333, 0.9428571428571428, 0.95], [1.0, 0.9333333333333333, 0.9, 0.92, 0.9333333333333333, 0.9142857142857143, 0.9], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.975], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9333333333333333, 0.9428571428571428, 0.95], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 0.9333333333333333, 0.9, 0.88, 0.9, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975]] # eviction_ranking_precision_ambiguous_multi_sketch_euclidean= [[0.8, 0.8, 0.8, 0.8, 0.8333333333333334, 0.8571428571428571, 0.825], [0.6, 0.6666666666666666, 0.75, 0.76, 0.8, 0.8285714285714286, 0.85], [0.9, 0.9333333333333333, 0.95, 0.88, 0.9, 0.8857142857142857, 0.85], [0.8, 0.8, 0.85, 0.84, 0.8333333333333334, 0.8285714285714286, 0.85], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.8, 0.85, 0.84, 0.8666666666666667, 0.8571428571428571, 0.875], [0.9, 0.8666666666666667, 0.85, 0.88, 0.9, 0.8857142857142857, 0.875], [1.0, 0.9333333333333333, 0.9, 0.92, 0.9333333333333333, 0.9428571428571428, 0.95], [0.9, 0.9333333333333333, 0.85, 0.88, 0.9, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [0.9, 0.8666666666666667, 0.85, 0.88, 0.9, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9428571428571428, 0.95], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.975]] # eviction_ranking_precision_ambiguous_multi_sketch_combined= [[0.3, 0.4666666666666667, 0.45, 0.6, 0.6666666666666666, 0.7428571428571429, 0.75], [0.2, 0.4, 0.5, 0.52, 0.6333333333333333, 0.7142857142857143, 0.8], [0.8, 0.7333333333333333, 0.7, 0.72, 0.8, 0.7142857142857143, 0.75], [0.4, 0.6, 0.6, 0.52, 0.4666666666666667, 0.5714285714285714, 0.575], [0.4, 0.6, 0.6, 0.68, 0.6666666666666666, 0.6571428571428571, 0.725], [0.3, 0.3333333333333333, 0.45, 0.52, 0.5666666666666667, 0.5714285714285714, 0.65], [0.2, 0.26666666666666666, 0.35, 0.44, 0.5, 0.5142857142857142, 0.525], [0.2, 0.2, 0.3, 0.28, 0.5333333333333333, 0.6, 0.6], [0.1, 0.2, 0.2, 0.24, 0.4666666666666667, 0.5428571428571428, 0.55], [0.2, 0.26666666666666666, 0.3, 0.4, 0.5, 0.6, 0.575], [0.2, 0.26666666666666666, 0.3, 0.36, 0.4, 0.5714285714285714, 0.6], [0.4, 0.4, 0.4, 0.48, 0.5, 0.5714285714285714, 0.6], [0.5, 0.5, 0.5, 0.56, 0.6333333333333333, 0.6285714285714286, 0.65], [0.6, 0.5333333333333333, 0.5333333333333333, 0.56, 0.5666666666666667, 0.6, 0.7], [0.5, 0.4, 0.4, 0.48, 0.6333333333333333, 0.6857142857142857, 0.7], [0.5, 0.4666666666666667, 0.45, 0.48, 0.5666666666666667, 0.6285714285714286, 0.65], [0.4, 0.3333333333333333, 0.3, 0.36, 0.43333333333333335, 0.5142857142857142, 0.575], [0.4, 0.3333333333333333, 0.3, 0.32, 0.4, 0.5428571428571428, 0.575]] # eviction_ranking_precision_all_sketch_combined= [[0.9, 0.8666666666666667, 0.9, 0.88, 0.8666666666666667, 0.8285714285714286, 0.85], [0.8, 0.8666666666666667, 0.85, 0.88, 0.8666666666666667, 0.8857142857142857, 0.875], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [0.9, 0.9333333333333333, 0.9, 0.92, 0.9333333333333333, 0.9142857142857143, 0.925], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.8, 0.85, 0.88, 0.9, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.95, 0.96, 0.9333333333333333, 0.9428571428571428, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] # m_values=[10,15,20,25,30,35,40] # fig1 = plt.figure() # plt.hold(True) # eviction_ranking_precision_ent_nonEnt_single_sketch= [[0.9, 0.8, 0.8, 0.84, 0.8666666666666667, 0.8571428571428571, 0.85], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.95], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 0.9333333333333333, 0.9, 0.92, 0.9333333333333333, 0.9428571428571428, 0.95], [0.9, 0.9333333333333333, 0.95, 0.92, 0.9333333333333333, 0.9428571428571428, 0.95], [1.0, 1.0, 1.0, 1.0, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 0.9333333333333333, 0.9428571428571428, 0.95], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9428571428571428, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.975], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] # for array_index in range(0,18): # array_to_plot= eviction_ranking_precision_ent_nonEnt_single_sketch[array_index] # plt.plot(m_values,array_to_plot,label='batch '+str(array_index+2)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('eviction ranking bottom-m percent effectiveness') # plt.xlabel('bottom-m-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Eviction ranking bottom-m effectiveness with single entity/non-entity sketches') # plt.savefig('eviction-bottom-m-with-single-entity-non-entity-sketches.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # fig1 = plt.figure() # plt.hold(True) # eviction_ranking_precision_ent_nonEnt_multi_sketch_cosine= [[0.9, 0.9333333333333333, 0.95, 0.88, 0.8666666666666667, 0.8285714285714286, 0.825], [1.0, 1.0, 1.0, 0.96, 0.9333333333333333, 0.8857142857142857, 0.875], [1.0, 1.0, 1.0, 1.0, 0.9666666666666667, 0.9428571428571428, 0.9], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] # for array_index in range(0,18): # array_to_plot= eviction_ranking_precision_ent_nonEnt_multi_sketch_cosine[array_index] # plt.plot(m_values,array_to_plot,label='batch '+str(array_index+2)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('eviction ranking bottom-m percent effectiveness') # plt.xlabel('bottom-m-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Eviction ranking bottom-m effectiveness with ent_nonEnt_multi_sketch_cosine') # plt.savefig('eviction-bottom-m-with-ent-nonEnt-multi-sketch-cosine.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # fig1 = plt.figure() # plt.hold(True) # eviction_ranking_precision_ent_nonEnt_multi_sketch_euclidean= [[0.9, 0.9333333333333333, 0.95, 0.92, 0.8666666666666667, 0.8571428571428571, 0.825], [1.0, 1.0, 1.0, 0.96, 0.9333333333333333, 0.8857142857142857, 0.875], [1.0, 1.0, 1.0, 1.0, 0.9666666666666667, 0.9428571428571428, 0.9], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] # for array_index in range(0,18): # array_to_plot= eviction_ranking_precision_ent_nonEnt_multi_sketch_euclidean[array_index] # plt.plot(m_values,array_to_plot,label='batch '+str(array_index+2)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('eviction ranking bottom-m percent effectiveness') # plt.xlabel('bottom-m-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Eviction ranking bottom-m effectiveness with ent_nonEnt_multi_sketch_euclidean') # plt.savefig('eviction-bottom-m-with-ent-nonEnt-multi-sketch-euclidean.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # fig1 = plt.figure() # plt.hold(True) # eviction_ranking_precision_ent_nonEnt_multi_sketch_combined= [[0.5, 0.4666666666666667, 0.55, 0.52, 0.6, 0.6, 0.625], [0.5, 0.6666666666666666, 0.65, 0.6, 0.7333333333333333, 0.6857142857142857, 0.65], [0.6, 0.6, 0.7, 0.68, 0.7, 0.7142857142857143, 0.65], [0.6, 0.4666666666666667, 0.6, 0.6, 0.5666666666666667, 0.6285714285714286, 0.675], [0.6, 0.6, 0.5, 0.6, 0.6, 0.6285714285714286, 0.65], [0.6, 0.4666666666666667, 0.5, 0.6, 0.5666666666666667, 0.6, 0.625], [0.7, 0.6, 0.65, 0.6, 0.5666666666666667, 0.5428571428571428, 0.55], [0.7, 0.6, 0.65, 0.6, 0.5666666666666667, 0.5428571428571428, 0.575], [0.8, 0.8, 0.55, 0.64, 0.6666666666666666, 0.6285714285714286, 0.575], [0.6, 0.6, 0.55, 0.68, 0.6666666666666666, 0.6571428571428571, 0.625], [0.6, 0.5333333333333333, 0.5, 0.6, 0.5666666666666667, 0.6285714285714286, 0.675], [0.5, 0.5333333333333333, 0.55, 0.56, 0.6333333333333333, 0.6571428571428571, 0.625], [0.6, 0.4666666666666667, 0.55, 0.56, 0.6333333333333333, 0.6571428571428571, 0.65], [0.6, 0.5333333333333333, 0.55, 0.6, 0.6333333333333333, 0.6, 0.625], [0.6, 0.5333333333333333, 0.6, 0.64, 0.6666666666666666, 0.6, 0.625], [0.5, 0.5333333333333333, 0.55, 0.6, 0.7, 0.6285714285714286, 0.6], [0.8, 0.6666666666666666, 0.55, 0.6, 0.6333333333333333, 0.6571428571428571, 0.6571428571428571], [0.9, 0.9, 0.9, 0.44, 0.5667, 0.6285714285714286, 0.65]] # for array_index in range(0,18): # array_to_plot= eviction_ranking_precision_ent_nonEnt_multi_sketch_combined[array_index] # plt.plot(m_values,array_to_plot,label='batch '+str(array_index+2)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('eviction ranking bottom-m percent effectiveness') # plt.xlabel('bottom-m-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Eviction ranking bottom-m effectiveness with ent_nonEnt_multi_sketch_combined') # plt.savefig('eviction-bottom-m-with-ent-nonEnt-multi-sketch-combined.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # fig1 = plt.figure() # plt.hold(True) # eviction_ranking_precision_ambiguous_single_sketch= [[0.9, 0.8666666666666667, 0.85, 0.84, 0.8, 0.8285714285714286, 0.825], [0.7, 0.8, 0.85, 0.84, 0.8333333333333334, 0.8571428571428571, 0.875], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9333333333333333, 0.8857142857142857, 0.875], [0.9, 0.8666666666666667, 0.9, 0.92, 0.9333333333333333, 0.9142857142857143, 0.9], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.7, 0.8, 0.85, 0.88, 0.9, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 1.0, 0.9666666666666667, 0.9714285714285714, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.975], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.9333333333333333, 0.9, 0.92, 0.9333333333333333, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] # for array_index in range(0,18): # array_to_plot= eviction_ranking_precision_ambiguous_single_sketch[array_index] # plt.plot(m_values,array_to_plot,label='batch '+str(array_index+2)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('eviction ranking bottom-m percent effectiveness') # plt.xlabel('bottom-m-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Eviction ranking bottom-m effectiveness with single ambiguous sketches') # plt.savefig('eviction-bottom-m-with-single-entity-ambiguous-sketches.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # fig1 = plt.figure() # plt.hold(True) # eviction_ranking_precision_ambiguous_multi_sketch_cosine= [[0.7, 0.7333333333333333, 0.75, 0.8, 0.8333333333333334, 0.8285714285714286, 0.85], [0.7, 0.6666666666666666, 0.7, 0.76, 0.8, 0.8285714285714286, 0.85], [0.9, 0.9333333333333333, 0.95, 0.92, 0.9, 0.9142857142857143, 0.9], [0.7, 0.8, 0.8, 0.84, 0.8666666666666667, 0.8571428571428571, 0.85], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.8, 0.85, 0.88, 0.8666666666666667, 0.8857142857142857, 0.9], [0.9, 0.8666666666666667, 0.85, 0.8, 0.8333333333333334, 0.8571428571428571, 0.875], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9428571428571428, 0.95], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9333333333333333, 0.9428571428571428, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.95, 0.92, 0.9333333333333333, 0.9428571428571428, 0.95], [1.0, 0.9333333333333333, 0.9, 0.92, 0.9333333333333333, 0.9142857142857143, 0.9], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.975], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9333333333333333, 0.9428571428571428, 0.95], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 0.9333333333333333, 0.9, 0.88, 0.9, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975]] # for array_index in range(0,18): # array_to_plot= eviction_ranking_precision_ambiguous_multi_sketch_cosine[array_index] # plt.plot(m_values,array_to_plot,label='batch '+str(array_index+2)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('eviction ranking bottom-m percent effectiveness') # plt.xlabel('bottom-m-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Eviction ranking bottom-m effectiveness with ambiguous_multi_sketch_cosine') # plt.savefig('eviction-bottom-m-with-ambiguous-multi-sketch-cosine.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # fig1 = plt.figure() # plt.hold(True) # eviction_ranking_precision_ambiguous_multi_sketch_euclidean= [[0.8, 0.8, 0.8, 0.8, 0.8333333333333334, 0.8571428571428571, 0.825], [0.6, 0.6666666666666666, 0.75, 0.76, 0.8, 0.8285714285714286, 0.85], [0.9, 0.9333333333333333, 0.95, 0.88, 0.9, 0.8857142857142857, 0.85], [0.8, 0.8, 0.85, 0.84, 0.8333333333333334, 0.8285714285714286, 0.85], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.8, 0.85, 0.84, 0.8666666666666667, 0.8571428571428571, 0.875], [0.9, 0.8666666666666667, 0.85, 0.88, 0.9, 0.8857142857142857, 0.875], [1.0, 0.9333333333333333, 0.9, 0.92, 0.9333333333333333, 0.9428571428571428, 0.95], [0.9, 0.9333333333333333, 0.85, 0.88, 0.9, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [0.9, 0.8666666666666667, 0.85, 0.88, 0.9, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9428571428571428, 0.95], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.975]] # for array_index in range(0,18): # array_to_plot= eviction_ranking_precision_ambiguous_multi_sketch_euclidean[array_index] # plt.plot(m_values,array_to_plot,label='batch '+str(array_index+2)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('eviction ranking bottom-m percent effectiveness') # plt.xlabel('bottom-m-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Eviction ranking bottom-m effectiveness with ambiguous_multi_sketch_euclidean') # plt.savefig('eviction-bottom-m-with-ambiguous-multi-sketch-euclidean.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # fig1 = plt.figure() # plt.hold(True) # eviction_ranking_precision_ambiguous_multi_sketch_combined= [[0.3, 0.4666666666666667, 0.45, 0.6, 0.6666666666666666, 0.7428571428571429, 0.75], [0.2, 0.4, 0.5, 0.52, 0.6333333333333333, 0.7142857142857143, 0.8], [0.8, 0.7333333333333333, 0.7, 0.72, 0.8, 0.7142857142857143, 0.75], [0.4, 0.6, 0.6, 0.52, 0.4666666666666667, 0.5714285714285714, 0.575], [0.4, 0.6, 0.6, 0.68, 0.6666666666666666, 0.6571428571428571, 0.725], [0.3, 0.3333333333333333, 0.45, 0.52, 0.5666666666666667, 0.5714285714285714, 0.65], [0.2, 0.26666666666666666, 0.35, 0.44, 0.5, 0.5142857142857142, 0.525], [0.2, 0.2, 0.3, 0.28, 0.5333333333333333, 0.6, 0.6], [0.1, 0.2, 0.2, 0.24, 0.4666666666666667, 0.5428571428571428, 0.55], [0.2, 0.26666666666666666, 0.3, 0.4, 0.5, 0.6, 0.575], [0.2, 0.26666666666666666, 0.3, 0.36, 0.4, 0.5714285714285714, 0.6], [0.4, 0.4, 0.4, 0.48, 0.5, 0.5714285714285714, 0.6], [0.5, 0.5, 0.5, 0.56, 0.6333333333333333, 0.6285714285714286, 0.65], [0.6, 0.5333333333333333, 0.5333333333333333, 0.56, 0.5666666666666667, 0.6, 0.7], [0.5, 0.4, 0.4, 0.48, 0.6333333333333333, 0.6857142857142857, 0.7], [0.5, 0.4666666666666667, 0.45, 0.48, 0.5666666666666667, 0.6285714285714286, 0.65], [0.4, 0.3333333333333333, 0.3, 0.36, 0.43333333333333335, 0.5142857142857142, 0.575], [0.4, 0.3333333333333333, 0.3, 0.32, 0.4, 0.5428571428571428, 0.575]] # for array_index in range(0,18): # array_to_plot= eviction_ranking_precision_ambiguous_multi_sketch_combined[array_index] # plt.plot(m_values,array_to_plot,label='batch '+str(array_index+2)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('eviction ranking bottom-m percent effectiveness') # plt.xlabel('bottom-m-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Eviction ranking bottom-m effectiveness with ambiguous_multi_sketch_combined') # plt.savefig('eviction-bottom-m-with-ambiguous-multi-sketch-combined.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # fig1 = plt.figure() # plt.hold(True) # eviction_ranking_precision_all_sketch_combined= [[0.9, 0.8666666666666667, 0.9, 0.88, 0.8666666666666667, 0.8285714285714286, 0.85], [0.8, 0.8666666666666667, 0.85, 0.88, 0.8666666666666667, 0.8857142857142857, 0.875], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [0.9, 0.9333333333333333, 0.9, 0.92, 0.9333333333333333, 0.9142857142857143, 0.925], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.8, 0.85, 0.88, 0.9, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.95, 0.96, 0.9333333333333333, 0.9428571428571428, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] # for array_index in range(0,18): # array_to_plot= eviction_ranking_precision_all_sketch_combined[array_index] # plt.plot(m_values,array_to_plot,label='batch '+str(array_index+2)) # # plt.ylabel('ranking function top-k effectiveness') # plt.ylabel('eviction ranking bottom-m percent effectiveness') # plt.xlabel('bottom-m-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Eviction ranking bottom-m effectiveness with all_sketch_combined') # plt.savefig('eviction-bottom-m-with-all-sketch-combined.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # fig1 = plt.figure() # plt.hold(True) # plt.xticks(np.arange(2, 20, 1.0)) # # eviction_ranking_precision_all_sketch_combined= [[0.9, 0.8666666666666667, 0.9, 0.88, 0.8666666666666667, 0.8285714285714286, 0.85], [0.8, 0.8666666666666667, 0.85, 0.88, 0.8666666666666667, 0.8857142857142857, 0.875], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [0.9, 0.9333333333333333, 0.9, 0.92, 0.9333333333333333, 0.9142857142857143, 0.925], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [0.9, 0.8, 0.85, 0.88, 0.9, 0.9142857142857143, 0.925], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.95], [1.0, 0.9333333333333333, 0.95, 0.96, 0.9666666666666667, 0.9714285714285714, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.975], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.95, 0.96, 0.9333333333333333, 0.9428571428571428, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] # #for bottom-m percent estimates # eviction ranking precision all sketch combined: [[1.0, 1.0, 1.0, 1.0, 0.9090909090909091, 0.9230769230769231, 0.9333333333333333], [0.8, 0.875, 0.9, 0.8461538461538461, 0.8125, 0.8333333333333334, 0.8571428571428571], [1.0, 1.0, 1.0, 0.9285714285714286, 0.8823529411764706, 0.8947368421052632, 0.8636363636363636], [0.8333333333333334, 0.9, 0.9230769230769231, 0.9411764705882353, 0.95, 0.9583333333333334, 0.9259259259259259], [1.0, 0.9090909090909091, 0.9333333333333333, 0.9473684210526315, 0.9565217391304348, 0.9615384615384616, 0.9666666666666667], [1.0, 1.0, 0.9473684210526315, 0.9130434782608695, 0.9285714285714286, 0.9393939393939394, 0.9473684210526315], [0.9, 0.8, 0.8571428571428571, 0.8846153846153846, 0.8709677419354839, 0.8648648648648649, 0.8809523809523809], [0.9, 0.9333333333333333, 0.9523809523809523, 0.9615384615384616, 0.967741935483871, 0.9444444444444444, 0.9523809523809523], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9473684210526315, 0.9545454545454546], [1.0, 0.9411764705882353, 0.9565217391304348, 0.9642857142857143, 0.9705882352941176, 0.975, 0.9782608695652174], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.9722222222222222, 0.9534883720930233, 0.96, 0.9649122807017544], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.984375], [1.0, 1.0, 1.0, 1.0, 0.9791666666666666, 0.9649122807017544, 0.9692307692307692], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.9705882352941176, 0.9767441860465116, 0.9803921568627451, 0.9833333333333333, 0.9855072463768116], [1.0, 1.0, 0.972972972972973, 0.9782608695652174, 0.9818181818181818, 0.9846153846153847, 0.9864864864864865]] # for m_value in m_values: # index=int((m_value-10)/5) # array_to_plot=[] # for elem in eviction_ranking_precision_all_sketch_combined: # array_to_plot.append(elem[index]) # batch_values= list(range(2, 20)) # plt.plot(batch_values, array_to_plot,'--', label='bottom-'+str(m_value)) # plt.ylabel('eviction ranking bottom-m percent precision') # plt.xlabel('batch-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Eviction ranking bottom-m effectiveness comparison with all_sketch_combined') # plt.savefig('eviction-bottom-m-comparison-with-all-sketch-combined.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() #-----------------------with bottom-m percent------------------------ # fig1 = plt.figure() # fig, axes = plt.subplots(nrows=1, ncols=1) # plt.hold(True) # # axes.set_xticks(np.arange(2, 20, 1.0)) # axes.set_yticks(np.arange(0, 1, 0.1)) # # axes.set_ylim(0, 1) # # axes.spines['top'].set_visible(False) # #for bottom-m percent estimates # # eviction_ranking_precision_all_sketch_combined= [[1.0, 1.0, 1.0, 1.0, 0.9090909090909091, 0.9230769230769231, 0.9333333333333333], [0.8, 0.875, 0.9, 0.8461538461538461, 0.8125, 0.8333333333333334, 0.8571428571428571], [1.0, 1.0, 1.0, 0.9285714285714286, 0.8823529411764706, 0.8947368421052632, 0.8636363636363636], [0.8333333333333334, 0.9, 0.9230769230769231, 0.9411764705882353, 0.95, 0.9583333333333334, 0.9259259259259259], [1.0, 0.9090909090909091, 0.9333333333333333, 0.9473684210526315, 0.9565217391304348, 0.9615384615384616, 0.9666666666666667], [1.0, 1.0, 0.9473684210526315, 0.9130434782608695, 0.9285714285714286, 0.9393939393939394, 0.9473684210526315], [0.9, 0.8, 0.8571428571428571, 0.8846153846153846, 0.8709677419354839, 0.8648648648648649, 0.8809523809523809], [0.9, 0.9333333333333333, 0.9523809523809523, 0.9615384615384616, 0.967741935483871, 0.9444444444444444, 0.9523809523809523], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9473684210526315, 0.9545454545454546], [1.0, 0.9411764705882353, 0.9565217391304348, 0.9642857142857143, 0.9705882352941176, 0.975, 0.9782608695652174], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.9722222222222222, 0.9534883720930233, 0.96, 0.9649122807017544], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.984375], [1.0, 1.0, 1.0, 1.0, 0.9791666666666666, 0.9649122807017544, 0.9692307692307692], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.9705882352941176, 0.9767441860465116, 0.9803921568627451, 0.9833333333333333, 0.9855072463768116], [1.0, 1.0, 0.972972972972973, 0.9782608695652174, 0.9818181818181818, 0.9846153846153847, 0.9864864864864865]] # eviction_ranking_precision_all_sketch_combined= [[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 0.8, 0.8571428571428571, 0.8888888888888888, 0.9090909090909091, 0.9230769230769231, 0.9333333333333333], [0.6666666666666666, 0.8, 0.8571428571428571, 0.7777777777777778, 0.7272727272727273, 0.75, 0.7857142857142857], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9375], [0.75, 0.8333333333333334, 0.8888888888888888, 0.9090909090909091, 0.9230769230769231, 0.9333333333333333, 0.9444444444444444], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.9285714285714286, 0.9375, 0.9473684210526315, 0.9545454545454546], [0.75, 0.8571428571428571, 0.8888888888888888, 0.9166666666666666, 0.8571428571428571, 0.8823529411764706, 0.8947368421052632], [1.0, 1.0, 1.0, 1.0, 1.0, 0.9375, 0.9473684210526315], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [0.8, 0.8571428571428571, 0.9, 0.8461538461538461, 0.8666666666666667, 0.8888888888888888, 0.9047619047619048], [1.0, 1.0, 1.0, 0.9230769230769231, 0.9333333333333333, 0.9444444444444444, 0.9047619047619048], [0.8, 0.8571428571428571, 0.9, 0.9230769230769231, 0.9333333333333333, 0.9444444444444444, 0.95], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 0.8, 0.8333333333333334, 0.8666666666666667, 0.8235294117647058, 0.85], [1.0, 0.8571428571428571, 0.9, 0.9166666666666666, 0.8666666666666667, 0.8823529411764706, 0.9], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] # for m_value in m_values: # index=int((m_value-10)/5) # array_to_plot=[] # for elem in eviction_ranking_precision_all_sketch_combined: # array_to_plot.append(elem[index]) # batch_values= list(range(2, 20)) # plt.plot(batch_values, array_to_plot,'--', label='bottom-'+str(m_value)) # plt.ylabel('eviction ranking bottom-m percent precision') # plt.xlabel('batch-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Eviction ranking bottom-m percent effectiveness comparison with all_sketch_combined') # plt.savefig('eviction-bottom-m-percent-comparison-with-all-sketch-combined.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # print(len(eviction_ranking_precision_all_sketch_combined)) # NUM_COLORS=len(eviction_ranking_precision_all_sketch_combined) # cm = plt.get_cmap('gist_rainbow') # cNorm = colors.Normalize(vmin=0, vmax=NUM_COLORS-1) # scalarMap = mplcm.ScalarMappable(norm=cNorm, cmap=cm) # axes.set_prop_cycle(color= [cm(1.*i/NUM_COLORS) for i in range(NUM_COLORS)]) # marker=['--', ':'] # for array_index in range(0,18): # array_to_plot= eviction_ranking_precision_all_sketch_combined[array_index] # marker_index=array_index%2 # plt.plot(m_values,array_to_plot, marker[marker_index],label='batch '+str(array_index+2)) # plt.ylabel('eviction ranking bottom-m percent precision') # plt.xlabel('bottom-m-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Eviction ranking bottom-m effectiveness with all_sketch_combined') # plt.savefig('eviction-bottom-m-with-all-sketch-combined.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # def func(x,a,b1,b2): # x1,x2=x # return (a*np.exp(b1*x1+b2*x2)) # batch_specific_top_k_reintroduction= [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9866666666666667, 0.9866666666666667, 0.9634146341463414, 0.9655172413793104, 0.9662921348314607] # index=1 # fig, axes = plt.subplots(nrows=1, ncols=1) # plt.hold(True) # # for val in batch_specific_top_k_reintroduction: # # if (val == 1.0): # # index+=1 # # print(index) # # print(batch_specific_top_k_reintroduction[index:]) # batch_values= list(range(10, 20)) # print(batch_values) # print(len(batch_values),len(batch_specific_top_k_reintroduction[9:])) # plt.plot(batch_values, batch_specific_top_k_reintroduction[9:],'--', label='dynamic batch specific reintroduction') # # plt.yticks(np.arange(0.5, 1.0, step=0.1)) # axes.set_ylim(0,1.1) # # axes.set_yticks(np.arange(0, 1, 0.1)) # plt.ylabel('reintroduction ranking precision') # plt.xlabel('batch-value') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # plt.title('Reintroduction ranking precision with dynamic batch-specific reintroduction') # plt.savefig('dynamic-batch-specific-reintroduction.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() # fig, axes = plt.subplots(nrows=1, ncols=1) # plt.hold(True) # tweets_been_processed= [173400, 350484, 527834, 682913, 849446, 1028661, 1188145, 1338782, 1500195, 1657711, 1713105] # execution_time_list=[166.75889563560486, 362.2613089084625, 575.8956503868103, 809.4419324398041, 1083.4650089740753, 1425.3307547569275, 1836.3565995693207, 2316.8451795578003, 2874.0793306827545, 3927.872410297394, 4567.780866622925] # execution_time_list_reintroduction= [154.13501000404358, 328.48251509666443, 509.3811755180359, 704.9980118274689, 919.494167804718, 1185.8589017391205, 1509.6817700862885, 1872.0712308883667, 2303.9076883792877, 2774.809245109558, 3047.7655758857727] # execution_time_list_reintroduction_eviction =[154.8149561882019, 324.27084946632385, 498.765234708786, 686.6643452644348, 882.6111776828766, 1115.6090331077576, 1363.623596906662, 1629.3569157123566, 1915.8414995670319, 2227.6679270267487, 2387.10250043869] # plt.plot(tweets_been_processed, execution_time_list,'r--', label='baseline') # plt.plot(tweets_been_processed, execution_time_list_reintroduction,'b--', label='with reintroduction') # plt.plot(tweets_been_processed, execution_time_list_reintroduction_eviction,'g--', label='with reintroduction and eviction') # plt.ylabel('processing time') # plt.xlabel('length of input tweet-sentence stream') # lgd=plt.legend(bbox_to_anchor=(1, 1), loc=9, prop={'size': 4}, borderaxespad=0.) # # plt.title('Efficiency speed-up with Reintroduction') # # plt.savefig('efficiency-speed-up-with-reintroduction.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.title('Efficiency speed-up with Reintroduction and Eviction') # plt.savefig('efficiency-speed-up-with-reintroduction-eviction.png', dpi = 900, bbox_extra_artists=(lgd,), bbox_inches='tight') # plt.show() #model function # def func(x,a,b): # return (a*np.exp(b*x)) # def func(x, a, b, c): # # return a*np.exp(-b*x)+c # return a*x**2 + b*x + c # def residuals(coeffs,y,x): # return y-func(x,coeffs[0],coeffs[1],coeffs[2]) # filename='entity-level-estimates-average.csv' # data=pd.read_csv(filename,sep =',', index_col=False) # fig, axes = plt.subplots(nrows=3, ncols=3, sharex=True, sharey=True, figsize=(20,20) ) # fig = plt.figure() # ax = fig.gca(projection='3d') # ax.set_xticks([0, 20, 1.0]) # ax.set_yticks([0, 20, 1.0]) # x_data=[] # x0=[] # x1=[] # y_data=[] # # for i, ax in enumerate(axes.flat, start=0): # # print(i) # for i in range(11): # fig, ax = plt.subplots(nrows=1, ncols=1) # ax.set_xticks(np.arange(0, 20, 1.0)) # x_val=list(range(i,20)) # #x_val_transformed=[j-i for j in x_val] # x0_arr=[j-i for j in x_val] # y_val=data[str(i)].tolist()[i:] # # y_data.extend(y_val) # #print(len(x_val),len(y_val[i:])) # #y_val_norm=[(y_val[0]-i)/y_val[0] for i in y_val] # #plt.plot(x_val,y_val_norm,label=str(i)) # x0_arr_truncated=x0_arr[:16] # y_val_truncated=y_val[:16] # # print(x0_arr,y_val) # # print(len(x0_arr_truncated),len(y_val_truncated)) # # ax.scatter(x0_arr,y_val) # # np_poly=np.polyfit(np.array(x0_arr), np.array(y_val), 3) # # estimated_y = np.polyval(np_poly,np.array(x0_arr)) # np_poly=np.polyfit(np.array(x0_arr_truncated), np.array(y_val_truncated), 3) # estimated_y = np.polyval(np_poly,np.array(x0_arr)) # print('predictions for batch '+str(i)+':') # print(y_val) # print(estimated_y) # p0=np.array([y_val[0],1e-4,1], dtype=float) # curve_fit_coeff,cov = curve_fit(func, np.array(x0_arr), np.array(y_val)) # estimated_y=func(np.array(x0_arr),curve_fit_coeff[0],curve_fit_coeff[1],curve_fit_coeff[2]) # print(cov) # res_lsq = least_squares(residuals, p0, args=(np.array(x0_arr), np.array(y_val))) # # print(res_lsq) # estimated_y=func(np.array(x0_arr),res_lsq.x[0],res_lsq.x[1],res_lsq.x[2]) # res_robust = least_squares(residuals, p0, loss='soft_l1', f_scale=0.1, args=(np.array(x0_arr), np.array(y_val))) # # print(res_lsq) # estimated_y=func(np.array(x0_arr),res_robust.x[0],res_robust.x[1],res_robust.x[2]) # print(estimated_y) # ax.plot(x0_arr,estimated_y) # ax.set_title("Propagation of Ambiguous Candidates from batch "+str(i)) # ax.set_ylabel('# of ambiguous candidates remaining') # ax.set_xlabel('Current Batch') # plt.show() # fig.tight_layout() # plt.show() # plt.plot(x_val_transformed,y_val_norm,label=str(i)) # x0.extend(x0_arr) # x1.extend(x_val) # x_data=[x0,x1] # x_data=np.array(x_data) # coeff, cov=curve_fit(func, x_data,y_data) # print(coeff) # estimated_y=func(x_data,coeff[0],coeff[1],coeff[2]) # print(len(x_data[0]),len(x_data[1]),len(estimated_y)) # ax.scatter(x_data[0], x_data[1],estimated_y, alpha=0.2) # ax.set_xlabel('Entry Batch') # plt.title("Propagation of Ambiguous Candidates labeling through batches") # plt.ylabel('# of ambiguous candidates labelled') # plt.xlabel('Batches since entry') # plt.legend() # plt.show() #----------------------------------plot code ends--------------------------------------------- # extenstion='.csv' # sentence='sentence-level-estimates-' # mention='mention-level-estimates-' # entity='entity-level-estimates-' # column_headers=['0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19'] # # name=entity+str(0)+extenstion # for entities # name=mention+str(0)+extenstion # for mentions # # name=sentence+str(0)+extenstion # for sentences # df_original=pd.read_csv(name,sep =',', index_col=False) # averaged_data=pd.DataFrame(index=df_original.index,columns=df_original.columns) # averaged_data = averaged_data.fillna(0) # for iter in range(10): # # name=entity+str(iter)+extenstion # for entities # name=mention+str(iter)+extenstion # for mentions # # name=sentence+str(iter)+extenstion # for sentences # print(name) # data=pd.read_csv(name,sep =',', index_col=False) # averaged_data=averaged_data.add(data) # averaged_data= averaged_data/10 # # averaged_data.to_csv(entity+'average'+extenstion) # for entities # averaged_data.to_csv(mention+'average'+extenstion) # for mentions # # averaged_data.to_csv(sentence+'average'+extenstion) # for sentences #----------------------------------averaging code ends--------------------------------------------- # good= [275498, # 270537, # 270038, # 270372, # 269851, # 270641, # 269851, # 270078, # 270038, # 270372] # bad= [ 708783, # 720784, # 723066, # 718229, # 719500, # 718229, # 722636, # 722836, # 722836, # 721364] # ambiguous= [ 42873, # 35833, # 34050, # 38553, # 37803, # 38284, # 34667, # 34240, # 34280, # 35418] # incomplete=[34788, # 35670, # 34030, # 38261, # 37529, # 38017, # 34549, # 34191, # 34191, # 35253] # print('good: ',str(sum(good)/len(good))) # print('bad: ',str(sum(bad)/len(bad))) # print('ambiguous: ',str(sum(ambiguous)/len(ambiguous))) # print('incomplete: ',str(sum(incomplete)/len(incomplete)))
148.322057
1,845
0.755506
15,878
109,610
5.151467
0.089999
0.028119
0.034293
0.045382
0.777297
0.74529
0.734042
0.715044
0.710985
0.698979
0
0.595695
0.077329
109,610
738
1,846
148.523035
0.213084
0.984308
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
1
0
0
0
1
1
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
13
f95df6cfb55c4fc065aeb6841cd194775a8b34c6
7,869
py
Python
foody/forms.py
translationexchange/tml-django-samples-foody
8108ba6da0f4d6fe815febb74c2372f9d9aee958
[ "Unlicense" ]
null
null
null
foody/forms.py
translationexchange/tml-django-samples-foody
8108ba6da0f4d6fe815febb74c2372f9d9aee958
[ "Unlicense" ]
null
null
null
foody/forms.py
translationexchange/tml-django-samples-foody
8108ba6da0f4d6fe815febb74c2372f9d9aee958
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- import os import json from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django_tml.fields import TmlModelChoiceField from . import models class CreateRecipeForm(forms.Form): name = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': _('Recipe Name')})) description = forms.CharField(widget=forms.Textarea(attrs={ 'class': 'form-control', 'placeholder': _('Description'), 'rows': 4}), required=False) image = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': _('Image Url')}), required=False) categories = TmlModelChoiceField(queryset=models.Categories.objects.all(), widget=forms.Select(attrs={'class': 'form-control', 'onChange': 'verifyCategory(this)'}), required=False) new_category = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': _('New category name')}), required=False) preparation = forms.CharField(widget=forms.Textarea(attrs={ 'class': 'form-control', 'placeholder': _('Preparation instructions'), 'rows': 8}), required=False) directions = forms.CharField(widget=forms.HiddenInput(attrs={}),required=False) ingredients = forms.CharField(widget=forms.HiddenInput(attrs={}),required=False) def __init__(self, instance=None, *args, **kwargs): self.instance = instance super(CreateRecipeForm, self).__init__(*args, **kwargs) def clean_name(self): name = self.cleaned_data.get('name') return name def clean_description(self): description = self.cleaned_data.get('description') return description def clean_image(self): image = self.cleaned_data.get('image') return image def clean_categories(self): categories = self.cleaned_data.get('categories') return categories def clean_new_category(self): new_category = None; if self.cleaned_data['categories'] is None: if self.cleaned_data.get('new_category'): new_category = models.Categories.objects.create( key=self.cleaned_data.get('new_category').lower(), name=self.cleaned_data.get('new_category')) else: raise forms.ValidationError(_("You have forgotten Category!")) return new_category def clean_preparation(self): preparation = self.cleaned_data.get('preparation') return preparation def clean_directions(self): directions = [] if self.cleaned_data.get('directions'): directions = json.loads(self.cleaned_data.get('directions')) return directions def clean_ingredients(self): ingredients = [] if self.cleaned_data.get('ingredients'): ingredients = json.loads(self.cleaned_data.get('ingredients')) return ingredients def save(self): data = self.cleaned_data if data['categories'] is None: category = data['new_category'] else: category = data['categories'] recipe = models.Recipes( name=data['name'], description=data['description'], image=data['image'], locale='en', category=category, preparation=data['preparation'] ) recipe.save() recipe.create_directions(directions=data['directions']) recipe.create_ingredients(ingredients=data['ingredients']) return recipe class UpdateRecipeForm(forms.Form): name = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': _('Recipe Name')})) description = forms.CharField(widget=forms.Textarea(attrs={ 'class': 'form-control', 'placeholder': _('Description'), 'rows': 4}), required=False) image = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': _('Image Url')}), required=False) categories = TmlModelChoiceField(queryset=models.Categories.objects.all(), widget=forms.Select(attrs={'class': 'form-control', 'onChange': 'verifyCategory(this)'}), required=False) new_category = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': _('New category name')}), required=False) preparation = forms.CharField(widget=forms.Textarea(attrs={ 'class': 'form-control', 'placeholder': _('Preparation instructions'), 'rows': 8}), required=False) directions = forms.CharField(widget=forms.HiddenInput(attrs={}), required=False) ingredients = forms.CharField(widget=forms.HiddenInput(attrs={}), required=False) def __init__(self, instance=None, *args, **kwargs): self.instance = instance super(UpdateRecipeForm, self).__init__(*args, **kwargs) self.fields['name'].initial = self.instance.name self.fields['description'].initial = self.instance.description self.fields['image'].initial = self.instance.image self.fields['categories'].initial = self.instance.category self.fields['preparation'].initial = self.instance.preparation def clean_name(self): name = self.cleaned_data.get('name') return name def clean_description(self): description = self.cleaned_data.get('description') return description def clean_image(self): image = self.cleaned_data.get('image') return image def clean_categories(self): categories = self.cleaned_data.get('categories') return categories def clean_new_category(self): new_category = None; if self.cleaned_data['categories'] is None: if self.cleaned_data.get('new_category'): new_category = models.Categories.objects.create( key=self.cleaned_data.get('new_category').lower(), name=self.cleaned_data.get('new_category')) else: raise forms.ValidationError(_("You have forgotten Category!")) return new_category def clean_preparation(self): preparation = self.cleaned_data.get('preparation') return preparation def clean_directions(self): directions = [] if self.cleaned_data.get('directions'): directions = json.loads(self.cleaned_data.get('directions')) return directions def clean_ingredients(self): ingredients = [] if self.cleaned_data.get('ingredients'): ingredients = json.loads(self.cleaned_data.get('ingredients')) return ingredients def save(self): data = self.cleaned_data recipe = self.instance recipe.name = data['name'] recipe.description = data['description'] recipe.image = data['image'] recipe.preparation = data['preparation'] if data['categories'] is None: recipe.category = data['new_category'] else: recipe.category = data['categories'] recipe.save() directions = models.Directions.objects.filter(recipe=self.instance).delete() ingredients = models.Ingredients.objects.filter(recipe=self.instance).delete() recipe.create_directions(directions=data['directions']) recipe.create_ingredients(ingredients=data['ingredients']) return recipe
38.385366
129
0.618376
780
7,869
6.114103
0.111538
0.064584
0.088069
0.090585
0.813588
0.793038
0.777521
0.777521
0.777521
0.777521
0
0.000857
0.25861
7,869
204
130
38.573529
0.816592
0.002669
0
0.792899
0
0
0.134463
0
0
0
0
0
0
1
0.118343
false
0
0.04142
0
0.372781
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
f968fa7bee8f771922784809e96f234b337b29b2
77
py
Python
hello.py
alistairwalsh/python_pt_project
3398296f379fec4659096a7fbcd258cbe250815a
[ "MIT" ]
null
null
null
hello.py
alistairwalsh/python_pt_project
3398296f379fec4659096a7fbcd258cbe250815a
[ "MIT" ]
null
null
null
hello.py
alistairwalsh/python_pt_project
3398296f379fec4659096a7fbcd258cbe250815a
[ "MIT" ]
null
null
null
# this file prints hello python print('Hello Python') print('hello again')
12.833333
31
0.727273
11
77
5.090909
0.636364
0.392857
0.571429
0.75
0
0
0
0
0
0
0
0
0.155844
77
6
32
12.833333
0.861538
0.376623
0
0
0
0
0.5
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
7
f96e2d58fa42d4d31ec1de756ab70a87f19800d2
501
py
Python
src/genie/libs/parser/iosxe/tests/ShowPlatformNatTranslations/cli/equal/golden_output_expected.py
ykoehler/genieparser
b62cf622c3d8eab77c7b69e932c214ed04a2565a
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/iosxe/tests/ShowPlatformNatTranslations/cli/equal/golden_output_expected.py
ykoehler/genieparser
b62cf622c3d8eab77c7b69e932c214ed04a2565a
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/iosxe/tests/ShowPlatformNatTranslations/cli/equal/golden_output_expected.py
ykoehler/genieparser
b62cf622c3d8eab77c7b69e932c214ed04a2565a
[ "Apache-2.0" ]
null
null
null
expected_output = { 'index': { 1: { 'inside_global': '135.0.0.2:0', 'inside_local': '192.0.0.2:0', 'outside_global': '193.0.0.2:0', 'outside_local': '193.0.0.2:0', 'protocol': 'TCP' }, 2: { 'inside_global': '135.0.0.2:0', 'inside_local': '192.0.0.2:0', 'outside_global': '193.0.0.2:0', 'outside_local': '193.0.0.2:0', 'protocol': 'UDP' } } }
27.833333
44
0.407186
65
501
3
0.246154
0.082051
0.123077
0.164103
0.861538
0.861538
0.861538
0.861538
0.861538
0.861538
0
0.187702
0.383234
501
18
45
27.833333
0.443366
0
0
0.444444
0
0
0.436255
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
f9af81fd89059634edb0b917ea563d8be38e33da
32,797
py
Python
tests/test_call_to_action.py
tate138/Martindale_Automation
082169df9f88ddc96fa81365f9c5e8aa460f7d14
[ "Apache-2.0" ]
null
null
null
tests/test_call_to_action.py
tate138/Martindale_Automation
082169df9f88ddc96fa81365f9c5e8aa460f7d14
[ "Apache-2.0" ]
null
null
null
tests/test_call_to_action.py
tate138/Martindale_Automation
082169df9f88ddc96fa81365f9c5e8aa460f7d14
[ "Apache-2.0" ]
null
null
null
from library.page_models.martindale.martindale_module_setup import MartindaleModuleSetup from library.page_models.martindale.martindale_login import MartindaleLogin from library.page_models.martindale.martindale_navigation import MartindaleNavigation from library.selenium_actions import * from library.tools import Tools from library.page_data.martindale_app.cta_module_data import CtaModuleData from library.page_data.martindale_app.martindale_data import MartindalePageData from tests.test_setup.common_setup import CommonSetup, TestRailStatus import pytest import sys #### # Call To Action Module Test #### ''' python -m pytest "Documents/IB/Martindale Automation/tests/test_call_to_action.py" -s ''' class TestCallToActionModule(CommonSetup): #### # Suite Setup and Teardown #### @pytest.fixture(autouse=True, scope='module') def set_up_class(self): ''' Will be run once first before any test ''' web_driver = self.fetch_webdriver() Tools.log("Executing CTA module tests...") MartindaleNavigation.navigate_to_home_page(web_driver) MartindaleLogin.login_to_app(web_driver) CommonSetup.selected_module = "cta" MartindaleModuleSetup.module_open(web_driver) def teardown_class(self): ''' Will be run once when all tests are complete ''' Tools.log("CTA module test run complete.") #### # Case Setup and Teardown #### def case_setup(self): ''' Methods that will be run to setup individual cases called in test as self.case_setup() ''' def case_teardown(self): ''' Methods that will be run to cleanup individual cases called in test as self.case_teardown() ''' self.common_test_teardown() #### # Test Case Setup and Teardown #### def test_c18521173(self): test_case_number = "18521173" web_driver = self.fetch_webdriver() try: click_cta_module = SeleniumActions.fetch_web_element(web_driver, MartindalePageData.MODULE) SeleniumActions.click_element(web_driver, click_cta_module) Tools.sleep(3) click_edit_button = \ SeleniumActions.fetch_web_element(web_driver, MartindalePageData.IFRAME_EDIT_BUTTON) SeleniumActions.click_element(web_driver, click_edit_button) Tools.sleep(5) web_driver.switch_to.default_content() element_path = CtaModuleData.CTA_MODULE_HEADER web_element = SeleniumActions.find_by_xpath(web_driver, element_path) cta_text = SeleniumActions.read_web_element_text(web_element) try: assert(cta_text == "CALL TO ACTION(CTA)") CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '') except: CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '') except: Tools.log("C18521173 Not Tested") e = sys.exc_info()[0] Tools.log("<p>Error: %s</p>" % e) def test_c18521175(self): test_case_number = "18521175" web_driver = self.fetch_webdriver() try: write_cta_title = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_TITLE) SeleniumActions.clearTextField(web_driver, write_cta_title) SeleniumActions.write_to_element(web_driver, write_cta_title, "Automated Title") write_cta_caption = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_CAPTION) SeleniumActions.clearTextField(web_driver, write_cta_caption) SeleniumActions.write_to_element(web_driver, write_cta_caption, "Automated Caption") click_done_button = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_DONE_BUTTON) SeleniumActions.click_element(web_driver, click_done_button) web_driver.switch_to.frame(web_driver.find_element_by_xpath(MartindalePageData.MARTINDALE_IFRAME)) Tools.sleep(4) element_path = CtaModuleData.CTA_MODULE_TITLE_DISPLAY web_element = SeleniumActions.find_by_xpath(web_driver, element_path) cta_title_text = SeleniumActions.read_web_element_text(web_element) element_path = CtaModuleData.CTA_MODULE_CAPTION_DISPLAY web_element = SeleniumActions.find_by_xpath(web_driver, element_path) cta_caption_text = SeleniumActions.read_web_element_text(web_element) click_blade_module = SeleniumActions.fetch_web_element(web_driver, MartindalePageData.MODULE) SeleniumActions.click_element(web_driver, click_blade_module) Tools.sleep(2) click_edit_button = \ SeleniumActions.fetch_web_element(web_driver, MartindalePageData.IFRAME_EDIT_BUTTON) SeleniumActions.click_element(web_driver, click_edit_button) Tools.sleep(5) web_driver.switch_to.default_content() write_cta_title = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_TITLE) SeleniumActions.clearTextField(web_driver, write_cta_title) SeleniumActions.write_to_element(web_driver, write_cta_title, "Test Title") write_cta_caption = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_CAPTION) SeleniumActions.clearTextField(web_driver, write_cta_caption) SeleniumActions.write_to_element(web_driver, write_cta_caption, "Test Caption") click_done_button = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_DONE_BUTTON) SeleniumActions.click_element(web_driver, click_done_button) web_driver.switch_to.frame(web_driver.find_element_by_xpath(MartindalePageData.MARTINDALE_IFRAME)) Tools.sleep(4) try: assert(cta_title_text == "Automated Title" and cta_caption_text == "Automated Caption") CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '') except: CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '') except: print("C18521175 Not Tested") e = sys.exc_info()[0] print("<p>Error: %s</p>" % e) def test_c18521178(self): test_case_number = "18521178" web_driver = self.fetch_webdriver() try: click_blade_module = SeleniumActions.fetch_web_element(web_driver, MartindalePageData.MODULE) SeleniumActions.click_element(web_driver, click_blade_module) Tools.sleep(2) click_edit_button = \ SeleniumActions.fetch_web_element(web_driver, MartindalePageData.IFRAME_EDIT_BUTTON) SeleniumActions.click_element(web_driver, click_edit_button) Tools.sleep(5) web_driver.switch_to.default_content() # CTA Button One element_path = CtaModuleData.CTA_MODULE_BUTTON_ONE_LINK_TYPE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "0") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_LINK_PAGE_ONE_DROP_DOWN link_page_one_drop_down = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, link_page_one_drop_down)) test_one = "Passed" except AssertionError: test_one = "Failed" print("<p>Error: %s</p>") element_path = CtaModuleData.CTA_MODULE_BUTTON_ONE_LINK_TYPE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "1") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_EXTERNAL_URL_ONE url_one = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, url_one)) test_two = "Passed" except AssertionError: test_two = "Failed" print("<p>Error: %s</p>") element_path = CtaModuleData.CTA_MODULE_BUTTON_ONE_LINK_TYPE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "2") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_PHONE_NUMBER_ONE phone_number = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, phone_number)) test_three = "Passed" except AssertionError: test_three = "Failed" print("<p>Error: %s</p>") element_path = CtaModuleData.CTA_MODULE_BUTTON_ONE_LINK_TYPE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "3") Tools.sleep(1) try: assert(SeleniumActions.element_is_not_visible(link_page_one_drop_down) and SeleniumActions.element_is_not_visible(url_one) and SeleniumActions.element_is_not_visible(phone_number)) test_four = "Passed" except AssertionError: test_four = "Failed" print("<p>Error: %s</p>") # CTA Button Two element_path = CtaModuleData.CTA_MODULE_TWO_BUTTON_LINK_TYPE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "0") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_LINK_PAGE_TWO_DROP_DOWN link_page_two_drop_down = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, link_page_two_drop_down)) test_five = "Passed" except AssertionError: test_five = "Failed" print("<p>Error: %s</p>") element_path = CtaModuleData.CTA_MODULE_TWO_BUTTON_LINK_TYPE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "1") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_EXTERNAL_URL_TWO url_two = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, url_two)) test_six = "Passed" except AssertionError: test_six = "Failed" print("<p>Error: %s</p>") element_path = CtaModuleData.CTA_MODULE_TWO_BUTTON_LINK_TYPE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "2") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_PHONE_NUMBER_TWO phone_number_two = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, phone_number_two)) test_seven = "Passed" except AssertionError: test_seven = "Failed" print("<p>Error: %s</p>") element_path = CtaModuleData.CTA_MODULE_TWO_BUTTON_LINK_TYPE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "3") Tools.sleep(1) try: assert(SeleniumActions.element_is_not_visible(link_page_two_drop_down) and SeleniumActions.element_is_not_visible(url_two) and SeleniumActions.element_is_not_visible(phone_number_two)) test_eight = "Passed" except AssertionError: test_eight = "Failed" print("<p>Error: %s</p>") if test_one == "Passed" and test_two == "Passed" and test_three == "Passed" and test_four == "Passed" and \ test_five == "Passed" and test_six == "Passed" and test_seven == "Passed" and test_eight == "Passed": CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '') else: CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '') except: print("C18521178 Not Tested") e = sys.exc_info()[0] print("<p>Error: %s</p>" % e) def test_c18521180(self): test_case_number = "18521180" web_driver = self.fetch_webdriver() try: # CTA Button One element_path = CtaModuleData.CTA_MODULE_ONE_LINK_APPEARANCE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "1") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_BUTTON_TEXT_BOX_ONE button_text_box_one = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, button_text_box_one)) test_one = "Passed" except AssertionError: test_one = "Failed" print("<p>Error: %s</p>") element_path = CtaModuleData.CTA_MODULE_ONE_LINK_APPEARANCE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "2") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_SELECT_ICON_ONE select_icon_one = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, select_icon_one)) test_two = "Passed" except AssertionError: test_two = "Failed" print("<p>Error: %s</p>") element_path = CtaModuleData.CTA_MODULE_ONE_LINK_APPEARANCE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "3") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_BUTTON_TEXT_BOX_ONE link_text_one = SeleniumActions.find_by_xpath(web_driver, element_path) element_path = CtaModuleData.CTA_MODULE_SELECT_ICON_ONE select_icon_one = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, link_text_one) and SeleniumActions.element_is_visible(web_driver, select_icon_one)) test_three = "Passed" except AssertionError: test_three = "Failed" print("<p>Error: %s</p>") element_path = CtaModuleData.CTA_MODULE_ONE_LINK_APPEARANCE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "0") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_BUTTON_TEXT_BOX_ONE link_text_one = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, link_text_one)) test_four = "Passed" except AssertionError: test_four = "Failed" print("<p>Error: %s</p>") # CTA Button Two element_path = CtaModuleData.CTA_MODULE_TWO_LINK_APPEARANCE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "1") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_BUTTON_TEXT_BOX_TWO button_text_box_two = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, button_text_box_two)) test_five = "Passed" except AssertionError: test_five = "Failed" print("<p>Error: %s</p>") element_path = CtaModuleData.CTA_MODULE_TWO_LINK_APPEARANCE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "2") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_SELECT_ICON_TWO select_icon_two = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, select_icon_two)) test_six = "Passed" except AssertionError: test_six = "Failed" print("<p>Error: %s</p>") element_path = CtaModuleData.CTA_MODULE_TWO_LINK_APPEARANCE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "3") Tools.sleep(2) element_path = CtaModuleData.CTA_MODULE_BUTTON_TEXT_BOX_TWO button_text_box_two = SeleniumActions.find_by_xpath(web_driver, element_path) element_path = CtaModuleData.CTA_MODULE_SELECT_ICON_TWO select_icon_two = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, button_text_box_two) and SeleniumActions.element_is_visible(web_driver, select_icon_two)) test_seven = "Passed" except AssertionError: test_seven = "Failed" print("<p>Error: %s</p>") element_path = CtaModuleData.CTA_MODULE_TWO_LINK_APPEARANCE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) SeleniumActions.select_by_index(web_element, "0") Tools.sleep(1) element_path = CtaModuleData.CTA_MODULE_LINK_TEXT_BOX_TWO link_text_two = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, link_text_two)) test_eight = "Passed" except AssertionError: test_eight = "Failed" print("<p>Error: %s</p>") if test_one == "Passed" and test_two == "Passed" and test_three == "Passed" and test_four == "Passed" and \ test_five == "Passed" and test_six == "Passed" and test_seven == "Passed" and test_eight == "Passed": CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '') else: CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '') except: print("C18521180 Not Tested") e = sys.exc_info()[0] print("<p>Error: %s</p>" % e) def test_c18521174(self): test_case_number = "18521174" web_driver = self.fetch_webdriver() try: write_link_text_two = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_LINK_TEXT_BOX_TWO) SeleniumActions.clearTextField(web_driver, write_link_text_two) SeleniumActions.write_to_element(web_driver, write_link_text_two, "Legalize Ferrets") click_settings_tab = SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_TAB) SeleniumActions.click_element(web_driver, click_settings_tab) cta_settings_button_one = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_SHOW_BUTTON_ONE) try: assert(SeleniumActions.element_is_visible(web_driver, cta_settings_button_one)) CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '') except: CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '') except: print("C18521174 Not Tested") e = sys.exc_info()[0] print("<p>Error: %s</p>" % e) def test_c18521182(self): test_case_number = "18521182" web_driver = self.fetch_webdriver() try: # Link One click_cta_settings_button_one = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_SHOW_BUTTON_ONE) SeleniumActions.click_element(web_driver, click_cta_settings_button_one) click_done_button = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_DONE_BUTTON) SeleniumActions.click_element(web_driver, click_done_button) web_driver.switch_to.frame(web_driver.find_element_by_xpath(MartindalePageData.MARTINDALE_IFRAME)) Tools.sleep(5) element_path = CtaModuleData.CTA_MODULE_LINK_DISPLAY link_display_one = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, link_display_one)) test_one = "Passed" except AssertionError: test_one = "Failed" print("<p>Error: %s</p>") # Link Two click_blade_module = SeleniumActions.fetch_web_element(web_driver, MartindalePageData.MODULE) SeleniumActions.click_element(web_driver, click_blade_module) Tools.sleep(2) click_edit_button = \ SeleniumActions.fetch_web_element(web_driver, MartindalePageData.IFRAME_EDIT_BUTTON) SeleniumActions.click_element(web_driver, click_edit_button) Tools.sleep(5) web_driver.switch_to.default_content() click_settings_tab = SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_TAB) SeleniumActions.click_element(web_driver, click_settings_tab) click_cta_settings_button_one = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_SHOW_BUTTON_ONE) SeleniumActions.click_element(web_driver, click_cta_settings_button_one) click_cta_settings_button_two = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_SHOW_BUTTON_TWO) SeleniumActions.click_element(web_driver, click_cta_settings_button_two) click_done_button = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_DONE_BUTTON) SeleniumActions.click_element(web_driver, click_done_button) web_driver.switch_to.frame(web_driver.find_element_by_xpath(MartindalePageData.MARTINDALE_IFRAME)) Tools.sleep(5) element_path = CtaModuleData.CTA_MODULE_LINK_DISPLAY link_display_one = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, link_display_one)) test_two = "Passed" except AssertionError: test_two = "Failed" print("<p>Error: %s</p>") if test_one == "Passed" and test_two == "Passed": CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '') else: CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '') except: print("C18521182 Not Tested") e = sys.exc_info()[0] print("<p>Error: %s</p>" % e) def test_c18521230(self): test_case_number = "18521230" web_driver = self.fetch_webdriver() try: click_blade_module = SeleniumActions.fetch_web_element(web_driver, MartindalePageData.MODULE) SeleniumActions.click_element(web_driver, click_blade_module) Tools.sleep(2) click_edit_button = \ SeleniumActions.fetch_web_element(web_driver, MartindalePageData.IFRAME_EDIT_BUTTON) SeleniumActions.click_element(web_driver, click_edit_button) Tools.sleep(5) web_driver.switch_to.default_content() click_settings_tab = SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_TAB) SeleniumActions.click_element(web_driver, click_settings_tab) click_cta_settings_button_two = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_SHOW_BUTTON_TWO) SeleniumActions.click_element(web_driver, click_cta_settings_button_two) click_content_tab = SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_CONTENT_TAB) SeleniumActions.click_element(web_driver, click_content_tab) element_path = CtaModuleData.CTA_MODULE_TWO_LINK_APPEARANCE web_element = SeleniumActions.find_by_xpath(web_driver, element_path) try: assert(SeleniumActions.element_is_visible(web_driver, web_element)) CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '') except AssertionError: CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '') except: print("C18521230 Not Tested") e = sys.exc_info()[0] print("<p>Error: %s</p>" % e) def test_c18521191(self): test_case_number = "18521191" web_driver = self.fetch_webdriver() try: click_settings_tab = SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_TAB) SeleniumActions.click_element(web_driver, click_settings_tab) click_show_title = SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_SHOW_TITLE) SeleniumActions.click_element(web_driver, click_show_title) click_done_button = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_DONE_BUTTON) SeleniumActions.click_element(web_driver, click_done_button) web_driver.switch_to.frame(web_driver.find_element_by_xpath(MartindalePageData.MARTINDALE_IFRAME)) Tools.sleep(5) try: assert(SeleniumActions.check_element_exists(web_driver, "//*[@id=\"ple_column-0\"]/div[3]/div/div/div/div/div/h3")) test_one = "Failed" except: test_one = "Passed" click_blade_module = SeleniumActions.fetch_web_element(web_driver, MartindalePageData.MODULE) SeleniumActions.click_element(web_driver, click_blade_module) Tools.sleep(2) click_edit_button = \ SeleniumActions.fetch_web_element(web_driver, MartindalePageData.IFRAME_EDIT_BUTTON) SeleniumActions.click_element(web_driver, click_edit_button) Tools.sleep(5) web_driver.switch_to.default_content() click_settings_tab = SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_TAB) SeleniumActions.click_element(web_driver, click_settings_tab) click_show_title = SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_SHOW_TITLE) SeleniumActions.click_element(web_driver, click_show_title) click_done_button = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_DONE_BUTTON) SeleniumActions.click_element(web_driver, click_done_button) web_driver.switch_to.frame(web_driver.find_element_by_xpath(MartindalePageData.MARTINDALE_IFRAME)) Tools.sleep(5) try: assert(SeleniumActions.check_element_exists(web_driver, "//*[@id=\"ple_column-0\"]/div[3]/div/div/div/div/div/h3")) test_two = "Passed" except: test_two = "Failed" if test_one == "Passed" and test_two == "Passed": CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '') else: CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '') except: print("C18521191 Not Tested") e = sys.exc_info()[0] print("<p>Error: %s</p>" % e) def test_c18521192(self): test_case_number = "18521192" web_driver = self.fetch_webdriver() try: click_blade_module = SeleniumActions.fetch_web_element(web_driver, MartindalePageData.MODULE) SeleniumActions.click_element(web_driver, click_blade_module) Tools.sleep(2) click_edit_button = \ SeleniumActions.fetch_web_element(web_driver, MartindalePageData.IFRAME_EDIT_BUTTON) SeleniumActions.click_element(web_driver, click_edit_button) Tools.sleep(5) web_driver.switch_to.default_content() click_settings_tab = SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_TAB) SeleniumActions.click_element(web_driver, click_settings_tab) click_show_title = SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_SHOW_CAPTION) SeleniumActions.click_element(web_driver, click_show_title) click_done_button = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_DONE_BUTTON) SeleniumActions.click_element(web_driver, click_done_button) web_driver.switch_to.frame(web_driver.find_element_by_xpath(MartindalePageData.MARTINDALE_IFRAME)) Tools.sleep(5) try: assert(SeleniumActions.check_element_exists(web_driver, "//*[@id=\"ple_column-0\"]/div[3]/div/div/div/div/div/h4")) test_one = "Failed" except: test_one = "Passed" click_blade_module = SeleniumActions.fetch_web_element(web_driver, MartindalePageData.MODULE) SeleniumActions.click_element(web_driver, click_blade_module) Tools.sleep(2) click_edit_button = \ SeleniumActions.fetch_web_element(web_driver, MartindalePageData.IFRAME_EDIT_BUTTON) SeleniumActions.click_element(web_driver, click_edit_button) Tools.sleep(5) web_driver.switch_to.default_content() click_settings_tab = SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_TAB) SeleniumActions.click_element(web_driver, click_settings_tab) click_show_title = SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_SETTINGS_SHOW_CAPTION) SeleniumActions.click_element(web_driver, click_show_title) click_done_button = \ SeleniumActions.fetch_web_element(web_driver, CtaModuleData.CTA_MODULE_DONE_BUTTON) SeleniumActions.click_element(web_driver, click_done_button) web_driver.switch_to.frame(web_driver.find_element_by_xpath(MartindalePageData.MARTINDALE_IFRAME)) Tools.sleep(5) try: assert(SeleniumActions.check_element_exists(web_driver, "//*[@id=\"ple_column-0\"]/div[3]/div/div/div/div/div/h3")) test_two = "Passed" except: test_two = "Failed" if test_one == "Passed" and test_two == "Passed": CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '') else: CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '') self.case_teardown() except: print("C18521192 Not Tested") e = sys.exc_info()[0] print("<p>Error: %s</p>" % e)
38.539365
131
0.655243
3,610
32,797
5.537396
0.051801
0.087794
0.072836
0.069035
0.91911
0.904602
0.888244
0.871586
0.852376
0.841171
0
0.012195
0.267433
32,797
850
132
38.584706
0.81982
0.013629
0
0.791209
0
0
0.044997
0.003864
0
0
0
0
0.082418
1
0.02381
false
0.069597
0.018315
0
0.043956
0.062271
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
8
f9caaa0aaed224352cf468d8e03e0e8e92b2e9dd
482
py
Python
banner/banner2.py
attackgithub/arissploit
27208adddaa523e10c4efc6e1ba62f7b4ccc041f
[ "BSD-3-Clause" ]
1
2021-08-13T22:14:29.000Z
2021-08-13T22:14:29.000Z
banner/banner2.py
attackgithub/arissploit
27208adddaa523e10c4efc6e1ba62f7b4ccc041f
[ "BSD-3-Clause" ]
null
null
null
banner/banner2.py
attackgithub/arissploit
27208adddaa523e10c4efc6e1ba62f7b4ccc041f
[ "BSD-3-Clause" ]
null
null
null
N = '\033[1;37m' # White G = '\033[32m' # Green print ""+N+"" print print " _______" print "<"+G+" uh oh"+N+" >" print " -------" print " \ " print " \ __" print " \ (OO)" print " \ ( )" print " /--\ " print " __ / \ \ " print " UooU\.'@@@@@@' \ )" print " \__/(@@@@@@@@@@@) /" print " (@@@@@@@@@)((" print " 'YY----YY' \\" print " || || >>"
24.1
34
0.280083
34
482
3.588235
0.411765
0.819672
0.737705
0.262295
0
0
0
0
0
0
0
0.040892
0.441909
482
19
35
25.368421
0.412639
0.022822
0
0
0
0
0.631692
0
0
0
0
0
0
0
null
null
0
0
null
null
0.888889
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
7
ddbec70fbb6e91db20121a4b7d8079a862378ce8
1,455
py
Python
banner.py
blaudoom/C3
e9e3d0689b224165e7a8e39d68f8ba0d2abf4b78
[ "MIT" ]
null
null
null
banner.py
blaudoom/C3
e9e3d0689b224165e7a8e39d68f8ba0d2abf4b78
[ "MIT" ]
4
2021-08-12T11:59:24.000Z
2021-08-18T14:41:04.000Z
banner.py
blaudoom/C3
e9e3d0689b224165e7a8e39d68f8ba0d2abf4b78
[ "MIT" ]
1
2021-09-30T07:54:12.000Z
2021-09-30T07:54:12.000Z
banner = """ _________ ________ \_ ___ \\_____ \ / \ \/ _(__ < ______ \ \____/ \ /_____/ \______ /______ / \/ \/ ___________.__ _______________________________ \__ ___/| |__ ____ \_ ___ \__ ___/\_ _____/ | | | | \_/ __ \ / \ \/ | | | __) | | | Y \ ___/ \ \____| | | \ |____| |___| /\___ > \______ /|____| \___ / \/ \/ \/ \/ .___ ____ ____ _____ _____ _____ ____ __| _/ _/ ___\/ _ \ / \ / \\__ \ / \ / __ | \ \__( <_> ) Y Y \ Y Y \/ __ \| | \/ /_/ | \___ >____/|__|_| /__|_| (____ /___| /\____ | \/ \/ \/ \/ \/ \/ ____ __ .__ / _ \ ____ ____ _____/ |________ ____ | | > _ </\ _/ ___\/ _ \ / \ __\_ __ \/ _ \| | / <_\ \/ \ \__( <_> ) | \ | | | \( <_> ) |__ \_____\ \ \___ >____/|___| /__| |__| \____/|____/ by Blaudoom """
53.888889
60
0.229553
8
1,455
2.625
0.5
0.380952
0.428571
0.380952
0
0
0
0
0
0
0
0
0.626804
1,455
27
61
53.888889
0.038674
0
0
0
0
0.153846
0.989011
0.021291
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
ddfd481c80d2ab9c8f3a645ebdf2061082313b8e
42
py
Python
Reverse.py
Saikiran200-cloud/Top10-Interview-Programs
7fe62e98dba102f5327e33dd6e0457a255770bd0
[ "MIT" ]
1
2021-06-29T04:34:49.000Z
2021-06-29T04:34:49.000Z
Reverse.py
Saikiran200-cloud/Top10-Interview-Programs
7fe62e98dba102f5327e33dd6e0457a255770bd0
[ "MIT" ]
null
null
null
Reverse.py
Saikiran200-cloud/Top10-Interview-Programs
7fe62e98dba102f5327e33dd6e0457a255770bd0
[ "MIT" ]
null
null
null
a = [1,2,3,4,5,6,7,8,9,10] print(a[::-1])
21
27
0.452381
14
42
1.357143
0.857143
0.210526
0
0
0
0
0
0
0
0
0
0.315789
0.095238
42
2
28
21
0.184211
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
1
1
null
1
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
8
fb1433eb98333db86e8199385f0843213c426d0f
7,491
py
Python
tests/integration/numbers/v2/regulatory_compliance/test_regulation.py
BrimmingDev/twilio-python
3226b5fed92b3c2ce64f03e6b19fc4792ef7647f
[ "MIT" ]
1,362
2015-01-04T10:25:18.000Z
2022-03-24T10:07:08.000Z
tests/integration/numbers/v2/regulatory_compliance/test_regulation.py
BrimmingDev/twilio-python
3226b5fed92b3c2ce64f03e6b19fc4792ef7647f
[ "MIT" ]
299
2015-01-30T09:52:39.000Z
2022-03-31T23:03:02.000Z
tests/integration/numbers/v2/regulatory_compliance/test_regulation.py
BrimmingDev/twilio-python
3226b5fed92b3c2ce64f03e6b19fc4792ef7647f
[ "MIT" ]
622
2015-01-03T04:43:09.000Z
2022-03-29T14:11:00.000Z
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class RegulationTestCase(IntegrationTestCase): def test_list_request(self): self.holodeck.mock(Response(500, '')) with self.assertRaises(TwilioException): self.client.numbers.v2.regulatory_compliance \ .regulations.list() self.holodeck.assert_has_request(Request( 'get', 'https://numbers.twilio.com/v2/RegulatoryCompliance/Regulations', )) def test_read_empty_response(self): self.holodeck.mock(Response( 200, ''' { "results": [], "meta": { "page": 0, "page_size": 50, "first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Regulations?IsoCountry=US&EndUserType=business&NumberType=mobile&PageSize=50&Page=0", "previous_page_url": null, "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Regulations?IsoCountry=US&EndUserType=business&NumberType=mobile&PageSize=50&Page=0", "next_page_url": null, "key": "results" } } ''' )) actual = self.client.numbers.v2.regulatory_compliance \ .regulations.list() self.assertIsNotNone(actual) def test_read_full_response(self): self.holodeck.mock(Response( 200, ''' { "results": [ { "sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Australia: Local - Individual", "iso_country": "AU", "number_type": "local", "end_user_type": "individual", "requirements": { "end_user": [ { "name": "Individual", "type": "individual", "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Regulations/individual", "fields": [ "first_name", "last_name" ] } ], "supporting_document": [ [ { "name": "Address", "type": "document", "description": "The physical location of the individual or business. Must be within locality or region covered by the phone numbers prefix; a PO Box is not acceptable where a local address is required.", "accepted_documents": [ { "name": "Address Validation", "type": "address", "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/DocumentTypes/address", "fields": [] } ] } ] ] }, "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Regulations/RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ], "meta": { "page": 0, "page_size": 50, "first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Regulations?PageSize=50&Page=0", "previous_page_url": null, "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Regulations?PageSize=50&Page=0", "next_page_url": null, "key": "results" } } ''' )) actual = self.client.numbers.v2.regulatory_compliance \ .regulations.list() self.assertIsNotNone(actual) def test_fetch_request(self): self.holodeck.mock(Response(500, '')) with self.assertRaises(TwilioException): self.client.numbers.v2.regulatory_compliance \ .regulations("RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch() self.holodeck.assert_has_request(Request( 'get', 'https://numbers.twilio.com/v2/RegulatoryCompliance/Regulations/RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', )) def test_fetch_response(self): self.holodeck.mock(Response( 200, ''' { "sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Australia: Local - Individual", "iso_country": "AU", "number_type": "local", "end_user_type": "individual", "requirements": { "end_user": [ { "name": "Individual", "type": "individual", "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Regulations/individual", "fields": [ "first_name", "last_name" ] } ], "supporting_document": [ [ { "name": "Address", "type": "document", "description": "The physical location of the individual or business. Must be within locality or region covered by the phone numbers prefix; a PO Box is not acceptable where a local address is required.", "accepted_documents": [ { "name": "Address Validation", "type": "address", "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/DocumentTypes/address", "fields": [] } ] } ] ] }, "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Regulations/RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ''' )) actual = self.client.numbers.v2.regulatory_compliance \ .regulations("RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch() self.assertIsNotNone(actual)
42.322034
243
0.421039
483
7,491
6.397516
0.242236
0.046602
0.069903
0.081553
0.89288
0.89288
0.89288
0.880259
0.848544
0.847249
0
0.013964
0.483781
7,491
176
244
42.5625
0.785105
0.014551
0
0.711111
1
0
0.118034
0.034448
0
0
0
0
0.155556
1
0.111111
false
0
0.088889
0
0.222222
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
349887231199e3c15f59df4f255c35d60fde76ef
49
py
Python
tests/test_copier_python_test.py
blakeNaccarato/copier-python-test
b46925ceabf563ff22542f0564fde870f3064f56
[ "MIT" ]
null
null
null
tests/test_copier_python_test.py
blakeNaccarato/copier-python-test
b46925ceabf563ff22542f0564fde870f3064f56
[ "MIT" ]
null
null
null
tests/test_copier_python_test.py
blakeNaccarato/copier-python-test
b46925ceabf563ff22542f0564fde870f3064f56
[ "MIT" ]
null
null
null
import copier_python_test def test(): pass
8.166667
25
0.714286
7
49
4.714286
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.22449
49
5
26
9.8
0.868421
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0.333333
0.333333
0
0.666667
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
1
1
0
0
0
0
7
34ada422b50eeb5ba426f07f26b6c1d6818f6dab
1,382
py
Python
models.py
ahmad88me/OME
280c6676c376328c7270b5fb73bc3a7017f5adb8
[ "Apache-2.0" ]
5
2018-08-08T10:59:07.000Z
2021-03-30T10:56:56.000Z
models.py
ahmad88me/OME
280c6676c376328c7270b5fb73bc3a7017f5adb8
[ "Apache-2.0" ]
18
2019-03-21T10:51:46.000Z
2021-03-31T23:16:10.000Z
models.py
ahmad88me/OME
280c6676c376328c7270b5fb73bc3a7017f5adb8
[ "Apache-2.0" ]
4
2018-08-07T17:13:43.000Z
2020-05-27T15:12:43.000Z
from flask_sqlalchemy import SQLAlchemy from flask_login import UserMixin db = SQLAlchemy() class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(220), unique=True, nullable=False) def __repr__(self): return '<User %r>' % self.username class Group(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(220), unique=True, nullable=False) def __repr__(self): return '<Group %r>' % self.name class ManyUserGroup(db.Model): id = db.Column(db.Integer, primary_key=True) user = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False) group = db.Column(db.Integer, db.ForeignKey('group.id'), nullable=False) def __repr__(self): return '<Many %d>' % self.id class KG(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(220), unique=False, nullable=False) group = db.Column(db.Integer, db.ForeignKey('group.id'), nullable=False) def __repr__(self): return '<KG %r>' % self.name class Ontology(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(220), unique=False, nullable=False) group = db.Column(db.Integer, db.ForeignKey('group.id'), nullable=False) def __repr__(self): return '<Ontology %r>' % self.name
28.791667
76
0.671491
197
1,382
4.573604
0.177665
0.115427
0.144284
0.169811
0.744728
0.744728
0.712542
0.712542
0.712542
0.712542
0
0.010554
0.177279
1,382
47
77
29.404255
0.781882
0
0
0.483871
0
0
0.057164
0
0
0
0
0
0
1
0.16129
false
0
0.064516
0.16129
0.967742
0
0
0
0
null
0
0
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
8
9b3f63ed837605d0ae646042fca748d84f87d0c3
1,956
py
Python
backend/presentation/Tests/test_signup.py
Felix-Huang11/CMPUT404-project-socialdistribution
ea3da451b806f461824d104d996dd9f5c95b79fc
[ "W3C-20150513" ]
null
null
null
backend/presentation/Tests/test_signup.py
Felix-Huang11/CMPUT404-project-socialdistribution
ea3da451b806f461824d104d996dd9f5c95b79fc
[ "W3C-20150513" ]
75
2021-01-13T23:48:48.000Z
2021-04-16T19:39:38.000Z
backend/presentation/Tests/test_signup.py
Felix-Huang11/CMPUT404-project-socialdistribution
ea3da451b806f461824d104d996dd9f5c95b79fc
[ "W3C-20150513" ]
12
2021-01-13T23:22:35.000Z
2021-04-28T08:13:38.000Z
from rest_framework.test import APITestCase from presentation.models import Author from rest_framework import status import presentation.Tests.constants as constants import json class SignUpTestCase(APITestCase): def test_signup_with_github(self): payload = { "displayName": "johnwick", "email": "johnwick@fake.email", "password": "johnwick123456", "username": "johnwick", "github": "https://github.com/johnwick" } response = self.client.post(constants.SIGNUP_POST, payload) self.assertEqual(response.status_code, status.HTTP_200_OK) response_json = json.loads(response.content.decode('utf-8')) self.assertTrue(response_json['msg']) self.assertEqual(response_json['msg'], constants.SIGNUP_SUCCESS) def test_signup_without_github(self): payload = { "displayName": "johnwick", "email": "johnwick@fake.email", "password": "johnwick123456", "username": "johnwick", "github": "" } response = self.client.post(constants.SIGNUP_POST, payload) self.assertEqual(response.status_code, status.HTTP_200_OK) response_json = json.loads(response.content.decode('utf-8')) self.assertTrue(response_json['msg']) self.assertEqual(response_json['msg'], constants.SIGNUP_SUCCESS) def test_signup_none_github(self): payload = { "displayName": "johnwick", "email": "johnwick@fake.email", "password": "johnwick123456", "username": "johnwick" } response = self.client.post(constants.SIGNUP_POST, payload) self.assertEqual(response.status_code, status.HTTP_200_OK) response_json = json.loads(response.content.decode('utf-8')) self.assertTrue(response_json['msg']) self.assertEqual(response_json['msg'], constants.SIGNUP_SUCCESS)
39.12
72
0.646217
201
1,956
6.114428
0.243781
0.087876
0.112286
0.068348
0.816111
0.816111
0.816111
0.816111
0.816111
0.816111
0
0.019987
0.232618
1,956
50
73
39.12
0.798801
0
0
0.659091
0
0
0.160961
0
0
0
0
0
0.204545
1
0.068182
false
0.068182
0.113636
0
0.204545
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
7
9b5036d3571becc603abcffb984e5787b8c0f632
116,988
py
Python
KdV-Python/MZKdV.py
kalamadude/Renormalized_Mori_Zwanzig
f818a63291497da88cf42e99408e2bb3a0452986
[ "MIT" ]
1
2019-07-26T23:12:07.000Z
2019-07-26T23:12:07.000Z
KdV-Python/MZKdV.py
jrpriceUPS/Renormalized_Mori_Zwanz
f818a63291497da88cf42e99408e2bb3a0452986
[ "MIT" ]
null
null
null
KdV-Python/MZKdV.py
jrpriceUPS/Renormalized_Mori_Zwanz
f818a63291497da88cf42e99408e2bb3a0452986
[ "MIT" ]
3
2019-09-18T16:43:48.000Z
2021-01-26T01:03:47.000Z
# Author: Jake Price # Date: February 8, 2021 # Purpose: Collection of custom functions for running CMA simulations of KdV, # analysis functions, and renormalization scripts. Generates some images # from past papers, but not all (didn't want / need to duplicate everything) # Translation of code from UW PhD in Matlab. # import libraries import numpy as np import scipy as sp import matplotlib.pyplot as plt from matplotlib import animation import glob import re def fftnorm(u_full): """Computes normalized FFT (such that FFT and IFFT are symmetrically normalized) Parameters ---------- u_full : 1D Numpy Array (N,) The vector whose discrete FFT is to be computed Returns ------- normalizedFFT : 1D Numpy Array (N,) The transformed version of that vector """ N = u_full.shape[0] normalizedFFT = np.fft.fft(u_full)*1/N return normalizedFFT def ifftnorm(u_full): """Computes normalized IFFT (such that FFT and IFFT are symmetrically normalized) Parameters ---------- u_full : 1D Numpy Array (N,) The vector whose discrete IFFT is to be computed Returns ------- normalizedIFFT : 1D Numpy Array (N,) The transformed version of that vector """ N = u_full.shape[0] normalizedIFFT = np.real(np.fft.ifft(u_full)*N) return normalizedIFFT def convolutionSumKdV(u,v,alpha): """Computes convolution sum associated with RHS of KdV ODE C_k(u,v) = -(alpha * 1i * k) / 2 * sum_{i+j = k} u_i v_j Computed in real space to avoid loops and then converted back to Fourier space. Parameters ---------- u : 1D Numpy Array (N,) One of the two vectors being convolved v : 1D Numpy Array (N,) One of the two vectors being convolved alpha : float Degree of nonlinearity in KdV Returns ------- convo : 1D Numpy Array (N,) Convolution of the two vectors """ # generate array of wavenumbers L = u.shape[0] k = np.concatenate([np.arange(0,L/2),np.arange(-L/2,0)]) if v.shape[0]!=L: raise NameError('u and v must be the same length.') # compute double sum in real space, then apply scalar multiplier convo = fftnorm(ifftnorm(u)*ifftnorm(v)) convo = -alpha/2*1j*k*convo return convo # RHS: Right hand side functions for CMA and non-renormalized KdV def markovKdV(u,M,alpha): """Computes nonlinear part of Markov term in KdV C_k(u,v) = -(alpha * 1i * k) / 2 * sum_{i+j = k} u_i v_j where the sum of i and j is over a "full" system with M positive modes (user specified) Computed in real space to avoid loops and then converted back to Fourier space. Parameters ---------- u : 1D Numpy Array (N,) Positive modes of state vector whose RHS is being computed M : int Number of positive modes in "full" model for intermediary calculations alpha : float Degree of nonlinearity in KdV Returns ------- nonlin0 : 1D Numpy Array (2*M,) Nonlinear part of Markov term for given state vector u_full : 1D Numpy array (2*M,) "full" state vector for use in later computations """ # construct full Fourier vector from only the positive modes u_full = np.zeros(2*M) +1j*np.zeros(2*M) u_full[0:u.shape[0]] = u u_full[2*M-u.shape[0]+1:] = np.conj(np.flip(u[1:])) # compute the convolution sum nonlin0 = convolutionSumKdV(u_full,u_full,alpha) return nonlin0,u_full def tModelKdV(u_full,nonlin0,alpha,F_modes): """Computes t-model term in KdV C_k(u,v) = -(alpha * 1i * k) / 2 * sum_{i+j = k, i and j in F} u_i v_j where the sum of i and j is over a "full" system with M positive modes (user specified) Computed in real space to avoid loops and then converted back to Fourier space. Parameters ---------- u_full : Numpy array (2M,1) Current state of u in full form nonlin0 : Numpy array (2M,1) Markov term (for convolving) alpha : float Degree of nonlinearity in KdV F_modes : Numpy array Set of resolved modes (and aliasing modes) to zero out Returns ------- nonlin1 : 1D Numpy Array (2*M,) t-model term uuStar : 1D Numpy array (2*M,) unresolved modes of state vector convolved with itself """ uuStar = np.copy(nonlin0) uuStar[F_modes] = 0 nonlin1 = 2*convolutionSumKdV(u_full, uuStar, alpha) return nonlin1,uuStar def t2ModelKdV(u_full,nonlin0,uuStar,alpha,F_modes,G_modes,k,epsilon): """Computes second order ROM term in KdV *see paper / symbolic notebook for expression* Computed in real space to avoid loops and then converted back to Fourier space. Parameters ---------- u_full : Numpy array (2M,1) Current state of u in full form nonlin0 : Numpy array (2M,1) Markov term (for convolving) uuStar : 1D Numpy array (2*M,) Unresolved modes of state vector convolved with itself alpha : float Degree of nonlinearity in KdV F_modes : Numpy array Set of resolved modes (and aliasing modes) to zero out G_modes : Numpy array Set of unresolved modes (and aliasing modes) to zero out k : Numpy array (2M,1) Array of wavenumbers epsilon : float Size of linear term (stiffness) Returns ------- nonlin2 : 1D Numpy Array (2*M,) t2-model term uk3 : 1D Numpy array (2*M,) Resolved modes of state vector multiplied by k^3 uu : 1D Numpy array (2*M,) Resolved modes of state vector convolved with itself A, AStar, B, BStar, C, CStar, D, DStar : 1D Numpy arrays (2*M,) Specific convolutions used as inner terms in future terms """ # compute inner convolutions uu = np.copy(nonlin0) uu[G_modes] = 0 uk3 = k**3*u_full A = k**3*uu AStar = k**3*uuStar B = convolutionSumKdV(1j*epsilon**2*uk3+uu,u_full,alpha) BStar = np.copy(B) B[G_modes] = 0 BStar[F_modes] = 0 C = convolutionSumKdV(uuStar,u_full,alpha) CStar = np.copy(C) C[G_modes] = 0 CStar[F_modes] = 0 D = convolutionSumKdV(uuStar,uuStar,alpha) DStar = np.copy(D) D[G_modes] = 0 DStar[F_modes] = 0 # compute actual term nonlin2 = -2*convolutionSumKdV(u_full,1j*epsilon**2*AStar - 2*BStar + 2*CStar,alpha) - 2*D return nonlin2,uk3,uu,A,AStar,B,BStar,C,CStar,D,DStar def t3ModelKdV(alpha,F_modes,G_modes,k,epsilon,u_full,uu,uuStar,uk3,A,AStar,B,BStar,C,CStar,DStar): """Computes third order ROM term in KdV *see paper / symbolic notebook for expression* Computed in real space to avoid loops and then converted back to Fourier space. Parameters ---------- alpha : float Degree of nonlinearity in KdV F_modes : Numpy array Set of resolved modes (and aliasing modes) to zero out G_modes : Numpy array Set of unresolved modes (and aliasing modes) to zero out k : Numpy array (2M,1) Array of wavenumbers epsilon : float Size of linear term (stiffness) u_full : Numpy array (2M,1) Current state of u in full form uu : 1D Numpy array (2*M,) Resolved modes of state vector convolved with itself uuStar : 1D Numpy array (2*M,) Unresolved modes of state vector convolved with itself uk3 : 1D Numpy array (2*M,) Resolved modes of state vector multiplied by k^3 A, AStar, B, BStar, C, CStar, DStar : 1D Numpy arrays (2*M,) Specific convolutions used as inner terms in future terms Returns ------- nonlin3 : 1D Numpy Array (2*M,) t3-model term uk6 : 1D Numpy array (2*M,) Resolved modes of state vector multiplied by k^6 nonlin3,uk6,E,EStar,F,FStar E, EStar, F, FStar : 1D Numpy arrays (2*M,) Specific convolutions used as inner terms in future terms """ # compute internal convolutions uk6 = k**3*uk3 E = convolutionSumKdV(1j*epsilon**2*uk3+uu,1j*epsilon**2*uk3+uu,alpha) EStar = np.copy(E) E[G_modes] = 0 EStar[F_modes] = 0 F = convolutionSumKdV(uuStar,1j*epsilon**2*uk3+uu,alpha) FStar = np.copy(F) F[G_modes] = 0 FStar[F_modes] = 0 int1 = -2*BStar+CStar int2 = (convolutionSumKdV(u_full, -epsilon**4*uk6 +1j*epsilon**2*(A+AStar) +2*(B-2*C) +2*(CStar-2*BStar), alpha)) int2[F_modes] = 0 int3 = EStar-FStar int4 = np.copy(DStar) int5 = CStar-BStar # compute actual 3rd order term nonlin3 = (2*convolutionSumKdV(u_full,-k**3*epsilon**4*AStar +2*1j*epsilon**2*k**3*int1 +2*int2+2*int3+2*int4,alpha) +6*convolutionSumKdV(uuStar,1j*epsilon**2*AStar + 2*int5,alpha)) return nonlin3,uk6,E,EStar,F,FStar def t4ModelKdV(alpha,F_modes,G_modes,k,epsilon,u_full,uu,uuStar,uk3,uk6,A,AStar,B,BStar,C,CStar,D,DStar,E,EStar,F,FStar): """Computes fourth order ROM term in KdV *see paper / symbolic notebook for expression* Computed in real space to avoid loops and then converted back to Fourier space. Parameters ---------- alpha : float Degree of nonlinearity in KdV F_modes : Numpy array Set of resolved modes (and aliasing modes) to zero out G_modes : Numpy array Set of unresolved modes (and aliasing modes) to zero out k : Numpy array (2M,1) Array of wavenumbers epsilon : float Size of linear term (stiffness) u_full : Numpy array (2M,1) Current state of u in full form uu : 1D Numpy array (2*M,) Resolved modes of state vector convolved with itself uuStar : 1D Numpy array (2*M,) Unresolved modes of state vector convolved with itself uk3 : 1D Numpy array (2*M,) Resolved modes of state vector multiplied by k^3 uk6 : 1D Numpy array (2*M,) Resolved modes of state vector multiplied by k^6 A, AStar, B, BStar, C, CStar, DStar, E, EStar, F, FStar : 1D Numpy arrays (2*M,) Specific convolutions used as inner terms in future terms Returns ------- nonlin4 : 1D Numpy Array (2*M,) t4-model term """ # compute internal convolutions internal1 = (convolutionSumKdV(u_full,-epsilon**4*uk6+1j*epsilon**2*(A+AStar) +2*B-4*C-4*BStar+2*CStar,alpha)) internal1[F_modes] = 0 internal2 = (1j*epsilon**2*k**3*convolutionSumKdV(u_full,-3*epsilon**4*uk6 +1j*epsilon**2*(3*A+AStar) -2*(-3*B+5*C) +2*(-3*BStar+CStar),alpha)) internal2[F_modes] = 0 auxiliary1 = 2*convolutionSumKdV(u_full,epsilon**4*uk6-1j*epsilon**2*(A+3*AStar) +2*(3*C-B)+2*(5*BStar-3*CStar),alpha) auxiliary1[G_modes] = 0 auxiliary2 = 2*convolutionSumKdV(u_full,-3*epsilon**4*uk6+1j*epsilon**2*(3*A+AStar) +2*(3*B-5*C)+2*(-3*BStar+CStar),alpha) auxiliary2[F_modes] = 0 internal3 = convolutionSumKdV(u_full,1j*k**3*uk6*epsilon**6 +k**3*epsilon**4*(A-AStar) +2*1j*epsilon**2*k**3*(3*C-B) +2*1j*epsilon**2*k**3*(-3*BStar+CStar) +auxiliary1+auxiliary2 -2*(E-2*F) +2*(3*EStar-2*FStar) -6*D+2*DStar,alpha) internal3[F_modes]= 0 internal4 = convolutionSumKdV(1j*epsilon**2*uk3+uu,3*epsilon**4*uk6-1j*epsilon**2*(3*A+AStar) +2*(-3*B+5*C)+2*(3*BStar-CStar),alpha) internal4[F_modes] = 0 internal5 = convolutionSumKdV(uuStar,-epsilon**4*uk6+1j*epsilon**2*(A+3*AStar) +2*B-6*C-10*BStar+6*CStar,alpha) internal5[F_modes] = 0 # compute actual fourth order term nonlin4 = (2*convolutionSumKdV(u_full,-1j*epsilon**6*k**6*AStar +2*k**6*epsilon**4*(3*BStar-CStar) +2*internal2 +2*internal3 +2*internal4 -2*k**3*1j*epsilon**2*(2*FStar-3*EStar) +2*k**3*1j*epsilon**2*DStar +2*internal5,alpha) +8*convolutionSumKdV(uuStar,-k**3*epsilon**4*AStar +2*1j*epsilon**2*k**3*(-2*BStar+CStar) +2*internal1 +2*(EStar-FStar) +2*DStar,alpha) -48*convolutionSumKdV(BStar,1j*epsilon**2*AStar+2*CStar,alpha) +6*convolutionSumKdV(1j*epsilon**2*AStar+2*(BStar+CStar), 1j*epsilon**2*AStar+2*(BStar+CStar),alpha) ) nonlin4 = -nonlin4 return nonlin4 def RHSKdV(t,u,params): """ Computes the RHS for a full KdV or ROM simulation. For use in solver. Parameters ---------- t : float Current time u : Numpy array (N,) Current state vector params : Dictionary Dictionary of relevant parameters (see below) N : float, number of positive modes in simulation M : float, number of positive modes in "full" intermediate compuation alpha : float, degree of nonlinearity in KdV epsilon : float, size of linear term (stiffness) tau : float, time decay modifier coeffs : Numpy array, renormalization coefficients for ROM (None if no ROM) Returns ------- RHS : 1D Numpy array (N,) Derivative of each positive mode in state vector """ # extract parameters from dictionary N = params['N'] M = params['M'] alpha = params['alpha'] epsilon = params['epsilon'] tau = params['tau'] coeffs = params['coeffs'] # construct wavenumber array k = np.concatenate([np.arange(0,M),np.arange(-M,0)]) # Linear and Markov term nonlin0,u_full = markovKdV(u,M,alpha) RHS = 1j*k[0:N]**3*epsilon**2*u + nonlin0[0:N] if (np.any(coeffs == None)): order = 0 else: order = coeffs.shape[0] if (order >= 1): # compute t-model term # define which modes are resolved / unresolved in full array F_modes = np.concatenate([np.arange(0,N),np.arange(2*N-1,M+N+2),np.arange(2*M-N+1,2*M)]) G_modes = np.arange(N,2*M-N+1) # compute t-model term nonlin1,uuStar = tModelKdV(u_full,nonlin0,alpha,F_modes) RHS = RHS + coeffs[0]*nonlin1[0:N]*t**(1-tau) order = coeffs.shape[0] if (order >= 2): # compute t2-model term nonlin2,uk3,uu,A,AStar,B,BStar,C,CStar,D,DStar = t2ModelKdV(u_full,nonlin0,uuStar,alpha,F_modes,G_modes,k,epsilon) RHS = RHS + coeffs[1]*nonlin2[0:N]*t**(2*(1-tau)) if (order >= 3): # compute t3-model term nonlin3,uk6,E,EStar,F,FStar = t3ModelKdV(alpha,F_modes,G_modes,k,epsilon,u_full,uu,uuStar,uk3,A,AStar,B,BStar,C,CStar,DStar) RHS = RHS + coeffs[2]*nonlin3[0:N]*t**(3*(1-tau)) if (order == 4): # compute t4-model term nonlin4 = t4ModelKdV(alpha,F_modes,G_modes,k,epsilon,u_full,uu,uuStar,uk3,uk6,A,AStar,B,BStar,C,CStar,D,DStar,E,EStar,F,FStar) RHS = RHS + coeffs[3]*nonlin4[0:N]*t**(4*(1-tau)) return RHS def getMass(u,N): """Computes mass in first N modes for all timesteps from solution array u Parameters ---------- u : 2D Numpy Array (M,tList) Positive modes of state vector for all timesteps N : int Number of positive modes to include in mass measurement Returns ------- mass : 1D Numpy Array (tList,) Energy in first N modes at all timesteps """ mass = np.sum(2*(abs(u[0:N,]))**2,0) return mass def runSim(params): """ Runs an actual ROM or non-ROM simulation of KdV Parameters ---------- params : Dictionary Dictionary of relevant parameters (see below) N : float, number of positive modes in simulation M : float, number of positive modes in "full" intermediate compuation alpha : float, degree of nonlinearity in KdV epsilon : float, size of linear term (stiffness) tau : float, time decay modifier coeffs : Numpy array, renormalization coefficients for ROM (None if no ROM) IC : function handle, initial condition of simulation endtime : float, final time to simulate to timesteps: Numpy array, specific timesteps for which to save solution Returns ------- uSim : ODE solver output Output solution from sp.integrate.solve_ivp (includes state vector at all timesteps, time vector, etc.) """ # unpack parameters from dictionary N = params['N'] IC = params['IC'] endtime = params['endtime'] timesteps = params['timesteps'] # generate initial condition x = np.linspace(0,2*np.pi-2*np.pi/(2*N),2*N) y = IC(x) uFull = fftnorm(y) u = uFull[0:N] # define RHS in form appropriate for solve_ivp def myRHS(t,y): out = RHSKdV(t,y,params) return out # solve the IVP uSim = sp.integrate.solve_ivp(fun = myRHS, t_span = [0,endtime], y0 = u,method = "BDF", t_eval = timesteps) return uSim def makeRealSpace(u,N): """Takes a completed simulation and finds the real space solution at all timesteps for a chosen subset of modes Parameters ---------- u : Numpy array (M,t) Output of simulation giving energy in first M positive modes for all timesteps t N : int Number of positive modes to use in real space Returns ------- x : Numpy vector (2xN,1) x-grid for plotting purposes uReal : Numpy array (2xN,t) Real space solution at all times """ # identify shapes of arrays uShape = u.shape numTimes = uShape[1] # drop modes we don't wish to keep uNew = u[0:N,:] # generate full vector (with negative modes) uFull = np.zeros((2*N,numTimes)) + 1j*0 uFull[0:N,:] = uNew uFull[2*N-N+1:,:] = np.conj(np.flip(uNew[1:,:],0)) # initialize output uReal = np.zeros(uFull.shape) # take inverse transform for each timestep # NOTE: is there a vectorized way to do this? for i in np.arange(0,numTimes): uReal[:,i] = ifftnorm(uFull[:,i]) return uReal def makeAnimations(uList,t,legendList): """ Creates an animation from a list of simulations Parameters ---------- uList : List of Numpy arrays of size (N,T) Set of state vector evolutions to animate t : Numpy array (T,) Timesteps associated with simulations (must all be the same) legendList : List of strings Labels for each simulation Returns ------- anim : animation object output from animation.FuncAnimation """ # identify the resolution to use for plots and generate x grid N = min([x.shape[0] for x in uList]) xgrid = np.linspace(0,2*np.pi*(2*N-1)/(2*N),2*N) # generate real space solutions realSols = [makeRealSpace(x,N) for x in uList] # initialize figure myFig = plt.figure() ax = plt.subplot() ax.axis(xmin = 0,xmax = 2*np.pi-np.pi/N,ymin = -2, ymax = 4) # create empty list of lines to populate each iteration lineList = [ax.plot([],[]) for i in range(len(uList))] # define function to draw each frame def makeFrame(n): for i in range(len(uList)): lineList[i][0].set_data(xgrid,realSols[i][:,n]) plt.title('t = '+str(round(t[n],1))) plt.legend(legendList, loc = "upper right") return lineList # generate animation anim = animation.FuncAnimation(fig = myFig,func = makeFrame,frames = t.shape[0]) return anim def renormalize(fullM, endtime, Nlist, Mlist, epsilon, alpha, tau, timesteps, IC = np.sin, plots = False): """ Finds renormalization coefficients based on a single simulation. If the simulation doesn't yet exist, it creates it Parameters ---------- fullM : int Size of full simulation to base fits on endtime : int Endtime of full simulation Nlist : list of ints List of resolutions for which to find coefficients Mlist : list of ints List of intermediary "full" simulations to use for ROMs epsilon : float size of linear term (stiffness) alpha : float degree of nonlinearity in KdV tau : float time decay modifier timesteps : Numpy array specific timesteps for which to save solution IC : function handle initial condition of simulation (default np.sin) plots : boolean Indicates whether to generate plots (default: False) Returns ------- coeeffsArray1 : Numpy array (length(Nlist),1) Renormalization coefficients for t-model only coeffsArray2 : Numpy array (length(Nlist),2) Renormalization coefficients for t-model and t2-model only coeffsArray3 : Numpy array (length(Nlist),3) Renormalization coefficients for t1-t3-models coeffsArray4 : Numpy array (length(Nlist),4) Renormalization coefficients for t1-t4-models coeffsArray2only : Numpy array (length(Nlist),1) Renormalization coefficients for t2-model only coeffsArray24only : Numpy array (length(Nlist),2) Renormalization coefficients for t2-model and t4-model only fitLines : Dict Contains scaling law fits for each ROM coefficients of form c = -b * N^a Terms given are a, b, and r (correlation coefficient of fit) err : Dict Contains least-squares error for each fit for each model and resolution """ # Check if full simulation has already been constructed # if so, load it, if not, generate it try: uFull = np.load("u" + str(fullM) + "t" + str(endtime)+"e"+str(round(epsilon,2)).replace('.','p')+".npy") tFull = np.load("t" + str(fullM) + "t" + str(endtime)+"e"+str(round(epsilon,2)).replace('.','p')+".npy") except: fullParams = { 'N': fullM, 'M': int(3/2*fullM), 'alpha': 1, 'epsilon': epsilon, 'tau': 1, 'coeffs': None, 'IC': IC, 'endtime': endtime, 'timesteps': timesteps } uSimFull = runSim(fullParams) uFull = uSimFull.y tFull = uSimFull.t np.save( "u" + str(fullM) + "t" + str(endtime)+"e"+str(round(epsilon,2)).replace('.','p'),uFull) np.save( "t" + str(fullM) + "t" + str(endtime)+"e"+str(round(epsilon,2)).replace('.','p'),tFull) # initialize output arrays coeffsArray1 = np.zeros((Nlist.shape[0],1)) coeffsArray2 = np.zeros((Nlist.shape[0],2)) coeffsArray3 = np.zeros((Nlist.shape[0],3)) coeffsArray4 = np.zeros((Nlist.shape[0],4)) coeffsArray2only = np.zeros((Nlist.shape[0],1)) coeffsArray24only = np.zeros((Nlist.shape[0],2)) # recover number of timesteps numSteps = tFull.shape[0] # initialize least squares error output err = {"t-model" : np.zeros((Nlist.shape[0],1)), "t2-model" : np.zeros((Nlist.shape[0],1)), "t3-model" : np.zeros((Nlist.shape[0],1)), "t4-model" : np.zeros((Nlist.shape[0],1)), "t2-model only" : np.zeros((Nlist.shape[0],1)), "t2- and t4-models" : np.zeros((Nlist.shape[0],1))} # loop through all resolutions for j in np.arange(0,Nlist.shape[0]): # Find number of positive terms in ROM, in intermediate calculations, and wavenumber array N = Nlist[j] M = Mlist[j] k = np.concatenate([np.arange(0,M),np.arange(-M,0)]) # Gather first derivative data for fitting purposes exactEnergy = np.zeros((N,numSteps)) R0Energy = np.zeros((N,numSteps)) R1Energy = np.zeros((N,numSteps)) R2Energy = np.zeros((N,numSteps)) R3Energy = np.zeros((N,numSteps)) R4Energy = np.zeros((N,numSteps)) # plug exact solution into exact RHS and all ROM terms and find energy contribution of each for i in np.arange(0,numSteps): # exact RHS exactRHS,dummyU = markovKdV(uFull[:,i],int(fullM*3/2),alpha) exactEnergy[:,i] = np.real(exactRHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(exactRHS[0:N])*uFull[0:N,i]) # Markov RHS nonlin0,u_full = markovKdV(uFull[0:N,i],M,alpha) R0RHS = nonlin0 R0Energy[:,i] = np.real(R0RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R0RHS[0:N])*uFull[0:N,i]) # First order RHS term F_modes = np.concatenate([np.arange(0,N),np.arange(2*N-1,M+N+2),np.arange(2*M-N+1,2*M)]) G_modes = np.arange(N,2*M-N+1) nonlin1,uuStar = tModelKdV(u_full,nonlin0,alpha,F_modes) R1RHS = nonlin1*tFull[i]**(1-tau) R1Energy[:,i] = np.real(R1RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R1RHS[0:N])*uFull[0:N,i]) # Second order RHS term nonlin2,uk3,uu,A,AStar,B,BStar,C,CStar,D,DStar = t2ModelKdV(u_full,nonlin0,uuStar,alpha,F_modes,G_modes,k,epsilon) R2RHS = nonlin2*tFull[i]**(2*(1-tau)) R2Energy[:,i] = np.real(R2RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R2RHS[0:N])*uFull[0:N,i]) # Third order RHS term nonlin3,uk6,E,EStar,F,FStar = t3ModelKdV(alpha,F_modes,G_modes,k,epsilon,u_full,uu,uuStar,uk3,A,AStar,B,BStar,C,CStar,DStar) R3RHS = nonlin3*tFull[i]**(3*(1-tau)) R3Energy[:,i] = np.real(R3RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R3RHS[0:N])*uFull[0:N,i]) # Fourth order RHS term nonlin4 = t4ModelKdV(alpha,F_modes,G_modes,k,epsilon,u_full,uu,uuStar,uk3,uk6,A,AStar,B,BStar,C,CStar,D,DStar,E,EStar,F,FStar) R4RHS = nonlin4*tFull[i]**(4*(1-tau)) R4Energy[:,i] = np.real(R4RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R4RHS[0:N])*uFull[0:N,i]) if j == 0: R0Energy0 = np.copy(R0Energy) R1Energy0 = np.copy(R1Energy) R2Energy0 = np.copy(R2Energy) R3Energy0 = np.copy(R3Energy) R4Energy0 = np.copy(R4Energy) ################################################## # Use least-squares fit to identify coefficients # ################################################## # t-model coefficient coeffsArray1[j,:] = np.sum((exactEnergy - R0Energy)*R1Energy)/np.sum(R1Energy*R1Energy) err["t-model"][j] = np.sum((exactEnergy - R0Energy - coeffsArray1[j,0]*R1Energy)**2) # t2-model coefficient LSMatrix = (np.array([[np.sum(R1Energy*R1Energy),np.sum(R1Energy*R2Energy)], [np.sum(R2Energy*R1Energy),np.sum(R2Energy*R2Energy)]])) LSb = (np.array([np.sum(R1Energy*(exactEnergy-R0Energy)),np.sum(R2Energy*(exactEnergy-R0Energy))])) coeffsArray2[j,:] = np.linalg.solve(LSMatrix,LSb) err["t2-model"][j] = np.sum((exactEnergy - R0Energy - coeffsArray2[j,0]*R1Energy - coeffsArray2[j,1]*R2Energy)**2) # t3-model coefficient LSMatrix = (np.array([[np.sum(R1Energy*R1Energy),np.sum(R1Energy*R2Energy),np.sum(R1Energy*R3Energy)], [np.sum(R2Energy*R1Energy),np.sum(R2Energy*R2Energy),np.sum(R2Energy*R3Energy)], [np.sum(R3Energy*R1Energy),np.sum(R3Energy*R2Energy),np.sum(R3Energy*R3Energy)]])) LSb = (np.array([np.sum(R1Energy*(exactEnergy-R0Energy)),np.sum(R2Energy*(exactEnergy-R0Energy)),np.sum(R3Energy*(exactEnergy-R0Energy))])) coeffsArray3[j,:] = np.linalg.solve(LSMatrix,LSb) err["t3-model"][j] = np.sum((exactEnergy - R0Energy - coeffsArray3[j,0]*R1Energy - coeffsArray3[j,1]*R2Energy - coeffsArray3[j,2]*R3Energy)**2) # t4-model coefficient LSMatrix = (np.array([[np.sum(R1Energy*R1Energy),np.sum(R1Energy*R2Energy),np.sum(R1Energy*R3Energy),np.sum(R1Energy*R4Energy)], [np.sum(R2Energy*R1Energy),np.sum(R2Energy*R2Energy),np.sum(R2Energy*R3Energy),np.sum(R2Energy*R4Energy)], [np.sum(R3Energy*R1Energy),np.sum(R3Energy*R2Energy),np.sum(R3Energy*R3Energy),np.sum(R3Energy*R4Energy)], [np.sum(R4Energy*R1Energy),np.sum(R4Energy*R2Energy),np.sum(R4Energy*R3Energy),np.sum(R4Energy*R4Energy)]])) LSb = (np.array([np.sum(R1Energy*(exactEnergy-R0Energy)),np.sum(R2Energy*(exactEnergy-R0Energy)),np.sum(R3Energy*(exactEnergy-R0Energy)),np.sum(R4Energy*(exactEnergy-R0Energy))])) coeffsArray4[j,:] = np.linalg.solve(LSMatrix,LSb) err["t4-model"][j] = np.sum((exactEnergy - R0Energy - coeffsArray4[j,0]*R1Energy - coeffsArray4[j,1]*R2Energy - coeffsArray4[j,2]*R3Energy - coeffsArray4[j,3]*R4Energy)**2) # t2-model with *no* t-model coeffsArray2only[j,:] = np.sum((exactEnergy - R0Energy)*R2Energy)/np.sum(R2Energy*R2Energy) err["t2-model only"][j] = np.sum((exactEnergy - R0Energy - coeffsArray2only[j,0]*R2Energy)**2) # t2-model and t4-model with *no* t-model or t3-model LSMatrix = (np.array([[np.sum(R2Energy*R2Energy),np.sum(R2Energy*R4Energy)], [np.sum(R4Energy*R2Energy),np.sum(R4Energy*R4Energy)]])) LSb = (np.array([np.sum(R2Energy*(exactEnergy-R0Energy)),np.sum(R4Energy*(exactEnergy-R0Energy))])) coeffsArray24only[j,:] = np.linalg.solve(LSMatrix,LSb) err["t2- and t4-models"][j] = np.sum((exactEnergy - R0Energy - coeffsArray24only[j,0]*R2Energy - coeffsArray24only[j,1]*R4Energy)**2) # Generate plots if desired if plots: # Plot 1: Qualitative comparison of each term contributing to energy movement N = Nlist[0] fig1, ax1 = plt.subplots(3,2) ax1[0,0].plot(tFull,np.sum(exactEnergy[0:N,:],0)) ax1[0,0].set_title("Exact Energy Decay") ax1[0,1].plot(tFull,np.sum(R0Energy0[0:N,:],0)) ax1[0,1].set_title("Markov Energy Decay") ax1[1,0].plot(tFull,np.sum(R2Energy0[0:N,:],0)) ax1[1,0].set_title("R2 Energy Decay") ax1[1,1].plot(tFull,np.sum(R1Energy0[0:N,:],0)) ax1[1,1].set_title("R1 Energy Decay") ax1[2,0].plot(tFull,np.sum(R4Energy0[0:N,:],0)) ax1[2,0].set_title("R4 Energy Decay") ax1[2,1].plot(tFull,np.sum(R3Energy0[0:N,:],0)) ax1[2,1].set_title("R3 Energy Decay") fig1.suptitle("N = "+str(N)+" Energy Decays") plt.tight_layout() # remove axis labels to not crowd plots (since only qualitative comparisons desired) for i in range(0,3): for j in range(0,2): #ax1[i,j].tick_params(labelbottom=False,labelleft=False) ax1[i,j].tick_params(labelleft=False) # compute best fit lines for coefficients in log-log space fitLines = {"t-model" : np.zeros((1,3)), "t2-model" : np.zeros((2,3)), "t3-model" : np.zeros((3,3)), "t4-model" : np.zeros((4,3)), "t2-model only" : np.zeros((1,3)), "t2- and t4-models" : np.zeros((2,3))} fig2, ax2 = plt.subplots(2,2) # t-model ax2[0,0].scatter(np.log(Nlist),np.log(abs(coeffsArray1[:,0]))) slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray1[:,0]))) ax2[0,0].plot(np.log(Nlist),intercept + slope*np.log(Nlist)) fitLines["t-model"][:] = np.array([slope,np.exp(intercept),r_value]) # t2-model ax2[0,0].scatter(np.log(Nlist),np.log(abs(coeffsArray2[:,0])),color="red") slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray2[:,0]))) ax2[0,0].plot(np.log(Nlist),intercept + slope*np.log(Nlist), color = "red") fitLines["t2-model"][0,:] = np.array([slope,np.exp(intercept),r_value]) ax2[0,1].scatter(np.log(Nlist),np.log(abs(coeffsArray2[:,1])),color="red") slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray2[:,1]))) ax2[0,1].plot(np.log(Nlist),intercept + slope*np.log(Nlist), color = "red") fitLines["t2-model"][1,:] = np.array([slope,np.exp(intercept),r_value]) # t3-model ax2[0,0].scatter(np.log(Nlist),np.log(abs(coeffsArray3[:,0])),color="green") slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray3[:,0]))) ax2[0,0].plot(np.log(Nlist),intercept + slope*np.log(Nlist), color = "green") fitLines["t3-model"][0,:] = np.array([slope,np.exp(intercept),r_value]) ax2[0,1].scatter(np.log(Nlist),np.log(abs(coeffsArray3[:,1])),color="green") slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray3[:,1]))) ax2[0,1].plot(np.log(Nlist),intercept + slope*np.log(Nlist), color = "green") fitLines["t3-model"][1,:] = np.array([slope,np.exp(intercept),r_value]) ax2[1,0].scatter(np.log(Nlist),np.log(abs(coeffsArray3[:,2])),color="green") slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray3[:,2]))) ax2[1,0].plot(np.log(Nlist),intercept + slope*np.log(Nlist), color = "green") fitLines["t3-model"][2,:] = np.array([slope,np.exp(intercept),r_value]) # t4-model ax2[0,0].scatter(np.log(Nlist),np.log(abs(coeffsArray4[:,0])),color="purple") slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray4[:,0]))) ax2[0,0].plot(np.log(Nlist),intercept + slope*np.log(Nlist), color = "purple") fitLines["t4-model"][0,:] = np.array([slope,np.exp(intercept),r_value]) ax2[0,1].scatter(np.log(Nlist),np.log(abs(coeffsArray4[:,1])),color="purple") slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray4[:,1]))) ax2[0,1].plot(np.log(Nlist),intercept + slope*np.log(Nlist), color = "purple") fitLines["t4-model"][1,:] = np.array([slope,np.exp(intercept),r_value]) ax2[1,0].scatter(np.log(Nlist),np.log(abs(coeffsArray4[:,2])),color="purple") slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray4[:,2]))) ax2[1,0].plot(np.log(Nlist),intercept + slope*np.log(Nlist), color = "purple") fitLines["t4-model"][2,:] = np.array([slope,np.exp(intercept),r_value]) ax2[1,1].scatter(np.log(Nlist),np.log(abs(coeffsArray4[:,3])),color="purple") slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray4[:,3]))) ax2[1,1].plot(np.log(Nlist),intercept + slope*np.log(Nlist), color = "purple") fitLines["t4-model"][3,:] = np.array([slope,np.exp(intercept),r_value]) # t2-model alone ax2[0,1].scatter(np.log(Nlist),np.log(abs(coeffsArray2only[:,0])),color="cyan") slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray2only[:,0]))) ax2[0,1].plot(np.log(Nlist),intercept + slope*np.log(Nlist), color = "cyan") fitLines["t2-model only"][:] = np.array([slope,np.exp(intercept),r_value]) # t2- and t4-model alone ax2[0,1].scatter(np.log(Nlist),np.log(abs(coeffsArray24only[:,0])),color="black") slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray24only[:,0]))) ax2[0,1].plot(np.log(Nlist),intercept + slope*np.log(Nlist), color = "black") fitLines["t2- and t4-models"][0,:] = np.array([slope,np.exp(intercept),r_value]) ax2[1,1].scatter(np.log(Nlist),np.log(abs(coeffsArray24only[:,1])),color="black") slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray24only[:,1]))) ax2[1,1].plot(np.log(Nlist),intercept + slope*np.log(Nlist), color = "black") fitLines["t2- and t4-models"][1,:] = np.array([slope,np.exp(intercept),r_value]) ax2[0,0].set_title("t-model") ax2[0,1].set_title("t2-model") ax2[1,0].set_title("t3-model") ax2[1,1].set_title("t4-model") customLines = [plt.Line2D([0],[0], color = "blue"), plt.Line2D([0],[0], color = "red"), plt.Line2D([0],[0], color = "green"), plt.Line2D([0],[0], color = "purple"), plt.Line2D([0],[0], color = "cyan"), plt.Line2D([0],[0], color = "black")] ax2[0,1].legend(customLines,["First Order Model","Second Order Model", "Third Order Model","Fourth Order Model", "Only Second Order","Second and Fourth Order"], prop = {"size":5}) fig2.suptitle("Renormalization Coefficients (log(a) vs log(N))") plt.subplots_adjust(right=0.7) plt.tight_layout() # calculate best fit lines if plotting didn't occur else: fitLines = {"t-model" : np.zeros((1,3)), "t2-model" : np.zeros((2,3)), "t3-model" : np.zeros((3,3)), "t4-model" : np.zeros((4,3)), "t2-model only" : np.zeros((1,3)), "t2- and t4-models" : np.zeros((2,3))} # t-model slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray1[:,0]))) fitLines["t-model"][:] = np.array([slope,np.exp(intercept),r_value]) # second order ROM slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray2[:,0]))) fitLines["t2-model"][0,:] = np.array([slope,np.exp(intercept),r_value]) slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray2[:,1]))) fitLines["t2-model"][1,:] = np.array([slope,np.exp(intercept),r_value]) # third order ROM slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray3[:,0]))) fitLines["t3-model"][0,:] = np.array([slope,np.exp(intercept),r_value]) slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray3[:,1]))) fitLines["t3-model"][1,:] = np.array([slope,np.exp(intercept),r_value]) slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray3[:,2]))) fitLines["t3-model"][2,:] = np.array([slope,np.exp(intercept),r_value]) # fourth order ROM slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray4[:,0]))) fitLines["t4-model"][0,:] = np.array([slope,np.exp(intercept),r_value]) slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray4[:,1]))) fitLines["t4-model"][1,:] = np.array([slope,np.exp(intercept),r_value]) slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray4[:,2]))) fitLines["t4-model"][2,:] = np.array([slope,np.exp(intercept),r_value]) slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray4[:,3]))) fitLines["t4-model"][3,:] = np.array([slope,np.exp(intercept),r_value]) # only t2-model slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray2only[:,0]))) fitLines["t2-model only"][:] = np.array([slope,np.exp(intercept),r_value]) # only t2- and t4-models slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray24only[:,0]))) fitLines["t2- and t4-models"][0,:] = np.array([slope,np.exp(intercept),r_value]) slope,intercept,r_value,p_value,std_err = sp.stats.linregress(np.log(Nlist), np.log(abs(coeffsArray24only[:,1]))) fitLines["t2- and t4-models"][1,:] = np.array([slope,np.exp(intercept),r_value]) return coeffsArray1,coeffsArray2,coeffsArray3,coeffsArray4,coeffsArray2only,coeffsArray24only,fitLines,err def scalingLaws(fullM, endtime, Nlist, Mlist, epsilonList, alpha, tau, timesteps, IC = np.sin, plots = False): """ Finds renormalization coefficients based on a simulations with a range of epsilon values. Parameters ---------- fullM : int Size of full simulation to base fits on endtime : int Endtime of full simulation Nlist : list of ints List of resolutions for which to find coefficients Mlist : list of ints List of intermediary "full" simulations to use for ROMs epsilonList : list of floats size of linear term (stiffness) alpha : float degree of nonlinearity in KdV tau : float time decay modifier timesteps : Numpy array specific timesteps for which to save solution IC : function handle initial condition of simulation (default np.sin) plots : boolean Indicates whether to generate plots (default: False) Returns ------- coeeffsArray1 : Numpy array (length(Nlist),1) Renormalization coefficients for t-model only coeffsArray2 : Numpy array (length(Nlist),2) Renormalization coefficients for t-model and t2-model only coeffsArray3 : Numpy array (length(Nlist),3) Renormalization coefficients for t1-t3-models coeffsArray4 : Numpy array (length(Nlist),4) Renormalization coefficients for t1-t4-models coeffsArray2only : Numpy array (length(Nlist),1) Renormalization coefficients for t2-model only coeffsArray24only : Numpy array (length(Nlist),2) Renormalization coefficients for t2-model and t4-model only fitLines : Dict Contains scaling law fits for each ROM coefficients of form c = -b * N^a Terms given are a, b, and r (correlation coefficient of fit) """ # initialize output arrays c1 = np.zeros((len(Nlist),1,len(epsilonList))) c2 = np.zeros((len(Nlist),2,len(epsilonList))) c3 = np.zeros((len(Nlist),3,len(epsilonList))) c4 = np.zeros((len(Nlist),4,len(epsilonList))) c2only = np.zeros((len(Nlist),1,len(epsilonList))) c24only = np.zeros((len(Nlist),2,len(epsilonList))) # loop through all epsilon values for i in np.arange(0,len(epsilonList)): # renormalize for given epsilon value and save results coeffsArray1,coeffsArray2,coeffsArray3,coeffsArray4,coeffsArray2only,coeffsArray24only,fitLines,err = renormalize(fullM = fullM, endtime = endtime, Nlist = Nlist, Mlist = Mlist, epsilon = epsilonList[i], alpha = alpha, tau = tau, timesteps = timesteps, IC = IC, plots = False) c1[:,:,i] = coeffsArray1 c2[:,:,i] = coeffsArray2 c3[:,:,i] = coeffsArray3 c4[:,:,i] = coeffsArray4 c2only[:,:,i] = coeffsArray2only c24only[:,:,i] = coeffsArray24only # pack results into dictionary for output coefficients = {"t-model" : c1, "t2-model" : c2, "t3-model" : c3, "t4-model" : c4, "t2-model only" : c2only, "t2- and t4-models" : c24only} # initialize output with best fit scaling laws fitLines = {"t-model" : np.zeros((1,3)), "t2-model" : np.zeros((2,3)), "t3-model" : np.zeros((3,3)), "t4-model" : np.zeros((4,3)), "t2-model only" : np.zeros((1,3)), "t2- and t4-models" : np.zeros((2,3))} # find the scaling laws for each coefficient # t-model coefficient fitLines["t-model"][0,:] = epsilonNscalingLaw(c1[:,0,:],Nlist,epsilonList) # Second order model coefficients fitLines["t2-model"][0,:] = epsilonNscalingLaw(c2[:,0,:],Nlist,epsilonList) fitLines["t2-model"][1,:] = epsilonNscalingLaw(c2[:,1,:],Nlist,epsilonList) # Third order model coefficients fitLines["t3-model"][0,:] = epsilonNscalingLaw(c3[:,0,:],Nlist,epsilonList) fitLines["t3-model"][1,:] = epsilonNscalingLaw(c3[:,1,:],Nlist,epsilonList) fitLines["t3-model"][2,:] = epsilonNscalingLaw(c3[:,2,:],Nlist,epsilonList) # Fourth order model coefficients fitLines["t4-model"][0,:] = epsilonNscalingLaw(c4[:,0,:],Nlist,epsilonList) fitLines["t4-model"][1,:] = epsilonNscalingLaw(c4[:,1,:],Nlist,epsilonList) fitLines["t4-model"][2,:] = epsilonNscalingLaw(c4[:,2,:],Nlist,epsilonList) fitLines["t4-model"][3,:] = epsilonNscalingLaw(c4[:,3,:],Nlist,epsilonList) # Only t2-model coefficient fitLines["t2-model only"][0,:] = epsilonNscalingLaw(c2only[:,0,:],Nlist,epsilonList) # Only t2- and t4-models coefficients fitLines["t2- and t4-models"][0,:] = epsilonNscalingLaw(c24only[:,0,:],Nlist,epsilonList) fitLines["t2- and t4-models"][1,:] = epsilonNscalingLaw(c24only[:,1,:],Nlist,epsilonList) # make plots fig1,ax1 = plt.subplots(1,2) fig2,ax2 = plt.subplots(2,2) fig3,ax3 = plt.subplots(3,2) fig4,ax4 = plt.subplots(4,2) fig5,ax5 = plt.subplots(1,2) fig6,ax6 = plt.subplots(2,2) # loop through epsilon values for i in np.arange(len(epsilonList)): # t-model coefficient ax1[0].scatter(np.log(Nlist),np.log(-c1[:,0,i])) # Second order model coefficients ax2[0,0].scatter(np.log(Nlist),np.log(-c2[:,0,i])) ax2[1,0].scatter(np.log(Nlist),np.log(-c2[:,1,i])) # Third order model coefficients ax3[0,0].scatter(np.log(Nlist),np.log(-c3[:,0,i])) ax3[1,0].scatter(np.log(Nlist),np.log(-c3[:,1,i])) ax3[2,0].scatter(np.log(Nlist),np.log(-c3[:,2,i])) # Fourth order model coefficients ax4[0,0].scatter(np.log(Nlist),np.log(-c4[:,0,i])) ax4[1,0].scatter(np.log(Nlist),np.log(-c4[:,1,i])) ax4[2,0].scatter(np.log(Nlist),np.log(-c4[:,2,i])) ax4[3,0].scatter(np.log(Nlist),np.log(-c4[:,3,i])) # Only t2-model ax5[0].scatter(np.log(Nlist),np.log(-c2only[:,0,i])) # Only t2- and t4-models ax6[0,0].scatter(np.log(Nlist),np.log(-c24only[:,0,i])) ax6[1,0].scatter(np.log(Nlist),np.log(-c24only[:,1,i])) # plot best fit lines myEps = epsilonList[i] myFit = fitLines["t-model"][0,:] ax1[0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) myFit = fitLines["t2-model"][0,:] ax2[0,0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) myFit = fitLines["t2-model"][1,:] ax2[1,0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) myFit = fitLines["t3-model"][0,:] ax3[0,0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) myFit = fitLines["t3-model"][1,:] ax3[1,0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) myFit = fitLines["t3-model"][2,:] ax3[2,0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) myFit = fitLines["t4-model"][0,:] ax4[0,0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) myFit = fitLines["t4-model"][1,:] ax4[1,0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) myFit = fitLines["t4-model"][2,:] ax4[2,0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) myFit = fitLines["t4-model"][3,:] ax4[3,0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) myFit = fitLines["t2-model only"][0,:] ax5[0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) myFit = fitLines["t2- and t4-models"][0,:] ax6[0,0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) myFit = fitLines["t2- and t4-models"][1,:] ax6[1,0].plot(np.log(Nlist),np.log(-myFit[0])+myFit[1]*np.log(Nlist)+myFit[2]*np.log(myEps)) # loop through epsilon values for j in np.arange(len(Nlist)): # t-model coefficient ax1[1].scatter(np.log(epsilonList),np.log(-c1[j,0,:])) # Second order model coefficients ax2[0,1].scatter(np.log(epsilonList),np.log(-c2[j,0,:])) ax2[1,1].scatter(np.log(epsilonList),np.log(-c2[j,1,:])) # Third order model coefficients ax3[0,1].scatter(np.log(epsilonList),np.log(-c3[j,0,:])) ax3[1,1].scatter(np.log(epsilonList),np.log(-c3[j,1,:])) ax3[2,1].scatter(np.log(epsilonList),np.log(-c3[j,2,:])) # Fourth order model coefficients ax4[0,1].scatter(np.log(epsilonList),np.log(-c4[j,0,:])) ax4[1,1].scatter(np.log(epsilonList),np.log(-c4[j,1,:])) ax4[2,1].scatter(np.log(epsilonList),np.log(-c4[j,2,:])) ax4[3,1].scatter(np.log(epsilonList),np.log(-c4[j,3,:])) # Only t2-model ax5[1].scatter(np.log(epsilonList),np.log(-c2only[j,0,:])) # Only t2- and t4-models ax6[0,1].scatter(np.log(epsilonList),np.log(-c24only[j,0,:])) ax6[1,1].scatter(np.log(epsilonList),np.log(-c24only[j,1,:])) # plot best fit lines myN = Nlist[j] myFit = fitLines["t-model"][0,:] ax1[1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) myFit = fitLines["t2-model"][0,:] ax2[0,1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) myFit = fitLines["t2-model"][1,:] ax2[1,1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) myFit = fitLines["t3-model"][0,:] ax3[0,1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) myFit = fitLines["t3-model"][1,:] ax3[1,1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) myFit = fitLines["t3-model"][2,:] ax3[2,1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) myFit = fitLines["t4-model"][0,:] ax4[0,1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) myFit = fitLines["t4-model"][1,:] ax4[1,1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) myFit = fitLines["t4-model"][2,:] ax4[2,1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) myFit = fitLines["t4-model"][3,:] ax4[3,1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) myFit = fitLines["t2-model only"][0,:] ax5[1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) myFit = fitLines["t2- and t4-models"][0,:] ax6[0,1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) myFit = fitLines["t2- and t4-models"][1,:] ax6[1,1].plot(np.log(epsilonList),np.log(-myFit[0])+myFit[1]*np.log(myN)+myFit[2]*np.log(epsilonList)) # label all plots fig1.suptitle("t-model") ax1[0].set_title("log(a1) vs log(N)") ax1[0].legend(["epsilon = "+str(round(epsilonList[i]),2) for i in range(len(epsilonList))],prop = {"size":5}) ax1[1].set_title("log(a1) vs log(epsilon)") ax1[1].legend(["N = "+str(Nlist[i]) for i in range(len(Nlist))],prop = {"size":5}) plt.tight_layout() fig2.suptitle("Second Order Renormalization") ax2[0,0].set_title("log(a1) vs log(N)") ax2[1,0].set_title("log(a2) vs log(N)") ax2[0,0].legend(["epsilon = "+str(round(epsilonList[i]),2) for i in range(len(epsilonList))],prop = {"size":5}) ax2[0,1].set_title("log(a1) vs log(epsilon)") ax2[1,1].set_title("log(a1) vs log(epsilon)") ax2[0,1].legend(["N = "+str(Nlist[i]) for i in range(len(Nlist))],prop = {"size":5}) plt.tight_layout() fig3.suptitle("Third Order Renormalization") ax3[0,0].set_title("log(a1) vs log(N)") ax3[1,0].set_title("log(a2) vs log(N)") ax3[2,0].set_title("log(a3) vs log(N)") ax3[0,0].legend(["epsilon = "+str(round(epsilonList[i]),2) for i in range(len(epsilonList))],prop = {"size":5}) ax3[0,1].set_title("log(a1) vs log(epsilon)") ax3[1,1].set_title("log(a2) vs log(epsilon)") ax3[2,1].set_title("log(a3) vs log(epsilon)") ax3[0,1].legend(["N = "+str(Nlist[i]) for i in range(len(Nlist))],prop = {"size":5}) plt.tight_layout() fig4.suptitle("Fourth Order Renormalization") ax4[0,0].set_title("log(a1) vs log(N)") ax4[1,0].set_title("log(a2) vs log(N)") ax4[2,0].set_title("log(a3) vs log(N)") ax4[3,0].set_title("log(a4) vs log(N)") ax4[0,0].legend(["epsilon = "+str(round(epsilonList[i]),2) for i in range(len(epsilonList))],prop = {"size":5}) ax4[0,1].set_title("log(a1) vs log(epsilon)") ax4[1,1].set_title("log(a2) vs log(epsilon)") ax4[2,1].set_title("log(a3) vs log(epsilon)") ax4[3,1].set_title("log(a4) vs log(epsilon)") ax4[0,1].legend(["N = "+str(Nlist[i]) for i in range(len(Nlist))],prop = {"size":5}) plt.tight_layout() fig5.suptitle("Only t2-Model Renormalization") ax5[0].set_title("log(a2) vs log(N)") ax5[0].legend(["epsilon = "+str(round(epsilonList[i]),2) for i in range(len(epsilonList))],prop = {"size":5}) ax5[1].set_title("log(a2) vs log(epsilon)") ax5[1].legend(["N = "+str(Nlist[i]) for i in range(len(Nlist))],prop = {"size":5}) plt.tight_layout() fig6.suptitle("Second and Fourth Order Renormalization") ax6[0,0].set_title("log(a2) vs log(N)") ax6[1,0].set_title("log(a4) vs log(N)") ax6[0,0].legend(["epsilon = "+str(round(epsilonList[i]),2) for i in range(len(epsilonList))],prop = {"size":5}) ax6[0,1].set_title("log(a2) vs log(epsilon)") ax6[1,1].set_title("log(a4) vs log(epsilon)") ax6[0,1].legend(["N = "+str(Nlist[i]) for i in range(len(Nlist))],prop = {"size":5}) plt.tight_layout() return coefficients,fitLines def epsilonNscalingLaw(coeffArray,Nlist,epsilonList): numEps = len(epsilonList) numN = len(Nlist) epsilonTile = np.tile(epsilonList,(numN,1)) Ntile = np.transpose(np.tile(Nlist,(numEps,1))) LSMatrix = (np.array([[numEps*numN,np.sum(np.log(Ntile)),np.sum(np.log(epsilonTile))], [np.sum(np.log(Ntile)),np.sum(np.log(Ntile)**2),np.sum(np.log(Ntile)*np.log(epsilonTile))], [np.sum(np.log(epsilonTile)),np.sum(np.log(Ntile)*np.log(epsilonTile)),np.sum(np.log(epsilonTile)**2)]]) ) LSb = np.array([np.sum(np.log(np.abs(coeffArray))),np.sum(np.log(np.abs(coeffArray))*np.log(Ntile)),np.sum(np.log(np.abs(coeffArray))*np.log(epsilonTile))]) sol = np.linalg.solve(LSMatrix,LSb) sol[0] = -np.exp(sol[0]) return sol def findError(compareList,exact,t): """ Finds the two norm of the error between a list of ROMs and an exact solution. Parameters ---------- compareList : List of Numpy arrays of size (N,T) Set of state vector evolutions to find errors from exact : Numpy array of size (N,T) Exact solution for the same timesteps t : Numpy array (T,) Timesteps associated with simulations (must all be the same) Returns ------- errList : List of Numpy arrays of size (T,1) Arrays with the two-norm of the error at all timesteps for each ROM """ # find the ROM size N = compareList[0].shape[0] # generate real space solutions realSols = [makeRealSpace(x,N) for x in compareList] exactSol = makeRealSpace(exact,N) # compute two norm of error at all times errList =[np.sum((i - exactSol)**2,0) for i in realSols] return errList def renormalizeRobust(fullM, endtime, Nlist, Mlist, epsilon, alpha, tau, timesteps, IC = np.sin, plots = False): """ Finds renormalization coefficients based on a single simulation. If the simulation doesn't yet exist, it creates it Parameters ---------- fullM : int Size of full simulation to base fits on endtime : int Endtime of full simulation Nlist : list of ints List of resolutions for which to find coefficients Mlist : list of ints List of intermediary "full" simulations to use for ROMs epsilon : float size of linear term (stiffness) alpha : float degree of nonlinearity in KdV tau : float time decay modifier timesteps : Numpy array specific timesteps for which to save solution IC : function handle initial condition of simulation (default np.sin) plots : boolean Indicates whether to generate plots (default: False) Returns ------- coeeffsArray1 : Numpy array (length(Nlist),1) Renormalization coefficients for t-model only coeffsArray2 : Numpy array (length(Nlist),2) Renormalization coefficients for t-model and t2-model only coeffsArray3 : Numpy array (length(Nlist),3) Renormalization coefficients for t1-t3-models coeffsArray4 : Numpy array (length(Nlist),4) Renormalization coefficients for t1-t4-models coeffsArray2only : Numpy array (length(Nlist),1) Renormalization coefficients for t2-model only coeffsArray24only : Numpy array (length(Nlist),2) Renormalization coefficients for t2-model and t4-model only fitLines : Dict Contains scaling law fits for each ROM coefficients of form c = -b * N^a Terms given are a, b, and r (correlation coefficient of fit) """ # Check if full simulation has already been constructed # if so, load it, if not, generate it try: uFull = np.load("u" + str(fullM) + "t" + str(endtime)+"e"+str(round(epsilon,2)).replace('.','p')+IC.__name__+".npy") tFull = np.load("t" + str(fullM) + "t" + str(endtime)+"e"+str(round(epsilon,2)).replace('.','p')+IC.__name__+".npy") except: fullParams = { 'N': fullM, 'M': int(3/2*fullM), 'alpha': 1, 'epsilon': epsilon, 'tau': 1, 'coeffs': None, 'IC': IC, 'endtime': endtime, 'timesteps': timesteps } uSimFull = runSim(fullParams) uFull = uSimFull.y tFull = uSimFull.t np.save( "u" + str(fullM) + "t" + str(endtime)+"e"+str(round(epsilon,2)).replace('.','p')+IC.__name__,uFull) np.save( "t" + str(fullM) + "t" + str(endtime)+"e"+str(round(epsilon,2)).replace('.','p')+IC.__name__,tFull) # recover number of timesteps numSteps = tFull.shape[0] # initialize output arrays coeffsArray1 = np.zeros((Nlist.shape[0],numSteps - 30,1)) coeffsArray2 = np.zeros((Nlist.shape[0],numSteps - 30,2)) coeffsArray3 = np.zeros((Nlist.shape[0],numSteps - 30,3)) coeffsArray4 = np.zeros((Nlist.shape[0],numSteps - 30,4)) coeffsArray2only = np.zeros((Nlist.shape[0],numSteps - 30,1)) coeffsArray24only = np.zeros((Nlist.shape[0],numSteps - 30,2)) # loop through all resolutions for j in np.arange(0,Nlist.shape[0]): # Find number of positive terms in ROM, in intermediate calculations, and wavenumber array N = Nlist[j] M = Mlist[j] k = np.concatenate([np.arange(0,M),np.arange(-M,0)]) # Gather first derivative data for fitting purposes exactEnergy = np.zeros((N,numSteps)) R0Energy = np.zeros((N,numSteps)) R1Energy = np.zeros((N,numSteps)) R2Energy = np.zeros((N,numSteps)) R3Energy = np.zeros((N,numSteps)) R4Energy = np.zeros((N,numSteps)) # plug exact solution into exact RHS and all ROM terms and find energy contribution of each for i in np.arange(0,numSteps): # exact RHS exactRHS,dummyU = markovKdV(uFull[:,i],int(fullM*3/2),alpha) exactEnergy[:,i] = np.real(exactRHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(exactRHS[0:N])*uFull[0:N,i]) # Markov RHS nonlin0,u_full = markovKdV(uFull[0:N,i],M,alpha) R0RHS = nonlin0 R0Energy[:,i] = np.real(R0RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R0RHS[0:N])*uFull[0:N,i]) # First order RHS term F_modes = np.concatenate([np.arange(0,N),np.arange(2*N-1,M+N+2),np.arange(2*M-N+1,2*M)]) G_modes = np.arange(N,2*M-N+1) nonlin1,uuStar = tModelKdV(u_full,nonlin0,alpha,F_modes) R1RHS = nonlin1*tFull[i]**(1-tau) R1Energy[:,i] = np.real(R1RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R1RHS[0:N])*uFull[0:N,i]) # Second order RHS term nonlin2,uk3,uu,A,AStar,B,BStar,C,CStar,D,DStar = t2ModelKdV(u_full,nonlin0,uuStar,alpha,F_modes,G_modes,k,epsilon) R2RHS = nonlin2*tFull[i]**(2*(1-tau)) R2Energy[:,i] = np.real(R2RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R2RHS[0:N])*uFull[0:N,i]) # Third order RHS term nonlin3,uk6,E,EStar,F,FStar = t3ModelKdV(alpha,F_modes,G_modes,k,epsilon,u_full,uu,uuStar,uk3,A,AStar,B,BStar,C,CStar,DStar) R3RHS = nonlin3*tFull[i]**(3*(1-tau)) R3Energy[:,i] = np.real(R3RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R3RHS[0:N])*uFull[0:N,i]) # Fourth order RHS term nonlin4 = t4ModelKdV(alpha,F_modes,G_modes,k,epsilon,u_full,uu,uuStar,uk3,uk6,A,AStar,B,BStar,C,CStar,D,DStar,E,EStar,F,FStar) R4RHS = nonlin4*tFull[i]**(4*(1-tau)) R4Energy[:,i] = np.real(R4RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R4RHS[0:N])*uFull[0:N,i]) ################################################## # Use least-squares fit to identify coefficients # ################################################## for i in np.arange(30,numSteps): exactEnergySnip = exactEnergy[:,0:i] R0EnergySnip = R0Energy[:,0:i] R1EnergySnip = R1Energy[:,0:i] R2EnergySnip = R2Energy[:,0:i] R3EnergySnip = R3Energy[:,0:i] R4EnergySnip = R4Energy[:,0:i] # t-model coefficient coeffsArray1[j,i-30,:] = np.sum((exactEnergySnip - R0EnergySnip)*R1EnergySnip)/np.sum(R1EnergySnip*R1EnergySnip) # t2-model coefficient LSMatrix = (np.array([[np.sum(R1EnergySnip*R1EnergySnip),np.sum(R1EnergySnip*R2EnergySnip)], [np.sum(R2EnergySnip*R1EnergySnip),np.sum(R2EnergySnip*R2EnergySnip)]])) LSb = (np.array([np.sum(R1EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R2EnergySnip*(exactEnergySnip-R0EnergySnip))])) coeffsArray2[j,i-30,:] = np.linalg.solve(LSMatrix,LSb) # t3-model coefficient LSMatrix = (np.array([[np.sum(R1EnergySnip*R1EnergySnip),np.sum(R1EnergySnip*R2EnergySnip),np.sum(R1EnergySnip*R3EnergySnip)], [np.sum(R2EnergySnip*R1EnergySnip),np.sum(R2EnergySnip*R2EnergySnip),np.sum(R2EnergySnip*R3EnergySnip)], [np.sum(R3EnergySnip*R1EnergySnip),np.sum(R3EnergySnip*R2EnergySnip),np.sum(R3EnergySnip*R3EnergySnip)]])) LSb = (np.array([np.sum(R1EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R2EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R3EnergySnip*(exactEnergySnip-R0EnergySnip))])) coeffsArray3[j,i-30,:] = np.linalg.solve(LSMatrix,LSb) # t4-model coefficient LSMatrix = (np.array([[np.sum(R1EnergySnip*R1EnergySnip),np.sum(R1EnergySnip*R2EnergySnip),np.sum(R1EnergySnip*R3EnergySnip),np.sum(R1EnergySnip*R4EnergySnip)], [np.sum(R2EnergySnip*R1EnergySnip),np.sum(R2EnergySnip*R2EnergySnip),np.sum(R2EnergySnip*R3EnergySnip),np.sum(R2EnergySnip*R4EnergySnip)], [np.sum(R3EnergySnip*R1EnergySnip),np.sum(R3EnergySnip*R2EnergySnip),np.sum(R3EnergySnip*R3EnergySnip),np.sum(R3EnergySnip*R4EnergySnip)], [np.sum(R4EnergySnip*R1EnergySnip),np.sum(R4EnergySnip*R2EnergySnip),np.sum(R4EnergySnip*R3EnergySnip),np.sum(R4EnergySnip*R4EnergySnip)]])) LSb = (np.array([np.sum(R1EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R2EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R3EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R4EnergySnip*(exactEnergySnip-R0EnergySnip))])) coeffsArray4[j,i-30,:] = np.linalg.solve(LSMatrix,LSb) # t2-model with *no* t-model coeffsArray2only[j,i-30,:] = np.sum((exactEnergySnip - R0EnergySnip)*R2EnergySnip)/np.sum(R2EnergySnip*R2EnergySnip) # t2-model and t4-model with *no* t-model or t3-model LSMatrix = (np.array([[np.sum(R2EnergySnip*R2EnergySnip),np.sum(R2EnergySnip*R4EnergySnip)], [np.sum(R4EnergySnip*R2EnergySnip),np.sum(R4EnergySnip*R4EnergySnip)]])) LSb = (np.array([np.sum(R2EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R4EnergySnip*(exactEnergySnip-R0EnergySnip))])) coeffsArray24only[j,i-30,:] = np.linalg.solve(LSMatrix,LSb) for ind in np.arange(Nlist.shape[0]): fig1,ax1 = plt.subplots(2,2) fig1.suptitle("N = "+str(Nlist[ind])) ax1[0,0].plot(timesteps[30:],coeffsArray1[ind,:,0],color = "blue") ax1[0,0].plot(timesteps[30:],coeffsArray2[ind,:,0],color = "red") ax1[0,0].plot(timesteps[30:],coeffsArray3[ind,:,0],color = "green") ax1[0,0].plot(timesteps[30:],coeffsArray4[ind,:,0],color = "black") ax1[0,0].set_title("t-model") ax1[0,1].plot([],[],color = "blue") ax1[0,1].plot(timesteps[30:],coeffsArray2[ind,:,1], color = "red") ax1[0,1].plot(timesteps[30:],coeffsArray3[ind,:,1], color = "green") ax1[0,1].plot(timesteps[30:],coeffsArray4[ind,:,1], color = "black") ax1[0,1].plot(timesteps[30:],coeffsArray2only[ind,:,0],color = "cyan") ax1[0,1].plot(timesteps[30:],coeffsArray24only[ind,:,0], color = "magenta") ax1[0,1].set_title("t2-model") ax1[0,1].legend(["First order","Second order","Third order","Fourth order","Only t2","t2 and t4"],prop = {"size":5}) ax1[1,0].plot(timesteps[30:],coeffsArray3[ind,:,2], color = "green") ax1[1,0].plot(timesteps[30:],coeffsArray4[ind,:,2],color = "black") ax1[1,0].set_title("t3-model") ax1[1,1].plot(timesteps[30:],coeffsArray4[ind,:,3], color = "black") ax1[1,1].plot(timesteps[30:],coeffsArray24only[ind,:,1], color = "magenta") ax1[1,1].set_title("t4-model") plt.tight_layout() return coeffsArray1,coeffsArray2,coeffsArray3,coeffsArray4,coeffsArray2only,coeffsArray24only def renormalizeWindow(fullM, endtime, width, Nlist, Mlist, epsilon, alpha, tau, timesteps, IC = np.sin, plots = False): """ Finds renormalization coefficients using sliding window least squares. Parameters ---------- fullM : int Size of full simulation to base fits on endtime : int Endtime of full simulation width : float Size of sliding window to use in fitting Nlist : list of ints List of resolutions for which to find coefficients Mlist : list of ints List of intermediary "full" simulations to use for ROMs epsilon : float size of linear term (stiffness) alpha : float degree of nonlinearity in KdV tau : float time decay modifier timesteps : Numpy array specific timesteps for which to save solution IC : function handle initial condition of simulation (default np.sin) plots : boolean Indicates whether to generate plots (default: False) Returns ------- coeeffsArray1 : Numpy array (length(Nlist),1) Renormalization coefficients for t-model only coeffsArray2 : Numpy array (length(Nlist),2) Renormalization coefficients for t-model and t2-model only coeffsArray3 : Numpy array (length(Nlist),3) Renormalization coefficients for t1-t3-models coeffsArray4 : Numpy array (length(Nlist),4) Renormalization coefficients for t1-t4-models coeffsArray2only : Numpy array (length(Nlist),1) Renormalization coefficients for t2-model only coeffsArray24only : Numpy array (length(Nlist),2) Renormalization coefficients for t2-model and t4-model only fitLines : Dict Contains scaling law fits for each ROM coefficients of form c = -b * N^a Terms given are a, b, and r (correlation coefficient of fit) """ # Check if full simulation has already been constructed # if so, load it, if not, generate it try: uFull = np.load("u" + str(fullM) + "t" + str(endtime)+"e"+str(round(epsilon,2)).replace('.','p')+IC.__name__+".npy") tFull = np.load("t" + str(fullM) + "t" + str(endtime)+"e"+str(round(epsilon,2)).replace('.','p')+IC.__name__+".npy") except: fullParams = { 'N': fullM, 'M': int(3/2*fullM), 'alpha': 1, 'epsilon': epsilon, 'tau': 1, 'coeffs': None, 'IC': IC, 'endtime': endtime, 'timesteps': timesteps } uSimFull = runSim(fullParams) uFull = uSimFull.y tFull = uSimFull.t np.save( "u" + str(fullM) + "t" + str(endtime)+"e"+str(round(epsilon,2)).replace('.','p')+IC.__name__,uFull) np.save( "t" + str(fullM) + "t" + str(endtime)+"e"+str(round(epsilon,2)).replace('.','p')+IC.__name__,tFull) # recover number of timesteps numSteps = tFull.shape[0] widthSteps = round(width/(tFull[1]-tFull[0])) # initialize output arrays coeffsArray1 = np.zeros((Nlist.shape[0],numSteps - widthSteps+1,1)) coeffsArray2 = np.zeros((Nlist.shape[0],numSteps - widthSteps+1,2)) coeffsArray3 = np.zeros((Nlist.shape[0],numSteps - widthSteps+1,3)) coeffsArray4 = np.zeros((Nlist.shape[0],numSteps - widthSteps+1,4)) coeffsArray2only = np.zeros((Nlist.shape[0],numSteps - widthSteps+1,1)) coeffsArray24only = np.zeros((Nlist.shape[0],numSteps - widthSteps+1,2)) exact1 = np.zeros((Nlist.shape[0],1)) exact2 = np.zeros((Nlist.shape[0],2)) exact3 = np.zeros((Nlist.shape[0],3)) exact4 = np.zeros((Nlist.shape[0],4)) exact2o = np.zeros((Nlist.shape[0],1)) exact24o = np.zeros((Nlist.shape[0],2)) # loop through all resolutions for j in np.arange(0,Nlist.shape[0]): # Find number of positive terms in ROM, in intermediate calculations, and wavenumber array N = Nlist[j] M = Mlist[j] k = np.concatenate([np.arange(0,M),np.arange(-M,0)]) # Gather first derivative data for fitting purposes exactEnergy = np.zeros((N,numSteps)) R0Energy = np.zeros((N,numSteps)) R1Energy = np.zeros((N,numSteps)) R2Energy = np.zeros((N,numSteps)) R3Energy = np.zeros((N,numSteps)) R4Energy = np.zeros((N,numSteps)) # plug exact solution into exact RHS and all ROM terms and find energy contribution of each for i in np.arange(0,numSteps): # exact RHS exactRHS,dummyU = markovKdV(uFull[:,i],int(fullM*3/2),alpha) exactEnergy[:,i] = np.real(exactRHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(exactRHS[0:N])*uFull[0:N,i]) # Markov RHS nonlin0,u_full = markovKdV(uFull[0:N,i],M,alpha) R0RHS = nonlin0 R0Energy[:,i] = np.real(R0RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R0RHS[0:N])*uFull[0:N,i]) # First order RHS term F_modes = np.concatenate([np.arange(0,N),np.arange(2*N-1,M+N+2),np.arange(2*M-N+1,2*M)]) G_modes = np.arange(N,2*M-N+1) nonlin1,uuStar = tModelKdV(u_full,nonlin0,alpha,F_modes) if tFull[i] == 0: R1RHS = nonlin1*0 else: R1RHS = nonlin1*tFull[i]**(1-tau) R1Energy[:,i] = np.real(R1RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R1RHS[0:N])*uFull[0:N,i]) # Second order RHS term nonlin2,uk3,uu,A,AStar,B,BStar,C,CStar,D,DStar = t2ModelKdV(u_full,nonlin0,uuStar,alpha,F_modes,G_modes,k,epsilon) R2RHS = nonlin2*tFull[i]**(2*(1-tau)) R2Energy[:,i] = np.real(R2RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R2RHS[0:N])*uFull[0:N,i]) # Third order RHS term nonlin3,uk6,E,EStar,F,FStar = t3ModelKdV(alpha,F_modes,G_modes,k,epsilon,u_full,uu,uuStar,uk3,A,AStar,B,BStar,C,CStar,DStar) R3RHS = nonlin3*tFull[i]**(3*(1-tau)) R3Energy[:,i] = np.real(R3RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R3RHS[0:N])*uFull[0:N,i]) # Fourth order RHS term nonlin4 = t4ModelKdV(alpha,F_modes,G_modes,k,epsilon,u_full,uu,uuStar,uk3,uk6,A,AStar,B,BStar,C,CStar,D,DStar,E,EStar,F,FStar) R4RHS = nonlin4*tFull[i]**(4*(1-tau)) R4Energy[:,i] = np.real(R4RHS[0:N]*np.conj(uFull[0:N,i]) + np.conj(R4RHS[0:N])*uFull[0:N,i]) exact1[j,:] = np.sum((exactEnergy - R0Energy)*R1Energy)/np.sum(R1Energy*R1Energy) LSMatrix = (np.array([[np.sum(R1Energy*R1Energy),np.sum(R1Energy*R2Energy)], [np.sum(R2Energy*R1Energy),np.sum(R2Energy*R2Energy)]])) LSb = (np.array([np.sum(R1Energy*(exactEnergy-R0Energy)),np.sum(R2Energy*(exactEnergy-R0Energy))])) exact2[j,:] = np.linalg.solve(LSMatrix,LSb) LSMatrix = (np.array([[np.sum(R1Energy*R1Energy),np.sum(R1Energy*R2Energy),np.sum(R1Energy*R3Energy)], [np.sum(R2Energy*R1Energy),np.sum(R2Energy*R2Energy),np.sum(R2Energy*R3Energy)], [np.sum(R3Energy*R1Energy),np.sum(R3Energy*R2Energy),np.sum(R3Energy*R3Energy)]])) LSb = (np.array([np.sum(R1Energy*(exactEnergy-R0Energy)),np.sum(R2Energy*(exactEnergy-R0Energy)),np.sum(R3Energy*(exactEnergy-R0Energy))])) exact3[j,:] = np.linalg.solve(LSMatrix,LSb) LSMatrix = (np.array([[np.sum(R1Energy*R1Energy),np.sum(R1Energy*R2Energy),np.sum(R1Energy*R3Energy),np.sum(R1Energy*R4Energy)], [np.sum(R2Energy*R1Energy),np.sum(R2Energy*R2Energy),np.sum(R2Energy*R3Energy),np.sum(R2Energy*R4Energy)], [np.sum(R3Energy*R1Energy),np.sum(R3Energy*R2Energy),np.sum(R3Energy*R3Energy),np.sum(R3Energy*R4Energy)], [np.sum(R4Energy*R1Energy),np.sum(R4Energy*R2Energy),np.sum(R4Energy*R3Energy),np.sum(R4Energy*R4Energy)]])) LSb = (np.array([np.sum(R1Energy*(exactEnergy-R0Energy)),np.sum(R2Energy*(exactEnergy-R0Energy)),np.sum(R3Energy*(exactEnergy-R0Energy)),np.sum(R4Energy*(exactEnergy-R0Energy))])) exact4[j,:] = np.linalg.solve(LSMatrix,LSb) exact2o[j,:] = np.sum((exactEnergy - R0Energy)*R2Energy)/np.sum(R2Energy*R2Energy) LSMatrix = (np.array([[np.sum(R2Energy*R2Energy),np.sum(R2Energy*R4Energy)], [np.sum(R4Energy*R2Energy),np.sum(R4Energy*R4Energy)]])) LSb = (np.array([np.sum(R2Energy*(exactEnergy-R0Energy)),np.sum(R4Energy*(exactEnergy-R0Energy))])) exact24o[j,:] = np.linalg.solve(LSMatrix,LSb) ################################################## # Use least-squares fit to identify coefficients # ################################################## for i in np.arange(0,numSteps-widthSteps+1): exactEnergySnip = exactEnergy[:,i:i+widthSteps] R0EnergySnip = R0Energy[:,i:i+widthSteps] R1EnergySnip = R1Energy[:,i:i+widthSteps] R2EnergySnip = R2Energy[:,i:i+widthSteps] R3EnergySnip = R3Energy[:,i:i+widthSteps] R4EnergySnip = R4Energy[:,i:i+widthSteps] # t-model coefficient coeffsArray1[j,i,:] = np.sum((exactEnergySnip - R0EnergySnip)*R1EnergySnip)/np.sum(R1EnergySnip*R1EnergySnip) # t2-model coefficient LSMatrix = (np.array([[np.sum(R1EnergySnip*R1EnergySnip),np.sum(R1EnergySnip*R2EnergySnip)], [np.sum(R2EnergySnip*R1EnergySnip),np.sum(R2EnergySnip*R2EnergySnip)]])) LSb = (np.array([np.sum(R1EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R2EnergySnip*(exactEnergySnip-R0EnergySnip))])) coeffsArray2[j,i,:] = np.linalg.solve(LSMatrix,LSb) # t3-model coefficient LSMatrix = (np.array([[np.sum(R1EnergySnip*R1EnergySnip),np.sum(R1EnergySnip*R2EnergySnip),np.sum(R1EnergySnip*R3EnergySnip)], [np.sum(R2EnergySnip*R1EnergySnip),np.sum(R2EnergySnip*R2EnergySnip),np.sum(R2EnergySnip*R3EnergySnip)], [np.sum(R3EnergySnip*R1EnergySnip),np.sum(R3EnergySnip*R2EnergySnip),np.sum(R3EnergySnip*R3EnergySnip)]])) LSb = (np.array([np.sum(R1EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R2EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R3EnergySnip*(exactEnergySnip-R0EnergySnip))])) coeffsArray3[j,i,:] = np.linalg.solve(LSMatrix,LSb) # t4-model coefficient LSMatrix = (np.array([[np.sum(R1EnergySnip*R1EnergySnip),np.sum(R1EnergySnip*R2EnergySnip),np.sum(R1EnergySnip*R3EnergySnip),np.sum(R1EnergySnip*R4EnergySnip)], [np.sum(R2EnergySnip*R1EnergySnip),np.sum(R2EnergySnip*R2EnergySnip),np.sum(R2EnergySnip*R3EnergySnip),np.sum(R2EnergySnip*R4EnergySnip)], [np.sum(R3EnergySnip*R1EnergySnip),np.sum(R3EnergySnip*R2EnergySnip),np.sum(R3EnergySnip*R3EnergySnip),np.sum(R3EnergySnip*R4EnergySnip)], [np.sum(R4EnergySnip*R1EnergySnip),np.sum(R4EnergySnip*R2EnergySnip),np.sum(R4EnergySnip*R3EnergySnip),np.sum(R4EnergySnip*R4EnergySnip)]])) LSb = (np.array([np.sum(R1EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R2EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R3EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R4EnergySnip*(exactEnergySnip-R0EnergySnip))])) coeffsArray4[j,i,:] = np.linalg.solve(LSMatrix,LSb) # t2-model with *no* t-model coeffsArray2only[j,i,:] = np.sum((exactEnergySnip - R0EnergySnip)*R2EnergySnip)/np.sum(R2EnergySnip*R2EnergySnip) # t2-model and t4-model with *no* t-model or t3-model LSMatrix = (np.array([[np.sum(R2EnergySnip*R2EnergySnip),np.sum(R2EnergySnip*R4EnergySnip)], [np.sum(R4EnergySnip*R2EnergySnip),np.sum(R4EnergySnip*R4EnergySnip)]])) LSb = (np.array([np.sum(R2EnergySnip*(exactEnergySnip-R0EnergySnip)),np.sum(R4EnergySnip*(exactEnergySnip-R0EnergySnip))])) coeffsArray24only[j,i,:] = np.linalg.solve(LSMatrix,LSb) for ind in np.arange(Nlist.shape[0]): fig1,ax1 = plt.subplots(2,2) fig1.suptitle("N = "+str(Nlist[ind])) ax1[0,0].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray1[ind,:,0],color = "blue") ax1[0,0].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray2[ind,:,0],color = "red") ax1[0,0].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray3[ind,:,0],color = "green") ax1[0,0].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray4[ind,:,0],color = "black") ax1[0,0].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact1[ind,0],exact1[ind,0]],color="blue",linestyle=":") ax1[0,0].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact2[ind,0],exact2[ind,0]],color="red",linestyle=":") ax1[0,0].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact3[ind,0],exact3[ind,0]],color="green",linestyle=":") ax1[0,0].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact4[ind,0],exact4[ind,0]],color="black",linestyle=":") ax1[0,0].set_title("t-model") ax1[0,1].plot([],[],color = "blue") ax1[0,1].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray2[ind,:,1], color = "red") ax1[0,1].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray3[ind,:,1], color = "green") ax1[0,1].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray4[ind,:,1], color = "black") ax1[0,1].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray2only[ind,:,0],color = "cyan") ax1[0,1].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray24only[ind,:,0], color = "magenta") ax1[0,1].set_title("t2-model") ax1[0,1].legend(["First order","Second order","Third order","Fourth order","Only t2","t2 and t4"],prop = {"size":5}) ax1[0,1].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact2[ind,1],exact2[ind,1]],color="red",linestyle=":") ax1[0,1].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact3[ind,1],exact3[ind,1]],color="green",linestyle=":") ax1[0,1].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact4[ind,1],exact4[ind,1]],color="black",linestyle=":") ax1[0,1].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact2o[ind,0],exact2o[ind,0]],color="cyan",linestyle=":") ax1[0,1].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact24o[ind,0],exact24o[ind,0]],color="magenta",linestyle=":") ax1[1,0].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray3[ind,:,2], color = "green") ax1[1,0].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray4[ind,:,2],color = "black") ax1[1,0].set_title("t3-model") ax1[1,0].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact3[ind,2],exact3[ind,2]],color="green",linestyle=":") ax1[1,0].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact4[ind,2],exact4[ind,2]],color="black",linestyle=":") ax1[1,1].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray4[ind,:,3], color = "black") ax1[1,1].plot(timesteps[0:numSteps-widthSteps+1],coeffsArray24only[ind,:,1], color = "magenta") ax1[1,1].set_title("t4-model") ax1[1,1].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact4[ind,3],exact4[ind,3]],color="black",linestyle=":") ax1[1,1].plot([timesteps[0],timesteps[numSteps-widthSteps+1]],[exact24o[ind,1],exact24o[ind,1]],color="magenta",linestyle=":") plt.tight_layout() return coeffsArray1,coeffsArray2,coeffsArray3,coeffsArray4,coeffsArray2only,coeffsArray24only def renormalizeTau(fullM, endtime, Nlist, Mlist, epsilon, alpha, tauList, timesteps, IC = np.sin): """ Tests a range of tau values for fitting coefficients. Parameters ---------- fullM : int Resolution of full model to use for fitting endtime : float Final time to use for fitting epsilon : float size of linear term (stiffness) alpha : float degree of nonlinearity in KdV timesteps : Numpy array specific timesteps for which to save solution tauList : float Grid of tau values to test (default 0:0.05:1) IC : function handle initial condition of simulation (default np.sin) Returns ------- out : dict Contains optimal coefficients for each model for each value of tau. 't-model' is len(tauList) x len(Nlist) x 1, 't2-model' is len(tauList) x len(Nlist) x 2, etc. err : """ out = {"t-model" : np.zeros((tauList.shape[0],Nlist.shape[0],1)), "t2-model" : np.zeros((tauList.shape[0],Nlist.shape[0],2)), "t3-model" : np.zeros((tauList.shape[0],Nlist.shape[0],3)), "t4-model" : np.zeros((tauList.shape[0],Nlist.shape[0],4)), "t2-model only" : np.zeros((tauList.shape[0],Nlist.shape[0],1)), "t2- and t4-models" : np.zeros((tauList.shape[0],Nlist.shape[0],2)) } errList = [] for i in np.arange(tauList.shape[0]): result = renormalize(fullM, endtime, Nlist, Mlist, epsilon, alpha, tauList[i], timesteps, IC = IC, plots = False) out["t-model"][i,:,:] = result[0] out["t2-model"][i,:,:] = result[1] out["t3-model"][i,:,:] = result[2] out["t4-model"][i,:,:] = result[3] out["t2-model only"][i,:,:] = result[4] out["t2- and t4-models"][i,:,:] = result[5] errList.append(result[7]) return out,errList def automatedROM(N,alpha,epsilon,timesteps,fitTime = 10,tauTests = np.arange(0,1.05,0.05),IC = np.sin,tol = 1e-3): """ Automatically finds optimal tau and coefficients for an ROM and runs the ROM. Also produces reference exact solution Parameters ---------- N : int Resolution of ROM alpha : float degree of nonlinearity in KdV epsilon : float size of linear term (stiffness) timesteps : Numpy array specific timesteps for which to save solution fitTime : float Fits are made over window of exact solution from 0 to fitTime (default 10) tauTests : float Grid of tau values to test (default 0:0.05:1) IC : function handle initial condition of simulation (default np.sin) tol : float Tolerance for declaring full model "resolved" There must be less than this relative error in the first half of the full modes up to the end time (default 10^-3) Returns ------- simMarkov : SciPy integration object Simulation up to end time of Markov model sim2 : SciPy integration object Simulation up to end time of 2nd order model model sim4 : SciPy integration object Simulation up to end time of fourth order model coefficients : errors """ endtime = timesteps[-1] M = 16 unresolved = True #print("Constructing reference exact solution...") try: fileList = glob.glob("u" + '[0-9]*' + "t" + str(int(endtime))+"e"+str(round(epsilon,2)).replace('.','p')+".npy") myFile = fileList[0] uFull = np.load(myFile) fileList = glob.glob("t" + '[0-9]*' + "t" + str(int(endtime))+"e"+str(round(epsilon,2)).replace('.','p')+".npy") myFile = fileList[0] tFull = np.load(myFile) #print("Success! (it was already saved)\n") M = int(re.findall(r'\d+', fileList[0])[0]) except: # find resolved simulation while unresolved: M = 2*M #print("\nCurrently testing M = "+str(M)) fullParams = { 'N': M, 'M': int(3/2*M), 'alpha': 1, 'epsilon': epsilon, 'tau': 1, 'coeffs': None, 'IC': IC, 'endtime': endtime, 'timesteps': timesteps } uSimFull = runSim(fullParams) uFull = uSimFull.y tFull = uSimFull.t energyCheck = getMass(uFull,int(M/2)) print("Maximum mass deviation in first "+str(M/2)+" modes: "+str(max(abs(energyCheck - energyCheck[0])))) if max(abs(energyCheck - energyCheck[0])) < tol: print("Success!\n") unresolved = False np.save("u" + str(M) + "t" + str(int(endtime))+"e"+str(round(epsilon,2)).replace('.','p')+".npy",uFull) np.save("t" + str(M) + "t" + str(int(endtime))+"e"+str(round(epsilon,2)).replace('.','p')+".npy",tFull) uFit = uFull[:,tFull<=fitTime] tFit = tFull[tFull<=fitTime] np.save("u" + str(M) + "t" + str(int(fitTime))+"e"+str(round(epsilon,2)).replace('.','p')+".npy",uFit) np.save("t" + str(M) + "t" + str(int(fitTime))+"e"+str(round(epsilon,2)).replace('.','p')+".npy",tFit) # Find specific fitting window #print("Finding coefficients for range of tau values...") coefficients,errors = renormalizeTau(fullM = M, endtime = fitTime, Nlist = np.array([N]), Mlist = np.array([N*3]), epsilon = epsilon, alpha = alpha, tauList = tauTests, timesteps = tFit, IC = IC) err2 = [fit["t2-model only"][0][0] for fit in errors] c2 = coefficients["t2-model only"][err2.index(min(err2))][0] err4 = [fit["t2- and t4-models"][0][0] for fit in errors] c4 = coefficients["t2- and t4-models"][err4.index(min(err4))][0] #print("Coefficients found!\n") paramsMarkov = { 'N': N, 'M': int(3*N), 'alpha': 1, 'epsilon': epsilon, 'tau': 0, 'coeffs': None, 'IC': IC, 'endtime': endtime, 'timesteps': timesteps } params2 = { 'N': N, 'M': int(3*N), 'alpha': 1, 'epsilon': epsilon, 'tau': tauTests[err2.index(min(err2))], 'coeffs': np.array([0,c2[0]]), 'IC': IC, 'endtime': endtime, 'timesteps': timesteps } params4 = { 'N': N, 'M': int(3*N), 'alpha': 1, 'epsilon': epsilon, 'tau': tauTests[err4.index(min(err4))], 'coeffs': np.array([0,c4[0],0,c4[1]]), 'IC': IC, 'endtime': endtime, 'timesteps': timesteps } params2scaling = { 'N': N, 'M': int(3*N), 'alpha': 1, 'epsilon': epsilon, 'tau': 1, 'coeffs': np.array([0,-0.7615*N**-5.8081*epsilon**-3.7681]), # NOTE GET THE LATEST SCALING LAWS HERE 'IC': IC, 'endtime': endtime, 'timesteps': timesteps } params4scaling = { 'N': N, 'M': int(3*N), 'alpha': 1, 'epsilon': epsilon, 'tau': 1, 'coeffs': np.array([0,-1.2473*N**-5.7356*epsilon**-3.6910,0,-0.3675*N**-11.4719*epsilon**-7.3881]), # NOTE GET THE LATEST SCALING LAWS HERE 'IC': IC, 'endtime': endtime, 'timesteps': timesteps } #print("Running Markov simulation...\n") simMarkov = runSim(paramsMarkov) #print("Running second order simulation with tau = "+str(tauTests[err2.index(min(err2))])+"...\n") sim2 = runSim(params2) #print("Running fourth order simulation with tau = "+str(tauTests[err4.index(min(err4))])+"...") sim4 = runSim(params4) sim2scale = runSim(params2scaling) sim4scale = runSim(params4scaling) return simMarkov,sim2,sim4,sim2scale,sim4scale,coefficients,errors # coeffsArray1,coeffsArray2,coeffsArray3,coeffsArray4,coeffsArray2only,coeffsArray24only,fitLines # old functions that should be defunct # def RHSFullKdV(u,M,alpha,epsilon): # """Computes RHS of KdV with no reduced order model and dealiasing # Parameters # ---------- # u : 1D Numpy Array (M,) # Positive modes of state vector whose RHS is being computed # M : int # Number of positive modes in "full" model for intermediary calculations # alpha : float # Degree of nonlinearity in KdV # epsilon : float # Size of linear term (stiffness) # Returns # ------- # RHS : 1D Numpy Array (M,) # RHS of ODE for state vector u # """ # # compute nonlinear part of RHS using "full" model with M positive modes # # the factor of 3/2 is for dealiasing # a,b = markovKdV(u,int(3/2*M),alpha) # # compute the linear part of the RHS and add it to the nonlinear part # L = u.shape[0] # k = np.arange(0,L) # RHS = 1j*k**3*epsilon**2*u + a[0:L] # return RHS # def RHSMarkovKdV(u,N,M,alpha,epsilon): # """Computes RHS of KdV with no reduced order model and dealiasing # Parameters # ---------- # u : 1D Numpy Array (N,) # Positive modes of state vector whose RHS is being computed # N : int # Number of positive modes in ROM # M : int # Number of positive modes in "full" model for intermediary calculations # alpha : float # Degree of nonlinearity in KdV # epsilon : float # Size of linear term (stiffness) # Returns # ------- # RHS : 1D Numpy Array (N,) # RHS of ODE for state vector u # """ # # compute nonlinear part of RHS using "full" model with M positive modes # a,b = markovKdV(u,M,alpha) # # compute the linear part of the RHS and add it to the nonlinear part # L = u.shape[0] # k = np.arange(0,L) # RHS = 1j*k**3*epsilon**2*u + a[0:L] # return RHS # def RHStModelKdV(u,N,M,alpha,epsilon,t): # """Computes RHS of KdV for the t-model with coefficient one # Parameters # ---------- # u : 1D Numpy Array (N,) # Positive modes of state vector whose RHS is being computed # N : int # Number of positive modes in ROM # M : int # Number of positive modes in "full" model for intermediary calculations # alpha : float # Degree of nonlinearity in KdV # epsilon : float # Size of linear term (stiffness) # t : float # Current timestep # Returns # ------- # RHS : 1D Numpy Array (N,) # RHS of ODE for state vector u # """ # # compute nonlinear part of RHS using "full" model with M positive modes # nonlin0,u_full = markovKdV(u,M,alpha) # # define which modes are resolved in full array # F_modes = np.concatenate([np.arange(0,N),np.arange(2*N-1,M+N+2),np.arange(2*M-N+1,2*M)]) # # compute t-model term # nonlin1,uuStar = tModelKdV(u_full,nonlin0,alpha,F_modes) # # compute the linear part of the RHS and add it to the nonlinear part # L = u.shape[0] # k = np.arange(0,L) # # combine linear, Markov, and t-model terms # RHS = 1j*k**3*epsilon**2*u + nonlin0[0:L] + nonlin1[0:L]*t # return RHS # def RHSt2ModelKdV(u,N,M,alpha,epsilon,t,tau,coeffs): # """Computes RHS of KdV for the t2-model with variable coefficients # Parameters # ---------- # u : 1D Numpy Array (N,) # Positive modes of state vector whose RHS is being computed # N : int # Number of positive modes in ROM # M : int # Number of positive modes in "full" model for intermediary calculations # alpha : float # Degree of nonlinearity in KdV # epsilon : float # Size of linear term (stiffness) # t : float # Current timestep # tau : float # Time decay modifier (default 0 - time dependence of memory fully retained) # coeffs : 1D Numpy Array (2,1) # Renormalization coefficients for t-model and t2-model # Returns # ------- # RHS : 1D Numpy Array (N,) # RHS of ODE for state vector u # """ # # compute nonlinear part of RHS using "full" model with M positive modes # nonlin0,u_full = markovKdV(u,M,alpha) # # define which modes are resolved / unresolved in full array # F_modes = np.concatenate([np.arange(0,N),np.arange(2*N-1,M+N+2),np.arange(2*M-N+1,2*M)]) # G_modes = np.arange(N,2*M-N+1) # # compute t-model term # nonlin1,uuStar = tModelKdV(u_full,nonlin0,alpha,F_modes) # k = np.concatenate([np.arange(0,M),np.arange(-M,0)]) # # compute t2-model term # nonlin2,uk3,uu,A,AStar,B,BStar,C,CStar,D,DStar = t2ModelKdV(u_full,nonlin0,uuStar,alpha,F_modes,G_modes,k,epsilon) # # combine linear, Markov, t-model, and t2-model terms # RHS = 1j*k[0:N]**3*epsilon**2*u + nonlin0[0:N] + coeffs[0]*nonlin1[0:N]*t**(1-tau) + coeffs[1]*nonlin2[0:N]*t**(2*(1-tau)) # return RHS # def RHSt4ModelKdV(u,N,M,alpha,epsilon,t,tau,coeffs): # """Computes RHS of KdV for the t4-model with variable coefficients # Parameters # ---------- # u : 1D Numpy Array (N,) # Positive modes of state vector whose RHS is being computed # N : int # Number of positive modes in ROM # M : int # Number of positive modes in "full" model for intermediary calculations # alpha : float # Degree of nonlinearity in KdV # epsilon : float # Size of linear term (stiffness) # t : float # Current timestep # tau : float # Time decay modifier (default 0 - time dependence of memory fully retained) # coeffs : 1D Numpy Array (2,1) # Renormalization coefficients for t-model and t2-model # Returns # ------- # RHS : 1D Numpy Array (N,) # RHS of ODE for state vector u # """ # # compute nonlinear part of RHS using "full" model with M positive modes # nonlin0,u_full = markovKdV(u,M,alpha) # # define which modes are resolved / unresolved in full array # F_modes = np.concatenate([np.arange(0,N),np.arange(2*N-1,M+N+2),np.arange(2*M-N+1,2*M)]) # G_modes = np.arange(N,2*M-N+1) # # compute t-model term # nonlin1,uuStar = tModelKdV(u_full,nonlin0,alpha,F_modes) # k = np.concatenate([np.arange(0,M),np.arange(-M,0)]) # # compute t2-model term # nonlin2,uk3,uu,A,AStar,B,BStar,C,CStar,D,DStar = t2ModelKdV(u_full,nonlin0,uuStar,alpha,F_modes,G_modes,k,epsilon) # # compute t3-model term # nonlin3,uk6,E,EStar,F,FStar = t3ModelKdV(alpha,F_modes,G_modes,k,epsilon,u_full,uu,uuStar,uk3,A,AStar,B,BStar,C,CStar,DStar) # # compute t4-model term # nonlin4 = t4ModelKdV(alpha,F_modes,G_modes,k,epsilon,u_full,uu,uuStar,uk3,uk6,A,AStar,B,BStar,C,CStar,D,DStar,E,EStar,F,FStar) # # combine linear, Markov, t-model, and t2-model terms # RHS = (1j*k[0:N]**3*epsilon**2*u + nonlin0[0:N] + coeffs[0]*nonlin1[0:N]*t**(1-tau) # + coeffs[1]*nonlin2[0:N]*t**(2*(1-tau)) # + coeffs[2]*nonlin3[0:N]*t**(3*(1-tau)) # + coeffs[3]*nonlin4[0:N]*t**(4*(1-tau))) # return RHS # def nonRenormSim(N, endtime = 10, alpha = 1, epsilon = 0.1, IC = np.sin, timesteps = None): # """Runs a non-renormalized simulation of KdV - use large N so it is resolved # Parameters # ---------- # N : int # Number of positive modes in simulation # endtime : float # Final time to run simulation to (default 10) # alpha : float # Degree of nonlinearity in KdV (default 1) # epsilon : float # Size of linear term (stiffness) (default 0.1) # IC : function handle # Initial condition (default sin(x)) # Returns # ------- # uSim : ODE Solution object # Data from completed simulation # """ # # generate initial condition # x = np.linspace(0,2*np.pi-2*np.pi/(2*N),2*N) # y = IC(x) # uFull = fftnorm(y) # u = uFull[0:N] # # define RHS for integration # # (RHS FullKdV uses "full" size with 3/2*N positive modes to dealias results) # def myRHS(t,y): # out = RHSFullKdV(y,N,alpha,epsilon) # return out # # run simulation using stiff solver # uSim = sp.integrate.solve_ivp(fun = myRHS, t_span = [0,endtime], y0 = u,method = "BDF", t_eval = timesteps) # return uSim # def markovSim(N, M = None, endtime = 10, alpha = 1, epsilon = 0.1, IC = np.sin, timesteps = None): # """Runs a non-renormalized simulation of KdV - use large N so it is resolved # Parameters # ---------- # N : int # Number of positive modes in simulation # M : int # Number of positive modes in "full" model for intermediary calculations (default 2N) # endtime : float # Final time to run simulation to (default 10) # alpha : float # Degree of nonlinearity in KdV (default 1) # epsilon : float # Size of linear term (stiffness) (default 0.1) # IC : function handle # Initial condition (default sin(x)) # Returns # ------- # uSim : ODE Solution object # Data from completed simulation # """ # # default value of M is double N # if M is None: # M = 2*N # # generate initial condition # x = np.linspace(0,2*np.pi-2*np.pi/(2*N),2*N) # y = IC(x) # uFull = fftnorm(y) # u = uFull[0:N] # # define RHS for integration # # (RHS FullKdV uses "full" size with 3/2*N positive modes to dealias results) # def myRHS(t,y): # out = RHSMarkovKdV(y,N,M,alpha,epsilon) # return out # # run simulation using stiff solver # uSim = sp.integrate.solve_ivp(fun = myRHS, t_span = [0,endtime], y0 = u,method = "BDF", t_eval = timesteps) # return uSim # def tModelSim(N, M = None, endtime = 10, alpha = 1, epsilon = 0.1, IC = np.sin, timesteps = None): # """Runs a basic t-model simulation of KdV # Parameters # ---------- # N : int # Number of positive modes in simulation # M : int # Number of positive modes in "full" model for intermediary calculations (default 3N) # endtime : float # Final time to run simulation to (default 10) # alpha : float # Degree of nonlinearity in KdV (default 1) # epsilon : float # Size of linear term (stiffness) (default 0.1) # IC : function handle # Initial condition (default sin(x)) # timesteps : Numpy array (t,1) # Specific timesteps to save # Returns # ------- # uSim : ODE Solution object # Data from completed simulation # """ # # default value of M is triple N # if M is None: # M = 3*N # # generate initial condition # x = np.linspace(0,2*np.pi-2*np.pi/(2*N),2*N) # y = IC(x) # uFull = fftnorm(y) # u = uFull[0:N] # # define RHS for integration # # (RHS FullKdV uses "full" size with 3/2*N positive modes to dealias results) # def myRHS(t,y): # out = RHStModelKdV(y,N,M,alpha,epsilon,t) # return out # # run simulation using stiff solver # uSim = sp.integrate.solve_ivp(fun = myRHS, t_span = [0,endtime], y0 = u,method = "BDF", t_eval = timesteps) # return uSim # def t2ModelSim(N, M = None, endtime = 10, alpha = 1, epsilon = 0.1, tau = 0, IC = np.sin, timesteps = None, coeffs = np.array([1,-0.5])): # """Runs a t2-model simulation of KdV # Parameters # ---------- # N : int # Number of positive modes in simulation # M : int # Number of positive modes in "full" model for intermediary calculations (default 3N) # endtime : float # Final time to run simulation to (default 10) # alpha : float # Degree of nonlinearity in KdV (default 1) # epsilon : float # Size of linear term (stiffness) (default 0.1) # tau : float # Time decay modifier (default 0 - time dependence of memory fully retained) # IC : function handle # Initial condition (default sin(x)) # timesteps : Numpy array (t,1) # Specific timesteps to save # coeffs : Numpy array (2,1) # Renormalization coefficients on t-model and t2-model terms (default [1,-0.5]) # Returns # ------- # uSim : ODE Solution object # Data from completed simulation # """ # # default value of M is triple N # if M is None: # M = 3*N # # generate initial condition # x = np.linspace(0,2*np.pi-2*np.pi/(2*N),2*N) # y = IC(x) # uFull = fftnorm(y) # u = uFull[0:N] # # define RHS for integration # # (RHS FullKdV uses "full" size with 3/2*N positive modes to dealias results) # def myRHS(t,y): # out = RHSt2ModelKdV(y,N,M,alpha,epsilon,t,tau,coeffs) # return out # # run simulation using stiff solver # uSim = sp.integrate.solve_ivp(fun = myRHS, t_span = [0,endtime], y0 = u,method = "BDF", t_eval = timesteps) # return uSim # def t4ModelSim(N, M = None, endtime = 10, alpha = 1, epsilon = 0.1, tau = 0, IC = np.sin, timesteps = None, coeffs = np.array([1,-0.5,1/6,-1/24])): # """Runs a t2-model simulation of KdV # Parameters # ---------- # N : int # Number of positive modes in simulation # M : int # Number of positive modes in "full" model for intermediary calculations (default 3N) # endtime : float # Final time to run simulation to (default 10) # alpha : float # Degree of nonlinearity in KdV (default 1) # epsilon : float # Size of linear term (stiffness) (default 0.1) # tau : float # Time decay modifier (default 0 - time dependence of memory fully retained) # IC : function handle # Initial condition (default sin(x)) # timesteps : Numpy array (t,1) # Specific timesteps to save # coeffs : Numpy array (4,1) # Renormalization coefficients on ROM terms (default [1,-0.5,1/6,-1/24]) # Returns # ------- # uSim : ODE Solution object # Data from completed simulation # """ # # default value of M is triple N # if M is None: # M = 3*N # # generate initial condition # x = np.linspace(0,2*np.pi-2*np.pi/(2*N),2*N) # y = IC(x) # uFull = fftnorm(y) # u = uFull[0:N] # # define RHS for integration # # (RHS FullKdV uses "full" size with 3/2*N positive modes to dealias results) # def myRHS(t,y): # out = RHSt4ModelKdV(y,N,M,alpha,epsilon,t,tau,coeffs) # return out # # run simulation using stiff solver # uSim = sp.integrate.solve_ivp(fun = myRHS, t_span = [0,endtime], y0 = u,method = "BDF", t_eval = timesteps) # return uSim # def makeAnimation(u,t,N): # """Takes a completed simulation and creates a real space animation of a subset of modes # Parameters # ---------- # u : Numpy array (M,t) # Output of simulation giving energy in first M positive modes for all timesteps t # t : Numpy array (t,1) # Timesteps associated with the simulation # N : int # Number of positive modes to use in real space # Returns # ------- # anim : Animation object # Real space solution animated # """ # # generate real space solutions # xgrid,yarray = makeRealSpace(u,N) # # initialize figure # myFig = plt.figure() # ax = plt.subplot(111) # ax.axis(xmin = 0,xmax = 2*np.pi,ymin = -2, ymax = 3) # myLine, = ax.plot([],[], 'b') # # define function to draw each frame # def makeFrame(n): # myLine.set_data(xgrid,yarray[:,n]) # plt.title('t = '+str(round(t[n],1))) # return myLine # # generate animation # anim = animation.FuncAnimation(fig = myFig,func = makeFrame,frames = t.shape[0]) # return anim # def makeAnimationFullMarkov(uFull,uMarkov,t): # """Takes a completed full and Markov simulation and creates a real space animation comparing them # Parameters # ---------- # uFull : Numpy array (M,t) # Output of full simulation giving energy in first M positive modes for all timesteps t # uMarkov : Numpy array (M,t) # Output of Markov ROM simulation of size N for all timesteps t # t : Numpy array (t,1) # Timesteps associated with the simulation # Returns # ------- # anim : Animation object # Real space solution animated # """ # N = uMarkov.shape[0] # # generate real space solutions # xgrid,yarrayFull = makeRealSpace(uFull,N) # xgrid,yarrayMarkov = makeRealSpace(uMarkov,N) # # initialize figure # myFig = plt.figure() # ax = plt.subplot(111) # ax.axis(xmin = 0,xmax = 2*np.pi-np.pi/N,ymin = -2, ymax = 3) # myFullLine, = ax.plot([],[], 'b') # myMarkovLine, = ax.plot([],[], 'r') # # define function to draw each frame # def makeFrame(n): # myFullLine.set_data(xgrid,yarrayFull[:,n]) # myMarkovLine.set_data(xgrid,yarrayMarkov[:,n]) # plt.title('t = '+str(round(t[n],1))) # plt.legend((myFullLine,myMarkovLine),("Exact Solution","Markov Model")) # return myFullLine,myMarkovLine # # generate animation # anim = animation.FuncAnimation(fig = myFig,func = makeFrame,frames = t.shape[0]) # return anim # def makeAnimationtModel(uFull,uMarkov,utModel,t): # """Takes a completed full, Markov, and t-model simulation and creates a real space animation comparing them # Parameters # ---------- # uFull : Numpy array (M,t) # Output of full simulation giving energy in first M positive modes for all timesteps t # uMarkov : Numpy array (M,t) # Output of Markov ROM simulation of size N for all timesteps t # utmodel : Numpy array (M,t) # Output of t-model ROM simulation of size N for all timesteps t # t : Numpy array (t,1) # Timesteps associated with the simulation # Returns # ------- # anim : Animation object # Real space solution animated # """ # N = uMarkov.shape[0] # # generate real space solutions # xgrid,yarrayFull = makeRealSpace(uFull,N) # xgrid,yarrayMarkov = makeRealSpace(uMarkov,N) # xgrid,yarraytModel = makeRealSpace(utModel,N) # # initialize figure # myFig = plt.figure() # ax = plt.subplot(111) # ax.axis(xmin = 0,xmax = 2*np.pi-np.pi/N,ymin = -2, ymax = 3) # myFullLine, = ax.plot([],[], 'b') # myMarkovLine, = ax.plot([],[], 'r') # mytModelLine, = ax.plot([],[], 'g') # # define function to draw each frame # def makeFrame(n): # myFullLine.set_data(xgrid,yarrayFull[:,n]) # myMarkovLine.set_data(xgrid,yarrayMarkov[:,n]) # mytModelLine.set_data(xgrid,yarraytModel[:,n]) # plt.title('t = '+str(round(t[n],1))) # plt.legend((myFullLine,myMarkovLine,mytModelLine),("Exact Solution","Markov Model","t-Model")) # return myFullLine,myMarkovLine # # generate animation # anim = animation.FuncAnimation(fig = myFig,func = makeFrame,frames = t.shape[0]) # return anim # def makeAnimationROMS(uFull,uMarkov,utModel,ut2Model,ut4Model,t): # """ # """ # N = uMarkov.shape[0] # # generate real space solutions # xgrid,yarrayFull = makeRealSpace(uFull,N) # xgrid,yarrayMarkov = makeRealSpace(uMarkov,N) # xgrid,yarraytModel = makeRealSpace(utModel,N) # xgrid,yarrayt2Model = makeRealSpace(ut2Model,N) # xgrid,yarrayt4Model = makeRealSpace(ut4Model,N) # # initialize figure # myFig = plt.figure() # ax = plt.subplot(111) # ax.axis(xmin = 0,xmax = 2*np.pi-np.pi/N,ymin = -2, ymax = 3) # myFullLine, = ax.plot([],[], 'blue') # myMarkovLine, = ax.plot([],[], 'red') # mytModelLine, = ax.plot([],[], 'green') # myt2ModelLine, = ax.plot([],[], 'purple') # myt4ModelLine, = ax.plot([],[], 'black') # # define function to draw each frame # def makeFrame(n): # myFullLine.set_data(xgrid,yarrayFull[:,n]) # myMarkovLine.set_data(xgrid,yarrayMarkov[:,n]) # mytModelLine.set_data(xgrid,yarraytModel[:,n]) # myt2ModelLine.set_data(xgrid,yarrayt2Model[:,n]) # myt4ModelLine.set_data(xgrid,yarrayt4Model[:,n]) # plt.title('t = '+str(round(t[n],1))) # plt.legend((myFullLine,myMarkovLine,mytModelLine,myt2ModelLine,myt4ModelLine),("Exact Solution","Markov Model","t-Model","2nd Order CMA","4th Order CMA")) # return myFullLine,myMarkovLine # # generate animation # anim = animation.FuncAnimation(fig = myFig,func = makeFrame,frames = t.shape[0]) # return anim
39.724278
284
0.577828
15,588
116,988
4.31165
0.048627
0.020458
0.015474
0.011605
0.816902
0.792189
0.765437
0.746243
0.722393
0.69076
0
0.041508
0.269549
116,988
2,945
285
39.724278
0.744997
0.37103
0
0.393555
1
0
0.050472
0
0
0
0
0
0
1
0.022461
false
0
0.005859
0
0.050781
0.001953
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
9bbeb8bf114a6b133ddfbd9d68e9f0b66c4b95c3
31,418
py
Python
learning/scikit_learners.py
aleisalem/Maat
702c88a6a86f0b56e504df8f4d7ba18e8a39c887
[ "Apache-2.0" ]
4
2019-10-11T12:19:29.000Z
2020-08-06T21:45:10.000Z
learning/scikit_learners.py
aleisalem/Maat
702c88a6a86f0b56e504df8f4d7ba18e8a39c887
[ "Apache-2.0" ]
null
null
null
learning/scikit_learners.py
aleisalem/Maat
702c88a6a86f0b56e504df8f4d7ba18e8a39c887
[ "Apache-2.0" ]
1
2021-01-05T11:50:22.000Z
2021-01-05T11:50:22.000Z
#!/usr/bin/python from Maat.utils.data import * from Maat.utils.graphics import * from Maat.utils.misc import * from Maat.learning.string_kernel import * import warnings def fxn(): warnings.warn("deprecated", DeprecationWarning) with warnings.catch_warnings(): warnings.simplefilter("ignore") fxn() import sklearn, numpy from sklearn import svm, tree, neighbors, ensemble from sklearn.model_selection import cross_val_predict, KFold from sklearn.feature_selection import SelectKBest, chi2 from sklearn.ensemble import VotingClassifier from sklearn.metrics import * import sklearn.cluster from Levenshtein import distance import os def calculateMetrics(truth, predicted): """ Calculates and returns a set of metrics from ground truth and predicted vectors :param truth: A list of ground truth labels :type truth: list :param predicted: A list of predicted labels :type predicted: list :return: A dict of metrics including accuracy, recall, specificity, precision, and F1-score """ try: # Sanity check if not len(truth) == len(predicted): prettyPrint("The two vectors have different dimensionality", "warning") return {} metrics = {} # Calculate different mterics metrics["accuracy"] = accuracy_score(truth, predicted) metrics["recall"] = recall_score(truth, predicted) metrics["specificity"] = specificity(truth, predicted) # From Aion.utils.misc metrics["precision"] = precision_score(truth, predicted) metrics["f1score"] = f1_score(truth, predicted) metrics["mcc"] = matthews_corrcoef(truth, predicted) except Exception as e: prettyPrintError(e) return {} return metrics def clusterStrings(words, affinity="precomputed", damping=0.5): """ Clusters a list of strings using Affinity propagation :param words: The list of strings you wish to cluster :type words: list of str :param affinity: The affinity method to use. Supported: "precomputed" and "euclidean" :type affinity: str :param damping: Damping factor (between 0.5 and 1) is the extent to which the current value is maintained relative to incoming values (weighted 1 - damping). :type damping: float :return: A dict of clusters with key being the cluster center """ try: clusters = {} words = numpy.asarray(words) lev_similarity = -1*numpy.array([[distance(w1,w2) for w1 in words] for w2 in words]) affprop = sklearn.cluster.AffinityPropagation(affinity="precomputed", damping=0.5) affprop.fit(lev_similarity) for cluster_id in numpy.unique(affprop.labels_): center = words[affprop.cluster_centers_indices_[cluster_id]] cluster = numpy.unique(words[numpy.nonzero(affprop.labels_==cluster_id)]) clusters[center] = cluster.tolist() except Exception as e: prettyPrintError(e) return {} return dict(clusters) def trainAndTestEnsemble(X, y, Xtest=[], ytest=[], classifiers=[], selectKBest=0): """ Trains an Ensemble of classifiers (with default params) and using a training dataset, and returns majority vote using the same training dataset and an out-of-sample test dataset :type X: list :param y: The labels corresponding to the training feature vectors :type y: list :param Xtest: The matrix of test feature vectors :type Xtest: list :param ytest: The labels corresponding to the test feature vectors :type ytest: list :param classifiers: A list of classifiers to use in the ensemble :type classifiers: list of str :param selectKBest: The number of best features to select :type selectKBest: int :return: Two lists of the validation and test accuracies across the k-folds """ try: predicted, predicted_test = [], [] # Prepare the data X, y, Xtest, ytest = numpy.array(X), numpy.array(y), numpy.array(Xtest), numpy.array(ytest) # Define classifiers ensembleClassifiers = [] for c in classifiers: if c.lower().find("knn") != -1: K = int(c.split('-')[-1]) clf = neighbors.KNeighborsClassifier(n_neighbors=K) elif c.lower().find("svm") != -1: clf = svm.LinearSVC(C=1) elif c.lower().find("forest") != -1: E = int(c.split('-')[-1]) clf = ensemble.RandomForestClassifier(n_estimators=E) # Add to list ensembleClassifiers.append((c, clf)) # Select K Best features if applicable X_new = SelectKBest(chi2, k=selectKBest).fit_transform(X, y) if selectKBest > 0 else X Xtest_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xtest, ytest) if selectKBest > 0 else Xtest # Train and fit the voting classifier voting = VotingClassifier(estimators=ensembleClassifiers, voting='hard') prettyPrint("Fitting ensemble model") voting = voting.fit(X_new, y) prettyPrint("Validating model") predicted = voting.predict(X_new) # Same for the test dataset if len(Xtest) > 1 and len(ytest) > 1 and len(Xtest) == len(ytest): prettyPrint("Testing model") predicted_test = voting.predict(Xtest_new) else: predicted_test = [] except Exception as e: prettyPrintError(e) return [], [] return voting, predicted, predicted_test def trainKFoldEnsemble(X, y, classifiers=[], K=10, kfold=10, selectKBest=0): """ Classifies the data using a voting classifier and k-fold CV :param X: The list of feature vectors :type X: list :param y: The list of labels corresponding to the feature vectors :type y: list :param classifiers: The list of classifiers to use in the ensemble :type classifiers: list :param K: The number of nearest neighbors to consider in classification :type K: int :param kfold: The number of folds in the CV :type kfold: int :param selectKBest: The number of best features to select :type selectKBest: int :return: An array of predicted classes """ try: # Prepare data X, y = numpy.array(X), numpy.array(y) # Define classifiers ensembleClassifiers = [] for c in classifiers: if c.lower().find("knn") != -1: K = int(c.split('-')[-1]) clf = neighbors.KNeighborsClassifier(n_neighbors=K) elif c.lower().find("svm") != -1: clf = svm.LinearSVC(C=1) elif c.lower().find("forest") != -1: E = int(c.split('-')[-1]) clf = ensemble.RandomForestClassifier(n_estimators=E) # Add to list ensembleClassifiers.append((c, clf)) # Train and fit the voting classifier voting = VotingClassifier(estimators=ensembleClassifiers, voting='hard') # Select K Best features if enabled X_new = SelectKBest(chi2, k=selectKBest).fit_transform(X, y) if selectKBest > 0 else X predicted = cross_val_predict(voting, X_new, y, cv=kfold).tolist() except Exception as e: prettyPrintError(e) return [] return predicted def trainKFoldKNN(X, y, K=10, kfold=10, selectKBest=0): """ Classifies the data using K-nearest neighbors and k-fold CV :param X: The list of feature vectors :type X: list :param y: The list of labels corresponding to the feature vectors :type y: list :param K: The number of nearest neighbors to consider in classification :type K: int :param kfold: The number of folds in the CV :type kfold: int :param selectKBest: The number of best features to select :type selectKBest: int :return: An array of predicted classes """ try: # Prepare data X, y = numpy.array(X), numpy.array(y) # Define classifier clf = neighbors.KNeighborsClassifier(n_neighbors=K) # Select K Best features if enabled X_new = SelectKBest(chi2, k=selectKBest).fit_transform(X, y) if selectKBest > 0 else X predicted = cross_val_predict(clf, X_new, y, cv=kfold).tolist() except Exception as e: prettyPrintError(e) return [] return predicted def trainAndTestKNN(X, y, Xtest=[], ytest=[], K=10, selectKBest=0): """ Trains a K-NN using the training data and tests it using the test data using K-fold cross validation :type X: list :param y: The labels corresponding to the training feature vectors :type y: list :param Xtest: The matrix of test feature vectors :type Xtest: list :param ytest: The labels corresponding to the test feature vectors :type ytest: list :param K: The number of nearest neighbors to consider in classification :type K: int :param selectKBest: The number of best features to select :type selectKBest: int :return: Two lists of the validation and test accuracies and the trained classifier """ try: predicted, predicted_test = [], [] # Define classifier and cross validation iterator clf = neighbors.KNeighborsClassifier(n_neighbors=K) # Start the cross validation learning X, y, Xtest, ytest = numpy.array(X), numpy.array(y), numpy.array(Xtest), numpy.array(ytest) # Select K Best features if enabled prettyPrint("Selecting %s best features from feature vectors" % selectKBest) X_new = SelectKBest(chi2, k=selectKBest).fit_transform(X, y) if selectKBest > 0 else X Xtest_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xtest, ytest) if selectKBest else Xtest # Fit model prettyPrint("Fitting model") clf.fit(X_new, y) # Validate and test model prettyPrint("Validating model using training data") predicted = clf.predict(X_new) if len(Xtest) > 1 and len(ytest) > 1 and len(Xtest) == len(ytest): prettyPrint("Testing model") predicted_test = clf.predict(Xtest_new) else: predicted_test = [] except Exception as e: prettyPrintError(e) return None, [], [] return clf, predicted, predicted_test def trainAndTestKFoldKNN(X, y, Xtest, ytest, K=10, kfold=10, selectKBest=0): """ Trains a K-NN using the training data and tests it using the test data using K-fold cross validation :type X: list :param y: The labels corresponding to the training feature vectors :type y: list :param Xtest: The matrix of test feature vectors :type Xtest: list :param ytest: The labels corresponding to the test feature vectors :type ytest: list :param K: The number of nearest neighbors to consider in classification :type K: int :param kfold: The number of folds to consider for K-Fold cross validation :type kfold: int :param selectKBest: The number of best features to select :type selectKBest: int :return: Two lists of the validation and test accuracies across the k-folds """ try: predicted, predicted_test = [-1] * len(y), [] # Define classifier and cross validation iterator clf = neighbors.KNeighborsClassifier(n_neighbors=K) kf = KFold(n_splits=kfold) # Start the cross validation learning Xtest, ytest = numpy.array(Xtest), numpy.array(ytest) foldCounter = 0 for training_indices, validation_indices in kf.split(X): foldCounter += 1 # Populate training and validation matrices Xtrain, ytrain, Xval, yval = [], [], [], [] index_mapper, index_counter = {}, 0 for ti in training_indices: Xtrain.append(X[ti]) ytrain.append(y[ti]) for vi in validation_indices: Xval.append(X[vi]) yval.append(y[vi]) index_mapper[index_counter] = vi index_counter += 1 # Prepare data Xtrain, ytrain, Xval, yval = numpy.array(Xtrain), numpy.array(ytrain), numpy.array(Xval), numpy.array(yval) # Select K Best features if enabled prettyPrint("Selecting %s best features from feature vectors" % selectKBest) Xtrain_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xtrain, ytrain) if selectKBest > 0 else Xtrain Xval_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xval, yval) if selectKBest > 0 else Xval Xtest_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xtest, ytest) if selectKBest > 0 else Xtest # Fit model prettyPrint("Fitting model: Fold %s out of %s" % (foldCounter, kfold)) clf.fit(Xtrain_new, ytrain) # Validate and test model prettyPrint("Validating model") temp = clf.predict(Xval_new) for i in range(len(temp)): predicted[index_mapper[i]] = temp[i] temp = clf.predict(Xtest_new) predicted_test = [predicted_test[i]+temp[i] for i in range(len(temp))] if len(predicted_test) == len(temp) else temp # Now average the predicted lists for i in range(len(predicted_test)): predicted_test[i] = 1 if predicted_test[i] >= int(kfold/2) else 0 except Exception as e: prettyPrintError(e) return [], [] return predicted, predicted_test def trainKFoldSVMSSK(X, y, kfold=10, subseqLength=3, selectKBest=0): """Classifies the data using Support vector machines with the SSK kernel and k-fold CV :param X: The list of text documents containing traces :type X: list :param y: The labels of documents in 'X' :type y: list :param kfold: The number of folds :type kfold: int (default: 10) :param subseqLength: Length of subsequence used by the SSK :type subseqLength: int (default: 3) :param selectKBest: The number of best features to select :type selectKBest: int :return: An array of predicted classes """ try: predicted = [] # Retrieve Gram Matrix from string kernel if verboseON(): prettyPrint("Generating Gram Matrix from documents", "debug") X_gram = string_kernel(X, X) y = numpy.array(y) # Define classifier clf = svm.SVC(kernel="precomputed") X_gram_new = SelectKBest(chi2, k=selectKBest).fit_transform(X_gram, y) if selectKBest > 0 else X_gram prettyPrint("Performing %s-fold CV on the %s best features" % (kfold, selectKBest)) predicted = cross_val_predict(clf, X_gram_new, y, cv=kfold).tolist() except Exception as e: prettyPrintError(e) return [] return predicted def trainAndTestKFoldSVMSSK(X, y, Xtest, ytest, kfold=10, subseqLength=3, selectKBest=0): """ Trains a SVM with the String Subsequence Kernel (SSK) and tests it using the test data and K-fold cross validation :param X: The matrix of training feature vectors :type X: list :param y: The labels corresponding to the training feature vectors :type y: list :param Xtest: The matrix of test feature vectors :type ytest: The labels corresponding to the test feature vectors :param kfold: The number of CV folds :type kfold: int (default: 10) :param subseqLength: Length of subsequence used by the SSK :type subseqLength: int (default: 3) :param selectKBest: The number of best features to select :type selectKBest: int :return: Two lists depicting the predicted classes for validation and test vectors """ try: # Retrieve Gram matrix from string kernel Xtest_gram = string_kernel(Xtest, Xtest) #TODO: Will there be a different Gram matrix for X? ytest = numpy.array(y) # Define classifier clf = svm.SVC(kernel="precomputed") # Start the cross-validation learning foldCounter = 0 for training_indices, validation_indices in kf.split(X): foldCounter += 1 # Populate training and validation matrices Xtrain, ytrain, Xval, yval = [], [], [], [] index_mapper, index_counter = {}, 0 for ti in training_indices: Xtrain.append(X[ti]) ytrain.append(y[ti]) for vi in validation_indices: Xval.append(X[vi]) yval.append(y[vi]) index_mapper[index_counter] = vi index_counter += 1 # Prepare data Xtrain_gram = string_kernel(Xtrain, Xtrain) Xval_gram = string_kernel(Xval, Xval) # Select K Best features if enabled prettyPrint("Selecting %s best features" % selectKBest) Xtrain_gram_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xtrain_gram, ytrain) if selectKBest > 0 else Xtrain_gram Xval_gram_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xval_gram, y_val) if selectKBest > 0 else Xval_gram Xtest_gram_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xtest_gram, y_test) if selectKBest > 0 else Xtest_gram # Fit model prettyPrint("Fitting model: Fold %s out of %s" % (foldCounter, kfold)) clf.fit(Xtrain_gram_new, ytrain) # Validate and test model prettyPrint("Validating model") temp = clf.predict(Xval_gram_new) for i in range(len(temp)): predicted[index_mapper[i]] = temp[i] temp = clf.predict(Xtest_gram_new) predicted_test = [predicted_test[i]+temp[i] for i in range(len(temp))] if len(predicted_test) == len(temp) else temp # Now average the predicted lists prettyPrint("Testing model") for i in range(len(predicted_test)): predicted_test[i] = 1 if predicted_test[i] >= int(kfold/2) else 0 except Exception as e: prettyPrintError(e) return [], [] return predicted, predicted_test def trainKFoldSVM(X, y, C=1, selectKBest=0, kfold=10): """ Classifies the data using Support vector machines and k-fold CV :param X: The matrix of feature vectors :type X: list :param y: The vector containing the labels corresponding to feature vectors :type y: list :param C: The penalty parameter of the error term :type C: int :param selectKBest: The number of best features to select :type selectKBest: int :param kfold: The number of folds to use in K-fold CV :type kfold: int :return: A list of predicted labels across the k-folds """ try: # Prepare data X, y = numpy.array(X), numpy.array(y) # Define classifier clf = svm.LinearSVC(C=C) # Select K Best features if enabled X_new = SelectKBest(chi2, k=selectKBest).fit_transform(X, y) if selectKBest > 0 else X predicted = cross_val_predict(clf, X_new, y, cv=kfold).tolist() except Exception as e: prettyPrintError(e) return [] return predicted def trainAndTestSVM(X, y, Xtest=[], ytest=[], C=1, selectKBest=0): """ Trains a SVM using the training data and tests it using the test data using K-fold cross validation :param X: The matrix of training feature vectors :type X: list :param y: The labels corresponding to the training feature vectors :type y: list :param Xtest: The matrix of test feature vectors :type Xtest: list :param ytest: The labels corresponding to the test feature vectors :type ytest: list :param C: The penalty parameter of the error term :type C: int :param selectKBest: The number of best features to select :type selectKBest: int :param kfold: The number of folds to use in K-fold CV :type kfold: int :return: Two lists of the validation and test accuracies and the trained classifier """ try: predicted, predicted_test = [], [] # Define classifier and cross validation iterator clf = svm.LinearSVC(C=C) # Start the cross validation learning X, y, Xtest, ytest = numpy.array(X), numpy.array(y), numpy.array(Xtest), numpy.array(ytest) # Select K Best features if enabled prettyPrint("Selecting %s best features from feature vectors" % selectKBest) X_new = SelectKBest(chi2, k=selectKBest).fit_transform(X, y) if selectKBest > 0 else X Xtest_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xtest, ytest) if selectKBest > 0 else Xtest # Fit model prettyPrint("Fitting model") clf.fit(X_new, y) # Validate and test model prettyPrint("Validating model using training data") predicted = clf.predict(X_new) if len(Xtest) > 1 and len(ytest) > 1 and len(Xtest) == len(ytest): prettyPrint("Testing model") predicted_test = clf.predict(Xtest_new) else: predicted_test = [] except Exception as e: prettyPrintError(e) return None, [], [] return clf, predicted, predicted_test def trainAndTestKFoldSVM(X, y, Xtest, ytest, C=1, selectKBest=0, kfold=10): """ Trains a SVM using the training data and tests it using the test data using K-fold cross validation :param X: The matrix of training feature vectors :type X: list :param y: The labels corresponding to the training feature vectors :type y: list :param Xtest: The matrix of test feature vectors :type Xtest: list :param ytest: The labels corresponding to the test feature vectors :type ytest: list :param C: The penalty parameter of the error term :type C: int :param selectKBest: The number of best features to select :type selectKBest: int :param kfold: The number of folds to use in K-fold CV :type kfold: int :return: Two lists of the validation and test accuracies across the 10 folds """ try: predicted, predicted_test = [-1] * len(y), [] # Define classifier and cross validation iterator clf = svm.LinearSVC(C=C) kf = KFold(n_splits=kfold) # Start the cross validation learning Xtest, ytest = numpy.array(Xtest), numpy.array(ytest) foldCounter = 0 for training_indices, validation_indices in kf.split(X): foldCounter += 1 # Populate training and validation matrices Xtrain, ytrain, Xval, yval = [], [], [], [] index_mapper, index_counter = {}, 0 for ti in training_indices: Xtrain.append(X[ti]) ytrain.append(y[ti]) for vi in validation_indices: Xval.append(X[vi]) yval.append(y[vi]) index_mapper[index_counter] = vi index_counter += 1 # Prepare data Xtrain, ytrain, Xval, yval = numpy.array(Xtrain), numpy.array(ytrain), numpy.array(Xval), numpy.array(yval) # Select K Best features if enabled prettyPrint("Selecting %s best features from feature vectors" % selectKBest) Xtrain_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xtrain, ytrain) if selectKBest > 0 else Xtrain Xval_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xval, yval) if selectKBest > 0 else Xval Xtest_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xtest, ytest) if selectKBest > 0 else Xtest # Fit model prettyPrint("Fitting model: Fold %s out of %s" % (foldCounter, kfold)) clf.fit(Xtrain_new, ytrain) # Validate and test model prettyPrint("Validating model") temp = clf.predict(Xval_new) for i in range(len(temp)): predicted[index_mapper[i]] = temp[i] temp = clf.predict(Xtest_new) predicted_test = [predicted_test[i]+temp[i] for i in range(len(temp))] if len(predicted_test) == len(temp) else temp # Now average the predicted lists for i in range(len(predicted_test)): predicted_test[i] = 1 if predicted_test[i] >= int(kfold/2) else 0 except Exception as e: prettyPrintError(e) return [], [] return predicted, predicted_test def trainKFoldRandomForest(X, y, estimators=10, criterion="gini", maxdepth=None, selectKBest=0, kfold=10): """ Classifies the data using decision trees and k-fold CV :param X: The matrix of feature vectors :type X: list :param y: The vector containing labels corresponding to the feature vectors :type y: list :param estimators: The number of random trees to use in classification :type estimators: int :param criterion: The splitting criterion employed by the decision tree :type criterion: str :param splitter: The method used to split the data :type splitter: str :param maxDepth: The maximum depth the tree is allowed to grow :type maxDepth: int :param selectKBest: The number of best features to select :type selectKBest: int :param kfold: The number of folds to use in K-fold CV :type kfold: int :return: A list of predicted labels across the k-folds """ try: # Prepare data X, y = numpy.array(X), numpy.array(y) # Define classifier clf = ensemble.RandomForestClassifier(n_estimators=estimators, criterion=criterion, max_depth=maxdepth) X_new = SelectKBest(chi2, k=selectKBest).fit_transform(X, y) if selectKBest > 0 else X predicted = cross_val_predict(clf, X_new, y, cv=kfold).tolist() except Exception as e: prettyPrintError(e) return [] return predicted def trainAndTestRandomForest(X, y, Xtest=[], ytest=[], estimators=10, criterion="gini", maxdepth=None, selectKBest=0): """ Trains a tree using the training data and tests it using the test data using K-fold cross validation :param Xtr: The matrix of training feature vectors :type Xtr: list :param ytr: The labels corresponding to the training feature vectors :type ytr: list :param Xte: The matrix of test feature vectors :type yte: list :param estimators: The number of random trees to use in classification :type estimators: int :param criterion: The splitting criterion employed by the decision tree :type criterion: str :param maxdepth: The maximum depth the tree is allowed to grow :type maxdepth: int :param selectKBest: The number of best features to select :type selectKBest: int :return: Two lists of the validation and test accuracies and the trained classifier """ try: predicted, predicted_test = [], [] # Define classifier and cross validation iterator clf = ensemble.RandomForestClassifier(n_estimators=estimators, criterion=criterion, max_depth=maxdepth) # Start the cross validation learning X, y, Xtest, ytest = numpy.array(X), numpy.array(y), numpy.array(Xtest), numpy.array(ytest) # Select K Best features if enabled prettyPrint("Selecting %s best features from feature vectors" % selectKBest) X_new = SelectKBest(chi2, k=selectKBest).fit_transform(X, y) if selectKBest > 0 else X Xtest_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xtest, ytest) if selectKBest > 0 else Xtest # Fit model prettyPrint("Fitting model") clf.fit(X_new, y) # Validate and test model prettyPrint("Validating model using training data") predicted = clf.predict(X_new) if len(Xtest) > 1 and len(ytest) > 1 and len(Xtest) == len(ytest): prettyPrint("Testing model") predicted_test = clf.predict(Xtest_new) else: predicted_test = [] except Exception as e: prettyPrintError(e) return None, [], [] return clf, predicted, predicted_test def trainAndTestKFoldRandomForest(X, y, Xtest, ytest, estimators=10, criterion="gini", maxdepth=None, selectKBest=0, kfold=10): """ Trains a tree using the training data and tests it using the test data using K-fold cross validation :param Xtr: The matrix of training feature vectors :type Xtr: list :param ytr: The labels corresponding to the training feature vectors :type ytr: list :param Xte: The matrix of test feature vectors :type yte: list :param estimators: The number of random trees to use in classification :type estimators: int :param criterion: The splitting criterion employed by the decision tree :type criterion: str :param maxdepth: The maximum depth the tree is allowed to grow :type maxdepth: int :param selectKBest: The number of best features to select :type selectKBest: int :param kfold: The number of folds to use in K-fold CV :type kfold: int :return: Two lists of the validation and test accuracies across the 10 folds """ try: predicted, predicted_test = [-1] * len(y), [] # Define classifier and cross validation iterator clf = ensemble.RandomForestClassifier(n_estimators=estimators, criterion=criterion, max_depth=maxdepth) kf = KFold(n_splits=kfold) # Start the cross validation learning Xtest, ytest = numpy.array(Xtest), numpy.array(ytest) foldCounter = 0 for training_indices, validation_indices in kf.split(X): foldCounter += 1 # Populate training and validation matrices Xtrain, ytrain, Xval, yval = [], [], [], [] index_mapper, index_counter = {}, 0 for ti in training_indices: Xtrain.append(X[ti]) ytrain.append(y[ti]) for vi in validation_indices: Xval.append(X[vi]) yval.append(y[vi]) index_mapper[index_counter] = vi index_counter += 1 Xtrain, ytrain, Xval, yval = numpy.array(Xtrain), numpy.array(ytrain), numpy.array(Xval), numpy.array(yval) # Select K Best features if enabled prettyPrint("Selecting %s best features from feature vectors" % selectKBest) Xtrain_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xtrain, ytrain) if selectKBest > 0 else Xtrain Xval_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xval, yval) if selectKBest > 0 else Xval Xtest_new = SelectKBest(chi2, k=selectKBest).fit_transform(Xtest, ytest) if selectKBest > 0 else Xtest # Fit model prettyPrint("Fitting model: Fold %s out of %s" % (foldCounter, kfold)) clf.fit(Xtrain_new, ytrain) # Validate and test model prettyPrint("Validating model") temp = clf.predict(Xval_new) for i in range(len(temp)): predicted[index_mapper[i]] = temp[i] prettyPrint("Testing model") temp = clf.predict(Xtest_new) predicted_test = [predicted_test[i]+temp[i] for i in range(len(temp))] if len(predicted_test) == len(temp) else temp # Now average the predicted lists for i in range(len(predicted_test)): predicted_test[i] = 1 if predicted_test[i] >= int(kfold/2) else 0 except Exception as e: prettyPrintError(e) return [], [] return predicted, predicted_test
43.156593
161
0.6481
4,053
31,418
4.964964
0.0755
0.030363
0.030413
0.023605
0.836655
0.824877
0.808378
0.802564
0.784177
0.777816
0
0.007671
0.265548
31,418
727
162
43.215956
0.864399
0.354319
0
0.78022
0
0
0.054799
0
0
0
0
0.001376
0
1
0.043956
false
0
0.038462
0
0.167582
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
32e2d320ff8642835ec4eb10d5572cb43b03ac59
15,062
py
Python
code/printer.py
JJonahJson/MountainCar-v313
92703d63972979149a68c102c6462c81a2ff401a
[ "MIT" ]
null
null
null
code/printer.py
JJonahJson/MountainCar-v313
92703d63972979149a68c102c6462c81a2ff401a
[ "MIT" ]
null
null
null
code/printer.py
JJonahJson/MountainCar-v313
92703d63972979149a68c102c6462c81a2ff401a
[ "MIT" ]
null
null
null
from colorama import Fore, Style # Initialize the screen title = r""" ██████  ██████  ███  ██  █████  ██  ██████  ██████  ██  ██  ██████ ██  ██ █ ███████  ██████  ██ ██████  ██   ██ ██    ██ ████  ██ ██   ██ ██  ██   ██  ██   ██ ██  ██ ██      ██  ██   ██            ██ ███      ██  ██  ██ ██  ██ ██ ██  ██ ███████ ██  ██  ██  ██  ██ ██  ██ ██  █████   ███████  █████   ██  █████   ██  ██ ██  ██ ██  ██ ██ ██   ██ ██  ██  ██  ██  ██ ██  ██ ██  ██  ██        ██      ██  ██      ██  ██████   ██████  ██   ████ ██  ██ ███████ ██████   ██████   ██████   ██████ ██  ██  ███████  ██████   ██ ██████                                                                                                             """ subtitle = r""" ████████ ██  ██ ███████  ███  ███  ██████  ██  ██ ███  ██ ████████  █████  ██ ███  ██  ██████  █████  ██████  █████  ██████  ██  ██ ███████ ███  ██ ████████ ██  ██ ██████  ███████     ██    ██  ██ ██       ████  ████ ██    ██ ██  ██ ████  ██    ██    ██   ██ ██ ████  ██  ██      ██   ██ ██   ██  ██   ██ ██   ██ ██  ██ ██      ████  ██    ██    ██  ██ ██   ██ ██       ██  ███████ █████  ██ ████ ██ ██  ██ ██  ██ ██ ██  ██  ██  ███████ ██ ██ ██  ██  ██  ███████ ██████   ███████ ██  ██ ██  ██ █████  ██ ██  ██  ██  ██  ██ ██████  █████  ██  ██   ██ ██     ██  ██  ██ ██  ██ ██  ██ ██  ██ ██  ██  ██   ██ ██ ██  ██ ██  ██  ██   ██ ██   ██  ██   ██ ██  ██  ██  ██  ██     ██  ██ ██  ██  ██  ██ ██   ██ ██     ██  ██  ██ ███████  ██      ██  ██████   ██████  ██   ████  ██  ██  ██ ██ ██   ████   ██████ ██  ██ ██  ██  ██  ██ ██████    ████   ███████ ██   ████  ██   ██████  ██  ██ ███████                                                                                                                                                                         """ donald_car1 = r""" `......`` ```` `___.......__.`._______.........` `...`` `__..__._.```` `.````..__. `..__::::::::::__...__._:.`....``.....`._::_::. `._::::::::::::::::::::_.``_:`...`..__::._::::_.::_` ._::::::._....._::::::::::::_.`.`_`__::::._::::___::::.. `__.....___._:::::_____:::::::::_.`..::::::_::::__:_::::__. ``._.:___:__::._::::::::::___:::::::::.._::::_::::__::.::::_..````` __:___:_...._::.::::::::::::::___::::::::_..::_::::_::._::.`.._______. `_._||._:::_._::::::::::::::::::__::::::::_..:::____::.`_____________. ```````` `_..:|:.::..::::::::::::::::::::::________________::_`._______________. ``.......___..:_.|:.....__:::::::::::::::::::_.````........._::_`._________________. `._.::_____....`._::||||||::__.._:::::::::::_..`..___....._____...`.___________________` `|\::\\::_____..:||||::_:::|||||:_..:::::::...:__||:._____.._______..___________________. `::\\:|\\:||__..:|||__....:._:_::||||_..::::.::||_|\\|_|.____._________`.____________.____. ``_|:\\:|\|:\\:`.:||:__._::_:_|:_::_:||||_._:.:::\|_\\\::\|.___`._________`.________.` .___` _`_||\\:|\\:||..:||_:_:::||:\:/\:|\___||||:..`|:|\:_\\\::\\:`__`.__.````___`.______..::` `___``` ._.`::\\:|\\:|_`:||_:__|:_|:_|_||_:|_::_||||: `|_|\:_\\\|:\\|._..__.`. ._.`_____._|||..`.__`._` .__.`_|\|:\\|:`_||::___::_::_:_:::_|_:|..|||.``_::\|_\\\|:|\:`..___`:|: ..__`____._||||_`.__..._` _____.`._.__..`:||_:.|:||_||_||:||_|::|_`:|:`._`:_\\_|\\\|:|..____`:|||.._.__`___..|||||_`.__`... _________..___`:||___|_:|.:|_:|_|:_|:_|_..|:`___.`_|:_|||:.._____._||||:.....`__.`__:|||_`._.`.` ______________`:||:_:|_::_::__|.::.::_|:_.:_`______......_______.`:_:|||......__`_::.:||.`_. ._____________`:||__:|::|_:|:_|.:|_:|_|::___`_.________________.`__:.|:...`..__``:|___.:`..` `_____________`_||__.::_::.::_|_:|::::::__.:`__._______________`..||_:`::|_`._``_:.__:..`. ._._.________.`:|::.::._::::::::::::__.`_.:`.____.___________..__|:_..::|:..`__::.:.:... .__._________`.||::_|__:::::|||:::::|_ :.|..____......_____.`:.::_._.::|.`.:|_:|_:::. ..._...._____`_||::._.:_..:|.||_._:|_. _|_`___._._.._____.`:|_:|.:|__.__:|||:__:||_ .._...._____..:|::._|::_.|.||||:.:_.:|||.`____._______..|||:__:|||__|||||||||||_ .__________..:||:.|:_::|:||:__:|__|||:.``_________.`:||||||||||_`:||||||||||. ``.....``..___::::::::::::::::::|:_`..` ........:|||||||||||:`:||||||||:_` `_::|||||:____.______......`` _::::||||||||||||||_ ._::::_.` `_:||||||||||:::::::::_. `:|||||||||||||||:. `._:|||||||||||::.` `:|||||||||||||:` `...__...` .:||||||||:_` `.____.` """ donald_car2 = r""" . .. . .. .. . .. . . ... . ... ... ... . . . .. .. . . . . .. ... . . . .. ... ... ........ . . ......... .. ...... . .. ... .... .. ...... ... . ......... .. . . . ....... . . . . .............. . . ... . .............. . .. .............. ... ............. . ...... .. ......... .. ............... ... ........ .. .. ........ ... . ................ .. . ... ........ .... ... ....... ... . . .. ......... .. .... .. . .. .. .. ..... .. .. .... ....... . ...... ......... .......... ........ .. ...... . . . . .. . ............ ..... .. . . .. .. ...... . .. . ................. ...... .. . . ... ......... . .................... ............. . .. . . . ....... . . ........................ ................... .. .... . ... .... . .. . .... ...................................... .. . ..... .. .. . .. . . . .. . ... . .......................................... .... ..... ... ... .. . .. ... . ... . .... .................. .................. . ..... .. .... .. . .. . . ... . .... ................ .................. .. ..... . .. . .. . .... . . . ..... ..... ................ .... ............. .. .. ..... . .. ... ....... . . . ..... .... ............... . ... ................ . .. . .. . ... ........... .. .. .... . . ..... .......... ..... .............. ............... ............... . .... . ...... ........... .. . .... ........... ......... ................ ... . . . ................. .. . . ..... ........... ..................... .. ............... . . . ..... ... . ...... . . ........ . . . . ....... ..... . . ....... . .. ........ .. ... .. . ....... . .... . ..... .......... . ...... ........ .. . ...... . .. .... ....... .... . ..... . .. """ def print_title(): print(Fore.RED + title) print(Style.RESET_ALL) def print_subtitle(): print(Fore.YELLOW + subtitle) print(Style.RESET_ALL) def print_car(): print(Fore.BLUE + donald_car2) print(Style.RESET_ALL)
122.455285
224
0.068583
333
15,062
3.192192
0.09009
0.620884
0.778928
0.91063
0.546566
0.523048
0.429915
0.407338
0.331138
0.324553
0
0.000612
0.674479
15,062
122
225
123.459016
0.048338
0.001394
0
0.266055
0
0.192661
0.975924
0.157555
0
0
0
0
0
1
0.027523
false
0
0.009174
0
0.036697
0.082569
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
1
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
fd27a2aa568be0e35b5425fa2204e58d30c184d6
124
py
Python
backend/__init__.py
felixu1992/testing-platform
d7008343c25ec7f47acb670ae5c9b9b5f0593d63
[ "Apache-2.0" ]
null
null
null
backend/__init__.py
felixu1992/testing-platform
d7008343c25ec7f47acb670ae5c9b9b5f0593d63
[ "Apache-2.0" ]
null
null
null
backend/__init__.py
felixu1992/testing-platform
d7008343c25ec7f47acb670ae5c9b9b5f0593d63
[ "Apache-2.0" ]
null
null
null
from backend.settings import * from testing_platform.settings import LOGGER from testing_platform.settings import FILE_REPO
31
47
0.870968
17
124
6.176471
0.529412
0.4
0.361905
0.514286
0.628571
0
0
0
0
0
0
0
0.096774
124
3
48
41.333333
0.9375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
fd476315d5dcf637bacd419329ef3a616ed326f6
151
py
Python
snacks/admin.py
mrobeidat/djangoX-
2dfe14967489c70e8e406c4f008636b410ed76af
[ "MIT" ]
null
null
null
snacks/admin.py
mrobeidat/djangoX-
2dfe14967489c70e8e406c4f008636b410ed76af
[ "MIT" ]
null
null
null
snacks/admin.py
mrobeidat/djangoX-
2dfe14967489c70e8e406c4f008636b410ed76af
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from snacks.models import Snack # Register your models here. admin.site.register(Snack)
21.571429
32
0.801325
22
151
5.5
0.545455
0.198347
0.297521
0.363636
0
0
0
0
0
0
0
0
0.13245
151
7
33
21.571429
0.923664
0.350993
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
b5ded2709653f9476998c2ee63b170b0e12d0cde
41
py
Python
examples/simple-statements-without-trailing-newline.py
maxtan1999/tree-sitter-legesher-python
e9d74b733c8401f3fb12d14c3492874b645cc600
[ "MIT" ]
50
2019-07-25T15:10:29.000Z
2022-03-21T00:54:42.000Z
examples/simple-statements-without-trailing-newline.py
maxtan1999/tree-sitter-legesher-python
e9d74b733c8401f3fb12d14c3492874b645cc600
[ "MIT" ]
77
2019-06-11T18:15:21.000Z
2021-11-05T03:40:26.000Z
examples/simple-statements-without-trailing-newline.py
maxtan1999/tree-sitter-legesher-python
e9d74b733c8401f3fb12d14c3492874b645cc600
[ "MIT" ]
49
2019-09-25T17:46:21.000Z
2021-12-12T19:23:43.000Z
testpasslegesher; testprintlegesher "hi"
20.5
40
0.853659
3
41
11.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.073171
41
1
41
41
0.921053
0
0
0
0
0
0.04878
0
0
0
0
0
0
0
null
null
1
0
null
null
1
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
1
0
7
1ff254d2c67fc1cdf073d09df1fbfa6d82becfcc
151
py
Python
Algorithms/Edge/small-world.py
Kanavoy/UODS
2da38b749e721b051aeaa6a7bcb3a921aeb5a09c
[ "MIT" ]
null
null
null
Algorithms/Edge/small-world.py
Kanavoy/UODS
2da38b749e721b051aeaa6a7bcb3a921aeb5a09c
[ "MIT" ]
null
null
null
Algorithms/Edge/small-world.py
Kanavoy/UODS
2da38b749e721b051aeaa6a7bcb3a921aeb5a09c
[ "MIT" ]
null
null
null
def make_graph(opts): from networkx import newman_watts_strogatz_graph return newman_watts_strogatz_graph(opts.graph.n, opts.graph.e, opts.graph.p)
50.333333
77
0.827815
25
151
4.72
0.56
0.228814
0.322034
0.40678
0
0
0
0
0
0
0
0
0.086093
151
3
77
50.333333
0.855072
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
8
1f0d100310d872facdc8edcdb74a18c547d40d7d
13,211
py
Python
ExamenU1Completo.py
EdwinMiky96/Examen-U1-FP
57f292253df4fdcbf7c4eb2ab27d8f789cab7f13
[ "Apache-2.0" ]
null
null
null
ExamenU1Completo.py
EdwinMiky96/Examen-U1-FP
57f292253df4fdcbf7c4eb2ab27d8f789cab7f13
[ "Apache-2.0" ]
null
null
null
ExamenU1Completo.py
EdwinMiky96/Examen-U1-FP
57f292253df4fdcbf7c4eb2ab27d8f789cab7f13
[ "Apache-2.0" ]
null
null
null
#EJERCICIOS DE EXAMEN UNIDAD 1 E.M.A.Y def AlgoritmoNotaFinalEMAY(): print ("---------------------------------------------------------------") print("Ej. 01: NOTA FINAL DEL CURSO DE FUNDAMENTOS DE PROGRAMACIÓN") print("---------------------------------------------------------------") #Entradas print("Ingrese las cuatro notas del alumno N1, N2, N3, N4 :") N1 = int( input("Nota de la Primera Unidad: ")) N2 = int( input("Nota de la Segunda Unidad: ")) N3 = int( input("Nota de la Tercera Unidad: ")) N4 = int( input("Nota de la Trabajo Final: ")) #Proceso notafinal=int((N1*0.20+N2*0.15+N3*0.15+N4*0.50)) #Salida print ("---------------------------------------------------------------") print("La Nota Final del Alumno es:" ,notafinal) print("---------------------------------------------------------------") def BonoDesempenoDocenteEMAY(): #definir Variables bonoObtenido=0.0 print ("---------------------------------------------------------------") print("Ej. 02: BONO POR DESEMPEÑO DEL DOCENTE") print("---------------------------------------------------------------") #Datos de Endrada salarioMinimo=float(input("Ingrese el salario minimo:")) puntuacionObtenida=float(input("Ingrese la puntuación que ha obtenido:")) #Proceso if puntuacionObtenida<=100 and puntuacionObtenida>=50: bonoObtenido=salarioMinimo*0.10+930 elif puntuacionObtenida >=101 and puntuacionObtenida<=150: bonoObtenido=salarioMinimo*0.40+930 elif puntuacionObtenida>151: bonoObtenido=salarioMinimo*0.70+930 #Datos de salida print ("---------------------------------------------------------------") print("El docente obtendra un bono de:", bonoObtenido ) print ("---------------------------------------------------------------") def VacunasContraelCOVID19EMAY(): print ("---------------------------------------------------------------") print("Ej. 03: VACUNAS DE TIPOS A,B y C CONTRA EL COVID19") print("---------------------------------------------------------------") edad = int (input ('Ingresa el valor de edad: ')) print ('Selecciona el valor de sexo.') print ('1.- mujer') print ('2.- hombre') print ('') sexo = 0 while sexo<1 or sexo>2: sexo = int (input ('Seleccionó la opción: ')) if sexo<1 or sexo>2: print ("---------------------------------------------------------------") print ('Valor incorrecto. Ingresalo nuevamente.') print ("---------------------------------------------------------------") if (sexo==2 and edad>=16 and edad<70) or edad<16: print ("---------------------------------------------------------------") print ("A Usted le corresponde la Vacuna de Tipo: A ") print ("---------------------------------------------------------------") if sexo==1 and edad>=16 and edad<70: print ("---------------------------------------------------------------") print ("A Usted le corresponde la Vacuna de Tipo: B " ) print ("---------------------------------------------------------------") if edad>70: print ("---------------------------------------------------------------") print ("A Usted le corresponde la Vacuna de Tipo: C ") print ("---------------------------------------------------------------") print () def OperacionesMatematicasEMAY(): print ("---------------------------------------------------------------") print("Ej. 04: OPERACIONES ARITMÉTICAS") print("---------------------------------------------------------------") n1 = float(input("Introduce tu primer número: ") ) n2 = float(input("Introduce tu segundo número: ") ) opcion = 0 while True: print(""" Dime, ¿qué quieres hacer? 1) Sumar 2) Restar 3) Multiplicar 4) Dividir 5) Potencia 6) Cambiar los números elegidos 7) Apagar Algoritmo. """) opcion = int(input("Elige una opción: ") ) if opcion == 1: print(" ") print ("---------------------------------------------------------------") print("RESULTADO: La suma de",n1,"+",n2,"es igual a",n1+n2) print ("---------------------------------------------------------------") elif opcion == 2: print(" ") print ("---------------------------------------------------------------") print("RESULTADO: La resta de",n1,"-",n2,"es igual a",n1-n2) print ("---------------------------------------------------------------") elif opcion == 3: print(" ") print ("---------------------------------------------------------------") print("RESULTADO: El producto de",n1,"*",n2,"es igual a",n1*n2) print ("---------------------------------------------------------------") elif opcion == 4: print(" ") print ("---------------------------------------------------------------") print("RESULTADO: El cociente de",n1,"/",n2,"es igual a",n1/n2) print ("---------------------------------------------------------------") elif opcion == 5: print(" ") print ("---------------------------------------------------------------") print("RESULTADO: La potencia de",n1,"**",n2,"es igual a",n1**n2) print ("---------------------------------------------------------------") elif opcion == 6: n1 = float(input("Introduce tu primer número: ") ) n2 = float(input("Introduce tu segundo número: ") ) elif opcion == 7: break else: print ("---------------------------------------------------------------") print("Opción incorrecta") print ("---------------------------------------------------------------") def EjecutandoEjerciciosAnterioresEMAY(): opcion = 0 while True: print(""" Dime, ¿qué ejercicio quieres volver a hacer? 1) AlgoritmoNotaFinalEMAY 2) BonoDesempenoDocenteEMAY 3) VacunasContraelCOVID19EMAY 4) OperacionesMatematicasEMAY 5) TerminarAlgoritmo """) opcion = int(input("Elige una opción: ") ) if opcion == 1: print ("---------------------------------------------------------------") print("Ej. 01: NOTA FINAL DEL CURSO DE FUNDAMENTOS DE PROGRAMACIÓN") print("---------------------------------------------------------------") #Entradas print("Ingrese las cuatro notas del alumno N1, N2,N3, N4 :") N1 = int( input("Nota de la Primera Unidad: ")) N2 = int( input("Nota de la Segunda Unidad: ")) N3 = int( input("Nota de la Tercera Unidad: ")) N4 = int( input("Nota de la Trabajo Final: ")) #Proceso notafinal=int((N1*0.20+N2*0.15+N3*0.15+N4*0.50)) #Salida print ("---------------------------------------------------------------") print("La Nota Final del Alumno es:" ,notafinal) print("---------------------------------------------------------------") elif opcion == 2: print(" ") #definir Variables bonoObtenido=0.0 print ("---------------------------------------------------------------") print("Ej. 02: BONO POR DESEMPEÑO DEL DOCENTE") print("---------------------------------------------------------------") #Datos de Endrada salarioMinimo=float(input("Ingrese el salario minimo:")) puntuacionObtenida=float(input("Ingrese la puntuación que ha obtenido:")) #Proceso if puntuacionObtenida<=100 and puntuacionObtenida>=50: bonoObtenido=salarioMinimo*0.10+930 elif puntuacionObtenida >=101 and puntuacionObtenida<=150: bonoObtenido=salarioMinimo*0.40+930 elif puntuacionObtenida>151: bonoObtenido=salarioMinimo*0.70+930 #Datos de salida print ("---------------------------------------------------------------") print("El docente obtendra un bono de:", bonoObtenido ) print ("---------------------------------------------------------------") elif opcion == 3: print(" ") print ("---------------------------------------------------------------") print("Ej. 03: VACUNAS DE TIPOS A,B y C CONTRA EL COVID19") print("---------------------------------------------------------------") edad = int (input ('Ingresa el valor de edad: ')) print ('Selecciona el valor de sexo.') print ('1.- mujer') print ('2.- hombre') print ('') sexo = 0 while sexo<1 or sexo>2: sexo = int (input ('Seleccionó la opción: ')) if sexo<1 or sexo>2: print ("---------------------------------------------------------------") print ('Valor incorrecto. Ingresalo nuevamente.') print ("---------------------------------------------------------------") if (sexo==2 and edad>=16 and edad<70) or edad<16: print ("---------------------------------------------------------------") print ("A Usted le corresponde la Vacuna de Tipo: A ") print ("---------------------------------------------------------------") if sexo==1 and edad>=16 and edad<70: print ("---------------------------------------------------------------") print ("A Usted le corresponde la Vacuna de Tipo: B " ) print ("---------------------------------------------------------------") if edad>70: print ("---------------------------------------------------------------") print ("A Usted le corresponde la Vacuna de Tipo: C ") print ("---------------------------------------------------------------") print () elif opcion == 4: print(" ") print ("---------------------------------------------------------------") print("Ej. 04: OPERACIONES ARITMÉTICAS") print("---------------------------------------------------------------") n1 = float(input("Introduce tu primer número: ") ) n2 = float(input("Introduce tu segundo número: ") ) opcion = 0 while True: print(""" Dime, ¿qué quieres hacer? 1) Sumar 2) Restar 3) Multiplicar 4) Dividir 5) Potencia 6) Cambiar los números elegidos 7) Apagar Algoritmo. """) opcion = int(input("Elige una opción: ") ) if opcion == 1: print(" ") print ("---------------------------------------------------------------") print("RESULTADO: La suma de",n1,"+",n2,"es igual a",n1+n2) print ("---------------------------------------------------------------") elif opcion == 2: print(" ") print ("---------------------------------------------------------------") print("RESULTADO: La resta de",n1,"-",n2,"es igual a",n1-n2) print ("---------------------------------------------------------------") elif opcion == 3: print(" ") print ("---------------------------------------------------------------") print("RESULTADO: El producto de",n1,"*",n2,"es igual a",n1*n2) print ("---------------------------------------------------------------") elif opcion == 4: print(" ") print ("---------------------------------------------------------------") print("RESULTADO: El cociente de",n1,"/",n2,"es igual a",n1/n2) print ("---------------------------------------------------------------") elif opcion == 5: print(" ") print ("---------------------------------------------------------------") print("RESULTADO: La potencia de",n1,"**",n2,"es igual a",n1**n2) print ("---------------------------------------------------------------") elif opcion == 6: n1 = float(input("Introduce tu primer número: ") ) n2 = float(input("Introduce tu segundo número: ") ) elif opcion == 7: break else: print ("---------------------------------------------------------------") print("Opción incorrecta") print ("---------------------------------------------------------------") elif opcion == 5: break else: print ("---------------------------------------------------------------") print("Opción incorrecta") print ("---------------------------------------------------------------") AlgoritmoNotaFinalEMAY() #BonoDesempenoDocenteEMAY() #VacunasContraelCOVID19EMAY() #OperacionesMatematicasEMAY() #EjecutandoEjerciciosAnterioresEMAY()
47.693141
91
0.35092
992
13,211
4.676411
0.15625
0.101315
0.045268
0.051735
0.899332
0.895883
0.895883
0.880362
0.874111
0.874111
0
0.027458
0.244645
13,211
277
92
47.693141
0.437118
0.023238
0
0.95082
0
0
0.543924
0.330281
0
0
0
0
0
1
0.020492
false
0
0
0
0.020492
0.520492
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
9
1f5c0ce2ea385bdb388b3df134485f91153b3573
92
py
Python
components/me/Me_tpl.py
bitbuit/billterm
553bf2afb6ff2c1e15becbe1b4ab59346e5a87b5
[ "MIT" ]
null
null
null
components/me/Me_tpl.py
bitbuit/billterm
553bf2afb6ff2c1e15becbe1b4ab59346e5a87b5
[ "MIT" ]
null
null
null
components/me/Me_tpl.py
bitbuit/billterm
553bf2afb6ff2c1e15becbe1b4ab59346e5a87b5
[ "MIT" ]
null
null
null
from components.company.Company_tpl import Company_tpl class Me_tpl(Company_tpl): pass
18.4
54
0.815217
14
92
5.071429
0.571429
0.422535
0
0
0
0
0
0
0
0
0
0
0.130435
92
4
55
23
0.8875
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
7
1f67f28791b70eeecfa4dd1f5a80b7c496e83fea
220
py
Python
pymonad/functor/functor.py
Wildhoney/Pymonad
177989b3d0f362c3bf3af962d89306309ff000c3
[ "MIT" ]
null
null
null
pymonad/functor/functor.py
Wildhoney/Pymonad
177989b3d0f362c3bf3af962d89306309ff000c3
[ "MIT" ]
null
null
null
pymonad/functor/functor.py
Wildhoney/Pymonad
177989b3d0f362c3bf3af962d89306309ff000c3
[ "MIT" ]
null
null
null
class Functor: def __init__(self, value=None): self.value = value def __rshift__(self, value): return self.map(value) def __or__(self, default_value): return self.get(default_value)
22
38
0.645455
28
220
4.571429
0.464286
0.210938
0.234375
0
0
0
0
0
0
0
0
0
0.254545
220
9
39
24.444444
0.780488
0
0
0
0
0
0
0
0
0
0
0
0
1
0.428571
false
0
0
0.285714
0.857143
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
7
2f665150c9b40027add5f9e98d32f0f23f16fab5
36
py
Python
sweep/main.py
nismod/sweep
b633a723f462f88db9a3b001377447fc3c58fddb
[ "MIT" ]
null
null
null
sweep/main.py
nismod/sweep
b633a723f462f88db9a3b001377447fc3c58fddb
[ "MIT" ]
null
null
null
sweep/main.py
nismod/sweep
b633a723f462f88db9a3b001377447fc3c58fddb
[ "MIT" ]
null
null
null
""" """ def test_dumy(): return
7.2
16
0.5
4
36
4.25
1
0
0
0
0
0
0
0
0
0
0
0
0.25
36
5
17
7.2
0.62963
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
true
0
0
0.5
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
7
2f917e1e77d4283ddeee9802e966fdaf991038c0
175
py
Python
tomasula-simulator/clock_mgr.py
SwapnilBhosale/tomasula-simulator
2ae152e0574159314ccf7fc298b82d6865a03169
[ "Apache-2.0" ]
null
null
null
tomasula-simulator/clock_mgr.py
SwapnilBhosale/tomasula-simulator
2ae152e0574159314ccf7fc298b82d6865a03169
[ "Apache-2.0" ]
null
null
null
tomasula-simulator/clock_mgr.py
SwapnilBhosale/tomasula-simulator
2ae152e0574159314ccf7fc298b82d6865a03169
[ "Apache-2.0" ]
null
null
null
class ClockMgr: def __init__(self): self.clock = 1 def get_clock(self): return self.clock def increament_clock(self): self.clock += 1
13.461538
31
0.582857
22
175
4.363636
0.454545
0.28125
0.270833
0.291667
0
0
0
0
0
0
0
0.016949
0.325714
175
12
32
14.583333
0.79661
0
0
0
0
0
0
0
0
0
0
0
0
1
0.428571
false
0
0
0.142857
0.714286
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
7
2f977d1031901fa40013ff816dcbcc9042a89dd4
20,551
py
Python
pyradox/convnets/inceptionnet.py
p4vv37/pyradox
cfc8c07d637a1cc189dd8d200f8a55d00405b81f
[ "MIT" ]
61
2021-01-10T09:31:32.000Z
2022-02-13T13:30:48.000Z
pyradox/convnets/inceptionnet.py
p4vv37/pyradox
cfc8c07d637a1cc189dd8d200f8a55d00405b81f
[ "MIT" ]
1
2021-04-24T12:03:19.000Z
2021-04-24T12:03:19.000Z
pyradox/convnets/inceptionnet.py
p4vv37/pyradox
cfc8c07d637a1cc189dd8d200f8a55d00405b81f
[ "MIT" ]
6
2021-01-17T16:17:35.000Z
2022-02-13T13:30:49.000Z
import math, copy from functools import reduce from tensorflow.keras import layers from pyradox.modules import * from tensorflow.keras.activations import swish from tensorflow.nn import relu6 def relu(x): return layers.ReLU()(x) def hard_sigmoid(x): return layers.ReLU(6.0)(x + 3.0) * (1.0 / 6.0) def hard_swish(x): return layers.Multiply()([hard_sigmoid(x), x]) class InceptionV3(layers.Layer): """Customized Implementation of Inception Net Args: use_bias (bool): whether the convolution layers use a bias vector, default: False activation (keras Activation): activation to be applied, default: relu dropout (float): the dropout rate, default: 0 kwargs (keyword arguments): the arguments for Convolution Layer """ def __init__(self, use_bias=False, activation="relu", dropout=0, **kwargs): super().__init__() self.use_bias = use_bias self.activation = activation self.dropout = dropout self.kwargs = kwargs def __call__(self, inputs): x = inputs x = InceptionConv( 32, (3, 3), (2, 2), "valid", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) x = InceptionConv( 32, (3, 3), (1, 1), "valid", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) x = InceptionConv( 64, (3, 3), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) x = layers.MaxPooling2D((3, 3), strides=(2, 2))(x) x = InceptionConv( 80, (1, 1), (1, 1), "valid", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) x = InceptionConv( 192, (3, 3), (1, 1), "valid", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) x = layers.MaxPooling2D((3, 3), strides=(2, 2))(x) # mixed 0 branch1x1 = InceptionConv( 64, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch5x5 = InceptionConv( 48, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch5x5 = InceptionConv( 64, (5, 5), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch5x5) branch3x3dbl = InceptionConv( 64, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch3x3dbl = InceptionConv( 96, (3, 3), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch3x3dbl) branch3x3dbl = InceptionConv( 96, (3, 3), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch3x3dbl) branch_pool = layers.AveragePooling2D((3, 3), strides=(1, 1), padding="same")(x) branch_pool = InceptionConv( 32, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch_pool) x = layers.concatenate( [branch1x1, branch5x5, branch3x3dbl, branch_pool], ) # mixed 1, 2 for _ in range(2): branch1x1 = InceptionConv( 64, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch5x5 = InceptionConv( 48, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch5x5 = InceptionConv( 64, (5, 5), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch5x5) branch3x3dbl = InceptionConv( 64, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch3x3dbl = InceptionConv( 96, (3, 3), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch3x3dbl) branch3x3dbl = InceptionConv( 96, (3, 3), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch3x3dbl) branch_pool = layers.AveragePooling2D( (3, 3), strides=(1, 1), padding="same" )(x) branch_pool = InceptionConv( 64, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch_pool) x = layers.concatenate( [branch1x1, branch5x5, branch3x3dbl, branch_pool], ) # mixed 3 branch3x3 = InceptionConv( 384, (3, 3), (2, 2), "valid", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch3x3dbl = InceptionConv( 64, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch3x3dbl = InceptionConv( 96, (3, 3), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch3x3dbl) branch3x3dbl = InceptionConv( 96, (3, 3), (2, 2), "valid", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch3x3dbl) branch_pool = layers.MaxPooling2D((3, 3), strides=(2, 2))(x) x = layers.concatenate([branch3x3, branch3x3dbl, branch_pool]) # mixed 4 branch1x1 = InceptionConv( 192, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch7x7 = InceptionConv( 128, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch7x7 = InceptionConv( 128, (1, 7), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7) branch7x7 = InceptionConv( 192, (7, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7) branch7x7dbl = InceptionConv( 128, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch7x7dbl = InceptionConv( 128, (7, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7dbl) branch7x7dbl = InceptionConv( 128, (1, 7), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7dbl) branch7x7dbl = InceptionConv( 128, (7, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7dbl) branch7x7dbl = InceptionConv( 192, (1, 7), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7dbl) branch_pool = layers.AveragePooling2D((3, 3), strides=(1, 1), padding="same")(x) branch_pool = InceptionConv( 192, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch_pool) x = layers.concatenate([branch1x1, branch7x7, branch7x7dbl, branch_pool]) # mixed 5, 6 for _ in range(2): branch1x1 = InceptionConv( 192, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch7x7 = InceptionConv( 160, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch7x7 = InceptionConv( 160, (1, 7), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7) branch7x7 = InceptionConv( 192, (7, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7) branch7x7dbl = InceptionConv( 160, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch7x7dbl = InceptionConv( 160, (7, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7dbl) branch7x7dbl = InceptionConv( 160, (1, 7), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7dbl) branch7x7dbl = InceptionConv( 160, (7, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7dbl) branch7x7dbl = InceptionConv( 192, (1, 7), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7dbl) branch_pool = layers.AveragePooling2D( (3, 3), strides=(1, 1), padding="same" )(x) branch_pool = InceptionConv( 192, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch_pool) x = layers.concatenate([branch1x1, branch7x7, branch7x7dbl, branch_pool]) # mixed 7 branch1x1 = InceptionConv( 192, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch7x7 = InceptionConv( 192, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch7x7 = InceptionConv( 192, (1, 7), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7) branch7x7 = InceptionConv( 192, (7, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7) branch7x7dbl = InceptionConv( 192, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch7x7dbl = InceptionConv( 192, (7, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7dbl) branch7x7dbl = InceptionConv( 192, (1, 7), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7dbl) branch7x7dbl = InceptionConv( 192, (7, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7dbl) branch7x7dbl = InceptionConv( 192, (1, 7), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7dbl) branch_pool = layers.AveragePooling2D((3, 3), strides=(1, 1), padding="same")(x) branch_pool = InceptionConv( 192, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch_pool) x = layers.concatenate([branch1x1, branch7x7, branch7x7dbl, branch_pool]) # mixed 8 branch3x3 = InceptionConv( 192, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch3x3 = InceptionConv( 320, (3, 3), (2, 2), "valid", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch3x3) branch7x7x3 = InceptionConv( 192, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch7x7x3 = InceptionConv( 192, (1, 7), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7x3) branch7x7x3 = InceptionConv( 192, (7, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7x3) branch7x7x3 = InceptionConv( 192, (3, 3), (2, 2), "valid", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch7x7x3) branch_pool = layers.MaxPooling2D((3, 3), strides=(2, 2))(x) x = layers.concatenate([branch3x3, branch7x7x3, branch_pool]) # mixed 9, 10 for _ in range(2): branch1x1 = InceptionConv( 320, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch3x3 = InceptionConv( 384, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch3x3_1 = InceptionConv( 384, (1, 3), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch3x3) branch3x3_2 = InceptionConv( 384, (3, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch3x3) branch3x3 = layers.concatenate([branch3x3_1, branch3x3_2]) branch3x3dbl = InceptionConv( 448, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(x) branch3x3dbl = InceptionConv( 384, (3, 3), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch3x3dbl) branch3x3dbl_1 = InceptionConv( 384, (1, 3), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch3x3dbl) branch3x3dbl_2 = InceptionConv( 384, (3, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch3x3dbl) branch3x3dbl = layers.concatenate([branch3x3dbl_1, branch3x3dbl_2]) branch_pool = layers.AveragePooling2D( (3, 3), strides=(1, 1), padding="same" )(x) branch_pool = InceptionConv( 192, (1, 1), (1, 1), "same", self.use_bias, self.activation, self.dropout, **self.kwargs, )(branch_pool) x = layers.concatenate([branch1x1, branch3x3, branch3x3dbl, branch_pool]) return x
25.948232
103
0.381393
1,600
20,551
4.82
0.061875
0.035529
0.099844
0.187889
0.867998
0.865664
0.858532
0.858532
0.858532
0.858402
0
0.078408
0.510973
20,551
792
104
25.948232
0.688955
0.02141
0
0.952381
0
0
0.015343
0
0
0
0
0
0
1
0.006803
false
0
0.008163
0.004082
0.021769
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
85eef069e0b28633af514c4979948b6d70b0f12c
18,203
py
Python
msgraph-cli-extensions/v1_0/usersfunctions_v1_0/azext_usersfunctions_v1_0/generated/_help.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
msgraph-cli-extensions/v1_0/usersfunctions_v1_0/azext_usersfunctions_v1_0/generated/_help.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
msgraph-cli-extensions/v1_0/usersfunctions_v1_0/azext_usersfunctions_v1_0/generated/_help.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- # pylint: disable=too-many-lines from knack.help_files import helps helps['usersfunctions_v1_0'] = ''' type: group short-summary: Manage Users Functions ''' helps['usersfunctions user-activity'] = """ type: group short-summary: Manage user activity with usersfunctions_v1_0 """ helps['usersfunctions user-activity recent'] = """ type: command short-summary: "Invoke function recent." """ helps['usersfunctions user-calendar-calendar-view-calendar'] = """ type: group short-summary: Manage user calendar calendar view calendar with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-calendar-view-calendar allowed-calendar-sharing-role'] = """ type: command short-summary: "Invoke function allowedCalendarSharingRoles." """ helps['usersfunctions user-calendar-calendar-view-instance'] = """ type: group short-summary: Manage user calendar calendar view instance with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-calendar-view-instance delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-calendar-view'] = """ type: group short-summary: Manage user calendar calendar view with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-calendar-view delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-event-calendar'] = """ type: group short-summary: Manage user calendar event calendar with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-event-calendar allowed-calendar-sharing-role'] = """ type: command short-summary: "Invoke function allowedCalendarSharingRoles." """ helps['usersfunctions user-calendar-event-instance'] = """ type: group short-summary: Manage user calendar event instance with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-event-instance delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-event'] = """ type: group short-summary: Manage user calendar event with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-event delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar'] = """ type: group short-summary: Manage user calendar with usersfunctions_v1_0 """ helps['usersfunctions user-calendar allowed-calendar-sharing-role'] = """ type: command short-summary: "Invoke function allowedCalendarSharingRoles." """ helps['usersfunctions user-calendar-group-calendar-calendar-view-calendar'] = """ type: group short-summary: Manage user calendar group calendar calendar view calendar with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-group-calendar-calendar-view-calendar allowed-calendar-sharing-role'] = """ type: command short-summary: "Invoke function allowedCalendarSharingRoles." """ helps['usersfunctions user-calendar-group-calendar-calendar-view-instance'] = """ type: group short-summary: Manage user calendar group calendar calendar view instance with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-group-calendar-calendar-view-instance delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-group-calendar-calendar-view'] = """ type: group short-summary: Manage user calendar group calendar calendar view with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-group-calendar-calendar-view delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-group-calendar-event-calendar'] = """ type: group short-summary: Manage user calendar group calendar event calendar with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-group-calendar-event-calendar allowed-calendar-sharing-role'] = """ type: command short-summary: "Invoke function allowedCalendarSharingRoles." """ helps['usersfunctions user-calendar-group-calendar-event-instance'] = """ type: group short-summary: Manage user calendar group calendar event instance with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-group-calendar-event-instance delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-group-calendar-event'] = """ type: group short-summary: Manage user calendar group calendar event with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-group-calendar-event delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-group-calendar'] = """ type: group short-summary: Manage user calendar group calendar with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-group-calendar allowed-calendar-sharing-role'] = """ type: command short-summary: "Invoke function allowedCalendarSharingRoles." """ helps['usersfunctions user-calendar-calendar-view-calendar'] = """ type: group short-summary: Manage user calendar calendar view calendar with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-calendar-view-calendar allowed-calendar-sharing-role'] = """ type: command short-summary: "Invoke function allowedCalendarSharingRoles." """ helps['usersfunctions user-calendar-calendar-view-instance'] = """ type: group short-summary: Manage user calendar calendar view instance with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-calendar-view-instance delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-calendar-view'] = """ type: group short-summary: Manage user calendar calendar view with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-calendar-view delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-event-calendar'] = """ type: group short-summary: Manage user calendar event calendar with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-event-calendar allowed-calendar-sharing-role'] = """ type: command short-summary: "Invoke function allowedCalendarSharingRoles." """ helps['usersfunctions user-calendar-event-instance'] = """ type: group short-summary: Manage user calendar event instance with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-event-instance delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-event'] = """ type: group short-summary: Manage user calendar event with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-event delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar'] = """ type: group short-summary: Manage user calendar with usersfunctions_v1_0 """ helps['usersfunctions user-calendar allowed-calendar-sharing-role'] = """ type: command short-summary: "Invoke function allowedCalendarSharingRoles." """ helps['usersfunctions user-calendar-view-calendar-calendar-view'] = """ type: group short-summary: Manage user calendar view calendar calendar view with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-view-calendar-calendar-view delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-view-calendar-event'] = """ type: group short-summary: Manage user calendar view calendar event with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-view-calendar-event delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-view-calendar'] = """ type: group short-summary: Manage user calendar view calendar with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-view-calendar allowed-calendar-sharing-role'] = """ type: command short-summary: "Invoke function allowedCalendarSharingRoles." """ helps['usersfunctions user-calendar-view-instance'] = """ type: group short-summary: Manage user calendar view instance with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-view-instance delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-calendar-view'] = """ type: group short-summary: Manage user calendar view with usersfunctions_v1_0 """ helps['usersfunctions user-calendar-view delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-contact-folder-child-folder'] = """ type: group short-summary: Manage user contact folder child folder with usersfunctions_v1_0 """ helps['usersfunctions user-contact-folder-child-folder delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-contact-folder-contact'] = """ type: group short-summary: Manage user contact folder contact with usersfunctions_v1_0 """ helps['usersfunctions user-contact-folder-contact delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-contact-folder'] = """ type: group short-summary: Manage user contact folder with usersfunctions_v1_0 """ helps['usersfunctions user-contact-folder delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-contact'] = """ type: group short-summary: Manage user contact with usersfunctions_v1_0 """ helps['usersfunctions user-contact delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-event-calendar-calendar-view'] = """ type: group short-summary: Manage user event calendar calendar view with usersfunctions_v1_0 """ helps['usersfunctions user-event-calendar-calendar-view delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-event-calendar-event'] = """ type: group short-summary: Manage user event calendar event with usersfunctions_v1_0 """ helps['usersfunctions user-event-calendar-event delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-event-calendar'] = """ type: group short-summary: Manage user event calendar with usersfunctions_v1_0 """ helps['usersfunctions user-event-calendar allowed-calendar-sharing-role'] = """ type: command short-summary: "Invoke function allowedCalendarSharingRoles." """ helps['usersfunctions user-event-instance'] = """ type: group short-summary: Manage user event instance with usersfunctions_v1_0 """ helps['usersfunctions user-event-instance delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-event'] = """ type: group short-summary: Manage user event with usersfunctions_v1_0 """ helps['usersfunctions user-event delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-mail-folder-child-folder'] = """ type: group short-summary: Manage user mail folder child folder with usersfunctions_v1_0 """ helps['usersfunctions user-mail-folder-child-folder delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-mail-folder-message'] = """ type: group short-summary: Manage user mail folder message with usersfunctions_v1_0 """ helps['usersfunctions user-mail-folder-message delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-mail-folder'] = """ type: group short-summary: Manage user mail folder with usersfunctions_v1_0 """ helps['usersfunctions user-mail-folder delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user-managed-app-registration'] = """ type: group short-summary: Manage user managed app registration with usersfunctions_v1_0 """ helps['usersfunctions user-managed-app-registration show-user-id-with-flagged-app-registration'] = """ type: command short-summary: "Invoke function getUserIdsWithFlaggedAppRegistration." """ helps['usersfunctions user-message'] = """ type: group short-summary: Manage user message with usersfunctions_v1_0 """ helps['usersfunctions user-message delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user'] = """ type: group short-summary: Manage user with usersfunctions_v1_0 """ helps['usersfunctions user delta'] = """ type: command short-summary: "Invoke function delta." """ helps['usersfunctions user reminder-view'] = """ type: command short-summary: "Invoke function reminderView." """ helps['usersfunctions user show-managed-app-diagnostic-statuses'] = """ type: command short-summary: "Invoke function getManagedAppDiagnosticStatuses." """ helps['usersfunctions user show-managed-app-policy'] = """ type: command short-summary: "Invoke function getManagedAppPolicies." """ helps['usersfunctions user-onenote-notebook-section-group-section-page'] = """ type: group short-summary: Manage user onenote notebook section group section page with usersfunctions_v1_0 """ helps['usersfunctions user-onenote-notebook-section-group-section-page preview'] = """ type: command short-summary: "Invoke function preview." """ helps['usersfunctions user-onenote-notebook-section-page'] = """ type: group short-summary: Manage user onenote notebook section page with usersfunctions_v1_0 """ helps['usersfunctions user-onenote-notebook-section-page preview'] = """ type: command short-summary: "Invoke function preview." """ helps['usersfunctions user-onenote-notebook'] = """ type: group short-summary: Manage user onenote notebook with usersfunctions_v1_0 """ helps['usersfunctions user-onenote-notebook show-recent-notebook'] = """ type: command short-summary: "Invoke function getRecentNotebooks." """ helps['usersfunctions user-onenote-page'] = """ type: group short-summary: Manage user onenote page with usersfunctions_v1_0 """ helps['usersfunctions user-onenote-page preview'] = """ type: command short-summary: "Invoke function preview." """ helps['usersfunctions user-onenote-page-parent-notebook-section-group-section-page'] = """ type: group short-summary: Manage user onenote page parent notebook section group section page with usersfunctions_v1_0 """ helps['usersfunctions user-onenote-page-parent-notebook-section-group-section-page preview'] = """ type: command short-summary: "Invoke function preview." """ helps['usersfunctions user-onenote-page-parent-notebook-section-page'] = """ type: group short-summary: Manage user onenote page parent notebook section page with usersfunctions_v1_0 """ helps['usersfunctions user-onenote-page-parent-notebook-section-page preview'] = """ type: command short-summary: "Invoke function preview." """ helps['usersfunctions user-onenote-page-parent-section-page'] = """ type: group short-summary: Manage user onenote page parent section page with usersfunctions_v1_0 """ helps['usersfunctions user-onenote-page-parent-section-page preview'] = """ type: command short-summary: "Invoke function preview." """ helps['usersfunctions user-onenote-section-group-parent-notebook-section-page'] = """ type: group short-summary: Manage user onenote section group parent notebook section page with usersfunctions_v1_0 """ helps['usersfunctions user-onenote-section-group-parent-notebook-section-page preview'] = """ type: command short-summary: "Invoke function preview." """ helps['usersfunctions user-onenote-section-group-section-page'] = """ type: group short-summary: Manage user onenote section group section page with usersfunctions_v1_0 """ helps['usersfunctions user-onenote-section-group-section-page preview'] = """ type: command short-summary: "Invoke function preview." """ helps['usersfunctions user-onenote-section-page'] = """ type: group short-summary: Manage user onenote section page with usersfunctions_v1_0 """ helps['usersfunctions user-onenote-section-page preview'] = """ type: command short-summary: "Invoke function preview." """ helps['usersfunctions user-outlook'] = """ type: group short-summary: Manage user outlook with usersfunctions_v1_0 """ helps['usersfunctions user-outlook supported-language'] = """ type: command short-summary: "Invoke function supportedLanguages." """ helps['usersfunctions user-outlook supported-time-zone-ee48'] = """ type: command short-summary: "Invoke function supportedTimeZones." """ helps['usersfunctions user-outlook supported-time-zones51-c6'] = """ type: command short-summary: "Invoke function supportedTimeZones." """
31.712544
112
0.698511
1,979
18,203
6.369884
0.055584
0.168809
0.202523
0.105823
0.944868
0.939077
0.892512
0.866254
0.836189
0.7736
0
0.007513
0.173708
18,203
573
113
31.767888
0.830596
0.02582
0
0.703786
0
0.004454
0.866639
0.202344
0
0
0
0
0
1
0
true
0
0.002227
0
0.002227
0
0
0
0
null
0
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
10
c0c4fd364967ac96cf25028b1023e36639ac6e9f
5,054
py
Python
test/sync_tests/test_call.py
livioribeiro/dependency-injector
ab76415233d7e6f82ff13479d10c2aa0f100c173
[ "Unlicense" ]
1
2021-08-13T20:23:56.000Z
2021-08-13T20:23:56.000Z
test/sync_tests/test_call.py
livioribeiro/dependency-injector
ab76415233d7e6f82ff13479d10c2aa0f100c173
[ "Unlicense" ]
null
null
null
test/sync_tests/test_call.py
livioribeiro/dependency-injector
ab76415233d7e6f82ff13479d10c2aa0f100c173
[ "Unlicense" ]
null
null
null
import pytest from dependency_injector import Scope, SyncContainer from dependency_injector.errors import CalledNonCallableError from ..utils import Context class ServiceSingleton: pass class ServiceTransient: pass class ServiceDependent: pass @pytest.fixture def ioc(): container = SyncContainer() container.register(ServiceSingleton, Scope.SINGLETON) container.register(ServiceTransient, Scope.TRANSIENT) container.register(ServiceDependent, Scope.DEPENDENT) return container def test_call_function(ioc): def func(service: ServiceSingleton): return service result = ioc.call(func) assert isinstance(result, ServiceSingleton) def test_call_async_function(ioc): async def func(service: ServiceSingleton): return service result = ioc.call(func) assert isinstance(result, ServiceSingleton) def test_call_function_multipe_services(ioc): def func(service1: ServiceSingleton, service2: ServiceTransient): return service1, service2 service1, service2 = ioc.call(func) assert isinstance(service1, ServiceSingleton) assert isinstance(service2, ServiceTransient) def test_call_async_function_multipe_services(ioc): async def func(service1: ServiceSingleton, service2: ServiceTransient): return service1, service2 service1, service2 = ioc.call(func) assert isinstance(service1, ServiceSingleton) assert isinstance(service2, ServiceTransient) def test_call_function_kwargs(ioc): def func(service1: ServiceSingleton, a): return service1, a service1, a = ioc.call(func, kwargs={"a": 1}) assert isinstance(service1, ServiceSingleton) assert a == 1 def test_call_async_function_kwargs(ioc): async def func(service1: ServiceSingleton, a): return service1, a service1, a = ioc.call(func, kwargs={"a": 1}) assert isinstance(service1, ServiceSingleton) assert a == 1 def test_call_function_args(ioc): def func(a, service1: ServiceSingleton): return a, service1 a, service1 = ioc.call(func, args=[1]) assert isinstance(service1, ServiceSingleton) assert a == 1 def test_call_async_function_args(ioc): async def func(a, service1: ServiceSingleton): return a, service1 a, service1 = ioc.call(func, args=[1]) assert isinstance(service1, ServiceSingleton) assert a == 1 def test_call_function_args_keyword_only(ioc): def func1(service1: ServiceSingleton, *, a: int): return service1, a def func2(a: int, *, service2: ServiceTransient): return a, service2 result1, a1 = ioc.call(func1, kwargs={"a": 1}) a2, result2 = ioc.call(func2, kwargs={"a": 2}) assert isinstance(result1, ServiceSingleton) assert a1 == 1 assert isinstance(result2, ServiceTransient) assert a2 == 2 def test_call_async_function_args_keyword_only(ioc): async def func1(service1: ServiceSingleton, *, a: int): return service1, a async def func2(a: int, *, service2: ServiceTransient): return a, service2 result1, a1 = ioc.call(func1, kwargs={"a": 1}) a2, result2 = ioc.call(func2, kwargs={"a": 2}) assert isinstance(result1, ServiceSingleton) assert a1 == 1 assert isinstance(result2, ServiceTransient) assert a2 == 2 def test_call_function_param_after_dependencies_should_fail(ioc): def func(a, service1: ServiceSingleton): pass with pytest.raises(Exception): ioc.call(func, [1]) def test_call_async_function_param_after_dependencies_should_fail(ioc): async def func(a, service1: ServiceSingleton): pass with pytest.raises(Exception): ioc.call(func, [1]) def test_call_function_with_context(ioc): def func(service: ServiceDependent): return service context = Context() result = ioc.call(func, context=context) assert isinstance(result, ServiceDependent) assert id(context) in ioc.store_dependent def test_call_async_function_with_context(ioc): async def func(service: ServiceDependent): return service context = Context() result = ioc.call(func, context=context) assert isinstance(result, ServiceDependent) assert id(context) in ioc.store_dependent def test_call_callable_object(ioc): class CallableClass: def __call__(self, service: ServiceSingleton): return service callable_object = CallableClass() result = ioc.call(callable_object) assert isinstance(result, ServiceSingleton) def test_call_async_callable_object(ioc): class CallableClass: async def __call__(self, service: ServiceSingleton): return service callable_object = CallableClass() result = ioc.call(callable_object) assert isinstance(result, ServiceSingleton) def test_call_non_callable_object_should_fail(ioc): class NonCallableClass: pass non_callable_object = NonCallableClass() with pytest.raises(CalledNonCallableError): ioc.call(non_callable_object)
25.019802
75
0.71666
580
5,054
6.07931
0.118966
0.03772
0.053035
0.036302
0.807714
0.76177
0.749007
0.72093
0.718094
0.689166
0
0.020679
0.19628
5,054
201
76
25.144279
0.847366
0
0
0.620155
0
0
0.001187
0
0
0
0
0
0.217054
1
0.209302
false
0.046512
0.031008
0.062016
0.418605
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
7
c0fc3d2b2ed432303d0ae21ebe35498bdf045e90
28,182
py
Python
Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
6
2021-07-05T16:09:39.000Z
2022-03-06T22:44:42.000Z
Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
7
2022-03-15T13:25:39.000Z
2022-03-15T13:25:44.000Z
Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
null
null
null
# Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above # copyright notice, this list of conditions and the following # disclaimer. # 2. Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials # provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. import os import unittest from webkitpy.common.host_mock import MockHost from webkitpy.common.system.filesystem_mock import MockFileSystem from webkitpy.common.system.executive_mock import MockExecutive2, ScriptError from webkitpy.common.system.outputcapture import OutputCapture from webkitpy.w3c.test_downloader import TestDownloader from webkitpy.w3c.test_importer import parse_args, TestImporter FAKE_SOURCE_DIR = '/tests/csswg' FAKE_TEST_PATH = 'css-fake-1' FAKE_FILES = { '/tests/csswg/css-fake-1/empty_dir/README.txt': '', '/mock-checkout/LayoutTests/w3c/css-fake-1/README.txt': '', } FAKE_REPOSITORY = { '/mock-checkout/LayoutTests/imported/w3c/resources/TestRepositories': ''' [ { "name": "web-platform-tests", "url": "https://github.com/w3c/web-platform-tests.git", "revision": "dd553279c3", "paths_to_skip": [], "paths_to_import": [], "import_options": ["generate_git_submodules_description", "generate_gitignore", "generate_init_py"] } ] ''', '/mock-checkout/LayoutTests/imported/w3c/resources/import-expectations.json': ''' { "test1": "import", "test2": "skip" }''' } FAKE_REPOSITORIES = { '/mock-checkout/LayoutTests/imported/w3c/resources/TestRepositories': ''' [ { "name": "csswg-tests", "url": "https://github.com/w3c/csswg-test.git", "revision": "9f45f89", "paths_to_skip": [], "paths_to_import": [], "import_options": ["convert_test_harness_links"] }, { "name": "web-platform-tests", "url": "https://github.com/w3c/web-platform-tests.git", "revision": "dd553279c3", "paths_to_skip": [], "paths_to_import": [], "import_options": ["generate_git_submodules_description", "generate_gitignore", "generate_init_py"] } ] ''', '/mock-checkout/LayoutTests/imported/w3c/resources/import-expectations.json': ''' { "test1": "import", "test2": "skip" }''' } class TestImporterTest(unittest.TestCase): def _parse_options(self, args): options, args = parse_args(args) return options def test_import_dir_with_no_tests_and_no_hg(self): FAKE_FILES.update(FAKE_REPOSITORIES) host = MockHost() host.executive = MockExecutive2(exception=OSError()) host.filesystem = MockFileSystem(files=FAKE_FILES) importer = TestImporter(host, FAKE_TEST_PATH, self._parse_options(['-n', '-d', 'w3c', '-s', FAKE_SOURCE_DIR])) oc = OutputCapture() oc.capture_output() try: importer.do_import() finally: oc.restore_output() def test_import_dir_with_no_tests(self): FAKE_FILES.update(FAKE_REPOSITORIES) host = MockHost() host.executive = MockExecutive2(exception=ScriptError("abort: no repository found in '/Volumes/Source/src/wk/Tools/Scripts/webkitpy/w3c' (.hg not found)!")) host.filesystem = MockFileSystem(files=FAKE_FILES) importer = TestImporter(host, FAKE_TEST_PATH, self._parse_options(['-n', '-d', 'w3c', '-s', FAKE_SOURCE_DIR])) oc = OutputCapture() oc.capture_output() try: importer.do_import() finally: oc.restore_output() def test_import_dir_with_empty_init_py(self): FAKE_FILES = { '/tests/csswg/test1/__init__.py': '', '/tests/csswg/test2/__init__.py': 'NOTEMPTY', } FAKE_FILES.update(FAKE_REPOSITORIES) host = MockHost() host.filesystem = MockFileSystem(files=FAKE_FILES) importer = TestImporter(host, ['test1', 'test2'], self._parse_options(['-n', '-d', 'w3c', '-s', FAKE_SOURCE_DIR])) importer.do_import() self.assertTrue(host.filesystem.exists("/mock-checkout/LayoutTests/w3c/test1/__init__.py")) self.assertTrue(host.filesystem.exists("/mock-checkout/LayoutTests/w3c/test2/__init__.py")) self.assertTrue(host.filesystem.getsize("/mock-checkout/LayoutTests/w3c/test1/__init__.py") > 0) def import_directory(self, args, files, test_paths): host = MockHost() host.executive = MockExecutive2() host.filesystem = MockFileSystem(files=files) options, args = parse_args(args) importer = TestImporter(host, test_paths, options) importer.do_import() return host.filesystem def import_downloaded_tests(self, args, files): # files are passed as parameter as we cannot clone/fetch/checkout a repo in mock system. class TestDownloaderMock(TestDownloader): def __init__(self, repository_directory, host, options): TestDownloader.__init__(self, repository_directory, host, options) def _git_submodules_status(self, repository_directory): return 'adb4d391a69877d4a1eaaf51d1725c99a5b8ed84 tools/resources' host = MockHost() host.executive = MockExecutive2() host.filesystem = MockFileSystem(files=files) options, args = parse_args(args) importer = TestImporter(host, None, options) importer._test_downloader = TestDownloaderMock(importer.tests_download_path, importer.host, importer.options) importer.do_import() return host.filesystem def test_harnesslinks_conversion(self): FAKE_FILES = { '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/t/test.html': '<!doctype html><script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/css/t/test.html': '<!doctype html><script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/t/test.html': '<!doctype html><script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>', '/mock-checkout/Source/WebCore/css/CSSProperties.json': '', '/mock-checkout/Source/WebCore/css/CSSValueKeywords.in': '', } FAKE_FILES.update(FAKE_REPOSITORIES) fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/t/test.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.html')) self.assertTrue('src="/resources/testharness.js"' in fs.read_text_file('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.html')) self.assertTrue('src="/resources/testharness.js"' in fs.read_text_file('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/t/test.html')) def test_submodules_generation(self): FAKE_FILES = { '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/.gitmodules': '[submodule "tools/resources"]\n path = tools/resources\n url = https://github.com/w3c/testharness.js.git\n ignore = dirty\n', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/.gitmodules': '[submodule "tools/resources"]\n path = tools/resources\n url = https://github.com/w3c/testharness.js.git\n ignore = dirty\n', } FAKE_FILES.update(FAKE_REPOSITORIES) fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES) self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/resources/csswg-tests-modules.json')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/resources/web-platform-tests-modules.json')) # FIXME: Mock-up of git cannot use submodule command, hence the json file is empty, but still it should be created #self.assertTrue('https://github.com/w3c/testharness.js/archive/db4d391a69877d4a1eaaf51d1725c99a5b8ed84.tar.gz' in fs.read_text_file('/mock-checkout/LayoutTests/w3c/resources/web-platform-tests-modules.json')) def test_skip_test_import(self): FAKE_FILES = { '/mock-checkout/WebKitBuild/w3c-tests/streams-api/reference-implementation/web-platform-tests/test.html': '<!doctype html><script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>', '/mock-checkout/LayoutTests/imported/w3c/resources/TestRepositories': ''' [ { "name": "web-platform-tests", "url": "https://github.com/myrepo", "revision": "7cc96dd", "paths_to_skip": [], "paths_to_import": [], "import_options": [] } ]''', '/mock-checkout/LayoutTests/imported/w3c/resources/import-expectations.json': ''' { "web-platform-tests/dir-to-skip": "skip", "web-platform-tests/dir-to-skip/dir-to-import": "import", "web-platform-tests/dir-to-skip/file-to-import.html": "import" }''', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/dir-to-skip/test-to-skip.html': 'to be skipped', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/dir-to-skip/dir-to-import/test-to-import.html': 'to be imported', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/dir-to-skip/dir-to-not-import/test-to-not-import.html': 'to be skipped', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/dir-to-skip/file-to-import.html': 'to be imported', } fs = self.import_downloaded_tests(['--no-fetch', '-d', 'w3c'], FAKE_FILES) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/dir-to-skip/file-to-import.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/dir-to-skip/dir-to-import/test-to-import.html')) self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/dir-to-skip/dir-to-not-import/test-to-not-import.html')) self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/dir-to-skip/test-to-skip.html')) def test_checkout_directory(self): FAKE_FILES = { '/mock-checkout/WebKitBuild2/w3c-tests/web-platform-tests/existing-test.html': '', '/mock-checkout/WebKitBuild2/w3c-tests/csswg-tests/test.html': '1', } FAKE_FILES.update(FAKE_REPOSITORIES) os.environ['WEBKIT_OUTPUTDIR'] = '/mock-checkout/WebKitBuild2' try: fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES) finally: del os.environ['WEBKIT_OUTPUTDIR'] self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/existing-test.html')) def test_clean_directory_option(self): FAKE_FILES = { '/mock-checkout/LayoutTests/w3c/web-platform-tests/.gitattributes': '-1', '/mock-checkout/LayoutTests/w3c/web-platform-tests/.gitignore': '-1', '/mock-checkout/LayoutTests/w3c/web-platform-tests/.svn/wc.db': '0', '/mock-checkout/LayoutTests/w3c/web-platform-tests/old-test.html': '1', '/mock-checkout/LayoutTests/w3c/web-platform-tests/old-test-expected.txt': '2', '/mock-checkout/LayoutTests/w3c/web-platform-tests/existing-test.html': '3', '/mock-checkout/LayoutTests/w3c/web-platform-tests/existing-test-expected.txt': '4', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/existing-test.html': '5', '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/test.html': '1', } FAKE_FILES.update(FAKE_REPOSITORIES) fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c', '--clean-dest-dir'], FAKE_FILES) self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/old-test.html')) self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/old-test-expected.txt')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/existing-test.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/existing-test-expected.txt')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/.gitattributes')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/.gitignore')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/.svn')) def test_git_ignore_generation(self): FAKE_FILES = { '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/.gitmodules': '[submodule "tools/resources"]\n path = tools/resources\n url = https://github.com/w3c/testharness.js.git\n ignore = dirty\n', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/.gitmodules': '[submodule "tools/resources"]\n path = tools/resources\n url = https://github.com/w3c/testharness.js.git\n ignore = dirty\n', } FAKE_FILES.update(FAKE_REPOSITORIES) fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES) self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/csswg-tests/.gitignore')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/.gitignore')) # We should activate these lines but this is not working in mock systems. #self.assertTrue('/tools/.resources.url' in fs.read_text_file('/mock-checkout/LayoutTests/w3c/web-platform-tests/.gitignore')) #self.assertTrue('/tools/resources/' in fs.read_text_file('/mock-checkout/LayoutTests/w3c/web-platform-tests/.gitignore')) def test_initpy_generation(self): FAKE_FILES = { '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/.gitmodules': '[submodule "tools/resources"]\n path = tools/resources\n url = https://github.com/w3c/testharness.js.git\n ignore = dirty\n', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/.gitmodules': '[submodule "tools/resources"]\n path = tools/resources\n url = https://github.com/w3c/testharness.js.git\n ignore = dirty\n', } FAKE_FILES.update(FAKE_REPOSITORIES) host = MockHost() host.executive = MockExecutive2() host.filesystem = MockFileSystem(files=FAKE_FILES) fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES) self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/csswg-tests/__init__.py')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/__init__.py')) self.assertTrue(fs.getsize('/mock-checkout/LayoutTests/w3c/web-platform-tests/__init__.py') > 0) def test_remove_obsolete_content(self): FAKE_FILES = { '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/temp': '', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/t/new.html': '<!doctype html><script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/t/w3c-import.log': 'List of files:\n/LayoutTests/w3c/web-platform-tests/t/obsolete.html', '/mock-checkout/LayoutTests/w3c/web-platform-tests/t/obsolete.html': 'obsoleted content', '/mock-checkout/LayoutTests/w3c/web-platform-tests/t/obsolete-expected.txt': 'PASS', } FAKE_FILES.update(FAKE_REPOSITORIES) host = MockHost() host.executive = MockExecutive2() host.filesystem = MockFileSystem(files=FAKE_FILES) fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES) self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/obsolete.html')) self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/obsolete-expected.txt')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/new.html')) def test_manual_slow_test(self): tests_options = '{"a": ["slow"]}' FAKE_FILES = { '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/temp': '', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/t/new-manual.html': '<!doctype html><meta name="timeout" content="long"><script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>', '/mock-checkout/LayoutTests/tests-options.json': tests_options} FAKE_FILES.update(FAKE_REPOSITORIES) host = MockHost() host.executive = MockExecutive2() host.filesystem = MockFileSystem(files=FAKE_FILES) fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES) self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/new-manual.html')) self.assertEquals(tests_options, fs.read_text_file('/mock-checkout/LayoutTests/tests-options.json')) def test_webkit_test_runner_options(self): FAKE_FILES = { '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/t/test.html': '<!doctype html><script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/css/test.html': '<!doctype html>\n<script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>', '/mock-checkout/LayoutTests/w3c/web-platform-tests/css/test.html': '<!-- doctype html --><!-- webkit-test-runner [ dummy ] -->', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/t/test.html': '<!doctype html><script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>', '/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.html': '<!-- doctype html --><!-- webkit-test-runner [ dummy ] -->', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/t/test.any.js': 'test(() => {}, "empty")', '/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.any.html': '<!-- This file is required for WebKit test infrastructure to run the templated test --><!-- webkit-test-runner [ dummy ] -->', '/mock-checkout/Source/WebCore/css/CSSProperties.json': '', '/mock-checkout/Source/WebCore/css/CSSValueKeywords.in': '', } FAKE_FILES.update(FAKE_REPOSITORIES) fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/test.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.any.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.any.worker.html')) self.assertTrue('<!-- webkit-test-runner [ dummy ] -->' in fs.read_text_file('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/test.html').split('\n')[0]) self.assertTrue('<!-- webkit-test-runner [ dummy ] -->' in fs.read_text_file('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.html').split('\n')[0]) self.assertTrue('<!-- webkit-test-runner [ dummy ] -->' in fs.read_text_file('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.any.html').split('\n')[0]) self.assertFalse('<!-- webkit-test-runner [ dummy ] -->' in fs.read_text_file('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.any.worker.html').split('\n')[0]) def test_webkit_test_runner_import_reftests_with_absolute_paths_download(self): FAKE_FILES = { '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/t/test1.html': '<html><head><link rel=match href=/t/test1-ref.html></head></html>', '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/t/test1-ref.html': '<html></html>', '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/t/test2.html': '<html><head><link rel=match href=/some/directory/in/csswg-root/test2-ref.html></head></html>', '/mock-checkout/WebKitBuild/w3c-tests/csswg-tests/some/directory/in/csswg-root/test2-ref.html': '<html></html>', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/css/css-images/test3.html': '<html><head><link rel=match href=/css/css-images/test3-ref.html></head></html>', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/css/css-images/test3-ref.html': '<html></html>', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/css/css-images/test4.html': '<html><head><link rel=match href=/some/directory/in/wpt-root/test4-ref.html></head></html>', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/some/directory/in/wpt-root/test4-ref.html': '<html></html>', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/css/css-images/test5.html': '<html><head><link rel=match href=" /some/directory/in/wpt-root/test5-ref.html "></head></html>', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/some/directory/in/wpt-root/test5-ref.html': '<html></html>', } FAKE_FILES.update(FAKE_REPOSITORIES) fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES) # test1 self.assertTrue(fs.exists('/mock-checkout/WebKitBuild/w3c-tests/to-be-imported/csswg-tests/t/test1.html')) self.assertTrue(fs.exists('/mock-checkout/WebKitBuild/w3c-tests/to-be-imported/csswg-tests/t/test1-ref.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/csswg-tests/t/test1.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/csswg-tests/t/test1-expected.html')) # test2 self.assertTrue(fs.exists('/mock-checkout/WebKitBuild/w3c-tests/to-be-imported/csswg-tests/t/test2.html')) self.assertTrue(fs.exists('/mock-checkout/WebKitBuild/w3c-tests/to-be-imported/csswg-tests/some/directory/in/csswg-root/test2-ref.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/csswg-tests/t/test2.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/csswg-tests/t/test2-expected.html')) # test3 self.assertTrue(fs.exists('/mock-checkout/WebKitBuild/w3c-tests/to-be-imported/web-platform-tests/css/css-images/test3.html')) self.assertTrue(fs.exists('/mock-checkout/WebKitBuild/w3c-tests/to-be-imported/web-platform-tests/css/css-images/test3-ref.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/css-images/test3.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/css-images/test3-expected.html')) # test4 self.assertTrue(fs.exists('/mock-checkout/WebKitBuild/w3c-tests/to-be-imported/web-platform-tests/css/css-images/test4.html')) self.assertTrue(fs.exists('/mock-checkout/WebKitBuild/w3c-tests/to-be-imported/web-platform-tests/some/directory/in/wpt-root/test4-ref.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/css-images/test4.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/css-images/test4-expected.html')) # test5 self.assertTrue(fs.exists('/mock-checkout/WebKitBuild/w3c-tests/to-be-imported/web-platform-tests/css/css-images/test5.html')) self.assertTrue(fs.exists('/mock-checkout/WebKitBuild/w3c-tests/to-be-imported/web-platform-tests/some/directory/in/wpt-root/test5-ref.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/css-images/test5.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/css-images/test5-expected.html')) def test_webkit_test_runner_import_reftests_with_absolute_paths_from_source_dir(self): FAKE_FILES = { '/home/user/wpt/css/css-images/test1.html': '<html><head><link rel=match href=/css/css-images/test1-ref.html></head></html>', '/home/user/wpt/css/css-images/test1-ref.html': '<html></html>', '/home/user/wpt/css/css-images/test2.html': '<html><head><link rel=match href=/some/directory/in/wpt-root/test2-ref.html></head></html>', '/home/user/wpt/some/directory/in/wpt-root/test2-ref.html': '<html></html>', '/home/user/wpt/css/css-images/test3.html': '<html><head><link rel=match href=" /some/directory/in/wpt-root/test3-ref.html "></head></html>', '/home/user/wpt/some/directory/in/wpt-root/test3-ref.html': '<html></html>', } FAKE_FILES.update(FAKE_REPOSITORIES) fs = self.import_directory(['-s', '/home/user/wpt', '-d', '/mock-checkout/LayoutTests/w3c/web-platform-tests'], FAKE_FILES, 'css/css-images') # test1 self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/css-images/test1.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/css-images/test1-expected.html')) # test2 self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/css-images/test2.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/css-images/test2-expected.html')) # test3 self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/css-images/test3.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/css/css-images/test3-expected.html')) def test_template_test(self): FAKE_FILES = { '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/t/test.any.js': '// META: global=window,dedicatedworker,sharedworker,serviceworker\n', '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests/t/test2.any.js': '\n// META: global=dedicatedworker,serviceworker\n', } FAKE_FILES.update(FAKE_REPOSITORY) fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.any.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.any.worker.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test.any.serviceworker.html')) self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test2.any.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test2.any.worker.html')) self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/t/test2.any.serviceworker.html'))
61.132321
247
0.68856
3,597
28,182
5.3072
0.092577
0.087376
0.08968
0.104872
0.828339
0.816867
0.800576
0.783656
0.743164
0.718334
0
0.014095
0.146583
28,182
460
248
61.265217
0.779635
0.072919
0
0.417867
0
0.291066
0.588285
0.455302
0
0
0
0.002174
0.204611
1
0.060519
false
0.002882
0.21902
0.002882
0.29683
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
23f5705258701c1851d63e37f10f3cfefa710fa6
142
py
Python
tensordata/utils/__init__.py
Hourout/tensordata
cbef6742ee0d3bfc4b886358fc01618bb5b63603
[ "Apache-2.0" ]
13
2019-01-08T10:22:39.000Z
2020-06-17T10:02:47.000Z
tensordata/utils/__init__.py
Hourout/tensordata
cbef6742ee0d3bfc4b886358fc01618bb5b63603
[ "Apache-2.0" ]
null
null
null
tensordata/utils/__init__.py
Hourout/tensordata
cbef6742ee0d3bfc4b886358fc01618bb5b63603
[ "Apache-2.0" ]
1
2020-06-17T10:02:49.000Z
2020-06-17T10:02:49.000Z
from tensordata.utils import compress from tensordata.utils import request from tensordata.utils import pip from tensordata.utils import conda
35.5
37
0.866197
20
142
6.15
0.4
0.455285
0.617886
0.813008
0
0
0
0
0
0
0
0
0.105634
142
4
38
35.5
0.968504
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
9b1a8cb35bc505b02a6214cef877f1c212d77094
88
py
Python
recursive_RM/decoders/__init__.py
Joshua1989/recursive_RM
741d2b51e39c3a48cfb671226178781898766e42
[ "MIT" ]
null
null
null
recursive_RM/decoders/__init__.py
Joshua1989/recursive_RM
741d2b51e39c3a48cfb671226178781898766e42
[ "MIT" ]
null
null
null
recursive_RM/decoders/__init__.py
Joshua1989/recursive_RM
741d2b51e39c3a48cfb671226178781898766e42
[ "MIT" ]
1
2020-06-09T11:46:44.000Z
2020-06-09T11:46:44.000Z
from recursive_RM.decoders.RPA_dec import * from recursive_RM.decoders.RXA_dec import *
29.333333
43
0.840909
14
88
5
0.571429
0.371429
0.428571
0.657143
0
0
0
0
0
0
0
0
0.090909
88
2
44
44
0.875
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
f1a4252ccd80efa85ff29a16347c47fdc4451984
60,715
py
Python
venv/lib/python3.6/site-packages/ansible_collections/junipernetworks/junos/plugins/module_utils/network/junos/argspec/logging_global/logging_global.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/junipernetworks/junos/plugins/module_utils/network/junos/argspec/logging_global/logging_global.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/junipernetworks/junos/plugins/module_utils/network/junos/argspec/logging_global/logging_global.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
# # -*- coding: utf-8 -*- # Copyright 2021 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ############################################# # WARNING # ############################################# # # This file is auto generated by the resource # module builder playbook. # # Do not edit this file manually. # # Changes to this file will be over written # by the resource module builder. # # Changes should be made in the model used to # generate this file or in the resource module # builder template. # ############################################# """ The arg spec for the junos_logging_global module """ from __future__ import absolute_import, division, print_function __metaclass__ = type class Logging_globalArgs(object): # pylint: disable=R0903 """The arg spec for the junos_logging_global module """ def __init__(self, **kwargs): pass argument_spec = { "config": { "options": { "allow_duplicates": {"type": "bool"}, "archive": { "options": { "binary_data": {"type": "bool"}, "file_size": {"type": "int"}, "files": {"type": "int"}, "no_binary_data": {"type": "bool"}, "no_world_readable": {"type": "bool"}, "set": {"type": "bool"}, "world_readable": {"type": "bool"}, }, "type": "dict", }, "console": { "options": { "any": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "authorization": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "change_log": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "conflict_log": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "daemon": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "dfc": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "external": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "firewall": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "ftp": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "interactive_commands": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "kernel": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "ntp": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "pfe": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "security": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "user": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, }, "type": "dict", }, "files": { "elements": "dict", "options": { "allow_duplicates": {"type": "bool"}, "any": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "archive": { "options": { "archive_sites": { "elements": "str", "type": "list", }, "binary_data": {"type": "bool"}, "file_size": {"type": "int"}, "files": {"type": "int"}, "no_binary_data": {"type": "bool"}, "no_world_readable": {"type": "bool"}, "set": {"type": "bool"}, "start_time": {"type": "str"}, "transfer_interval": {"type": "int"}, "world_readable": {"type": "bool"}, }, "type": "dict", }, "authorization": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "change_log": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "conflict_log": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "daemon": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "dfc": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "explicit_priority": {"type": "bool"}, "external": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "firewall": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "ftp": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "interactive_commands": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "kernel": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "match": {"type": "str"}, "match_strings": {"elements": "str", "type": "list"}, "name": {"type": "str"}, "ntp": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "pfe": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "security": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "structured_data": { "options": { "brief": {"type": "bool"}, "set": {"type": "bool"}, }, "type": "dict", }, "user": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, }, "type": "list", }, "hosts": { "elements": "dict", "options": { "allow_duplicates": {"type": "bool"}, "any": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "authorization": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "change_log": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "conflict_log": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "daemon": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "dfc": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "exclude_hostname": {"type": "bool"}, "explicit_priority": {"type": "bool"}, "external": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "facility_override": {"type": "str"}, "firewall": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "ftp": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "interactive_commands": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "kernel": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "log_prefix": {"type": "str"}, "match": {"type": "str"}, "match_strings": {"elements": "str", "type": "list"}, "name": {"type": "str"}, "ntp": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "pfe": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "port": {"type": "int"}, "routing_instance": {"type": "str"}, "security": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "source_address": {"type": "str"}, "structured_data": { "options": { "brief": {"type": "bool"}, "set": {"type": "bool"}, }, "type": "dict", }, "user": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, }, "type": "list", }, "log_rotate_frequency": {"type": "int"}, "routing_instance": {"type": "str"}, "server": { "options": { "routing_instance": { "options": { "all": {"type": "bool"}, "default": {"type": "bool"}, "routing_instances": { "elements": "dict", "options": { "disable": {"type": "bool"}, "name": {"type": "str"}, }, "type": "list", }, }, "type": "dict", }, "set": {"type": "bool"}, }, "type": "dict", }, "source_address": {"type": "str"}, "time_format": { "options": { "set": {"type": "bool"}, "millisecond": {"type": "bool"}, "year": {"type": "bool"}, }, "type": "dict", }, "users": { "elements": "dict", "options": { "allow_duplicates": {"type": "bool"}, "any": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "authorization": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "change_log": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "conflict_log": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "daemon": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "dfc": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "external": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "firewall": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "ftp": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "interactive_commands": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "kernel": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "match": {"type": "str"}, "match_strings": {"elements": "str", "type": "list"}, "name": {"type": "str"}, "ntp": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "pfe": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "security": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, "user": { "options": { "level": { "choices": [ "alert", "any", "critical", "emergency", "error", "info", "none", "notice", "warning", ], "required": True, "type": "str", } }, "type": "dict", }, }, "type": "list", }, }, "type": "dict", }, "running_config": {"type": "str"}, "state": { "choices": [ "merged", "replaced", "overridden", "deleted", "parsed", "gathered", "rendered", ], "default": "merged", "type": "str", }, } # pylint: disable=C0301
43.964518
77
0.13682
1,556
60,715
5.291774
0.109255
0.06461
0.081491
0.174885
0.88086
0.869565
0.850619
0.850619
0.850619
0.840904
0
0.001268
0.779247
60,715
1,380
78
43.996377
0.613072
0.010146
0
0.81575
0
0
0.124695
0
0
0
0
0
0
1
0.000743
false
0.000743
0.000743
0
0.002972
0.000743
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
9e3a2738887ddb5bd80bde395efde47180204f1e
3,277
py
Python
tests/test_dataframe.py
sjcporter/gigaleaf
0ad302cf8404b9488cb292623aea9376bbe75fee
[ "MIT" ]
28
2020-04-28T20:43:51.000Z
2021-11-21T23:02:59.000Z
tests/test_dataframe.py
sjcporter/gigaleaf
0ad302cf8404b9488cb292623aea9376bbe75fee
[ "MIT" ]
7
2020-04-07T20:49:10.000Z
2021-08-09T15:19:17.000Z
tests/test_dataframe.py
sjcporter/gigaleaf
0ad302cf8404b9488cb292623aea9376bbe75fee
[ "MIT" ]
5
2020-07-20T18:13:25.000Z
2021-08-28T21:25:11.000Z
from pathlib import Path import json import shutil from gigaleaf import Gigaleaf from gigaleaf.gigantum import Gigantum from tests.fixtures import gigantum_project_fixture class TestDataframeFile: def test_link_csv_file_and_sync(self, gigantum_project_fixture): gigaleaf = Gigaleaf() assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'metadata', 'table_pkl.json').is_file() is False gigaleaf.link_dataframe('../output/table.pkl', to_latex_kwargs={"index": False, "caption": "My table"}) assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'metadata', 'table_pkl.json').is_file() is True gigaleaf.sync() assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'subfiles', 'table_pkl.tex').is_file() is True # Delete everything in untracked, reinit, and should still see the files shutil.rmtree(gigaleaf.overleaf.overleaf_repo_directory) gigaleaf = None assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'metadata', 'table_pkl.json').is_file() is False assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'subfiles', 'table_pkl.tex').is_file() is False gigaleaf = Gigaleaf() assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'metadata', 'table_pkl.json').is_file() is True assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'subfiles', 'table_pkl.tex').is_file() is True def test_unlink_csv(self, gigantum_project_fixture): gigaleaf = Gigaleaf() assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'metadata', 'table_pkl.json').is_file() is False gigaleaf.link_dataframe('../output/table.pkl', to_latex_kwargs={"index": False, "caption": "My table"}) assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'metadata', 'table_pkl.json').is_file() is True gigaleaf.sync() assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'subfiles', 'table_pkl.tex').is_file() is True gigaleaf.unlink_dataframe('../output/table.pkl') assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'metadata', 'table_pkl.json').is_file() is False assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'subfiles', 'table_pkl.tex').is_file() is False gigaleaf.sync() # Delete everything in untracked, reinit, and should still not see the files shutil.rmtree(gigaleaf.overleaf.overleaf_repo_directory) gigaleaf = None gigaleaf = Gigaleaf() assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'metadata', 'table_pkl.json').is_file() is False assert Path(Gigantum.get_overleaf_root_directory(), 'project', 'gigantum', 'subfiles', 'table_pkl.tex').is_file() is False
43.693333
111
0.649069
372
3,277
5.465054
0.155914
0.066896
0.123955
0.144614
0.878505
0.87457
0.87457
0.87457
0.828333
0.828333
0
0
0.228868
3,277
74
112
44.283784
0.804511
0.044248
0
0.803922
0
0
0.194631
0
0
0
0
0
0.27451
1
0.039216
false
0
0.117647
0
0.176471
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7