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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11fbeaa0cdadcae10084a5b3b7d7792a3d86cf42
| 103
|
py
|
Python
|
scripts/pymarkovchain_dynamic/__init__.py
|
jfahrg/augentbot
|
2f26f9287928bb405696366c60f1193b6f34ab4a
|
[
"CC-BY-2.0",
"MIT"
] | 3
|
2017-10-16T14:05:47.000Z
|
2017-10-23T07:18:46.000Z
|
scripts/pymarkovchain_dynamic/__init__.py
|
jfahrg/augentbot
|
2f26f9287928bb405696366c60f1193b6f34ab4a
|
[
"CC-BY-2.0",
"MIT"
] | 1
|
2017-10-24T18:11:14.000Z
|
2017-10-24T18:11:14.000Z
|
scripts/pymarkovchain_dynamic/__init__.py
|
jfde/augentbot
|
2f26f9287928bb405696366c60f1193b6f34ab4a
|
[
"CC-BY-2.0",
"MIT"
] | null | null | null |
from pymarkovchain_dynamic.MarkovChain import *
from pymarkovchain_dynamic.DynamicMarkovChain import *
| 34.333333
| 54
| 0.883495
| 10
| 103
| 8.9
| 0.6
| 0.382022
| 0.539326
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.07767
| 103
| 2
| 55
| 51.5
| 0.936842
| 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
|
0153baca680ffab8056f0a843270c4080b86ff69
| 74,403
|
py
|
Python
|
tests/test_model_factory.py
|
TForce1/pcg_gazebo
|
9ff88016b7b6903236484958ca7c6ed9f8ffb346
|
[
"ECL-2.0",
"Apache-2.0"
] | 40
|
2020-02-04T18:16:49.000Z
|
2022-02-22T11:36:34.000Z
|
tests/test_model_factory.py
|
awesomebytes/pcg_gazebo
|
4f335dd460ef7c771f1df78b46a92fad4a62cedc
|
[
"ECL-2.0",
"Apache-2.0"
] | 75
|
2020-01-23T13:40:50.000Z
|
2022-02-09T07:26:01.000Z
|
tests/test_model_factory.py
|
GimpelZhang/gazebo_world_generator
|
eb7215499d0ddc972d804c988fadab1969579b1b
|
[
"ECL-2.0",
"Apache-2.0"
] | 18
|
2020-09-10T06:35:41.000Z
|
2022-02-20T19:08:17.000Z
|
#!/usr/bin/env python
# Copyright (c) 2019 - The Procedural Generation for Gazebo authors
# For information on the respective copyright owner see the NOTICE file
#
# 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.
import unittest
import numpy as np
import os
import shutil
from pcg_gazebo import random
from pcg_gazebo.utils import generate_random_string
from pcg_gazebo.generators.creators import create_models_from_config, extrude
from pcg_gazebo.simulation.properties import Material, Pose
from pcg_gazebo.simulation import SimulationModel
from pcg_gazebo.path import Path
from shapely.geometry import Polygon, MultiPoint, LineString
def _get_colors():
color_names = list(Material.get_xkcd_colors_list().keys())
return [None, 'xkcd', 'random'] + \
[color_names[random.choice(range(len(color_names)))]
for _ in range(2)] + \
[[random.rand() for _ in range(4)] for _ in range(2)]
def _delete_generated_meshes(sdf):
for i in range(len(sdf.links)):
for j in range(len(sdf.links[i].collisions)):
if sdf.links[i].collisions[j].geometry.mesh is not None:
uri = Path(sdf.links[i].collisions[j].geometry.mesh.uri.value)
if os.path.isfile(uri.absolute_uri):
os.remove(uri.absolute_uri)
for j in range(len(sdf.links[i].visuals)):
if sdf.links[i].visuals[j].geometry.mesh is not None:
uri = Path(sdf.links[i].visuals[j].geometry.mesh.uri.value)
if os.path.isfile(uri.absolute_uri):
os.remove(uri.absolute_uri)
class TestModelFactory(unittest.TestCase):
def test_box_after_random_seed(self):
box_name = generate_random_string(5)
seed = random.randint(0, 10000)
random.init_random_state(seed)
random_box = dict(
type='box',
args=dict(
size="__import__('pcg_gazebo').random.rand(3)",
mass="__import__('pcg_gazebo').random.rand()",
name=box_name
)
)
ref = create_models_from_config([random_box])[0]
for _ in range(3):
random.init_random_state(seed)
model = create_models_from_config([random_box])[0]
self.assertEqual(ref.to_sdf(), model.to_sdf())
random.init_random_state(seed)
refs = create_models_from_config(
[random_box for _ in range(3)])
for _ in range(3):
random.init_random_state(seed)
models = create_models_from_config(
[random_box for _ in range(3)])
for r, m in zip(refs, models):
self.assertEqual(r.to_sdf(), m.to_sdf())
def test_sphere_after_random_seed(self):
sphere_name = generate_random_string(5)
seed = random.randint(0, 10000)
random.init_random_state(seed)
random_sphere = dict(
type='sphere',
args=dict(
radius="__import__('pcg_gazebo').random.rand()",
mass="__import__('pcg_gazebo').random.rand()",
name=sphere_name
)
)
ref = create_models_from_config([random_sphere])[0]
for _ in range(3):
random.init_random_state(seed)
model = create_models_from_config([random_sphere])[0]
self.assertEqual(ref.to_sdf(), model.to_sdf())
random.init_random_state(seed)
refs = create_models_from_config(
[random_sphere for _ in range(3)])
for _ in range(3):
random.init_random_state(seed)
models = create_models_from_config(
[random_sphere for _ in range(3)])
for r, m in zip(refs, models):
self.assertEqual(r.to_sdf(), m.to_sdf())
def test_cylinder_after_random_seed(self):
cyl_name = generate_random_string(5)
seed = random.randint(0, 10000)
random.init_random_state(seed)
random_cyl = dict(
type='cylinder',
args=dict(
radius="__import__('pcg_gazebo').random.rand()",
length="__import__('pcg_gazebo').random.rand()",
mass="__import__('pcg_gazebo').random.rand()",
name=cyl_name
)
)
ref = create_models_from_config([random_cyl])[0]
for _ in range(3):
random.init_random_state(seed)
model = create_models_from_config([random_cyl])[0]
self.assertEqual(ref.to_sdf(), model.to_sdf())
random.init_random_state(seed)
refs = create_models_from_config(
[random_cyl for _ in range(3)])
for _ in range(3):
random.init_random_state(seed)
models = create_models_from_config(
[random_cyl for _ in range(3)])
for r, m in zip(refs, models):
self.assertEqual(r.to_sdf(), m.to_sdf())
def test_static_box_model(self):
for color in _get_colors():
name = generate_random_string(3)
pose = [random.rand() for _ in range(6)]
size = [random.rand() for _ in range(3)]
model_config = [
dict(
type='box',
args=dict(
size=size,
name=name,
pose=pose,
color=color,
collision_parameters=dict(
mu=random.uniform(0, 10),
mu2=random.uniform(0, 10),
friction=random.uniform(0, 10),
friction2=random.uniform(0, 10),
slip1=random.uniform(0, 1),
slip2=random.uniform(0, 1),
rolling_friction=random.uniform(0, 1),
fdir1=[0, 0, 0],
max_contacts=1,
soft_cfm=random.uniform(0, 10),
soft_erp=random.uniform(0, 10),
kp=random.uniform(0, 100000),
kd=random.uniform(0, 10),
max_vel=random.uniform(0, 0.1),
min_depth=random.uniform(0, 0.1),
split_impulse=False,
split_impulse_penetration_threshold=-0.01,
restitution_coefficient=random.uniform(0, 1),
threshold=random.uniform(0, 1)
)
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), 1)
self.assertIsInstance(models[0], SimulationModel)
# Test pose of the model
self.assertEqual(models[0].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[0].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertTrue(models[0].static)
self.assertEqual(len(models[0].links), 1)
link_name = models[0].link_names[0]
# Test visual element
self.assertEqual(len(models[0].links[link_name].visuals), 1)
geometry = models[0].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'box')
self.assertEqual(geometry.get_param('size'), size)
# Test collision element
self.assertEqual(len(models[0].links[link_name].collisions), 1)
collision = models[0].links[link_name].get_collision_by_name(
'collision')
tags = ['mu', 'mu2', 'slip1', 'slip2', 'fdir1']
for tag in tags:
self.assertEqual(
collision.get_ode_friction_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['friction', 'friction2', 'rolling_friction', 'fdir1']
for tag in tags:
self.assertEqual(
collision.get_bullet_friction_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['soft_cfm', 'soft_erp', 'kp', 'kd', 'max_vel', 'min_depth']
for tag in tags:
self.assertEqual(
collision.get_ode_contact_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['soft_cfm', 'soft_erp', 'kp', 'kd', 'split_impulse',
'split_impulse_penetration_threshold']
for tag in tags:
self.assertEqual(
collision.get_bullet_contact_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['restitution_coefficient', 'threshold']
print(collision.sdf)
for tag in tags:
self.assertEqual(
collision.get_bounce_param(tag),
model_config[0]['args']['collision_parameters'][tag])
geometry = collision.geometry
self.assertEqual(geometry.get_type(), 'box')
self.assertEqual(geometry.get_param('size'), size)
# Test color exists
material = models[0].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_dynamic_box_model(self):
for color in _get_colors():
name = generate_random_string(3)
pose = [random.rand() for _ in range(6)]
size = [random.rand() for _ in range(3)]
mass = random.rand()
model_config = [
dict(
type='box',
args=dict(
size=size,
name=name,
pose=pose,
mass=mass,
color=color,
collision_parameters=dict(
mu=random.uniform(0, 10),
mu2=random.uniform(0, 10),
friction=random.uniform(0, 10),
friction2=random.uniform(0, 10),
slip1=random.uniform(0, 1),
slip2=random.uniform(0, 1),
rolling_friction=random.uniform(0, 1),
fdir1=[0, 0, 0],
max_contacts=1,
soft_cfm=random.uniform(0, 10),
soft_erp=random.uniform(0, 10),
kp=random.uniform(0, 100000),
kd=random.uniform(0, 10),
max_vel=random.uniform(0, 0.1),
min_depth=random.uniform(0, 0.1),
split_impulse=False,
split_impulse_penetration_threshold=-0.01,
restitution_coefficient=random.uniform(0, 1),
threshold=random.uniform(0, 1)
)
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), 1)
self.assertIsInstance(models[0], SimulationModel)
# Test pose of the model
self.assertEqual(models[0].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[0].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertFalse(models[0].static)
self.assertEqual(len(models[0].links), 1)
link_name = models[0].link_names[0]
# Test link properties
link = models[0].links[link_name]
self.assertEqual(link.inertial.mass, mass)
self.assertAlmostEqual(link.inertial.ixx,
1. / 12 * mass * (size[1]**2 + size[2]**2))
self.assertAlmostEqual(link.inertial.iyy,
1. / 12 * mass * (size[0]**2 + size[2]**2))
self.assertAlmostEqual(link.inertial.izz,
1. / 12 * mass * (size[0]**2 + size[1]**2))
self.assertEqual(link.inertial.ixy, 0)
self.assertEqual(link.inertial.ixz, 0)
self.assertEqual(link.inertial.iyz, 0)
# Test visual element
self.assertEqual(len(link.visuals), 1)
geometry = link.visuals[0].geometry
self.assertEqual(geometry.get_type(), 'box')
self.assertEqual(geometry.get_param('size'), size)
# Test collision element
self.assertEqual(len(link.collisions), 1)
collision = link.get_collision_by_name('collision')
tags = ['mu', 'mu2', 'slip1', 'slip2', 'fdir1']
for tag in tags:
self.assertEqual(
collision.get_ode_friction_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['friction', 'friction2', 'rolling_friction', 'fdir1']
for tag in tags:
self.assertEqual(
collision.get_bullet_friction_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['soft_cfm', 'soft_erp', 'kp', 'kd', 'max_vel', 'min_depth']
for tag in tags:
self.assertEqual(
collision.get_ode_contact_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['soft_cfm', 'soft_erp', 'kp', 'kd', 'split_impulse',
'split_impulse_penetration_threshold']
for tag in tags:
self.assertEqual(
collision.get_bullet_contact_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['restitution_coefficient', 'threshold']
for tag in tags:
self.assertEqual(
collision.get_bounce_param(tag),
model_config[0]['args']['collision_parameters'][tag])
geometry = collision.geometry
self.assertEqual(geometry.get_type(), 'box')
self.assertEqual(geometry.get_param('size'), size)
# Test color exists
material = models[0].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_box_factory_fixed_args_with_permutation(self):
for color in _get_colors():
n_sizes = random.randint(2, 5)
n_masses = random.randint(2, 5)
name = generate_random_string(3)
sizes = [[random.rand() for _ in range(3)]
for _ in range(n_sizes)]
pose = [random.rand() for _ in range(6)]
masses = [random.rand() for _ in range(n_masses)]
model_config = [
dict(
type='box_factory',
args=dict(
name=name,
size=sizes,
mass=masses,
pose=pose,
use_permutation=True,
color=color
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_sizes * n_masses)
for i in range(len(models)):
# Check the name generator with counter
self.assertIn(name + '_', models[i].name)
self.assertTrue(models[i].name.split('_')[-1].isdigit())
self.assertIsInstance(models[i], SimulationModel)
# Test pose of the model
self.assertEqual(models[i].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[i].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertFalse(models[i].static)
self.assertEqual(len(models[i].links), 1)
link_name = models[i].link_names[0]
self.assertIn(models[i].links[link_name].inertial.mass, masses)
# Test visual element
self.assertEqual(len(models[i].links[link_name].visuals), 1)
geometry = models[i].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'box')
self.assertIn(geometry.get_param('size'), sizes)
# Test collision element
self.assertEqual(len(models[i].links[link_name].collisions), 1)
geometry = models[i].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'box')
self.assertIn(geometry.get_param('size'), sizes)
# Test color exists
material = models[i].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_box_factory_fixed_args_no_permutation(self):
for color in _get_colors():
n_models = random.randint(2, 5)
name = generate_random_string(3)
sizes = [[random.rand() for _ in range(3)]
for _ in range(n_models)]
pose = [random.rand() for _ in range(6)]
masses = [random.rand() for _ in range(n_models)]
model_config = [
dict(
type='box_factory',
args=dict(
name=name,
size=sizes,
mass=masses,
pose=pose,
use_permutation=False,
color=color
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_models)
for i in range(len(models)):
# Check the name generator with counter
self.assertIn(name + '_', models[i].name)
self.assertTrue(models[i].name.split('_')[-1].isdigit())
self.assertIsInstance(models[i], SimulationModel)
# Test pose of the model
self.assertEqual(models[i].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[i].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertFalse(models[i].static)
self.assertEqual(len(models[i].links), 1)
link_name = models[i].link_names[0]
self.assertIn(models[i].links[link_name].inertial.mass, masses)
# Test visual element
self.assertEqual(len(models[i].links[link_name].visuals), 1)
geometry = models[i].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'box')
self.assertIn(geometry.get_param('size'), sizes)
# Test collision element
self.assertEqual(len(models[i].links[link_name].collisions), 1)
geometry = models[i].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'box')
self.assertIn(geometry.get_param('size'), sizes)
# Test color exists
material = models[i].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_box_factory_lambda_args_with_permutation(self):
for color in _get_colors():
n_sizes = random.randint(2, 5)
n_masses = random.randint(2, 5)
name = generate_random_string(3)
sizes = "__import__('numpy').random.random(({}, 3))".format(
n_sizes)
masses = "__import__('numpy').linspace(1, 10, {})".format(n_masses)
pose = [random.rand() for _ in range(6)]
model_config = [
dict(
type='box_factory',
args=dict(
name=name,
size=sizes,
mass=masses,
pose=pose,
use_permutation=True,
color=color
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_sizes * n_masses)
for i in range(len(models)):
# Check the name generator with counter
self.assertIn(name + '_', models[i].name)
self.assertTrue(models[i].name.split('_')[-1].isdigit())
self.assertIsInstance(models[i], SimulationModel)
# Test pose of the model
self.assertEqual(models[i].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[i].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertFalse(models[i].static)
self.assertEqual(len(models[i].links), 1)
link_name = models[i].link_names[0]
# Test visual element
self.assertEqual(len(models[i].links[link_name].visuals), 1)
geometry = models[i].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'box')
# Test collision element
self.assertEqual(len(models[i].links[link_name].collisions), 1)
geometry = models[i].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'box')
# Test color exists
material = models[i].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def text_box_forced_permutation(self):
n_sizes = 2
n_masses = 3
name = generate_random_string(3)
# Test with lambda functions
sizes = "__import__('numpy').random.random(({}, 3))".format(n_sizes)
masses = "__import__('numpy').linspace(1, 10, {})".format(n_masses)
pose = [random.rand() for _ in range(6)]
model_config = [
dict(
type='box_factory',
args=dict(
name=name,
size=sizes,
mass=masses,
pose=pose,
use_permutation=False,
color=None
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_sizes * n_masses)
# Test with fixed arguments
sizes = [[random.rand() for _ in range(3)] for _ in range(n_sizes)]
masses = [random.rand() for _ in range(n_masses)]
pose = [random.rand() for _ in range(6)]
model_config = [
dict(
type='box_factory',
args=dict(
name=name,
size=sizes,
mass=masses,
pose=pose,
use_permutation=False,
color=None
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_sizes * n_masses)
def test_static_cylinder_model(self):
for color in _get_colors():
name = generate_random_string(3)
pose = [random.rand() for _ in range(6)]
radius = random.rand()
length = random.rand()
model_config = [
dict(
type='cylinder',
args=dict(
radius=radius,
length=length,
name=name,
pose=pose,
color=color,
collision_parameters=dict(
mu=random.uniform(0, 10),
mu2=random.uniform(0, 10),
friction=random.uniform(0, 10),
friction2=random.uniform(0, 10),
slip1=random.uniform(0, 1),
slip2=random.uniform(0, 1),
rolling_friction=random.uniform(0, 1),
fdir1=[0, 0, 0],
max_contacts=1,
soft_cfm=random.uniform(0, 10),
soft_erp=random.uniform(0, 10),
kp=random.uniform(0, 100000),
kd=random.uniform(0, 10),
max_vel=random.uniform(0, 0.1),
min_depth=random.uniform(0, 0.1),
split_impulse=False,
split_impulse_penetration_threshold=-0.01,
restitution_coefficient=random.uniform(0, 1),
threshold=random.uniform(0, 1)
)
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), 1)
self.assertIsInstance(models[0], SimulationModel)
# Test pose of the model
self.assertEqual(models[0].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[0].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertTrue(models[0].static)
self.assertEqual(len(models[0].links), 1)
link_name = models[0].link_names[0]
# Test visual element
self.assertEqual(len(models[0].links[link_name].visuals), 1)
geometry = models[0].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'cylinder')
self.assertEqual(geometry.get_param('radius'), radius)
self.assertEqual(geometry.get_param('length'), length)
# Test collision element
self.assertEqual(len(models[0].links[link_name].collisions), 1)
collision = models[0].links[link_name].get_collision_by_name(
'collision')
tags = ['mu', 'mu2', 'slip1', 'slip2', 'fdir1']
for tag in tags:
self.assertEqual(
collision.get_ode_friction_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['friction', 'friction2', 'rolling_friction', 'fdir1']
for tag in tags:
self.assertEqual(
collision.get_bullet_friction_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['soft_cfm', 'soft_erp', 'kp', 'kd', 'max_vel', 'min_depth']
for tag in tags:
self.assertEqual(
collision.get_ode_contact_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['soft_cfm', 'soft_erp', 'kp', 'kd', 'split_impulse',
'split_impulse_penetration_threshold']
for tag in tags:
self.assertEqual(
collision.get_bullet_contact_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['restitution_coefficient', 'threshold']
for tag in tags:
self.assertEqual(
collision.get_bounce_param(tag),
model_config[0]['args']['collision_parameters'][tag])
geometry = models[0].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'cylinder')
self.assertEqual(geometry.get_param('radius'), radius)
self.assertEqual(geometry.get_param('length'), length)
# Test color exists
material = models[0].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_dynamic_cylinder_model(self):
for color in _get_colors():
name = generate_random_string(3)
pose = [random.rand() for _ in range(6)]
radius = random.rand()
length = random.rand()
mass = random.rand()
model_config = [
dict(
type='cylinder',
args=dict(
radius=radius,
length=length,
mass=mass,
name=name,
pose=pose,
color=color,
collision_parameters=dict(
mu=random.uniform(0, 10),
mu2=random.uniform(0, 10),
friction=random.uniform(0, 10),
friction2=random.uniform(0, 10),
slip1=random.uniform(0, 1),
slip2=random.uniform(0, 1),
rolling_friction=random.uniform(0, 1),
fdir1=[0, 0, 0],
max_contacts=1,
soft_cfm=random.uniform(0, 10),
soft_erp=random.uniform(0, 10),
kp=random.uniform(0, 100000),
kd=random.uniform(0, 10),
max_vel=random.uniform(0, 0.1),
min_depth=random.uniform(0, 0.1),
split_impulse=False,
split_impulse_penetration_threshold=-0.01,
restitution_coefficient=random.uniform(0, 1),
threshold=random.uniform(0, 1)
)
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), 1)
self.assertIsInstance(models[0], SimulationModel)
# Test pose of the model
self.assertEqual(models[0].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[0].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertFalse(models[0].static)
self.assertEqual(len(models[0].links), 1)
link_name = models[0].link_names[0]
# Test link properties
link = models[0].links[link_name]
self.assertEqual(link.inertial.mass, mass)
self.assertAlmostEqual(
link.inertial.ixx,
1. / 12 * mass * (3 * radius**2 + length**2))
self.assertAlmostEqual(
link.inertial.iyy,
1. / 12 * mass * (3 * radius**2 + length**2))
self.assertAlmostEqual(link.inertial.izz, 0.5 * mass * radius**2)
self.assertEqual(link.inertial.ixy, 0)
self.assertEqual(link.inertial.ixz, 0)
self.assertEqual(link.inertial.iyz, 0)
# Test visual element
self.assertEqual(len(models[0].links[link_name].visuals), 1)
geometry = models[0].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'cylinder')
self.assertEqual(geometry.get_param('radius'), radius)
self.assertEqual(geometry.get_param('length'), length)
# Test collision element
self.assertEqual(len(models[0].links[link_name].collisions), 1)
collision = models[0].links[link_name].get_collision_by_name(
'collision')
tags = ['mu', 'mu2', 'slip1', 'slip2', 'fdir1']
for tag in tags:
self.assertEqual(
collision.get_ode_friction_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['friction', 'friction2', 'rolling_friction', 'fdir1']
for tag in tags:
self.assertEqual(
collision.get_bullet_friction_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['soft_cfm', 'soft_erp', 'kp', 'kd', 'max_vel', 'min_depth']
for tag in tags:
self.assertEqual(
collision.get_ode_contact_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['soft_cfm', 'soft_erp', 'kp', 'kd', 'split_impulse',
'split_impulse_penetration_threshold']
for tag in tags:
self.assertEqual(
collision.get_bullet_contact_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['restitution_coefficient', 'threshold']
for tag in tags:
self.assertEqual(
collision.get_bounce_param(tag),
model_config[0]['args']['collision_parameters'][tag])
geometry = models[0].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'cylinder')
self.assertEqual(geometry.get_param('radius'), radius)
self.assertEqual(geometry.get_param('length'), length)
# Test color exists
material = models[0].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_cylinder_factory_fixed_args_with_permutation(self):
for color in _get_colors():
n_radius = random.randint(2, 4)
n_length = random.randint(2, 4)
n_masses = random.randint(2, 4)
name = generate_random_string(3)
radius = [random.rand() for _ in range(n_radius)]
length = [random.rand() for _ in range(n_length)]
pose = [random.rand() for _ in range(6)]
masses = [random.rand() for _ in range(n_masses)]
model_config = [
dict(
type='cylinder_factory',
args=dict(
name=name,
radius=radius,
length=length,
mass=masses,
pose=pose,
use_permutation=True,
color=color
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_radius * n_length * n_masses)
for i in range(len(models)):
# Check the name generator with counter
self.assertIn(name + '_', models[i].name)
self.assertTrue(models[i].name.split('_')[-1].isdigit())
self.assertIsInstance(models[i], SimulationModel)
# Test pose of the model
self.assertEqual(models[i].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[i].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertFalse(models[i].static)
self.assertEqual(len(models[i].links), 1)
link_name = models[i].link_names[0]
self.assertIn(models[i].links[link_name].inertial.mass, masses)
# Test visual element
self.assertEqual(len(models[i].links[link_name].visuals), 1)
geometry = models[i].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'cylinder')
self.assertIn(geometry.get_param('radius'), radius)
self.assertIn(geometry.get_param('length'), length)
# Test collision element
self.assertEqual(len(models[i].links[link_name].collisions), 1)
geometry = models[i].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'cylinder')
self.assertIn(geometry.get_param('radius'), radius)
self.assertIn(geometry.get_param('length'), length)
# Test color exists
material = models[i].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_cylinder_factory_fixed_args_no_permutation(self):
for color in _get_colors():
n_models = random.randint(2, 4)
name = generate_random_string(3)
radius = [random.rand() for _ in range(n_models)]
length = [random.rand() for _ in range(n_models)]
pose = [random.rand() for _ in range(6)]
masses = [random.rand() for _ in range(n_models)]
model_config = [
dict(
type='cylinder_factory',
args=dict(
name=name,
radius=radius,
length=length,
mass=masses,
pose=pose,
use_permutation=False,
color=color
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_models)
for i in range(len(models)):
# Check the name generator with counter
self.assertIn(name + '_', models[i].name)
self.assertTrue(models[i].name.split('_')[-1].isdigit())
self.assertIsInstance(models[i], SimulationModel)
# Test pose of the model
self.assertEqual(models[i].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[i].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertFalse(models[i].static)
self.assertEqual(len(models[i].links), 1)
link_name = models[i].link_names[0]
self.assertIn(models[i].links[link_name].inertial.mass, masses)
# Test visual element
self.assertEqual(len(models[i].links[link_name].visuals), 1)
geometry = models[i].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'cylinder')
self.assertIn(geometry.get_param('radius'), radius)
self.assertIn(geometry.get_param('length'), length)
# Test collision element
self.assertEqual(len(models[i].links[link_name].collisions), 1)
geometry = models[i].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'cylinder')
self.assertIn(geometry.get_param('radius'), radius)
self.assertIn(geometry.get_param('length'), length)
# Test color exists
material = models[i].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_cylinder_factory_lambda_args_with_permutation(self):
for color in _get_colors():
n_radius = random.randint(2, 4)
n_length = random.randint(2, 4)
n_masses = random.randint(2, 4)
name = generate_random_string(3)
radius = "__import__('numpy').random.random({})".format(n_radius)
length = "__import__('numpy').linspace(1, 10, {})".format(n_length)
masses = "__import__('numpy').linspace(1, 10, {})".format(n_masses)
pose = [random.rand() for _ in range(6)]
model_config = [
dict(
type='cylinder_factory',
args=dict(
name=name,
radius=radius,
length=length,
mass=masses,
pose=pose,
use_permutation=True,
color=color
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_radius * n_length * n_masses)
for i in range(len(models)):
# Check the name generator with counter
self.assertIn(name + '_', models[i].name)
self.assertTrue(models[i].name.split('_')[-1].isdigit())
self.assertIsInstance(models[i], SimulationModel)
# Test pose of the model
self.assertEqual(models[i].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[i].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertFalse(models[i].static)
self.assertEqual(len(models[i].links), 1)
link_name = models[i].link_names[0]
# Test visual element
self.assertEqual(len(models[i].links[link_name].visuals), 1)
geometry = models[i].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'cylinder')
# Test collision element
self.assertEqual(len(models[i].links[link_name].collisions), 1)
geometry = models[i].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'cylinder')
# Test color exists
material = models[i].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_cylinder_forced_permutation(self):
n_radius = 1
n_masses = 2
n_length = 3
name = generate_random_string(3)
# Test with lambda functions
radius = "__import__('numpy').random.random({})".format(n_radius)
length = "__import__('numpy').random.random({})".format(n_length)
masses = "__import__('numpy').linspace(1, 10, {})".format(n_masses)
pose = [random.rand() for _ in range(6)]
model_config = [
dict(
type='cylinder_factory',
args=dict(
name=name,
radius=radius,
length=length,
mass=masses,
pose=pose,
use_permutation=False,
color=None
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_radius * n_length * n_masses)
# Test with fixed arguments
radius = [random.rand() for _ in range(n_radius)]
length = [random.rand() for _ in range(n_length)]
masses = [random.rand() for _ in range(n_masses)]
pose = [random.rand() for _ in range(6)]
model_config = [
dict(
type='cylinder_factory',
args=dict(
name=name,
radius=radius,
length=length,
mass=masses,
pose=pose,
use_permutation=False,
color=None
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_radius * n_length * n_masses)
def test_static_sphere_model(self):
for color in _get_colors():
name = generate_random_string(3)
pose = [random.rand() for _ in range(6)]
radius = random.rand()
model_config = [
dict(
type='sphere',
args=dict(
radius=radius,
name=name,
pose=pose,
color=color,
collision_parameters=dict(
mu=random.uniform(0, 10),
mu2=random.uniform(0, 10),
friction=random.uniform(0, 10),
friction2=random.uniform(0, 10),
slip1=random.uniform(0, 1),
slip2=random.uniform(0, 1),
rolling_friction=random.uniform(0, 1),
fdir1=[0, 0, 0],
max_contacts=1,
soft_cfm=random.uniform(0, 10),
soft_erp=random.uniform(0, 10),
kp=random.uniform(0, 100000),
kd=random.uniform(0, 10),
max_vel=random.uniform(0, 0.1),
min_depth=random.uniform(0, 0.1),
split_impulse=False,
split_impulse_penetration_threshold=-0.01,
restitution_coefficient=random.uniform(0, 1),
threshold=random.uniform(0, 1)
)
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), 1)
self.assertIsInstance(models[0], SimulationModel)
# Test pose of the model
self.assertEqual(models[0].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[0].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertTrue(models[0].static)
self.assertEqual(len(models[0].links), 1)
link_name = models[0].link_names[0]
# Test visual element
self.assertEqual(len(models[0].links[link_name].visuals), 1)
geometry = models[0].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'sphere')
self.assertEqual(geometry.get_param('radius'), radius)
# Test collision element
self.assertEqual(len(models[0].links[link_name].collisions), 1)
collision = models[0].links[link_name].get_collision_by_name(
'collision')
tags = ['mu', 'mu2', 'slip1', 'slip2', 'fdir1']
for tag in tags:
self.assertEqual(
collision.get_ode_friction_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['friction', 'friction2', 'rolling_friction', 'fdir1']
for tag in tags:
self.assertEqual(
collision.get_bullet_friction_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['soft_cfm', 'soft_erp', 'kp', 'kd', 'max_vel', 'min_depth']
for tag in tags:
self.assertEqual(
collision.get_ode_contact_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['soft_cfm', 'soft_erp', 'kp', 'kd', 'split_impulse',
'split_impulse_penetration_threshold']
for tag in tags:
self.assertEqual(
collision.get_bullet_contact_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['restitution_coefficient', 'threshold']
for tag in tags:
self.assertEqual(
collision.get_bounce_param(tag),
model_config[0]['args']['collision_parameters'][tag])
geometry = models[0].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'sphere')
self.assertEqual(geometry.get_param('radius'), radius)
# Test color exists
material = models[0].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_dynamic_sphere_model(self):
for color in _get_colors():
name = generate_random_string(3)
pose = [random.rand() for _ in range(6)]
radius = random.rand()
mass = random.rand()
model_config = [
dict(
type='sphere',
args=dict(
radius=radius,
mass=mass,
name=name,
pose=pose,
color=color,
collision_parameters=dict(
mu=random.uniform(0, 10),
mu2=random.uniform(0, 10),
friction=random.uniform(0, 10),
friction2=random.uniform(0, 10),
slip1=random.uniform(0, 1),
slip2=random.uniform(0, 1),
rolling_friction=random.uniform(0, 1),
fdir1=[0, 0, 0],
max_contacts=1,
soft_cfm=random.uniform(0, 10),
soft_erp=random.uniform(0, 10),
kp=random.uniform(0, 100000),
kd=random.uniform(0, 10),
max_vel=random.uniform(0, 0.1),
min_depth=random.uniform(0, 0.1),
split_impulse=True,
split_impulse_penetration_threshold=-0.01,
restitution_coefficient=random.uniform(0, 1),
threshold=random.uniform(0, 1)
)
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), 1)
self.assertIsInstance(models[0], SimulationModel)
# Test pose of the model
self.assertEqual(models[0].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[0].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertFalse(models[0].static)
self.assertEqual(len(models[0].links), 1)
link_name = models[0].link_names[0]
# Test link properties
link = models[0].links[link_name]
self.assertEqual(link.inertial.mass, mass)
inertia = 2. / 5 * mass * radius**2
self.assertAlmostEqual(link.inertial.ixx, inertia)
self.assertAlmostEqual(link.inertial.iyy, inertia)
self.assertAlmostEqual(link.inertial.izz, inertia)
self.assertEqual(link.inertial.ixy, 0)
self.assertEqual(link.inertial.ixz, 0)
self.assertEqual(link.inertial.iyz, 0)
# Test visual element
self.assertEqual(len(models[0].links[link_name].visuals), 1)
geometry = models[0].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'sphere')
self.assertEqual(geometry.get_param('radius'), radius)
# Test collision element
self.assertEqual(len(models[0].links[link_name].collisions), 1)
collision = models[0].links[link_name].get_collision_by_name(
'collision')
tags = ['mu', 'mu2', 'slip1', 'slip2', 'fdir1']
for tag in tags:
self.assertEqual(
collision.get_ode_friction_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['friction', 'friction2', 'rolling_friction', 'fdir1']
for tag in tags:
self.assertEqual(
collision.get_bullet_friction_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['soft_cfm', 'soft_erp', 'kp', 'kd', 'max_vel', 'min_depth']
for tag in tags:
self.assertEqual(
collision.get_ode_contact_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['soft_cfm', 'soft_erp', 'kp', 'kd', 'split_impulse',
'split_impulse_penetration_threshold']
for tag in tags:
self.assertEqual(
collision.get_bullet_contact_param(tag),
model_config[0]['args']['collision_parameters'][tag])
tags = ['restitution_coefficient', 'threshold']
for tag in tags:
self.assertEqual(
collision.get_bounce_param(tag),
model_config[0]['args']['collision_parameters'][tag])
geometry = models[0].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'sphere')
self.assertEqual(geometry.get_param('radius'), radius)
# Test color exists
material = models[0].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_sphere_factory_fixed_args_with_permutation(self):
for color in _get_colors():
n_radius = random.randint(2, 4)
n_masses = random.randint(2, 4)
name = generate_random_string(3)
radius = [random.rand() for _ in range(n_radius)]
pose = [random.rand() for _ in range(6)]
masses = [random.rand() for _ in range(n_masses)]
model_config = [
dict(
type='sphere_factory',
args=dict(
name=name,
radius=radius,
mass=masses,
pose=pose,
use_permutation=True,
color=color
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_radius * n_masses)
for i in range(len(models)):
# Check the name generator with counter
self.assertIn(name + '_', models[i].name)
self.assertTrue(models[i].name.split('_')[-1].isdigit())
self.assertIsInstance(models[i], SimulationModel)
# Test pose of the model
self.assertEqual(models[i].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[i].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertFalse(models[i].static)
self.assertEqual(len(models[i].links), 1)
link_name = models[i].link_names[0]
self.assertIn(models[i].links[link_name].inertial.mass, masses)
# Test visual element
self.assertEqual(len(models[i].links[link_name].visuals), 1)
geometry = models[i].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'sphere')
self.assertIn(geometry.get_param('radius'), radius)
# Test collision element
self.assertEqual(len(models[i].links[link_name].collisions), 1)
geometry = models[i].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'sphere')
self.assertIn(geometry.get_param('radius'), radius)
# Test color exists
material = models[i].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_sphere_factory_fixed_args_no_permutation(self):
for color in _get_colors():
n_models = random.randint(2, 4)
name = generate_random_string(3)
radius = [random.rand() for _ in range(n_models)]
pose = [random.rand() for _ in range(6)]
masses = [random.rand() for _ in range(n_models)]
model_config = [
dict(
type='sphere_factory',
args=dict(
name=name,
radius=radius,
mass=masses,
pose=pose,
use_permutation=False,
color=color
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_models)
for i in range(len(models)):
# Check the name generator with counter
self.assertIn(name + '_', models[i].name)
self.assertTrue(models[i].name.split('_')[-1].isdigit())
self.assertIsInstance(models[i], SimulationModel)
# Test pose of the model
self.assertEqual(models[i].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[i].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertFalse(models[i].static)
self.assertEqual(len(models[i].links), 1)
link_name = models[i].link_names[0]
self.assertIn(models[i].links[link_name].inertial.mass, masses)
# Test visual element
self.assertEqual(len(models[i].links[link_name].visuals), 1)
geometry = models[i].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'sphere')
self.assertIn(geometry.get_param('radius'), radius)
# Test collision element
self.assertEqual(len(models[i].links[link_name].collisions), 1)
geometry = models[i].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'sphere')
self.assertIn(geometry.get_param('radius'), radius)
# Test color exists
material = models[i].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_sphere_factory_lambda_args_with_permutation(self):
for color in _get_colors():
n_radius = random.randint(2, 4)
n_masses = random.randint(2, 4)
name = generate_random_string(3)
radius = "__import__('numpy').random.random({})".format(n_radius)
masses = "__import__('numpy').linspace(1, 10, {})".format(n_masses)
pose = [random.rand() for _ in range(6)]
model_config = [
dict(
type='sphere_factory',
args=dict(
name=name,
radius=radius,
mass=masses,
pose=pose,
use_permutation=True,
color=color
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_radius * n_masses)
for i in range(len(models)):
# Check the name generator with counter
self.assertIn(name + '_', models[i].name)
self.assertTrue(models[i].name.split('_')[-1].isdigit())
self.assertIsInstance(models[i], SimulationModel)
# Test pose of the model
self.assertEqual(models[i].pose.position.tolist(), pose[0:3])
q = Pose.rpy2quat(*pose[3::])
diff = Pose.get_transform(models[i].pose.quat, q)
# Test model properties
self.assertAlmostEqual(np.sum(diff[0:3]), 0)
self.assertFalse(models[i].static)
self.assertEqual(len(models[i].links), 1)
link_name = models[i].link_names[0]
# Test visual element
self.assertEqual(len(models[i].links[link_name].visuals), 1)
geometry = models[i].links[link_name].visuals[0].geometry
self.assertEqual(geometry.get_type(), 'sphere')
# Test collision element
self.assertEqual(len(models[i].links[link_name].collisions), 1)
geometry = models[i].links[link_name].collisions[0].geometry
self.assertEqual(geometry.get_type(), 'sphere')
# Test color exists
material = models[i].links[link_name].visuals[0].material
self.assertIsNotNone(material)
self.assertIsNotNone(material.ambient)
self.assertIsNotNone(material.diffuse)
if not isinstance(
color, str) and isinstance(
color, list) and color is not None:
self.assertEqual(material.ambient.value, color)
self.assertEqual(material.diffuse.value, color)
def test_sphere_forced_permutation(self):
n_radius = random.randint(2, 3)
n_masses = 2 * n_radius
name = generate_random_string(3)
# Test with lambda functions
radius = "__import__('numpy').random.random({})".format(n_radius)
masses = "__import__('numpy').linspace(1, 10, {})".format(n_masses)
pose = [random.rand() for _ in range(6)]
model_config = [
dict(
type='sphere_factory',
args=dict(
name=name,
radius=radius,
mass=masses,
pose=pose,
use_permutation=False,
color=None
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_radius * n_masses)
# Test with fixed arguments
radius = [random.rand() for _ in range(n_radius)]
masses = [random.rand() for _ in range(n_masses)]
pose = [random.rand() for _ in range(6)]
model_config = [
dict(
type='sphere_factory',
args=dict(
name=name,
radius=radius,
mass=masses,
pose=pose,
use_permutation=False,
color=None
))
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), n_radius * n_masses)
def test_extrude_polygon(self):
# Create mesh by extruding a polygon
vertices = [(0, 0), (0, 2), (2, 2), (2, 0), (0, 0)]
poly = Polygon(vertices)
name = generate_random_string(3)
pose = [random.rand() for _ in range(6)]
mass = random.rand()
height = random.rand()
model_config = [
dict(
type='extrude',
args=dict(
polygon=poly,
name=name,
mass=mass,
height=height,
pose=pose,
color=None
)
)
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), 1)
for model in models:
_delete_generated_meshes(model.to_sdf())
# Extrude only the boundaries
cap_style = ['round', 'flat', 'square']
join_style = ['round', 'mitre', 'bevel']
for cs in cap_style:
for js in join_style:
model_config = [
dict(
type='extrude',
args=dict(
polygon=poly,
name=name,
mass=mass,
height=height,
pose=pose,
color=None,
extrude_boundaries=True,
thickness=random.rand(),
cap_style=cs,
join_style=js
)
)
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), 1)
for model in models:
_delete_generated_meshes(model.to_sdf())
# Create a mesh by dilating point
vertices = [(random.rand() * 5, random.rand() * 5)]
poly = MultiPoint(vertices)
name = generate_random_string(3)
pose = [random.rand() for _ in range(6)]
mass = random.rand()
height = random.rand()
model_config = [
dict(
type='extrude',
args=dict(
polygon=poly,
name=name,
mass=mass,
height=height,
pose=pose,
color=None,
thickness=random.rand()
)
)
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), 1)
for model in models:
_delete_generated_meshes(model.to_sdf())
# Create a mesh by dilating a line
vertices = [(random.rand() * 5, random.rand() * 5)
for _ in range(5)]
poly = LineString(vertices)
name = generate_random_string(3)
pose = [random.rand() for _ in range(6)]
mass = random.rand()
height = random.rand()
for cs in cap_style:
for js in join_style:
model_config = [
dict(
type='extrude',
args=dict(
polygon=poly,
name=name,
mass=mass,
height=height,
pose=pose,
color=None,
cap_style=cs,
join_style=js,
thickness=random.rand()
)
)
]
models = create_models_from_config(model_config)
self.assertEqual(len(models), 1)
for model in models:
_delete_generated_meshes(model.to_sdf())
def test_invalid_polygon_extrude_inputs(self):
vertices = [(random.rand() * 5, random.rand() * 5)]
model_config = [
dict(
type='extrude',
args=dict(
polygon=MultiPoint(vertices),
thickness=0,
height=random.rand()
)
)
]
with self.assertRaises(AssertionError):
create_models_from_config(model_config)
def test_export_to_gazebo_model(self):
# Create mesh by extruding a polygon
vertices = [(0, 0), (0, 2), (2, 2), (2, 0), (0, 0)]
poly = Polygon(vertices)
name = generate_random_string(3)
pose = [random.rand() for _ in range(6)]
mass = random.rand()
height = 10 * random.rand()
model_config = dict(
polygon=poly,
name=name,
mass=mass,
height=height,
pose=pose,
color=None
)
model = extrude(**model_config)
model_dir = model.to_gazebo_model()
self.assertTrue(os.path.isdir(model_dir))
shutil.rmtree(model_dir)
if __name__ == '__main__':
unittest.main()
| 41.705717
| 79
| 0.51342
| 7,545
| 74,403
| 4.894897
| 0.038171
| 0.084886
| 0.034117
| 0.044189
| 0.949312
| 0.940187
| 0.935638
| 0.925972
| 0.920936
| 0.919447
| 0
| 0.020484
| 0.380616
| 74,403
| 1,783
| 80
| 41.729108
| 0.780922
| 0.040254
| 0
| 0.877378
| 0
| 0
| 0.04839
| 0.015331
| 0
| 0
| 0
| 0
| 0.246653
| 1
| 0.018323
| false
| 0
| 0.022551
| 0
| 0.042283
| 0.000705
| 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
|
018eb361eddd592309fff69045cb98d9066ea2e0
| 39,647
|
py
|
Python
|
hallo/test/modules/channel_control/test_de_operator.py
|
joshcoales/Hallo
|
17145d8f76552ecd4cbc5caef8924bd2cf0cbf24
|
[
"MIT"
] | 1
|
2018-05-19T22:27:20.000Z
|
2018-05-19T22:27:20.000Z
|
hallo/test/modules/channel_control/test_de_operator.py
|
joshcoales/Hallo
|
17145d8f76552ecd4cbc5caef8924bd2cf0cbf24
|
[
"MIT"
] | 75
|
2015-09-26T18:07:18.000Z
|
2022-01-04T07:15:11.000Z
|
hallo/test/modules/channel_control/test_de_operator.py
|
SpangleLabs/Hallo
|
17145d8f76552ecd4cbc5caef8924bd2cf0cbf24
|
[
"MIT"
] | 1
|
2021-04-10T12:02:47.000Z
|
2021-04-10T12:02:47.000Z
|
from hallo.events import EventMessage, EventMode
from hallo.server import Server
from hallo.test.server_mock import ServerMock
def test_deop_not_irc(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = "NOT_IRC"
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
chan1.add_user(user1)
chan1.add_user(
serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
)
try:
test_hallo.function_dispatcher.dispatch(EventMessage(serv1, chan1, user1, "deop"))
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "only available for irc" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_0_privmsg(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
user1 = serv1.get_user_by_address("test_user1", "test_user1")
chan1.add_user(user1)
chan1.add_user(
serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
)
try:
test_hallo.function_dispatcher.dispatch(EventMessage(serv1, None, user1, "deop"))
data = serv1.get_send_data(1, user1, EventMessage)
assert "error" in data[0].text.lower()
assert "in a private message" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_0_no_power(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
user1 = serv1.get_user_by_address("test_user1", "test_user1")
chan1.add_user(user1)
chan1.add_user(
serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
)
try:
test_hallo.function_dispatcher.dispatch(EventMessage(serv1, chan1, user1, "deop"))
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "don't have power" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_0_not_op(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
user1 = serv1.get_user_by_address("test_user1", "test_user1")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1.add_user(user_hallo)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(EventMessage(serv1, chan1, user1, "deop"))
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "doesn't have op" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_0(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
user1 = serv1.get_user_by_address("test_user1", "test_user1")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1.add_user(user_hallo)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = True
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(EventMessage(serv1, chan1, user1, "deop"))
data = serv1.get_send_data(2)
assert "error" not in data[1].text.lower()
assert data[0].channel == chan1
assert data[1].channel == chan1
assert data[0].__class__ == EventMode
assert data[1].__class__ == EventMessage
assert "-o " + user1.name in data[0].mode_changes
assert "status taken" in data[1].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1priv_channel_not_known(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1.add_user(user_hallo)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, None, user1, "deop other_channel")
)
data = serv1.get_send_data(1, user1, EventMessage)
assert "error" in data[0].text.lower()
assert "other_channel is not known" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1priv_not_in_channel(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1.add_user(user_hallo)
serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, None, user1, "deop test_chan2")
)
data = serv1.get_send_data(1, user1, EventMessage)
assert "error" in data[0].text.lower()
assert "not in that channel" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1priv_user_not_there(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, None, user1, "deop test_chan1")
)
data = serv1.get_send_data(1, user1, EventMessage)
assert "error" in data[0].text.lower()
assert "test_user1 is not in test_chan1" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1priv_no_power(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1.add_user(user_hallo)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = False
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, None, user1, "deop test_chan1")
)
data = serv1.get_send_data(1, user1, EventMessage)
assert "error" in data[0].text.lower()
assert "don't have power" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1priv_not_op(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1.add_user(user_hallo)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, None, user1, "deop test_chan1")
)
data = serv1.get_send_data(1, user1, EventMessage)
assert "error" in data[0].text.lower()
assert "doesn't have op" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1priv(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1.add_user(user_hallo)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = True
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, None, user1, "deop test_chan1")
)
data = serv1.get_send_data(2)
assert "error" not in data[1].text.lower()
assert data[0].channel == chan1
assert data[1].user == user1
assert data[0].__class__ == EventMode
assert data[1].__class__ == EventMessage
assert "-o " + user1.name in data[0].mode_changes
assert "status taken" in data[1].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1_chan_user_not_there(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1.add_user(user_hallo)
chan2.add_user(user2)
chan2.add_user(user_hallo)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2_user2 = chan2.get_membership_by_user(user2)
chan2_user2.is_op = False
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_chan2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "test_user1 is not in test_chan2" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1_chan_no_power(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1.add_user(user_hallo)
chan2.add_user(user1)
chan2.add_user(user_hallo)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2_user1 = chan2.get_membership_by_user(user1)
chan2_user1.is_op = False
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = False
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_chan2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "don't have power" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1_chan_not_op(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1.add_user(user_hallo)
chan2.add_user(user1)
chan2.add_user(user_hallo)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2_user1 = chan2.get_membership_by_user(user1)
chan2_user1.is_op = False
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_chan2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "doesn't have op" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1_chan(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1.add_user(user_hallo)
chan2.add_user(user1)
chan2.add_user(user_hallo)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2_user1 = chan2.get_membership_by_user(user1)
chan2_user1.is_op = True
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_chan2")
)
data = serv1.get_send_data(2)
assert "error" not in data[1].text.lower()
assert data[0].channel == chan2
assert data[1].channel == chan1
assert data[0].__class__ == EventMode
assert data[1].__class__ == EventMessage
assert "-o " + user1.name in data[0].mode_changes
assert "status taken" in data[1].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1_user_not_here(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_user2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "test_user2 is not in test_chan1" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1_user_no_power(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = False
chan1.add_user(user2)
chan1_user2 = chan1.get_membership_by_user(user2)
chan1_user2.is_op = False
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_user2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "don't have power" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1_user_not_op(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan1.add_user(user2)
chan1_user2 = chan1.get_membership_by_user(user2)
chan1_user2.is_op = False
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_user2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "doesn't have op" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_1_user(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan1.add_user(user2)
chan1_user2 = chan1.get_membership_by_user(user2)
chan1_user2.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_user2")
)
data = serv1.get_send_data(2)
assert "error" not in data[1].text.lower()
assert data[0].channel == chan1
assert data[1].channel == chan1
assert data[0].__class__ == EventMode
assert data[1].__class__ == EventMessage
assert "-o " + user2.name in data[0].mode_changes
assert "status taken" in data[1].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_2_chan_user_not_known(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2.add_user(user2)
chan2_user1 = chan2.get_membership_by_user(user2)
chan2_user1.is_op = False
chan2.add_user(user_hallo)
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_chan2 test_user3")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "test_user3 is not known" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_2_chan_user_not_there(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
serv1.get_user_by_address("test_user3".lower(), "test_user3")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2.add_user(user2)
chan2_user1 = chan2.get_membership_by_user(user2)
chan2_user1.is_op = False
chan2.add_user(user_hallo)
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_chan2 test_user3")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "test_user3 is not in test_chan2" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_2_chan_no_power(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2.add_user(user2)
chan2_user1 = chan2.get_membership_by_user(user2)
chan2_user1.is_op = False
chan2.add_user(user_hallo)
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = False
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_chan2 test_user2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "don't have power" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_2_chan_not_op(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2.add_user(user2)
chan2_user2 = chan2.get_membership_by_user(user2)
chan2_user2.is_op = False
chan2.add_user(user_hallo)
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_chan2 test_user2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "doesn't have op" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_2_chan(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2.add_user(user2)
chan2_user2 = chan2.get_membership_by_user(user2)
chan2_user2.is_op = True
chan2.add_user(user_hallo)
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_chan2 test_user2")
)
data = serv1.get_send_data(2)
assert "error" not in data[1].text.lower()
assert data[0].channel == chan2
assert data[1].channel == chan1
assert data[0].__class__ == EventMode
assert data[1].__class__ == EventMessage
assert "-o " + user2.name in data[0].mode_changes
assert "status taken" in data[1].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_2_user_not_in_channel(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = False
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2.add_user(user2)
chan2_user1 = chan2.get_membership_by_user(user2)
chan2_user1.is_op = False
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_user2 test_chan2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "i'm not in that channel" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_2_user_user_not_known(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2.add_user(user2)
chan2_user1 = chan2.get_membership_by_user(user2)
chan2_user1.is_op = False
chan2.add_user(user_hallo)
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_user3 test_chan2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "test_user3 is not known" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_2_user_user_not_there(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
serv1.get_user_by_address("test_user3".lower(), "test_user3")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2.add_user(user2)
chan2_user1 = chan2.get_membership_by_user(user2)
chan2_user1.is_op = False
chan2.add_user(user_hallo)
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_user3 test_chan2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "test_user3 is not in test_chan2" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_2_user_no_power(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2.add_user(user2)
chan2_user1 = chan2.get_membership_by_user(user2)
chan2_user1.is_op = False
chan2.add_user(user_hallo)
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = False
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_user2 test_chan2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "don't have power" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_2_user_not_op(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2.add_user(user2)
chan2_user2 = chan2.get_membership_by_user(user2)
chan2_user2.is_op = False
chan2.add_user(user_hallo)
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_user2 test_chan2")
)
data = serv1.get_send_data(1, chan1, EventMessage)
assert "error" in data[0].text.lower()
assert "doesn't have op" in data[0].text.lower()
finally:
test_hallo.remove_server(serv1)
def test_deop_2_user(hallo_getter):
test_hallo = hallo_getter({"channel_control"})
serv1 = ServerMock(test_hallo)
serv1.name = "test_serv1"
serv1.type = Server.TYPE_IRC
test_hallo.add_server(serv1)
chan1 = serv1.get_channel_by_address("test_chan1".lower(), "test_chan1")
chan1.in_channel = True
chan2 = serv1.get_channel_by_address("test_chan2".lower(), "test_chan2")
chan2.in_channel = True
user1 = serv1.get_user_by_address("test_user1".lower(), "test_user1")
user2 = serv1.get_user_by_address("test_user2".lower(), "test_user2")
user_hallo = serv1.get_user_by_address(serv1.get_nick().lower(), serv1.get_nick())
chan1.add_user(user1)
chan1_user1 = chan1.get_membership_by_user(user1)
chan1_user1.is_op = False
chan1.add_user(user_hallo)
chan1_hallo = chan1.get_membership_by_user(user_hallo)
chan1_hallo.is_op = True
chan2.add_user(user2)
chan2_user2 = chan2.get_membership_by_user(user2)
chan2_user2.is_op = True
chan2.add_user(user_hallo)
chan2_hallo = chan2.get_membership_by_user(user_hallo)
chan2_hallo.is_op = True
try:
test_hallo.function_dispatcher.dispatch(
EventMessage(serv1, chan1, user1, "deop test_user2 test_chan2")
)
data = serv1.get_send_data(2)
assert "error" not in data[1].text.lower()
assert data[0].channel == chan2
assert data[1].channel == chan1
assert data[0].__class__ == EventMode
assert data[1].__class__ == EventMessage
assert "-o " + user2.name in data[0].mode_changes
assert "status taken" in data[1].text.lower()
finally:
test_hallo.remove_server(serv1)
| 41.042443
| 90
| 0.70762
| 5,685
| 39,647
| 4.570097
| 0.014248
| 0.066818
| 0.048535
| 0.062161
| 0.991109
| 0.990916
| 0.990916
| 0.990916
| 0.990916
| 0.990916
| 0
| 0.048383
| 0.180493
| 39,647
| 965
| 91
| 41.084974
| 0.751254
| 0
| 0
| 0.913812
| 0
| 0
| 0.099705
| 0
| 0
| 0
| 0
| 0
| 0.099448
| 1
| 0.033149
| false
| 0
| 0.003315
| 0
| 0.036464
| 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
|
6defac8f1015dd7e947197dcda96dec8473101d6
| 199
|
py
|
Python
|
autodisc/representations/static/pytorchnnrepresentation/models/__init__.py
|
flowersteam/holmes
|
e38fb8417ec56cfde8142eddd0f751e319e35d8c
|
[
"MIT"
] | 6
|
2020-12-19T00:16:16.000Z
|
2022-01-28T14:59:21.000Z
|
autodisc/representations/static/pytorchnnrepresentation/models/__init__.py
|
Evolutionary-Intelligence/holmes
|
e38fb8417ec56cfde8142eddd0f751e319e35d8c
|
[
"MIT"
] | null | null | null |
autodisc/representations/static/pytorchnnrepresentation/models/__init__.py
|
Evolutionary-Intelligence/holmes
|
e38fb8417ec56cfde8142eddd0f751e319e35d8c
|
[
"MIT"
] | 1
|
2021-05-24T14:58:26.000Z
|
2021-05-24T14:58:26.000Z
|
from autodisc.representations.static.pytorchnnrepresentation.models.encoders import EncoderBurgess
from autodisc.representations.static.pytorchnnrepresentation.models.decoders import DecoderBurgess
| 49.75
| 98
| 0.904523
| 18
| 199
| 10
| 0.611111
| 0.133333
| 0.3
| 0.366667
| 0.688889
| 0.688889
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045226
| 199
| 3
| 99
| 66.333333
| 0.947368
| 0
| 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
|
6df14879b950933abacc38dea90c26ad6c6515c2
| 97
|
py
|
Python
|
component_tests/tests/features/steps/__init__.py
|
Cobalt0s/sommelier
|
d64943a5d7be4ecdf08aa18e9f184b757e408425
|
[
"MIT"
] | null | null | null |
component_tests/tests/features/steps/__init__.py
|
Cobalt0s/sommelier
|
d64943a5d7be4ecdf08aa18e9f184b757e408425
|
[
"MIT"
] | null | null | null |
component_tests/tests/features/steps/__init__.py
|
Cobalt0s/sommelier
|
d64943a5d7be4ecdf08aa18e9f184b757e408425
|
[
"MIT"
] | null | null | null |
from sommelier.steps.response_processing import *
from sommelier.steps.event_processing import *
| 32.333333
| 49
| 0.85567
| 12
| 97
| 6.75
| 0.583333
| 0.320988
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.082474
| 97
| 2
| 50
| 48.5
| 0.910112
| 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
|
096a75b1219f50f0c996c46826203e3429895949
| 15,833
|
py
|
Python
|
model.py
|
lei-wang-github/unet
|
1dcf41a2956b58358f14e00c0df4daf366d272b8
|
[
"MIT"
] | null | null | null |
model.py
|
lei-wang-github/unet
|
1dcf41a2956b58358f14e00c0df4daf366d272b8
|
[
"MIT"
] | null | null | null |
model.py
|
lei-wang-github/unet
|
1dcf41a2956b58358f14e00c0df4daf366d272b8
|
[
"MIT"
] | null | null | null |
import numpy as np
import os
import skimage.io as io
import skimage.transform as trans
import numpy as np
from tensorflow.keras.models import *
from tensorflow.keras.layers import *
from tensorflow.keras.optimizers import *
from tensorflow.keras.callbacks import ModelCheckpoint, LearningRateScheduler
from keras import backend as keras
import math
import configparser
config = configparser.ConfigParser()
config.read('configuration.txt')
img_height = int(config['data attributes']['image_height'])
img_width = int(config['data attributes']['image_width'])
model_reduction_ratio = int(config['model type']['modelReductionRatio'])
learningRate = float(config['training settings']['learningRate'])
def unet_original(pretrained_weights = None,input_size = (img_height,img_width,1)):
inputs = Input(input_size)
conv1 = Conv2D(64, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(inputs)
conv1 = Conv2D(64, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv1)
pool1 = MaxPooling2D(pool_size=(2, 2))(conv1)
conv2 = Conv2D(128, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(pool1)
conv2 = Conv2D(128, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv2)
pool2 = MaxPooling2D(pool_size=(2, 2))(conv2)
conv3 = Conv2D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(pool2)
conv3 = Conv2D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv3)
pool3 = MaxPooling2D(pool_size=(2, 2))(conv3)
conv4 = Conv2D(512, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(pool3)
conv4 = Conv2D(512, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv4)
drop4 = Dropout(0.5)(conv4)
pool4 = MaxPooling2D(pool_size=(2, 2))(drop4)
conv5 = Conv2D(1024, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(pool4)
conv5 = Conv2D(1024, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv5)
drop5 = Dropout(0.5)(conv5)
up6 = Conv2D(512, 2, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(UpSampling2D(size = (2,2))(drop5))
merge6 = concatenate([drop4,up6], axis = 3)
conv6 = Conv2D(512, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(merge6)
conv6 = Conv2D(512, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv6)
up7 = Conv2D(256, 2, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(UpSampling2D(size = (2,2))(conv6))
merge7 = concatenate([conv3,up7], axis = 3)
conv7 = Conv2D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(merge7)
conv7 = Conv2D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv7)
up8 = Conv2D(128, 2, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(UpSampling2D(size = (2,2))(conv7))
merge8 = concatenate([conv2,up8], axis = 3)
conv8 = Conv2D(128, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(merge8)
conv8 = Conv2D(128, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv8)
up9 = Conv2D(64, 2, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(UpSampling2D(size = (2,2))(conv8))
merge9 = concatenate([conv1,up9], axis = 3)
conv9 = Conv2D(64, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(merge9)
conv9 = Conv2D(64, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv9)
conv9 = Conv2D(2, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal')(conv9)
conv10 = Conv2D(1, 1, activation = 'sigmoid')(conv9)
model = Model(inputs = inputs, outputs = conv10)
model.compile(optimizer = Adam(lr = learningRate), loss = 'binary_crossentropy', metrics = ['accuracy'])
model.summary()
if(pretrained_weights):
model.load_weights(pretrained_weights)
return model
def unet(pretrained_weights=None, input_size=(img_height, img_width, 1)):
reduction_ratio = model_reduction_ratio
inputs = Input(input_size)
conv1 = Conv2D(int(math.ceil(64/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(inputs)
conv1 = Conv2D(int(math.ceil(64/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(conv1)
pool1 = MaxPooling2D(pool_size=(2, 2))(conv1)
conv2 = Conv2D(int(math.ceil(128/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(pool1)
conv2 = Conv2D(int(math.ceil(128/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(conv2)
pool2 = MaxPooling2D(pool_size=(2, 2))(conv2)
conv3 = Conv2D(int(math.ceil(256/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(pool2)
conv3 = Conv2D(int(math.ceil(256/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(conv3)
pool3 = MaxPooling2D(pool_size=(2, 2))(conv3)
conv4 = Conv2D(int(math.ceil(512/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(pool3)
conv4 = Conv2D(int(math.ceil(512/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(conv4)
drop4 = Dropout(0.5)(conv4)
pool4 = MaxPooling2D(pool_size=(2, 2))(drop4)
conv5 = Conv2D(int(math.ceil(1024/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(pool4)
conv5 = Conv2D(int(math.ceil(1024/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(conv5)
drop5 = Dropout(0.5)(conv5)
up6 = Conv2D(int(math.ceil(512/reduction_ratio)), 2, activation='relu', padding='same', kernel_initializer='he_normal')(UpSampling2D(size=(2, 2))(drop5))
merge6 = concatenate([drop4, up6], axis=3)
conv6 = Conv2D(int(math.ceil(512/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(merge6)
conv6 = Conv2D(int(math.ceil(512/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(conv6)
up7 = Conv2D(int(math.ceil(256/reduction_ratio)), 2, activation='relu', padding='same', kernel_initializer='he_normal')(
UpSampling2D(size=(2, 2))(conv6))
merge7 = concatenate([conv3, up7], axis=3)
conv7 = Conv2D(int(math.ceil(256/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(merge7)
conv7 = Conv2D(int(math.ceil(256/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(conv7)
up8 = Conv2D(int(math.ceil(128/reduction_ratio)), 2, activation='relu', padding='same', kernel_initializer='he_normal')(UpSampling2D(size=(2, 2))(conv7))
merge8 = concatenate([conv2, up8], axis=3)
conv8 = Conv2D(int(math.ceil(128/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(merge8)
conv8 = Conv2D(int(math.ceil(128/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(conv8)
up9 = Conv2D(int(math.ceil(64/reduction_ratio)), 2, activation='relu', padding='same', kernel_initializer='he_normal')(
UpSampling2D(size=(2, 2))(conv8))
merge9 = concatenate([conv1, up9], axis=3)
conv9 = Conv2D(int(math.ceil(64/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(merge9)
conv9 = Conv2D(int(math.ceil(64/reduction_ratio)), 3, activation='relu', padding='same', kernel_initializer='he_normal')(conv9)
conv9 = Conv2D(2, 3, activation='relu', padding='same', kernel_initializer='he_normal')(conv9)
conv10 = Conv2D(1, 1, activation='sigmoid')(conv9)
model = Model(inputs=inputs, outputs=conv10)
# model.compile(optimizer=Adam(lr=1e-4), loss='binary_crossentropy', metrics=['accuracy'])
model.compile(optimizer=Adam(lr=learningRate), loss='binary_crossentropy', metrics=['accuracy'])
model.summary()
if (pretrained_weights):
model.load_weights(pretrained_weights)
return model
def unet_sepconv(pretrained_weights=None, input_size=(img_height, img_width, 1)):
reduction_ratio = model_reduction_ratio
inputs = Input(input_size)
conv1 = SeparableConv2D(int(64/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(inputs)
conv1 = SeparableConv2D(int(64 / reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(conv1)
pool1 = MaxPooling2D(pool_size=(2, 2))(conv1)
conv2 = SeparableConv2D(int(128/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(pool1)
conv2 = SeparableConv2D(int(128/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(conv2)
pool2 = MaxPooling2D(pool_size=(2, 2))(conv2)
conv3 = SeparableConv2D(int(256/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(pool2)
conv3 = SeparableConv2D(int(256/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(conv3)
pool3 = MaxPooling2D(pool_size=(2, 2))(conv3)
conv4 = SeparableConv2D(int(512/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(pool3)
conv4 = SeparableConv2D(int(512/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(conv4)
drop4 = Dropout(0.5)(conv4)
pool4 = MaxPooling2D(pool_size=(2, 2))(drop4)
conv5 = SeparableConv2D(int(1024/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(pool4)
conv5 = SeparableConv2D(int(1024/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(conv5)
drop5 = Dropout(0.5)(conv5)
up6 = SeparableConv2D(int(512/reduction_ratio), 2, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(
UpSampling2D(size=(2, 2))(drop5))
merge6 = concatenate([drop4, up6], axis=3)
conv6 = SeparableConv2D(int(512/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(merge6)
conv6 = SeparableConv2D(int(512/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(conv6)
up7 = SeparableConv2D(int(256/reduction_ratio), 2, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(
UpSampling2D(size=(2, 2))(conv6))
merge7 = concatenate([conv3, up7], axis=3)
conv7 = SeparableConv2D(int(256/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(merge7)
conv7 = SeparableConv2D(int(256/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(conv7)
up8 = SeparableConv2D(int(128/reduction_ratio), 2, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(
UpSampling2D(size=(2, 2))(conv7))
merge8 = concatenate([conv2, up8], axis=3)
conv8 = SeparableConv2D(int(128/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(merge8)
conv8 = SeparableConv2D(int(128/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(conv8)
up9 = SeparableConv2D(int(64/reduction_ratio), 2, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(
UpSampling2D(size=(2, 2))(conv8))
merge9 = concatenate([conv1, up9], axis=3)
conv9 = SeparableConv2D(int(64/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(merge9)
conv9 = SeparableConv2D(int(64/reduction_ratio), 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(conv9)
conv9 = SeparableConv2D(2, 3, activation='relu', padding='same', depthwise_initializer='he_normal', pointwise_initializer='he_normal')(conv9)
conv10 = SeparableConv2D(1, 1, activation='sigmoid')(conv9)
model = Model(inputs=inputs, outputs=conv10)
# model.compile(optimizer=Adam(lr=1e-4), loss='binary_crossentropy', metrics=['accuracy'])
model.compile(optimizer=Adam(lr=learningRate), loss='binary_crossentropy', metrics=['accuracy'])
model.summary()
if (pretrained_weights):
model.load_weights(pretrained_weights)
return model
# https://github.com/orobix/retina-unet/blob/master/src/retinaNN_training.py
def unetSmall (n_ch=1,patch_height=img_height,patch_width=img_width):
inputs = Input(shape=(patch_height,patch_width, n_ch))
reduction_ratio = model_reduction_ratio
conv1 = Conv2D(int(math.ceil(32/reduction_ratio)), (3, 3), activation='relu', padding='same', kernel_initializer='he_normal')(inputs)
conv1 = Dropout(0.2)(conv1)
conv1 = Conv2D(int(math.ceil(32/reduction_ratio)), (3, 3), activation='relu', padding='same', kernel_initializer='he_normal')(conv1)
pool1 = MaxPooling2D((2, 2))(conv1)
#
conv2 = Conv2D(int(math.ceil(64/reduction_ratio)), (3, 3), activation='relu', padding='same', kernel_initializer='he_normal')(pool1)
conv2 = Dropout(0.2)(conv2)
conv2 = Conv2D(int(math.ceil(64/reduction_ratio)), (3, 3), activation='relu', padding='same', kernel_initializer='he_normal')(conv2)
pool2 = MaxPooling2D((2, 2))(conv2)
#
conv3 = Conv2D(int(math.ceil(128/reduction_ratio)), (3, 3), activation='relu', padding='same', kernel_initializer='he_normal')(pool2)
conv3 = Dropout(0.2)(conv3)
conv3 = Conv2D(int(math.ceil(128/reduction_ratio)), (3, 3), activation='relu', padding='same', kernel_initializer='he_normal')(conv3)
up1 = UpSampling2D(size=(2, 2))(conv3)
up1 = concatenate([conv2,up1],axis=3)
conv4 = Conv2D(int(math.ceil(64/reduction_ratio)), (3, 3), activation='relu', padding='same', kernel_initializer='he_normal')(up1)
conv4 = Dropout(0.2)(conv4)
conv4 = Conv2D(int(math.ceil(64/reduction_ratio)), (3, 3), activation='relu', padding='same', kernel_initializer='he_normal')(conv4)
#
up2 = UpSampling2D(size=(2, 2))(conv4)
up2 = concatenate([conv1,up2], axis=3)
conv5 = Conv2D(int(math.ceil(32/reduction_ratio)), (3, 3), activation='relu', padding='same', kernel_initializer='he_normal')(up2)
conv5 = Dropout(0.2)(conv5)
conv5 = Conv2D(int(math.ceil(32/reduction_ratio)), (3, 3), activation='relu', padding='same', kernel_initializer='he_normal')(conv5)
#
conv6 = Conv2D(2, (1, 1), activation='relu',padding='same', kernel_initializer='he_normal')(conv5)
conv7 = Conv2D(1, 1, activation='sigmoid', kernel_initializer='he_normal')(conv6)
model = Model(inputs=inputs, outputs=conv7)
model.compile(optimizer=Adam(lr=learningRate), loss='binary_crossentropy', metrics=['accuracy'])
model.summary()
return model
| 68.541126
| 169
| 0.718373
| 2,014
| 15,833
| 5.483615
| 0.069017
| 0.122419
| 0.178921
| 0.181094
| 0.914343
| 0.884462
| 0.882561
| 0.878577
| 0.875317
| 0.870337
| 0
| 0.05702
| 0.118297
| 15,833
| 230
| 170
| 68.83913
| 0.734097
| 0.015916
| 0
| 0.368132
| 0
| 0
| 0.118161
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.021978
| false
| 0
| 0.065934
| 0
| 0.10989
| 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
|
098ecd46fb3c22e9788a5fea3f7f90c4783dd2f7
| 59,170
|
py
|
Python
|
tests/test_certdb.py
|
crocs-muni/cert-validataion-stats
|
bd61968c0487e634c160f6e25b7bb0eb1bab64fc
|
[
"MIT"
] | 3
|
2020-06-26T09:31:35.000Z
|
2020-06-26T09:32:17.000Z
|
tests/test_certdb.py
|
crocs-muni/cert-validataion-stats
|
bd61968c0487e634c160f6e25b7bb0eb1bab64fc
|
[
"MIT"
] | null | null | null |
tests/test_certdb.py
|
crocs-muni/cert-validataion-stats
|
bd61968c0487e634c160f6e25b7bb0eb1bab64fc
|
[
"MIT"
] | null | null | null |
"""
This module contains white-box unit tests of CertDB package
"""
# pylint: disable=W0212, C0103, C0302
import sys
import os
import subprocess
import time
import shutil
import string
import random
import unittest
import unittest.mock
from collections import OrderedDict
import toml
from cevast.utils import make_PEM_filename
from cevast.certdb import (
CertDB,
CertFileDB,
CertFileDBReadOnly,
CertNotAvailableError,
CertInvalidError,
CompositeCertDB,
CompositeCertDBReadOnly,
)
# Helper functions
TEST_DATA_PATH = 'tests/data/'
TEST_CERTS_1 = TEST_DATA_PATH + 'test_certs_1.csv'
TEST_CERTS_2 = TEST_DATA_PATH + 'test_certs_2.csv'
def insert_test_certs(database: CertDB, certs_file: str) -> list:
"""
Insert certificates from certs_file to database
Return list of inserted certificates.
"""
certs = []
with open(certs_file) as r_file:
for line in r_file:
els = [e.strip() for e in line.split(',')]
database.insert(els[0], els[1])
certs.append(els[0])
return certs
def insert_random_certs(database: CertDB, certs_cnt: int) -> list:
"""
Insert number(certs_cnt) randomly generated certificates to database
Return list of inserted certificates.
"""
def random_string(length: int) -> str:
return ''.join(random.choice(string.ascii_letters) for i in range(length))
certs = []
for _ in range(certs_cnt):
cert_id = random_string(16)
database.insert(cert_id, random_string(8))
certs.append(cert_id)
return certs
def delete_test_certs(database: CertDB, certs_file: str) -> list:
"""
Delete certificates from certs_file from database
Return list of deleted certificates.
"""
certs = []
with open(certs_file) as r_file:
for line in r_file:
els = [e.strip() for e in line.split(',')]
database.delete(els[0])
certs.append(els[0])
return certs
def commit_test_certs(database: CertDB, certs_file: str) -> list:
"""
Insert and commit certificates from certs_file to database
Return list of committed certificates.
"""
certs = insert_test_certs(database, certs_file)
database.commit()
return certs
class TestCertFileDBReadOnly(unittest.TestCase):
"""Unit test class of CertFileDBReadOnly class"""
TEST_STORAGE = 'tests/test_storage'
def tearDown(self):
# Clear test storage
shutil.rmtree(self.TEST_STORAGE, ignore_errors=True)
def test_setup(self):
"""
Test implementation of CertFileDBReadOnly setup method
"""
# Check wrong paramaters
self.assertRaises(ValueError, CertFileDBReadOnly.setup, self.TEST_STORAGE, 'ass')
# Setup and check DB
CertFileDBReadOnly.setup(self.TEST_STORAGE, 5, 'DES', 'Testing DB', 'unittest')
assert os.path.exists(self.TEST_STORAGE)
cfg = toml.load(os.path.join(self.TEST_STORAGE, CertFileDBReadOnly.CONF_FILENAME))
meta = toml.load(os.path.join(self.TEST_STORAGE, CertFileDBReadOnly.META_FILENAME))
self.assertEqual(cfg['PARAMETERS']['storage'], os.path.abspath(self.TEST_STORAGE))
self.assertEqual(cfg['PARAMETERS']['structure_level'], 5)
self.assertEqual(cfg['PARAMETERS']['cert_format'], 'DES')
self.assertEqual(cfg['PARAMETERS']['maintain_info'], True)
self.assertEqual(meta['INFO']['description'], 'Testing DB')
self.assertEqual(meta['INFO']['owner'], 'unittest')
assert 'compression_method' in cfg['PARAMETERS']
# Try to setup different DB on the same storage
self.assertRaises(ValueError, CertFileDB.setup, self.TEST_STORAGE, 1, 'PEM', 'Testing DB 2', 'unittest')
# Try to open DB configured manually, and commit something
new_loc = os.path.join(self.TEST_STORAGE, 'new')
os.makedirs(new_loc)
shutil.move(
os.path.join(self.TEST_STORAGE, CertFileDBReadOnly.CONF_FILENAME),
os.path.join(new_loc, CertFileDBReadOnly.CONF_FILENAME)
)
assert os.path.exists(os.path.join(new_loc, CertFileDBReadOnly.CONF_FILENAME))
db = CertFileDB(new_loc)
commit_test_certs(db, TEST_CERTS_1)
def test_init(self):
"""
Test of CertFileDBReadOnly initialization
"""
self.assertRaises(ValueError, CertFileDBReadOnly, self.TEST_STORAGE)
CertFileDBReadOnly.setup(self.TEST_STORAGE, structure_level=5)
# Storage should be now properly initialized
db = CertFileDBReadOnly(self.TEST_STORAGE)
self.assertEqual(db._params['structure_level'], 5)
self.assertEqual(db._params['storage'], os.path.abspath(self.TEST_STORAGE))
def test_get(self):
"""
Test implementation of CertDB method GET
"""
CertFileDBReadOnly.setup(self.TEST_STORAGE, maintain_info=False)
db = CertFileDB(self.TEST_STORAGE)
db_ronly = CertFileDBReadOnly(self.TEST_STORAGE)
fake_cert_id = 'fakecertid'
# Insert and commit some certificates and try to retrieve them back
commit_test_certs(db, TEST_CERTS_1)
with open(TEST_CERTS_1) as r_file:
for line in r_file:
cert_id, cert = line.split(',')
# Certificates should exists - transaction was committed
self.assertEqual(db_ronly.get(cert_id), cert.strip())
# Only insert other certificates and try to retrieve them back
inserted = insert_test_certs(db, TEST_CERTS_2)
for cert_id in inserted:
# Certificates should NOT exists - transaction was NOT committed
self.assertRaises(CertNotAvailableError, db_ronly.get, cert_id)
# Test fake certificate that doesn't exist
self.assertRaises(CertNotAvailableError, db_ronly.get, fake_cert_id)
def test_export(self):
"""
Test implementation of CertDB method EXPORT
"""
def test_permission(db, valid_cert_id):
if not sys.platform.startswith('linux'):
return # works only on Linux like systems
fake_target_dir = 'tests/fake_export'
os.mkdir(fake_target_dir)
subprocess.call(['chmod', '-w', fake_target_dir])
self.assertRaises(PermissionError, db.export, valid_cert_id, fake_target_dir)
subprocess.call(['chmod', '+w', fake_target_dir])
os.rmdir(fake_target_dir)
CertFileDBReadOnly.setup(self.TEST_STORAGE, maintain_info=False)
db = CertFileDB(self.TEST_STORAGE)
db_ronly = CertFileDBReadOnly(self.TEST_STORAGE)
target_dir = self.TEST_STORAGE + '/export'
os.mkdir(target_dir)
fake_cert_id = 'fakecertid'
# Insert and commit some certificates and export them
commit_test_certs(db, TEST_CERTS_1)
with open(TEST_CERTS_1) as r_file:
for line in r_file:
cert_id, cert = line.split(',')
expected = os.path.join(target_dir, make_PEM_filename(cert_id))
self.assertEqual(db_ronly.export(cert_id, target_dir), expected)
with open(expected) as target:
self.assertEqual(target.read(), cert.strip())
# Check export without unnecessary copying - should copy anyway because persisted
self.assertEqual(db_ronly.export(cert_id, target_dir, copy_if_exists=False), expected)
# Tests writing permissions for exporting from zipfile
test_permission(db_ronly, cert_id)
# Only insert other certificates and try to retrieve them back
inserted = insert_test_certs(db, TEST_CERTS_2)
for cert_id in inserted:
# Certificates should NOT exists - transaction was NOT committed
self.assertRaises(CertNotAvailableError, db_ronly.export, cert_id, target_dir)
self.assertRaises(CertNotAvailableError, db_ronly.export, cert_id, target_dir, False)
# Test fake certificate that doesn't exist
self.assertRaises(CertNotAvailableError, db_ronly.export, fake_cert_id, target_dir)
def test_exists(self):
"""
Test implementation of CertDB method EXISTS
"""
CertFileDBReadOnly.setup(self.TEST_STORAGE, maintain_info=False)
db = CertFileDB(self.TEST_STORAGE)
db_ronly = CertFileDBReadOnly(self.TEST_STORAGE)
fake_cert = 'fakecertid'
# Insert and commit some certificates and check if exists
committed = commit_test_certs(db, TEST_CERTS_1)
for cert in committed:
assert db_ronly.exists(cert)
assert db_ronly.exists_all(committed)
# Only insert other certificates and check if exists
inserted = insert_test_certs(db, TEST_CERTS_2)
for cert in inserted:
assert not db_ronly.exists(cert)
assert not db_ronly.exists_all(inserted)
# Test fake certificate that doesn't exist
committed.append(fake_cert)
assert not db_ronly.exists(fake_cert)
assert not db_ronly.exists_all(committed)
def test_cache(self):
"""
Test implementation of CertFileDB certificate existance cache
"""
CertFileDB.setup(self.TEST_STORAGE, maintain_info=False)
db = CertFileDB(self.TEST_STORAGE)
db_ronly = CertFileDBReadOnly(self.TEST_STORAGE)
# Insert and commit some certificates and check cache
committed = commit_test_certs(db, TEST_CERTS_1)
for cert in committed:
assert cert not in db_ronly._cache
db_ronly.exists(cert)
assert cert in db_ronly._cache
self.assertEqual(db_ronly._cache, set(committed))
# Insert and commit some certificates and check cache after exists_all call
committed = commit_test_certs(db, TEST_CERTS_2)
assert not set(committed).issubset(db_ronly._cache)
db_ronly.exists_all(committed)
assert set(committed).issubset(db_ronly._cache)
# Check DELETE effect on cache
db.exists_all(committed)
self.assertEqual(set(committed), db._cache)
db.delete(committed[0])
assert committed[0] not in db._cache
self.assertNotEqual(set(committed), db._cache)
db.rollback()
# Check speed improvement using cache - on large number of certs
inserted = insert_random_certs(db, 1000)
db.commit()
t0 = time.clock()
for cert in inserted:
db_ronly.exists(cert)
t1 = time.clock()
for cert in inserted:
db_ronly.exists(cert)
t2 = time.clock()
self.assertGreater(t1 - t0, t2 - t1)
class TestCertFileDB(unittest.TestCase):
"""Unit test class of CertFileDB class"""
TEST_STORAGE = 'tests/test_storage'
def tearDown(self):
# Clear test storage
shutil.rmtree(self.TEST_STORAGE, ignore_errors=True)
if os.path.exists(self.TEST_STORAGE + '.zip'):
os.remove(self.TEST_STORAGE + '.zip')
def test_init(self):
"""
Test of CertFileDB initialization
"""
self.assertRaises(ValueError, CertFileDB, self.TEST_STORAGE)
CertFileDB.setup(self.TEST_STORAGE, structure_level=5)
# Storage should be now properly initialized
db = CertFileDB(self.TEST_STORAGE)
self.assertEqual(db._params['structure_level'], 5)
self.assertEqual(db._params['storage'], os.path.abspath(self.TEST_STORAGE))
def test_get(self):
"""
Test implementation of CertDB method GET
"""
CertFileDB.setup(self.TEST_STORAGE, maintain_info=False)
db = CertFileDB(self.TEST_STORAGE)
fake_cert_id = 'fakecertid'
# Insert and commit some certificates and retrieve them back
committed = commit_test_certs(db, TEST_CERTS_1)
with open(TEST_CERTS_1) as r_file:
for line in r_file:
cert_id, cert = line.split(',')
self.assertEqual(db.get(cert_id), cert.strip())
# Only insert other certificates and retrieve them back
inserted = insert_test_certs(db, TEST_CERTS_2)
with open(TEST_CERTS_2) as r_file:
for line in r_file:
cert_id, cert = line.split(',')
self.assertEqual(db.get(cert_id), cert.strip())
# Rollback and try to retrieve them again
db.rollback()
for cert_id in inserted:
self.assertRaises(CertNotAvailableError, db.get, cert_id)
# Test DELETE method effect
db.delete(committed[0])
self.assertRaises(CertNotAvailableError, db.get, committed[0])
# Test fake certificate that doesn't exist
self.assertRaises(CertNotAvailableError, db.get, fake_cert_id)
def test_export(self):
"""
Test implementation of CertDB method EXPORT
"""
def test_permission(db, valid_cert_id):
if not sys.platform.startswith('linux'):
return # works only on Linux like systems
fake_target_dir = 'tests/fake_export'
os.mkdir(fake_target_dir)
subprocess.call(['chmod', '-w', fake_target_dir])
self.assertRaises(PermissionError, db.export, valid_cert_id, fake_target_dir)
subprocess.call(['chmod', '+w', fake_target_dir])
os.rmdir(fake_target_dir)
CertFileDB.setup(self.TEST_STORAGE, maintain_info=False)
db = CertFileDB(self.TEST_STORAGE)
target_dir = self.TEST_STORAGE + '/export'
os.mkdir(target_dir)
fake_cert_id = 'fakecertid'
# Insert and commit some certificates and export them
committed = commit_test_certs(db, TEST_CERTS_1)
with open(TEST_CERTS_1) as r_file:
for line in r_file:
cert_id, cert = line.split(',')
expected = os.path.join(target_dir, make_PEM_filename(cert_id))
self.assertEqual(db.export(cert_id, target_dir), expected)
with open(expected) as target:
self.assertEqual(target.read(), cert.strip())
# Check export without unnecessary copying - should copy anyway because persisted
self.assertEqual(db.export(cert_id, target_dir, copy_if_exists=False), expected)
# Tests writing permissions for exporting from zipfile
test_permission(db, cert_id)
# Only insert other certificates and retrieve them back
insert_test_certs(db, TEST_CERTS_2)
with open(TEST_CERTS_2) as r_file:
for line in r_file:
cert_id, cert = line.split(',')
expected = os.path.join(target_dir, make_PEM_filename(cert_id))
self.assertEqual(db.export(cert_id, target_dir), expected)
with open(expected) as target:
self.assertEqual(target.read(), cert.strip())
# Check export without unnecessary copying
file = db.export(cert_id, target_dir, copy_if_exists=False)
self.assertNotEqual(file, expected)
with open(file) as target:
self.assertEqual(target.read(), cert.strip())
# Tests writing permissions for exporting from transaction
test_permission(db, cert_id)
# Rollback and try to retrieve them again
db.rollback()
r_file.seek(0)
for line in r_file:
cert_id = line.split(',')[0]
self.assertRaises(CertNotAvailableError, db.export, cert_id, target_dir)
# Test DELETE method effect
db.delete(committed[0])
self.assertRaises(CertNotAvailableError, db.get, committed[0])
# Test fake certificate that doesn't exist
self.assertRaises(CertNotAvailableError, db.export, fake_cert_id, target_dir)
def test_exists(self):
"""
Test implementation of CertDB method EXISTS
"""
CertFileDB.setup(self.TEST_STORAGE, maintain_info=False)
db = CertFileDB(self.TEST_STORAGE)
fake_cert = 'fakecertid'
# Insert and commit some certificates and check if exists
committed = commit_test_certs(db, TEST_CERTS_1)
for cert in committed:
assert db.exists(cert)
assert db.exists_all(committed)
# Only insert other certificates and check if exists
inserted = insert_test_certs(db, TEST_CERTS_2)
for cert in inserted:
assert db.exists(cert)
assert db.exists_all(inserted)
# Test DELETE method effect
db.delete(committed[0])
assert not db.exists(committed[0])
# Test fake certificate that doesn't exist
committed.append(fake_cert)
assert not db.exists(fake_cert)
assert not db.exists_all(committed)
def test_insert(self):
"""
Test implementation of CertDB method INSERT
"""
CertFileDB.setup(self.TEST_STORAGE, maintain_info=False)
db = CertFileDB(self.TEST_STORAGE)
# Insert some invalid certificates
self.assertRaises(CertInvalidError, db.insert, None, None)
self.assertRaises(CertInvalidError, db.insert, '', '')
self.assertRaises(CertInvalidError, db.insert, '', 'valid')
self.assertRaises(CertInvalidError, db.insert, 'valid', None)
# Insert some valid certificates
inserted = insert_test_certs(db, TEST_CERTS_1)
blocks = {**db._to_insert}
# transaction should contain certificates from open transcation and certs should exist
self.assertTrue(db._to_insert)
for cert in inserted:
block_path = db._get_block_path(cert)
assert os.path.exists(os.path.join(block_path, cert))
# Insert different certificates under the same IDs
certs = {}
with open(TEST_CERTS_1) as r_file:
for line in r_file:
els = [e.strip() for e in line.split(',')]
db.insert(els[0], els[1] + '_open')
certs[els[0]] = els[1]
# IDs should be same and certificates should not be changed
self.assertTrue(blocks == db._to_insert)
for k, v in certs.items():
self.assertTrue(db.get(k) == v)
# Commit transaction and commit different certificates under the same IDs
db.commit()
self.assertFalse(db._to_insert)
certs = {}
with open(TEST_CERTS_1) as r_file:
for line in r_file:
els = [el.strip() for el in line.split(',')]
db.insert(els[0], els[1] + '_commit')
certs[els[0]] = els[1]
# IDs should be same and persisted certificates should not be changed
self.assertTrue(blocks == db._to_insert)
db.commit()
self.assertFalse(db._to_insert)
for k, v in certs.items():
self.assertTrue(db.get(k) == v)
def test_delete(self):
"""
Test implementation of CertDB method DELETE
"""
CertFileDB.setup(self.TEST_STORAGE, maintain_info=False)
db = CertFileDB(self.TEST_STORAGE)
# Delete some invalid certificates
self.assertRaises(CertInvalidError, db.delete, None)
self.assertRaises(CertInvalidError, db.delete, '')
# Insert and delete the same certs before commit
inserted = insert_test_certs(db, TEST_CERTS_1)
deleted = delete_test_certs(db, TEST_CERTS_1)
# transaction should be clear and files should not exist
self.assertFalse(db._to_delete)
self.assertFalse(db._to_insert)
for cert in inserted:
block_path = db._get_block_path(cert)
assert not os.path.exists(os.path.join(block_path, cert))
# Delete and insert the same certs before commit
deleted = delete_test_certs(db, TEST_CERTS_1)
inserted = insert_test_certs(db, TEST_CERTS_1)
# transaction should contain deleted and inserted certificates
self.assertTrue(db._to_delete)
self.assertTrue(db._to_insert)
for certs in db._to_delete.values():
assert certs.issubset(set(deleted))
for certs in db._to_insert.values():
assert certs.issubset(set(inserted))
# and files should exist
for cert in inserted:
block_path = db._get_block_path(cert)
assert os.path.exists(os.path.join(block_path, cert))
# now commit and check that files were persisted
ins, dlt = db.commit()
# the certs should be only inserted
self.assertEqual(ins, len(inserted))
self.assertEqual(dlt, 0)
self.assertFalse(db._to_delete)
self.assertFalse(db._to_insert)
# Delete inserted certs, commit and check that they were deleted
assert db.exists_all(inserted)
del_cert = inserted.pop()
db.delete(del_cert)
assert not db.exists(del_cert)
db.commit()
assert not db.exists(del_cert)
for cert in inserted:
db.delete(cert)
ins, dlt = db.commit()
self.assertEqual(ins, 0)
self.assertEqual(dlt, len(inserted))
# storage should be empty
self.assertFalse(os.listdir(db.storage).remove(db.CONF_FILENAME))
# Delete the same cert multiple times should not have effect
self.assertFalse(db._to_delete)
db.delete('validcert')
blocks_to_delete = {**db._to_delete}
self.assertTrue(db._to_delete)
db.delete('validcert')
self.assertTrue(db._to_delete)
self.assertEqual(blocks_to_delete, db._to_delete)
def test_rollback(self):
"""
Test implementation of CertDB method ROLLBACK
"""
CertFileDB.setup(self.TEST_STORAGE, maintain_info=False)
db = CertFileDB(self.TEST_STORAGE)
# Test rollback without inserts
db.rollback()
self.assertFalse(db._to_insert)
self.assertFalse(db._to_delete)
# Insert some certificates, rollback and check that blocks are deleted
inserted = insert_test_certs(db, TEST_CERTS_1)
db.rollback()
for cert in inserted:
block_path = db._get_block_path(cert)
assert not os.path.exists(os.path.join(block_path, cert))
# Transaction should be empty
self.assertFalse(db._to_insert)
# Commit some certs, insert other certs and rollback
committed = commit_test_certs(db, TEST_CERTS_1)
inserted = insert_test_certs(db, TEST_CERTS_2)
db.rollback()
# Transaction should be empty
self.assertFalse(db._to_insert)
# Commited certs should be compressed in zip files
for cert in committed:
assert not os.path.exists(db._get_block_path(cert) + cert)
assert os.path.exists(db._get_block_archive(cert))
# Rollbacked certs files should not exists
for cert in inserted:
block_path = db._get_block_path(cert)
assert not os.path.exists(os.path.join(block_path, cert))
# Check rollback of delete method
deleted = delete_test_certs(db, TEST_CERTS_1)
self.assertTrue(db._to_delete)
for cert in deleted:
assert not db.exists(cert)
db.rollback()
self.assertFalse(db._to_delete)
# All deleted certs should still exist
assert db.exists_all(deleted)
def test_commit(self):
"""
Test implementation of CertDB method COMMIT
"""
CertFileDB.setup(self.TEST_STORAGE, maintain_info=False)
db = CertFileDB(self.TEST_STORAGE)
# Test commit without inserts
ins, dlt = db.commit()
self.assertEqual(ins, 0)
self.assertEqual(dlt, 0)
self.assertFalse(db._to_insert)
# Insert some certificates and check commit
inserted = insert_test_certs(db, TEST_CERTS_1)
# Certificates and blocks from open transaction should exist
self.assertTrue(db._to_insert)
for certs in db._to_insert.values():
assert certs.issubset(set(inserted))
for cert in inserted:
block_path = db._get_block_path(cert)
assert os.path.exists(os.path.join(block_path, cert))
# check correct number of committed certs
ins, dlt = db.commit()
self.assertEqual(ins, len(inserted))
self.assertEqual(dlt, 0)
# transaction should be empty and certs should be compressed in zip files
self.assertFalse(db._to_insert)
for cert in inserted:
assert not os.path.exists(db._get_block_path(cert) + cert)
assert os.path.exists(db._get_block_archive(cert))
# Insert already persisted certs and some others and commit
inserted_again = insert_test_certs(db, TEST_CERTS_1)
inserted_new = insert_test_certs(db, TEST_CERTS_2)
ins, dlt = db.commit()
# only the other certs should be committed
self.assertEqual(ins, len(inserted_new))
self.assertEqual(dlt, 0)
# and the same ones should be deleted from transaction
for cert in inserted_again:
block_path = db._get_block_path(cert)
assert not os.path.exists(os.path.join(block_path, cert))
# Delete and insert the same not yet persisted cert and commit
valid_cert = ['valid_cert', 'validvalidvalidvalidvalid']
db.delete(valid_cert[0])
db.insert(*valid_cert)
db.commit()
# check that cert is persisted
assert db.exists(valid_cert[0])
assert os.path.exists(db._get_block_archive(valid_cert[0]))
assert not os.path.exists(db._get_block_path(valid_cert[0]) + valid_cert[0])
# Delete and insert the same already persisted cert and commit
valid_cert = ['valid_cert', 'validvalidvalidvalidvalid_new']
db.delete(valid_cert[0])
db.insert(*valid_cert)
db.commit()
# check that the cert was replaced
assert db.exists(valid_cert[0])
self.assertEqual(db.get(valid_cert[0]), valid_cert[1])
def test_parallel_transactions(self):
"""
Test of using multiple instances of CertDB with the same storage.
"""
def test_config_info_maintain(self):
"""
Test maintaining commit HISTORY and INFO upon commit
"""
CertFileDB.setup(self.TEST_STORAGE, maintain_info=True)
db = CertFileDB(self.TEST_STORAGE)
meta_path = os.path.join(db.storage, db.META_FILENAME)
# Insert some certificates and check INFO after commit
committed = commit_test_certs(db, TEST_CERTS_1)
meta = toml.load(meta_path, OrderedDict)
last_commit_nr = str(len(meta['HISTORY']))
self.assertEqual(last_commit_nr, '1')
self.assertEqual(meta['INFO']['number_of_certificates'], len(committed))
self.assertEqual(meta['INFO']['last_commit'], meta['HISTORY'][last_commit_nr]['date'])
self.assertEqual(meta['HISTORY'][last_commit_nr]['inserted'], len(committed))
self.assertEqual(meta['HISTORY'][last_commit_nr]['deleted'], 0)
# Delete all the inserted certs and check INFO after commit
deleted = delete_test_certs(db, TEST_CERTS_1)
db.commit()
meta = toml.load(meta_path, OrderedDict)
last_commit_nr = str(len(meta['HISTORY']))
self.assertEqual(last_commit_nr, '2')
self.assertEqual(meta['INFO']['number_of_certificates'], 0)
self.assertEqual(meta['INFO']['last_commit'], meta['HISTORY'][last_commit_nr]['date'])
self.assertEqual(meta['HISTORY'][last_commit_nr]['inserted'], 0)
self.assertEqual(meta['HISTORY'][last_commit_nr]['deleted'], len(deleted))
# Insert and delete some certs and check INFO after commit
committed = commit_test_certs(db, TEST_CERTS_1)
inserted = insert_test_certs(db, TEST_CERTS_2)
deleted = delete_test_certs(db, TEST_CERTS_1)
db.commit()
meta = toml.load(meta_path, OrderedDict)
last_commit_nr = str(len(meta['HISTORY']))
self.assertEqual(last_commit_nr, '4')
self.assertEqual(meta['INFO']['number_of_certificates'], len(inserted))
self.assertEqual(meta['INFO']['last_commit'], meta['HISTORY'][last_commit_nr]['date'])
self.assertEqual(meta['HISTORY'][last_commit_nr]['inserted'], len(inserted))
self.assertEqual(meta['HISTORY'][last_commit_nr]['deleted'], len(deleted))
def test_zero_structure_level(self):
"""
Test CertFileDB with 0 structure_level
"""
CertFileDB.setup(self.TEST_STORAGE, structure_level=0)
db = CertFileDB(self.TEST_STORAGE)
storage_dir = os.path.join(self.TEST_STORAGE, os.path.basename(self.TEST_STORAGE))
# Commit some certificates and check zipfile
committed = commit_test_certs(db, TEST_CERTS_1)
assert db.exists_all(committed)
assert os.path.exists(storage_dir + '.zip')
# Insert some certificates and check files existance in root folder
inserted = insert_test_certs(db, TEST_CERTS_2)
for cert in inserted:
assert os.path.exists(os.path.join(self.TEST_STORAGE, cert))
assert db.exists(cert)
assert db.exists_all(inserted)
# Rollback check file cleanup
db.rollback()
for cert in inserted:
assert not os.path.exists(os.path.join(storage_dir, cert))
assert not db.exists(cert)
# Delete inserted certificates and check file cleanup
inserted = insert_test_certs(db, TEST_CERTS_2)
delete_test_certs(db, TEST_CERTS_2)
for cert in inserted:
assert not os.path.exists(os.path.join(storage_dir, cert))
assert not db.exists(cert)
self.assertFalse(db._to_insert)
self.assertFalse(db._to_delete)
# Retrieve and check persisted certs
with open(TEST_CERTS_1) as r_file:
for line in r_file:
cert_id, cert = line.split(',')
self.assertEqual(db.get(cert_id), cert.strip())
# Delete all remaining certificates and check zip cleanup
deleted = delete_test_certs(db, TEST_CERTS_1)
db.commit()
for cert in deleted:
assert not os.path.exists(os.path.join(storage_dir, cert))
assert not db.exists(cert)
assert not os.path.exists(storage_dir + '.zip')
def test_async_commit(self):
"""
Test implementation multiprocessing version of CertDB method COMMIT
"""
CertFileDB.setup(self.TEST_STORAGE, maintain_info=False)
db = CertFileDB(self.TEST_STORAGE, 100)
# Test commit without inserts
ins, dlt = db.commit()
self.assertEqual(ins, 0)
self.assertEqual(dlt, 0)
self.assertFalse(db._to_insert)
# Insert some certificates and check commit
inserted = insert_test_certs(db, TEST_CERTS_1)
# Certificates and blocks from open transaction should exist
for cert in inserted:
block_path = db._get_block_path(cert)
assert os.path.exists(os.path.join(block_path, cert))
# check correct number of committed certs
ins, dlt = db.commit()
self.assertEqual(ins, len(inserted))
self.assertEqual(dlt, 0)
# transaction should be empty and certs should be compressed in zip files
self.assertFalse(db._to_insert)
for cert in inserted:
assert not os.path.exists(db._get_block_path(cert) + cert)
assert os.path.exists(db._get_block_archive(cert))
# Insert already persisted certs and some others and commit
inserted_again = insert_test_certs(db, TEST_CERTS_1)
inserted_new = insert_test_certs(db, TEST_CERTS_2)
ins, dlt = db.commit()
# only the other certs should be committed
self.assertEqual(ins, len(inserted_new))
self.assertEqual(dlt, 0)
# and the same ones should be deleted from transaction
for cert in inserted_again:
block_path = db._get_block_path(cert)
assert not os.path.exists(os.path.join(block_path, cert))
# Delete and insert the same not yet persisted cert and commit
valid_cert = ['valid_cert', 'validvalidvalidvalidvalid']
db.delete(valid_cert[0])
db.insert(*valid_cert)
db.commit()
# check that cert is persisted
assert db.exists(valid_cert[0])
assert os.path.exists(db._get_block_archive(valid_cert[0]))
assert not os.path.exists(db._get_block_path(valid_cert[0]) + valid_cert[0])
# Delete and insert the same already persisted cert and commit
valid_cert = ['valid_cert', 'validvalidvalidvalidvalid_new']
db.delete(valid_cert[0])
db.insert(*valid_cert)
db.commit()
# check that the cert was replaced
assert db.exists(valid_cert[0])
self.assertEqual(db.get(valid_cert[0]), valid_cert[1])
class TestCompositeCertDB(unittest.TestCase):
"""Unit test class of CompositeCertDB class"""
TEST_STORAGE_1 = 'tests/test_storage1'
TEST_STORAGE_2 = 'tests/test_storage2'
TEST_STORAGE_3 = 'tests/test_storage3'
def tearDown(self):
# Clear test storage
shutil.rmtree(self.TEST_STORAGE_1, ignore_errors=True)
shutil.rmtree(self.TEST_STORAGE_2, ignore_errors=True)
shutil.rmtree(self.TEST_STORAGE_3, ignore_errors=True)
def setUp(self):
CertFileDB.setup(self.TEST_STORAGE_1)
CertFileDB.setup(self.TEST_STORAGE_2)
CertFileDB.setup(self.TEST_STORAGE_3)
def test_component_management(self):
"""
Test implementation of CompositeCertDB management methods and design
"""
valid_cert = 'validcertid'
real_db = CertFileDBReadOnly(self.TEST_STORAGE_1)
composite_db_read_only = CompositeCertDBReadOnly()
composite_db = CompositeCertDB()
# Mock method EXISTS
real_db.exists = unittest.mock.MagicMock()
real_db.exists.return_value = False
# Check register/unregister method
composite_db_read_only.register(real_db)
assert not composite_db_read_only.exists(valid_cert)
assert composite_db_read_only.is_registered(real_db)
# component's EXISTS method should be executed
real_db.exists.assert_called_once_with(valid_cert)
composite_db_read_only.unregister(real_db)
# component's EXISTS method should NOT be executed
assert not composite_db_read_only.exists(valid_cert)
self.assertEqual(real_db.exists.call_count, 1)
assert not composite_db_read_only.is_registered(real_db)
# Check registering the same object twice
composite_db_read_only.register(real_db)
composite_db_read_only.register(real_db)
assert not composite_db_read_only.exists(valid_cert)
self.assertEqual(real_db.exists.call_count, 2)
assert composite_db_read_only.is_registered(real_db)
# Check unregistering unknown object
composite_db.unregister(real_db)
assert not composite_db.is_registered(real_db)
assert not composite_db.exists(valid_cert)
# Check registering composite DB into another composite DB
self.assertEqual(real_db.exists.call_count, 2)
composite_db.register(real_db)
composite_db.register(composite_db_read_only)
assert not composite_db.exists(valid_cert)
self.assertEqual(real_db.exists.call_count, 4)
assert composite_db.is_registered(real_db)
assert composite_db.is_registered(composite_db_read_only)
assert composite_db_read_only.is_registered(real_db)
def test_combine_read_only(self):
"""
Test implementation of CompositeCertDB management with mixed component types
"""
valid_cert = ('validcertid', 'adadadadadadadadada')
real_db = CertFileDB(self.TEST_STORAGE_1)
real_db_read_only = CertFileDBReadOnly(self.TEST_STORAGE_2)
composite_db = CompositeCertDB()
# Mock method EXISTS and INSERT
real_db.insert = unittest.mock.MagicMock()
real_db_read_only.insert = unittest.mock.MagicMock()
real_db.exists = unittest.mock.MagicMock()
real_db.exists.return_value = False
real_db_read_only.exists = unittest.mock.MagicMock()
real_db_read_only.exists.return_value = False
# Register both DBs to composite DB and call EXISTS
composite_db.register(real_db)
composite_db.register(real_db_read_only)
assert not composite_db.exists(valid_cert[0])
# both component's EXISTS method should be executed
real_db.exists.assert_called_once_with(valid_cert[0])
real_db_read_only.exists.assert_called_once_with(valid_cert[0])
# Call INSERT and check that only CertFileDB was executed
composite_db.insert(*valid_cert)
real_db.insert.assert_called_once_with(*valid_cert)
assert not real_db_read_only.insert.called
def test_get(self):
"""
Test implementation of CompositeCertDB method GET
"""
real_db = CertFileDB(self.TEST_STORAGE_1)
real_db2 = CertFileDB(self.TEST_STORAGE_2)
real_db_read_only = CertFileDBReadOnly(self.TEST_STORAGE_1)
composite_db = CompositeCertDB()
composite_db.register(real_db)
composite_db.register(real_db2)
composite_db.register(real_db_read_only)
fake_cert_id = 'fakecertid'
# Insert and commit some certificates and retrieve them back
committed = commit_test_certs(composite_db, TEST_CERTS_1)
with open(TEST_CERTS_1) as r_file:
for line in r_file:
cert_id, cert = line.split(',')
self.assertEqual(composite_db.get(cert_id), cert.strip())
# ReadOnly DB should also have it
self.assertEqual(real_db_read_only.get(cert_id), cert.strip())
# Only insert other certificates and retrieve them back
inserted = insert_test_certs(composite_db, TEST_CERTS_2)
with open(TEST_CERTS_2) as r_file:
for line in r_file:
cert_id, cert = line.split(',')
self.assertEqual(composite_db.get(cert_id), cert.strip())
# ReadOnly DB should not have it
self.assertRaises(CertNotAvailableError, real_db_read_only.get, cert_id)
# Rollback and try to retrieve them again
composite_db.rollback()
for cert_id in inserted:
self.assertRaises(CertNotAvailableError, composite_db.get, cert_id)
# Test DELETE method effect
real_db.delete(committed[0])
# compositeDB should still have it in real_db2
assert composite_db.get(committed[0])
composite_db.delete(committed[0])
# compositeDB should still have it in real_db_read_only before commit
assert composite_db.get(committed[0])
composite_db.commit()
# compositeDB should no longer have the cert
self.assertRaises(CertNotAvailableError, composite_db.get, committed[0])
# Test fake certificate that doesn't exist
self.assertRaises(CertNotAvailableError, composite_db.get, fake_cert_id)
def test_export(self):
"""
Test implementation of CompositeCertDB method EXPORT
"""
real_db = CertFileDB(self.TEST_STORAGE_1)
real_db2 = CertFileDB(self.TEST_STORAGE_2)
real_db_read_only = CertFileDBReadOnly(self.TEST_STORAGE_1)
composite_db = CompositeCertDB()
composite_db.register(real_db)
composite_db.register(real_db2)
composite_db.register(real_db_read_only)
fake_cert_id = 'fakecertid'
target_dir = self.TEST_STORAGE_1 + '/export'
os.mkdir(target_dir)
# Insert and commit some certificates and export them
committed = commit_test_certs(composite_db, TEST_CERTS_1)
with open(TEST_CERTS_1) as r_file:
for line in r_file:
cert_id, cert = line.split(',')
expected = os.path.join(target_dir, make_PEM_filename(cert_id))
self.assertEqual(composite_db.export(cert_id, target_dir), expected)
with open(expected) as target:
self.assertEqual(target.read(), cert.strip())
# Check export without unnecessary copying - should copy anyway because persisted
self.assertEqual(composite_db.export(cert_id, target_dir, copy_if_exists=False), expected)
# ReadOnly DB should also have it
self.assertEqual(real_db_read_only.export(cert_id, target_dir), expected)
# Only insert other certificates and retrieve them back
insert_test_certs(composite_db, TEST_CERTS_2)
with open(TEST_CERTS_2) as r_file:
for line in r_file:
cert_id, cert = line.split(',')
expected = os.path.join(target_dir, make_PEM_filename(cert_id))
self.assertEqual(composite_db.export(cert_id, target_dir), expected)
with open(expected) as target:
self.assertEqual(target.read(), cert.strip())
# Check export without unnecessary copying
file = composite_db.export(cert_id, target_dir, copy_if_exists=False)
self.assertNotEqual(file, expected)
with open(file) as target:
self.assertEqual(target.read(), cert.strip())
# ReadOnly DB should not have it
self.assertRaises(CertNotAvailableError, real_db_read_only.export, cert_id, target_dir)
# Rollback and try to retrieve them again
composite_db.rollback()
r_file.seek(0)
for line in r_file:
cert_id = line.split(',')[0]
self.assertRaises(CertNotAvailableError, composite_db.export, cert_id, target_dir)
# Test DELETE method effect
real_db.delete(committed[0])
# compositeDB should still have it in real_db2
assert composite_db.export(committed[0], target_dir)
composite_db.delete(committed[0])
# compositeDB should still have it in real_db_read_only before commit
assert composite_db.export(committed[0], target_dir)
composite_db.commit()
# compositeDB should no longer have the cert
self.assertRaises(CertNotAvailableError, composite_db.export, committed[0], target_dir)
# Test fake certificate that doesn't exist
self.assertRaises(CertNotAvailableError, composite_db.export, fake_cert_id, target_dir)
def test_exists(self):
"""
Test implementation of CompositeCertDB method EXISTS
"""
real_db = CertFileDB(self.TEST_STORAGE_1)
real_db2 = CertFileDB(self.TEST_STORAGE_2)
real_db_read_only = CertFileDBReadOnly(self.TEST_STORAGE_1)
composite_db = CompositeCertDB()
composite_db.register(real_db)
composite_db.register(real_db2)
composite_db.register(real_db_read_only)
fake_cert = 'fakecertid'
# Insert and commit some certificates and check if exists
committed = commit_test_certs(composite_db, TEST_CERTS_1)
for cert in committed:
assert composite_db.exists(cert)
# ReadOnly DB should also have it
assert real_db_read_only.exists(cert)
assert composite_db.exists_all(committed)
# Only insert other certificates and check if exists
inserted = insert_test_certs(composite_db, TEST_CERTS_2)
for cert in inserted:
assert composite_db.exists(cert)
# ReadOnly DB should NOT have it
assert not real_db_read_only.exists(cert)
assert composite_db.exists_all(inserted)
# Test DELETE method effect
real_db.delete(committed[0])
# compositeDB should still have it in real_db2
assert composite_db.exists(committed[0])
composite_db.delete(committed[0])
# compositeDB should still have it in real_db_read_only before commit
assert composite_db.exists(committed[0])
composite_db.commit()
# compositeDB should no longer have the cert but cache in real_db_read_only have
assert not real_db.exists(committed[0])
assert not real_db2.exists(committed[0])
# get method upon failure should clear the cache if seems invalidated
self.assertRaises(CertNotAvailableError, real_db_read_only.get, committed[0])
assert not real_db_read_only.exists(committed[0])
# Have 1 cert in one DB and other cert in other DB and check EXISTS method
real_db.delete(committed[2])
assert not real_db.exists(committed[2])
real_db2.delete(committed[3])
assert not real_db2.exists(committed[3])
# composite_db should return True
assert composite_db.exists(committed[2])
assert composite_db.exists(committed[3])
assert composite_db.exists_all([committed[2], committed[3]])
# Test fake certificate that doesn't exist
committed.append(fake_cert)
assert not composite_db.exists(fake_cert)
assert not composite_db.exists_all(committed)
def test_insert(self):
"""
Test implementation of CompositeCertDB method INSERT
"""
real_db = CertFileDB(self.TEST_STORAGE_1)
real_db2 = CertFileDB(self.TEST_STORAGE_2)
composite_db = CompositeCertDB()
composite_db.register(real_db)
composite_db.register(real_db2)
# Insert some invalid certificates
self.assertRaises(CertInvalidError, composite_db.insert, None, None)
self.assertRaises(CertInvalidError, composite_db.insert, '', '')
self.assertRaises(CertInvalidError, composite_db.insert, '', 'valid')
self.assertRaises(CertInvalidError, composite_db.insert, 'valid', None)
# Insert some valid certificates
inserted = insert_test_certs(composite_db, TEST_CERTS_1)
blocks = {**real_db._to_insert}
blocks2 = {**real_db2._to_insert}
# transaction should contain certificates from open transcation and certs should exist
self.assertTrue(real_db._to_insert)
self.assertTrue(real_db2._to_insert)
for cert in inserted:
block_path = real_db._get_block_path(cert)
block_path2 = real_db2._get_block_path(cert)
assert os.path.exists(os.path.join(block_path, cert))
assert os.path.exists(os.path.join(block_path2, cert))
# Insert different certificates under the same IDs
certs = {}
with open(TEST_CERTS_1) as r_file:
for line in r_file:
els = [e.strip() for e in line.split(',')]
composite_db.insert(els[0], els[1] + '_open')
certs[els[0]] = els[1]
# IDs should be same and certificates should not be changed
self.assertTrue(blocks == real_db._to_insert)
self.assertTrue(blocks2 == real_db2._to_insert)
for k, v in certs.items():
self.assertTrue(real_db.get(k) == v)
self.assertTrue(real_db2.get(k) == v)
# Commit transaction and commit different certificates under the same IDs
composite_db.commit()
self.assertFalse(real_db._to_insert)
self.assertFalse(real_db2._to_insert)
certs = {}
with open(TEST_CERTS_1) as r_file:
for line in r_file:
els = [el.strip() for el in line.split(',')]
composite_db.insert(els[0], els[1] + '_commit')
certs[els[0]] = els[1]
# IDs should be same and persisted certificates should not be changed
self.assertTrue(blocks == real_db._to_insert)
self.assertTrue(blocks2 == real_db2._to_insert)
composite_db.commit()
self.assertFalse(real_db._to_insert)
self.assertFalse(real_db2._to_insert)
for k, v in certs.items():
self.assertTrue(real_db.get(k) == v)
self.assertTrue(real_db2.get(k) == v)
def test_delete(self):
"""
Test implementation of CompositeCertDB method DELETE
"""
real_db = CertFileDB(self.TEST_STORAGE_1)
real_db2 = CertFileDB(self.TEST_STORAGE_2)
composite_db = CompositeCertDB()
composite_db.register(real_db)
composite_db.register(real_db2)
# Delete some invalid certificates
self.assertRaises(CertInvalidError, composite_db.delete, None)
self.assertRaises(CertInvalidError, composite_db.delete, '')
# Insert and delete the same certs before commit
inserted = insert_test_certs(composite_db, TEST_CERTS_1)
deleted = delete_test_certs(composite_db, TEST_CERTS_1)
# transaction should be clear and files should not exist
self.assertFalse(real_db._to_delete)
self.assertFalse(real_db2._to_delete)
self.assertFalse(real_db._to_insert)
self.assertFalse(real_db2._to_insert)
for cert in inserted:
block_path = real_db._get_block_path(cert)
block_path2 = real_db2._get_block_path(cert)
assert not os.path.exists(os.path.join(block_path, cert))
assert not os.path.exists(os.path.join(block_path2, cert))
# Delete and insert the same certs before commit
deleted = delete_test_certs(composite_db, TEST_CERTS_1)
inserted = insert_test_certs(composite_db, TEST_CERTS_1)
# transaction should contain deleted and inserted certificates
self.assertTrue(real_db._to_delete)
self.assertTrue(real_db2._to_delete)
self.assertTrue(real_db._to_insert)
self.assertTrue(real_db2._to_insert)
for certs in real_db._to_delete.values():
assert certs.issubset(set(deleted))
for certs in real_db2._to_delete.values():
assert certs.issubset(set(deleted))
for certs in real_db._to_insert.values():
assert certs.issubset(set(inserted))
for certs in real_db2._to_insert.values():
assert certs.issubset(set(inserted))
# and files should exist
for cert in inserted:
block_path = real_db._get_block_path(cert)
block_path2 = real_db2._get_block_path(cert)
assert os.path.exists(os.path.join(block_path, cert))
assert os.path.exists(os.path.join(block_path2, cert))
# now commit and check that files were persisted
ins, dlt = composite_db.commit()
# the certs should be only inserted
self.assertEqual(ins, len(inserted))
self.assertEqual(dlt, 0)
self.assertFalse(real_db._to_delete)
self.assertFalse(real_db2._to_delete)
self.assertFalse(real_db._to_insert)
self.assertFalse(real_db2._to_insert)
# Delete inserted certs, commit and check that they were deleted
assert composite_db.exists_all(inserted)
del_cert = inserted.pop()
composite_db.delete(del_cert)
assert not real_db.exists(del_cert)
assert not real_db2.exists(del_cert)
composite_db.commit()
assert not real_db.exists(del_cert)
assert not real_db2.exists(del_cert)
for cert in inserted:
composite_db.delete(cert)
ins, dlt = composite_db.commit()
self.assertEqual(ins, 0)
self.assertEqual(dlt, len(inserted))
# storage should be empty
self.assertFalse(os.listdir(real_db.storage).remove(real_db.CONF_FILENAME))
self.assertFalse(os.listdir(real_db2.storage).remove(real_db2.CONF_FILENAME))
# Delete the same cert multiple times should not have effect
self.assertFalse(real_db._to_delete)
self.assertFalse(real_db2._to_delete)
composite_db.delete('validcert')
blocks_to_delete = {**real_db._to_delete}
blocks_to_delete2 = {**real_db2._to_delete}
self.assertTrue(real_db._to_delete)
self.assertTrue(real_db2._to_delete)
composite_db.delete('validcert')
self.assertTrue(real_db._to_delete)
self.assertTrue(real_db2._to_delete)
self.assertEqual(blocks_to_delete, real_db._to_delete)
self.assertEqual(blocks_to_delete2, real_db2._to_delete)
def test_commit(self):
"""
Test implementation of CompositeCertDB method COMMIT
"""
real_db = CertFileDB(self.TEST_STORAGE_1)
real_db2 = CertFileDB(self.TEST_STORAGE_2)
composite_db = CompositeCertDB()
composite_db.register(real_db)
composite_db.register(real_db2)
# Test commit without inserts
ins, dlt = composite_db.commit()
self.assertEqual(ins, 0)
self.assertEqual(dlt, 0)
# Insert some certificates and check correct number of committed certs
inserted = insert_test_certs(composite_db, TEST_CERTS_1)
ins, dlt = composite_db.commit()
self.assertEqual(ins, len(inserted))
self.assertEqual(dlt, 0)
# transaction should be empty and certs should be compressed in zip files
self.assertFalse(real_db._to_insert)
self.assertFalse(real_db2._to_insert)
for cert in inserted:
block_path = real_db._get_block_path(cert)
block_path2 = real_db2._get_block_path(cert)
archive_path = real_db._get_block_archive(cert)
archive_path2 = real_db2._get_block_archive(cert)
assert not os.path.exists(os.path.join(block_path, cert))
assert not os.path.exists(os.path.join(block_path2, cert))
assert os.path.exists(archive_path)
assert os.path.exists(archive_path2)
# Insert already persisted certs and some others and commit
inserted_again = insert_test_certs(composite_db, TEST_CERTS_1)
inserted_new = insert_test_certs(composite_db, TEST_CERTS_2)
ins, dlt = composite_db.commit()
# only the other certs should be committed
self.assertEqual(ins, len(inserted_new))
self.assertEqual(dlt, 0)
# and the same ones should NOT
for cert in inserted_again:
block_path = real_db._get_block_path(cert)
block_path2 = real_db2._get_block_path(cert)
assert not os.path.exists(os.path.join(block_path, cert))
assert not os.path.exists(os.path.join(block_path2, cert))
# Delete and insert the same not yet persisted cert and commit
valid_cert = ['valid_cert', 'validvalidvalidvalidvalid']
composite_db.delete(valid_cert[0])
composite_db.insert(*valid_cert)
composite_db.commit()
# check that cert is persisted
block_path = real_db._get_block_path(valid_cert[0])
block_path2 = real_db2._get_block_path(valid_cert[0])
archive_path = real_db._get_block_archive(valid_cert[0])
archive_path2 = real_db2._get_block_archive(valid_cert[0])
assert composite_db.exists(valid_cert[0])
assert not os.path.exists(os.path.join(block_path, valid_cert[0]))
assert not os.path.exists(os.path.join(block_path2, valid_cert[0]))
assert os.path.exists(archive_path)
assert os.path.exists(archive_path2)
# Delete and insert the same already persisted cert and commit
valid_cert = ['valid_cert', 'validvalidvalidvalidvalid_new']
composite_db.delete(valid_cert[0])
composite_db.insert(*valid_cert)
composite_db.commit()
# check that the cert was replaced
assert composite_db.exists(valid_cert[0])
self.assertEqual(real_db.get(valid_cert[0]), valid_cert[1])
self.assertEqual(real_db2.get(valid_cert[0]), valid_cert[1])
def test_rollback(self):
"""Test implementation of CompositeCertDB method ROLLBACK"""
real_db = CertFileDB(self.TEST_STORAGE_1)
real_db2 = CertFileDB(self.TEST_STORAGE_2)
composite_db = CompositeCertDB()
composite_db.register(real_db)
composite_db.register(real_db2)
# Test rollback without inserts
composite_db.rollback()
# Insert some certificates, rollback and check that blocks are deleted
inserted = insert_test_certs(composite_db, TEST_CERTS_1)
composite_db.rollback()
self.assertFalse(real_db._to_insert)
self.assertFalse(real_db2._to_insert)
for cert in inserted:
block_path = real_db._get_block_path(cert)
block_path2 = real_db2._get_block_path(cert)
assert not os.path.exists(os.path.join(block_path, cert))
assert not os.path.exists(os.path.join(block_path2, cert))
# Commit some certs, insert other certs and rollback
committed = commit_test_certs(composite_db, TEST_CERTS_1)
inserted = insert_test_certs(composite_db, TEST_CERTS_2)
composite_db.rollback()
# Transaction should be empty
self.assertFalse(real_db._to_insert)
self.assertFalse(real_db2._to_insert)
# Commited certs should be compressed in zip files
for cert in committed:
block_path = real_db._get_block_path(cert)
block_path2 = real_db2._get_block_path(cert)
archive_path = real_db._get_block_archive(cert)
archive_path2 = real_db2._get_block_archive(cert)
assert not os.path.exists(os.path.join(block_path, cert))
assert not os.path.exists(os.path.join(block_path2, cert))
assert os.path.exists(archive_path)
assert os.path.exists(archive_path2)
# Rollbacked certs files should not exists
for cert in inserted:
block_path = real_db._get_block_path(cert)
block_path2 = real_db2._get_block_path(cert)
archive_path = real_db._get_block_archive(cert)
archive_path2 = real_db2._get_block_archive(cert)
assert not os.path.exists(os.path.join(block_path, cert))
assert not os.path.exists(os.path.join(block_path2, cert))
assert not os.path.exists(archive_path)
assert not os.path.exists(archive_path2)
# Check rollback of delete method
deleted = delete_test_certs(composite_db, TEST_CERTS_1)
self.assertTrue(real_db._to_delete)
self.assertTrue(real_db2._to_delete)
for cert in deleted:
assert not composite_db.exists(cert)
assert not real_db.exists(cert)
assert not real_db2.exists(cert)
composite_db.rollback()
self.assertFalse(real_db._to_delete)
self.assertFalse(real_db2._to_delete)
# All deleted certs should still exist
assert composite_db.exists_all(deleted)
assert real_db.exists_all(deleted)
assert real_db2.exists_all(deleted)
if __name__ == '__main__':
unittest.main()
| 43.86212
| 112
| 0.65905
| 7,530
| 59,170
| 4.946879
| 0.046082
| 0.042523
| 0.034228
| 0.016107
| 0.888886
| 0.859275
| 0.807597
| 0.75557
| 0.714765
| 0.676027
| 0
| 0.008334
| 0.255805
| 59,170
| 1,348
| 113
| 43.894659
| 0.837603
| 0.182491
| 0
| 0.722995
| 0
| 0
| 0.0258
| 0.004802
| 0
| 0
| 0
| 0
| 0.374332
| 1
| 0.040642
| false
| 0
| 0.013904
| 0.00107
| 0.070588
| 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
|
113f460e7a9bae8c1f88a8e62410ca63e38c1751
| 62,843
|
py
|
Python
|
pyls/extra/mclass.py
|
nemethf/bess-language-server
|
25768bfabd3b2f194c14c383e13c96a2c35ab096
|
[
"MIT"
] | null | null | null |
pyls/extra/mclass.py
|
nemethf/bess-language-server
|
25768bfabd3b2f194c14c383e13c96a2c35ab096
|
[
"MIT"
] | null | null | null |
pyls/extra/mclass.py
|
nemethf/bess-language-server
|
25768bfabd3b2f194c14c383e13c96a2c35ab096
|
[
"MIT"
] | null | null | null |
# This file is auto-genereated by bess-gen-doc.
# See https://github.com/nemethf/bess-gen-doc
#
# It is based on bess/protobuf/module_msg.proto, which has the following copyright.
# Copyright (c) 2016-2017, Nefeli Networks, Inc.
# Copyright (c) 2017, The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted 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 names of the copyright holders nor the names of their
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# 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 HOLDER 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 pybess.module import Module
from pybess.bess import BESS
bess = BESS()
class ACL(Module):
"""
ACL module from NetBricks
The module ACL creates an access control module which by default blocks all traffic, unless it contains a rule which specifies otherwise.
Examples of ACL can be found in [acl.bess](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/acl.bess)
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, rules=None):
"""
The module ACL creates an access control module which by default blocks all traffic, unless it contains a rule which specifies otherwise.
Examples of ACL can be found in [acl.bess](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/acl.bess)
__Input Gates__: 1
__Output Gates__: 1
:param rules: A list of ACL rules.
"""
pass
def add(self, rules=None):
"""
The module ACL creates an access control module which by default blocks all traffic, unless it contains a rule which specifies otherwise.
Examples of ACL can be found in [acl.bess](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/acl.bess)
__Input Gates__: 1
__Output Gates__: 1
:param rules: A list of ACL rules.
"""
pass
def clear(self):
pass
class ArpResponder(Module):
"""
Respond to ARP requests and learns new MAC's
The ARP Responder module is responding to ARP requests
TODO: Dynamic learn new MAC's-IP's mapping
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, ip=None, mac_addr=None):
"""
The ARP Responder module is responding to ARP requests
TODO: Dynamic learn new MAC's-IP's mapping
__Input Gates__: 1
__Output Gates__: 1
:param ip: One ARP IP-MAC mapping
The IP
:param mac_addr: The MAC address
"""
pass
def add(self, ip=None, mac_addr=None):
"""
The ARP Responder module is responding to ARP requests
TODO: Dynamic learn new MAC's-IP's mapping
__Input Gates__: 1
__Output Gates__: 1
:param ip: One ARP IP-MAC mapping
The IP
:param mac_addr: The MAC address
"""
pass
class BPF(Module):
"""
classifies packets with pcap-filter(7) syntax
The BPF module is an access control module that sends packets out on a particular gate based on whether they match a BPF filter.
__Input Gates__: 1
__Output Gates__: many (configurable)
"""
def __init__(self, filters=None):
"""
The BPF module is an access control module that sends packets out on a particular gate based on whether they match a BPF filter.
__Input Gates__: 1
__Output Gates__: many (configurable)
:param filters: The BPF initialized function takes a list of BPF filters.
"""
pass
def add(self, filters=None):
"""
The BPF module is an access control module that sends packets out on a particular gate based on whether they match a BPF filter.
__Input Gates__: 1
__Output Gates__: many (configurable)
:param filters: The BPF initialized function takes a list of BPF filters.
"""
pass
def clear(self):
"""
The BPF module has a command `clear()` that takes no parameters.
This command removes all filters from the module.
"""
pass
class Buffer(Module):
"""
buffers packets into larger batches
The Buffer module takes no parameters to initialize (ie, `Buffer()` is sufficient to create one).
Buffer accepts packets and stores them; it may forward them to the next module only after it has
received enough packets to fill an entire PacketBatch.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self):
"""
The Buffer module takes no parameters to initialize (ie, `Buffer()` is sufficient to create one).
Buffer accepts packets and stores them; it may forward them to the next module only after it has
received enough packets to fill an entire PacketBatch.
__Input Gates__: 1
__Output Gates__: 1
"""
pass
class Bypass(Module):
"""
bypasses packets without any processing
The Bypass module forwards packets by emulating pre-defined packet processing overhead.
It burns cpu cycles per_batch, per_packet, and per-bytes.
Bypass is useful primarily for testing and performance evaluation.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, cycles_per_batch=None, cycles_per_packet=None, cycles_per_byte=None):
"""
The Bypass module forwards packets by emulating pre-defined packet processing overhead.
It burns cpu cycles per_batch, per_packet, and per-bytes.
Bypass is useful primarily for testing and performance evaluation.
__Input Gates__: 1
__Output Gates__: 1
"""
pass
class DRR(Module):
"""
Deficit Round Robin
The Module DRR provides fair scheduling of flows based on a quantum which is
number of bytes allocated to each flow on each round of going through all flows.
Examples can be found [./bessctl/conf/samples/drr.bess]
__Input_Gates__: 1
__Output_Gates__: 1
"""
def __init__(self, num_flows=None, quantum=None, max_flow_queue_size=None):
"""
The Module DRR provides fair scheduling of flows based on a quantum which is
number of bytes allocated to each flow on each round of going through all flows.
Examples can be found [./bessctl/conf/samples/drr.bess]
__Input_Gates__: 1
__Output_Gates__: 1
:param num_flows: Number of flows to handle in module
:param quantum: the number of bytes to allocate to each on every round
:param max_flow_queue_size: the max size that any Flows queue can get
"""
pass
def set_quantum_size(self, quantum=None):
"""
the SetQuantumSize function sets a new quantum for DRR module to operate on.
:param quantum: the number of bytes to allocate to each on every round
"""
pass
def set_max_flow_queue_size(self, max_queue_size=None):
"""
The SetMaxQueueSize function sets a new maximum flow queue size for DRR module.
If the flow's queue gets to this size, the module starts dropping packets to
that flow until the queue is below this size.
:param max_queue_size: the max size that any Flows queue can get
"""
pass
class Dump(Module):
"""
Dump packet data and metadata attributes
The Dump module blindly forwards packets without modifying them. It periodically samples a packet and prints out out to the BESS log (by default stored in `/tmp/bessd.INFO`).
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, interval=None):
"""
The Dump module blindly forwards packets without modifying them. It periodically samples a packet and prints out out to the BESS log (by default stored in `/tmp/bessd.INFO`).
__Input Gates__: 1
__Output Gates__: 1
:param interval: How frequently to sample and print a packet, in seconds.
"""
pass
def set_interval(self, interval=None):
"""
The Dump module blindly forwards packets without modifying them. It periodically samples a packet and prints out out to the BESS log (by default stored in `/tmp/bessd.INFO`).
__Input Gates__: 1
__Output Gates__: 1
:param interval: How frequently to sample and print a packet, in seconds.
"""
pass
class EtherEncap(Module):
"""
encapsulates packets with an Ethernet header
The EtherEncap module wraps packets in an Ethernet header, but it takes no parameters. Instead, Ethernet source, destination, and type are pulled from a packet's metadata attributes.
For example: `SetMetadata('dst_mac', 11:22:33:44:55) -> EtherEncap()`
This is useful when upstream modules wish to assign a MAC address to a packet, e.g., due to an ARP request.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self):
"""
The EtherEncap module wraps packets in an Ethernet header, but it takes no parameters. Instead, Ethernet source, destination, and type are pulled from a packet's metadata attributes.
For example: `SetMetadata('dst_mac', 11:22:33:44:55) -> EtherEncap()`
This is useful when upstream modules wish to assign a MAC address to a packet, e.g., due to an ARP request.
__Input Gates__: 1
__Output Gates__: 1
"""
pass
class ExactMatch(Module):
"""
Multi-field classifier with an exact match table
The ExactMatch module splits packets along output gates according to exact match values in arbitrary packet fields.
To instantiate an ExactMatch module, you must specify which fields in the packet to match over. You can add rules using the function `ExactMatch.add(...)`
Fields may be stored either in the packet data or its metadata attributes.
An example script using the ExactMatch code is found
in [`bess/bessctl/conf/samples/exactmatch.bess`](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/exactmatch.bess).
__Input Gates__: 1
__Output Gates__: many (configurable)
"""
def __init__(self, fields=None, masks=None):
"""
The ExactMatch module splits packets along output gates according to exact match values in arbitrary packet fields.
To instantiate an ExactMatch module, you must specify which fields in the packet to match over. You can add rules using the function `ExactMatch.add(...)`
Fields may be stored either in the packet data or its metadata attributes.
An example script using the ExactMatch code is found
in [`bess/bessctl/conf/samples/exactmatch.bess`](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/exactmatch.bess).
__Input Gates__: 1
__Output Gates__: many (configurable)
:param fields: A list of ExactMatch Fields
:param masks: mask(i) corresponds to the mask for field(i)
"""
pass
def get_initial_arg(self):
pass
def get_runtime_config(self):
pass
def set_runtime_config(self, default_gate=None, rules=None):
"""
ExactMatchConfig represents the current runtime configuration
of an ExactMatch module, as returned by get_runtime_config and
set by set_runtime_config.
:return: ExactMatchConfig represents the current runtime configuration
of an ExactMatch module, as returned by get_runtime_config and
set by set_runtime_config.
"""
pass
def add(self, gate=None, fields=None):
"""
The ExactMatch module has a command `add(...)` that takes two parameters.
The ExactMatch initializer specifies what fields in a packet to inspect; add() specifies
which values to check for over these fields.
add() inserts a new rule into the ExactMatch module such that traffic matching
that bytestring will be forwarded
out a specified gate.
Example use: `add(fields=[aton('12.3.4.5'), aton('5.4.3.2')], gate=2)`
:param gate: The gate to forward out packets that mach this rule.
:param fields: The exact match values to check for
"""
pass
def delete(self, fields=None):
"""
The ExactMatch module has a command `delete(...)` which deletes an existing rule.
Example use: `delete(fields=[aton('12.3.4.5'), aton('5.4.3.2')])`
:param fields: The field values for the rule to be deleted.
"""
pass
def clear(self):
"""
The ExactMatch module has a command `clear()` which takes no parameters.
This command removes all rules from the ExactMatch module.
"""
pass
def set_default_gate(self, gate=None):
"""
The ExactMatch module has a command `set_default_gate(...)` which takes one parameter.
This command routes all traffic which does _not_ match a rule to a specified gate.
Example use in bessctl: `setDefaultGate(gate=2)`
:param gate: The gate number to send the default traffic out.
"""
pass
class FlowGen(Module):
"""
generates packets on a flow basis
The FlowGen module generates simulated TCP flows of packets with correct SYN/FIN flags and sequence numbers.
This module is useful for testing, e.g., a NAT module or other flow-aware code.
Packets are generated off a base, "template" packet by modifying the IP src/dst and TCP src/dst. By default, only the ports are changed and will be modified by incrementing the template ports by up to 20000 more than the template values.
__Input Gates__: 0
__Output Gates__: 1
"""
def __init__(self, template=None, pps=None, flow_rate=None, flow_duration=None, arrival=None, duration=None, quick_rampup=None, ip_src_range=None, ip_dst_range=None, port_src_range=None, port_dst_range=None):
"""
The FlowGen module generates simulated TCP flows of packets with correct SYN/FIN flags and sequence numbers.
This module is useful for testing, e.g., a NAT module or other flow-aware code.
Packets are generated off a base, "template" packet by modifying the IP src/dst and TCP src/dst. By default, only the ports are changed and will be modified by incrementing the template ports by up to 20000 more than the template values.
__Input Gates__: 0
__Output Gates__: 1
:param template: The packet "template". All data packets are derived from this template and contain the same payload.
:param pps: The total number of packets per second to generate.
:param flow_rate: The number of new flows to create every second. flow_rate must be <= pps.
:param flow_duration: The lifetime of a flow in seconds.
:param arrival: The packet arrival distribution -- must be either "uniform" or "exponential"
:param duration: The flow duration distribution -- must be either "uniform" or "pareto"
:param quick_rampup: Whether or not to populate the flowgenerator with initial flows (start generating full pps rate immediately) or to wait for new flows to be generated naturally (all flows have a SYN packet).
:param ip_src_range: When generating new flows, FlowGen modifies the template packet by changing the IP src, incrementing it by at most ip_src_range (e.g., if the base packet is 10.0.0.1 and range is 5, it will generate packets with IPs 10.0.0.1-10.0.0.6).
:param ip_dst_range: When generating new flows, FlowGen modifies the template packet by changing the IP dst, incrementing it by at most ip_dst_range.
:param port_src_range: When generating new flows, FlowGen modifies the template packet by changing the TCP port, incrementing it by at most port_src_range.
:param port_dst_range: When generating new flows, FlowGen modifies the template packet by changing the TCP dst port, incrementing it by at most port_dst_range.
"""
pass
def update(self, template=None, pps=None, flow_rate=None, flow_duration=None, arrival=None, duration=None, quick_rampup=None, ip_src_range=None, ip_dst_range=None, port_src_range=None, port_dst_range=None):
"""
The FlowGen module generates simulated TCP flows of packets with correct SYN/FIN flags and sequence numbers.
This module is useful for testing, e.g., a NAT module or other flow-aware code.
Packets are generated off a base, "template" packet by modifying the IP src/dst and TCP src/dst. By default, only the ports are changed and will be modified by incrementing the template ports by up to 20000 more than the template values.
__Input Gates__: 0
__Output Gates__: 1
:param template: The packet "template". All data packets are derived from this template and contain the same payload.
:param pps: The total number of packets per second to generate.
:param flow_rate: The number of new flows to create every second. flow_rate must be <= pps.
:param flow_duration: The lifetime of a flow in seconds.
:param arrival: The packet arrival distribution -- must be either "uniform" or "exponential"
:param duration: The flow duration distribution -- must be either "uniform" or "pareto"
:param quick_rampup: Whether or not to populate the flowgenerator with initial flows (start generating full pps rate immediately) or to wait for new flows to be generated naturally (all flows have a SYN packet).
:param ip_src_range: When generating new flows, FlowGen modifies the template packet by changing the IP src, incrementing it by at most ip_src_range (e.g., if the base packet is 10.0.0.1 and range is 5, it will generate packets with IPs 10.0.0.1-10.0.0.6).
:param ip_dst_range: When generating new flows, FlowGen modifies the template packet by changing the IP dst, incrementing it by at most ip_dst_range.
:param port_src_range: When generating new flows, FlowGen modifies the template packet by changing the TCP port, incrementing it by at most port_src_range.
:param port_dst_range: When generating new flows, FlowGen modifies the template packet by changing the TCP dst port, incrementing it by at most port_dst_range.
"""
pass
def set_burst(self, burst=None):
"""
The FlowGen module has a command `set_burst(...)` that allows you to specify
the maximum number of packets to be stored in a single PacketBatch released
by the module.
"""
pass
class GenericDecap(Module):
"""
remove specified bytes from the beginning of packets
The GenericDecap module strips off the first few bytes of data from a packet.
__Input Gates__: 1
__Ouptut Gates__: 1
"""
def __init__(self, bytes=None):
"""
The GenericDecap module strips off the first few bytes of data from a packet.
__Input Gates__: 1
__Ouptut Gates__: 1
:param bytes: The number of bytes to strip off.
"""
pass
class GenericEncap(Module):
"""
encapsulates packets with constant values and metadata attributes
The GenericEncap module adds a header to packets passing through it.
Takes a list of fields. Each field is either:
1. {'size': X, 'value': Y} (for constant values)
2. {'size': X, 'attribute': Y} (for metadata attributes)
e.g.: `GenericEncap([{'size': 4, 'value': 0xdeadbeef},
{'size': 2, 'attribute': 'foo'},
{'size': 2, 'value': 0x1234}])`
will prepend a 8-byte header:
`de ad be ef <xx> <xx> 12 34`
where the 2-byte `<xx> <xx>` comes from the value of metadata attribute `'foo'`
for each packet.
An example script using GenericEncap is in [`bess/bessctl/conf/samples/generic_encap.bess`](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/generic_encap.bess).
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, fields=None):
"""
The GenericEncap module adds a header to packets passing through it.
Takes a list of fields. Each field is either:
1. {'size': X, 'value': Y} (for constant values)
2. {'size': X, 'attribute': Y} (for metadata attributes)
e.g.: `GenericEncap([{'size': 4, 'value': 0xdeadbeef},
{'size': 2, 'attribute': 'foo'},
{'size': 2, 'value': 0x1234}])`
will prepend a 8-byte header:
`de ad be ef <xx> <xx> 12 34`
where the 2-byte `<xx> <xx>` comes from the value of metadata attribute `'foo'`
for each packet.
An example script using GenericEncap is in [`bess/bessctl/conf/samples/generic_encap.bess`](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/generic_encap.bess).
__Input Gates__: 1
__Output Gates__: 1
"""
pass
class HashLB(Module):
"""
splits packets on a flow basis with L2/L3/L4 header fields
The HashLB module partitions packets between output gates according to either
a hash over their MAC src/dst (`mode='l2'`), their IP src/dst (`mode='l3'`), the full
IP/TCP 5-tuple (`mode='l4'`), or the N-tuple defined by `fields`.
__Input Gates__: 1
__Output Gates__: many (configurable)
"""
def __init__(self, gates=None, mode=None, fields=None):
"""
The HashLB module partitions packets between output gates according to either
a hash over their MAC src/dst (`mode='l2'`), their IP src/dst (`mode='l3'`), the full
IP/TCP 5-tuple (`mode='l4'`), or the N-tuple defined by `fields`.
__Input Gates__: 1
__Output Gates__: many (configurable)
:param gates: A list of gate numbers over which to partition packets
:param mode: The mode (`'l2'`, `'l3'`, or `'l4'`) for the hash function.
:param fields: A list of fields that define a custom tuple.
"""
pass
def set_mode(self, mode=None, fields=None):
"""
The HashLB module has a command `set_mode(...)` which takes two parameters.
The `mode` parameter specifies whether the load balancer will hash over the
src/dest ethernet header (`'l2'`), over the src/dest IP addresses (`'l3'`), or over
the flow 5-tuple (`'l4'`). Alternatively, if the `fields` parameter is set, the
load balancer will hash over the N-tuple with the specified offsets and
sizes.
Example use in bessctl: `lb.set_mode('l2')`
:param mode: What fields to hash over, `'l2'`, `'l3'`, and `'l4'` are only valid values.
:param fields: A list of fields that define a custom tuple.
"""
pass
def set_gates(self, gates=None):
"""
The HashLB module has a command `set_gates(...)` which takes one parameter.
This function takes in a list of gate numbers to send hashed traffic out over.
Example use in bessctl: `lb.setGates(gates=[0,1,2,3])`
:param gates: A list of gate numbers to load balance traffic over
"""
pass
class IPChecksum(Module):
"""
recomputes the IPv4 checksum
"""
class IPEncap(Module):
"""
encapsulates packets with an IPv4 header
Encapsulates a packet with an IP header, where IP src, dst, and proto are filled in
by metadata values carried with the packet. Metadata attributes must include:
ip_src, ip_dst, ip_proto, ip_nexthop, and ether_type.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self):
"""
Encapsulates a packet with an IP header, where IP src, dst, and proto are filled in
by metadata values carried with the packet. Metadata attributes must include:
ip_src, ip_dst, ip_proto, ip_nexthop, and ether_type.
__Input Gates__: 1
__Output Gates__: 1
"""
pass
class IPLookup(Module):
"""
performs Longest Prefix Match on IPv4 packets
An IPLookup module perfroms LPM lookups over a packet destination.
IPLookup takes no parameters to instantiate.
To add rules to the IPLookup table, use `IPLookup.add()`
__Input Gates__: 1
__Output Gates__: many (configurable, depending on rule values)
"""
def __init__(self, max_rules=None, max_tbl8s=None):
"""
An IPLookup module perfroms LPM lookups over a packet destination.
IPLookup takes no parameters to instantiate.
To add rules to the IPLookup table, use `IPLookup.add()`
__Input Gates__: 1
__Output Gates__: many (configurable, depending on rule values)
:param max_rules: Maximum number of rules (default: 1024)
:param max_tbl8s: Maximum number of IP prefixes with smaller than /24 (default: 128)
"""
pass
def add(self, prefix=None, prefix_len=None, gate=None):
"""
The IPLookup module has a command `add(...)` which takes three paramters.
This function accepts the routing rules -- CIDR prefix, CIDR prefix length,
and what gate to forward matching traffic out on.
Example use in bessctl: `table.add(prefix='10.0.0.0', prefix_len=8, gate=2)`
:param prefix: The CIDR IP part of the prefix to match
:param prefix_len: The prefix length
:param gate: The number of the gate to forward matching traffic on.
"""
pass
def delete(self, prefix=None, prefix_len=None):
"""
The IPLookup module has a command `delete(...)` which takes two paramters.
This function accepts the routing rules -- CIDR prefix, CIDR prefix length,
Example use in bessctl: `table.delete(prefix='10.0.0.0', prefix_len=8)`
:param prefix: The CIDR IP part of the prefix to match
:param prefix_len: The prefix length
"""
pass
def clear(self):
"""
The IPLookup module has a command `clear()` which takes no parameters.
This function removes all rules in the IPLookup table.
Example use in bessctl: `myiplookuptable.clear()`
"""
pass
class IPSwap(Module):
"""
swaps source/destination IP addresses and L4 ports
"""
class L2Forward(Module):
"""
classifies packets with destination MAC address
An L2Forward module forwards packets to an output gate according to exact-match rules over
an Ethernet destination.
Note that this is _not_ a learning switch -- forwards according to fixed
routes specified by `add(..)`.
__Input Gates__: 1
__Ouput Gates__: many (configurable, depending on rules)
"""
def __init__(self, size=None, bucket=None):
"""
An L2Forward module forwards packets to an output gate according to exact-match rules over
an Ethernet destination.
Note that this is _not_ a learning switch -- forwards according to fixed
routes specified by `add(..)`.
__Input Gates__: 1
__Ouput Gates__: many (configurable, depending on rules)
:param size: Configures the forwarding hash table -- total number of hash table entries.
:param bucket: Configures the forwarding hash table -- total number of slots per hash value.
"""
pass
def add(self, entries=None):
"""
The L2Forward module forwards traffic via exact match over the Ethernet
destination address. The command `add(...)` allows you to specifiy a
MAC address and which gate the L2Forward module should direct it out of.
:param entries: A list of L2Forward entries.
"""
pass
def delete(self, addrs=None):
"""
The L2Forward module has a function `delete(...)` to remove a rule
from the MAC forwarding table.
:param addrs: The address to remove from the forwarding table
"""
pass
def set_default_gate(self, gate=None):
"""
For traffic reaching the L2Forward module which does not match a MAC rule,
the function `set_default_gate(...)` allows you to specify a default gate
to direct unmatched traffic to.
:param gate: The default gate to forward traffic which matches no entry to.
"""
pass
def lookup(self, addrs=None):
"""
The L2Forward module has a function `lookup(...)` to query what output gate
a given MAC address will be forwared to; it returns the gate ID number.
:param addrs: The MAC address to query for
:return: This message type provides the reponse to the L2Forward function `lookup(..)`.
It returns the gate that a requested MAC address is currently assigned to.
"""
pass
def populate(self, base=None, count=None, gate_count=None):
"""
The L2Forward module has a command `populate(...)` which allows for fast creation
of the forwarding table given a range of MAC addresses. The function takes in a
'base' MAC address, a count (number of MAC addresses), and a gate_id. The module
will route all MAC addresses starting from the base address, up to base+count address
round-robin over gate_count total gates.
For example, `populate(base='11:22:33:44:00', count = 10, gate_count = 2) would
route addresses 11:22:33:44::(00, 02, 04, 06, 08) out a gate 0 and the odd-suffixed
addresses out gate 1.
:param base: The base MAC address
:param count: How many addresses beyond base to populate into the routing table
:param gate_count: How many gates to create in the L2Forward module.
"""
pass
class L4Checksum(Module):
"""
recomputes the TCP/Ipv4 and UDP/IPv4 checksum
"""
class MACSwap(Module):
"""
swaps source/destination MAC addresses
The MACSwap module takes no arguments. It swaps the src/destination MAC addresses
within a packet.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self):
"""
The MACSwap module takes no arguments. It swaps the src/destination MAC addresses
within a packet.
__Input Gates__: 1
__Output Gates__: 1
"""
pass
class MPLSPop(Module):
"""
Pop MPLS label
The MPLS pop module removes MPLS labels
__Input Gates__: 1
__Output Gates__: 2
"""
def __init__(self, remove_eth_header=None, next_eth_type=None):
"""
The MPLS pop module removes MPLS labels
__Input Gates__: 1
__Output Gates__: 2
:param remove_eth_header: Remove ETH header with the pop
:param next_eth_type: The next ETH type to set
"""
pass
def set(self, remove_eth_header=None, next_eth_type=None):
"""
The MPLS pop module removes MPLS labels
__Input Gates__: 1
__Output Gates__: 2
:param remove_eth_header: Remove ETH header with the pop
:param next_eth_type: The next ETH type to set
"""
pass
class Measure(Module):
"""
measures packet latency (paired with Timestamp module)
The measure module tracks latencies, packets per second, and other statistics.
It should be paired with a Timestamp module, which attaches a timestamp to packets.
The measure module will log how long (in nanoseconds) it has been for each packet it received since it was timestamped.
This module is somewhat experimental and undergoing various changes.
There is a test for the the Measure module in [`bessctl/module_tests/timestamp.py`](https://github.com/NetSys/bess/blob/master/bessctl/module_tests/timestamp.py).
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, offset=None, jitter_sample_prob=None, latency_ns_max=None, latency_ns_resolution=None):
"""
The measure module tracks latencies, packets per second, and other statistics.
It should be paired with a Timestamp module, which attaches a timestamp to packets.
The measure module will log how long (in nanoseconds) it has been for each packet it received since it was timestamped.
This module is somewhat experimental and undergoing various changes.
There is a test for the the Measure module in [`bessctl/module_tests/timestamp.py`](https://github.com/NetSys/bess/blob/master/bessctl/module_tests/timestamp.py).
__Input Gates__: 1
__Output Gates__: 1
:param offset: int64 warmup = 1; /// removed: instead of warmup delay, user should Clear()
/ Where to store the current time within the packet, offset in bytes.
:param jitter_sample_prob: How often the module should sample packets for inter-packet arrival measurements (to measure jitter).
:param latency_ns_max: maximum latency expected, in ns (default 0.1 s)
:param latency_ns_resolution: resolution, in ns (default 100)
"""
pass
def get_summary(self, clear=None, latency_percentiles=None, jitter_percentiles=None):
"""
The Measure module measures and collects latency/jitter data for packets
annotated by a Timestamp module. Note that Timestamp and Measure module must reside
on the server for accurate measurement (as a result, the most typical use case is
measuring roundtrip time).
Optionally, you can also retrieve percentile values by specifying points in
"percentiles". For example, "percentiles" of [50.0, 99.0] will return
[median, 99'th %-ile tail latency] in "percentile_values_ns" in the response.
:param clear: if true, the data will be all cleared after read
:param latency_percentiles: ascending list of real numbers in [0.0, 100.0]
:param jitter_percentiles: ascending list of real numbers in [0.0, 100.0]
:return: The Measure module function `get_summary()` returns the following values.
Note that the resolution value tells you how grainy the samples are,
e.g., 100 means that anything from 0-99 ns counts as "0",
anything from 100-199 counts as "100", and so on. The average
is of samples using this graininess, but (being a result of division)
may not be a multiple of the resolution.
"""
pass
def clear(self):
pass
class Merge(Module):
"""
All input gates go out of a single output gate
The merge module takes no parameters. It has multiple input gates,
and passes out all packets from a single output gate.
__Input Gates__: many (configurable)
__Output Gates__: 1
"""
def __init__(self):
"""
The merge module takes no parameters. It has multiple input gates,
and passes out all packets from a single output gate.
__Input Gates__: many (configurable)
__Output Gates__: 1
"""
pass
class MetadataTest(Module):
"""
Dynamic metadata test module
The MetadataTest module is used for internal testing purposes.
"""
def __init__(self, read=None, write=None, update=None):
"""
The MetadataTest module is used for internal testing purposes.
"""
pass
class NAT(Module):
"""
Dynamic Network address/port translator
The NAT module implements Dynamic IPv4 address/port translation,
rewriting packet source addresses with external addresses as specified,
and destination addresses for packets on the reverse direction.
L3/L4 checksums are updated correspondingly.
To see an example of NAT in use, see:
[`bess/bessctl/conf/samples/nat.bess`](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/nat.bess)
Currently only supports TCP/UDP/ICMP.
Note that address/port in packet payload (e.g., FTP) are NOT translated.
__Input Gates__: 2 (0 for internal->external, and 1 for external->internal direction)
__Output Gates__: 2 (same as the input gate)
"""
def __init__(self, ext_addrs=None):
"""
The NAT module implements Dynamic IPv4 address/port translation,
rewriting packet source addresses with external addresses as specified,
and destination addresses for packets on the reverse direction.
L3/L4 checksums are updated correspondingly.
To see an example of NAT in use, see:
[`bess/bessctl/conf/samples/nat.bess`](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/nat.bess)
Currently only supports TCP/UDP/ICMP.
Note that address/port in packet payload (e.g., FTP) are NOT translated.
__Input Gates__: 2 (0 for internal->external, and 1 for external->internal direction)
__Output Gates__: 2 (same as the input gate)
:param ext_addrs: list of external IP addresses
"""
pass
def get_initial_arg(self):
pass
def get_runtime_config(self):
pass
def set_runtime_config(self):
pass
class NoOP(Module):
"""
creates a task that does nothing
This module is used for testing purposes.
"""
def __init__(self):
"""
This module is used for testing purposes.
"""
pass
class PortInc(Module):
"""
receives packets from a port
The PortInc module connects a physical or virtual port and releases
packets from it. PortInc does not support multiqueueing.
For details on how to configure PortInc using DPDK, virtual ports,
or libpcap, see the sidebar in the wiki.
__Input Gates__: 0
__Output Gates__: 1
"""
def __init__(self, port=None, prefetch=None):
"""
The PortInc module connects a physical or virtual port and releases
packets from it. PortInc does not support multiqueueing.
For details on how to configure PortInc using DPDK, virtual ports,
or libpcap, see the sidebar in the wiki.
__Input Gates__: 0
__Output Gates__: 1
:param port: The portname to connect to.
:param prefetch: Whether or not to prefetch packets from the port.
"""
pass
def set_burst(self, burst=None):
"""
The module PortInc has a function `set_burst(...)` that allows you to specify the
maximum number of packets to be stored in a single PacketBatch released by
the module.
:param burst: The maximum "burst" of packets (ie, the maximum batch size)
"""
pass
class PortOut(Module):
"""
sends pakets to a port
The PortOut module connects to a physical or virtual port and pushes
packets to it. For details on how to configure PortOut with DPDK,
virtual ports, libpcap, etc, see the sidebar in the wiki.
__Input Gates__: 1
__Output Gates__: 0
"""
def __init__(self, port=None):
"""
The PortOut module connects to a physical or virtual port and pushes
packets to it. For details on how to configure PortOut with DPDK,
virtual ports, libpcap, etc, see the sidebar in the wiki.
__Input Gates__: 1
__Output Gates__: 0
:param port: The portname to connect to.
"""
pass
class Queue(Module):
"""
terminates current task and enqueue packets for new task
The Queue module implements a simple packet queue.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, size=None, prefetch=None, backpressure=None):
"""
The Queue module implements a simple packet queue.
__Input Gates__: 1
__Output Gates__: 1
:param size: The maximum number of packets to store in the queue.
:param prefetch: When prefetch is enabled, the module will perform CPU prefetch on the first 64B of each packet onto CPU L1 cache. Default value is false.
:param backpressure: When backpressure is enabled, the module will notify upstream if it is overloaded.
"""
pass
def set_burst(self, burst=None):
"""
The module Queue has a function `set_burst(...)` that allows you to specify
the maximum number of packets to be stored in a single PacketBatch released
by the module.
:param burst: The maximum "burst" of packets (ie, the maximum batch size)
"""
pass
def set_size(self, size=None):
"""
The module Queue has a function `set_size(...)` that allows specifying the
size of the queue in total number of packets.
:param size: The maximum number of packets to store in the queue.
"""
pass
def get_status(self):
"""
Modules that are queues or contain queues may contain functions
`get_status()` that return QueueCommandGetStatusResponse.
:return: Modules that are queues or contain queues may contain functions
`get_status()` that take no parameters and returns the queue occupancy and
size.
"""
pass
class QueueInc(Module):
"""
receives packets from a port via a specific queue
The module QueueInc produces input packets from a physical or virtual port.
Unlike PortInc, it supports multiqueue ports.
For details on how to configure QueueInc with DPDK, virtualports,
libpcap, etc, see the sidebar in the wiki.
__Input Gates__: 0
__Output Gates__: 1
"""
def __init__(self, port=None, qid=None, prefetch=None):
"""
The module QueueInc produces input packets from a physical or virtual port.
Unlike PortInc, it supports multiqueue ports.
For details on how to configure QueueInc with DPDK, virtualports,
libpcap, etc, see the sidebar in the wiki.
__Input Gates__: 0
__Output Gates__: 1
:param port: The portname to connect to (read from).
:param qid: The queue on that port to read from. qid starts from 0.
:param prefetch: When prefetch is enabled, the module will perform CPU prefetch on the first 64B of each packet onto CPU L1 cache. Default value is false.
"""
pass
def set_burst(self, burst=None):
"""
The module QueueInc has a function `set_burst(...)` that allows you to specify
the maximum number of packets to be stored in a single PacketBatch released
by the module.
:param burst: The maximum "burst" of packets (ie, the maximum batch size)
"""
pass
class QueueOut(Module):
"""
sends packets to a port via a specific queue
The QueueOut module releases packets to a physical or virtual port.
Unlike PortOut, it supports multiqueue ports.
For details on how to configure QueueOut with DPDK, virtualports,
libpcap, etc, see the sidebar in the wiki.
__Input Gates__: 1
__Output Gates__: 0
"""
def __init__(self, port=None, qid=None):
"""
The QueueOut module releases packets to a physical or virtual port.
Unlike PortOut, it supports multiqueue ports.
For details on how to configure QueueOut with DPDK, virtualports,
libpcap, etc, see the sidebar in the wiki.
__Input Gates__: 1
__Output Gates__: 0
:param port: The portname to connect to.
:param qid: The queue on that port to write out to.
"""
pass
class RandomSplit(Module):
"""
randomly splits/drops packets
The RandomSplit module randomly split/drop packets
__InputGates__: 1
__Output Gates__: many (configurable)
"""
def __init__(self, drop_rate=None, gates=None):
"""
The RandomSplit module randomly split/drop packets
__InputGates__: 1
__Output Gates__: many (configurable)
:param drop_rate: Probability of dropping packet.
:param gates: A list of gate numbers to split the traffic.
"""
pass
def set_droprate(self, drop_rate=None):
"""
The RandomSplit module has a function `set_droprate(...)` which specifies
the probability of dropping packets
:param drop_rate: Probability of dropping packet.
"""
pass
def set_gates(self, gates=None):
"""
The RandomSplit module has a function `set_gates(...)` which changes
the total number of output gates in the module.
:param gates: A list of gate numbers to split the traffic.
"""
pass
class RandomUpdate(Module):
"""
updates packet data with random values
The RandomUpdate module rewrites a specified field (`offset` and `size`) in a packet
with a random value between a specified min and max values.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, fields=None):
"""
The RandomUpdate module rewrites a specified field (`offset` and `size`) in a packet
with a random value between a specified min and max values.
__Input Gates__: 1
__Output Gates__: 1
:param fields: A list of Random Update Fields.
"""
pass
def add(self, fields=None):
"""
The RandomUpdate module rewrites a specified field (`offset` and `size`) in a packet
with a random value between a specified min and max values.
__Input Gates__: 1
__Output Gates__: 1
:param fields: A list of Random Update Fields.
"""
pass
def clear(self):
"""
The function `clear()` for RandomUpdate takes no parameters and clears all
state in the module.
"""
pass
class Replicate(Module):
"""
makes a copy of a packet and sends it out over n gates
The Replicate module makes copies of a packet sending one copy out over each
of n output gates.
__Input Gates__: 1
__Output Gates__: many (configurable)
"""
def __init__(self, gates=None):
"""
The Replicate module makes copies of a packet sending one copy out over each
of n output gates.
__Input Gates__: 1
__Output Gates__: many (configurable)
:param gates: A list of gate numbers to send packet copies to.
"""
pass
def set_gates(self, gates=None):
"""
The Replicate module has a function `set_gates(...)` which changes
the total number of output gates in the module.
:param gates: A list of gate numbers to replicate the traffic over.
"""
pass
class Rewrite(Module):
"""
replaces entire packet data
The Rewrite module replaces an entire packet body with a packet "template"
converting all packets that pass through to copies of the of one of
the templates.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, templates=None):
"""
The Rewrite module replaces an entire packet body with a packet "template"
converting all packets that pass through to copies of the of one of
the templates.
__Input Gates__: 1
__Output Gates__: 1
:param templates: A list of bytestrings representing packet templates.
"""
pass
def add(self, templates=None):
"""
The Rewrite module replaces an entire packet body with a packet "template"
converting all packets that pass through to copies of the of one of
the templates.
__Input Gates__: 1
__Output Gates__: 1
:param templates: A list of bytestrings representing packet templates.
"""
pass
def clear(self):
"""
The function `clear()` for Rewrite takes no parameters and clears all state
in the module.
"""
pass
class RoundRobin(Module):
"""
splits packets evenly with round robin
The RoundRobin module splits packets from one input gate across multiple output
gates.
__Input Gates__: 1
__Output Gates__: many (configurable)
"""
def __init__(self, gates=None, mode=None):
"""
The RoundRobin module splits packets from one input gate across multiple output
gates.
__Input Gates__: 1
__Output Gates__: many (configurable)
:param gates: A list of gate numbers to split packets across.
:param mode: Whether to split across gate with every `'packet'` or every `'batch'`.
"""
pass
def set_mode(self, mode=None):
"""
The RoundRobin module has a function `set_mode(...)` which specifies whether
to balance traffic across gates per-packet or per-batch.
:param mode: whether to perform `'packet'` or `'batch'` round robin partitioning.
"""
pass
def set_gates(self, gates=None):
"""
The RoundRobin module has a function `set_gates(...)` which changes
the total number of output gates in the module.
:param gates: A list of gate numbers to round-robin the traffic over.
"""
pass
class SetMetadata(Module):
"""
Set metadata attributes to packets
The SetMetadata module adds metadata attributes to packets, which are not stored
or sent out with packet data. For examples of SetMetadata use, see
[`bess/bessctl/conf/attr_match.bess`](https://github.com/NetSys/bess/blob/master/bessctl/conf/metadata/attr_match.bess)
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, attrs=None):
"""
The SetMetadata module adds metadata attributes to packets, which are not stored
or sent out with packet data. For examples of SetMetadata use, see
[`bess/bessctl/conf/attr_match.bess`](https://github.com/NetSys/bess/blob/master/bessctl/conf/metadata/attr_match.bess)
__Input Gates__: 1
__Output Gates__: 1
:param attrs: A list of attributes to attach to the packet.
"""
pass
class Sink(Module):
"""
discards all packets
The sink module drops all packets that are sent to it.
__Input Gates__: 1
__Output Gates__: 0
"""
def __init__(self):
"""
The sink module drops all packets that are sent to it.
__Input Gates__: 1
__Output Gates__: 0
"""
pass
class Source(Module):
"""
infinitely generates packets with uninitialized data
The Source module generates packets with no payload contents.
__Input Gates__: 0
__Output Gates__: 1
"""
def __init__(self, pkt_size=None):
"""
The Source module generates packets with no payload contents.
__Input Gates__: 0
__Output Gates__: 1
:param pkt_size: The size (in bytes) of packet data to produce.
"""
pass
def set_pkt_size(self, pkt_size=None):
"""
The Source module has a function `set_pkt_size(...)` which specifies the size
of packets to be produced by the Source module.
:param pkt_size: The size (in bytes) of the packets for Source to create.
"""
pass
def set_burst(self, burst=None):
"""
The Source module has a function `set_burst(...)` which
specifies the maximum number of packets to release in a single packetbatch
from the module.
:param burst: The maximum number of packets to release in a packetbatch from the module.
"""
pass
class Split(Module):
"""
split packets depending on packet data or metadata attributes
The Split module is a basic classifier which directs packets out a gate
based on data in the packet (e.g., if the read in value is 3, the packet
is directed out output gate 3).
__Input Gates__: 1
__Output Gates__: many (up to 2^(size * 8))
"""
def __init__(self, size=None, attribute=None, offset=None):
"""
The Split module is a basic classifier which directs packets out a gate
based on data in the packet (e.g., if the read in value is 3, the packet
is directed out output gate 3).
__Input Gates__: 1
__Output Gates__: many (up to 2^(size * 8))
:param size: The size of the value to read in bytes
:param attribute: The name of the metadata field to read.
:param offset: The offset (in bytes) of the data field to read.
"""
pass
class StaticNAT(Module):
"""
Static network address translator
Static NAT module implements one-to-one translation of source/destination
IPv4 addresses. No port number is translated.
L3/L4 checksums are updated correspondingly.
To see an example of NAT in use, see:
[`bess/bessctl/conf/samples/nat.bess`](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/nat.bess)
Forward direction (from input gate 0 to output gate 0):
- Source IP address is updated, from internal to external address.
Reverse direction (from input gate 1 to output gate 1):
- Destination IP address is updated, from external to internal address.
If the original address is outside any of the ranges, packets are forwarded
without NAT.
Note that address in packet payload (e.g., FTP) are NOT translated.
__Input Gates__: 2 (0 for internal->external, and 1 for external->internal direction)
__Output Gates__: 2 (same as the input gate)
"""
def __init__(self, pairs=None):
"""
Static NAT module implements one-to-one translation of source/destination
IPv4 addresses. No port number is translated.
L3/L4 checksums are updated correspondingly.
To see an example of NAT in use, see:
[`bess/bessctl/conf/samples/nat.bess`](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/nat.bess)
Forward direction (from input gate 0 to output gate 0):
- Source IP address is updated, from internal to external address.
Reverse direction (from input gate 1 to output gate 1):
- Destination IP address is updated, from external to internal address.
If the original address is outside any of the ranges, packets are forwarded
without NAT.
Note that address in packet payload (e.g., FTP) are NOT translated.
__Input Gates__: 2 (0 for internal->external, and 1 for external->internal direction)
__Output Gates__: 2 (same as the input gate)
"""
pass
def get_initial_arg(self):
pass
def get_runtime_config(self):
pass
def set_runtime_config(self):
pass
class Timestamp(Module):
"""
marks current time to packets (paired with Measure module)
The timestamp module takes an offset parameter. It inserts the current
time in nanoseconds into the packet, to be used for latency measurements
alongside the Measure module. The default offset is after an IPv4 UDP
header.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, offset=None):
"""
The timestamp module takes an offset parameter. It inserts the current
time in nanoseconds into the packet, to be used for latency measurements
alongside the Measure module. The default offset is after an IPv4 UDP
header.
__Input Gates__: 1
__Output Gates__: 1
"""
pass
class Update(Module):
"""
updates packet data with specified values
The Update module rewrites a field in a packet's data with a specific value.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, fields=None):
"""
The Update module rewrites a field in a packet's data with a specific value.
__Input Gates__: 1
__Output Gates__: 1
:param fields: A list of Update Fields.
"""
pass
def add(self, fields=None):
"""
The Update module rewrites a field in a packet's data with a specific value.
__Input Gates__: 1
__Output Gates__: 1
:param fields: A list of Update Fields.
"""
pass
def clear(self):
"""
The function `clear()` for Update takes no parameters and clears all state in
the module.
"""
pass
class UpdateTTL(Module):
"""
decreases the IP TTL field by 1
"""
class UrlFilter(Module):
"""
Filter HTTP connection
The URLFilter performs TCP reconstruction over a flow and blocks
connections which mention a banned URL.
__Input Gates__: 2
__Output Gates__: 2
Note that the add() command takes this same argument, and the
clear() command takes an empty argument.
"""
def __init__(self, blacklist=None):
"""
The URLFilter performs TCP reconstruction over a flow and blocks
connections which mention a banned URL.
__Input Gates__: 2
__Output Gates__: 2
Note that the add() command takes this same argument, and the
clear() command takes an empty argument.
:param blacklist: A list of Urls to block.
"""
pass
def get_initial_arg(self):
pass
def get_runtime_config(self):
pass
def set_runtime_config(self, blacklist=None):
"""
The runtime configuration of a URLFilter is the current
blacklist. This means that getting the Arg gets an *empty*
list: we assume anyone using get_initial_arg is also using
get_runtime_config.
:return: The runtime configuration of a URLFilter is the current
blacklist. This means that getting the Arg gets an *empty*
list: we assume anyone using get_initial_arg is also using
get_runtime_config.
"""
pass
def add(self, blacklist=None):
"""
The URLFilter performs TCP reconstruction over a flow and blocks
connections which mention a banned URL.
__Input Gates__: 2
__Output Gates__: 2
Note that the add() command takes this same argument, and the
clear() command takes an empty argument.
:param blacklist: A list of Urls to block.
"""
pass
def clear(self):
pass
class VLANPop(Module):
"""
removes 802.1Q/802.11ad VLAN tag
VLANPop removes the VLAN tag.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self):
"""
VLANPop removes the VLAN tag.
__Input Gates__: 1
__Output Gates__: 1
"""
pass
class VLANPush(Module):
"""
adds 802.1Q/802.11ad VLAN tag
VLANPush appends a VLAN tag with a specified TCI value.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, tci=None):
"""
VLANPush appends a VLAN tag with a specified TCI value.
__Input Gates__: 1
__Output Gates__: 1
:param tci: The TCI value to insert in the VLAN tag.
"""
pass
def set_tci(self, tci=None):
"""
VLANPush appends a VLAN tag with a specified TCI value.
__Input Gates__: 1
__Output Gates__: 1
:param tci: The TCI value to insert in the VLAN tag.
"""
pass
class VLANSplit(Module):
"""
split packets depending on their VID
Splits packets across output gates according to VLAN id (e.g., id 3 goes out gate 3).
__Input Gates__: 1
__Output Gates__: many
"""
def __init__(self):
"""
Splits packets across output gates according to VLAN id (e.g., id 3 goes out gate 3).
__Input Gates__: 1
__Output Gates__: many
"""
pass
class VXLANDecap(Module):
"""
decapsulates the outer Ethetnet/IP/UDP/VXLAN headers
VXLANDecap module decapsulates a VXLAN header on a packet.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self):
"""
VXLANDecap module decapsulates a VXLAN header on a packet.
__Input Gates__: 1
__Output Gates__: 1
"""
pass
class VXLANEncap(Module):
"""
encapsulates packets with UDP/VXLAN headers
VXLANEncap module wraps a packet in a VXLAN header with a specified destination port.
__Input Gates__: 1
__Output Gates__: 1
"""
def __init__(self, dstport=None):
"""
VXLANEncap module wraps a packet in a VXLAN header with a specified destination port.
__Input Gates__: 1
__Output Gates__: 1
:param dstport: The destination UDP port
"""
pass
class WildcardMatch(Module):
"""
Multi-field classifier with a wildcard match table
The WildcardMatch module matches over multiple fields in a packet and
pushes packets that do match out a specified gate, and those that don't out a default
gate. WildcardMatch is initialized with the fields it should inspect over,
rules are added via the `add(...)` function.
An example of WildcardMatch is in [`bess/bessctl/conf/samples/wildcardmatch.bess`](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/wildcardmatch.bess)
__Input Gates__: 1
__Output Gates__: many (configurable)
"""
def __init__(self, fields=None):
"""
The WildcardMatch module matches over multiple fields in a packet and
pushes packets that do match out a specified gate, and those that don't out a default
gate. WildcardMatch is initialized with the fields it should inspect over,
rules are added via the `add(...)` function.
An example of WildcardMatch is in [`bess/bessctl/conf/samples/wildcardmatch.bess`](https://github.com/NetSys/bess/blob/master/bessctl/conf/samples/wildcardmatch.bess)
__Input Gates__: 1
__Output Gates__: many (configurable)
:param fields: A list of WildcardMatch fields.
"""
pass
def get_initial_arg(self):
pass
def get_runtime_config(self):
pass
def set_runtime_config(self, default_gate=None, rules=None):
"""
WildcardMatchConfig represents the current runtime configuration
of a WildcardMatch module, as returned by get_runtime_config and
set by set_runtime_config.
:return: WildcardMatchConfig represents the current runtime configuration
of a WildcardMatch module, as returned by get_runtime_config and
set by set_runtime_config.
"""
pass
def add(self, gate=None, priority=None, values=None, masks=None):
"""
The module WildcardMatch has a command `add(...)` which inserts a new rule
into the WildcardMatch module. For an example of code using WilcardMatch see
`bess/bessctl/conf/samples/wildcardmatch.bess`.
:param gate: Traffic matching this new rule will be sent to this gate.
:param priority: If a packet matches multiple rules, the rule with higher priority will be applied. If priorities are equal behavior is undefined.
:param values: The values to check for in each field.
:param masks: The bitmask for each field -- set `0x0` to ignore the field altogether.
"""
pass
def delete(self, values=None, masks=None):
"""
The module WildcardMatch has a command `delete(...)` which removes a rule -- simply specify the values and masks from the previously inserted rule to remove them.
:param values: The values being checked for in the rule
:param masks: The bitmask from the rule.
"""
pass
def clear(self):
"""
The function `clear()` for WildcardMatch takes no parameters, it clears
all state in the WildcardMatch module (is equivalent to calling delete for all rules)
"""
pass
def set_default_gate(self, gate=None):
"""
For traffic which does not match any rule in the WildcardMatch module,
the `set_default_gate(...)` function specifies which gate to send this extra traffic to.
"""
pass
class WorkerSplit(Module):
"""
send packets to output gate X, the id of current worker
WorkerSplit splits packets based on the worker calling ProcessBatch(). It has
two modes.
1) Packets from worker `x` are mapped to output gate `x`. This is the default
mode.
2) When the `worker_gates` field is set, packets from a worker `x` are mapped
to `worker_gates[x]`. In this mode, packet batches from workers not
mapped to an output gate will be dropped.
Calling the `reset` command with an empty `worker_gates` field will revert
WorkerSplit to the default mode.
__Input Gates__: 1
__Output Gates__: many
"""
def __init__(self, worker_gates=None):
"""
WorkerSplit splits packets based on the worker calling ProcessBatch(). It has
two modes.
1) Packets from worker `x` are mapped to output gate `x`. This is the default
mode.
2) When the `worker_gates` field is set, packets from a worker `x` are mapped
to `worker_gates[x]`. In this mode, packet batches from workers not
mapped to an output gate will be dropped.
Calling the `reset` command with an empty `worker_gates` field will revert
WorkerSplit to the default mode.
__Input Gates__: 1
__Output Gates__: many
:param worker_gates: ogate -> worker mask
"""
pass
def reset(self, worker_gates=None):
"""
WorkerSplit splits packets based on the worker calling ProcessBatch(). It has
two modes.
1) Packets from worker `x` are mapped to output gate `x`. This is the default
mode.
2) When the `worker_gates` field is set, packets from a worker `x` are mapped
to `worker_gates[x]`. In this mode, packet batches from workers not
mapped to an output gate will be dropped.
Calling the `reset` command with an empty `worker_gates` field will revert
WorkerSplit to the default mode.
__Input Gates__: 1
__Output Gates__: many
:param worker_gates: ogate -> worker mask
"""
pass
| 32.095506
| 260
| 0.70926
| 9,250
| 62,843
| 4.674703
| 0.097838
| 0.020259
| 0.021369
| 0.031452
| 0.766449
| 0.742952
| 0.7328
| 0.720312
| 0.698018
| 0.686201
| 0
| 0.010896
| 0.217192
| 62,843
| 1,957
| 261
| 32.111906
| 0.868094
| 0.800407
| 0
| 0.585366
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.001533
| 0
| 1
| 0.404181
| false
| 0.407666
| 0.006969
| 0
| 0.592334
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 8
|
116356ed291907faf2d830bb75f61d5e69fb9f8d
| 12,534
|
py
|
Python
|
tests/test_OptionList.py
|
CrsiX/dhcppython
|
c442c3f6eca8244667df8a19d370f7569d81f08f
|
[
"Apache-2.0"
] | 2
|
2021-09-13T13:35:46.000Z
|
2021-11-15T15:33:24.000Z
|
tests/test_OptionList.py
|
CrsiX/dhcppython
|
c442c3f6eca8244667df8a19d370f7569d81f08f
|
[
"Apache-2.0"
] | 2
|
2021-11-12T08:25:02.000Z
|
2021-12-04T02:28:38.000Z
|
tests/test_OptionList.py
|
CrsiX/dhcppython
|
c442c3f6eca8244667df8a19d370f7569d81f08f
|
[
"Apache-2.0"
] | 3
|
2021-09-08T08:48:30.000Z
|
2022-01-21T03:14:11.000Z
|
import unittest
from dhcppython import options
class OptionListTestCases(unittest.TestCase):
def gen_optionslist(self):
return options.OptionList(
[
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(57, 1500),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43])
]
)
def test_OptionsList_append1(self):
opt_list = self.gen_optionslist()
opt_list.append(options.options.short_value_to_object(1, "255.255.255.0"))
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(57, 1500),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
options.options.short_value_to_object(1, "255.255.255.0")
]
)
)
def test_OptionsList_append2(self):
opt_list = self.gen_optionslist()
opt_list.append(options.options.short_value_to_object(57, 2000))
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(57, 2000),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
]
)
)
def test_OptionList_update_by_index1(self):
opt_list = self.gen_optionslist()
opt_list[1] = options.options.short_value_to_object(57, 2000)
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(57, 2000),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
]
)
)
def test_OptionList_update_by_index2(self):
opt_list = self.gen_optionslist()
opt_list[0] = options.options.short_value_to_object(57, 2000)
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(57, 2000),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
]
)
)
def test_OptionList_update_by_index3(self):
opt_list = self.gen_optionslist()
opt_list[3] = options.options.short_value_to_object(57, 2000)
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(57, 2000),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
]
)
)
def test_OptionList_insert1(self):
opt_list = self.gen_optionslist()
opt_list.insert(1, options.options.short_value_to_object(57, 2000))
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(57, 2000),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
]
)
)
def test_OptionList_insert2(self):
opt_list = self.gen_optionslist()
opt_list.insert(0, options.options.short_value_to_object(57, 2000))
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(57, 2000),
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
]
)
)
def test_OptionList_insert3(self):
opt_list = self.gen_optionslist()
opt_list.insert(3, options.options.short_value_to_object(57, 2000))
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(57, 2000),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
]
)
)
def test_OptionList_insert4(self):
opt_list = self.gen_optionslist()
opt_list.insert(0, options.options.short_value_to_object(1, "255.255.255.0"))
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(1, "255.255.255.0"),
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(57, 1500),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
]
)
)
def test_OptionList_insert5(self):
opt_list = self.gen_optionslist()
opt_list.insert(-1, options.options.short_value_to_object(1, "255.255.255.0"))
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(57, 1500),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(1, "255.255.255.0"),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
]
)
)
def test_OptionList_insert6(self):
opt_list = self.gen_optionslist()
opt_list.insert(5, options.options.short_value_to_object(1, "255.255.255.0"))
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(57, 1500),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
options.options.short_value_to_object(1, "255.255.255.0"),
]
)
)
def test_OptionList_del1(self):
opt_list = self.gen_optionslist()
del opt_list[0]
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(57, 1500),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
]
)
)
def test_OptionList_del2(self):
opt_list = self.gen_optionslist()
del opt_list[-1]
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(57, 1500),
options.options.short_value_to_object(60, "android-dhcp-9"),
options.options.short_value_to_object(12, "Galaxy-S9"),
]
)
)
def test_OptionList_del3(self):
opt_list = self.gen_optionslist()
del opt_list[2]
self.assertEqual(
opt_list,
options.OptionList(
[
options.options.short_value_to_object(61, {'hwtype': 1, 'hwaddr': "8c:45:00:1d:48:16"}),
options.options.short_value_to_object(57, 1500),
options.options.short_value_to_object(12, "Galaxy-S9"),
options.options.short_value_to_object(55, [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]),
]
)
)
def test_OptionList_len1(self):
self.assertEqual(
len(self.gen_optionslist()),
5
)
def test_OptionList_len2(self):
opt_list = self.gen_optionslist()
opt_list.insert(5, options.options.short_value_to_object(1, "255.255.255.0"))
opt_list.append(options.options.short_value_to_object(2, 3600))
del opt_list[5]
opt_list.append(options.options.short_value_to_object(1, "255.255.255.0"))
del opt_list[5]
self.assertEqual(
len(opt_list),
6
)
def test_OptionList_contains1(self):
self.assertEqual(
57 in self.gen_optionslist(),
True
)
def test_OptionList_contains2(self):
self.assertEqual(
1 in self.gen_optionslist(),
False
)
def test_OptionList_contains3(self):
self.assertEqual(
options.options.short_value_to_object(57, 1500) in self.gen_optionslist(),
True
)
def test_OptionList_contains4(self):
self.assertEqual(
options.options.short_value_to_object(2, 3600) in self.gen_optionslist(),
False
)
def test_OptionList_as_dict(self):
self.assertEqual(
self.gen_optionslist().as_dict(),
{'client_identifier': {'hwtype': 1, 'hwaddr': '8C:45:00:1D:48:16'}, 'max_dhcp_message_size': 1500, 'vendor_class_identifier': 'android-dhcp-9', 'hostname': 'Galaxy-S9', 'parameter_request_list': [1, 3, 6, 15, 26, 28, 51, 58, 59, 43]}
)
def test_OptionList_json(self):
json_expected = (
'{\n "client_identifier": {\n "hwtype": 1,\n '
'"hwaddr": "8C:45:00:1D:48:16"\n },\n "max_dhcp_message_'
'size": 1500,\n "vendor_class_identifier": "android-dhcp-9"'
',\n "hostname": "Galaxy-S9",\n "parameter_request_list"'
': [\n 1,\n 3,\n 6,\n 15,\n '
' 26,\n 28,\n 51,\n 58,\n 59,\n '
' 43\n ]\n}'
)
self.assertEqual(
self.gen_optionslist().json,
json_expected
)
if __name__ == "__main__":
unittest.main()
| 40.827362
| 245
| 0.564704
| 1,545
| 12,534
| 4.309385
| 0.066667
| 0.189246
| 0.256834
| 0.324422
| 0.898618
| 0.882097
| 0.872184
| 0.86948
| 0.825924
| 0.776209
| 0
| 0.1023
| 0.309797
| 12,534
| 306
| 246
| 40.960784
| 0.667322
| 0
| 0
| 0.526882
| 0
| 0.003584
| 0.108744
| 0.01093
| 0
| 0
| 0
| 0
| 0.078853
| 1
| 0.082437
| false
| 0
| 0.007168
| 0.003584
| 0.096774
| 0
| 0
| 0
| 0
| null | 0
| 1
| 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
| 8
|
fecede72453f312f65abb3c7e2bbaa8b798ac96a
| 352
|
py
|
Python
|
telethon/client/telegramclient.py
|
chrizrobert/Telethon
|
99711457213a2bb1a844830a3c57536c5fa9b1c2
|
[
"MIT"
] | 1
|
2018-10-07T08:31:49.000Z
|
2018-10-07T08:31:49.000Z
|
telethon/client/telegramclient.py
|
chrizrobert/Telethon
|
99711457213a2bb1a844830a3c57536c5fa9b1c2
|
[
"MIT"
] | null | null | null |
telethon/client/telegramclient.py
|
chrizrobert/Telethon
|
99711457213a2bb1a844830a3c57536c5fa9b1c2
|
[
"MIT"
] | 1
|
2018-09-05T14:59:27.000Z
|
2018-09-05T14:59:27.000Z
|
from . import (
UpdateMethods, AuthMethods, DownloadMethods, DialogMethods,
ChatMethods, MessageMethods, UploadMethods, MessageParseMethods,
UserMethods
)
class TelegramClient(
UpdateMethods, AuthMethods, DownloadMethods, DialogMethods,
ChatMethods, MessageMethods, UploadMethods, MessageParseMethods,
UserMethods
):
pass
| 25.142857
| 68
| 0.775568
| 23
| 352
| 11.869565
| 0.608696
| 0.175824
| 0.285714
| 0.380952
| 0.879121
| 0.879121
| 0.879121
| 0.879121
| 0.879121
| 0
| 0
| 0
| 0.161932
| 352
| 13
| 69
| 27.076923
| 0.925424
| 0
| 0
| 0.545455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.090909
| 0.090909
| 0
| 0.181818
| 0
| 1
| 0
| 1
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 11
|
3a3672cb76e143ae0a5005d6285eaadd341c12b6
| 34,698
|
py
|
Python
|
SAI/bm/sai_adapter/test/ptf_tests/tests/sail2_new.py
|
bocon13/stratum-sonic
|
9be75505869ee81d30ef9b65276f7d55f495658f
|
[
"Apache-2.0"
] | null | null | null |
SAI/bm/sai_adapter/test/ptf_tests/tests/sail2_new.py
|
bocon13/stratum-sonic
|
9be75505869ee81d30ef9b65276f7d55f495658f
|
[
"Apache-2.0"
] | null | null | null |
SAI/bm/sai_adapter/test/ptf_tests/tests/sail2_new.py
|
bocon13/stratum-sonic
|
9be75505869ee81d30ef9b65276f7d55f495658f
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2013-present Barefoot Networks, Inc.
#
# 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.
"""
Thrift SAI interface L2 tests
"""
import sys
# sys.path.append('../')
# from sai_types import *
import socket
from switch import *
import sai_base_test
import random
@group('l2')
class L2AcceptedFrameType(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
vlan_id = 1
hw_port1 = 0
hw_port2 = 1
switch_init2(self.client)
port1 = port_list[hw_port1]
port2 = port_list[hw_port2]
bridge_port1 = br_port_list[port1]
bridge_port2 = br_port_list[port2]
# port2 drops tagged. port1 drops untagged
attr_value = sai_thrift_attribute_value_t(booldata=True)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_DROP_UNTAGGED, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_DROP_TAGGED, value=attr_value)
self.client.sai_thrift_set_port_attribute(port2, attr)
# Create FDB Entries:
mac_action = SAI_PACKET_ACTION_FORWARD
fdb_entry_type = SAI_FDB_ENTRY_TYPE_STATIC
sai_thrift_create_fdb(self.client, mac1, default_bridge_type, vlan_id, None, bridge_port1, mac_action, fdb_entry_type)
sai_thrift_create_fdb(self.client, mac2, default_bridge_type, vlan_id, None, bridge_port2, mac_action, fdb_entry_type)
untagged_pkt1 = simple_tcp_packet(eth_dst='00:22:22:22:22:22',
eth_src='00:11:11:11:11:11',
ip_dst='10.0.0.1',
ip_id=101,
ip_ttl=64)
tagged_pkt1 = simple_tcp_packet(eth_dst='00:22:22:22:22:22',
eth_src='00:11:11:11:11:11',
ip_dst='10.0.0.1',
ip_id=101,
dl_vlan_enable=True,
vlan_vid=vlan_id,
ip_ttl=64,
pktlen=104)
untagged_pkt2 = simple_tcp_packet(eth_dst='00:11:11:11:11:11',
eth_src='00:22:22:22:22:22',
ip_dst='10.0.0.1',
ip_id=101,
ip_ttl=64)
tagged_pkt2 = simple_tcp_packet(eth_dst='00:11:11:11:11:11',
eth_src='00:22:22:22:22:22',
ip_dst='10.0.0.1',
ip_id=101,
dl_vlan_enable=True,
vlan_vid=vlan_id,
ip_ttl=64,
pktlen=104)
try:
print "Sending tagged packet port 0 -> port 1"
send_packet(self, hw_port1, str(tagged_pkt1))
verify_packets(self, tagged_pkt1, [hw_port2])
print "Sending tagged packet port 1 -> port 0"
send_packet(self, hw_port2, str(tagged_pkt2))
verify_no_packet_any(self, tagged_pkt2, port_list.keys())
print "Sending untagged packet port 0 -> port 1"
send_packet(self, hw_port1, str(untagged_pkt1))
verify_no_packet_any(self, untagged_pkt1, port_list.keys())
print "Sending untagged packet port 1 -> port 0"
send_packet(self, hw_port2, str(untagged_pkt2))
verify_packets(self, untagged_pkt2, [hw_port1])
finally:
sai_thrift_delete_fdb(self.client, mac1, vlan_id, default_bridge_type, None)
sai_thrift_delete_fdb(self.client, mac2, vlan_id, default_bridge_type, None)
attr_value = sai_thrift_attribute_value_t(booldata=False)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_DROP_UNTAGGED, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_DROP_TAGGED, value=attr_value)
self.client.sai_thrift_set_port_attribute(port2, attr)
@group('l2')
class L21DBridgeBasicTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending L2 packet port 0 -> port 1"
vlan_id = 10
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
hw_port1 = 0
hw_port2 = 1
switch_init2(self.client)
port1 = port_list[hw_port1]
port2 = port_list[hw_port2]
bridge_port1 = br_port_list[port1]
bridge_port2 = br_port_list[port2]
bind_mode = SAI_PORT_BIND_MODE_SUB_PORT
attr_value = sai_thrift_attribute_value_t(s32=bind_mode)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_BIND_MODE, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
# Create 1D Bridge
bridge_type = SAI_BRIDGE_TYPE_1D
bridge_attr_value = sai_thrift_attribute_value_t(s32=bridge_type)
bridge_attr = sai_thrift_attribute_t(id=SAI_BRIDGE_ATTR_TYPE, value=bridge_attr_value)
bridge = self.client.sai_thrift_create_bridge([bridge_attr])
# Create Bridge ports
bridge_port_type = SAI_BRIDGE_PORT_TYPE_SUB_PORT
self.client.sai_thrift_remove_bridge_port(bridge_port1)
self.client.sai_thrift_remove_bridge_port(bridge_port2)
bridge_port1 = sai_thrift_create_bridge_port(self.client, bridge_port_type, port1, vlan_id, bridge)
bridge_port2 = sai_thrift_create_bridge_port(self.client, bridge_port_type, port2, vlan_id, bridge)
# Create FDB Entries:
mac_action = SAI_PACKET_ACTION_FORWARD
fdb_entry_type = SAI_FDB_ENTRY_TYPE_STATIC
sai_thrift_create_fdb(self.client, mac1, bridge_type, None, bridge, bridge_port1, mac_action, fdb_entry_type)
sai_thrift_create_fdb(self.client, mac2, bridge_type, None, bridge, bridge_port2, mac_action, fdb_entry_type)
pkt = simple_tcp_packet(eth_dst='00:22:22:22:22:22',
eth_src='00:11:11:11:11:11',
ip_dst='10.0.0.1',
ip_id=101,
ip_ttl=64)
try:
send_packet(self, hw_port1, str(pkt))
verify_packets(self, pkt, [hw_port2])
finally:
sai_thrift_delete_fdb(self.client, mac1, None, bridge_type, bridge)
sai_thrift_delete_fdb(self.client, mac2, None, bridge_type, bridge)
bind_mode = SAI_PORT_BIND_MODE_PORT
vlan_id = 1
attr_value = sai_thrift_attribute_value_t(s32=bind_mode)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_BIND_MODE, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
bridge_port_type = SAI_BRIDGE_PORT_TYPE_PORT
self.client.sai_thrift_remove_bridge_port(bridge_port1)
self.client.sai_thrift_remove_bridge_port(bridge_port2)
bridge_port1 = sai_thrift_create_bridge_port(self.client, bridge_port_type, port1, None, default_bridge)
bridge_port2 = sai_thrift_create_bridge_port(self.client, bridge_port_type, port2, None, default_bridge)
self.client.sai_thrift_remove_bridge(bridge)
br_port_list[port1] = bridge_port1
br_port_list[port2] = bridge_port2
@group('l2')
class L21QBridgeAccess2AccessTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending L2 packet port 0 -> port 1"
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
vlan_id = 10
# Set HW ports
hw_port1 = 0
hw_port2 = 1
switch_init2(self.client)
port1 = port_list[hw_port1]
port2 = port_list[hw_port2]
bridge_port1 = br_port_list[port1]
bridge_port2 = br_port_list[port2]
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
# Create VLAN
vlan_attr_value = sai_thrift_attribute_value_t(u16= vlan_id)
vlan_attr = sai_thrift_attribute_t(id=SAI_VLAN_ATTR_VLAN_ID, value=vlan_attr_value)
vlan_oid = self.client.sai_thrift_create_vlan([vlan_attr])
# tagging_mode = SAI_VLAN_TAGGING_MODE_TAGGED
tagging_mode = SAI_VLAN_TAGGING_MODE_UNTAGGED
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_oid, bridge_port1, tagging_mode)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_oid, bridge_port2, tagging_mode)
# SAI_VLAN_ATTR_MEMBER_LIST
# Create FDB Entries:
mac_action = SAI_PACKET_ACTION_FORWARD
fdb_entry_type = SAI_FDB_ENTRY_TYPE_STATIC
bridge_type = SAI_BRIDGE_TYPE_1Q
sai_thrift_create_fdb(self.client, mac1, bridge_type, vlan_id, None, bridge_port1, mac_action, fdb_entry_type)
sai_thrift_create_fdb(self.client, mac2, bridge_type, vlan_id, None, bridge_port2, mac_action, fdb_entry_type)
pkt = simple_tcp_packet(eth_dst='00:22:22:22:22:22',
eth_src='00:11:11:11:11:11',
ip_dst='10.0.0.1',
ip_id=101,
ip_ttl=64)
try:
send_packet(self, hw_port1, str(pkt))
verify_packets(self, pkt, [hw_port2])
finally:
sai_thrift_delete_fdb(self.client, mac1, vlan_id, bridge_type, None)
sai_thrift_delete_fdb(self.client, mac2, vlan_id, bridge_type, None)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_remove_vlan(vlan_oid)
vlan_id = 1
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
@group('l2')
class L21QBridgeAccess2TrunkTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
# switch_init(self.client)
vlan_id = 11
trunk_pvid = 20
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
# Set HW ports
hw_port1 = 0
hw_port2 = 1
print "Sending L2 packet Access(%d) -> Trunk(%d) (trunk vlan=%d)" % (hw_port1, hw_port2, vlan_id)
switch_init2(self.client)
port1 = port_list[hw_port1]
port2 = port_list[hw_port2]
bridge_port1 = br_port_list[port1]
bridge_port2 = br_port_list[port2]
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
# Create VLAN
vlan_attr_value = sai_thrift_attribute_value_t(u16= vlan_id)
vlan_attr = sai_thrift_attribute_t(id=SAI_VLAN_ATTR_VLAN_ID, value=vlan_attr_value)
vlan_oid = self.client.sai_thrift_create_vlan([vlan_attr])
# tagging_mode = SAI_VLAN_TAGGING_MODE_TAGGED
tagging_mode = SAI_VLAN_TAGGING_MODE_UNTAGGED
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_oid, bridge_port1, tagging_mode)
tagging_mode = SAI_VLAN_TAGGING_MODE_TAGGED
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_oid, bridge_port2, tagging_mode)
# SAI_VLAN_ATTR_MEMBER_LIST
# Create FDB Entries:
mac_action = SAI_PACKET_ACTION_FORWARD
fdb_entry_type = SAI_FDB_ENTRY_TYPE_STATIC
bridge_type = SAI_BRIDGE_TYPE_1Q
sai_thrift_create_fdb(self.client, mac1, bridge_type, vlan_id, None, bridge_port1, mac_action, fdb_entry_type)
sai_thrift_create_fdb(self.client, mac2, bridge_type, vlan_id, None, bridge_port2, mac_action, fdb_entry_type)
pkt = simple_tcp_packet(eth_dst='00:22:22:22:22:22',
eth_src='00:11:11:11:11:11',
ip_dst='10.0.0.1',
ip_id=101,
ip_ttl=64)
exp_pkt = simple_tcp_packet(eth_dst='00:22:22:22:22:22',
eth_src='00:11:11:11:11:11',
ip_dst='10.0.0.1',
ip_id=101,
dl_vlan_enable=True,
vlan_vid=vlan_id,
ip_ttl=64,
pktlen=104)
try:
send_packet(self, hw_port1, str(pkt))
verify_packets(self, exp_pkt, [hw_port2])
finally:
sai_thrift_delete_fdb(self.client, mac1, vlan_id, bridge_type, None)
sai_thrift_delete_fdb(self.client, mac2, vlan_id, bridge_type, None)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_remove_vlan(vlan_oid)
vlan_id = 1
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
@group('l2')
class L21QBridgeTrunk2TrunkTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
# switch_init(self.client)
vlan_id = 12
trunk_pvid = 20
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
# Set HW ports
hw_port1 = 0
hw_port2 = 1
print "Sending L2 packet Trunk(%d) -> Trunk(%d) (trunk vlan=%d)" % (hw_port1, hw_port2, vlan_id)
switch_init2(self.client)
port1 = port_list[hw_port1]
port2 = port_list[hw_port2]
bridge_port1 = br_port_list[port1]
bridge_port2 = br_port_list[port2]
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
# Create VLAN
vlan_attr_value = sai_thrift_attribute_value_t(u16= vlan_id)
vlan_attr = sai_thrift_attribute_t(id=SAI_VLAN_ATTR_VLAN_ID, value=vlan_attr_value)
vlan_oid = self.client.sai_thrift_create_vlan([vlan_attr])
tagging_mode = SAI_VLAN_TAGGING_MODE_TAGGED
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_oid, bridge_port1, tagging_mode)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_oid, bridge_port2, tagging_mode)
# SAI_VLAN_ATTR_MEMBER_LIST
# Create FDB Entries:
mac_action = SAI_PACKET_ACTION_FORWARD
fdb_entry_type = SAI_FDB_ENTRY_TYPE_STATIC
bridge_type = SAI_BRIDGE_TYPE_1Q
sai_thrift_create_fdb(self.client, mac1, bridge_type, vlan_id, None, bridge_port1, mac_action, fdb_entry_type)
sai_thrift_create_fdb(self.client, mac2, bridge_type, vlan_id, None, bridge_port2, mac_action, fdb_entry_type)
pkt = simple_tcp_packet(eth_dst='00:22:22:22:22:22',
eth_src='00:11:11:11:11:11',
ip_dst='10.0.0.1',
ip_id=101,
dl_vlan_enable=True,
vlan_vid=vlan_id,
ip_ttl=64)
exp_pkt = simple_tcp_packet(eth_dst='00:22:22:22:22:22',
eth_src='00:11:11:11:11:11',
ip_dst='10.0.0.1',
ip_id=101,
dl_vlan_enable=True,
vlan_vid=vlan_id,
ip_ttl=64)
try:
send_packet(self, hw_port1, str(pkt))
verify_packets(self, exp_pkt, [hw_port2])
finally:
sai_thrift_delete_fdb(self.client, mac1, vlan_id, bridge_type, None)
sai_thrift_delete_fdb(self.client, mac2, vlan_id, bridge_type, None)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_remove_vlan(vlan_oid)
vlan_id = 1
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
@group('l2')
class L21QBridgeTrunk2AccessTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
# switch_init(self.client)
vlan_id = 13
trunk_pvid = 20
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
# Set HW ports
hw_port1 = 0
hw_port2 = 1
print "Sending L2 packet Trunk(%d) -> Access(%d) (trunk vlan=%d)" % (hw_port1, hw_port2, vlan_id)
switch_init2(self.client)
port1 = port_list[hw_port1]
port2 = port_list[hw_port2]
bridge_port1 = br_port_list[port1]
bridge_port2 = br_port_list[port2]
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
# Create VLAN
vlan_attr_value = sai_thrift_attribute_value_t(u16= vlan_id)
vlan_attr = sai_thrift_attribute_t(id=SAI_VLAN_ATTR_VLAN_ID, value=vlan_attr_value)
vlan_oid = self.client.sai_thrift_create_vlan([vlan_attr])
tagging_mode = SAI_VLAN_TAGGING_MODE_TAGGED
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_oid, bridge_port1, tagging_mode)
tagging_mode = SAI_VLAN_TAGGING_MODE_UNTAGGED
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_oid, bridge_port2, tagging_mode)
# SAI_VLAN_ATTR_MEMBER_LIST
# Create FDB Entries:
mac_action = SAI_PACKET_ACTION_FORWARD
fdb_entry_type = SAI_FDB_ENTRY_TYPE_STATIC
bridge_type = SAI_BRIDGE_TYPE_1Q
sai_thrift_create_fdb(self.client, mac1, bridge_type, vlan_id, None, bridge_port1, mac_action, fdb_entry_type)
sai_thrift_create_fdb(self.client, mac2, bridge_type, vlan_id, None, bridge_port2, mac_action, fdb_entry_type)
pkt = simple_tcp_packet(eth_dst='00:22:22:22:22:22',
eth_src='00:11:11:11:11:11',
ip_dst='10.0.0.1',
ip_id=101,
dl_vlan_enable=True,
vlan_vid=vlan_id,
ip_ttl=64)
exp_pkt = simple_tcp_packet(eth_dst='00:22:22:22:22:22',
eth_src='00:11:11:11:11:11',
ip_dst='10.0.0.1',
ip_id=101,
ip_ttl=64,
pktlen=96)
try:
send_packet(self, hw_port1, str(pkt))
verify_packets(self, exp_pkt, [hw_port2])
finally:
sai_thrift_delete_fdb(self.client, mac1, vlan_id, bridge_type, None)
sai_thrift_delete_fdb(self.client, mac2, vlan_id, bridge_type, None)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_remove_vlan(vlan_oid)
vlan_id = 1
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
@group('l2')
class L21DLagTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending 3 L2 (1D) Lag packets port 0 -> port 1/2/3"
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
# Set HW ports
hw_port1 = 0
hw_port2 = 1
hw_port3 = 2
hw_port4 = 3
hw_port5 = 4
switch_init2(self.client)
port1 = port_list[hw_port1]
port2 = port_list[hw_port2]
port3 = port_list[hw_port3]
port4 = port_list[hw_port4]
port5 = port_list[hw_port5]
bridge_port1 = br_port_list[port1]
bridge_port2 = br_port_list[port2]
bridge_port3 = br_port_list[port3]
bridge_port4 = br_port_list[port4]
bridge_port5 = br_port_list[port5]
vlan_id = 15
bind_mode = SAI_PORT_BIND_MODE_SUB_PORT
attr_value = sai_thrift_attribute_value_t(s32=bind_mode)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_BIND_MODE, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
self.client.sai_thrift_set_port_attribute(port3, attr)
self.client.sai_thrift_set_port_attribute(port4, attr)
self.client.sai_thrift_set_port_attribute(port5, attr)
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
self.client.sai_thrift_set_port_attribute(port3, attr)
self.client.sai_thrift_set_port_attribute(port4, attr)
self.client.sai_thrift_set_port_attribute(port5, attr)
# Create LAG
lag = self.client.sai_thrift_create_lag([])
lag_member1 = sai_thrift_create_lag_member(self.client, port2, lag)
# lag_member2 = sai_thrift_create_lag_member(self.client, port3, lag)
lag_member3 = sai_thrift_create_lag_member(self.client, port4, lag)
lag_member4 = sai_thrift_create_lag_member(self.client, port5, lag)
# self.client.sai_thrift_remove_lag_member(lag_member2) # Check remove_lag_member from middle of list. shouldn't mess with hash.
# Set LAG Vlan attr
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(lag, attr)
# Create 1D Bridge
bridge_type = SAI_BRIDGE_TYPE_1D
bridge_attr_value = sai_thrift_attribute_value_t(s32= bridge_type)
bridge_attr = sai_thrift_attribute_t(id=SAI_BRIDGE_ATTR_TYPE, value=bridge_attr_value)
bridge = self.client.sai_thrift_create_bridge([bridge_attr])
# Create Bridge ports
bridge_port_type = SAI_BRIDGE_PORT_TYPE_SUB_PORT
self.client.sai_thrift_remove_bridge_port(bridge_port1)
self.client.sai_thrift_remove_bridge_port(bridge_port2)
self.client.sai_thrift_remove_bridge_port(bridge_port4)
self.client.sai_thrift_remove_bridge_port(bridge_port5)
bridge_port1 = sai_thrift_create_bridge_port(self.client, bridge_port_type, port1, vlan_id, bridge)
bridge_port2 = sai_thrift_create_bridge_port(self.client, bridge_port_type, lag, vlan_id, bridge)
# Create FDB Entries:
mac_action = SAI_PACKET_ACTION_FORWARD
fdb_entry_type = SAI_FDB_ENTRY_TYPE_STATIC
fdb_bridge_type = SAI_FDB_ENTRY_BRIDGE_TYPE_1D
sai_thrift_create_fdb(self.client, mac1, fdb_bridge_type, None, bridge, bridge_port1, mac_action, fdb_entry_type)
sai_thrift_create_fdb(self.client, mac2, fdb_bridge_type, None, bridge, bridge_port2, mac_action, fdb_entry_type)
pkt = simple_tcp_packet(eth_dst='00:11:11:11:11:11',
eth_src='00:22:22:22:22:22',
ip_dst='10.0.0.1',
ip_id=101,
ip_ttl=64)
try:
send_packet(self, hw_port2, str(pkt))
verify_packets(self, pkt, [hw_port1])
for ip_id in [101,103,105,107]:
pkt = simple_tcp_packet(eth_dst='00:22:22:22:22:22',
eth_src='00:11:11:11:11:11',
ip_dst='10.0.0.1',
ip_id=ip_id,
ip_ttl=64)
send_packet(self, hw_port1, str(pkt))
verify_packets_any(self, pkt, [hw_port2, hw_port4, hw_port5])
finally:
sai_thrift_delete_fdb(self.client, mac1, None, bridge_type, bridge)
sai_thrift_delete_fdb(self.client, mac2, None, bridge_type, bridge)
vlan_id = 1
bind_mode = SAI_PORT_BIND_MODE_PORT
attr_value = sai_thrift_attribute_value_t(s32=bind_mode)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_BIND_MODE, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
self.client.sai_thrift_set_port_attribute(port3, attr)
self.client.sai_thrift_set_port_attribute(port4, attr)
self.client.sai_thrift_set_port_attribute(port5, attr)
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
self.client.sai_thrift_set_port_attribute(port3, attr)
self.client.sai_thrift_set_port_attribute(port4, attr)
self.client.sai_thrift_set_port_attribute(port5, attr)
self.client.sai_thrift_remove_lag_member(lag_member1)
self.client.sai_thrift_remove_lag_member(lag_member4)
self.client.sai_thrift_remove_lag_member(lag_member3)
self.client.sai_thrift_remove_lag(lag)
bridge_port_type = SAI_BRIDGE_PORT_TYPE_PORT
self.client.sai_thrift_remove_bridge_port(bridge_port1)
self.client.sai_thrift_remove_bridge_port(bridge_port2)
self.client.sai_thrift_remove_bridge(bridge)
bridge_port1 = sai_thrift_create_bridge_port(self.client, bridge_port_type, port1, None, default_bridge)
bridge_port2 = sai_thrift_create_bridge_port(self.client, bridge_port_type, port2, None, default_bridge)
bridge_port4 = sai_thrift_create_bridge_port(self.client, bridge_port_type, port4, None, default_bridge)
bridge_port5 = sai_thrift_create_bridge_port(self.client, bridge_port_type, port5, None, default_bridge)
br_port_list[port1] = bridge_port1
br_port_list[port2] = bridge_port2
br_port_list[port4] = bridge_port4
br_port_list[port5] = bridge_port5
@group('l2')
class L21QLagTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
switch_init2(self.client)
print "Sending 3 L2 (1Q Access2Access) Lag packets port 0 -> port 1/2/3"
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
# Set HW ports
hw_port1 = 0
hw_port2 = 1
hw_port3 = 2
hw_port4 = 3
port1 = port_list[hw_port1]
port2 = port_list[hw_port2]
port3 = port_list[hw_port3]
port4 = port_list[hw_port4]
bridge_port1 = br_port_list[port1]
bridge_port2 = br_port_list[port2]
bridge_port3 = br_port_list[port3]
bridge_port4 = br_port_list[port4]
vlan_id = 15
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
self.client.sai_thrift_set_port_attribute(port3, attr)
self.client.sai_thrift_set_port_attribute(port4, attr)
# Create LAG
lag = self.client.sai_thrift_create_lag([])
lag_member1 = sai_thrift_create_lag_member(self.client, port4, lag)
lag_member2 = sai_thrift_create_lag_member(self.client, port2, lag)
lag_member3 = sai_thrift_create_lag_member(self.client, port3, lag)
# Set LAG Vlan attr
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(lag, attr)
# Create Lag Bridge port
bridge_port_type = SAI_BRIDGE_PORT_TYPE_PORT
self.client.sai_thrift_remove_bridge_port(bridge_port2)
self.client.sai_thrift_remove_bridge_port(bridge_port3)
self.client.sai_thrift_remove_bridge_port(bridge_port4)
bridge_port2 = sai_thrift_create_bridge_port(self.client, bridge_port_type, lag, None, default_bridge)
# Create VLAN
vlan_attr_value = sai_thrift_attribute_value_t(u16= vlan_id)
vlan_attr = sai_thrift_attribute_t(id=SAI_VLAN_ATTR_VLAN_ID, value=vlan_attr_value)
vlan_oid = self.client.sai_thrift_create_vlan([vlan_attr])
# tagging_mode = SAI_VLAN_TAGGING_MODE_TAGGED
tagging_mode = SAI_VLAN_TAGGING_MODE_UNTAGGED
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_oid, bridge_port1, tagging_mode)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_oid, bridge_port2, tagging_mode)
# Create FDB Entries:
mac_action = SAI_PACKET_ACTION_FORWARD
fdb_entry_type = SAI_FDB_ENTRY_TYPE_STATIC
bridge_type = SAI_BRIDGE_TYPE_1Q
sai_thrift_create_fdb(self.client, mac1, bridge_type, vlan_id, None, bridge_port1, mac_action, fdb_entry_type)
sai_thrift_create_fdb(self.client, mac2, bridge_type, vlan_id, None, bridge_port2, mac_action, fdb_entry_type)
pkt = simple_tcp_packet(eth_dst='00:11:11:11:11:11',
eth_src='00:22:22:22:22:22',
ip_dst='10.0.0.1',
ip_id=101,
ip_ttl=64)
try:
send_packet(self, hw_port3, str(pkt))
verify_packets(self, pkt, [hw_port1])
for ip_id in [101,103,105]:
pkt = simple_tcp_packet(eth_dst='00:22:22:22:22:22',
eth_src='00:11:11:11:11:11',
ip_dst='10.0.0.1',
ip_id=ip_id,
ip_ttl=64)
send_packet(self, hw_port1, str(pkt))
verify_packets_any(self, pkt, [hw_port2, hw_port3, hw_port4])
finally:
sai_thrift_delete_fdb(self.client, mac1, vlan_id, bridge_type, None)
sai_thrift_delete_fdb(self.client, mac2, vlan_id, bridge_type, None)
vlan_id = 1
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_remove_vlan(vlan_oid)
self.client.sai_thrift_remove_bridge_port(bridge_port2)
bridge_port2 = sai_thrift_create_bridge_port(self.client, bridge_port_type, port2, None, default_bridge)
bridge_port3 = sai_thrift_create_bridge_port(self.client, bridge_port_type, port3, None, default_bridge)
bridge_port4 = sai_thrift_create_bridge_port(self.client, bridge_port_type, port4, None, default_bridge)
br_port_list[port2] = bridge_port2
br_port_list[port3] = bridge_port3
br_port_list[port4] = bridge_port4
self.client.sai_thrift_remove_lag_member(lag_member1)
self.client.sai_thrift_remove_lag_member(lag_member2)
self.client.sai_thrift_remove_lag_member(lag_member3)
self.client.sai_thrift_remove_lag(lag)
attr_value = sai_thrift_attribute_value_t(u16=vlan_id)
attr = sai_thrift_attribute_t(id=SAI_PORT_ATTR_PORT_VLAN_ID, value=attr_value)
self.client.sai_thrift_set_port_attribute(port1, attr)
self.client.sai_thrift_set_port_attribute(port2, attr)
self.client.sai_thrift_set_port_attribute(port3, attr)
self.client.sai_thrift_set_port_attribute(port4, attr)
| 49.357041
| 136
| 0.645426
| 4,777
| 34,698
| 4.263345
| 0.043333
| 0.10164
| 0.0683
| 0.099823
| 0.932829
| 0.927281
| 0.923304
| 0.912158
| 0.899637
| 0.89124
| 0
| 0.053055
| 0.275895
| 34,698
| 702
| 137
| 49.42735
| 0.757532
| 0.046516
| 0
| 0.86819
| 0
| 0
| 0.044501
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.008787
| null | null | 0.031634
| 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
|
28dbb5cd57af3255c8b54220ea75b7137d701b5b
| 5,338
|
py
|
Python
|
game/game_code/tests/test_level_1.py
|
RDGT/adventure-poc
|
e211491e5958d12a3347b3e279006d915d691d20
|
[
"MIT"
] | 2
|
2018-04-23T15:03:41.000Z
|
2018-07-18T06:36:51.000Z
|
game/game_code/tests/test_level_1.py
|
RDGT/adventure-poc
|
e211491e5958d12a3347b3e279006d915d691d20
|
[
"MIT"
] | 6
|
2018-03-25T12:04:27.000Z
|
2018-09-14T09:08:34.000Z
|
game/game_code/tests/test_level_1.py
|
RDGT/adventure-poc
|
e211491e5958d12a3347b3e279006d915d691d20
|
[
"MIT"
] | 1
|
2018-07-22T09:46:55.000Z
|
2018-07-22T09:46:55.000Z
|
import unittest
import logging
import game_code
log = logging.getLogger('test.level_1')
class TestAdventureLevelOne(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.game = game_code.main.start_game(interface='python')
def test_outside_slowly(self):
outside = self.game.interface.get_next_screen()
self.assertEqual(outside.title, 'Outside')
self.assertEqual(outside.choices[1], 'Open the door slowly')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_outside_kick(self):
outside = self.game.interface.get_next_screen()
self.assertEqual(outside.title, 'Outside')
self.assertEqual(outside.choices[2], 'Kick down the door!')
ok = self.game.interface.put_choice(2)
self.assertTrue(ok)
def test_entrance_hall_left(self):
entrance_hall = self.game.interface.get_next_screen()
self.assertEqual(entrance_hall.title, 'Entrance Hall')
self.assertEqual(entrance_hall.choices[1], 'Left Door')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_entrance_hall_front(self):
entrance_hall = self.game.interface.get_next_screen()
self.assertEqual(entrance_hall.title, 'Entrance Hall')
self.assertEqual(entrance_hall.choices[2], 'Front Door')
ok = self.game.interface.put_choice(2)
self.assertTrue(ok)
def test_entrance_hall_right(self):
entrance_hall = self.game.interface.get_next_screen()
self.assertEqual(entrance_hall.title, 'Entrance Hall')
self.assertEqual(entrance_hall.choices[3], 'Right Door')
ok = self.game.interface.put_choice(3)
self.assertTrue(ok)
def test_closet_room_search(self):
closet_room = self.game.interface.get_next_screen()
self.assertEqual(closet_room.title, 'Closet Room')
self.assertEqual(closet_room.choices[1], 'Search the closet')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_closet_go_back(self):
closet_room = self.game.interface.get_next_screen()
self.assertEqual(closet_room.title, 'Closet')
self.assertEqual(closet_room.choices[1], 'Go back.')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_closet_room_leave(self):
closet_room = self.game.interface.get_next_screen()
self.assertEqual(closet_room.title, 'Closet Room')
self.assertEqual(closet_room.choices[1], 'Leave room')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_kitchen_listen(self):
kitchen = self.game.interface.get_next_screen()
self.assertEqual(kitchen.title, 'Kitchen')
self.assertEqual(kitchen.choices[1], 'Kneel next to the zombie and listen.')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_kitchen_ask(self):
listening = self.game.interface.get_next_screen()
self.assertEqual(listening.title, 'Listen To Zombie')
self.assertEqual(listening.choices[1], 'Ask why he tried to run away')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_kitchen_ask_ring(self):
listening = self.game.interface.get_next_screen()
self.assertEqual(listening.title, 'Listen To Zombie')
self.assertEqual(listening.choices[1], 'Ask for the ring')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_kitchen_leave(self):
listening = self.game.interface.get_next_screen()
self.assertEqual(listening.title, 'Listen To Zombie')
self.assertEqual(listening.choices[1], 'Leave room')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_living_room_hold(self):
living_room = self.game.interface.get_next_screen()
self.assertEqual(living_room.title, 'Living Room')
self.assertEqual(living_room.choices[1],
'Hold your holy cross firmly before the ghost and recite a banishment prayer!')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_living_room_move(self):
living_room = self.game.interface.get_next_screen()
self.assertEqual(living_room.title, 'Ghast Destroyed')
self.assertEqual(living_room.choices[1],
'Move towards the iron gate at the far end of the room')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_living_room_key(self):
living_room = self.game.interface.get_next_screen()
self.assertEqual(living_room.title, 'Iron Gate')
self.assertEqual(living_room.choices[1], 'Try the key')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_living_room_stairs(self):
living_room = self.game.interface.get_next_screen()
self.assertEqual(living_room.title, 'Iron Gate')
self.assertEqual(living_room.choices[1], 'Advance down the stairs')
ok = self.game.interface.put_choice(1)
self.assertTrue(ok)
def test_arrive_at_grande_hall(self):
grande_hall = self.game.interface.get_next_screen()
self.assertEqual(grande_hall.title, 'Grande Hall')
| 40.439394
| 104
| 0.680592
| 693
| 5,338
| 5.050505
| 0.137085
| 0.126286
| 0.160286
| 0.097143
| 0.808571
| 0.808571
| 0.780286
| 0.756
| 0.743143
| 0.729143
| 0
| 0.007818
| 0.209254
| 5,338
| 131
| 105
| 40.748092
| 0.821369
| 0
| 0
| 0.550459
| 0
| 0
| 0.105845
| 0
| 0
| 0
| 0
| 0
| 0.449541
| 1
| 0.165138
| false
| 0
| 0.027523
| 0
| 0.201835
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
28f9b230456479c535d2d51167428a69e99f40fe
| 1,448
|
py
|
Python
|
src/super_gradients/training/models/__init__.py
|
karndeepsingh/super-gradients
|
bfed440ecaf485af183570bf965eb5b74cb9f832
|
[
"Apache-2.0"
] | 1
|
2022-01-15T19:33:06.000Z
|
2022-01-15T19:33:06.000Z
|
src/super_gradients/training/models/__init__.py
|
karndeepsingh/super-gradients
|
bfed440ecaf485af183570bf965eb5b74cb9f832
|
[
"Apache-2.0"
] | null | null | null |
src/super_gradients/training/models/__init__.py
|
karndeepsingh/super-gradients
|
bfed440ecaf485af183570bf965eb5b74cb9f832
|
[
"Apache-2.0"
] | null | null | null |
# flake8: noqa # FIXME: find sol for F403 error (caused by import *), most likely need to import everything by hand
from .sg_module import *
from super_gradients.training.models.classification_models.densenet import *
from super_gradients.training.models.classification_models.dpn import *
from super_gradients.training.models.classification_models.googlenet import *
from super_gradients.training.models.classification_models.lenet import *
from super_gradients.training.models.classification_models.mobilenet import *
from super_gradients.training.models.classification_models.mobilenetv2 import *
from super_gradients.training.models.classification_models.pnasnet import *
from super_gradients.training.models.classification_models.preact_resnet import *
from super_gradients.training.models.classification_models.resnet import *
from super_gradients.training.models.classification_models.resnext import *
from super_gradients.training.models.classification_models.senet import *
from super_gradients.training.models.classification_models.shufflenet import *
from super_gradients.training.models.classification_models.shufflenetv2 import *
from super_gradients.training.models.classification_models.vgg import *
from super_gradients.training.models.segmentation_models.shelfnet import *
from super_gradients.training.models.classification_models.efficientnet import *
from super_gradients.training.models.all_architectures import ARCHITECTURES
| 68.952381
| 115
| 0.870166
| 177
| 1,448
| 6.915254
| 0.248588
| 0.138889
| 0.208333
| 0.333333
| 0.78268
| 0.78268
| 0.720588
| 0.720588
| 0.104575
| 0
| 0
| 0.004435
| 0.065608
| 1,448
| 20
| 116
| 72.4
| 0.900222
| 0.077348
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.05
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 9
|
e903d12f8a04e71c8c2140ed40144f3db69c7ec2
| 7,249
|
py
|
Python
|
app/sso/tests/providers/test_oauth2_google_views.py
|
getmetamapper/metamapper
|
0b2f67eec03fbf7ece35ff9f58ea9bb2dde4d85f
|
[
"BSD-2-Clause"
] | 53
|
2020-07-01T23:11:59.000Z
|
2022-03-31T19:10:28.000Z
|
app/sso/tests/providers/test_oauth2_google_views.py
|
metamapper-io/metamapper
|
376716e72bcaca62f1ec09ca9a13a0346e5502f9
|
[
"BSD-2-Clause"
] | 5
|
2020-11-25T19:48:57.000Z
|
2022-02-27T23:50:18.000Z
|
app/sso/tests/providers/test_oauth2_google_views.py
|
metamapper-io/metamapper
|
376716e72bcaca62f1ec09ca9a13a0346e5502f9
|
[
"BSD-2-Clause"
] | 5
|
2020-08-29T16:43:59.000Z
|
2022-01-17T19:05:30.000Z
|
# -*- coding: utf-8 -*-
from base64 import b64encode, b64decode
from unittest import mock
from django.conf import settings
from django.http import HttpResponseRedirect
from django.test import TestCase, Client
from django.urls import reverse
from testutils import factories
from urllib.parse import urlparse, parse_qs
class GoogleOAuth2ViewSetupTests(TestCase):
"""Test cases for `OAuth2googleView.setup_pipeline` method.
"""
def setUp(self):
self.client = Client(HTTP_HOST='example.com')
self.user = factories.UserFactory()
self.workspace = factories.WorkspaceFactory()
self.workspace.grant_membership(self.user, 'READONLY')
@mock.patch('app.sso.providers.oauth2.google.views.GoogleClient')
def test_when_valid(self, google_client):
"""It should redirect with an error.
"""
domain = 'metamapper.io'
google_client.return_value.get_user_domain.return_value = domain
google_client.return_value.refresh_token = 'meowmeowmeow'
response = self.client.get(reverse('sso-oauth2-google'), {
'code': 'meowmeowmeow',
'state': b64encode((f'login=0&wksp={self.workspace.pk}&uid={self.user.pk}').encode('utf-8')),
})
self.user.refresh_from_db()
self.assertTrue(isinstance(response, (HttpResponseRedirect,)))
self.assertEqual(
response.url,
f'{settings.WEBSERVER_ORIGIN}/{self.workspace.pk}/settings/authentication/setup/google?domain={domain}',
)
class GoogleOAuth2ViewLoginTests(TestCase):
"""Test cases for `OAuth2googleView.login_pipeline` method.
"""
def setUp(self):
self.client = Client(HTTP_HOST='example.com')
self.user = factories.UserFactory()
self.workspace = factories.WorkspaceFactory()
self.workspace.grant_membership(self.user, 'READONLY')
@mock.patch('app.sso.providers.oauth2.google.views.GoogleClient')
def test_when_connection_does_not_exist(self, google_client):
"""It should redirect with an error.
"""
response = self.client.get(reverse('sso-oauth2-google'), {
'code': 'meowmeowmeow',
'state': b64encode(('connection=betDse4R4gus').encode('utf-8')),
})
urlparams = parse_qs(urlparse(response.url).query)
self.assertTrue(isinstance(response, (HttpResponseRedirect,)))
self.assertEqual(
b64decode(urlparams['error'][0]).decode('utf-8'),
'The workspace does not exist or does not have SSO enabled.',
)
@mock.patch('app.sso.providers.oauth2.google.views.GoogleClient')
def test_when_connection_is_disabled(self, google_client):
"""It should redirect with an error.
"""
connection = factories.SSOConnectionFactory(workspace=self.workspace, is_enabled=False)
response = self.client.get(reverse('sso-oauth2-google'), {
'code': 'meowmeowmeow',
'state': b64encode(('connection=%s' % connection.pk).encode('utf-8')),
})
urlparams = parse_qs(urlparse(response.url).query)
self.assertTrue(isinstance(response, (HttpResponseRedirect,)))
self.assertEqual(
b64decode(urlparams['error'][0]).decode('utf-8'),
'The workspace does not exist or does not have SSO enabled.',
)
@mock.patch('app.sso.providers.oauth2.google.views.GoogleClient')
def test_with_not_part_of_google_organization(self, google_client):
"""It should redirect with an error.
"""
domain = 'metamapper.io'
google_client.return_value.get_user_domain.return_value = domain
google_client.return_value.get_user.return_value = {
"sub": "1234",
"email": self.user.email,
"given_name": self.user.fname,
"family_name": self.user.lname,
"email_verified": True,
}
connection = factories.SSOConnectionFactory(
workspace=self.workspace,
is_enabled=True,
extras={'domain': 'metamapper.dev'},
)
response = self.client.get(reverse('sso-oauth2-google'), {
'code': 'meowmeowmeow',
'state': b64encode(('connection=%s' % connection.pk).encode('utf-8')),
})
urlparams = parse_qs(urlparse(response.url).query)
self.assertTrue(isinstance(response, (HttpResponseRedirect,)))
self.assertEqual(
b64decode(urlparams['error'][0]).decode('utf-8'),
f'The domain for your Google account ({domain}) is not allowed to authenticate with this provider.',
)
@mock.patch('app.sso.providers.oauth2.google.views.GoogleClient')
def test_when_valid(self, google_client):
"""It authenticate the user.
"""
domain = self.user.email.split("@")[-1]
google_client.return_value.get_user_domain.return_value = domain
google_client.return_value.get_user.return_value = {
"sub": "1234",
"email": self.user.email,
"given_name": self.user.fname,
"family_name": self.user.lname,
"email_verified": True,
}
connection = factories.SSOConnectionFactory(
workspace=self.workspace,
is_enabled=True,
extras={'domain': domain},
)
sso_domain = factories.SSODomainFactory(
workspace=self.workspace,
domain=domain,
)
sso_domain.mark_as_verified()
response = self.client.get(reverse('sso-oauth2-google'), {
'code': 'meowmeowmeow',
'state': b64encode(('connection=%s' % connection.pk).encode('utf-8')),
})
self.user.refresh_from_db()
self.assertTrue(isinstance(response, (HttpResponseRedirect,)))
self.assertEqual(
response.url,
f'{settings.WEBSERVER_ORIGIN}/{self.workspace.slug}/sso/{self.user.pk}/{self.user.sso_access_token}',
)
@mock.patch('app.sso.providers.oauth2.google.views.GoogleClient')
def test_when_domain_is_not_verified(self, google_client):
"""It should redirect with an error.
"""
domain = self.user.email.split("@")[-1]
google_client.return_value.get_user_domain.return_value = domain
google_client.return_value.get_user.return_value = {
"sub": "1234",
"email": self.user.email,
"given_name": self.user.fname,
"family_name": self.user.lname,
"email_verified": True,
}
connection = factories.SSOConnectionFactory(
workspace=self.workspace,
is_enabled=True,
extras={'domain': domain},
)
response = self.client.get(reverse('sso-oauth2-google'), {
'code': 'meowmeowmeow',
'state': b64encode(('connection=%s' % connection.pk).encode('utf-8')),
})
urlparams = parse_qs(urlparse(response.url).query)
self.assertTrue(isinstance(response, (HttpResponseRedirect,)))
self.assertEqual(
b64decode(urlparams['error'][0]).decode('utf-8'),
'Domain is not authorized for the provided workspace.',
)
| 36.611111
| 116
| 0.626983
| 768
| 7,249
| 5.786458
| 0.179688
| 0.036004
| 0.032403
| 0.041404
| 0.817282
| 0.80108
| 0.80108
| 0.80108
| 0.785329
| 0.765977
| 0
| 0.013482
| 0.242792
| 7,249
| 197
| 117
| 36.796954
| 0.796138
| 0.054628
| 0
| 0.727273
| 0
| 0.013986
| 0.210804
| 0.083823
| 0
| 0
| 0
| 0
| 0.083916
| 1
| 0.055944
| false
| 0
| 0.055944
| 0
| 0.125874
| 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
|
e921b1bc0cceec8b113f393fdb06b057357e8848
| 24,410
|
py
|
Python
|
packages/robotframework-test-assistant/robotframework-test-assistant.py
|
jg8481/leon
|
b94a6c753cee79f4568ab7a83932351f7c949791
|
[
"MIT"
] | 3
|
2020-01-15T20:49:42.000Z
|
2020-11-22T01:41:33.000Z
|
packages/robotframework-test-assistant/robotframework-test-assistant.py
|
jg8481/leon
|
b94a6c753cee79f4568ab7a83932351f7c949791
|
[
"MIT"
] | null | null | null |
packages/robotframework-test-assistant/robotframework-test-assistant.py
|
jg8481/leon
|
b94a6c753cee79f4568ab7a83932351f7c949791
|
[
"MIT"
] | 3
|
2020-01-18T17:06:56.000Z
|
2020-12-16T16:03:57.000Z
|
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import utils
import os
import os.path
import sys
import subprocess
import re
import time
filepath = os.path.dirname(os.path.realpath(__file__))
small_time_delay = 5 ##--> Use this to set up your small time delay. This time delay is in seconds.
medium_time_delay = 20 ##--> Use this to set up your medium time delay. This time delay is in seconds.
large_time_delay = 600 ##--> Use this to set up your large time delay. This time delay is in seconds.
def Clean_Up_Results(string, entities):
"""Leon will clean up the results folder"""
subprocess.call(filepath + '/robotframework-runner.sh Clean-Up-Results', shell=True)
return utils.output('end', 'clean_up_results_ran', utils.translate('clean_up_results_ran'))
def Check_One(string, entities):
"""Leon will run Robot Framework through the script runner"""
subprocess.call(filepath + '/robotframework-runner.sh Check-One', shell=True)
return utils.output('end', 'single_check_ran', utils.translate('single_check_ran'))
def Check_Two(string, entities):
"""Leon will run Robot Framework through the script runner"""
subprocess.call(filepath + '/robotframework-runner.sh Check-Two', shell=True)
return utils.output('end', 'single_check_ran', utils.translate('single_check_ran'))
def Check_Three(string, entities):
"""Leon will run Robot Framework through the script runner"""
subprocess.call(filepath + '/robotframework-runner.sh Check-Three', shell=True)
return utils.output('end', 'single_check_ran', utils.translate('single_check_ran'))
def Check_Four(string, entities):
"""Leon will run Robot Framework through the script runner"""
subprocess.call(filepath + '/robotframework-runner.sh Check-Four', shell=True)
return utils.output('end', 'single_check_ran', utils.translate('single_check_ran'))
def Set_Up_Runner_One(string, entities):
"""Leon will set up a custom automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Up-Runner-One', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Check_One(string, entities):
"""Leon will set up a custom automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Check-One', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Check_Two(string, entities):
"""Leon will set up a custom automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Check-Two', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Check_Three(string, entities):
"""Leon will set up a custom automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Check-Three', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Check_Four(string, entities):
"""Leon will set up a custom automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Check-Four', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Custom_Runner_One(string, entities):
"""Leon will start a custom Robot Framework automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Custom-Runner-One', shell=True)
return utils.output('end', 'multiple_checks_ran', utils.translate('multiple_checks_ran'))
def Display_Runner_One(string, entities):
"""Leon will display the results of the Robot Framework automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Display-Runner-One', shell=True)
return utils.output('end', 'display_results', utils.translate('display_results'))
def Group_One(string, entities):
"""Leon will run Robot Framework through the script runner"""
subprocess.call(filepath + '/robotframework-runner.sh Group-One', shell=True)
return utils.output('end', 'parallel_checks_ran', utils.translate('parallel_checks_ran'))
def Group_Two(string, entities):
"""Leon will run Robot Framework through the script runner"""
subprocess.call(filepath + '/robotframework-runner.sh Group-Two', shell=True)
return utils.output('end', 'parallel_checks_ran', utils.translate('parallel_checks_ran'))
def Group_Three(string, entities):
"""Leon will run Robot Framework through the script runner"""
subprocess.call(filepath + '/robotframework-runner.sh Group-Three', shell=True)
return utils.output('end', 'parallel_checks_ran', utils.translate('parallel_checks_ran'))
def Group_Four(string, entities):
"""Leon will run Robot Framework through the script runner"""
subprocess.call(filepath + '/robotframework-runner.sh Group-Four', shell=True)
return utils.output('end', 'parallel_checks_ran', utils.translate('parallel_checks_ran'))
def Set_Up_Runner_Two(string, entities):
"""Leon will set up a custom automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Up-Runner-Two', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Group_One(string, entities):
"""Leon will set up a custom automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Group-One', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Group_Two(string, entities):
"""Leon will set up a custom automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Group-Two', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Group_Three(string, entities):
"""Leon will set up a custom automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Group-Three', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Group_Four(string, entities):
"""Leon will set up a custom automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Group-Four', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Custom_Runner_Two(string, entities):
"""Leon will start a custom Robot Framework automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Custom-Runner-Two', shell=True)
return utils.output('end', 'multiple_checks_ran', utils.translate('multiple_checks_ran'))
def Display_Runner_Two(string, entities):
"""Leon will display the results of the Robot Framework automated check run"""
subprocess.call(filepath + '/robotframework-runner.sh Display-Runner-Two', shell=True)
return utils.output('end', 'display_results', utils.translate('display_results'))
def Slack_Notification_Send_All(string, entities):
"""Leon will send the console log results of the Robot Framework automated check runs to Slack"""
subprocess.call(filepath + '/robotframework-runner.sh Slack-Notification-Send-All', shell=True)
return utils.output('end', 'notify_the_team', utils.translate('notify_the_team'))
def Build_Docker_Containers(string, entities):
"""Leon will build Docker Containers for running Robot Framework scripts"""
subprocess.call(filepath + '/robotframework-runner.sh Build-Docker-Containers', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Clean_Up_Docker_Containers(string, entities):
"""Leon will stop and remove Docker Containers"""
subprocess.call(filepath + '/robotframework-runner.sh Clean-Up-Docker-Containers', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Robot_Framework_Docker_API_Checks(string, entities):
"""Leon will run Robot Framework scripts from within Docker Containers that run locally"""
subprocess.call(filepath + '/robotframework-runner.sh Robot-Framework-Docker-API-Checks', shell=True)
return utils.output('end', 'multiple_checks_ran', utils.translate('multiple_checks_ran'))
def Robot_Framework_Docker_Random_Order_API_Checks(string, entities):
"""Leon will run Robot Framework scripts from within Docker Containers that run locally"""
subprocess.call(filepath + '/robotframework-runner.sh Robot-Framework-Docker-Random-Order-API-Checks', shell=True)
return utils.output('end', 'multiple_checks_ran', utils.translate('multiple_checks_ran'))
def Robot_Framework_Docker_MBT_Graphwalker_Checks(string, entities):
"""Leon will run Robot Framework scripts from within Docker Containers that run locally"""
subprocess.call(filepath + '/robotframework-runner.sh Robot-Framework-Docker-MBT-Graphwalker-Checks', shell=True)
return utils.output('end', 'multiple_checks_ran', utils.translate('multiple_checks_ran'))
def Display_Current_MBT_Graphwalker_Path(string, entities):
"""Leon will display the results of the current Graphwalker Path generated by the Robot Framework Docker Container"""
subprocess.call(filepath + '/robotframework-runner.sh Display-Current-MBT-Graphwalker-Results', shell=True)
return utils.output('end', 'display_results', utils.translate('display_results'))
def Run_Same_Robot_Framework_Docker_MBT_Graphwalker_Checks_Again(string, entities):
"""Leon will run Robot Framework scripts from within Docker Containers that run locally"""
subprocess.call(filepath + '/robotframework-runner.sh Run-Same-Robot-Framework-Docker-MBT-Graphwalker-Checks-Again', shell=True)
return utils.output('end', 'multiple_checks_ran', utils.translate('multiple_checks_ran'))
def Robot_Framework_Selenium_Desktop_Web_Checks(string, entities):
"""Leon will run Robot Framework through the script runner"""
subprocess.call(filepath + '/robotframework-runner.sh Robot-Framework-Selenium-Desktop-Web-Checks', shell=True)
return utils.output('end', 'multiple_checks_ran', utils.translate('multiple_checks_ran'))
def Start_Remote_API_Check_Process_Webhook_Docker_Container(string, entities):
"""Leon will start a Docker Container for running remote Robot Framework scripts triggered by a webhook"""
subprocess.call(filepath + '/robotframework-runner.sh Start-Remote-API-Check-Process-Webhook-Docker-Container', shell=True)
return utils.output('end', 'multiple_checks_ran', utils.translate('multiple_checks_ran'))
def Start_Remote_Selenium_Process_Webhook_Container(string, entities):
"""Leon will start a Docker Container for running remote Robot Framework scripts triggered by a webhook"""
subprocess.call(filepath + '/robotframework-runner.sh Start-Remote-Selenium-Process-Webhook-Docker-Container', shell=True)
return utils.output('end', 'multiple_checks_ran', utils.translate('multiple_checks_ran'))
def Trigger_Remote_API_Check_Process_Webhook_Docker_Container(string, entities):
"""Leon will trigger a Docker Container for running remote Robot Framework scripts using a webhook"""
subprocess.call(filepath + '/robotframework-runner.sh Trigger-Remote-API-Check-Process-Webhook-Docker-Container', shell=True)
return utils.output('end', 'multiple_checks_ran', utils.translate('multiple_checks_ran'))
def Trigger_Remote_Selenium_Process_Webhook_Container(string, entities):
"""Leon will trigger a Docker Container for running remote Robot Framework scripts using a webhook"""
subprocess.call(filepath + '/robotframework-runner.sh Trigger-Remote-Selenium-Process-Webhook-Docker-Container', shell=True)
return utils.output('end', 'multiple_checks_ran', utils.translate('multiple_checks_ran'))
def Trigger_Both_Webhook_Docker_Containers_For_Parallel_Run(string, entities):
"""Leon will trigger a Docker Container for running remote Robot Framework scripts using a webhook"""
subprocess.call(filepath + '/robotframework-runner.sh Trigger-Both-Webhook-Docker-Containers-For-Parallel-Run', shell=True)
return utils.output('end', 'multiple_checks_ran', utils.translate('multiple_checks_ran'))
def Custom_Tasks_And_Suites_Runner(string, entities):
"""Leon will set up a custom automated tasks and suites run"""
subprocess.call(filepath + '/robotframework-runner.sh Custom-Tasks-And-Suites-Runner', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('multiple_checks_ran'))
def Set_Up_Custom_Tasks_And_Suites_Runner(string, entities):
"""Leon will set up a custom automated tasks and suites run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Up-Custom-Tasks-And-Suites-Runner', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Slack_Notification_Send_All(string, entities):
"""Leon will set up a custom automated tasks and suites run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Slack-Notification-Send-All', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Build_Docker_Containers(string, entities):
"""Leon will set up a custom automated tasks and suites run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Build-Docker-Containers', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Clean_Up_Docker_Containers(string, entities):
"""Leon will set up a custom automated tasks and suites run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Clean-Up-Docker-Containers', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Start_Remote_API_Check_Process_Webhook_Docker_Container(string, entities):
"""Leon will set up a custom automated tasks and suites run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Start-Remote-API-Check-Process-Webhook-Docker-Container', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Start_Remote_Selenium_Process_Webhook_Docker_Container(string, entities):
"""Leon will set up a custom automated tasks and suites run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Start-Remote-Selenium-Process-Webhook-Docker-Container', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Trigger_Remote_API_Check_Process_Webhook_Docker_Container(string, entities):
"""Leon will set up a custom automated tasks and suites run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Trigger-Remote-API-Check-Process-Webhook-Docker-Container', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Trigger_Remote_Selenium_Process_Webhook_Docker_Container(string, entities):
"""Leon will set up a custom automated tasks and suites run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Trigger-Remote-Selenium-Process-Webhook-Docker-Container', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Trigger_Both_Webhook_Docker_Containers_For_Parallel_Run(string, entities):
"""Leon will set up a custom automated tasks and suites run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Trigger-Both-Webhook-Docker-Containers-For-Parallel-Run', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Set_Generate_Bug_Risk_Prediction_Scores_For_A_GitHub_Repo(string, entities):
"""Leon will set up a custom automated tasks and suites run"""
subprocess.call(filepath + '/robotframework-runner.sh Set-Generate-Bug-Risk-Prediction-Scores-For-A-GitHub-Repo', shell=True)
return utils.output('end', 'finished_setting_up', utils.translate('finished_setting_up'))
def Display_Custom_Tasks_And_Suites_Runner(string, entities):
"""Leon will display the results of the Robot Framework automated RPA tasks run"""
subprocess.call(filepath + '/robotframework-runner.sh Display-Custom-Tasks-And-Suites-Runner', shell=True)
return utils.output('end', 'display_results', utils.translate('display_results'))
def Generic_Customizable_Time_Delayed_Runner_One(string, entities):
"""Leon will set up a time delayed generic task runner"""
##--> Suggestion: Feel free to change the time.sleep to small_time_delay, medium_time_delay or large_time_delay.
time.sleep(small_time_delay)
##--> Suggestion: Feel free to set the following subprocess.call to any of the previously defined commands in this robotframework-test-assistant.py leon-ai module. The following is just an example triggering a single time delayed check.
subprocess.call(filepath + '/robotframework-runner.sh Check-One', shell=True)
return utils.output('end', 'generic_time_delayed_task_ran', utils.translate('generic_time_delayed_task_ran'))
def Generic_Customizable_Time_Delayed_Runner_Two(string, entities):
"""Leon will set up a time delayed generic task runner"""
##--> Suggestion: Feel free to change the time.sleep to small_time_delay, medium_time_delay or large_time_delay.
time.sleep(small_time_delay)
##--> Suggestion: Feel free to set the following subprocess.call to any of the previously defined commands in this robotframework-test-assistant.py leon-ai module. The following example builds off of a previously created Custom_Runner_Two .csv file.
subprocess.call(filepath + '/robotframework-runner.sh Set-Up-Runner-One', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Check-Three', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Check-Two', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Check-Three', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Check-One', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Custom-Runner-One', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Display-Runner-One', shell=True)
return utils.output('end', 'generic_time_delayed_task_ran', utils.translate('generic_time_delayed_task_ran'))
def Generic_Customizable_Time_Delayed_Runner_Three(string, entities):
"""Leon will set up a time delayed generic task runner"""
##--> Suggestion: Feel free to change the time.sleep to small_time_delay, medium_time_delay or large_time_delay.
time.sleep(small_time_delay)
##--> Suggestion: Feel free to set the following subprocess.call to any of the previously defined commands in this robotframework-test-assistant.py leon-ai module. The following example will chain together the commands for a new Custom_Runner_One .csv file, runs it, and displays results.
subprocess.call(filepath + '/robotframework-runner.sh Set-Up-Custom-Tasks-And-Suites-Runner', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Clean-Up-Docker-Containers', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Build-Docker-Containers', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Generate-Bug-Risk-Prediction-Scores-For-A-GitHub-Repo', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Custom-Tasks-And-Suites-Runner', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Display-Custom-Tasks-And-Suites-Runner', shell=True)
return utils.output('end', 'generic_time_delayed_task_ran', utils.translate('generic_time_delayed_task_ran'))
def Generic_Customizable_On_Demand_Runner(string, entities):
"""Leon will set up a generic on-demand task runner"""
##--> Suggestion: Feel free to set the following subprocess.call to any of the previously defined commands in this robotframework-test-assistant.py leon-ai module. The following example will chain together the commands for all of the custom runners and sends notifications to the team.
subprocess.call(filepath + '/robotframework-runner.sh Set-Up-Custom-Tasks-And-Suites-Runner', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Clean-Up-Docker-Containers', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Build-Docker-Containers', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Generate-Bug-Risk-Prediction-Scores-For-A-GitHub-Repo', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Custom-Tasks-And-Suites-Runner', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Up-Runner-One', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Check-Three', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Check-Two', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Check-Four', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Check-One', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Custom-Runner-One', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Robot-Framework-Selenium-Desktop-Web-Checks', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Up-Runner-Two', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Group-Two', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Group-One', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Group-Four', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Group-Three', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Custom-Runner-Two', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Robot-Framework-Docker-MBT-Graphwalker-Checks', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Up-Custom-Tasks-And-Suites-Runner', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Clean-Up-Docker-Containers', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Build-Docker-Containers', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Start-Remote-API-Check-Process-Webhook-Docker-Container', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Start-Remote-Selenium-Process-Webhook-Docker-Container', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Trigger-Both-Webhook-Docker-Containers-For-Parallel-Run', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Trigger-Remote-Selenium-Process-Webhook-Docker-Container', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Set-Trigger-Remote-API-Check-Process-Webhook-Docker-Container', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Custom-Tasks-And-Suites-Runner', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Gather-All-Robot-Framework-Test-Results-And-Deploy-Dashboard-To-Heroku', shell=True)
subprocess.call(filepath + '/robotframework-runner.sh Slack-Notification-Send-All', shell=True)
return utils.output('end', 'generic_on_demand_task_ran', utils.translate('generic_on_demand_task_ran'))
def Gather_All_Robot_Framework_Test_Results_And_Deploy_Dashboard_To_Heroku(string, entities):
"""Leon will run Robot Framework ReBot and Git commands to deploy a results file to Heroku"""
subprocess.call(filepath + '/robotframework-runner.sh Gather-All-Robot-Framework-Test-Results-And-Deploy-Dashboard-To-Heroku', shell=True)
return utils.output('end', 'gathered_test_results_and_deployed_dashboard_to_heroku', utils.translate('gathered_test_results_and_deployed_dashboard_to_heroku'))
def Help_Confused_Users(string, entities):
"""Leon will try to help confused users who don't know how to use this leon-ai package"""
return utils.output('end', 'help_confused_users', utils.translate('help_confused_users'))
def Jira_Task_Runner(string, entities):
"""Leon will run Robot Framework through the script runner"""
subprocess.call(filepath + '/robotframework-runner.sh Jira-Task-Runner', shell=True)
return utils.output('end', 'single_check_ran', utils.translate('single_check_ran'))
| 70.549133
| 292
| 0.7712
| 3,307
| 24,410
| 5.541578
| 0.056849
| 0.07563
| 0.114046
| 0.18662
| 0.94205
| 0.937302
| 0.924261
| 0.910019
| 0.88339
| 0.870184
| 0
| 0.000368
| 0.109709
| 24,410
| 345
| 293
| 70.753623
| 0.842904
| 0.213273
| 0
| 0.570136
| 0
| 0.085973
| 0.407523
| 0.26193
| 0
| 0
| 0
| 0
| 0
| 1
| 0.253394
| false
| 0
| 0.031674
| 0
| 0.538462
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 9
|
3a83a000f0a9ae9cf8e818fa8a8f6b2e52f61077
| 2,014
|
py
|
Python
|
Leetcode/Python/_1207.py
|
Xrenya/algorithms
|
aded82cacde2f4f2114241907861251e0e2e5638
|
[
"MIT"
] | 1
|
2021-11-28T15:03:32.000Z
|
2021-11-28T15:03:32.000Z
|
Leetcode/Python/_1207.py
|
Xrenya/algorithms
|
aded82cacde2f4f2114241907861251e0e2e5638
|
[
"MIT"
] | null | null | null |
Leetcode/Python/_1207.py
|
Xrenya/algorithms
|
aded82cacde2f4f2114241907861251e0e2e5638
|
[
"MIT"
] | null | null | null |
class Solution:
def uniqueOccurrences(self, arr: List[int]) -> bool:
hashMap = {}
for num in arr:
if num not in hashMap:
hashMap[num] = 1
else:
hashMap[num] += 1
array = hashMap.values()
unique = {}
for num in array:
if num not in unique:
unique[num] = 1
else:
return False
return True
class Solution:
def uniqueOccurrences(self, arr: List[int]) -> bool:
hashMap = {}
for num in arr:
if num not in hashMap:
hashMap[num] = 1
else:
hashMap[num] += 1
unique = {}
for num in hashMap.values():
if num not in unique:
unique[num] = 1
else:
return False
return True
class Solution:
def uniqueOccurrences(self, arr: List[int]) -> bool:
hashMap = {}
for num in arr:
if num not in hashMap:
hashMap[num] = 1
else:
hashMap[num] += 1
return len(hashMap) == len(set(hashMap.values()))
class Solution:
def uniqueOccurrences(self, arr: List[int]) -> bool:
hashMap = {}
for num in arr:
if num not in hashMap:
hashMap[num] = 1
else:
hashMap[num] += 1
array = []
for val in hashMap.values():
array.append(val)
return len(array) == len(set(array))
class Solution:
def uniqueOccurrences(self, arr: List[int]) -> bool:
hashMap = {}
for num in arr:
if num not in hashMap:
hashMap[num] = 1
else:
hashMap[num] += 1
array = []
for val in hashMap.values():
array.append(val)
while array:
num = array.pop()
if num in array:
return False
return True
| 27.589041
| 57
| 0.456802
| 214
| 2,014
| 4.299065
| 0.135514
| 0.052174
| 0.119565
| 0.076087
| 0.811957
| 0.811957
| 0.811957
| 0.811957
| 0.811957
| 0.811957
| 0
| 0.01086
| 0.451341
| 2,014
| 72
| 58
| 27.972222
| 0.821719
| 0
| 0
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.073529
| false
| 0
| 0
| 0
| 0.264706
| 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
|
3a95ae559435a30a68aba572eee4bea130369136
| 12,225
|
py
|
Python
|
models/context.py
|
Hilbert70403/Infrared-Small-Target
|
0b7bddc13ed3b2362735ea858af6e7d18d4374cd
|
[
"MIT"
] | 21
|
2021-11-08T08:06:36.000Z
|
2022-03-26T14:22:35.000Z
|
models/context.py
|
Hilbert70403/Infrared-Small-Target
|
0b7bddc13ed3b2362735ea858af6e7d18d4374cd
|
[
"MIT"
] | 4
|
2022-01-19T11:37:13.000Z
|
2022-02-28T07:45:19.000Z
|
models/context.py
|
Hilbert70403/Infrared-Small-Target
|
0b7bddc13ed3b2362735ea858af6e7d18d4374cd
|
[
"MIT"
] | 9
|
2021-11-15T09:24:41.000Z
|
2022-03-24T08:11:00.000Z
|
import torch
import torch.nn as nn
import torch.nn.functional as F
__all__ = ['NonLocalBlock', 'GCA_Channel', 'GCA_Element', 'AGCB_Element', 'AGCB_Patch', 'CPM']
class NonLocalBlock(nn.Module):
def __init__(self, planes, reduce_ratio=8):
super(NonLocalBlock, self).__init__()
inter_planes = planes // reduce_ratio
self.query_conv = nn.Conv2d(planes, inter_planes, kernel_size=1)
self.key_conv = nn.Conv2d(planes, inter_planes, kernel_size=1)
self.value_conv = nn.Conv2d(planes, planes, kernel_size=1)
self.gamma = nn.Parameter(torch.zeros(1))
self.softmax = nn.Softmax(dim=-1)
def forward(self, x):
m_batchsize, C, height, width = x.size()
proj_query = self.query_conv(x)
proj_key = self.key_conv(x)
proj_value = self.value_conv(x)
proj_query = proj_query.contiguous().view(m_batchsize, -1, width * height).permute(0, 2, 1)
proj_key = proj_key.contiguous().view(m_batchsize, -1, width * height)
energy = torch.bmm(proj_query, proj_key)
attention = self.softmax(energy)
proj_value = proj_value.contiguous().view(m_batchsize, -1, width * height)
out = torch.bmm(proj_value, attention.permute(0, 2, 1))
out = out.view(m_batchsize, -1, height, width)
out = self.gamma * out + x
return out
class GCA_Channel(nn.Module):
def __init__(self, planes, scale, reduce_ratio_nl, att_mode='origin'):
super(GCA_Channel, self).__init__()
assert att_mode in ['origin', 'post']
self.att_mode = att_mode
if att_mode == 'origin':
self.pool = nn.AdaptiveMaxPool2d(scale)
self.non_local_att = NonLocalBlock(planes, reduce_ratio=reduce_ratio_nl)
self.sigmoid = nn.Sigmoid()
elif att_mode == 'post':
self.pool = nn.AdaptiveMaxPool2d(scale)
self.non_local_att = NonLocalBlock(planes, reduce_ratio=1)
self.conv_att = nn.Sequential(
nn.Conv2d(planes, planes // 4, kernel_size=1),
nn.BatchNorm2d(planes // 4),
nn.ReLU(True),
nn.Conv2d(planes // 4, planes, kernel_size=1),
nn.BatchNorm2d(planes),
nn.Sigmoid(),
)
else:
raise NotImplementedError
def forward(self, x):
if self.att_mode == 'origin':
gca = self.pool(x)
gca = self.non_local_att(gca)
gca = self.sigmoid(gca)
elif self.att_mode == 'post':
gca = self.pool(x)
gca = self.non_local_att(gca)
gca = self.conv_att(gca)
else:
raise NotImplementedError
return gca
class GCA_Element(nn.Module):
def __init__(self, planes, scale, reduce_ratio_nl, att_mode='origin'):
super(GCA_Element, self).__init__()
assert att_mode in ['origin', 'post']
self.att_mode = att_mode
if att_mode == 'origin':
self.pool = nn.AdaptiveMaxPool2d(scale)
self.non_local_att = NonLocalBlock(planes, reduce_ratio=reduce_ratio_nl)
self.sigmoid = nn.Sigmoid()
elif att_mode == 'post':
self.pool = nn.AdaptiveMaxPool2d(scale)
self.non_local_att = NonLocalBlock(planes, reduce_ratio=1)
self.conv_att = nn.Sequential(
nn.Conv2d(planes, planes // 4, kernel_size=1),
nn.BatchNorm2d(planes // 4),
nn.ReLU(True),
nn.Conv2d(planes // 4, planes, kernel_size=1),
nn.BatchNorm2d(planes),
)
self.sigmoid = nn.Sigmoid()
else:
raise NotImplementedError
def forward(self, x):
batch_size, C, height, width = x.size()
if self.att_mode == 'origin':
gca = self.pool(x)
gca = self.non_local_att(gca)
gca = F.interpolate(gca, [height, width], mode='bilinear', align_corners=True)
gca = self.sigmoid(gca)
elif self.att_mode == 'post':
gca = self.pool(x)
gca = self.non_local_att(gca)
gca = self.conv_att(gca)
gca = F.interpolate(gca, [height, width], mode='bilinear', align_corners=True)
gca = self.sigmoid(gca)
else:
raise NotImplementedError
return gca
class AGCB_Patch(nn.Module):
def __init__(self, planes, scale=2, reduce_ratio_nl=32, att_mode='origin'):
super(AGCB_Patch, self).__init__()
self.scale = scale
self.non_local = NonLocalBlock(planes, reduce_ratio=reduce_ratio_nl)
self.conv = nn.Sequential(
nn.Conv2d(planes, planes, 3, 1, 1),
nn.BatchNorm2d(planes),
# nn.Dropout(0.1)
)
self.relu = nn.ReLU(True)
self.attention = GCA_Channel(planes, scale, reduce_ratio_nl, att_mode=att_mode)
self.gamma = nn.Parameter(torch.zeros(1))
def forward(self, x):
## long context
gca = self.attention(x)
## single scale non local
batch_size, C, height, width = x.size()
local_x, local_y, attention_ind = [], [], []
step_h, step_w = height // self.scale, width // self.scale
for i in range(self.scale):
for j in range(self.scale):
start_x, start_y = i * step_h, j * step_w
end_x, end_y = min(start_x + step_h, height), min(start_y + step_w, width)
if i == (self.scale - 1):
end_x = height
if j == (self.scale - 1):
end_y = width
local_x += [start_x, end_x]
local_y += [start_y, end_y]
attention_ind += [i, j]
index_cnt = 2 * self.scale * self.scale
assert len(local_x) == index_cnt
context_list = []
for i in range(0, index_cnt, 2):
block = x[:, :, local_x[i]:local_x[i+1], local_y[i]:local_y[i+1]]
attention = gca[:, :, attention_ind[i], attention_ind[i+1]].view(batch_size, C, 1, 1)
context_list.append(self.non_local(block) * attention)
tmp = []
for i in range(self.scale):
row_tmp = []
for j in range(self.scale):
row_tmp.append(context_list[j + i * self.scale])
tmp.append(torch.cat(row_tmp, 3))
context = torch.cat(tmp, 2)
context = self.conv(context)
context = self.gamma * context + x
context = self.relu(context)
return context
class AGCB_Element(nn.Module):
def __init__(self, planes, scale=2, reduce_ratio_nl=32, att_mode='origin'):
super(AGCB_Element, self).__init__()
self.scale = scale
self.non_local = NonLocalBlock(planes, reduce_ratio=reduce_ratio_nl)
self.conv = nn.Sequential(
nn.Conv2d(planes, planes, 3, 1, 1),
nn.BatchNorm2d(planes),
# nn.Dropout(0.1)
)
self.relu = nn.ReLU(True)
self.attention = GCA_Element(planes, scale, reduce_ratio_nl, att_mode=att_mode)
self.gamma = nn.Parameter(torch.zeros(1))
def forward(self, x):
## long context
gca = self.attention(x)
## single scale non local
batch_size, C, height, width = x.size()
local_x, local_y, attention_ind = [], [], []
step_h, step_w = height // self.scale, width // self.scale
for i in range(self.scale):
for j in range(self.scale):
start_x, start_y = i * step_h, j * step_w
end_x, end_y = min(start_x + step_h, height), min(start_y + step_w, width)
if i == (self.scale - 1):
end_x = height
if j == (self.scale - 1):
end_y = width
local_x += [start_x, end_x]
local_y += [start_y, end_y]
attention_ind += [i, j]
index_cnt = 2 * self.scale * self.scale
assert len(local_x) == index_cnt
context_list = []
for i in range(0, index_cnt, 2):
block = x[:, :, local_x[i]:local_x[i+1], local_y[i]:local_y[i+1]]
# attention = gca[:, :, attention_ind[i], attention_ind[i+1]].view(batch_size, C, 1, 1)
context_list.append(self.non_local(block))
tmp = []
for i in range(self.scale):
row_tmp = []
for j in range(self.scale):
row_tmp.append(context_list[j + i * self.scale])
tmp.append(torch.cat(row_tmp, 3))
context = torch.cat(tmp, 2)
context = context * gca
context = self.conv(context)
context = self.gamma * context + x
context = self.relu(context)
return context
class AGCB_NoGCA(nn.Module):
def __init__(self, planes, scale=2, reduce_ratio_nl=32):
super(AGCB_NoGCA, self).__init__()
self.scale = scale
self.non_local = NonLocalBlock(planes, reduce_ratio=reduce_ratio_nl)
self.conv = nn.Sequential(
nn.Conv2d(planes, planes, 3, 1, 1),
nn.BatchNorm2d(planes),
# nn.Dropout(0.1)
)
self.relu = nn.ReLU(True)
self.gamma = nn.Parameter(torch.zeros(1))
def forward(self, x):
## single scale non local
batch_size, C, height, width = x.size()
local_x, local_y, attention_ind = [], [], []
step_h, step_w = height // self.scale, width // self.scale
for i in range(self.scale):
for j in range(self.scale):
start_x, start_y = i * step_h, j * step_w
end_x, end_y = min(start_x + step_h, height), min(start_y + step_w, width)
if i == (self.scale - 1):
end_x = height
if j == (self.scale - 1):
end_y = width
local_x += [start_x, end_x]
local_y += [start_y, end_y]
attention_ind += [i, j]
index_cnt = 2 * self.scale * self.scale
assert len(local_x) == index_cnt
context_list = []
for i in range(0, index_cnt, 2):
block = x[:, :, local_x[i]:local_x[i+1], local_y[i]:local_y[i+1]]
context_list.append(self.non_local(block))
tmp = []
for i in range(self.scale):
row_tmp = []
for j in range(self.scale):
row_tmp.append(context_list[j + i * self.scale])
tmp.append(torch.cat(row_tmp, 3))
context = torch.cat(tmp, 2)
context = self.conv(context)
context = self.gamma * context + x
context = self.relu(context)
return context
class CPM(nn.Module):
def __init__(self, planes, block_type, scales=(3,5,6,10), reduce_ratios=(4,8), att_mode='origin'):
super(CPM, self).__init__()
assert block_type in ['patch', 'element']
assert att_mode in ['origin', 'post']
inter_planes = planes // reduce_ratios[0]
self.conv1 = nn.Sequential(
nn.Conv2d(planes, inter_planes, kernel_size=1),
nn.BatchNorm2d(inter_planes),
nn.ReLU(True),
)
if block_type == 'patch':
self.scale_list = nn.ModuleList(
[AGCB_Patch(inter_planes, scale=scale, reduce_ratio_nl=reduce_ratios[1], att_mode=att_mode)
for scale in scales])
elif block_type == 'element':
self.scale_list = nn.ModuleList(
[AGCB_Element(inter_planes, scale=scale, reduce_ratio_nl=reduce_ratios[1], att_mode=att_mode)
for scale in scales])
else:
raise NotImplementedError
channels = inter_planes * (len(scales) + 1)
self.conv2 = nn.Sequential(
nn.Conv2d(channels, planes, 1),
nn.BatchNorm2d(planes),
nn.ReLU(True),
)
def forward(self, x):
reduced = self.conv1(x)
blocks = []
for i in range(len(self.scale_list)):
blocks.append(self.scale_list[i](reduced))
out = torch.cat(blocks, 1)
out = torch.cat((reduced, out), 1)
out = self.conv2(out)
return out
| 35.641399
| 109
| 0.558937
| 1,589
| 12,225
| 4.081812
| 0.078037
| 0.055504
| 0.02806
| 0.029602
| 0.825624
| 0.812673
| 0.790163
| 0.751773
| 0.744064
| 0.72803
| 0
| 0.015867
| 0.319509
| 12,225
| 343
| 110
| 35.641399
| 0.763794
| 0.01865
| 0
| 0.740741
| 0
| 0
| 0.01669
| 0
| 0
| 0
| 0
| 0
| 0.025926
| 1
| 0.051852
| false
| 0
| 0.011111
| 0
| 0.114815
| 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
|
a34d8a9377344d0edaae44dd4947affb31816584
| 189
|
py
|
Python
|
src/miu/colorbilding.py
|
memowe/miniciti-user
|
ce1cbccdb693c4916217e1395eacb14f06d536a1
|
[
"MIT"
] | null | null | null |
src/miu/colorbilding.py
|
memowe/miniciti-user
|
ce1cbccdb693c4916217e1395eacb14f06d536a1
|
[
"MIT"
] | null | null | null |
src/miu/colorbilding.py
|
memowe/miniciti-user
|
ce1cbccdb693c4916217e1395eacb14f06d536a1
|
[
"MIT"
] | null | null | null |
from miniciti.bilding import Bilding
class ColorBilding(Bilding):
def __init__(self, color="bli"):
self.color = color
def isBli(self):
return self.color == "bli"
| 18.9
| 36
| 0.650794
| 23
| 189
| 5.173913
| 0.565217
| 0.226891
| 0.201681
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.238095
| 189
| 9
| 37
| 21
| 0.826389
| 0
| 0
| 0
| 0
| 0
| 0.031746
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0.166667
| 0.833333
| 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
|
a35c7cddf46b7abcc142f392526fdba0c6a3aa7e
| 112
|
py
|
Python
|
test/python/test_utils.py
|
AdityaSidharta/docker_base
|
ccdbe7f10e4ddb329dfc106734b3e58226cd0b05
|
[
"MIT"
] | null | null | null |
test/python/test_utils.py
|
AdityaSidharta/docker_base
|
ccdbe7f10e4ddb329dfc106734b3e58226cd0b05
|
[
"MIT"
] | null | null | null |
test/python/test_utils.py
|
AdityaSidharta/docker_base
|
ccdbe7f10e4ddb329dfc106734b3e58226cd0b05
|
[
"MIT"
] | null | null | null |
from app.python.utils import get_datetime
def test_get_datetime():
assert isinstance(get_datetime(), str)
| 18.666667
| 42
| 0.776786
| 16
| 112
| 5.1875
| 0.75
| 0.39759
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133929
| 112
| 5
| 43
| 22.4
| 0.85567
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 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
|
a3741285d787f895d330b0560df8e8e215121b8a
| 1,701
|
py
|
Python
|
examples/plotter/lego.py
|
adamfazzari/pylgbst
|
1ae2b761a9da3d8983a8d3cd9dd3dfd7a0b7540b
|
[
"MIT"
] | 468
|
2017-09-19T16:59:55.000Z
|
2022-03-09T11:52:02.000Z
|
examples/plotter/lego.py
|
adamfazzari/pylgbst
|
1ae2b761a9da3d8983a8d3cd9dd3dfd7a0b7540b
|
[
"MIT"
] | 110
|
2017-12-28T14:53:17.000Z
|
2022-02-20T12:29:46.000Z
|
examples/plotter/lego.py
|
adamfazzari/pylgbst
|
1ae2b761a9da3d8983a8d3cd9dd3dfd7a0b7540b
|
[
"MIT"
] | 120
|
2017-10-09T20:16:52.000Z
|
2022-03-29T13:14:28.000Z
|
def lego(plotter, t):
h = t * 5.0
w = t * 3.0
plotter.move(-t * 2.0, 0)
l(h, plotter, t, w)
plotter.move(0, w + t)
e(h, plotter, t, w)
plotter.move(0, w + t)
g(plotter, t)
plotter.move(0, w + t)
o(plotter, t)
def o(plotter, t):
# O
plotter.move(t, 0)
plotter.line(3 * t, 0)
plotter.line(t, t)
plotter.line(0, t)
plotter.line(-t, t)
plotter.line(-3 * t, 0)
plotter.line(-t, -t)
plotter.line(0, -t)
plotter.line(t, -t)
plotter.move(0, t)
plotter.line(3 * t, 0)
plotter.line(0, t)
plotter.line(-3 * t, 0)
plotter.line(0, -t)
def g(plotter, t):
# G
plotter.move(t, 0)
plotter.line(3 * t, 0)
plotter.line(t, t)
plotter.line(0, t)
plotter.line(-t, t)
plotter.line(-t, 0)
plotter.line(0, -t)
plotter.line(t, 0)
plotter.line(0, -t)
plotter.line(-3 * t, 0)
plotter.line(0, t)
plotter.line(t * 0.25, 0)
plotter.line(0, -t * 0.25)
plotter.line(t * 0.75, 0)
plotter.line(0, t * 1.25)
plotter.line(-3 * t, 0)
plotter.line(0, -t)
plotter.line(t, 0)
plotter.line(0, -t)
plotter.line(t, -t)
plotter.move(-t, 0)
def e(h, plotter, t, w):
# E
plotter.line(h, 0)
plotter.line(0, w)
plotter.line(-t, 0)
plotter.line(0, -2 * t)
plotter.line(-t, 0)
plotter.line(0, t)
plotter.line(-t, 0)
plotter.line(0, -t)
plotter.line(-t, 0)
plotter.line(0, 2 * t)
plotter.line(-t, 0)
plotter.line(0, -w)
def l(h, plotter, t, w):
# L
plotter.line(h, 0)
plotter.line(0, t)
plotter.line(-(h - t), 0)
plotter.line(0, 2 * t)
plotter.line(-t, 0)
plotter.line(0, -w)
| 20.743902
| 30
| 0.522046
| 304
| 1,701
| 2.921053
| 0.0625
| 0.606982
| 0.310811
| 0.278153
| 0.869369
| 0.793919
| 0.793919
| 0.724099
| 0.724099
| 0.670045
| 0
| 0.063778
| 0.281011
| 1,701
| 81
| 31
| 21
| 0.662306
| 0.004115
| 0
| 0.676471
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.073529
| false
| 0
| 0
| 0
| 0.073529
| 0
| 0
| 0
| 0
| null | 1
| 1
| 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
| 9
|
a38a03f634375d52713a25701814579ff7b6e33e
| 92,070
|
py
|
Python
|
cryptoapis/api/unified_endpoints_api.py
|
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
|
c59ebd914850622b2c6500c4c30af31fb9cecf0e
|
[
"MIT"
] | 5
|
2021-05-17T04:45:03.000Z
|
2022-03-23T12:51:46.000Z
|
cryptoapis/api/unified_endpoints_api.py
|
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
|
c59ebd914850622b2c6500c4c30af31fb9cecf0e
|
[
"MIT"
] | null | null | null |
cryptoapis/api/unified_endpoints_api.py
|
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
|
c59ebd914850622b2c6500c4c30af31fb9cecf0e
|
[
"MIT"
] | 2
|
2021-06-02T07:32:26.000Z
|
2022-02-12T02:36:23.000Z
|
"""
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockchain applications. Crypto APIs 2.0 provides unified endpoints and data, raw data, automatic tokens and coins forwardings, callback functionalities, and much more. # noqa: E501
The version of the OpenAPI document: 2.0.0
Contact: developers@cryptoapis.io
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from cryptoapis.api_client import ApiClient, Endpoint as _Endpoint
from cryptoapis.model_utils import ( # noqa: F401
check_allowed_values,
check_validations,
date,
datetime,
file_type,
none_type,
validate_and_convert_types
)
from cryptoapis.model.get_address_details_r import GetAddressDetailsR
from cryptoapis.model.get_block_details_by_block_hash_r import GetBlockDetailsByBlockHashR
from cryptoapis.model.get_block_details_by_block_height_r import GetBlockDetailsByBlockHeightR
from cryptoapis.model.get_fee_recommendations_r import GetFeeRecommendationsR
from cryptoapis.model.get_last_mined_block_r import GetLastMinedBlockR
from cryptoapis.model.get_transaction_details_by_transaction_idr import GetTransactionDetailsByTransactionIDR
from cryptoapis.model.inline_response400 import InlineResponse400
from cryptoapis.model.inline_response40010 import InlineResponse40010
from cryptoapis.model.inline_response40015 import InlineResponse40015
from cryptoapis.model.inline_response40016 import InlineResponse40016
from cryptoapis.model.inline_response40017 import InlineResponse40017
from cryptoapis.model.inline_response40024 import InlineResponse40024
from cryptoapis.model.inline_response40026 import InlineResponse40026
from cryptoapis.model.inline_response40030 import InlineResponse40030
from cryptoapis.model.inline_response40037 import InlineResponse40037
from cryptoapis.model.inline_response4004 import InlineResponse4004
from cryptoapis.model.inline_response40042 import InlineResponse40042
from cryptoapis.model.inline_response40053 import InlineResponse40053
from cryptoapis.model.inline_response401 import InlineResponse401
from cryptoapis.model.inline_response40110 import InlineResponse40110
from cryptoapis.model.inline_response40115 import InlineResponse40115
from cryptoapis.model.inline_response40116 import InlineResponse40116
from cryptoapis.model.inline_response40117 import InlineResponse40117
from cryptoapis.model.inline_response40124 import InlineResponse40124
from cryptoapis.model.inline_response40126 import InlineResponse40126
from cryptoapis.model.inline_response40130 import InlineResponse40130
from cryptoapis.model.inline_response40137 import InlineResponse40137
from cryptoapis.model.inline_response4014 import InlineResponse4014
from cryptoapis.model.inline_response40142 import InlineResponse40142
from cryptoapis.model.inline_response40153 import InlineResponse40153
from cryptoapis.model.inline_response402 import InlineResponse402
from cryptoapis.model.inline_response403 import InlineResponse403
from cryptoapis.model.inline_response40310 import InlineResponse40310
from cryptoapis.model.inline_response40315 import InlineResponse40315
from cryptoapis.model.inline_response40316 import InlineResponse40316
from cryptoapis.model.inline_response40317 import InlineResponse40317
from cryptoapis.model.inline_response40324 import InlineResponse40324
from cryptoapis.model.inline_response40326 import InlineResponse40326
from cryptoapis.model.inline_response40330 import InlineResponse40330
from cryptoapis.model.inline_response40337 import InlineResponse40337
from cryptoapis.model.inline_response4034 import InlineResponse4034
from cryptoapis.model.inline_response40342 import InlineResponse40342
from cryptoapis.model.inline_response40353 import InlineResponse40353
from cryptoapis.model.inline_response404 import InlineResponse404
from cryptoapis.model.inline_response4041 import InlineResponse4041
from cryptoapis.model.inline_response4042 import InlineResponse4042
from cryptoapis.model.inline_response409 import InlineResponse409
from cryptoapis.model.inline_response415 import InlineResponse415
from cryptoapis.model.inline_response422 import InlineResponse422
from cryptoapis.model.inline_response429 import InlineResponse429
from cryptoapis.model.inline_response500 import InlineResponse500
from cryptoapis.model.list_all_unconfirmed_transactions_r import ListAllUnconfirmedTransactionsR
from cryptoapis.model.list_confirmed_transactions_by_address_r import ListConfirmedTransactionsByAddressR
from cryptoapis.model.list_latest_mined_blocks_r import ListLatestMinedBlocksR
from cryptoapis.model.list_transactions_by_block_hash_r import ListTransactionsByBlockHashR
from cryptoapis.model.list_transactions_by_block_height_r import ListTransactionsByBlockHeightR
from cryptoapis.model.list_unconfirmed_transactions_by_address_r import ListUnconfirmedTransactionsByAddressR
class UnifiedEndpointsApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
self.get_address_details_endpoint = _Endpoint(
settings={
'response_type': (GetAddressDetailsR,),
'auth': [
'ApiKey'
],
'endpoint_path': '/blockchain-data/{blockchain}/{network}/addresses/{address}',
'operation_id': 'get_address_details',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'blockchain',
'network',
'address',
'context',
],
'required': [
'blockchain',
'network',
'address',
],
'nullable': [
],
'enum': [
'blockchain',
'network',
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
('blockchain',): {
"BITCOIN": "bitcoin",
"BITCOIN-CASH": "bitcoin-cash",
"LITECOIN": "litecoin",
"DOGECOIN": "dogecoin",
"DASH": "dash",
"ETHEREUM": "ethereum",
"ETHEREUM-CLASSIC": "ethereum-classic",
"BINANCE-SMART-CHAIN": "binance-smart-chain",
"ZCASH": "zcash"
},
('network',): {
"MAINNET": "mainnet",
"TESTNET": "testnet",
"ROPSTEN": "ropsten",
"MORDOR": "mordor"
},
},
'openapi_types': {
'blockchain':
(str,),
'network':
(str,),
'address':
(str,),
'context':
(str,),
},
'attribute_map': {
'blockchain': 'blockchain',
'network': 'network',
'address': 'address',
'context': 'context',
},
'location_map': {
'blockchain': 'path',
'network': 'path',
'address': 'path',
'context': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.get_block_details_by_block_hash_endpoint = _Endpoint(
settings={
'response_type': (GetBlockDetailsByBlockHashR,),
'auth': [
'ApiKey'
],
'endpoint_path': '/blockchain-data/{blockchain}/{network}/blocks/hash/{blockHash}',
'operation_id': 'get_block_details_by_block_hash',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'blockchain',
'network',
'block_hash',
'context',
],
'required': [
'blockchain',
'network',
'block_hash',
],
'nullable': [
],
'enum': [
'blockchain',
'network',
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
('blockchain',): {
"BITCOIN": "bitcoin",
"ETHEREUM": "ethereum",
"ETHEREUM-CLASSIC": "ethereum-classic",
"BITCOIN-CASH": "bitcoin-cash",
"LITECOIN": "litecoin",
"DOGECOIN": "dogecoin",
"DASH": "dash",
"BINANCE-SMART-CHAIN": "binance-smart-chain",
"ZCASH": "zcash"
},
('network',): {
"MAINNET": "mainnet",
"TESTNET": "testnet",
"ROPSTEN": "ropsten",
"MORDOR": "mordor"
},
},
'openapi_types': {
'blockchain':
(str,),
'network':
(str,),
'block_hash':
(str,),
'context':
(str,),
},
'attribute_map': {
'blockchain': 'blockchain',
'network': 'network',
'block_hash': 'blockHash',
'context': 'context',
},
'location_map': {
'blockchain': 'path',
'network': 'path',
'block_hash': 'path',
'context': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.get_block_details_by_block_height_endpoint = _Endpoint(
settings={
'response_type': (GetBlockDetailsByBlockHeightR,),
'auth': [
'ApiKey'
],
'endpoint_path': '/blockchain-data/{blockchain}/{network}/blocks/height/{height}',
'operation_id': 'get_block_details_by_block_height',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'blockchain',
'network',
'height',
'context',
],
'required': [
'blockchain',
'network',
'height',
],
'nullable': [
],
'enum': [
'blockchain',
'network',
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
('blockchain',): {
"BITCOIN": "bitcoin",
"ETHEREUM": "ethereum",
"ETHEREUM-CLASSIC": "ethereum-classic",
"BITCOIN-CASH": "bitcoin-cash",
"LITECOIN": "litecoin",
"DOGECOIN": "dogecoin",
"DASH": "dash",
"BINANCE-SMART-CHAIN": "binance-smart-chain",
"ZCASH": "zcash"
},
('network',): {
"MAINNET": "mainnet",
"TESTNET": "testnet",
"ROPSTEN": "ropsten",
"MORDOR": "mordor"
},
},
'openapi_types': {
'blockchain':
(str,),
'network':
(str,),
'height':
(int,),
'context':
(str,),
},
'attribute_map': {
'blockchain': 'blockchain',
'network': 'network',
'height': 'height',
'context': 'context',
},
'location_map': {
'blockchain': 'path',
'network': 'path',
'height': 'path',
'context': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.get_fee_recommendations_endpoint = _Endpoint(
settings={
'response_type': (GetFeeRecommendationsR,),
'auth': [
'ApiKey'
],
'endpoint_path': '/blockchain-data/{blockchain}/{network}/mempool/fees',
'operation_id': 'get_fee_recommendations',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'blockchain',
'network',
'context',
],
'required': [
'blockchain',
'network',
],
'nullable': [
],
'enum': [
'blockchain',
'network',
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
('blockchain',): {
"BITCOIN": "bitcoin",
"ETHEREUM": "ethereum",
"ETHEREUM-CLASSIC": "ethereum-classic",
"BITCOIN-CASH": "bitcoin-cash",
"DOGECOIN": "dogecoin",
"DASH": "dash",
"LITECOIN": "litecoin",
"BINANCE-SMART-CHAIN": "binance-smart-chain",
"ZCASH": "zcash"
},
('network',): {
"MAINNET": "mainnet",
"TESTNET": "testnet",
"ROPSTEN": "ropsten",
"MORDOR": "mordor"
},
},
'openapi_types': {
'blockchain':
(str,),
'network':
(str,),
'context':
(str,),
},
'attribute_map': {
'blockchain': 'blockchain',
'network': 'network',
'context': 'context',
},
'location_map': {
'blockchain': 'path',
'network': 'path',
'context': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.get_last_mined_block_endpoint = _Endpoint(
settings={
'response_type': (GetLastMinedBlockR,),
'auth': [
'ApiKey'
],
'endpoint_path': '/blockchain-data/{blockchain}/{network}/blocks/last',
'operation_id': 'get_last_mined_block',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'blockchain',
'network',
'context',
],
'required': [
'blockchain',
'network',
],
'nullable': [
],
'enum': [
'blockchain',
'network',
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
('blockchain',): {
"BITCOIN": "bitcoin",
"ETHEREUM": "ethereum",
"ETHEREUM-CLASSIC": "ethereum-classic",
"BITCOIN-CASH": "bitcoin-cash",
"LITECOIN": "litecoin",
"DOGECOIN": "dogecoin",
"DASH": "dash",
"BINANCE-SMART-CHAIN": "binance-smart-chain",
"ZCASH": "zcash"
},
('network',): {
"MAINNET": "mainnet",
"TESTNET": "testnet",
"ROPSTEN": "ropsten",
"MORDOR": "mordor"
},
},
'openapi_types': {
'blockchain':
(str,),
'network':
(str,),
'context':
(str,),
},
'attribute_map': {
'blockchain': 'blockchain',
'network': 'network',
'context': 'context',
},
'location_map': {
'blockchain': 'path',
'network': 'path',
'context': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.get_transaction_details_by_transaction_id_endpoint = _Endpoint(
settings={
'response_type': (GetTransactionDetailsByTransactionIDR,),
'auth': [
'ApiKey'
],
'endpoint_path': '/blockchain-data/{blockchain}/{network}/transactions/{transactionId}',
'operation_id': 'get_transaction_details_by_transaction_id',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'blockchain',
'network',
'transaction_id',
'context',
],
'required': [
'blockchain',
'network',
'transaction_id',
],
'nullable': [
],
'enum': [
'blockchain',
'network',
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
('blockchain',): {
"BITCOIN": "bitcoin",
"BITCOIN-CASH": "bitcoin-cash",
"LITECOIN": "litecoin",
"DOGECOIN": "dogecoin",
"DASH": "dash",
"ETHEREUM": "ethereum",
"ETHEREUM-CLASSIC": "ethereum-classic",
"BINANCE-SMART-CHAIN": "binance-smart-chain",
"ZCASH": "zcash"
},
('network',): {
"MAINNET": "mainnet",
"TESTNET": "testnet",
"ROPSTEN": "ropsten",
"MORDOR": "mordor"
},
},
'openapi_types': {
'blockchain':
(str,),
'network':
(str,),
'transaction_id':
(str,),
'context':
(str,),
},
'attribute_map': {
'blockchain': 'blockchain',
'network': 'network',
'transaction_id': 'transactionId',
'context': 'context',
},
'location_map': {
'blockchain': 'path',
'network': 'path',
'transaction_id': 'path',
'context': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.list_all_unconfirmed_transactions_endpoint = _Endpoint(
settings={
'response_type': (ListAllUnconfirmedTransactionsR,),
'auth': [
'ApiKey'
],
'endpoint_path': '/blockchain-data/{blockchain}/{network}/address-transactions-unconfirmed',
'operation_id': 'list_all_unconfirmed_transactions',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'blockchain',
'network',
'context',
'limit',
'offset',
],
'required': [
'blockchain',
'network',
],
'nullable': [
],
'enum': [
'blockchain',
'network',
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
('blockchain',): {
"BITCOIN": "bitcoin",
"BITCOIN-CASH": "bitcoin-cash",
"LITECOIN": "litecoin",
"DOGECOIN": "dogecoin",
"DASH": "dash",
"ETHEREUM": "ethereum",
"ETHEREUM-CLASSIC": "ethereum-classic",
"ZCASH": "zcash",
"BINANCE-SMART-CHAIN": "binance-smart-chain"
},
('network',): {
"MAINNET": "mainnet",
"TESTNET": "testnet",
"ROPSTEN": "ropsten",
"MORDOR": "mordor"
},
},
'openapi_types': {
'blockchain':
(str,),
'network':
(str,),
'context':
(str,),
'limit':
(int,),
'offset':
(int,),
},
'attribute_map': {
'blockchain': 'blockchain',
'network': 'network',
'context': 'context',
'limit': 'limit',
'offset': 'offset',
},
'location_map': {
'blockchain': 'path',
'network': 'path',
'context': 'query',
'limit': 'query',
'offset': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.list_confirmed_transactions_by_address_endpoint = _Endpoint(
settings={
'response_type': (ListConfirmedTransactionsByAddressR,),
'auth': [
'ApiKey'
],
'endpoint_path': '/blockchain-data/{blockchain}/{network}/addresses/{address}/transactions',
'operation_id': 'list_confirmed_transactions_by_address',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'blockchain',
'network',
'address',
'context',
'limit',
'offset',
],
'required': [
'blockchain',
'network',
'address',
],
'nullable': [
],
'enum': [
'blockchain',
'network',
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
('blockchain',): {
"BITCOIN": "bitcoin",
"BITCOIN-CASH": "bitcoin-cash",
"LITECOIN": "litecoin",
"DOGECOIN": "dogecoin",
"DASH": "dash",
"ETHEREUM-CLASSIC": "ethereum-classic",
"ETHEREUM": "ethereum",
"BINANCE-SMART-CHAIN": "binance-smart-chain",
"ZCASH": "zcash"
},
('network',): {
"MAINNET": "mainnet",
"TESTNET": "testnet",
"MORDOR": "mordor",
"ROPSTEN": "ropsten"
},
},
'openapi_types': {
'blockchain':
(str,),
'network':
(str,),
'address':
(str,),
'context':
(str,),
'limit':
(int,),
'offset':
(int,),
},
'attribute_map': {
'blockchain': 'blockchain',
'network': 'network',
'address': 'address',
'context': 'context',
'limit': 'limit',
'offset': 'offset',
},
'location_map': {
'blockchain': 'path',
'network': 'path',
'address': 'path',
'context': 'query',
'limit': 'query',
'offset': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.list_latest_mined_blocks_endpoint = _Endpoint(
settings={
'response_type': (ListLatestMinedBlocksR,),
'auth': [
'ApiKey'
],
'endpoint_path': '/blockchain-data/{blockchain}/{network}/blocks/last/{count}',
'operation_id': 'list_latest_mined_blocks',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'network',
'blockchain',
'count',
'context',
],
'required': [
'network',
'blockchain',
'count',
],
'nullable': [
],
'enum': [
'network',
'blockchain',
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
('network',): {
"TESTNET": "testnet",
"MORDOR": "mordor",
"MAINNET": "mainnet",
"ROPSTEN": "ropsten"
},
('blockchain',): {
"BITCOIN": "bitcoin",
"BITCOIN-CASH": "bitcoin-cash",
"ETHEREUM-CLASSIC": "ethereum-classic",
"ETHEREUM": "ethereum",
"LITECOIN": "litecoin",
"DASH": "dash",
"DOGECOIN": "dogecoin",
"BINANCE-SMART-CHAIN": "binance-smart-chain",
"ZILLIQA": "zilliqa",
"ZCASH": "zcash",
"XRP": "xrp"
},
},
'openapi_types': {
'network':
(str,),
'blockchain':
(str,),
'count':
(int,),
'context':
(str,),
},
'attribute_map': {
'network': 'network',
'blockchain': 'blockchain',
'count': 'count',
'context': 'context',
},
'location_map': {
'network': 'path',
'blockchain': 'path',
'count': 'path',
'context': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.list_transactions_by_block_hash_endpoint = _Endpoint(
settings={
'response_type': (ListTransactionsByBlockHashR,),
'auth': [
'ApiKey'
],
'endpoint_path': '/blockchain-data/{blockchain}/{network}/blocks/hash/{blockHash}/transactions',
'operation_id': 'list_transactions_by_block_hash',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'blockchain',
'network',
'block_hash',
'context',
'limit',
'offset',
],
'required': [
'blockchain',
'network',
'block_hash',
],
'nullable': [
],
'enum': [
'blockchain',
'network',
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
('blockchain',): {
"BITCOIN": "bitcoin",
"BITCOIN-CASH": "bitcoin-cash",
"LITECOIN": "litecoin",
"DOGECOIN": "dogecoin",
"DASH": "dash",
"ETHEREUM": "ethereum",
"ETHEREUM-CLASSIC": "ethereum-classic",
"BINANCE-SMART-CHAIN": "binance-smart-chain",
"ZCASH": "zcash"
},
('network',): {
"TESTNET": "testnet",
"MAINNET": "mainnet",
"ROPSTEN": "ropsten",
"MORDOR": "mordor"
},
},
'openapi_types': {
'blockchain':
(str,),
'network':
(str,),
'block_hash':
(str,),
'context':
(str,),
'limit':
(int,),
'offset':
(int,),
},
'attribute_map': {
'blockchain': 'blockchain',
'network': 'network',
'block_hash': 'blockHash',
'context': 'context',
'limit': 'limit',
'offset': 'offset',
},
'location_map': {
'blockchain': 'path',
'network': 'path',
'block_hash': 'path',
'context': 'query',
'limit': 'query',
'offset': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.list_transactions_by_block_height_endpoint = _Endpoint(
settings={
'response_type': (ListTransactionsByBlockHeightR,),
'auth': [
'ApiKey'
],
'endpoint_path': '/blockchain-data/{blockchain}/{network}/blocks/height/{height}/transactions',
'operation_id': 'list_transactions_by_block_height',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'blockchain',
'network',
'height',
'context',
'limit',
'offset',
],
'required': [
'blockchain',
'network',
'height',
],
'nullable': [
],
'enum': [
'blockchain',
'network',
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
('blockchain',): {
"BITCOIN": "bitcoin",
"ETHEREUM": "ethereum",
"DASH": "dash",
"DOGECOIN": "dogecoin",
"LITECOIN": "litecoin",
"BITCOIN-CASH": "bitcoin-cash",
"ETHEREUM-CLASSIC": "ethereum-classic",
"BINANCE-SMART-CHAIN": "binance-smart-chain",
"ZCASH": "zcash"
},
('network',): {
"MAINNET": "mainnet",
"TESTNET": "testnet",
"ROPSTEN": "ropsten",
"MORDOR": "mordor"
},
},
'openapi_types': {
'blockchain':
(str,),
'network':
(str,),
'height':
(int,),
'context':
(str,),
'limit':
(int,),
'offset':
(int,),
},
'attribute_map': {
'blockchain': 'blockchain',
'network': 'network',
'height': 'height',
'context': 'context',
'limit': 'limit',
'offset': 'offset',
},
'location_map': {
'blockchain': 'path',
'network': 'path',
'height': 'path',
'context': 'query',
'limit': 'query',
'offset': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.list_unconfirmed_transactions_by_address_endpoint = _Endpoint(
settings={
'response_type': (ListUnconfirmedTransactionsByAddressR,),
'auth': [
'ApiKey'
],
'endpoint_path': '/blockchain-data/{blockchain}/{network}/address-transactions-unconfirmed/{address}',
'operation_id': 'list_unconfirmed_transactions_by_address',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'blockchain',
'network',
'address',
'context',
'limit',
'offset',
],
'required': [
'blockchain',
'network',
'address',
],
'nullable': [
],
'enum': [
'blockchain',
'network',
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
('blockchain',): {
"BITCOIN": "bitcoin",
"BITCOIN-CASH": "bitcoin-cash",
"LITECOIN": "litecoin",
"DOGECOIN": "dogecoin",
"DASH": "dash",
"ETHEREUM": "ethereum",
"ETHEREUM-CLASSIC": "ethereum-classic",
"ZCASH": "zcash",
"BINANCE-SMART-CHAIN": "binance-smart-chain"
},
('network',): {
"MAINNET": "mainnet",
"TESTNET": "testnet",
"ROPSTEN": "ropsten",
"MORDOR": "mordor"
},
},
'openapi_types': {
'blockchain':
(str,),
'network':
(str,),
'address':
(str,),
'context':
(str,),
'limit':
(int,),
'offset':
(int,),
},
'attribute_map': {
'blockchain': 'blockchain',
'network': 'network',
'address': 'address',
'context': 'context',
'limit': 'limit',
'offset': 'offset',
},
'location_map': {
'blockchain': 'path',
'network': 'path',
'address': 'path',
'context': 'query',
'limit': 'query',
'offset': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
def get_address_details(
self,
blockchain,
network,
address,
**kwargs
):
"""Get Address Details # noqa: E501
Through this endpoint the customer can receive basic information about a given address based on confirmed/synced blocks only. In the case where there are any incoming or outgoing **unconfirmed** transactions for the specific address, they **will not** be counted or calculated here. Applies only for coins. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_address_details(blockchain, network, address, async_req=True)
>>> result = thread.get()
Args:
blockchain (str): Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network (str): Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
address (str): Represents the public address, which is a compressed and shortened form of a public key.
Keyword Args:
context (str): In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.. [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
GetAddressDetailsR
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['blockchain'] = \
blockchain
kwargs['network'] = \
network
kwargs['address'] = \
address
return self.get_address_details_endpoint.call_with_http_info(**kwargs)
def get_block_details_by_block_hash(
self,
blockchain,
network,
block_hash,
**kwargs
):
"""Get Block Details By Block Hash # noqa: E501
Through this endpoint customers can obtain basic information about a given mined block, specifically by using the `hash` parameter. These block details could include the hash of the specific, the previous and the next block, its transactions count, its height, etc. Blockchain specific data is information such as version, nonce, size, bits, merkleroot, etc. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_block_details_by_block_hash(blockchain, network, block_hash, async_req=True)
>>> result = thread.get()
Args:
blockchain (str): Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network (str): Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
block_hash (str): Represents the hash of the block, which is its unique identifier. It represents a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm.
Keyword Args:
context (str): In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.. [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
GetBlockDetailsByBlockHashR
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['blockchain'] = \
blockchain
kwargs['network'] = \
network
kwargs['block_hash'] = \
block_hash
return self.get_block_details_by_block_hash_endpoint.call_with_http_info(**kwargs)
def get_block_details_by_block_height(
self,
blockchain,
network,
height,
**kwargs
):
"""Get Block Details By Block Height # noqa: E501
Through this endpoint customers can obtain basic information about a given mined block, specifically by using the `height` parameter. These block details could include the hash of the specific, the previous and the next block, its transactions count, its height, etc. Blockchain specific data is information such as version, nonce, size, bits, merkleroot, etc. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_block_details_by_block_height(blockchain, network, height, async_req=True)
>>> result = thread.get()
Args:
blockchain (str): Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network (str): Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
height (int): Represents the number of blocks in the blockchain preceding this specific block. Block numbers have no gaps. A blockchain usually starts with block 0 called the \"Genesis block\".
Keyword Args:
context (str): In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.. [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
GetBlockDetailsByBlockHeightR
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['blockchain'] = \
blockchain
kwargs['network'] = \
network
kwargs['height'] = \
height
return self.get_block_details_by_block_height_endpoint.call_with_http_info(**kwargs)
def get_fee_recommendations(
self,
blockchain,
network,
**kwargs
):
"""Get Fee Recommendations # noqa: E501
Through this endpoint customers can obtain fee recommendations. Our fees recommendations are based on Mempool data which makes them much more accurate than fees based on already mined blocks. Calculations are done in real time live. Using this endpoint customers can get gas price for Ethereum, fee per byte for Bitcoin, etc. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_fee_recommendations(blockchain, network, async_req=True)
>>> result = thread.get()
Args:
blockchain (str): Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network (str): Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
Keyword Args:
context (str): In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.. [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
GetFeeRecommendationsR
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['blockchain'] = \
blockchain
kwargs['network'] = \
network
return self.get_fee_recommendations_endpoint.call_with_http_info(**kwargs)
def get_last_mined_block(
self,
blockchain,
network,
**kwargs
):
"""Get Last Mined Block # noqa: E501
Through this endpoint customers can fetch the last mined block in a specific blockchain network, along with its details. These could include the hash of the specific, the previous and the next block, its transactions count, its height, etc. Blockchain specific data is information such as version, nonce, size, bits, merkleroot, etc. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_last_mined_block(blockchain, network, async_req=True)
>>> result = thread.get()
Args:
blockchain (str): Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network (str): Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
Keyword Args:
context (str): In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.. [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
GetLastMinedBlockR
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['blockchain'] = \
blockchain
kwargs['network'] = \
network
return self.get_last_mined_block_endpoint.call_with_http_info(**kwargs)
def get_transaction_details_by_transaction_id(
self,
blockchain,
network,
transaction_id,
**kwargs
):
"""Get Transaction Details By Transaction ID # noqa: E501
Through this endpoint customers can obtain details about a transaction by the transaction's unique identifier. In UTXO-based protocols like BTC there are attributes such as `transactionId` and transaction `hash`. They still could be different. In protocols like Ethereum there is only one unique value and it's `hash`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_transaction_details_by_transaction_id(blockchain, network, transaction_id, async_req=True)
>>> result = thread.get()
Args:
blockchain (str): Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network (str): Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
transaction_id (str): Represents the unique identifier of a transaction, i.e. it could be `transactionId` in UTXO-based protocols like Bitcoin, and transaction `hash` in Ethereum blockchain.
Keyword Args:
context (str): In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.. [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
GetTransactionDetailsByTransactionIDR
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['blockchain'] = \
blockchain
kwargs['network'] = \
network
kwargs['transaction_id'] = \
transaction_id
return self.get_transaction_details_by_transaction_id_endpoint.call_with_http_info(**kwargs)
def list_all_unconfirmed_transactions(
self,
blockchain,
network,
**kwargs
):
"""List All Unconfirmed Transactions # noqa: E501
Through this endpoint customers can list all **unconfirmed** transactions for a specified blockchain and network. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_all_unconfirmed_transactions(blockchain, network, async_req=True)
>>> result = thread.get()
Args:
blockchain (str): Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network (str): Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
Keyword Args:
context (str): In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.. [optional]
limit (int): Defines how many items should be returned in the response per page basis.. [optional] if omitted the server will use the default value of 50
offset (int): The starting index of the response items, i.e. where the response should start listing the returned items.. [optional] if omitted the server will use the default value of 0
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
ListAllUnconfirmedTransactionsR
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['blockchain'] = \
blockchain
kwargs['network'] = \
network
return self.list_all_unconfirmed_transactions_endpoint.call_with_http_info(**kwargs)
def list_confirmed_transactions_by_address(
self,
blockchain,
network,
address,
**kwargs
):
"""List Confirmed Transactions By Address # noqa: E501
This endpoint will list transactions by an attribute `address`. The transactions listed will detail additional information such as hash, height, time of creation in Unix timestamp, etc. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_confirmed_transactions_by_address(blockchain, network, address, async_req=True)
>>> result = thread.get()
Args:
blockchain (str): Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network (str): Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
address (str): Represents the public address, which is a compressed and shortened form of a public key.
Keyword Args:
context (str): In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.. [optional]
limit (int): Defines how many items should be returned in the response per page basis.. [optional] if omitted the server will use the default value of 50
offset (int): The starting index of the response items, i.e. where the response should start listing the returned items.. [optional] if omitted the server will use the default value of 0
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
ListConfirmedTransactionsByAddressR
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['blockchain'] = \
blockchain
kwargs['network'] = \
network
kwargs['address'] = \
address
return self.list_confirmed_transactions_by_address_endpoint.call_with_http_info(**kwargs)
def list_latest_mined_blocks(
self,
network,
blockchain,
count,
**kwargs
):
"""List Latest Mined Blocks # noqa: E501
Through this endpoint customers can list **up to 50** from the latest blocks that were mined. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_latest_mined_blocks(network, blockchain, count, async_req=True)
>>> result = thread.get()
Args:
network (str): Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks
blockchain (str): Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
count (int): Specifies how many records were requested.
Keyword Args:
context (str): In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.. [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
ListLatestMinedBlocksR
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['network'] = \
network
kwargs['blockchain'] = \
blockchain
kwargs['count'] = \
count
return self.list_latest_mined_blocks_endpoint.call_with_http_info(**kwargs)
def list_transactions_by_block_hash(
self,
blockchain,
network,
block_hash,
**kwargs
):
"""List Transactions by Block Hash # noqa: E501
This endpoint will list transactions by an attribute `transactionHash`. The transactions listed will detail additional information such as addresses, height, time of creation in Unix timestamp, etc. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_transactions_by_block_hash(blockchain, network, block_hash, async_req=True)
>>> result = thread.get()
Args:
blockchain (str): Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network (str): Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
block_hash (str): Represents the hash of the block, which is its unique identifier. It represents a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm.
Keyword Args:
context (str): In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.. [optional]
limit (int): Defines how many items should be returned in the response per page basis.. [optional] if omitted the server will use the default value of 50
offset (int): The starting index of the response items, i.e. where the response should start listing the returned items.. [optional] if omitted the server will use the default value of 0
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
ListTransactionsByBlockHashR
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['blockchain'] = \
blockchain
kwargs['network'] = \
network
kwargs['block_hash'] = \
block_hash
return self.list_transactions_by_block_hash_endpoint.call_with_http_info(**kwargs)
def list_transactions_by_block_height(
self,
blockchain,
network,
height,
**kwargs
):
"""List Transactions by Block Height # noqa: E501
This endpoint will list transactions by an attribute `blockHeight`. The transactions listed will detail additional information such as hash, addresses, time of creation in Unix timestamp, etc. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_transactions_by_block_height(blockchain, network, height, async_req=True)
>>> result = thread.get()
Args:
blockchain (str): Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network (str): Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
height (int): Represents the number of blocks in the blockchain preceding this specific block. Block numbers have no gaps. A blockchain usually starts with block 0 called the \"Genesis block\".
Keyword Args:
context (str): In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.. [optional]
limit (int): Defines how many items should be returned in the response per page basis.. [optional] if omitted the server will use the default value of 50
offset (int): The starting index of the response items, i.e. where the response should start listing the returned items.. [optional] if omitted the server will use the default value of 0
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
ListTransactionsByBlockHeightR
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['blockchain'] = \
blockchain
kwargs['network'] = \
network
kwargs['height'] = \
height
return self.list_transactions_by_block_height_endpoint.call_with_http_info(**kwargs)
def list_unconfirmed_transactions_by_address(
self,
blockchain,
network,
address,
**kwargs
):
"""List Unconfirmed Transactions by Address # noqa: E501
Through this endpoint customers can list transactions by `address` that are **unconfirmed**. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_unconfirmed_transactions_by_address(blockchain, network, address, async_req=True)
>>> result = thread.get()
Args:
blockchain (str): Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network (str): Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
address (str): Represents the public address, which is a compressed and shortened form of a public key.
Keyword Args:
context (str): In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.. [optional]
limit (int): Defines how many items should be returned in the response per page basis.. [optional] if omitted the server will use the default value of 50
offset (int): The starting index of the response items, i.e. where the response should start listing the returned items.. [optional] if omitted the server will use the default value of 0
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
ListUnconfirmedTransactionsByAddressR
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['blockchain'] = \
blockchain
kwargs['network'] = \
network
kwargs['address'] = \
address
return self.list_unconfirmed_transactions_by_address_endpoint.call_with_http_info(**kwargs)
| 42.704082
| 484
| 0.514945
| 8,247
| 92,070
| 5.586153
| 0.059779
| 0.019927
| 0.023921
| 0.02442
| 0.838156
| 0.820487
| 0.808787
| 0.800538
| 0.774621
| 0.765569
| 0
| 0.009585
| 0.399403
| 92,070
| 2,155
| 485
| 42.723898
| 0.823535
| 0.364038
| 0
| 0.744082
| 0
| 0
| 0.233386
| 0.034729
| 0
| 0
| 0
| 0
| 0
| 1
| 0.008317
| false
| 0
| 0.039028
| 0
| 0.055662
| 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
|
6e61986199cea39f158bd8be59e6773d5f58be23
| 8,979
|
py
|
Python
|
serve_tiny_performance_mdrnn.py
|
cpmpercussion/robojam
|
8f9524be0ad850bdfc0c3459b0e4b677f5f70a84
|
[
"MIT"
] | 10
|
2017-11-18T04:01:03.000Z
|
2022-03-06T21:07:09.000Z
|
serve_tiny_performance_mdrnn.py
|
cpmpercussion/robojam
|
8f9524be0ad850bdfc0c3459b0e4b677f5f70a84
|
[
"MIT"
] | 17
|
2018-06-12T20:54:40.000Z
|
2022-02-09T23:27:24.000Z
|
serve_tiny_performance_mdrnn.py
|
cpmpercussion/robojam
|
8f9524be0ad850bdfc0c3459b0e4b677f5f70a84
|
[
"MIT"
] | 2
|
2017-12-05T23:39:42.000Z
|
2018-06-13T13:46:33.000Z
|
#!/usr/bin/env python3
"""A flask server for Robojam"""
import json
import time
from io import StringIO
import pandas as pd
import tensorflow as tf
import robojam
from tensorflow.compat.v1.keras import backend as K
from flask import Flask, request
from flask_cors import CORS
# Start server.
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.INFO) # set logging.
app = Flask(__name__)
cors = CORS(app)
compute_graph = tf.compat.v1.Graph()
with compute_graph.as_default():
sess = tf.compat.v1.Session()
# Network hyper-parameters:
N_MIX = 5
N_LAYERS = 2
N_UNITS = 512
TEMP = 1.5
SIG_TEMP = 0.01
# MODEL_FILE = 'models/robojam-td-model-E12-VL-4.57.hdf5'
MODEL_FILE = 'models/robojam-metatone-layers2-units512-mixtures5-scale10-E30-VL-5.65.hdf5'
@app.route("/api/predict", methods=['POST'])
def reaction():
"""Produces a Reaction Performance using the MDRNN."""
tf.compat.v1.logging.info("Responding to a prediction request.")
start = time.time()
data = request.data.decode("utf-8")
if data == "":
params = request.form
input_perf = json.loads(params['perf'])
else:
tf.compat.v1.logging.info("Perf in data as string.")
params = json.loads(data)
input_perf = params['perf']
input_perf_df = pd.read_csv(StringIO(input_perf), parse_dates=False)
input_perf_array = robojam.perf_df_to_array(input_perf_df)
# Run the response prediction:
K.set_session(sess)
with compute_graph.as_default():
net.reset_states() # reset LSTM state.
out_perf = robojam.condition_and_generate(net, input_perf_array, N_MIX, temp=TEMP, sigma_temp=SIG_TEMP) # predict
out_df = robojam.perf_array_to_df(out_perf)
out_df.at[out_df[:1].index, 'moving'] = 0 # set first touch to a tap
out_perf_string = out_df.to_csv()
json_data = json.dumps({'response': out_perf_string})
tf.compat.v1.logging.info("Completed request, time was: %f" % (time.time() - start))
return json_data
if __name__ == "__main__":
"""Start a TinyPerformance MDRNN Server"""
tf.compat.v1.logging.info("Starting RoboJam Server.")
K.set_session(sess)
with compute_graph.as_default():
net = robojam.load_robojam_inference_model(model_file=MODEL_FILE, layers=N_LAYERS, units=N_UNITS, mixtures=N_MIX)
app.run(host='0.0.0.0', ssl_context=('keys/cert.pem', 'keys/key.pem'))
# Command line tests.
# curl -i -k -X POST -H "Content-Type:application/json" https://127.0.0.1:5000/api/predict -d '{"perf":"time,x,y,z,moving\n0.005213, 0.711230, 0.070856, 25.524292, 0\n0.097298, 0.719251, 0.062834, 25.524292, 1\n0.126225, 0.719251, 0.057487, 25.524292, 1\n0.194616, 0.707219, 0.045455, 38.290771, 1\n0.212923, 0.704545, 0.045455, 38.290771, 1\n0.343579, 0.703209, 0.108289, 38.290771, 1\n0.495085, 0.701872, 0.070856, 38.290771, 1\n0.523921, 0.693850, 0.061497, 38.290771, 1\n0.712066, 0.711230, 0.155080, 38.290771, 1\n0.730294, 0.717914, 0.155080, 38.290771, 1\n0.896367, 0.696524, 0.041444, 38.290771, 1\n1.083786, 0.696524, 0.151070, 38.290771, 1\n1.301470, 0.684492, 0.049465, 38.290771, 1\n1.328134, 0.680481, 0.053476, 38.290771, 1\n1.504139, 0.705882, 0.136364, 38.290771, 1\n1.527875, 0.712567, 0.120321, 38.290771, 1\n1.702672, 0.675134, 0.076203, 38.290771, 1\n1.719294, 0.675134, 0.096257, 38.290771, 1\n1.901434, 0.715241, 0.145722, 38.290771, 1\n1.922717, 0.717914, 0.136364, 38.290771, 1\n2.062994, 0.684492, 0.109626, 38.290771, 1\n2.091680, 0.680481, 0.129679, 38.290771, 1\n2.231362, 0.697861, 0.207219, 38.290771, 1\n2.393213, 0.712567, 0.124332, 38.290771, 1\n2.525774, 0.632353, 0.149733, 38.290771, 1\n2.546701, 0.625668, 0.169786, 38.290771, 1\n2.686487, 0.585561, 0.360963, 38.290771, 1\n2.715316, 0.580214, 0.387701, 38.290771, 1\n2.867526, 0.490642, 0.633690, 38.290771, 1\n2.880361, 0.481283, 0.645722, 38.290771, 1\n3.054443, 0.319519, 0.689840, 38.290771, 1\n3.218741, 0.121658, 0.585561, 38.290771, 1\n3.230362, 0.102941, 0.557487, 38.290771, 1\n3.391456, 0.089572, 0.534759, 38.290771, 1"}'
# curl -i -k -X POST -H "Content-Type:application/json" https://138.197.179.234:5000/api/predict -d '{"perf":"time,x,y,z,moving\n0.005213, 0.711230, 0.070856, 25.524292, 0\n0.097298, 0.719251, 0.062834, 25.524292, 1\n0.126225, 0.719251, 0.057487, 25.524292, 1\n0.194616, 0.707219, 0.045455, 38.290771, 1\n0.212923, 0.704545, 0.045455, 38.290771, 1\n0.343579, 0.703209, 0.108289, 38.290771, 1\n0.495085, 0.701872, 0.070856, 38.290771, 1\n0.523921, 0.693850, 0.061497, 38.290771, 1\n0.712066, 0.711230, 0.155080, 38.290771, 1\n0.730294, 0.717914, 0.155080, 38.290771, 1\n0.896367, 0.696524, 0.041444, 38.290771, 1\n1.083786, 0.696524, 0.151070, 38.290771, 1\n1.301470, 0.684492, 0.049465, 38.290771, 1\n1.328134, 0.680481, 0.053476, 38.290771, 1\n1.504139, 0.705882, 0.136364, 38.290771, 1\n1.527875, 0.712567, 0.120321, 38.290771, 1\n1.702672, 0.675134, 0.076203, 38.290771, 1\n1.719294, 0.675134, 0.096257, 38.290771, 1\n1.901434, 0.715241, 0.145722, 38.290771, 1\n1.922717, 0.717914, 0.136364, 38.290771, 1\n2.062994, 0.684492, 0.109626, 38.290771, 1\n2.091680, 0.680481, 0.129679, 38.290771, 1\n2.231362, 0.697861, 0.207219, 38.290771, 1\n2.393213, 0.712567, 0.124332, 38.290771, 1\n2.525774, 0.632353, 0.149733, 38.290771, 1\n2.546701, 0.625668, 0.169786, 38.290771, 1\n2.686487, 0.585561, 0.360963, 38.290771, 1\n2.715316, 0.580214, 0.387701, 38.290771, 1\n2.867526, 0.490642, 0.633690, 38.290771, 1\n2.880361, 0.481283, 0.645722, 38.290771, 1\n3.054443, 0.319519, 0.689840, 38.290771, 1\n3.218741, 0.121658, 0.585561, 38.290771, 1\n3.230362, 0.102941, 0.557487, 38.290771, 1\n3.391456, 0.089572, 0.534759, 38.290771, 1"}'
# curl -i -k -X POST -H "Content-Type:application/json" https://138.197.179.234:5000/api/predict -d '{"perf":"time,x,y,z,moving\n0.002468, 0.106414, 0.122449, 20.000000, 0\n0.020841, 0.106414, 0.125364, 20.000000, 1\n0.043218, 0.107872, 0.137026, 20.000000, 1\n0.065484, 0.107872, 0.176385, 20.000000, 1\n0.090776, 0.107872, 0.231778, 20.000000, 1\n0.110590, 0.109329, 0.301749, 20.000000, 1\n0.133338, 0.115160, 0.357143, 20.000000, 1\n0.155677, 0.125364, 0.412536, 20.000000, 1\n0.178238, 0.134111, 0.432945, 20.000000, 1\n0.516467, 0.275510, 0.180758, 20.000000, 0\n0.542726, 0.274052, 0.205539, 20.000000, 1\n0.560772, 0.274052, 0.249271, 20.000000, 1\n0.583259, 0.282799, 0.316327, 20.000000, 1\n0.605750, 0.295918, 0.376093, 20.000000, 1\n0.628259, 0.309038, 0.415452, 20.000000, 1\n0.653835, 0.316327, 0.432945, 20.000000, 1\n0.673523, 0.325073, 0.440233, 20.000000, 1\n1.000294, 0.590379, 0.179300, 20.000000, 0\n1.022137, 0.593294, 0.183673, 20.000000, 1\n1.044706, 0.594752, 0.208455, 20.000000, 1\n1.067020, 0.606414, 0.279883, 20.000000, 1\n1.091137, 0.626822, 0.355685, 20.000000, 1\n1.111968, 0.647230, 0.425656, 20.000000, 1\n1.134535, 0.655977, 0.462099, 20.000000, 1\n1.156987, 0.657434, 0.485423, 20.000000, 1\n1.619212, 0.857143, 0.263848, 20.000000, 0\n1.642492, 0.854227, 0.281341, 20.000000, 1\n1.663123, 0.851312, 0.320700, 20.000000, 1\n1.685776, 0.846939, 0.413994, 20.000000, 1\n1.708192, 0.846939, 0.510204, 20.000000, 1\n1.730717, 0.858601, 0.591837, 20.000000, 1\n1.753953, 0.868805, 0.632653, 20.000000, 1\n1.775862, 0.876093, 0.660350, 20.000000, 1\n4.376275, 0.542274, 0.860058, 20.000000, 0\n4.419554, 0.543732, 0.860058, 20.000000, 1"}'
# curl -i -k -X POST -H "Content-Type:application/json" https://0.0.0.0:5000/api/predict -d '{"perf":"time,x,y,z,moving\n0.002468, 0.106414, 0.122449, 20.000000, 0\n0.020841, 0.106414, 0.125364, 20.000000, 1\n0.043218, 0.107872, 0.137026, 20.000000, 1\n0.065484, 0.107872, 0.176385, 20.000000, 1\n0.090776, 0.107872, 0.231778, 20.000000, 1\n0.110590, 0.109329, 0.301749, 20.000000, 1\n0.133338, 0.115160, 0.357143, 20.000000, 1\n0.155677, 0.125364, 0.412536, 20.000000, 1\n0.178238, 0.134111, 0.432945, 20.000000, 1\n0.516467, 0.275510, 0.180758, 20.000000, 0\n0.542726, 0.274052, 0.205539, 20.000000, 1\n0.560772, 0.274052, 0.249271, 20.000000, 1\n0.583259, 0.282799, 0.316327, 20.000000, 1\n0.605750, 0.295918, 0.376093, 20.000000, 1\n0.628259, 0.309038, 0.415452, 20.000000, 1\n0.653835, 0.316327, 0.432945, 20.000000, 1\n0.673523, 0.325073, 0.440233, 20.000000, 1\n1.000294, 0.590379, 0.179300, 20.000000, 0\n1.022137, 0.593294, 0.183673, 20.000000, 1\n1.044706, 0.594752, 0.208455, 20.000000, 1\n1.067020, 0.606414, 0.279883, 20.000000, 1\n1.091137, 0.626822, 0.355685, 20.000000, 1\n1.111968, 0.647230, 0.425656, 20.000000, 1\n1.134535, 0.655977, 0.462099, 20.000000, 1\n1.156987, 0.657434, 0.485423, 20.000000, 1\n1.619212, 0.857143, 0.263848, 20.000000, 0\n1.642492, 0.854227, 0.281341, 20.000000, 1\n1.663123, 0.851312, 0.320700, 20.000000, 1\n1.685776, 0.846939, 0.413994, 20.000000, 1\n1.708192, 0.846939, 0.510204, 20.000000, 1\n1.730717, 0.858601, 0.591837, 20.000000, 1\n1.753953, 0.868805, 0.632653, 20.000000, 1\n1.775862, 0.876093, 0.660350, 20.000000, 1\n4.376275, 0.542274, 0.860058, 20.000000, 0\n4.419554, 0.543732, 0.860058, 20.000000, 1"}'
| 121.337838
| 1,670
| 0.702639
| 1,711
| 8,979
| 3.642899
| 0.209234
| 0.089844
| 0.089524
| 0.049414
| 0.777635
| 0.752126
| 0.752126
| 0.752126
| 0.752126
| 0.752126
| 0
| 0.529831
| 0.109589
| 8,979
| 73
| 1,671
| 123
| 0.249781
| 0.766232
| 0
| 0.098039
| 0
| 0.019608
| 0.133301
| 0.036891
| 0
| 0
| 0
| 0
| 0
| 1
| 0.019608
| false
| 0
| 0.176471
| 0
| 0.215686
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 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
| 9
|
42cb33c39eef7cfef0c1bffc6049d2b0b685ecd4
| 2,879
|
py
|
Python
|
src/metrics/metrics.py
|
koonn/bunseki
|
deb397e40a02bb709825c70c9be81f54449ac195
|
[
"BSD-3-Clause"
] | null | null | null |
src/metrics/metrics.py
|
koonn/bunseki
|
deb397e40a02bb709825c70c9be81f54449ac195
|
[
"BSD-3-Clause"
] | null | null | null |
src/metrics/metrics.py
|
koonn/bunseki
|
deb397e40a02bb709825c70c9be81f54449ac195
|
[
"BSD-3-Clause"
] | null | null | null |
"""精度評価指標を計算するモジュール
y_trueと、y_pred_probaから精度評価指標を計算するための関数群
"""
import sklearn.metrics as skm
import numpy as np
def auc(y_true, y_pred_proba):
"""AUCを計算する関数
Args:
y_true(1-D array-like shape of [n_samples, ]): 2値の目的ラベルの配列(ラベルは0または1)
y_pred_proba(1-D array-like shape of [n_samples, ]): 陽性(ラベルが1)である確率の予測値の配列
Returns:
float: (ROCの)AUCの値
"""
return skm.roc_auc_score(y_true, y_pred_proba)
def average_precision(y_true, y_pred_proba):
"""平均Precisionを計算する関数
Args:
y_true(1-D array-like shape of [n_samples, ]): 2値の目的ラベルの配列(ラベルは0または1)
y_pred_proba(1-D array-like shape of [n_samples, ]): 陽性(ラベルが1)である確率の予測値の配列
Returns:
float: 平均Precisionの値
"""
return skm.average_precision_score(y_true, y_pred_proba)
def acc(y_true, y_pred_proba, threshold=0.5):
"""Accuracyを計算する関数
Args:
y_true(1-D array-like shape of [n_samples, ]): 2値の目的ラベルの配列(ラベルは0または1)
y_pred_proba(1-D array-like shape of [n_samples, ]): 陽性(ラベルが1)である確率の予測値の配列
threshold(float, default=0.5): 陽性と分類する確率の閾値. 陽性(ラベルが1)である確率の予測値がthreshold以上なら1に変換する
Returns:
float: Accuracyの値
"""
# 予測確率を2値ラベルに変換する
y_pred_label = np.where(y_pred_proba >= threshold, 1, 0)
return skm.accuracy_score(y_true, y_pred_label)
def precision(y_true, y_pred_proba, threshold=0.5):
"""Accuracyを計算する関数
Args:
y_true(1-D array-like shape of [n_samples, ]): 2値の目的ラベルの配列(ラベルは0または1)
y_pred_proba(1-D array-like shape of [n_samples, ]): 陽性(ラベルが1)である確率の予測値の配列
threshold(float, default=0.5): 陽性と分類する確率の閾値. 陽性(ラベルが1)である確率の予測値がthreshold以上なら1に変換する
Returns:
float: Accuracyの値
"""
# 予測確率を2値ラベルに変換する
y_pred_label = np.where(y_pred_proba >= threshold, 1, 0)
return skm.precision_score(y_true, y_pred_label)
def recall(y_true, y_pred_proba, threshold=0.5):
"""Accuracyを計算する関数
Args:
y_true(1-D array-like shape of [n_samples, ]): 2値の目的ラベルの配列(ラベルは0または1)
y_pred_proba(1-D array-like shape of [n_samples, ]): 陽性(ラベルが1)である確率の予測値の配列
threshold(float, default=0.5): 陽性と分類する確率の閾値. 陽性(ラベルが1)である確率の予測値がthreshold以上なら1に変換する
Returns:
float: Accuracyの値
"""
# 予測確率を2値ラベルに変換する
y_pred_label = np.where(y_pred_proba >= threshold, 1, 0)
return skm.recall_score(y_true, y_pred_label)
def f1_score(y_true, y_pred_proba, threshold=0.5):
"""Accuracyを計算する関数
Args:
y_true(1-D array-like shape of [n_samples, ]): 2値の目的ラベルの配列(ラベルは0または1)
y_pred_proba(1-D array-like shape of [n_samples, ]): 陽性(ラベルが1)である確率の予測値の配列
threshold(float, default=0.5): 陽性と分類する確率の閾値. 陽性(ラベルが1)である確率の予測値がthreshold以上なら1に変換する
Returns:
float: Accuracyの値
"""
# 予測確率を2値ラベルに変換する
y_pred_label = np.where(y_pred_proba >= threshold, 1, 0)
return skm.f1_score(y_true, y_pred_label)
| 27.951456
| 91
| 0.688086
| 398
| 2,879
| 4.738693
| 0.143216
| 0.07158
| 0.09544
| 0.063627
| 0.889714
| 0.88176
| 0.839343
| 0.778367
| 0.778367
| 0.778367
| 0
| 0.032216
| 0.202154
| 2,879
| 102
| 92
| 28.22549
| 0.788855
| 0.598819
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.111111
| 0
| 0.777778
| 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
| 1
| 0
|
0
| 8
|
6e25342e23a32ed5b961b03bb3584a54058a2d5c
| 156
|
py
|
Python
|
tests/test_get_filesize.py
|
zevaverbach/zev
|
7330718f4eee28695fe57fb1107e506e6b0c9e4e
|
[
"MIT"
] | null | null | null |
tests/test_get_filesize.py
|
zevaverbach/zev
|
7330718f4eee28695fe57fb1107e506e6b0c9e4e
|
[
"MIT"
] | 1
|
2019-07-20T09:26:46.000Z
|
2019-07-20T09:26:46.000Z
|
tests/test_get_filesize.py
|
zevaverbach/zev
|
7330718f4eee28695fe57fb1107e506e6b0c9e4e
|
[
"MIT"
] | null | null | null |
from pytest import fixture
from zev.get_filesize import get_filesize
def test_get_filesize(empty_filepath):
assert get_filesize(empty_filepath) == 0
| 19.5
| 44
| 0.814103
| 23
| 156
| 5.217391
| 0.565217
| 0.366667
| 0.266667
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007407
| 0.134615
| 156
| 7
| 45
| 22.285714
| 0.881481
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0.25
| false
| 0
| 0.5
| 0
| 0.75
| 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
|
284f52f9892227b12c3c28dae697a2873a90c1e7
| 34
|
py
|
Python
|
my_script.py
|
jeroenpijpker/easy_CD_tutorial
|
2827508a7060c74ff937d7820c5b0f5cdfa4d6a4
|
[
"MIT"
] | null | null | null |
my_script.py
|
jeroenpijpker/easy_CD_tutorial
|
2827508a7060c74ff937d7820c5b0f5cdfa4d6a4
|
[
"MIT"
] | null | null | null |
my_script.py
|
jeroenpijpker/easy_CD_tutorial
|
2827508a7060c74ff937d7820c5b0f5cdfa4d6a4
|
[
"MIT"
] | null | null | null |
print("x")
print("x")
print("x")
| 6.8
| 10
| 0.529412
| 6
| 34
| 3
| 0.333333
| 1
| 1.222222
| 1.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 34
| 4
| 11
| 8.5
| 0.6
| 0
| 0
| 1
| 0
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 9
|
2856b66bfd0e689f82a8cb47b06e0b491d804f30
| 3,555
|
py
|
Python
|
tests/test_random.py
|
xadrnd/display_sdk_ios
|
f8a140d1cf3d1e8f63b915caf8c723d771dac13f
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_random.py
|
xadrnd/display_sdk_ios
|
f8a140d1cf3d1e8f63b915caf8c723d771dac13f
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_random.py
|
xadrnd/display_sdk_ios
|
f8a140d1cf3d1e8f63b915caf8c723d771dac13f
|
[
"BSD-3-Clause"
] | null | null | null |
from test_base import DisplaySDKTest
from utils import *
class RandomTest(DisplaySDKTest):
def test_banner_random(self):
click_btn(self, "All Errors")
for i in range(10):
click_load_ad_btn(self, "Banner")
accept_location(self)
webview = block_until_webview(self)
# switch to web view
print("Switching to webview")
self.driver.switch_to.context(webview)
# inspect inside html
#print(self.driver.)
# switch back to native view
print("Switching to native view")
self.driver.switch_to.context(self.driver.contexts[0])
# get web view
webview = self.driver.find_elements_by_ios_predicate('wdType == "XCUIElementTypeWebView"')
# if web view then click
if len(webview) > 0:
click_on_webview(self)
sleep(5)
try:
click_btn(self, "OK")
except:
pass
try:
click_btn(self, "Cancel")
except:
pass
# nagivate back
try:
click_back_btn(self)
except:
pass
def test_banner_random_large(self):
click_btn(self, "All Errors")
for i in range(10):
click_load_ad_btn(self, "Banner", "300x250")
accept_location(self)
webview = block_until_webview(self)
# switch to web view
print("Switching to webview")
self.driver.switch_to.context(webview)
# inspect inside html
#print(self.driver.)
# switch back to native view
print("Switching to native view")
self.driver.switch_to.context(self.driver.contexts[0])
# get web view
webview = self.driver.find_elements_by_ios_predicate('wdType == "XCUIElementTypeWebView"')
# if web view then click
if len(webview) > 0:
click_on_webview(self)
sleep(5)
try:
click_btn(self, "OK")
except:
pass
try:
click_btn(self, "Cancel")
except:
pass
# nagivate back
try:
click_back_btn(self)
except:
pass
def test_interstitial_random(self):
for i in range(10):
click_load_ad_btn(self, "Interstitial")
accept_location(self)
block_until_webview(self)
# switch to web view
"""
self.driver.switch_to.context(webview)
sleep(1)
# inspect inside html
#print(self.driver.
# switch back to native view
self.driver.switch_to.context(self.driver.contexts[0])
"""
sleep(1)
# find close button
close_btn = self.driver.find_elements_by_ios_predicate('wdType == "XCUIElementTypeButton"')[0]
close_btn.click()
sleep(1)
def test_video_random(self):
for i in range(10):
click_load_ad_btn(self, "Video")
accept_location(self)
# TODO Assert video player appeared
# TODO Poll until video is done
# TODO Close video
| 25.76087
| 106
| 0.501547
| 361
| 3,555
| 4.756233
| 0.216066
| 0.087362
| 0.083867
| 0.0629
| 0.802563
| 0.802563
| 0.783925
| 0.783925
| 0.738497
| 0.738497
| 0
| 0.012177
| 0.422504
| 3,555
| 138
| 107
| 25.76087
| 0.82416
| 0.108861
| 0
| 0.794118
| 0
| 0
| 0.090594
| 0.024644
| 0
| 0
| 0
| 0.007246
| 0
| 1
| 0.058824
| false
| 0.088235
| 0.029412
| 0
| 0.102941
| 0.058824
| 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
|
28738d283bf4868349454e25d748bec7dc9a9c6f
| 33,650
|
py
|
Python
|
sdk/python/pulumi_gcp/dataloss/prevention_deidentify_template.py
|
sisisin/pulumi-gcp
|
af6681d70ea457843409110c1324817fe55f68ad
|
[
"ECL-2.0",
"Apache-2.0"
] | 121
|
2018-06-18T19:16:42.000Z
|
2022-03-31T06:06:48.000Z
|
sdk/python/pulumi_gcp/dataloss/prevention_deidentify_template.py
|
sisisin/pulumi-gcp
|
af6681d70ea457843409110c1324817fe55f68ad
|
[
"ECL-2.0",
"Apache-2.0"
] | 492
|
2018-06-22T19:41:03.000Z
|
2022-03-31T15:33:53.000Z
|
sdk/python/pulumi_gcp/dataloss/prevention_deidentify_template.py
|
sisisin/pulumi-gcp
|
af6681d70ea457843409110c1324817fe55f68ad
|
[
"ECL-2.0",
"Apache-2.0"
] | 43
|
2018-06-19T01:43:13.000Z
|
2022-03-23T22:43:37.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *
__all__ = ['PreventionDeidentifyTemplateArgs', 'PreventionDeidentifyTemplate']
@pulumi.input_type
class PreventionDeidentifyTemplateArgs:
def __init__(__self__, *,
deidentify_config: pulumi.Input['PreventionDeidentifyTemplateDeidentifyConfigArgs'],
parent: pulumi.Input[str],
description: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a PreventionDeidentifyTemplate resource.
:param pulumi.Input['PreventionDeidentifyTemplateDeidentifyConfigArgs'] deidentify_config: Configuration of the deidentify template
Structure is documented below.
:param pulumi.Input[str] parent: The parent of the template in any of the following formats:
* `projects/{{project}}`
* `projects/{{project}}/locations/{{location}}`
* `organizations/{{organization_id}}`
* `organizations/{{organization_id}}/locations/{{location}}`
:param pulumi.Input[str] description: A description of the template.
:param pulumi.Input[str] display_name: User set display name of the template.
"""
pulumi.set(__self__, "deidentify_config", deidentify_config)
pulumi.set(__self__, "parent", parent)
if description is not None:
pulumi.set(__self__, "description", description)
if display_name is not None:
pulumi.set(__self__, "display_name", display_name)
@property
@pulumi.getter(name="deidentifyConfig")
def deidentify_config(self) -> pulumi.Input['PreventionDeidentifyTemplateDeidentifyConfigArgs']:
"""
Configuration of the deidentify template
Structure is documented below.
"""
return pulumi.get(self, "deidentify_config")
@deidentify_config.setter
def deidentify_config(self, value: pulumi.Input['PreventionDeidentifyTemplateDeidentifyConfigArgs']):
pulumi.set(self, "deidentify_config", value)
@property
@pulumi.getter
def parent(self) -> pulumi.Input[str]:
"""
The parent of the template in any of the following formats:
* `projects/{{project}}`
* `projects/{{project}}/locations/{{location}}`
* `organizations/{{organization_id}}`
* `organizations/{{organization_id}}/locations/{{location}}`
"""
return pulumi.get(self, "parent")
@parent.setter
def parent(self, value: pulumi.Input[str]):
pulumi.set(self, "parent", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
A description of the template.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter(name="displayName")
def display_name(self) -> Optional[pulumi.Input[str]]:
"""
User set display name of the template.
"""
return pulumi.get(self, "display_name")
@display_name.setter
def display_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "display_name", value)
@pulumi.input_type
class _PreventionDeidentifyTemplateState:
def __init__(__self__, *,
deidentify_config: Optional[pulumi.Input['PreventionDeidentifyTemplateDeidentifyConfigArgs']] = None,
description: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
parent: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering PreventionDeidentifyTemplate resources.
:param pulumi.Input['PreventionDeidentifyTemplateDeidentifyConfigArgs'] deidentify_config: Configuration of the deidentify template
Structure is documented below.
:param pulumi.Input[str] description: A description of the template.
:param pulumi.Input[str] display_name: User set display name of the template.
:param pulumi.Input[str] name: Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at [https://cloud.google.com/dlp/docs/infotypes-reference](https://cloud.google.com/dlp/docs/infotypes-reference) when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
:param pulumi.Input[str] parent: The parent of the template in any of the following formats:
* `projects/{{project}}`
* `projects/{{project}}/locations/{{location}}`
* `organizations/{{organization_id}}`
* `organizations/{{organization_id}}/locations/{{location}}`
"""
if deidentify_config is not None:
pulumi.set(__self__, "deidentify_config", deidentify_config)
if description is not None:
pulumi.set(__self__, "description", description)
if display_name is not None:
pulumi.set(__self__, "display_name", display_name)
if name is not None:
pulumi.set(__self__, "name", name)
if parent is not None:
pulumi.set(__self__, "parent", parent)
@property
@pulumi.getter(name="deidentifyConfig")
def deidentify_config(self) -> Optional[pulumi.Input['PreventionDeidentifyTemplateDeidentifyConfigArgs']]:
"""
Configuration of the deidentify template
Structure is documented below.
"""
return pulumi.get(self, "deidentify_config")
@deidentify_config.setter
def deidentify_config(self, value: Optional[pulumi.Input['PreventionDeidentifyTemplateDeidentifyConfigArgs']]):
pulumi.set(self, "deidentify_config", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
A description of the template.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter(name="displayName")
def display_name(self) -> Optional[pulumi.Input[str]]:
"""
User set display name of the template.
"""
return pulumi.get(self, "display_name")
@display_name.setter
def display_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "display_name", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at [https://cloud.google.com/dlp/docs/infotypes-reference](https://cloud.google.com/dlp/docs/infotypes-reference) when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def parent(self) -> Optional[pulumi.Input[str]]:
"""
The parent of the template in any of the following formats:
* `projects/{{project}}`
* `projects/{{project}}/locations/{{location}}`
* `organizations/{{organization_id}}`
* `organizations/{{organization_id}}/locations/{{location}}`
"""
return pulumi.get(self, "parent")
@parent.setter
def parent(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "parent", value)
class PreventionDeidentifyTemplate(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
deidentify_config: Optional[pulumi.Input[pulumi.InputType['PreventionDeidentifyTemplateDeidentifyConfigArgs']]] = None,
description: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
parent: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Allows creation of templates to de-identify content.
To get more information about DeidentifyTemplate, see:
* [API documentation](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.deidentifyTemplates)
* How-to Guides
* [Official Documentation](https://cloud.google.com/dlp/docs/concepts-templates)
## Example Usage
### Dlp Deidentify Template Basic
```python
import pulumi
import pulumi_gcp as gcp
basic = gcp.dataloss.PreventionDeidentifyTemplate("basic",
deidentify_config=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigArgs(
info_type_transformations=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsArgs(
transformations=[
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationArgs(
info_types=[gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="FIRST_NAME",
)],
primitive_transformation=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationArgs(
replace_with_info_type_config=True,
),
),
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationArgs(
info_types=[
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="PHONE_NUMBER",
),
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="AGE",
),
],
primitive_transformation=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationArgs(
replace_config=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationReplaceConfigArgs(
new_value=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationReplaceConfigNewValueArgs(
integer_value=9,
),
),
),
),
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationArgs(
info_types=[
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="EMAIL_ADDRESS",
),
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="LAST_NAME",
),
],
primitive_transformation=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationArgs(
character_mask_config=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationCharacterMaskConfigArgs(
characters_to_ignore=[{
"commonCharactersToIgnore": "PUNCTUATION",
}],
masking_character="X",
number_to_mask=4,
reverse_order=True,
),
),
),
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationArgs(
info_types=[gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="DATE_OF_BIRTH",
)],
primitive_transformation=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationArgs(
replace_config=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationReplaceConfigArgs(
new_value=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationReplaceConfigNewValueArgs(
date_value=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationReplaceConfigNewValueDateValueArgs(
day=1,
month=1,
year=2020,
),
),
),
),
),
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationArgs(
info_types=[gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="CREDIT_CARD_NUMBER",
)],
primitive_transformation=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationArgs(
crypto_deterministic_config=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationCryptoDeterministicConfigArgs(
context=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationCryptoDeterministicConfigContextArgs(
name="sometweak",
),
crypto_key=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationCryptoDeterministicConfigCryptoKeyArgs(
transient=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationCryptoDeterministicConfigCryptoKeyTransientArgs(
name="beep",
),
),
surrogate_info_type=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationCryptoDeterministicConfigSurrogateInfoTypeArgs(
name="abc",
),
),
),
),
],
),
),
description="Description",
display_name="Displayname",
parent="projects/my-project-name")
```
## Import
DeidentifyTemplate can be imported using any of these accepted formats
```sh
$ pulumi import gcp:dataloss/preventionDeidentifyTemplate:PreventionDeidentifyTemplate default {{parent}}/deidentifyTemplates/{{name}}
```
```sh
$ pulumi import gcp:dataloss/preventionDeidentifyTemplate:PreventionDeidentifyTemplate default {{parent}}/{{name}}
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['PreventionDeidentifyTemplateDeidentifyConfigArgs']] deidentify_config: Configuration of the deidentify template
Structure is documented below.
:param pulumi.Input[str] description: A description of the template.
:param pulumi.Input[str] display_name: User set display name of the template.
:param pulumi.Input[str] parent: The parent of the template in any of the following formats:
* `projects/{{project}}`
* `projects/{{project}}/locations/{{location}}`
* `organizations/{{organization_id}}`
* `organizations/{{organization_id}}/locations/{{location}}`
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: PreventionDeidentifyTemplateArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Allows creation of templates to de-identify content.
To get more information about DeidentifyTemplate, see:
* [API documentation](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.deidentifyTemplates)
* How-to Guides
* [Official Documentation](https://cloud.google.com/dlp/docs/concepts-templates)
## Example Usage
### Dlp Deidentify Template Basic
```python
import pulumi
import pulumi_gcp as gcp
basic = gcp.dataloss.PreventionDeidentifyTemplate("basic",
deidentify_config=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigArgs(
info_type_transformations=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsArgs(
transformations=[
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationArgs(
info_types=[gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="FIRST_NAME",
)],
primitive_transformation=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationArgs(
replace_with_info_type_config=True,
),
),
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationArgs(
info_types=[
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="PHONE_NUMBER",
),
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="AGE",
),
],
primitive_transformation=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationArgs(
replace_config=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationReplaceConfigArgs(
new_value=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationReplaceConfigNewValueArgs(
integer_value=9,
),
),
),
),
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationArgs(
info_types=[
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="EMAIL_ADDRESS",
),
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="LAST_NAME",
),
],
primitive_transformation=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationArgs(
character_mask_config=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationCharacterMaskConfigArgs(
characters_to_ignore=[{
"commonCharactersToIgnore": "PUNCTUATION",
}],
masking_character="X",
number_to_mask=4,
reverse_order=True,
),
),
),
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationArgs(
info_types=[gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="DATE_OF_BIRTH",
)],
primitive_transformation=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationArgs(
replace_config=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationReplaceConfigArgs(
new_value=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationReplaceConfigNewValueArgs(
date_value=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationReplaceConfigNewValueDateValueArgs(
day=1,
month=1,
year=2020,
),
),
),
),
),
gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationArgs(
info_types=[gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationInfoTypeArgs(
name="CREDIT_CARD_NUMBER",
)],
primitive_transformation=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationArgs(
crypto_deterministic_config=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationCryptoDeterministicConfigArgs(
context=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationCryptoDeterministicConfigContextArgs(
name="sometweak",
),
crypto_key=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationCryptoDeterministicConfigCryptoKeyArgs(
transient=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationCryptoDeterministicConfigCryptoKeyTransientArgs(
name="beep",
),
),
surrogate_info_type=gcp.dataloss.PreventionDeidentifyTemplateDeidentifyConfigInfoTypeTransformationsTransformationPrimitiveTransformationCryptoDeterministicConfigSurrogateInfoTypeArgs(
name="abc",
),
),
),
),
],
),
),
description="Description",
display_name="Displayname",
parent="projects/my-project-name")
```
## Import
DeidentifyTemplate can be imported using any of these accepted formats
```sh
$ pulumi import gcp:dataloss/preventionDeidentifyTemplate:PreventionDeidentifyTemplate default {{parent}}/deidentifyTemplates/{{name}}
```
```sh
$ pulumi import gcp:dataloss/preventionDeidentifyTemplate:PreventionDeidentifyTemplate default {{parent}}/{{name}}
```
:param str resource_name: The name of the resource.
:param PreventionDeidentifyTemplateArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(PreventionDeidentifyTemplateArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
deidentify_config: Optional[pulumi.Input[pulumi.InputType['PreventionDeidentifyTemplateDeidentifyConfigArgs']]] = None,
description: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
parent: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = PreventionDeidentifyTemplateArgs.__new__(PreventionDeidentifyTemplateArgs)
if deidentify_config is None and not opts.urn:
raise TypeError("Missing required property 'deidentify_config'")
__props__.__dict__["deidentify_config"] = deidentify_config
__props__.__dict__["description"] = description
__props__.__dict__["display_name"] = display_name
if parent is None and not opts.urn:
raise TypeError("Missing required property 'parent'")
__props__.__dict__["parent"] = parent
__props__.__dict__["name"] = None
super(PreventionDeidentifyTemplate, __self__).__init__(
'gcp:dataloss/preventionDeidentifyTemplate:PreventionDeidentifyTemplate',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
deidentify_config: Optional[pulumi.Input[pulumi.InputType['PreventionDeidentifyTemplateDeidentifyConfigArgs']]] = None,
description: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
parent: Optional[pulumi.Input[str]] = None) -> 'PreventionDeidentifyTemplate':
"""
Get an existing PreventionDeidentifyTemplate resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['PreventionDeidentifyTemplateDeidentifyConfigArgs']] deidentify_config: Configuration of the deidentify template
Structure is documented below.
:param pulumi.Input[str] description: A description of the template.
:param pulumi.Input[str] display_name: User set display name of the template.
:param pulumi.Input[str] name: Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at [https://cloud.google.com/dlp/docs/infotypes-reference](https://cloud.google.com/dlp/docs/infotypes-reference) when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
:param pulumi.Input[str] parent: The parent of the template in any of the following formats:
* `projects/{{project}}`
* `projects/{{project}}/locations/{{location}}`
* `organizations/{{organization_id}}`
* `organizations/{{organization_id}}/locations/{{location}}`
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _PreventionDeidentifyTemplateState.__new__(_PreventionDeidentifyTemplateState)
__props__.__dict__["deidentify_config"] = deidentify_config
__props__.__dict__["description"] = description
__props__.__dict__["display_name"] = display_name
__props__.__dict__["name"] = name
__props__.__dict__["parent"] = parent
return PreventionDeidentifyTemplate(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="deidentifyConfig")
def deidentify_config(self) -> pulumi.Output['outputs.PreventionDeidentifyTemplateDeidentifyConfig']:
"""
Configuration of the deidentify template
Structure is documented below.
"""
return pulumi.get(self, "deidentify_config")
@property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
"""
A description of the template.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter(name="displayName")
def display_name(self) -> pulumi.Output[Optional[str]]:
"""
User set display name of the template.
"""
return pulumi.get(self, "display_name")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at [https://cloud.google.com/dlp/docs/infotypes-reference](https://cloud.google.com/dlp/docs/infotypes-reference) when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter
def parent(self) -> pulumi.Output[str]:
"""
The parent of the template in any of the following formats:
* `projects/{{project}}`
* `projects/{{project}}/locations/{{location}}`
* `organizations/{{organization_id}}`
* `organizations/{{organization_id}}/locations/{{location}}`
"""
return pulumi.get(self, "parent")
| 56.841216
| 422
| 0.624101
| 2,370
| 33,650
| 8.677637
| 0.114768
| 0.035836
| 0.031995
| 0.029952
| 0.889235
| 0.875523
| 0.868035
| 0.854323
| 0.849703
| 0.842361
| 0
| 0.001658
| 0.300832
| 33,650
| 591
| 423
| 56.937394
| 0.872487
| 0.633076
| 0
| 0.618557
| 1
| 0
| 0.144527
| 0.066418
| 0
| 0
| 0
| 0
| 0
| 1
| 0.154639
| false
| 0.005155
| 0.036082
| 0
| 0.283505
| 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
|
2876ee5a4ee75e47b6a9d9c1abc057001acf18bc
| 1,114
|
py
|
Python
|
FEniCSUI/AnalysesHub/models.py
|
nasserarbabi/FEniCSUI-dev
|
f8f161e1b49932843e01301212e7d031fff4f6c8
|
[
"MIT"
] | null | null | null |
FEniCSUI/AnalysesHub/models.py
|
nasserarbabi/FEniCSUI-dev
|
f8f161e1b49932843e01301212e7d031fff4f6c8
|
[
"MIT"
] | 8
|
2021-03-10T21:59:52.000Z
|
2021-09-22T19:12:57.000Z
|
FEniCSUI/AnalysesHub/models.py
|
nasserarbabi/FEniCSUI
|
f8f161e1b49932843e01301212e7d031fff4f6c8
|
[
"MIT"
] | null | null | null |
from django.db import models
from dashboard.models import projects
class AnalysisConfig(models.Model):
project = models.OneToOneField(
projects,
on_delete=models.CASCADE,
primary_key=True)
mesh = models.TextField()
visualizationMesh = models.TextField()
config = models.TextField()
result = models.TextField()
def __str__(self):
return self.project.name
class SolverResults(models.Model):
project = models.OneToOneField(
projects,
on_delete=models.CASCADE,
primary_key=True)
path = models.TextField()
def __str__(self):
return self.project.name
class SolverProgress(models.Model):
project = models.OneToOneField(
projects,
on_delete=models.CASCADE,
primary_key=True)
progress = models.TextField()
def __str__(self):
return self.project.name
class DockerLogs(models.Model):
project = models.OneToOneField(
projects,
on_delete=models.CASCADE,
primary_key=True)
log = models.TextField()
def __str__(self):
return self.project.name
| 23.208333
| 42
| 0.672352
| 119
| 1,114
| 6.092437
| 0.285714
| 0.144828
| 0.09931
| 0.132414
| 0.715862
| 0.715862
| 0.715862
| 0.715862
| 0.715862
| 0.652414
| 0
| 0
| 0.236086
| 1,114
| 48
| 43
| 23.208333
| 0.851939
| 0
| 0
| 0.648649
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.108108
| false
| 0
| 0.054054
| 0.108108
| 0.675676
| 0
| 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
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 7
|
95a45f4832007319ba41671ba4a21dd2a62ab0fc
| 202
|
py
|
Python
|
models/__init__.py
|
mikuh/bert-tf2-keras
|
e361a0e7dc9fa0d64c48ac41320d302599dba025
|
[
"MIT"
] | 4
|
2020-06-21T15:48:40.000Z
|
2022-01-24T05:10:59.000Z
|
models/__init__.py
|
mikuh/bert-tf2-keras
|
e361a0e7dc9fa0d64c48ac41320d302599dba025
|
[
"MIT"
] | null | null | null |
models/__init__.py
|
mikuh/bert-tf2-keras
|
e361a0e7dc9fa0d64c48ac41320d302599dba025
|
[
"MIT"
] | 3
|
2020-07-20T07:11:27.000Z
|
2022-01-24T05:11:21.000Z
|
from models.base_model import BaseModel
from models.classifier import BertClassifier
from models.sequence_labeling import BertSequenceLabeling
from models.sequence_embedding import BertSequenceEmbedding
| 50.5
| 59
| 0.905941
| 23
| 202
| 7.826087
| 0.565217
| 0.222222
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074257
| 202
| 4
| 59
| 50.5
| 0.962567
| 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
|
255fc1c3062c1fbdf6dc873744212e8248b03800
| 190,066
|
py
|
Python
|
openshift/client/apis/build_openshift_io_v1_api.py
|
asetty/openshift-restclient-python
|
c6f2168d7a02a24c030fb67959919fd4a9eb260d
|
[
"Apache-2.0"
] | null | null | null |
openshift/client/apis/build_openshift_io_v1_api.py
|
asetty/openshift-restclient-python
|
c6f2168d7a02a24c030fb67959919fd4a9eb260d
|
[
"Apache-2.0"
] | null | null | null |
openshift/client/apis/build_openshift_io_v1_api.py
|
asetty/openshift-restclient-python
|
c6f2168d7a02a24c030fb67959919fd4a9eb260d
|
[
"Apache-2.0"
] | null | null | null |
# coding: utf-8
"""
OpenShift API (with Kubernetes)
OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is provided for service accounts as a generated secret (in JWT form) or via the native OAuth endpoint located at /oauth/authorize. Core infrastructure components may use client certificates that require no authentication. All API operations return a 'resourceVersion' string that represents the version of the object in the underlying storage. The standard LIST operation performs a snapshot read of the underlying objects, returning a resourceVersion representing a consistent version of the listed objects. The WATCH operation allows all updates to a set of objects after the provided resourceVersion to be observed by a client. By listing and beginning a watch from the returned resourceVersion, clients may observe a consistent view of the state of one or more objects. Note that WATCH always returns the update after the provided resourceVersion. Watch may be extended a limited time in the past - using etcd 2 the watch window is 1000 events (which on a large cluster may only be a few tens of seconds) so clients must explicitly handle the \"watch to old error\" by re-listing. Objects are divided into two rough categories - those that have a lifecycle and must reflect the state of the cluster, and those that have no state. Objects with lifecycle typically have three main sections: * 'metadata' common to all objects * a 'spec' that represents the desired state * a 'status' that represents how much of the desired state is reflected on the cluster at the current time Objects that have no state have 'metadata' but may lack a 'spec' or 'status' section. Objects are divided into those that are namespace scoped (only exist inside of a namespace) and those that are cluster scoped (exist outside of a namespace). A namespace scoped resource will be deleted when the namespace is deleted and cannot be created if the namespace has not yet been created or is in the process of deletion. Cluster scoped resources are typically only accessible to admins - resources like nodes, persistent volumes, and cluster policy. All objects have a schema that is a combination of the 'kind' and 'apiVersion' fields. This schema is additive only for any given version - no backwards incompatible changes are allowed without incrementing the apiVersion. The server will return and accept a number of standard responses that share a common schema - for instance, the common error type is 'metav1.Status' (described below) and will be returned on any error from the API server. The API is available in multiple serialization formats - the default is JSON (Accept: application/json and Content-Type: application/json) but clients may also use YAML (application/yaml) or the native Protobuf schema (application/vnd.kubernetes.protobuf). Note that the format of the WATCH API call is slightly different - for JSON it returns newline delimited objects while for Protobuf it returns length-delimited frames (4 bytes in network-order) that contain a 'versioned.Watch' Protobuf object. See the OpenShift documentation at https://docs.openshift.org for more information.
OpenAPI spec version: latest
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from six import iteritems
from ..api_client import ApiClient
class BuildOpenshiftIoV1Api(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):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def connect_post_namespaced_build_config_instantiatebinary(self, name, namespace, **kwargs):
"""
connect POST requests to instantiatebinary of BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.connect_post_namespaced_build_config_instantiatebinary(name, namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BinaryBuildRequestOptions (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str as_file: asFile determines if the binary should be created as a file within the source rather than extracted as an archive
:param str revision_author_email: revision.authorEmail of the source control user
:param str revision_author_name: revision.authorName of the source control user
:param str revision_commit: revision.commit is the value identifying a specific commit
:param str revision_committer_email: revision.committerEmail of the source control user
:param str revision_committer_name: revision.committerName of the source control user
:param str revision_message: revision.message is the description of a specific commit
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.connect_post_namespaced_build_config_instantiatebinary_with_http_info(name, namespace, **kwargs)
else:
(data) = self.connect_post_namespaced_build_config_instantiatebinary_with_http_info(name, namespace, **kwargs)
return data
def connect_post_namespaced_build_config_instantiatebinary_with_http_info(self, name, namespace, **kwargs):
"""
connect POST requests to instantiatebinary of BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.connect_post_namespaced_build_config_instantiatebinary_with_http_info(name, namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BinaryBuildRequestOptions (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str as_file: asFile determines if the binary should be created as a file within the source rather than extracted as an archive
:param str revision_author_email: revision.authorEmail of the source control user
:param str revision_author_name: revision.authorName of the source control user
:param str revision_commit: revision.commit is the value identifying a specific commit
:param str revision_committer_email: revision.committerEmail of the source control user
:param str revision_committer_name: revision.committerName of the source control user
:param str revision_message: revision.message is the description of a specific commit
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'as_file', 'revision_author_email', 'revision_author_name', 'revision_commit', 'revision_committer_email', 'revision_committer_name', 'revision_message']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 connect_post_namespaced_build_config_instantiatebinary" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `connect_post_namespaced_build_config_instantiatebinary`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_build_config_instantiatebinary`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'as_file' in params:
query_params.append(('asFile', params['as_file']))
if 'revision_author_email' in params:
query_params.append(('revision.authorEmail', params['revision_author_email']))
if 'revision_author_name' in params:
query_params.append(('revision.authorName', params['revision_author_name']))
if 'revision_commit' in params:
query_params.append(('revision.commit', params['revision_commit']))
if 'revision_committer_email' in params:
query_params.append(('revision.committerEmail', params['revision_committer_email']))
if 'revision_committer_name' in params:
query_params.append(('revision.committerName', params['revision_committer_name']))
if 'revision_message' in params:
query_params.append(('revision.message', params['revision_message']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['*/*'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs/{name}/instantiatebinary', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Build',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def connect_post_namespaced_build_config_webhooks(self, name, namespace, **kwargs):
"""
connect POST requests to webhooks of BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.connect_post_namespaced_build_config_webhooks(name, namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str path: Path is the URL path to use for the current proxy request to pod.
:return: str
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.connect_post_namespaced_build_config_webhooks_with_http_info(name, namespace, **kwargs)
else:
(data) = self.connect_post_namespaced_build_config_webhooks_with_http_info(name, namespace, **kwargs)
return data
def connect_post_namespaced_build_config_webhooks_with_http_info(self, name, namespace, **kwargs):
"""
connect POST requests to webhooks of BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.connect_post_namespaced_build_config_webhooks_with_http_info(name, namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str path: Path is the URL path to use for the current proxy request to pod.
:return: str
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'path']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 connect_post_namespaced_build_config_webhooks" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `connect_post_namespaced_build_config_webhooks`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_build_config_webhooks`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'path' in params:
query_params.append(('path', params['path']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['*/*'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs/{name}/webhooks', '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,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def connect_post_namespaced_build_config_webhooks_with_path(self, name, namespace, path, **kwargs):
"""
connect POST requests to webhooks of BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.connect_post_namespaced_build_config_webhooks_with_path(name, namespace, path, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str path: path to the resource (required)
:param str path2: Path is the URL path to use for the current proxy request to pod.
:return: str
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.connect_post_namespaced_build_config_webhooks_with_path_with_http_info(name, namespace, path, **kwargs)
else:
(data) = self.connect_post_namespaced_build_config_webhooks_with_path_with_http_info(name, namespace, path, **kwargs)
return data
def connect_post_namespaced_build_config_webhooks_with_path_with_http_info(self, name, namespace, path, **kwargs):
"""
connect POST requests to webhooks of BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.connect_post_namespaced_build_config_webhooks_with_path_with_http_info(name, namespace, path, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str path: path to the resource (required)
:param str path2: Path is the URL path to use for the current proxy request to pod.
:return: str
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'path', 'path2']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 connect_post_namespaced_build_config_webhooks_with_path" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `connect_post_namespaced_build_config_webhooks_with_path`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_build_config_webhooks_with_path`")
# verify the required parameter 'path' is set
if ('path' not in params) or (params['path'] is None):
raise ValueError("Missing the required parameter `path` when calling `connect_post_namespaced_build_config_webhooks_with_path`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
if 'path' in params:
path_params['path'] = params['path']
query_params = []
if 'path2' in params:
query_params.append(('path', params['path2']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['*/*'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs/{name}/webhooks/{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,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def create_build_config_for_all_namespaces(self, body, **kwargs):
"""
create a BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_build_config_for_all_namespaces(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param V1BuildConfig body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1BuildConfig
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.create_build_config_for_all_namespaces_with_http_info(body, **kwargs)
else:
(data) = self.create_build_config_for_all_namespaces_with_http_info(body, **kwargs)
return data
def create_build_config_for_all_namespaces_with_http_info(self, body, **kwargs):
"""
create a BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_build_config_for_all_namespaces_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param V1BuildConfig body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1BuildConfig
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['body', 'pretty']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 create_build_config_for_all_namespaces" % key
)
params[key] = val
del params['kwargs']
# 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 `create_build_config_for_all_namespaces`")
collection_formats = {}
path_params = {}
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/buildconfigs', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1BuildConfig',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def create_build_for_all_namespaces(self, body, **kwargs):
"""
create a Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_build_for_all_namespaces(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param V1Build body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.create_build_for_all_namespaces_with_http_info(body, **kwargs)
else:
(data) = self.create_build_for_all_namespaces_with_http_info(body, **kwargs)
return data
def create_build_for_all_namespaces_with_http_info(self, body, **kwargs):
"""
create a Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_build_for_all_namespaces_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param V1Build body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['body', 'pretty']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 create_build_for_all_namespaces" % key
)
params[key] = val
del params['kwargs']
# 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 `create_build_for_all_namespaces`")
collection_formats = {}
path_params = {}
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/builds', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Build',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def create_namespaced_build(self, namespace, body, **kwargs):
"""
create a Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_namespaced_build(namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1Build body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.create_namespaced_build_with_http_info(namespace, body, **kwargs)
else:
(data) = self.create_namespaced_build_with_http_info(namespace, body, **kwargs)
return data
def create_namespaced_build_with_http_info(self, namespace, body, **kwargs):
"""
create a Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_namespaced_build_with_http_info(namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1Build body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['namespace', 'body', 'pretty']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 create_namespaced_build" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_build`")
# 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 `create_namespaced_build`")
collection_formats = {}
path_params = {}
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/builds', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Build',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def create_namespaced_build_clone(self, name, namespace, body, **kwargs):
"""
create clone of a Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_namespaced_build_clone(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildRequest (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1BuildRequest body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1BuildRequest
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.create_namespaced_build_clone_with_http_info(name, namespace, body, **kwargs)
else:
(data) = self.create_namespaced_build_clone_with_http_info(name, namespace, body, **kwargs)
return data
def create_namespaced_build_clone_with_http_info(self, name, namespace, body, **kwargs):
"""
create clone of a Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_namespaced_build_clone_with_http_info(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildRequest (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1BuildRequest body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1BuildRequest
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'body', 'pretty']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 create_namespaced_build_clone" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `create_namespaced_build_clone`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_build_clone`")
# 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 `create_namespaced_build_clone`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/builds/{name}/clone', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1BuildRequest',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def create_namespaced_build_config(self, namespace, body, **kwargs):
"""
create a BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_namespaced_build_config(namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1BuildConfig body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1BuildConfig
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.create_namespaced_build_config_with_http_info(namespace, body, **kwargs)
else:
(data) = self.create_namespaced_build_config_with_http_info(namespace, body, **kwargs)
return data
def create_namespaced_build_config_with_http_info(self, namespace, body, **kwargs):
"""
create a BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_namespaced_build_config_with_http_info(namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1BuildConfig body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1BuildConfig
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['namespace', 'body', 'pretty']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 create_namespaced_build_config" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_build_config`")
# 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 `create_namespaced_build_config`")
collection_formats = {}
path_params = {}
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1BuildConfig',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def create_namespaced_build_config_instantiate(self, name, namespace, body, **kwargs):
"""
create instantiate of a BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_namespaced_build_config_instantiate(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildRequest (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1BuildRequest body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.create_namespaced_build_config_instantiate_with_http_info(name, namespace, body, **kwargs)
else:
(data) = self.create_namespaced_build_config_instantiate_with_http_info(name, namespace, body, **kwargs)
return data
def create_namespaced_build_config_instantiate_with_http_info(self, name, namespace, body, **kwargs):
"""
create instantiate of a BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_namespaced_build_config_instantiate_with_http_info(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildRequest (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1BuildRequest body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'body', 'pretty']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 create_namespaced_build_config_instantiate" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `create_namespaced_build_config_instantiate`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_build_config_instantiate`")
# 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 `create_namespaced_build_config_instantiate`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs/{name}/instantiate', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Build',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_collection_namespaced_build(self, namespace, **kwargs):
"""
delete collection of Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_collection_namespaced_build(namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str pretty: If 'true', then the output is pretty printed.
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param bool include_uninitialized: If true, partially initialized resources are included in the response.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1Status
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_collection_namespaced_build_with_http_info(namespace, **kwargs)
else:
(data) = self.delete_collection_namespaced_build_with_http_info(namespace, **kwargs)
return data
def delete_collection_namespaced_build_with_http_info(self, namespace, **kwargs):
"""
delete collection of Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_collection_namespaced_build_with_http_info(namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str pretty: If 'true', then the output is pretty printed.
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param bool include_uninitialized: If true, partially initialized resources are included in the response.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1Status
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['namespace', 'pretty', '_continue', 'field_selector', 'include_uninitialized', 'label_selector', 'limit', 'resource_version', 'timeout_seconds', 'watch']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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_collection_namespaced_build" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_build`")
collection_formats = {}
path_params = {}
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
if '_continue' in params:
query_params.append(('continue', params['_continue']))
if 'field_selector' in params:
query_params.append(('fieldSelector', params['field_selector']))
if 'include_uninitialized' in params:
query_params.append(('includeUninitialized', params['include_uninitialized']))
if 'label_selector' in params:
query_params.append(('labelSelector', params['label_selector']))
if 'limit' in params:
query_params.append(('limit', params['limit']))
if 'resource_version' in params:
query_params.append(('resourceVersion', params['resource_version']))
if 'timeout_seconds' in params:
query_params.append(('timeoutSeconds', params['timeout_seconds']))
if 'watch' in params:
query_params.append(('watch', params['watch']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/builds', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Status',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_collection_namespaced_build_config(self, namespace, **kwargs):
"""
delete collection of BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_collection_namespaced_build_config(namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str pretty: If 'true', then the output is pretty printed.
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param bool include_uninitialized: If true, partially initialized resources are included in the response.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1Status
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_collection_namespaced_build_config_with_http_info(namespace, **kwargs)
else:
(data) = self.delete_collection_namespaced_build_config_with_http_info(namespace, **kwargs)
return data
def delete_collection_namespaced_build_config_with_http_info(self, namespace, **kwargs):
"""
delete collection of BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_collection_namespaced_build_config_with_http_info(namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str pretty: If 'true', then the output is pretty printed.
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param bool include_uninitialized: If true, partially initialized resources are included in the response.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1Status
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['namespace', 'pretty', '_continue', 'field_selector', 'include_uninitialized', 'label_selector', 'limit', 'resource_version', 'timeout_seconds', 'watch']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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_collection_namespaced_build_config" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_build_config`")
collection_formats = {}
path_params = {}
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
if '_continue' in params:
query_params.append(('continue', params['_continue']))
if 'field_selector' in params:
query_params.append(('fieldSelector', params['field_selector']))
if 'include_uninitialized' in params:
query_params.append(('includeUninitialized', params['include_uninitialized']))
if 'label_selector' in params:
query_params.append(('labelSelector', params['label_selector']))
if 'limit' in params:
query_params.append(('limit', params['limit']))
if 'resource_version' in params:
query_params.append(('resourceVersion', params['resource_version']))
if 'timeout_seconds' in params:
query_params.append(('timeoutSeconds', params['timeout_seconds']))
if 'watch' in params:
query_params.append(('watch', params['watch']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Status',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_namespaced_build(self, name, namespace, body, **kwargs):
"""
delete a Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_namespaced_build(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1DeleteOptions body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
:return: V1Status
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_namespaced_build_with_http_info(name, namespace, body, **kwargs)
else:
(data) = self.delete_namespaced_build_with_http_info(name, namespace, body, **kwargs)
return data
def delete_namespaced_build_with_http_info(self, name, namespace, body, **kwargs):
"""
delete a Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_namespaced_build_with_http_info(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1DeleteOptions body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
:return: V1Status
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents', 'propagation_policy']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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_namespaced_build" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_build`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_build`")
# 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 `delete_namespaced_build`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
if 'grace_period_seconds' in params:
query_params.append(('gracePeriodSeconds', params['grace_period_seconds']))
if 'orphan_dependents' in params:
query_params.append(('orphanDependents', params['orphan_dependents']))
if 'propagation_policy' in params:
query_params.append(('propagationPolicy', params['propagation_policy']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/builds/{name}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Status',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_namespaced_build_config(self, name, namespace, body, **kwargs):
"""
delete a BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_namespaced_build_config(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildConfig (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1DeleteOptions body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
:return: V1Status
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_namespaced_build_config_with_http_info(name, namespace, body, **kwargs)
else:
(data) = self.delete_namespaced_build_config_with_http_info(name, namespace, body, **kwargs)
return data
def delete_namespaced_build_config_with_http_info(self, name, namespace, body, **kwargs):
"""
delete a BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_namespaced_build_config_with_http_info(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildConfig (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1DeleteOptions body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
:param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
:param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
:return: V1Status
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'body', 'pretty', 'grace_period_seconds', 'orphan_dependents', 'propagation_policy']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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_namespaced_build_config" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_build_config`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_build_config`")
# 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 `delete_namespaced_build_config`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
if 'grace_period_seconds' in params:
query_params.append(('gracePeriodSeconds', params['grace_period_seconds']))
if 'orphan_dependents' in params:
query_params.append(('orphanDependents', params['orphan_dependents']))
if 'propagation_policy' in params:
query_params.append(('propagationPolicy', params['propagation_policy']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs/{name}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Status',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_api_resources(self, **kwargs):
"""
get available resources
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_api_resources(async_req=True)
>>> result = thread.get()
:param async_req bool
:return: V1APIResourceList
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_api_resources_with_http_info(**kwargs)
else:
(data) = self.get_api_resources_with_http_info(**kwargs)
return data
def get_api_resources_with_http_info(self, **kwargs):
"""
get available resources
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_api_resources_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:return: V1APIResourceList
If the method is called asynchronously,
returns the request thread.
"""
all_params = []
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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_api_resources" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1APIResourceList',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def list_build_config_for_all_namespaces(self, **kwargs):
"""
list or watch objects of kind BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_build_config_for_all_namespaces(async_req=True)
>>> result = thread.get()
:param async_req bool
:param str pretty: If 'true', then the output is pretty printed.
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param bool include_uninitialized: If true, partially initialized resources are included in the response.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1BuildConfigList
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.list_build_config_for_all_namespaces_with_http_info(**kwargs)
else:
(data) = self.list_build_config_for_all_namespaces_with_http_info(**kwargs)
return data
def list_build_config_for_all_namespaces_with_http_info(self, **kwargs):
"""
list or watch objects of kind BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_build_config_for_all_namespaces_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param str pretty: If 'true', then the output is pretty printed.
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param bool include_uninitialized: If true, partially initialized resources are included in the response.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1BuildConfigList
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['pretty', '_continue', 'field_selector', 'include_uninitialized', 'label_selector', 'limit', 'resource_version', 'timeout_seconds', 'watch']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 list_build_config_for_all_namespaces" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
if '_continue' in params:
query_params.append(('continue', params['_continue']))
if 'field_selector' in params:
query_params.append(('fieldSelector', params['field_selector']))
if 'include_uninitialized' in params:
query_params.append(('includeUninitialized', params['include_uninitialized']))
if 'label_selector' in params:
query_params.append(('labelSelector', params['label_selector']))
if 'limit' in params:
query_params.append(('limit', params['limit']))
if 'resource_version' in params:
query_params.append(('resourceVersion', params['resource_version']))
if 'timeout_seconds' in params:
query_params.append(('timeoutSeconds', params['timeout_seconds']))
if 'watch' in params:
query_params.append(('watch', params['watch']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/buildconfigs', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1BuildConfigList',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def list_build_for_all_namespaces(self, **kwargs):
"""
list or watch objects of kind Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_build_for_all_namespaces(async_req=True)
>>> result = thread.get()
:param async_req bool
:param str pretty: If 'true', then the output is pretty printed.
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param bool include_uninitialized: If true, partially initialized resources are included in the response.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1BuildList
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.list_build_for_all_namespaces_with_http_info(**kwargs)
else:
(data) = self.list_build_for_all_namespaces_with_http_info(**kwargs)
return data
def list_build_for_all_namespaces_with_http_info(self, **kwargs):
"""
list or watch objects of kind Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_build_for_all_namespaces_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param str pretty: If 'true', then the output is pretty printed.
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param bool include_uninitialized: If true, partially initialized resources are included in the response.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1BuildList
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['pretty', '_continue', 'field_selector', 'include_uninitialized', 'label_selector', 'limit', 'resource_version', 'timeout_seconds', 'watch']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 list_build_for_all_namespaces" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
if '_continue' in params:
query_params.append(('continue', params['_continue']))
if 'field_selector' in params:
query_params.append(('fieldSelector', params['field_selector']))
if 'include_uninitialized' in params:
query_params.append(('includeUninitialized', params['include_uninitialized']))
if 'label_selector' in params:
query_params.append(('labelSelector', params['label_selector']))
if 'limit' in params:
query_params.append(('limit', params['limit']))
if 'resource_version' in params:
query_params.append(('resourceVersion', params['resource_version']))
if 'timeout_seconds' in params:
query_params.append(('timeoutSeconds', params['timeout_seconds']))
if 'watch' in params:
query_params.append(('watch', params['watch']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/builds', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1BuildList',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def list_namespaced_build(self, namespace, **kwargs):
"""
list or watch objects of kind Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_namespaced_build(namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str pretty: If 'true', then the output is pretty printed.
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param bool include_uninitialized: If true, partially initialized resources are included in the response.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1BuildList
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.list_namespaced_build_with_http_info(namespace, **kwargs)
else:
(data) = self.list_namespaced_build_with_http_info(namespace, **kwargs)
return data
def list_namespaced_build_with_http_info(self, namespace, **kwargs):
"""
list or watch objects of kind Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_namespaced_build_with_http_info(namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str pretty: If 'true', then the output is pretty printed.
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param bool include_uninitialized: If true, partially initialized resources are included in the response.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1BuildList
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['namespace', 'pretty', '_continue', 'field_selector', 'include_uninitialized', 'label_selector', 'limit', 'resource_version', 'timeout_seconds', 'watch']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 list_namespaced_build" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_build`")
collection_formats = {}
path_params = {}
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
if '_continue' in params:
query_params.append(('continue', params['_continue']))
if 'field_selector' in params:
query_params.append(('fieldSelector', params['field_selector']))
if 'include_uninitialized' in params:
query_params.append(('includeUninitialized', params['include_uninitialized']))
if 'label_selector' in params:
query_params.append(('labelSelector', params['label_selector']))
if 'limit' in params:
query_params.append(('limit', params['limit']))
if 'resource_version' in params:
query_params.append(('resourceVersion', params['resource_version']))
if 'timeout_seconds' in params:
query_params.append(('timeoutSeconds', params['timeout_seconds']))
if 'watch' in params:
query_params.append(('watch', params['watch']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/builds', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1BuildList',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def list_namespaced_build_config(self, namespace, **kwargs):
"""
list or watch objects of kind BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_namespaced_build_config(namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str pretty: If 'true', then the output is pretty printed.
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param bool include_uninitialized: If true, partially initialized resources are included in the response.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1BuildConfigList
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.list_namespaced_build_config_with_http_info(namespace, **kwargs)
else:
(data) = self.list_namespaced_build_config_with_http_info(namespace, **kwargs)
return data
def list_namespaced_build_config_with_http_info(self, namespace, **kwargs):
"""
list or watch objects of kind BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_namespaced_build_config_with_http_info(namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str pretty: If 'true', then the output is pretty printed.
:param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
:param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
:param bool include_uninitialized: If true, partially initialized resources are included in the response.
:param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
:param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
:param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
:param int timeout_seconds: Timeout for the list/watch call.
:param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
:return: V1BuildConfigList
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['namespace', 'pretty', '_continue', 'field_selector', 'include_uninitialized', 'label_selector', 'limit', 'resource_version', 'timeout_seconds', 'watch']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 list_namespaced_build_config" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_build_config`")
collection_formats = {}
path_params = {}
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
if '_continue' in params:
query_params.append(('continue', params['_continue']))
if 'field_selector' in params:
query_params.append(('fieldSelector', params['field_selector']))
if 'include_uninitialized' in params:
query_params.append(('includeUninitialized', params['include_uninitialized']))
if 'label_selector' in params:
query_params.append(('labelSelector', params['label_selector']))
if 'limit' in params:
query_params.append(('limit', params['limit']))
if 'resource_version' in params:
query_params.append(('resourceVersion', params['resource_version']))
if 'timeout_seconds' in params:
query_params.append(('timeoutSeconds', params['timeout_seconds']))
if 'watch' in params:
query_params.append(('watch', params['watch']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1BuildConfigList',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def patch_namespaced_build(self, name, namespace, body, **kwargs):
"""
partially update the specified Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.patch_namespaced_build(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param object body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.patch_namespaced_build_with_http_info(name, namespace, body, **kwargs)
else:
(data) = self.patch_namespaced_build_with_http_info(name, namespace, body, **kwargs)
return data
def patch_namespaced_build_with_http_info(self, name, namespace, body, **kwargs):
"""
partially update the specified Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.patch_namespaced_build_with_http_info(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param object body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'body', 'pretty']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 patch_namespaced_build" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_build`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_build`")
# 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 `patch_namespaced_build`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/builds/{name}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Build',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def patch_namespaced_build_config(self, name, namespace, body, **kwargs):
"""
partially update the specified BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.patch_namespaced_build_config(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildConfig (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param object body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1BuildConfig
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.patch_namespaced_build_config_with_http_info(name, namespace, body, **kwargs)
else:
(data) = self.patch_namespaced_build_config_with_http_info(name, namespace, body, **kwargs)
return data
def patch_namespaced_build_config_with_http_info(self, name, namespace, body, **kwargs):
"""
partially update the specified BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.patch_namespaced_build_config_with_http_info(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildConfig (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param object body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1BuildConfig
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'body', 'pretty']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 patch_namespaced_build_config" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_build_config`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_build_config`")
# 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 `patch_namespaced_build_config`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs/{name}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1BuildConfig',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def read_namespaced_build(self, name, namespace, **kwargs):
"""
read the specified Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_namespaced_build(name, namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str pretty: If 'true', then the output is pretty printed.
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.read_namespaced_build_with_http_info(name, namespace, **kwargs)
else:
(data) = self.read_namespaced_build_with_http_info(name, namespace, **kwargs)
return data
def read_namespaced_build_with_http_info(self, name, namespace, **kwargs):
"""
read the specified Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_namespaced_build_with_http_info(name, namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str pretty: If 'true', then the output is pretty printed.
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 read_namespaced_build" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `read_namespaced_build`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_build`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
if 'exact' in params:
query_params.append(('exact', params['exact']))
if 'export' in params:
query_params.append(('export', params['export']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/builds/{name}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Build',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def read_namespaced_build_config(self, name, namespace, **kwargs):
"""
read the specified BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_namespaced_build_config(name, namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildConfig (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str pretty: If 'true', then the output is pretty printed.
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
:return: V1BuildConfig
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.read_namespaced_build_config_with_http_info(name, namespace, **kwargs)
else:
(data) = self.read_namespaced_build_config_with_http_info(name, namespace, **kwargs)
return data
def read_namespaced_build_config_with_http_info(self, name, namespace, **kwargs):
"""
read the specified BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_namespaced_build_config_with_http_info(name, namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildConfig (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str pretty: If 'true', then the output is pretty printed.
:param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.
:param bool export: Should this value be exported. Export strips fields that a user can not specify.
:return: V1BuildConfig
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 read_namespaced_build_config" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `read_namespaced_build_config`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_build_config`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
if 'exact' in params:
query_params.append(('exact', params['exact']))
if 'export' in params:
query_params.append(('export', params['export']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs/{name}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1BuildConfig',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def read_namespaced_build_log(self, name, namespace, **kwargs):
"""
read log of the specified Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_namespaced_build_log(name, namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildLog (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str container: cointainer for which to stream logs. Defaults to only container if there is one container in the pod.
:param bool follow: follow if true indicates that the build log should be streamed until the build terminates.
:param int limit_bytes: limitBytes, If set, is the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.
:param bool nowait: noWait if true causes the call to return immediately even if the build is not available yet. Otherwise the server will wait until the build has started.
:param str pretty: If 'true', then the output is pretty printed.
:param bool previous: previous returns previous build logs. Defaults to false.
:param int since_seconds: sinceSeconds is a relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.
:param int tail_lines: tailLines, If set, is the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime
:param bool timestamps: timestamps, If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.
:param int version: version of the build for which to view logs.
:return: V1BuildLog
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.read_namespaced_build_log_with_http_info(name, namespace, **kwargs)
else:
(data) = self.read_namespaced_build_log_with_http_info(name, namespace, **kwargs)
return data
def read_namespaced_build_log_with_http_info(self, name, namespace, **kwargs):
"""
read log of the specified Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_namespaced_build_log_with_http_info(name, namespace, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildLog (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param str container: cointainer for which to stream logs. Defaults to only container if there is one container in the pod.
:param bool follow: follow if true indicates that the build log should be streamed until the build terminates.
:param int limit_bytes: limitBytes, If set, is the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.
:param bool nowait: noWait if true causes the call to return immediately even if the build is not available yet. Otherwise the server will wait until the build has started.
:param str pretty: If 'true', then the output is pretty printed.
:param bool previous: previous returns previous build logs. Defaults to false.
:param int since_seconds: sinceSeconds is a relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.
:param int tail_lines: tailLines, If set, is the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime
:param bool timestamps: timestamps, If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.
:param int version: version of the build for which to view logs.
:return: V1BuildLog
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'container', 'follow', 'limit_bytes', 'nowait', 'pretty', 'previous', 'since_seconds', 'tail_lines', 'timestamps', 'version']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 read_namespaced_build_log" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `read_namespaced_build_log`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_build_log`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'container' in params:
query_params.append(('container', params['container']))
if 'follow' in params:
query_params.append(('follow', params['follow']))
if 'limit_bytes' in params:
query_params.append(('limitBytes', params['limit_bytes']))
if 'nowait' in params:
query_params.append(('nowait', params['nowait']))
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
if 'previous' in params:
query_params.append(('previous', params['previous']))
if 'since_seconds' in params:
query_params.append(('sinceSeconds', params['since_seconds']))
if 'tail_lines' in params:
query_params.append(('tailLines', params['tail_lines']))
if 'timestamps' in params:
query_params.append(('timestamps', params['timestamps']))
if 'version' in params:
query_params.append(('version', params['version']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/builds/{name}/log', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1BuildLog',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def replace_namespaced_build(self, name, namespace, body, **kwargs):
"""
replace the specified Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_namespaced_build(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1Build body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.replace_namespaced_build_with_http_info(name, namespace, body, **kwargs)
else:
(data) = self.replace_namespaced_build_with_http_info(name, namespace, body, **kwargs)
return data
def replace_namespaced_build_with_http_info(self, name, namespace, body, **kwargs):
"""
replace the specified Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_namespaced_build_with_http_info(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1Build body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'body', 'pretty']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 replace_namespaced_build" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_build`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_build`")
# 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 `replace_namespaced_build`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/builds/{name}', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Build',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def replace_namespaced_build_config(self, name, namespace, body, **kwargs):
"""
replace the specified BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_namespaced_build_config(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildConfig (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1BuildConfig body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1BuildConfig
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.replace_namespaced_build_config_with_http_info(name, namespace, body, **kwargs)
else:
(data) = self.replace_namespaced_build_config_with_http_info(name, namespace, body, **kwargs)
return data
def replace_namespaced_build_config_with_http_info(self, name, namespace, body, **kwargs):
"""
replace the specified BuildConfig
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_namespaced_build_config_with_http_info(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the BuildConfig (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1BuildConfig body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1BuildConfig
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'body', 'pretty']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 replace_namespaced_build_config" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_build_config`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_build_config`")
# 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 `replace_namespaced_build_config`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs/{name}', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1BuildConfig',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def replace_namespaced_build_details(self, name, namespace, body, **kwargs):
"""
replace details of the specified Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_namespaced_build_details(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1Build body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.replace_namespaced_build_details_with_http_info(name, namespace, body, **kwargs)
else:
(data) = self.replace_namespaced_build_details_with_http_info(name, namespace, body, **kwargs)
return data
def replace_namespaced_build_details_with_http_info(self, name, namespace, body, **kwargs):
"""
replace details of the specified Build
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_namespaced_build_details_with_http_info(name, namespace, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str name: name of the Build (required)
:param str namespace: object name and auth scope, such as for teams and projects (required)
:param V1Build body: (required)
:param str pretty: If 'true', then the output is pretty printed.
:return: V1Build
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['name', 'namespace', 'body', 'pretty']
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 replace_namespaced_build_details" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'name' is set
if ('name' not in params) or (params['name'] is None):
raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_build_details`")
# verify the required parameter 'namespace' is set
if ('namespace' not in params) or (params['namespace'] is None):
raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_build_details`")
# 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 `replace_namespaced_build_details`")
collection_formats = {}
path_params = {}
if 'name' in params:
path_params['name'] = params['name']
if 'namespace' in params:
path_params['namespace'] = params['namespace']
query_params = []
if 'pretty' in params:
query_params.append(('pretty', params['pretty']))
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', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['*/*'])
# Authentication setting
auth_settings = ['BearerToken', 'Oauth2AccessToken', 'Oauth2Implicit']
return self.api_client.call_api('/apis/build.openshift.io/v1/namespaces/{namespace}/builds/{name}/details', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1Build',
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
| 61.470246
| 3,325
| 0.643066
| 22,934
| 190,066
| 5.175111
| 0.026772
| 0.017525
| 0.018477
| 0.015773
| 0.965211
| 0.96297
| 0.961057
| 0.957628
| 0.955269
| 0.954097
| 0
| 0.001913
| 0.284848
| 190,066
| 3,091
| 3,326
| 61.490133
| 0.871253
| 0.452885
| 0
| 0.825378
| 0
| 0.000604
| 0.233174
| 0.080398
| 0
| 0
| 0
| 0
| 0
| 1
| 0.032024
| false
| 0
| 0.003625
| 0
| 0.083384
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
c29faa589f518d5f02ac893b18dc08fe8e171da1
| 19,174
|
py
|
Python
|
sdk/python/pulumiverse_astra/cdc.py
|
mapped/pulumi-astra
|
0d12cb616ed0eeb0d9e7dd9001b94f10bd4c3e8d
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumiverse_astra/cdc.py
|
mapped/pulumi-astra
|
0d12cb616ed0eeb0d9e7dd9001b94f10bd4c3e8d
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumiverse_astra/cdc.py
|
mapped/pulumi-astra
|
0d12cb616ed0eeb0d9e7dd9001b94f10bd4c3e8d
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
__all__ = ['CdcArgs', 'Cdc']
@pulumi.input_type
class CdcArgs:
def __init__(__self__, *,
database_id: pulumi.Input[str],
database_name: pulumi.Input[str],
keyspace: pulumi.Input[str],
table: pulumi.Input[str],
tenant_name: pulumi.Input[str],
topic_partitions: pulumi.Input[int]):
"""
The set of arguments for constructing a Cdc resource.
:param pulumi.Input[str] database_id: Astra database to create the keyspace.
:param pulumi.Input[str] database_name: Astra database name.
:param pulumi.Input[str] keyspace: Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.
:param pulumi.Input[str] table: Astra database table.
:param pulumi.Input[str] tenant_name: Streaming tenant name
:param pulumi.Input[int] topic_partitions: Number of partitions in cdc topic.
"""
pulumi.set(__self__, "database_id", database_id)
pulumi.set(__self__, "database_name", database_name)
pulumi.set(__self__, "keyspace", keyspace)
pulumi.set(__self__, "table", table)
pulumi.set(__self__, "tenant_name", tenant_name)
pulumi.set(__self__, "topic_partitions", topic_partitions)
@property
@pulumi.getter(name="databaseId")
def database_id(self) -> pulumi.Input[str]:
"""
Astra database to create the keyspace.
"""
return pulumi.get(self, "database_id")
@database_id.setter
def database_id(self, value: pulumi.Input[str]):
pulumi.set(self, "database_id", value)
@property
@pulumi.getter(name="databaseName")
def database_name(self) -> pulumi.Input[str]:
"""
Astra database name.
"""
return pulumi.get(self, "database_name")
@database_name.setter
def database_name(self, value: pulumi.Input[str]):
pulumi.set(self, "database_name", value)
@property
@pulumi.getter
def keyspace(self) -> pulumi.Input[str]:
"""
Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.
"""
return pulumi.get(self, "keyspace")
@keyspace.setter
def keyspace(self, value: pulumi.Input[str]):
pulumi.set(self, "keyspace", value)
@property
@pulumi.getter
def table(self) -> pulumi.Input[str]:
"""
Astra database table.
"""
return pulumi.get(self, "table")
@table.setter
def table(self, value: pulumi.Input[str]):
pulumi.set(self, "table", value)
@property
@pulumi.getter(name="tenantName")
def tenant_name(self) -> pulumi.Input[str]:
"""
Streaming tenant name
"""
return pulumi.get(self, "tenant_name")
@tenant_name.setter
def tenant_name(self, value: pulumi.Input[str]):
pulumi.set(self, "tenant_name", value)
@property
@pulumi.getter(name="topicPartitions")
def topic_partitions(self) -> pulumi.Input[int]:
"""
Number of partitions in cdc topic.
"""
return pulumi.get(self, "topic_partitions")
@topic_partitions.setter
def topic_partitions(self, value: pulumi.Input[int]):
pulumi.set(self, "topic_partitions", value)
@pulumi.input_type
class _CdcState:
def __init__(__self__, *,
connector_status: Optional[pulumi.Input[str]] = None,
data_topic: Optional[pulumi.Input[str]] = None,
database_id: Optional[pulumi.Input[str]] = None,
database_name: Optional[pulumi.Input[str]] = None,
keyspace: Optional[pulumi.Input[str]] = None,
table: Optional[pulumi.Input[str]] = None,
tenant_name: Optional[pulumi.Input[str]] = None,
topic_partitions: Optional[pulumi.Input[int]] = None):
"""
Input properties used for looking up and filtering Cdc resources.
:param pulumi.Input[str] connector_status: Streaming tenant name
:param pulumi.Input[str] data_topic: Streaming tenant name
:param pulumi.Input[str] database_id: Astra database to create the keyspace.
:param pulumi.Input[str] database_name: Astra database name.
:param pulumi.Input[str] keyspace: Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.
:param pulumi.Input[str] table: Astra database table.
:param pulumi.Input[str] tenant_name: Streaming tenant name
:param pulumi.Input[int] topic_partitions: Number of partitions in cdc topic.
"""
if connector_status is not None:
pulumi.set(__self__, "connector_status", connector_status)
if data_topic is not None:
pulumi.set(__self__, "data_topic", data_topic)
if database_id is not None:
pulumi.set(__self__, "database_id", database_id)
if database_name is not None:
pulumi.set(__self__, "database_name", database_name)
if keyspace is not None:
pulumi.set(__self__, "keyspace", keyspace)
if table is not None:
pulumi.set(__self__, "table", table)
if tenant_name is not None:
pulumi.set(__self__, "tenant_name", tenant_name)
if topic_partitions is not None:
pulumi.set(__self__, "topic_partitions", topic_partitions)
@property
@pulumi.getter(name="connectorStatus")
def connector_status(self) -> Optional[pulumi.Input[str]]:
"""
Streaming tenant name
"""
return pulumi.get(self, "connector_status")
@connector_status.setter
def connector_status(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "connector_status", value)
@property
@pulumi.getter(name="dataTopic")
def data_topic(self) -> Optional[pulumi.Input[str]]:
"""
Streaming tenant name
"""
return pulumi.get(self, "data_topic")
@data_topic.setter
def data_topic(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "data_topic", value)
@property
@pulumi.getter(name="databaseId")
def database_id(self) -> Optional[pulumi.Input[str]]:
"""
Astra database to create the keyspace.
"""
return pulumi.get(self, "database_id")
@database_id.setter
def database_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "database_id", value)
@property
@pulumi.getter(name="databaseName")
def database_name(self) -> Optional[pulumi.Input[str]]:
"""
Astra database name.
"""
return pulumi.get(self, "database_name")
@database_name.setter
def database_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "database_name", value)
@property
@pulumi.getter
def keyspace(self) -> Optional[pulumi.Input[str]]:
"""
Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.
"""
return pulumi.get(self, "keyspace")
@keyspace.setter
def keyspace(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "keyspace", value)
@property
@pulumi.getter
def table(self) -> Optional[pulumi.Input[str]]:
"""
Astra database table.
"""
return pulumi.get(self, "table")
@table.setter
def table(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "table", value)
@property
@pulumi.getter(name="tenantName")
def tenant_name(self) -> Optional[pulumi.Input[str]]:
"""
Streaming tenant name
"""
return pulumi.get(self, "tenant_name")
@tenant_name.setter
def tenant_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "tenant_name", value)
@property
@pulumi.getter(name="topicPartitions")
def topic_partitions(self) -> Optional[pulumi.Input[int]]:
"""
Number of partitions in cdc topic.
"""
return pulumi.get(self, "topic_partitions")
@topic_partitions.setter
def topic_partitions(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "topic_partitions", value)
class Cdc(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
database_id: Optional[pulumi.Input[str]] = None,
database_name: Optional[pulumi.Input[str]] = None,
keyspace: Optional[pulumi.Input[str]] = None,
table: Optional[pulumi.Input[str]] = None,
tenant_name: Optional[pulumi.Input[str]] = None,
topic_partitions: Optional[pulumi.Input[int]] = None,
__props__=None):
"""
`Cdc` enables cdc for an Astra Serverless table.
## Example Usage
```python
import pulumi
import pulumiverse_astra as astra
streaming_tenant_1 = astra.StreamingTenant("streamingTenant-1",
tenant_name="terraformtest",
topic="terraformtest",
region="useast-4",
cloud_provider="gcp",
user_email="seb@datastax.com")
cdc_1 = astra.Cdc("cdc-1",
database_id="5b70892f-e01a-4595-98e6-19ecc9985d50",
database_name="sai_test",
table="test",
keyspace="sai_test",
topic_partitions=3,
tenant_name=streaming_tenant_1.tenant_name,
opts=pulumi.ResourceOptions(depends_on=[streaming_tenant_1]))
```
## Import
```sh
$ pulumi import astra:index/cdc:Cdc example databaseId/keyspace/table/tenantName
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] database_id: Astra database to create the keyspace.
:param pulumi.Input[str] database_name: Astra database name.
:param pulumi.Input[str] keyspace: Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.
:param pulumi.Input[str] table: Astra database table.
:param pulumi.Input[str] tenant_name: Streaming tenant name
:param pulumi.Input[int] topic_partitions: Number of partitions in cdc topic.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: CdcArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
`Cdc` enables cdc for an Astra Serverless table.
## Example Usage
```python
import pulumi
import pulumiverse_astra as astra
streaming_tenant_1 = astra.StreamingTenant("streamingTenant-1",
tenant_name="terraformtest",
topic="terraformtest",
region="useast-4",
cloud_provider="gcp",
user_email="seb@datastax.com")
cdc_1 = astra.Cdc("cdc-1",
database_id="5b70892f-e01a-4595-98e6-19ecc9985d50",
database_name="sai_test",
table="test",
keyspace="sai_test",
topic_partitions=3,
tenant_name=streaming_tenant_1.tenant_name,
opts=pulumi.ResourceOptions(depends_on=[streaming_tenant_1]))
```
## Import
```sh
$ pulumi import astra:index/cdc:Cdc example databaseId/keyspace/table/tenantName
```
:param str resource_name: The name of the resource.
:param CdcArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(CdcArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
database_id: Optional[pulumi.Input[str]] = None,
database_name: Optional[pulumi.Input[str]] = None,
keyspace: Optional[pulumi.Input[str]] = None,
table: Optional[pulumi.Input[str]] = None,
tenant_name: Optional[pulumi.Input[str]] = None,
topic_partitions: Optional[pulumi.Input[int]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.plugin_download_url is None:
opts.plugin_download_url = _utilities.get_plugin_download_url()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = CdcArgs.__new__(CdcArgs)
if database_id is None and not opts.urn:
raise TypeError("Missing required property 'database_id'")
__props__.__dict__["database_id"] = database_id
if database_name is None and not opts.urn:
raise TypeError("Missing required property 'database_name'")
__props__.__dict__["database_name"] = database_name
if keyspace is None and not opts.urn:
raise TypeError("Missing required property 'keyspace'")
__props__.__dict__["keyspace"] = keyspace
if table is None and not opts.urn:
raise TypeError("Missing required property 'table'")
__props__.__dict__["table"] = table
if tenant_name is None and not opts.urn:
raise TypeError("Missing required property 'tenant_name'")
__props__.__dict__["tenant_name"] = tenant_name
if topic_partitions is None and not opts.urn:
raise TypeError("Missing required property 'topic_partitions'")
__props__.__dict__["topic_partitions"] = topic_partitions
__props__.__dict__["connector_status"] = None
__props__.__dict__["data_topic"] = None
super(Cdc, __self__).__init__(
'astra:index/cdc:Cdc',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
connector_status: Optional[pulumi.Input[str]] = None,
data_topic: Optional[pulumi.Input[str]] = None,
database_id: Optional[pulumi.Input[str]] = None,
database_name: Optional[pulumi.Input[str]] = None,
keyspace: Optional[pulumi.Input[str]] = None,
table: Optional[pulumi.Input[str]] = None,
tenant_name: Optional[pulumi.Input[str]] = None,
topic_partitions: Optional[pulumi.Input[int]] = None) -> 'Cdc':
"""
Get an existing Cdc resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] connector_status: Streaming tenant name
:param pulumi.Input[str] data_topic: Streaming tenant name
:param pulumi.Input[str] database_id: Astra database to create the keyspace.
:param pulumi.Input[str] database_name: Astra database name.
:param pulumi.Input[str] keyspace: Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.
:param pulumi.Input[str] table: Astra database table.
:param pulumi.Input[str] tenant_name: Streaming tenant name
:param pulumi.Input[int] topic_partitions: Number of partitions in cdc topic.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _CdcState.__new__(_CdcState)
__props__.__dict__["connector_status"] = connector_status
__props__.__dict__["data_topic"] = data_topic
__props__.__dict__["database_id"] = database_id
__props__.__dict__["database_name"] = database_name
__props__.__dict__["keyspace"] = keyspace
__props__.__dict__["table"] = table
__props__.__dict__["tenant_name"] = tenant_name
__props__.__dict__["topic_partitions"] = topic_partitions
return Cdc(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="connectorStatus")
def connector_status(self) -> pulumi.Output[str]:
"""
Streaming tenant name
"""
return pulumi.get(self, "connector_status")
@property
@pulumi.getter(name="dataTopic")
def data_topic(self) -> pulumi.Output[str]:
"""
Streaming tenant name
"""
return pulumi.get(self, "data_topic")
@property
@pulumi.getter(name="databaseId")
def database_id(self) -> pulumi.Output[str]:
"""
Astra database to create the keyspace.
"""
return pulumi.get(self, "database_id")
@property
@pulumi.getter(name="databaseName")
def database_name(self) -> pulumi.Output[str]:
"""
Astra database name.
"""
return pulumi.get(self, "database_name")
@property
@pulumi.getter
def keyspace(self) -> pulumi.Output[str]:
"""
Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.
"""
return pulumi.get(self, "keyspace")
@property
@pulumi.getter
def table(self) -> pulumi.Output[str]:
"""
Astra database table.
"""
return pulumi.get(self, "table")
@property
@pulumi.getter(name="tenantName")
def tenant_name(self) -> pulumi.Output[str]:
"""
Streaming tenant name
"""
return pulumi.get(self, "tenant_name")
@property
@pulumi.getter(name="topicPartitions")
def topic_partitions(self) -> pulumi.Output[int]:
"""
Number of partitions in cdc topic.
"""
return pulumi.get(self, "topic_partitions")
| 38.119284
| 134
| 0.625222
| 2,150
| 19,174
| 5.322791
| 0.083721
| 0.090353
| 0.096645
| 0.073051
| 0.833362
| 0.797448
| 0.763981
| 0.727019
| 0.710154
| 0.668735
| 0
| 0.004489
| 0.268019
| 19,174
| 502
| 135
| 38.195219
| 0.810901
| 0.271305
| 0
| 0.578755
| 1
| 0
| 0.105811
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.157509
| false
| 0.003663
| 0.018315
| 0
| 0.271062
| 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
|
c2bdcfb6eaabd65b263df02b6c6aceda6e9c5099
| 3,153
|
py
|
Python
|
test/cp_request/test_entity.py
|
aquariumbio/experiment-request
|
026e3eb767c47f980a35004e9ded5e4e33553693
|
[
"MIT"
] | null | null | null |
test/cp_request/test_entity.py
|
aquariumbio/experiment-request
|
026e3eb767c47f980a35004e9ded5e4e33553693
|
[
"MIT"
] | null | null | null |
test/cp_request/test_entity.py
|
aquariumbio/experiment-request
|
026e3eb767c47f980a35004e9ded5e4e33553693
|
[
"MIT"
] | null | null | null |
import json
from cp_request import Attribute, NamedEntity, Unit, Value
from cp_request.named_entity import NamedEntityEncoder, NamedEntityDecoder
class TestNamedEntity:
def test_entity(self):
e1 = NamedEntity(name="one", reference="http://one.one")
e2 = NamedEntity(name="one", reference="http://one.one")
assert e1 == e2
assert e1 != {}
assert repr(e1) == "NamedEntity(name='one', reference='http://one.one')"
assert str(e1) == "NamedEntity(name='one', reference='http://one.one')"
def test_serialization(self):
e1 = NamedEntity(name="one", reference="http://one.one")
e_json = json.dumps(e1, cls=NamedEntityEncoder)
e2 = json.loads(e_json, cls=NamedEntityDecoder)
assert e1 == e2
def test_entity_attributes(self):
concentration = Attribute.create_from(
name='concentration',
value=Value(
value=0.25,
unit=Unit(
reference='http://purl.obolibrary.org/obo/UO_0000064'
)
))
e1 = NamedEntity(
name="one",
reference="http://one.one",
attributes=[concentration])
assert e1.is_bound()
e2 = NamedEntity(
name="one",
reference="http://one.one",
attributes=[concentration])
assert e1 == e1
assert e1 == e2
assert e1 != {}
assert repr(
e1) == "NamedEntity(name='one', reference='http://one.one', attributes=[BoundAttribute(name='concentration', value=Value(value=0.25, unit=Unit(reference='http://purl.obolibrary.org/obo/UO_0000064')))])"
assert str(
e1) == "NamedEntity(name='one', reference='http://one.one', attributes=[BoundAttribute(name='concentration', value=Value(value=0.25, unit=Unit(reference='http://purl.obolibrary.org/obo/UO_0000064')))])"
def test_entity_attribute_serialization(self):
concentration = Attribute.create_from(
name='concentration',
value=Value(
value=0.25,
unit=Unit(
reference='http://purl.obolibrary.org/obo/UO_0000064'
)
))
e1 = NamedEntity(
name="one",
reference="http://one.one",
attributes=[concentration])
e_json = json.dumps(e1, cls=NamedEntityEncoder)
e2 = json.loads(e_json, cls=NamedEntityDecoder)
assert e1 == e2
def test_entity_unbound_attributes(self):
concentration = Attribute.create_from(
name='concentration',
value=Value(
value=0.25,
unit=Unit(
reference='http://purl.obolibrary.org/obo/UO_0000064'
)
))
timepoint = Attribute.create_from(
name='timepoint',
unit=Unit(reference='http://purl.obolibrary.org/obo/UO_0000027')
)
e1 = NamedEntity(
name="one",
reference="http://one.one",
attributes=[concentration, timepoint])
assert not e1.is_bound()
| 35.829545
| 214
| 0.567396
| 323
| 3,153
| 5.448916
| 0.154799
| 0.125568
| 0.1125
| 0.16875
| 0.827841
| 0.827841
| 0.827841
| 0.827841
| 0.804545
| 0.73125
| 0
| 0.038932
| 0.299397
| 3,153
| 87
| 215
| 36.241379
| 0.757809
| 0
| 0
| 0.653333
| 0
| 0.026667
| 0.259753
| 0.074215
| 0
| 0
| 0
| 0
| 0.173333
| 1
| 0.066667
| false
| 0
| 0.04
| 0
| 0.12
| 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
|
c2d600c10308080eab8bee5be84ed3ffe2e71757
| 151
|
py
|
Python
|
test.py
|
Imagio/enigma
|
31c84a40cabe6ed7fc75743dbe9292a1bb622c4e
|
[
"MIT"
] | null | null | null |
test.py
|
Imagio/enigma
|
31c84a40cabe6ed7fc75743dbe9292a1bb622c4e
|
[
"MIT"
] | null | null | null |
test.py
|
Imagio/enigma
|
31c84a40cabe6ed7fc75743dbe9292a1bb622c4e
|
[
"MIT"
] | null | null | null |
import unittest
from rotor_tests import *
from rotor_settings_tests import *
from reflector_tests import *
from enigma_tests import *
unittest.main()
| 18.875
| 34
| 0.821192
| 21
| 151
| 5.666667
| 0.428571
| 0.369748
| 0.378151
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13245
| 151
| 7
| 35
| 21.571429
| 0.908397
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.833333
| 0
| 0.833333
| 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
|
c2f1a3b7771e7491e2a518b145a7443aeabf7658
| 81
|
py
|
Python
|
corehq/util/tests/__init__.py
|
bglar/commcare-hq
|
972129fc26864c08c7bef07874bd2a7218550bff
|
[
"BSD-3-Clause"
] | 1
|
2017-02-10T03:14:51.000Z
|
2017-02-10T03:14:51.000Z
|
corehq/util/tests/__init__.py
|
bglar/commcare-hq
|
972129fc26864c08c7bef07874bd2a7218550bff
|
[
"BSD-3-Clause"
] | null | null | null |
corehq/util/tests/__init__.py
|
bglar/commcare-hq
|
972129fc26864c08c7bef07874bd2a7218550bff
|
[
"BSD-3-Clause"
] | null | null | null |
from test_couch import *
from test_toggle import *
from test_quickcache import *
| 20.25
| 29
| 0.814815
| 12
| 81
| 5.25
| 0.5
| 0.380952
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 81
| 3
| 30
| 27
| 0.913043
| 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
|
6c8a1fd6e1a402d55f7841fa1d528a488bdf0b86
| 49,401
|
py
|
Python
|
tests/subsystem_tests.py
|
Goodpaster/QSoME
|
8b24d58dfab5ac0d90fd84b8519b25864eee6f74
|
[
"Apache-2.0"
] | 7
|
2018-09-28T21:40:08.000Z
|
2021-06-10T10:44:39.000Z
|
tests/subsystem_tests.py
|
Goodpaster/QSoME
|
8b24d58dfab5ac0d90fd84b8519b25864eee6f74
|
[
"Apache-2.0"
] | 1
|
2021-07-06T12:28:32.000Z
|
2021-07-29T20:34:13.000Z
|
tests/subsystem_tests.py
|
Goodpaster/QSoME
|
8b24d58dfab5ac0d90fd84b8519b25864eee6f74
|
[
"Apache-2.0"
] | 1
|
2021-04-08T12:28:44.000Z
|
2021-04-08T12:28:44.000Z
|
# A module to tests the methods of the Subsystem
import unittest
import os
import shutil
import re
from copy import copy
from qsome import cluster_subsystem, cluster_supersystem
from pyscf import gto, lib, scf, dft, cc, mp, mcscf, tools
from pyscf.cc import ccsd_t, uccsd_t
import numpy as np
import tempfile
class TestEnvSubsystemMethods(unittest.TestCase):
def setUp(self):
mol = gto.Mole()
mol.verbose = 3
mol.atom = '''
O 0.0 0.0 0.0
H 0.758602 0.00 0.504284
H 0.758602 0.00 -0.504284'''
mol.basis = '3-21g'
mol.build()
self.cs_mol = mol
os_mol = gto.Mole()
os_mol.verbose = 3
os_mol.atom = '''
Li 0.0 0.0 0.0
'''
os_mol.basis = '3-21g'
os_mol.spin = 1
os_mol.build()
self.os_mol = os_mol
self.env_method = 'lda'
#@unittest.skip
def test_init_density(self):
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method)
subsys.init_density()
init_dmat = scf.get_init_guess(self.cs_mol)
self.assertTrue(np.allclose(init_dmat, subsys.get_dmat()))
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method, init_guess='atom')
subsys.init_density()
init_dmat = scf.get_init_guess(self.cs_mol, key='atom')
self.assertTrue(np.allclose(init_dmat, subsys.get_dmat()))
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method, init_guess='supmol')
subsys.init_density()
init_dmat = scf.get_init_guess(self.cs_mol)
self.assertTrue(np.allclose(init_dmat, subsys.get_dmat()))
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method, init_guess='submol')
subsys.init_density()
scf_obj = subsys.env_scf
scf_obj.kernel()
init_dmat = scf_obj.make_rdm1()
self.assertTrue(np.allclose(init_dmat, subsys.get_dmat()))
#Test Unrestricted Open Shell.
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, unrestricted=True)
subsys.init_density()
init_dmat = scf.uhf.get_init_guess(self.os_mol)
self.assertTrue(np.allclose(init_dmat, subsys.get_dmat()))
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, init_guess='submol', unrestricted=True)
subsys.init_density()
scf_obj = subsys.env_scf
scf_obj.kernel()
init_dmat = scf_obj.make_rdm1()
self.assertTrue(np.allclose(init_dmat, subsys.get_dmat()))
#Test Restricted Open Shell.
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method)
subsys.init_density()
init_dmat = scf.rhf.get_init_guess(self.os_mol)
init_dmat = [init_dmat/2., init_dmat/2.]
self.assertTrue(np.allclose(init_dmat, subsys.get_dmat()))
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, init_guess='submol')
subsys.init_density()
scf_obj = subsys.env_scf
scf_obj.kernel()
init_dmat = scf_obj.make_rdm1()
self.assertTrue(np.allclose(init_dmat, subsys.get_dmat()))
#@unittest.skip
def test_update_emb_pot(self):
#Closed Shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method)
subsys.init_density()
subsys.update_subsys_fock()
subsys.emb_fock[0] = subsys.subsys_fock[0]
subsys.emb_fock[1] = subsys.subsys_fock[1]
dim0 = subsys.emb_fock[0].shape[0]
dim1 = subsys.emb_fock[1].shape[1]
emb_fock = np.array([np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)])
subsys.emb_fock = emb_fock
subsys.update_emb_pot()
true_emb_pot = [emb_fock[0] - subsys.subsys_fock[0],
emb_fock[1] - subsys.subsys_fock[1]]
self.assertTrue(np.array_equal(true_emb_pot, subsys.emb_pot))
#Unrestricted
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, unrestricted=True)
subsys.init_density()
subsys.update_subsys_fock()
subsys.emb_fock[0] = subsys.subsys_fock[0]
subsys.emb_fock[1] = subsys.subsys_fock[1]
dim0 = subsys.emb_fock[0].shape[0]
dim1 = subsys.emb_fock[1].shape[1]
emb_fock = np.array([np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)])
subsys.emb_fock = emb_fock
subsys.update_emb_pot()
true_emb_pot = [emb_fock[0] - subsys.subsys_fock[0],
emb_fock[1] - subsys.subsys_fock[1]]
self.assertTrue(np.array_equal(true_emb_pot, subsys.emb_pot))
#Restricted Open Shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method)
subsys.init_density()
subsys.update_subsys_fock()
subsys.emb_fock[0] = subsys.subsys_fock[0]
subsys.emb_fock[1] = subsys.subsys_fock[1]
dim0 = subsys.emb_fock[0].shape[0]
dim1 = subsys.emb_fock[1].shape[1]
emb_fock = np.array([np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)])
subsys.emb_fock = emb_fock
subsys.update_emb_pot()
true_emb_pot = [emb_fock[0] - subsys.subsys_fock[0],
emb_fock[1] - subsys.subsys_fock[1]]
self.assertTrue(np.array_equal(true_emb_pot, subsys.emb_pot))
#@unittest.skip
def test_env_proj_e(self):
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method)
subsys.init_density()
sub_dmat = subsys.get_dmat()
# With 0 potential.
no_proj_e = subsys.get_env_proj_e()
self.assertEqual(no_proj_e, 0.0)
# With potential
dim0 = subsys.emb_pot[0].shape[0]
dim1 = subsys.emb_pot[1].shape[1]
proj_potent = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
test_proj_e = np.einsum('ij,ji', proj_potent[0],
(sub_dmat/2.)).real
test_proj_e += np.einsum('ij,ji', proj_potent[1],
(sub_dmat/2.)).real
subsys.proj_pot = proj_potent
proj_e = subsys.get_env_proj_e()
self.assertEqual(test_proj_e, proj_e)
# Unrestricted Open Shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, unrestricted=True)
subsys.init_density()
sub_dmat = subsys.get_dmat()
# With 0 potential.
no_proj_e = subsys.get_env_proj_e()
self.assertEqual(no_proj_e, 0.0)
# With potential
dim0 = subsys.emb_pot[0].shape[0]
dim1 = subsys.emb_pot[1].shape[1]
proj_potent = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
test_proj_e = np.einsum('ij,ji', proj_potent[0],
sub_dmat[0]).real
test_proj_e += np.einsum('ij,ji', proj_potent[1],
sub_dmat[1]).real
subsys.proj_pot = proj_potent
proj_e = subsys.get_env_proj_e()
self.assertEqual(test_proj_e, proj_e)
# Restricted Open Shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method)
subsys.init_density()
sub_dmat = subsys.get_dmat()
# With 0 potential.
no_proj_e = subsys.get_env_proj_e()
self.assertEqual(no_proj_e, 0.0)
# With potential
dim0 = subsys.emb_pot[0].shape[0]
dim1 = subsys.emb_pot[1].shape[1]
proj_potent = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
test_proj_e = np.einsum('ij,ji', proj_potent[0],
sub_dmat[0]).real
test_proj_e += np.einsum('ij,ji', proj_potent[1],
sub_dmat[1]).real
subsys.proj_pot = proj_potent
proj_e = subsys.get_env_proj_e()
self.assertEqual(test_proj_e, proj_e)
#@unittest.skip
def test_env_embed_e(self):
# Closed Shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method)
subsys.init_density()
sub_dmat = subsys.get_dmat()
# With 0 potential.
no_embed_e = subsys.get_env_emb_e()
self.assertEqual(no_embed_e, 0.0)
# With potential
dim0 = subsys.emb_pot[0].shape[0]
dim1 = subsys.emb_pot[1].shape[1]
emb_fock = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
emb_pot = [emb_fock[0] - subsys.subsys_fock[0],
emb_fock[1] - subsys.subsys_fock[1]]
true_emb_e = np.einsum('ij,ji', emb_pot[0],
(sub_dmat/2.)).real
true_emb_e += np.einsum('ij,ji', emb_pot[1],
(sub_dmat/2.)).real
subsys.emb_fock = emb_fock
emb_e = subsys.get_env_emb_e()
self.assertEqual(true_emb_e, emb_e)
# Unrestricted Open Shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, unrestricted=True)
subsys.init_density()
sub_dmat = subsys.get_dmat()
# With 0 potential.
no_embed_e = subsys.get_env_emb_e()
self.assertEqual(no_embed_e, 0.0)
# With potential
dim0 = subsys.emb_pot[0].shape[0]
dim1 = subsys.emb_pot[1].shape[1]
emb_fock = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
emb_pot = emb_fock - subsys.subsys_fock
true_emb_e = np.einsum('ij,ji', emb_pot[0],
sub_dmat[0]).real
true_emb_e += np.einsum('ij,ji', emb_pot[1],
sub_dmat[1]).real
subsys.emb_fock = emb_fock
embed_e = subsys.get_env_emb_e()
self.assertEqual(true_emb_e, embed_e)
# Restricted Open Shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method)
subsys.init_density()
sub_dmat = subsys.get_dmat()
# With 0 potential.
no_embed_e = subsys.get_env_emb_e()
self.assertEqual(no_embed_e, 0.0)
# With potential
dim0 = subsys.emb_pot[0].shape[0]
dim1 = subsys.emb_pot[1].shape[1]
emb_fock = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
emb_pot = [emb_fock[0] - subsys.subsys_fock[0],
emb_fock[1] - subsys.subsys_fock[1]]
true_emb_e = np.einsum('ij,ji', emb_pot[0],
sub_dmat[0]).real
true_emb_e += np.einsum('ij,ji', emb_pot[1],
sub_dmat[1]).real
subsys.emb_fock = emb_fock
embed_e = subsys.get_env_emb_e()
self.assertEqual(true_emb_e, embed_e)
#@unittest.skip
def test_get_env_elec_energy(self):
# Closed Shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method)
subsys.init_density()
# Default test
def_elec_e = subsys.get_env_elec_energy()
sub_dmat = subsys.get_dmat()
test_scf = dft.RKS(self.cs_mol)
test_scf.xc = self.env_method
test_elec_e = test_scf.energy_elec(dm=sub_dmat)
self.assertAlmostEqual(test_elec_e[0], def_elec_e, delta=1e-10)
# With just embedding potential
dim0 = subsys.emb_pot[0].shape[0]
dim1 = subsys.emb_pot[1].shape[1]
emb_fock = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
emb_pot = [emb_fock[0] - subsys.subsys_fock[0],
emb_fock[1] - subsys.subsys_fock[1]]
test_embed_e = np.einsum('ij,ji', (emb_pot[0] + emb_pot[1])/2.,
(sub_dmat)).real
def_elec_e_embed = subsys.get_env_elec_energy(emb_pot=emb_pot)
def_emb_e = def_elec_e_embed - def_elec_e
self.assertAlmostEqual(test_embed_e, def_emb_e, delta=1e-10)
# With just projection potential
proj_potent = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
test_proj_e = np.einsum('ij,ji', (proj_potent[0] + proj_potent[1])/2.,
(sub_dmat)).real
def_elec_e_proj = subsys.get_env_elec_energy(proj_pot=proj_potent)
def_proj_e = def_elec_e_proj - def_elec_e
self.assertAlmostEqual(test_proj_e, def_proj_e, delta=1e-10)
# With both.
emb_fock = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
emb_pot = [emb_fock[0] - subsys.subsys_fock[0],
emb_fock[1] - subsys.subsys_fock[1]]
proj_potent = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
test_proj_e = np.einsum('ij,ji', (proj_potent[0] + proj_potent[1])/2.,
(sub_dmat)).real
test_embed_e = np.einsum('ij,ji', (emb_pot[0] + emb_pot[1])/2.,
(sub_dmat)).real
def_elec_e_tot = subsys.get_env_elec_energy(emb_pot=emb_pot, proj_pot=proj_potent)
def_proj_e = def_elec_e_tot - def_elec_e
self.assertAlmostEqual(test_proj_e + test_embed_e, def_proj_e, delta=1e-10)
# Unrestricted Open Shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, unrestricted=True)
subsys.init_density()
# Default test
def_elec_e = subsys.get_env_elec_energy()
sub_dmat = subsys.env_dmat
test_scf = dft.UKS(self.os_mol)
test_scf.xc = self.env_method
test_elec_e = test_scf.energy_elec(dm=sub_dmat)
self.assertAlmostEqual(test_elec_e[0], def_elec_e, delta=1e-10)
# With just embedding potential
dim0 = subsys.emb_pot[0].shape[0]
dim1 = subsys.emb_pot[1].shape[1]
emb_fock = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
emb_pot = emb_fock - subsys.subsys_fock
test_embed_e = np.einsum('ij,ji', emb_pot[0],
sub_dmat[0]).real
test_embed_e += np.einsum('ij,ji', emb_pot[1],
sub_dmat[1]).real
def_elec_e_embed = subsys.get_env_elec_energy(emb_pot=emb_pot)
def_emb_e = def_elec_e_embed - def_elec_e
self.assertAlmostEqual(test_embed_e, def_emb_e, delta=1e-10)
# With just projection potential
proj_potent = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
test_proj_e = np.einsum('ij,ji', proj_potent[0],
sub_dmat[0]).real
test_proj_e += np.einsum('ij,ji', proj_potent[1],
sub_dmat[1]).real
def_elec_e_proj = subsys.get_env_elec_energy(proj_pot=proj_potent)
def_proj_e = def_elec_e_proj - def_elec_e
self.assertAlmostEqual(test_proj_e, def_proj_e, delta=1e-10)
# With both.
emb_fock = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
emb_pot = emb_fock - subsys.subsys_fock
proj_potent = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
test_proj_e = np.einsum('ij,ji', proj_potent[0],
sub_dmat[0]).real
test_proj_e += np.einsum('ij,ji', proj_potent[1],
sub_dmat[1]).real
test_embed_e = np.einsum('ij,ji', emb_pot[0],
sub_dmat[0]).real
test_embed_e += np.einsum('ij,ji', emb_pot[1],
sub_dmat[1]).real
def_elec_e_tot = subsys.get_env_elec_energy(emb_pot=emb_pot, proj_pot=proj_potent)
def_proj_emb_e = def_elec_e_tot - def_elec_e
self.assertAlmostEqual(test_proj_e + test_embed_e, def_proj_emb_e, delta=1e-10)
# Restricted Open Shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method)
subsys.init_density()
# Default test
def_elec_e = subsys.get_env_elec_energy()
sub_dmat = subsys.env_dmat
test_scf = dft.ROKS(self.os_mol)
test_scf.xc = self.env_method
test_elec_e = test_scf.energy_elec(dm=sub_dmat)
self.assertAlmostEqual(test_elec_e[0], def_elec_e, delta=1e-10)
# With just embedding potential
dim0 = subsys.emb_pot[0].shape[0]
dim1 = subsys.emb_pot[1].shape[1]
emb_fock = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
emb_pot = [emb_fock[0] - subsys.subsys_fock[0],
emb_fock[1] - subsys.subsys_fock[1]]
test_embed_e = np.einsum('ij,ji', emb_pot[0],
sub_dmat[0]).real
test_embed_e += np.einsum('ij,ji', emb_pot[1],
sub_dmat[1]).real
def_elec_e_embed = subsys.get_env_elec_energy(emb_pot=emb_pot)
def_emb_e = def_elec_e_embed - def_elec_e
self.assertAlmostEqual(test_embed_e, def_emb_e, delta=1e-10)
# With just projeciton potential
proj_potent = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
test_proj_e = np.einsum('ij,ji', proj_potent[0],
sub_dmat[0]).real
test_proj_e += np.einsum('ij,ji', proj_potent[1],
sub_dmat[1]).real
def_elec_e_proj = subsys.get_env_elec_energy(proj_pot=proj_potent)
def_proj_e = def_elec_e_proj - def_elec_e
self.assertAlmostEqual(test_proj_e, def_proj_e, delta=1e-10)
# With both.
emb_fock = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
emb_pot = [emb_fock[0] - subsys.subsys_fock[0],
emb_fock[1] - subsys.subsys_fock[1]]
proj_potent = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
test_proj_e = np.einsum('ij,ji', proj_potent[0],
sub_dmat[0]).real
test_proj_e += np.einsum('ij,ji', proj_potent[1],
sub_dmat[1]).real
test_embed_e = np.einsum('ij,ji', emb_pot[0],
sub_dmat[0]).real
test_embed_e += np.einsum('ij,ji', emb_pot[1],
sub_dmat[1]).real
def_elec_e_tot = subsys.get_env_elec_energy(emb_pot=emb_pot, proj_pot=proj_potent)
def_proj_emb_e = def_elec_e_tot - def_elec_e
self.assertAlmostEqual(test_proj_e + test_embed_e, def_proj_emb_e, delta=1e-10)
#@unittest.skip
def test_get_env_energy(self):
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method)
subsys.init_density()
sub_dmat = subsys.get_dmat()
dim0 = subsys.emb_pot[0].shape[0]
dim1 = subsys.emb_pot[1].shape[1]
emb_fock = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
emb_pot = [emb_fock[0] - subsys.subsys_fock[0],
emb_fock[1] - subsys.subsys_fock[1]]
proj_potent = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
true_proj_e = np.einsum('ij,ji', (proj_potent[0] + proj_potent[1])/2.,
(sub_dmat)).real
true_embed_e = np.einsum('ij,ji', (emb_pot[0] + emb_pot[1])/2.,
(sub_dmat)).real
true_scf = dft.RKS(self.cs_mol)
true_scf.xc = self.env_method
true_subsys_e = true_scf.energy_tot(dm=sub_dmat)
subsys_e_tot = subsys.get_env_energy(emb_pot=emb_pot, proj_pot=proj_potent)
true_e_tot = true_subsys_e + true_proj_e + true_embed_e
self.assertAlmostEqual(true_e_tot, subsys_e_tot, delta=1e-10)
#Unrestricted
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, unrestricted=True)
subsys.init_density()
sub_dmat = subsys.get_dmat()
dim0 = subsys.emb_pot[0].shape[0]
dim1 = subsys.emb_pot[1].shape[1]
emb_fock = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
emb_pot = [emb_fock[0] - subsys.subsys_fock[0],
emb_fock[1] - subsys.subsys_fock[1]]
proj_potent = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
true_proj_e = np.einsum('ij,ji', proj_potent[0],
sub_dmat[0].real)
true_proj_e += np.einsum('ij,ji', proj_potent[1],
sub_dmat[1].real)
true_embed_e = np.einsum('ij,ji', emb_pot[0],
(sub_dmat[0]).real)
true_embed_e += np.einsum('ij,ji', emb_pot[1],
(sub_dmat[1]).real)
true_scf = dft.UKS(self.os_mol)
true_scf.xc = self.env_method
true_subsys_e = true_scf.energy_tot(dm=sub_dmat)
subsys_e_tot = subsys.get_env_energy(emb_pot=emb_pot, proj_pot=proj_potent)
true_e_tot = true_subsys_e + true_proj_e + true_embed_e
self.assertAlmostEqual(true_e_tot, subsys_e_tot, delta=1e-10)
#Restricted Open Shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method)
subsys.init_density()
sub_dmat = subsys.get_dmat()
dim0 = subsys.emb_pot[0].shape[0]
dim1 = subsys.emb_pot[1].shape[1]
emb_fock = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
emb_pot = [emb_fock[0] - subsys.subsys_fock[0],
emb_fock[1] - subsys.subsys_fock[1]]
proj_potent = [np.random.rand(dim0, dim1), np.random.rand(dim0, dim1)]
true_proj_e = np.einsum('ij,ji', proj_potent[0],
sub_dmat[0].real)
true_proj_e += np.einsum('ij,ji', proj_potent[1],
sub_dmat[1].real)
true_embed_e = np.einsum('ij,ji', emb_pot[0],
(sub_dmat[0]).real)
true_embed_e += np.einsum('ij,ji', emb_pot[1],
(sub_dmat[1]).real)
true_scf = dft.ROKS(self.os_mol)
true_scf.xc = self.env_method
true_subsys_e = true_scf.energy_tot(dm=sub_dmat)
subsys_e_tot = subsys.get_env_energy(emb_pot=emb_pot, proj_pot=proj_potent)
true_e_tot = true_subsys_e + true_proj_e + true_embed_e
self.assertAlmostEqual(true_e_tot, subsys_e_tot, delta=1e-10)
#@unittest.skip
def test_save_orbs(self):
import tempfile
from pyscf.tools import molden
t_file = tempfile.NamedTemporaryFile()
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method, filename=t_file.name)
subsys.init_density()
subsys.chkfile_index = '0'
subsys.diagonalize()
sub_mo_coeff = subsys.env_mo_coeff
sub_mo_energy = subsys.env_mo_energy
sub_mo_occ = subsys.env_mo_occ
chkfile_index = subsys.chkfile_index
subsys.save_orbital_file()
true_ftmp = tempfile.NamedTemporaryFile()
molden.from_mo(self.cs_mol, true_ftmp.name, sub_mo_coeff[0], ene=sub_mo_energy[0], occ=(sub_mo_occ[0] * 2.))
with open(t_file.name + '_' + chkfile_index + '_subenv.molden', 'r') as fin:
test_den_data = fin.read()
with open(true_ftmp.name, 'r') as fin:
true_den_data = fin.read()
self.assertEqual(test_den_data, true_den_data)
#Unrestricted open shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, unrestricted=True, filename=t_file.name)
subsys.init_density()
subsys.chkfile_index = '0'
subsys.diagonalize()
sub_mo_coeff = subsys.env_mo_coeff
sub_mo_energy = subsys.env_mo_energy
sub_mo_occ = subsys.env_mo_occ
chkfile_index = subsys.chkfile_index
subsys.save_orbital_file()
true_ftmp = tempfile.NamedTemporaryFile()
molden.from_mo(self.os_mol, true_ftmp.name, sub_mo_coeff[0], spin='Alpha', ene=sub_mo_energy[0], occ=sub_mo_occ[0])
with open(t_file.name + '_' + chkfile_index + '_subenv_alpha.molden', 'r') as fin:
test_den_data = fin.read()
with open(true_ftmp.name, 'r') as fin:
true_den_data = fin.read()
self.assertEqual(test_den_data, true_den_data)
true_ftmp = tempfile.NamedTemporaryFile()
molden.from_mo(self.os_mol, true_ftmp.name, sub_mo_coeff[1], spin='Beta', ene=sub_mo_energy[1], occ=sub_mo_occ[1])
with open(t_file.name + '_' + chkfile_index + '_subenv_beta.molden', 'r') as fin:
test_den_data = fin.read()
with open(true_ftmp.name, 'r') as fin:
true_den_data = fin.read()
self.assertEqual(test_den_data, true_den_data)
#Restricted Open Shell
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, filename=t_file.name)
subsys.init_density()
subsys.chkfile_index = '0'
subsys.diagonalize()
sub_mo_coeff = subsys.env_mo_coeff
sub_mo_energy = subsys.env_mo_energy
sub_mo_occ = subsys.env_mo_occ
chkfile_index = subsys.chkfile_index
subsys.save_orbital_file()
true_ftmp = tempfile.NamedTemporaryFile()
molden.from_mo(self.os_mol, true_ftmp.name, sub_mo_coeff[0], ene=sub_mo_energy[0], occ=(sub_mo_occ[0] + sub_mo_occ[1]))
with open(t_file.name + '_' + chkfile_index + '_subenv.molden', 'r') as fin:
test_den_data = fin.read()
with open(true_ftmp.name, 'r') as fin:
true_den_data = fin.read()
self.assertEqual(test_den_data, true_den_data)
#@unittest.skip
def test_save_density(self):
import tempfile
from pyscf.tools import cubegen
t_file = tempfile.NamedTemporaryFile()
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method, filename=t_file.name)
subsys.init_density()
subsys.chkfile_index = '0'
subsys.diagonalize()
subsys.save_density_file()
sub_dmat = subsys.get_dmat()
true_ftmp = tempfile.NamedTemporaryFile()
cubegen.density(self.cs_mol, true_ftmp.name, sub_dmat)
with open(t_file.name + '_' + subsys.chkfile_index + '_subenv.cube', 'r') as fin:
test_den_data = fin.read()
with open(true_ftmp.name, 'r') as fin:
true_den_data = fin.read()
self.assertEqual(test_den_data[99:], true_den_data[99:])
#Unrestricted open shell
t_file = tempfile.NamedTemporaryFile()
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, filename=t_file.name, unrestricted=True)
subsys.init_density()
subsys.chkfile_index = '0'
subsys.diagonalize()
subsys.save_density_file()
sub_dmat = subsys.get_dmat()
true_ftmp = tempfile.NamedTemporaryFile()
cubegen.density(self.os_mol, true_ftmp.name, sub_dmat[0])
with open(t_file.name + '_' + subsys.chkfile_index + '_subenv_alpha.cube', 'r') as fin:
test_den_data = fin.read()
with open(true_ftmp.name, 'r') as fin:
true_den_data = fin.read()
true_ftmp = tempfile.NamedTemporaryFile()
cubegen.density(self.os_mol, true_ftmp.name, sub_dmat[1])
with open(t_file.name + '_' + subsys.chkfile_index + '_subenv_beta.cube', 'r') as fin:
test_den_data = fin.read()
with open(true_ftmp.name, 'r') as fin:
true_den_data = fin.read()
#Restricted open shell
t_file = tempfile.NamedTemporaryFile()
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, filename=t_file.name)
subsys.init_density()
subsys.chkfile_index = '0'
subsys.diagonalize()
subsys.save_density_file()
sub_dmat = subsys.get_dmat()
true_ftmp = tempfile.NamedTemporaryFile()
cubegen.density(self.os_mol, true_ftmp.name, sub_dmat[0])
with open(t_file.name + '_' + subsys.chkfile_index + '_subenv_alpha.cube', 'r') as fin:
test_den_data = fin.read()
with open(true_ftmp.name, 'r') as fin:
true_den_data = fin.read()
true_ftmp = tempfile.NamedTemporaryFile()
cubegen.density(self.os_mol, true_ftmp.name, sub_dmat[1])
with open(t_file.name + '_' + subsys.chkfile_index + '_subenv_beta.cube', 'r') as fin:
test_den_data = fin.read()
with open(true_ftmp.name, 'r') as fin:
true_den_data = fin.read()
#@unittest.skip
def test_save_spin_density(self):
import tempfile
from pyscf.tools import cubegen
#Unrestricted Open Shell
t_file = tempfile.NamedTemporaryFile()
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, filename=t_file.name, unrestricted=True)
subsys.init_density()
subsys.chkfile_index = '0'
subsys.diagonalize()
subsys.save_spin_density_file()
sub_dmat = subsys.get_dmat()
true_ftmp = tempfile.NamedTemporaryFile()
cubegen.density(self.os_mol, true_ftmp.name, np.subtract(sub_dmat[0],sub_dmat[1]))
with open(t_file.name + '_' + subsys.chkfile_index + '_subenv_spinden.cube', 'r') as fin:
test_den_data = fin.read()
with open(true_ftmp.name, 'r') as fin:
true_den_data = fin.read()
self.assertEqual(test_den_data[99:], true_den_data[99:])
#Restricted Open Shell
t_file = tempfile.NamedTemporaryFile()
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, filename=t_file.name)
subsys.init_density()
subsys.chkfile_index = '0'
subsys.diagonalize()
subsys.save_spin_density_file()
sub_dmat = subsys.get_dmat()
true_ftmp = tempfile.NamedTemporaryFile()
cubegen.density(self.os_mol, true_ftmp.name, np.subtract(sub_dmat[0],sub_dmat[1]))
with open(t_file.name + '_' + subsys.chkfile_index + '_subenv_spinden.cube', 'r') as fin:
test_den_data = fin.read()
with open(true_ftmp.name, 'r') as fin:
true_den_data = fin.read()
self.assertEqual(test_den_data[99:], true_den_data[99:])
#@unittest.skip
def test_save_read_chkfile(self):
import h5py
t_file = tempfile.NamedTemporaryFile()
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method, filename=t_file.name)
subsys.chkfile_index = '0'
subsys.init_density()
subsys.diagonalize()
subsys.save_chkfile()
with h5py.File(t_file.name + '.hdf5', 'r') as hf:
subsys_coeff = hf[f'subsystem:0/mo_coeff']
sub_env_mo_coeff = subsys_coeff[:]
subsys_occ = hf[f'subsystem:0/mo_occ']
sub_env_mo_occ = subsys_occ[:]
subsys_energy = hf[f'subsystem:0/mo_energy']
sub_env_mo_energy = subsys_energy[:]
self.assertTrue(np.array_equal(subsys.env_mo_coeff, sub_env_mo_coeff))
self.assertTrue(np.array_equal(subsys.env_mo_occ, sub_env_mo_occ))
self.assertTrue(np.array_equal(subsys.env_mo_energy, sub_env_mo_energy))
subsys2 = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method, filename=t_file.name, init_guess='chk')
subsys2.chkfile_index = '0'
subsys2.init_density()
self.assertTrue(np.array_equal(subsys.env_mo_coeff, subsys2.env_mo_coeff))
self.assertTrue(np.array_equal(subsys.env_mo_occ, subsys2.env_mo_occ))
self.assertTrue(np.array_equal(subsys.env_mo_energy, subsys2.env_mo_energy))
#@unittest.skip
def test_diagonalize(self):
# Closed Shell
# Unsure how to test this with embedding potential or projection pot.
subsys = cluster_subsystem.ClusterEnvSubSystem(self.cs_mol, self.env_method)
subsys.chkfile_index = '0'
subsys.init_density()
subsys.diagonalize()
test_scf = dft.RKS(self.cs_mol)
test_scf.max_cycle = 1
test_scf.xc = self.env_method
test_scf.kernel()
test_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(test_dmat, subsys.get_dmat()))
# Unrestricted Open Shell
# Unsure how to test this with embedding potential or projection pot.
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method, unrestricted=True)
subsys.chkfile_index = '0'
subsys.init_density()
subsys.diagonalize()
test_scf = dft.UKS(self.os_mol)
test_scf.max_cycle = 1
test_scf.xc = self.env_method
test_scf.kernel()
test_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(test_dmat[0], subsys.env_dmat[0]))
self.assertTrue(np.allclose(test_dmat[1], subsys.env_dmat[1]))
# Restricted Open Shell
# Unsure how to test this with embedding potential or projection pot.
subsys = cluster_subsystem.ClusterEnvSubSystem(self.os_mol, self.env_method)
subsys.chkfile_index = '0'
subsys.init_density()
subsys.diagonalize()
test_scf = dft.ROKS(self.os_mol)
test_scf.max_cycle = 1
test_scf.xc = self.env_method
test_scf.kernel()
test_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(test_dmat[0], subsys.env_dmat[0]))
self.assertTrue(np.allclose(test_dmat[1], subsys.env_dmat[1]))
class TestHLSubsystemMethods(unittest.TestCase):
def setUp(self):
mol = gto.Mole()
mol.verbose = 3
mol.atom = '''
O 0.000000 0.000000 0.000000
H 0.758602 0.000000 0.504284
H 0.758602 0.000000 -0.504284'''
mol.basis = '3-21g'
mol.build()
self.cs_mol = mol
self.env_method = 'lda'
mol2 = gto.Mole()
mol2.verbose = 3
mol2.atom = '''
Li 0.0 0.0 0.0
'''
mol2.basis = '3-21g'
mol2.spin = 1
mol2.build()
self.os_mol = mol2
#@unittest.skip
def test_hl_init_guess(self):
hl_method = 'hf'
conv_param = 1e-10
subsys = cluster_subsystem.ClusterHLSubSystem(self.cs_mol, self.env_method, hl_method, hl_conv=conv_param, hl_cycles=0, hl_init_guess="1e")
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
test_scf = scf.RHF(self.cs_mol)
correct_dmat = test_scf.get_init_guess(key="1e")
test_scf.max_cycle = 0
test_scf.kernel(dm0=correct_dmat)
correct_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(correct_dmat, subsys.hl_sr_scf.make_rdm1()))
subsys = cluster_subsystem.ClusterHLSubSystem(self.cs_mol, self.env_method, hl_method, hl_conv=conv_param, hl_cycles=0, hl_init_guess="minao")
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
test_scf = scf.RHF(self.cs_mol)
correct_dmat = test_scf.get_init_guess(key="minao")
test_scf.max_cycle = 0
test_scf.kernel(dm0=correct_dmat)
correct_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(correct_dmat, subsys.hl_sr_scf.make_rdm1()))
subsys = cluster_subsystem.ClusterHLSubSystem(self.cs_mol, self.env_method, hl_method, hl_conv=conv_param, hl_cycles=0, hl_init_guess="atom")
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
test_scf = scf.RHF(self.cs_mol)
correct_dmat = test_scf.get_init_guess(key="atom")
test_scf.max_cycle = 0
test_scf.kernel(dm0=correct_dmat)
correct_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(correct_dmat, subsys.hl_sr_scf.make_rdm1()))
#Use the embedded density as the hl guess.
subsys = cluster_subsystem.ClusterHLSubSystem(self.cs_mol, self.env_method, hl_method, hl_conv=conv_param, hl_cycles=0, hl_init_guess="ft")
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
test_scf = scf.RHF(self.cs_mol)
test_scf.max_cycle = 0
test_scf.kernel(dm0=subsys.get_dmat())
correct_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(correct_dmat, subsys.hl_sr_scf.make_rdm1()))
#Unrestricted Open Shell
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_conv=conv_param, hl_cycles=0, hl_init_guess="1e", hl_unrestricted=True)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
test_scf = scf.UHF(self.os_mol)
correct_dmat = test_scf.get_init_guess(key="1e")
test_scf.max_cycle = 0
test_scf.kernel(dm0=correct_dmat)
correct_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(correct_dmat, subsys.hl_sr_scf.make_rdm1()))
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_conv=conv_param, hl_cycles=0, hl_init_guess="minao", hl_unrestricted=True)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
test_scf = scf.UHF(self.os_mol)
correct_dmat = test_scf.get_init_guess(key="minao")
test_scf.max_cycle = 0
test_scf.kernel(dm0=correct_dmat)
correct_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(correct_dmat, subsys.hl_sr_scf.make_rdm1()))
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_conv=conv_param, hl_cycles=0, hl_init_guess="atom", hl_unrestricted=True)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
test_scf = scf.UHF(self.os_mol)
correct_dmat = test_scf.get_init_guess(key="atom")
test_scf.max_cycle = 0
test_scf.kernel(dm0=correct_dmat)
correct_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(correct_dmat, subsys.hl_sr_scf.make_rdm1()))
#Use the embedded density as the hl guess.
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_conv=conv_param, hl_cycles=0, hl_init_guess="ft", hl_unrestricted=True)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
test_scf = scf.UHF(self.os_mol)
test_scf.max_cycle = 0
test_scf.kernel(dm0=subsys.get_dmat())
correct_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(correct_dmat, subsys.hl_sr_scf.make_rdm1()))
#Restricted Open Shell
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_conv=conv_param, hl_cycles=0, hl_init_guess="1e")
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
test_scf = scf.ROHF(self.os_mol)
correct_dmat = test_scf.get_init_guess(key="1e")
test_scf.max_cycle = 0
test_scf.kernel(dm0=correct_dmat)
correct_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(correct_dmat, subsys.hl_sr_scf.make_rdm1()))
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_conv=conv_param, hl_cycles=0, hl_init_guess="minao")
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
test_scf = scf.ROHF(self.os_mol)
correct_dmat = test_scf.get_init_guess(key="minao")
test_scf.max_cycle = 0
test_scf.kernel(dm0=correct_dmat)
correct_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(correct_dmat, subsys.hl_sr_scf.make_rdm1()))
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_conv=conv_param, hl_cycles=0, hl_init_guess="atom")
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
test_scf = scf.ROHF(self.os_mol)
correct_dmat = test_scf.get_init_guess(key="atom")
test_scf.max_cycle = 0
test_scf.kernel(dm0=correct_dmat)
correct_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(correct_dmat, subsys.hl_sr_scf.make_rdm1()))
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_conv=conv_param, hl_cycles=0, hl_init_guess="ft")
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
test_scf = scf.ROHF(self.os_mol)
test_scf.max_cycle = 0
test_scf.kernel(dm0=subsys.get_dmat())
correct_dmat = test_scf.make_rdm1()
self.assertTrue(np.allclose(correct_dmat, subsys.hl_sr_scf.make_rdm1()))
#@unittest.skip
def test_hf_in_env_energy(self):
# Closed shell
hl_method = 'hf'
subsys = cluster_subsystem.ClusterHLSubSystem(self.cs_mol, self.env_method, hl_method)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.RHF(self.cs_mol)
true_e = true_scf.kernel()
self.assertAlmostEqual(subsys_hl_e, true_e, delta=1e-10)
# Unrestricted Open shell
hl_method = 'hf'
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_unrestricted=True)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.UHF(self.os_mol)
true_e = true_scf.kernel()
self.assertAlmostEqual(subsys_hl_e, true_e, delta=1e-8)
# Restricted Open shell
hl_method = 'hf'
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.ROHF(self.os_mol)
true_e = true_scf.kernel()
self.assertAlmostEqual(subsys_hl_e, true_e, delta=1e-10)
def test_dft_in_env_energy(self):
# Closed shell
hl_method = 'm06'
subsys = cluster_subsystem.ClusterHLSubSystem(self.cs_mol, self.env_method, hl_method)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.RKS(self.cs_mol)
true_scf.xc = 'm06'
true_e = true_scf.kernel()
self.assertAlmostEqual(subsys_hl_e, true_e, delta=1e-10)
# Unrestricted Open shell
hl_method = 'm06'
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_unrestricted=True)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.UKS(self.os_mol)
true_scf.xc = 'm06'
true_e = true_scf.kernel()
self.assertAlmostEqual(subsys_hl_e, true_e, delta=1e-10)
# Restricted Open shell
hl_method = 'm06'
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.ROKS(self.os_mol)
true_scf.xc = 'm06'
true_e = true_scf.kernel()
self.assertAlmostEqual(subsys_hl_e, true_e, delta=1e-10)
def test_ccsd_in_env_energy(self):
# Closed shell
hl_method = 'ccsd'
hl_dict = {'froz_core_orbs': 1}
subsys = cluster_subsystem.ClusterHLSubSystem(self.cs_mol, self.env_method, hl_method, hl_dict=hl_dict)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.RHF(self.cs_mol)
true_hf_e = true_scf.kernel()
true_cc = cc.CCSD(true_scf)
true_cc.frozen = 1
true_cc_e = true_cc.kernel()[0]
self.assertAlmostEqual(subsys_hl_e, true_hf_e + true_cc_e, delta=1e-7)
# Unrestricted Open shell
hl_method = 'ccsd'
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_unrestricted=True)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.UHF(self.os_mol)
true_hf_e = true_scf.kernel()
true_cc = cc.UCCSD(true_scf)
true_cc_e = true_cc.kernel()[0]
self.assertAlmostEqual(subsys_hl_e, true_hf_e + true_cc_e, delta=1e-8)
# Restricted Open shell
#hl_method = 'ccsd'
#subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method)
#subsys.init_density()
#subsys_hl_e = subsys.get_hl_in_env_energy()
#true_scf = scf.ROHF(self.os_mol)
#true_hf_e = true_scf.kernel()
#true_cc = cc.UCCSD(true_scf)
#true_cc_e = true_cc.kernel()[0]
#self.assertAlmostEqual(subsys_hl_e, true_hf_e + true_cc_e, delta=1e-10)
def test_ccsdt_in_env_energy(self):
# Closed shell
hl_method = 'ccsd(t)'
subsys = cluster_subsystem.ClusterHLSubSystem(self.cs_mol, self.env_method, hl_method)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.RHF(self.cs_mol)
true_hf_e = true_scf.kernel()
true_cc = cc.CCSD(true_scf)
true_cc_e = true_cc.kernel()[0]
true_t_e = ccsd_t.kernel(true_cc, true_cc.ao2mo())
self.assertAlmostEqual(subsys_hl_e, true_hf_e + true_cc_e + true_t_e, delta=1e-7)
# Open shell
hl_method = 'ccsd(t)'
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_unrestricted=True)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.UHF(self.os_mol)
true_hf_e = true_scf.kernel()
true_cc = cc.UCCSD(true_scf)
true_cc_e = true_cc.kernel()[0]
true_t_e = uccsd_t.kernel(true_cc, true_cc.ao2mo())
self.assertAlmostEqual(subsys_hl_e, true_hf_e + true_cc_e + true_t_e, delta=1e-10)
def test_mp_in_env_energy(self):
# Closed shell
hl_method = 'mp2'
subsys = cluster_subsystem.ClusterHLSubSystem(self.cs_mol, self.env_method, hl_method)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.RHF(self.cs_mol)
true_hf_e = true_scf.kernel()
true_mp = mp.MP2(true_scf)
true_mp_e = true_mp.kernel()[0]
self.assertAlmostEqual(subsys_hl_e, true_hf_e + true_mp_e, delta=1e-10)
# Open shell
hl_method = 'mp2'
subsys = cluster_subsystem.ClusterHLSubSystem(self.os_mol, self.env_method, hl_method, hl_unrestricted=True)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.UHF(self.os_mol)
true_hf_e = true_scf.kernel()
true_mp = mp.UMP2(true_scf)
true_mp_e = true_mp.kernel()[0]
self.assertAlmostEqual(subsys_hl_e, true_hf_e + true_mp_e, delta=1e-8)
def test_casscf_in_env_energy(self):
# Closed shell
hl_method = 'cas[2,2]'
subsys = cluster_subsystem.ClusterHLSubSystem(self.cs_mol, self.env_method, hl_method)
subsys.init_density()
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.RHF(self.cs_mol)
true_hf_e = true_scf.kernel()
true_casscf = mcscf.CASSCF(true_scf, 2, 2)
true_casscf_e = true_casscf.kernel()[0]
self.assertAlmostEqual(subsys_hl_e, true_casscf_e, delta=1e-8)
def test_ci_in_env_energy(self):
pass
def test_dmrg_in_env_energy(self):
pass
def test_gw_in_env_energy(self):
pass
def test_hci_in_env_energy(self):
pass
def test_icmpspt_in_env_energy(self):
pass
def test_mrpt_in_env_energy(self):
pass
def test_shciscf_in_env_energy(self):
pass
def test_fci_in_env_energy(self):
pass
def test_fciqmc_in_env_energy(self):
pass
#@unittest.skip
def test_fcidump_in_env_energy(self):
#there is not a great way to test this. Pretty sure it's working.
# Closed shell
t_file = tempfile.NamedTemporaryFile()
hl_method = 'fcidump'
subsys = cluster_subsystem.ClusterHLSubSystem(self.cs_mol, self.env_method, hl_method, filename=t_file.name)
subsys.init_density()
subsys.chkfile_index = '0'
subsys_hl_e = subsys.get_hl_in_env_energy()
true_scf = scf.RHF(self.cs_mol)
true_hf_e = true_scf.kernel()
t_file = tempfile.NamedTemporaryFile()
fcidump_filename = t_file.name
tools.fcidump.from_scf(true_scf, fcidump_filename, tol=1e-200)
with open(subsys.filename + '.fcidump', 'r') as fin:
test_fcidump = fin.read()[:100].splitlines()
test_fcidump += fin.read()[200:300].splitlines()
test_fcidump += fin.read()[300:400].splitlines()
test_fcidump += fin.read()[1000:1200].splitlines()
test_fcidump += fin.read()[3000:3200].splitlines()
with open(fcidump_filename, 'r') as fin:
true_fcidump = fin.read()[:100].splitlines()
true_fcidump += fin.read()[200:300].splitlines()
true_fcidump += fin.read()[300:400].splitlines()
true_fcidump += fin.read()[1000:1200].splitlines()
true_fcidump += fin.read()[3000:3200].splitlines()
self.assertEqual(test_fcidump[:4], true_fcidump[:4])
for i in range(4, len(test_fcidump)):
print (i)
print (test_fcidump[i])
print (true_fcidump[i])
test_fci_val = float(test_fcidump[i].split()[0])
true_fci_val = float(true_fcidump[i].split()[0])
self.assertAlmostEqual(test_fci_val, true_fci_val)
| 43.182692
| 172
| 0.638125
| 7,011
| 49,401
| 4.165597
| 0.034375
| 0.018695
| 0.03294
| 0.03561
| 0.940901
| 0.92806
| 0.910255
| 0.895737
| 0.888992
| 0.873172
| 0
| 0.022727
| 0.250926
| 49,401
| 1,143
| 173
| 43.220472
| 0.766491
| 0.044412
| 0
| 0.81523
| 0
| 0
| 0.021651
| 0.000446
| 0
| 0
| 0
| 0
| 0.092945
| 1
| 0.033595
| false
| 0.010078
| 0.019037
| 0
| 0.054871
| 0.003359
| 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
|
665956b19edea097158d528d01890795f973fee1
| 19,404
|
py
|
Python
|
app/apps/address/migrations/0001_initial.py
|
brsrtc/mini-erp-docker
|
f5c37c71384c76e029a26e89f4771a59ed02f925
|
[
"MIT"
] | 1
|
2021-01-18T07:11:31.000Z
|
2021-01-18T07:11:31.000Z
|
app/apps/address/migrations/0001_initial.py
|
brsrtc/mini-erp-docker
|
f5c37c71384c76e029a26e89f4771a59ed02f925
|
[
"MIT"
] | null | null | null |
app/apps/address/migrations/0001_initial.py
|
brsrtc/mini-erp-docker
|
f5c37c71384c76e029a26e89f4771a59ed02f925
|
[
"MIT"
] | null | null | null |
# Generated by Django 3.1.3 on 2020-12-05 17:27
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
import core.cache
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='City',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True,
serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True,
verbose_name='Created At')),
('updated_at', models.DateTimeField(auto_now=True, null=True,
verbose_name='Updated At')),
('is_active',
models.BooleanField(default=True, verbose_name='Is Active')),
('is_deleted',
models.BooleanField(default=False, verbose_name='Is Deleted')),
('deleted_at', models.DateTimeField(blank=True, null=True,
verbose_name='Deleted At')),
('data', models.JSONField(blank=True, default=dict, null=True)),
('name', models.CharField(max_length=128, verbose_name='Name')),
('slot', models.IntegerField(default=1, verbose_name='Slot')),
('use_in',
models.BooleanField(default=False, verbose_name='Use In')),
],
options={
'ordering': ['slot', 'name'],
},
bases=(models.Model, core.cache.BaseCache),
),
migrations.CreateModel(
name='Township',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True,
serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True,
verbose_name='Created At')),
('updated_at', models.DateTimeField(auto_now=True, null=True,
verbose_name='Updated At')),
('is_active',
models.BooleanField(default=True, verbose_name='Is Active')),
('is_deleted',
models.BooleanField(default=False, verbose_name='Is Deleted')),
('deleted_at', models.DateTimeField(blank=True, null=True,
verbose_name='Deleted At')),
('data', models.JSONField(blank=True, default=dict, null=True)),
('name', models.CharField(max_length=128, verbose_name='Name')),
('city',
models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
to='address.city', verbose_name='City')),
('created_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_township_created_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Created By')),
('deleted_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_township_deleted_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Deleted By')),
('updated_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_township_updated_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Updated By')),
],
options={
'ordering': ['name'],
},
bases=(models.Model, core.cache.BaseCache),
),
migrations.CreateModel(
name='State',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True,
serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True,
verbose_name='Created At')),
('updated_at', models.DateTimeField(auto_now=True, null=True,
verbose_name='Updated At')),
('is_active',
models.BooleanField(default=True, verbose_name='Is Active')),
('is_deleted',
models.BooleanField(default=False, verbose_name='Is Deleted')),
('deleted_at', models.DateTimeField(blank=True, null=True,
verbose_name='Deleted At')),
('data', models.JSONField(blank=True, default=dict, null=True)),
('name', models.CharField(max_length=32, verbose_name='Name')),
('code', models.CharField(max_length=16, verbose_name='Code')),
('created_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_state_created_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Created By')),
('deleted_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_state_deleted_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Deleted By')),
('updated_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_state_updated_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Updated By')),
],
options={
'ordering': ['name'],
},
bases=(models.Model, core.cache.BaseCache),
),
migrations.CreateModel(
name='District',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True,
serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True,
verbose_name='Created At')),
('updated_at', models.DateTimeField(auto_now=True, null=True,
verbose_name='Updated At')),
('is_active',
models.BooleanField(default=True, verbose_name='Is Active')),
('is_deleted',
models.BooleanField(default=False, verbose_name='Is Deleted')),
('deleted_at', models.DateTimeField(blank=True, null=True,
verbose_name='Deleted At')),
('data', models.JSONField(blank=True, default=dict, null=True)),
('name', models.CharField(max_length=128, verbose_name='Name')),
('created_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_district_created_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Created By')),
('deleted_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_district_deleted_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Deleted By')),
('township',
models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
to='address.township',
verbose_name='Township')),
('updated_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_district_updated_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Updated By')),
],
options={
'ordering': ['name'],
},
bases=(models.Model, core.cache.BaseCache),
),
migrations.CreateModel(
name='Country',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True,
serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True,
verbose_name='Created At')),
('updated_at', models.DateTimeField(auto_now=True, null=True,
verbose_name='Updated At')),
('is_active',
models.BooleanField(default=True, verbose_name='Is Active')),
('is_deleted',
models.BooleanField(default=False, verbose_name='Is Deleted')),
('deleted_at', models.DateTimeField(blank=True, null=True,
verbose_name='Deleted At')),
('data', models.JSONField(blank=True, default=dict, null=True)),
('name', models.CharField(max_length=64, verbose_name='Name')),
('code', models.CharField(max_length=16, verbose_name='Code')),
('slot', models.IntegerField(default=1, verbose_name='Slot')),
('default_country', models.BooleanField(default=False)),
('created_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_country_created_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Created By')),
('deleted_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_country_deleted_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Deleted By')),
('updated_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_country_updated_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Updated By')),
],
options={
'ordering': ['slot', 'name'],
},
bases=(models.Model, core.cache.BaseCache),
),
migrations.AddField(
model_name='city',
name='country',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
to='address.country',
verbose_name='Country'),
),
migrations.AddField(
model_name='city',
name='created_by',
field=models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_city_created_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Created By'),
),
migrations.AddField(
model_name='city',
name='deleted_by',
field=models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_city_deleted_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Deleted By'),
),
migrations.AddField(
model_name='city',
name='updated_by',
field=models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_city_updated_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Updated By'),
),
migrations.CreateModel(
name='Address',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True,
serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True,
verbose_name='Created At')),
('updated_at', models.DateTimeField(auto_now=True, null=True,
verbose_name='Updated At')),
('is_active',
models.BooleanField(default=True, verbose_name='Is Active')),
('is_deleted',
models.BooleanField(default=False, verbose_name='Is Deleted')),
('deleted_at', models.DateTimeField(blank=True, null=True,
verbose_name='Deleted At')),
('data', models.JSONField(blank=True, default=dict, null=True)),
('address_title', models.CharField(max_length=512,
verbose_name='Address Title')),
('address', models.TextField()),
('postal_code',
models.CharField(blank=True, max_length=10, null=True,
verbose_name='Postal Code')),
('phone',
models.CharField(help_text='Örn: 5301234567', max_length=32,
verbose_name='Phone')),
('internal',
models.CharField(blank=True, max_length=64, null=True,
verbose_name='Dahili')),
('fax',
models.CharField(blank=True, help_text='Örn: 2122454545',
max_length=64, null=True,
verbose_name='Fax')),
('name', models.CharField(blank=True, max_length=256, null=True,
verbose_name='Name')),
('identity_number',
models.CharField(blank=True, max_length=64, null=True,
verbose_name='Identity Number')),
('tax_no',
models.CharField(blank=True, max_length=256, null=True,
verbose_name='Tax No')),
('tax_office',
models.CharField(blank=True, max_length=256, null=True,
verbose_name='Tax Office')),
('is_cancelled', models.BooleanField(default=False,
verbose_name='Is Cancelled')),
('cancelled_at', models.DateTimeField(blank=True, null=True,
verbose_name='Cancelled At')),
('city',
models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
to='address.city', verbose_name='City')),
('created_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_address_created_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Created By')),
('deleted_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_address_deleted_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Deleted By')),
('district', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
to='address.district',
verbose_name='District')),
('state', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
to='address.state',
verbose_name='State')),
('township',
models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
to='address.township',
verbose_name='Township')),
('updated_by', models.ForeignKey(blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='address_address_updated_by',
to=settings.AUTH_USER_MODEL,
verbose_name='Updated By')),
],
options={
'ordering': ['id'],
'abstract': False,
},
bases=(models.Model, core.cache.BaseCache),
),
]
| 59.521472
| 93
| 0.44563
| 1,549
| 19,404
| 5.371207
| 0.071014
| 0.108413
| 0.047596
| 0.055168
| 0.895673
| 0.892788
| 0.872596
| 0.855409
| 0.844591
| 0.838702
| 0
| 0.007177
| 0.454236
| 19,404
| 325
| 94
| 59.704615
| 0.77847
| 0.002319
| 0
| 0.713836
| 1
| 0
| 0.109314
| 0.023712
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.012579
| 0
| 0.025157
| 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
|
66a6d482011b0d35775a7523319647c543ff9fb5
| 11,829
|
py
|
Python
|
src/algo/baselines/randomP/randomP.py
|
Lukeeeeee/CE7490-Group-Project-Python
|
840a655bcb8cebbe3d39e5d3f3d68a01936a6283
|
[
"MIT"
] | null | null | null |
src/algo/baselines/randomP/randomP.py
|
Lukeeeeee/CE7490-Group-Project-Python
|
840a655bcb8cebbe3d39e5d3f3d68a01936a6283
|
[
"MIT"
] | null | null | null |
src/algo/baselines/randomP/randomP.py
|
Lukeeeeee/CE7490-Group-Project-Python
|
840a655bcb8cebbe3d39e5d3f3d68a01936a6283
|
[
"MIT"
] | 1
|
2020-10-20T07:06:18.000Z
|
2020-10-20T07:06:18.000Z
|
from src.core import Basic
import networkx as nx
class RandomP(Basic):
def __init__(self, server_list, network_dataset, node_list):
super().__init__()
self.server_list = server_list
self.network_dataset = network_dataset
self.node_list = node_list
def add_new_primary_node(self,server_list,vp_number):
i = 0
q = len(server_list)//(vp_number+1)
if vp_number == 3:
a = q
b = q * 2
c = q * 3
for n in self.node_list:
if i > len(self.server_list) - 1:
i = 0
if a > len(self.server_list) - 1:
a = 0
if b > len(self.server_list) - 1:
b = 0
if c > len(self.server_list) - 1:
c = 0
primary_server = self.server_list[i]
self.add_primary_copy_to_server(node_id=n, server=primary_server)
vps1 = self.server_list[a]
vps2 = self.server_list[b]
vps3 = self.server_list[c]
self.add_virtual_primary_copy_to_server(node_id=n, server=vps1)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps2)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps3)
i = i + 1
a = a + 1
b = b + 1
c = c + 1
elif vp_number == 2:
a = q
b = q * 2
for n in self.node_list:
if i > len(self.server_list) - 1:
i = 0
if a > len(self.server_list) - 1:
a = 0
if b > len(self.server_list) - 1:
b = 0
primary_server = self.server_list[i]
self.add_primary_copy_to_server(node_id=n, server=primary_server)
vps1 = self.server_list[a]
vps2 = self.server_list[b]
self.add_virtual_primary_copy_to_server(node_id=n, server=vps1)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps2)
i = i + 1
a = a + 1
b = b + 1
elif vp_number == 0:
for n in self.node_list:
if i > len(self.server_list) - 1:
i = 0
primary_server = self.server_list[i]
self.add_primary_copy_to_server(node_id=n, server=primary_server)
i = i + 1
elif vp_number == 1:
a = q
for n in self.node_list:
if i > len(self.server_list) - 1:
i = 0
if a > len(self.server_list) - 1:
a = 0
primary_server = self.server_list[i]
self.add_primary_copy_to_server(node_id=n, server=primary_server)
vps1 = self.server_list[a]
self.add_virtual_primary_copy_to_server(node_id=n, server=vps1)
i = i + 1
a = a + 1
elif vp_number == 4:
a = q
b = q * 2
c = q * 3
d = q * 4
for n in self.node_list:
if i > len(self.server_list) - 1:
i = 0
if a > len(self.server_list) - 1:
a = 0
if b > len(self.server_list) - 1:
b = 0
if c > len(self.server_list) - 1:
c = 0
if d > len(self.server_list) - 1:
d = 0
primary_server = self.server_list[i]
self.add_primary_copy_to_server(node_id=n, server=primary_server)
vps1 = self.server_list[a]
vps2 = self.server_list[b]
vps3 = self.server_list[c]
vps4 = self.server_list[d]
self.add_virtual_primary_copy_to_server(node_id=n, server=vps1)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps2)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps3)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps4)
i = i + 1
a = a + 1
b = b + 1
c = c + 1
d = d + 1
elif vp_number == 5:
a = q
b = q * 2
c = q * 3
d = q * 4
e = q * 5
for n in self.node_list:
if i > len(self.server_list) - 1:
i = 0
if a > len(self.server_list) - 1:
a = 0
if b > len(self.server_list) - 1:
b = 0
if c > len(self.server_list) - 1:
c = 0
if d > len(self.server_list) - 1:
d = 0
if e > len(self.server_list) - 1:
e = 0
primary_server = self.server_list[i]
self.add_primary_copy_to_server(node_id=n, server=primary_server)
vps1 = self.server_list[a]
vps2 = self.server_list[b]
vps3 = self.server_list[c]
vps4 = self.server_list[d]
vps5 = self.server_list[e]
self.add_virtual_primary_copy_to_server(node_id=n, server=vps1)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps2)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps3)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps4)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps5)
i = i + 1
a = a + 1
b = b + 1
c = c + 1
d = d + 1
e = e + 1
elif vp_number == 6:
a = q
b = q * 2
c = q * 3
d = q * 4
e = q * 5
f = q * 6
for n in self.node_list:
if i > len(self.server_list) - 1:
i = 0
if a > len(self.server_list) - 1:
a = 0
if b > len(self.server_list) - 1:
b = 0
if c > len(self.server_list) - 1:
c = 0
if d > len(self.server_list) - 1:
d = 0
if e > len(self.server_list) - 1:
e = 0
if f > len(self.server_list) - 1:
f = 0
primary_server = self.server_list[i]
self.add_primary_copy_to_server(node_id=n, server=primary_server)
vps1 = self.server_list[a]
vps2 = self.server_list[b]
vps3 = self.server_list[c]
vps4 = self.server_list[d]
vps5 = self.server_list[e]
vps6 = self.server_list[f]
self.add_virtual_primary_copy_to_server(node_id=n, server=vps1)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps2)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps3)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps4)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps5)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps6)
i = i + 1
a = a + 1
b = b + 1
c = c + 1
d = d + 1
e = e + 1
f = f + 1
elif vp_number == 7:
a = q
b = q * 2
c = q * 3
d = q * 4
e = q * 5
f = q * 6
g = q * 7
for n in self.node_list:
if i > len(self.server_list) - 1:
i = 0
if a > len(self.server_list) - 1:
a = 0
if b > len(self.server_list) - 1:
b = 0
if c > len(self.server_list) - 1:
c = 0
if d > len(self.server_list) - 1:
d = 0
if e > len(self.server_list) - 1:
e = 0
if f > len(self.server_list) - 1:
f = 0
if g > len(self.server_list) - 1:
g = 0
primary_server = self.server_list[i]
self.add_primary_copy_to_server(node_id=n, server=primary_server)
vps1 = self.server_list[a]
vps2 = self.server_list[b]
vps3 = self.server_list[c]
vps4 = self.server_list[d]
vps5 = self.server_list[e]
vps6 = self.server_list[f]
vps7 = self.server_list[g]
self.add_virtual_primary_copy_to_server(node_id=n, server=vps1)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps2)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps3)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps4)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps5)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps6)
self.add_virtual_primary_copy_to_server(node_id=n, server=vps7)
i = i + 1
a = a + 1
b = b + 1
c = c + 1
d = d + 1
e = e + 1
f = f + 1
g = g + 1
else:
print('vp_number illegal')
def add_primary_copy_to_server(self, node_id, server):
server.add_node(node_id=node_id, node_type=1, write_freq=1)
def add_virtual_primary_copy_to_server(self,node_id, server):
server.add_node(node_id=node_id, node_type=3, write_freq=1)
def add_non_primary_copy_to_server(self,node_id, server):
server.add_node(node_id=node_id, node_type=2, write_freq=1)
def check_locality(self):
for server in self.server_list:
rp=[]
for node in server.graph:
if server.graph.nodes[node]['node_type'] == 1:
for n in self.network_dataset.graph.neighbors(node):
if not server.graph.has_node(n):
rp.append(n)
for i in rp:
if not server.graph.has_node(i):
self.add_non_primary_copy_to_server(node_id=i, server=server)
def compute_inter_sever_cost(self):
cost = 0
for server in self.server_list:
for node in server.graph:
if server.graph.nodes[node]['node_type'] == 2:
cost = cost + server.graph.nodes[node]['write_freq']
print('Inter-Server Cost: ',cost,)
def check_server_load(self):
server_load_list=[]
for server in self.server_list:
server_load_list.append(len(server.graph))
if max(server_load_list)-min(server_load_list)<=1:
print('Load of servers are balanced.')
def find_primary_server(self,node_id):
for server in self.server_list:
if server.graph.has_node(node_id):
if server.graph.nodes[node_id]['node_type']==1:
print('The primary copy of Node',node_id,'is assigned on server',server.id)
def save_all(self, path):
nx.write_gpickle(self.network_dataset.graph, path + '/dataset_graph.gpickle')
for i in range(len(self.server_list)):
nx.write_gpickle(self.server_list[i].graph, path + '/server_%d.gpickle' % i)
| 37.792332
| 95
| 0.481951
| 1,565
| 11,829
| 3.377636
| 0.060703
| 0.157019
| 0.214529
| 0.143776
| 0.8042
| 0.78793
| 0.750284
| 0.750284
| 0.74877
| 0.747068
| 0
| 0.0306
| 0.43089
| 11,829
| 312
| 96
| 37.913462
| 0.754605
| 0
| 0
| 0.786232
| 0
| 0
| 0.015809
| 0.00186
| 0
| 0
| 0
| 0
| 0
| 1
| 0.036232
| false
| 0
| 0.007246
| 0
| 0.047101
| 0.014493
| 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
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
66b95f7f1063980cc02f05f543cab0abf0bce28b
| 199
|
py
|
Python
|
tests/test_mmhelloworld.py
|
manasm11/mmhelloworld
|
2e6907ac0962de90764a036d14046861b5f47521
|
[
"MIT"
] | null | null | null |
tests/test_mmhelloworld.py
|
manasm11/mmhelloworld
|
2e6907ac0962de90764a036d14046861b5f47521
|
[
"MIT"
] | null | null | null |
tests/test_mmhelloworld.py
|
manasm11/mmhelloworld
|
2e6907ac0962de90764a036d14046861b5f47521
|
[
"MIT"
] | null | null | null |
from mmhelloworld import say_hello
def test_say_hello_no_params():
assert say_hello() == "Hello! World"
def test_say_hello_with_param():
assert say_hello("Everyone") == "Hello! Everyone"
| 19.9
| 53
| 0.738693
| 28
| 199
| 4.857143
| 0.5
| 0.294118
| 0.147059
| 0.220588
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150754
| 199
| 9
| 54
| 22.111111
| 0.804734
| 0
| 0
| 0
| 0
| 0
| 0.175879
| 0
| 0
| 0
| 0
| 0
| 0.4
| 1
| 0.4
| true
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 0
| 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
| 0
| 0
| 1
| 0
|
0
| 7
|
66be0ddd5abfb03dffd9214bd347839460bf60b7
| 39,732
|
py
|
Python
|
pyreach/impl/logs_directory_client_test.py
|
google-research/pyreach
|
f91753ce7a26e77e122eb02a9fdd5a1ce3ce0159
|
[
"Apache-2.0"
] | 13
|
2021-09-01T01:10:22.000Z
|
2022-03-05T10:01:52.000Z
|
pyreach/impl/logs_directory_client_test.py
|
google-research/pyreach
|
f91753ce7a26e77e122eb02a9fdd5a1ce3ce0159
|
[
"Apache-2.0"
] | null | null | null |
pyreach/impl/logs_directory_client_test.py
|
google-research/pyreach
|
f91753ce7a26e77e122eb02a9fdd5a1ce3ce0159
|
[
"Apache-2.0"
] | 6
|
2021-09-20T21:17:53.000Z
|
2022-03-14T18:42:48.000Z
|
# Copyright 2021 Google LLC
#
# 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.
"""Tests for logs_directory_client."""
import json
import os
import queue
import tempfile
from typing import Callable, Optional, List, Union
import unittest
from pyreach import core
from pyreach.common.python import types_gen
from pyreach.impl import logs_directory_client
from pyreach.impl import playback_client
from pyreach.impl import playback_client_test
from pyreach.impl import snapshot_impl
from pyreach.impl import utils
class LogsDirectoryClientTest(unittest.TestCase):
_device_data: List[types_gen.DeviceData] = [
types_gen.DeviceData(
device_type="robot", data_type="robot-state", ts=2, seq=1),
types_gen.DeviceData(
device_type="robot",
data_type="robot-state",
ts=3,
seq=2,
inhibit_frame_send=True),
types_gen.DeviceData(
device_type="session-manager",
data_type="connected-clients",
ts=4,
seq=3,
connected_clients=types_gen.ConnectedClients([
types_gen.ConnectedClient(
control_session_active=True, uid="test-1"),
types_gen.ConnectedClient(uid="test-2"),
])),
types_gen.DeviceData(
device_type="robot",
data_type="robot-state",
ts=5,
seq=4,
send_to_clients=[types_gen.SendToClient("test-tag-1", "test-1")]),
types_gen.DeviceData(
device_type="robot",
data_type="robot-state",
ts=6,
seq=5,
send_to_clients=[types_gen.SendToClient("test-tag-2", "test-2")]),
types_gen.DeviceData(
device_type="robot",
data_type="robot-state",
ts=7,
seq=6,
send_to_clients=[
types_gen.SendToClient("test-tag-3", "test-1"),
types_gen.SendToClient("test-tag-4", "test-2")
]),
types_gen.DeviceData(
device_type="depth-camera",
data_type="color-depth",
ts=8,
seq=7,
color="color-8.jpg",
depth="depth-8.pgm",
send_to_clients=[types_gen.SendToClient("test-req-1", "test-1")]),
types_gen.DeviceData(
device_type="depth-camera",
data_type="color-depth",
ts=9,
seq=8,
color="depth-camera/color-9.jpg",
depth="depth-camera/depth-9.pgm",
send_to_clients=[types_gen.SendToClient("test-req-2", "test-1")]),
types_gen.DeviceData(
device_type="depth-camera",
data_type="color-depth",
ts=10,
seq=9,
color="/tmp/log/depth-camera/color-10.jpg",
depth="/tmp/log/depth-camera/depth-10.pgm",
send_to_clients=[types_gen.SendToClient("test-req-3", "test-1")]),
types_gen.DeviceData(
tag="test-in-tag-1",
device_type="robot",
data_type="cmd-status",
ts=11,
seq=10),
types_gen.DeviceData(
tag="test-in-tag-2",
device_type="robot",
data_type="cmd-status",
ts=12,
seq=11),
types_gen.DeviceData(
device_type="session-manager",
data_type="connected-clients",
ts=13,
seq=12,
connected_clients=types_gen.ConnectedClients([])),
types_gen.DeviceData(
device_type="robot", data_type="robot-state", ts=14, seq=13),
]
_device_data_client_1: List[types_gen.DeviceData] = [
types_gen.DeviceData(
device_type="session-manager",
data_type="connected-clients",
ts=4,
seq=3,
connected_clients=types_gen.ConnectedClients([
types_gen.ConnectedClient(
control_session_active=True, is_current=True, uid="test-1"),
types_gen.ConnectedClient(uid="test-2"),
])),
types_gen.DeviceData(
tag="test-tag-1",
device_type="robot",
data_type="robot-state",
ts=5,
seq=4),
types_gen.DeviceData(
tag="test-tag-3",
device_type="robot",
data_type="robot-state",
ts=7,
seq=6),
types_gen.DeviceData(
tag="test-req-1",
device_type="depth-camera",
data_type="color-depth",
ts=8,
seq=7,
color="color-8.jpg",
depth="depth-8.pgm"),
types_gen.DeviceData(
tag="test-req-2",
device_type="depth-camera",
data_type="color-depth",
ts=9,
seq=8,
color="depth-camera/color-9.jpg",
depth="depth-camera/depth-9.pgm"),
types_gen.DeviceData(
tag="test-req-3",
device_type="depth-camera",
data_type="color-depth",
ts=10,
seq=9,
color="/tmp/log/depth-camera/color-10.jpg",
depth="/tmp/log/depth-camera/depth-10.pgm"),
types_gen.DeviceData(
tag="test-in-tag-1",
device_type="robot",
data_type="cmd-status",
ts=11,
seq=10),
]
_device_data_client_2: List[types_gen.DeviceData] = [
types_gen.DeviceData(
device_type="session-manager",
data_type="connected-clients",
ts=4,
seq=3,
connected_clients=types_gen.ConnectedClients([
types_gen.ConnectedClient(
control_session_active=True, uid="test-1"),
types_gen.ConnectedClient(is_current=True, uid="test-2"),
])),
types_gen.DeviceData(
tag="test-tag-2",
device_type="robot",
data_type="robot-state",
ts=6,
seq=5),
types_gen.DeviceData(
tag="test-tag-4",
device_type="robot",
data_type="robot-state",
ts=7,
seq=6),
types_gen.DeviceData(
tag="test-in-tag-2",
device_type="robot",
data_type="cmd-status",
ts=12,
seq=11),
]
_cmd_data: List[types_gen.CommandData] = [
types_gen.CommandData(
ts=2,
seq=1,
origin_client="test-1",
tag="test-in-tag-1",
device_type="robot",
data_type="reach-script",
snapshot=types_gen.Snapshot(
gym_run_id="test-gym-1",
gym_episode=2,
gym_step=1,
),
),
types_gen.CommandData(
ts=3,
seq=2,
origin_client="test-2",
tag="test-in-tag-2",
device_type="robot",
data_type="reach-script",
snapshot=types_gen.Snapshot(
gym_run_id="test-gym-2",
gym_episode=2,
gym_step=1,
),
),
types_gen.CommandData(
ts=4,
seq=3,
origin_client="test-1",
tag="test-req-1",
device_type="robot",
data_type="reach-script",
snapshot=types_gen.Snapshot(
gym_run_id="test-gym-1",
gym_episode=2,
gym_step=2,
),
),
types_gen.CommandData(
ts=5,
seq=4,
origin_client="test-1",
tag="test-req-2",
device_type="robot",
data_type="reach-script",
snapshot=types_gen.Snapshot(
gym_run_id="test-gym-1",
gym_episode=3,
gym_step=1,
),
),
types_gen.CommandData(
ts=5,
seq=4,
origin_client="test-1",
device_type="robot",
data_type="reach-script",
snapshot=types_gen.Snapshot(
gym_run_id="test-gym-3",
gym_episode=2,
gym_step=1,
),
),
]
def test_empty(self) -> None:
with tempfile.TemporaryDirectory() as tempdir:
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, None, False)
try:
self.assertIsNone(c.client_id)
self.assertIsNone(c.gym_run_id)
self._test_empty(c)
finally:
c.close()
for client_id in ["test-invalid", None]:
for select_client in [True, False]:
for gym_run_id in ["test-invalid-gym", None]:
for select_gym in [True, False]:
if (not client_id and not select_client and not gym_run_id and
not select_gym):
continue
self.assertRaises(core.PyReachError,
logs_directory_client.LogsDirectoryClient,
"test-robot", tempdir, client_id, select_client,
gym_run_id, select_gym)
def _test_empty(self, c: logs_directory_client.LogsDirectoryClient) -> None:
self.assertFalse(c.device_data_available())
self.assertIsNone(c.next_device_data())
self.assertRaises(
NotImplementedError, c.send_cmd,
types_gen.CommandData(
data_type="frame-request", device_type="robot", ts=1))
self.assertFalse(c.device_data_available())
self.assertRaises(queue.Empty, c.get_queue().get, False, 0.0)
self.assertRaises(core.PyReachError, c.seek_device_data, None, None)
self.assertRaises(queue.Empty, c.get_queue().get, False, 0.0)
self.assertIsNone(c.seek_device_data(1.0, None))
self.assertRaises(queue.Empty, c.get_queue().get, False, 0.0)
self.assertIsNone(c.seek_device_data(1.0, 1))
self.assertRaises(queue.Empty, c.get_queue().get, False, 0.0)
self.assertIsNone(c.seek_device_data(None, 1))
self.assertRaises(queue.Empty, c.get_queue().get, False, 0.0)
self.assertIsNone(c.next_snapshot())
self.assertIsNone(c.seek_snapshot(None, None, None))
self.assertIsNone(c.seek_snapshot("test", None, None))
self.assertIsNone(c.seek_snapshot(None, 1, None))
self.assertIsNone(c.seek_snapshot(None, 0, 1))
self.assertRaises(queue.Empty, c.get_queue().get, False, 0.0)
c.close()
self.assertIsNone(c.get_queue().get(True, 1.0))
self.assertRaises(queue.Empty, c.get_queue().get, False, 0.0)
def test_client_1(self) -> None:
with tempfile.TemporaryDirectory() as tempdir:
cmd_data = [
utils.copy_command_data(cmd)
for cmd in self._cmd_data
if cmd.origin_client == "test-1"
]
tags = set([cmd.tag for cmd in cmd_data])
for cmd in cmd_data:
cmd.origin_client = ""
self._write_data(tempdir, self._device_data_client_1, cmd_data)
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, None, False)
try:
self.assertIsNone(c.client_id)
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir,
self._remove_current(self._device_data_client_1),
cmd_data)
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
True, None, False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir, [
data for data in self._device_data_client_1
if data.tag in tags or not data.tag
], cmd_data)
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-1", False, None,
False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir, [
data for data in self._device_data_client_1
if data.tag in tags or not data.tag
], cmd_data)
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-1", True, None, False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir, [
data for data in self._device_data_client_1
if data.tag in tags or not data.tag
], cmd_data)
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, None, True)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-1")
self._test_client(c, tempdir, [
data for data in self._device_data_client_1
if data.tag in tags or not data.tag
], [
cmd for cmd in cmd_data
if cmd.snapshot is None or cmd.snapshot.gym_run_id == "test-gym-1"
])
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, "test-gym-1", True)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-1")
self._test_client(c, tempdir, [
data for data in self._device_data_client_1
if data.tag in tags or not data.tag
], [
cmd for cmd in cmd_data
if cmd.snapshot is None or cmd.snapshot.gym_run_id == "test-gym-1"
])
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, "test-gym-1", False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-1")
self._test_client(c, tempdir, [
data for data in self._device_data_client_1
if data.tag in tags or not data.tag
], [
cmd for cmd in cmd_data
if cmd.snapshot is None or cmd.snapshot.gym_run_id == "test-gym-1"
])
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, "test-gym-3", False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-3")
self._test_client(c, tempdir, [
data for data in self._device_data_client_1
if data.tag in tags or not data.tag
], [
cmd for cmd in cmd_data
if cmd.snapshot is None or cmd.snapshot.gym_run_id == "test-gym-3"
])
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, "test-gym-3", True)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-3")
self._test_client(c, tempdir, [
data for data in self._device_data_client_1
if data.tag in tags or not data.tag
], [
cmd for cmd in cmd_data
if cmd.snapshot is None or cmd.snapshot.gym_run_id == "test-gym-3"
])
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-1", False,
"test-gym-3", False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-3")
self._test_client(c, tempdir, [
data for data in self._device_data_client_1
if data.tag in tags or not data.tag
], [
cmd for cmd in cmd_data
if cmd.snapshot is None or cmd.snapshot.gym_run_id == "test-gym-3"
])
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-1", True,
"test-gym-3", False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-3")
self._test_client(c, tempdir, [
data for data in self._device_data_client_1
if data.tag in tags or not data.tag
], [
cmd for cmd in cmd_data
if cmd.snapshot is None or cmd.snapshot.gym_run_id == "test-gym-3"
])
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
True, "test-gym-3", False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-3")
self._test_client(c, tempdir, [
data for data in self._device_data_client_1
if data.tag in tags or not data.tag
], [
cmd for cmd in cmd_data
if cmd.snapshot is None or cmd.snapshot.gym_run_id == "test-gym-3"
])
finally:
c.close()
def test_client_2(self) -> None:
with tempfile.TemporaryDirectory() as tempdir:
cmd_data = [
utils.copy_command_data(cmd)
for cmd in self._cmd_data
if cmd.origin_client == "test-2"
]
tags = set([cmd.tag for cmd in cmd_data])
for cmd in cmd_data:
cmd.origin_client = ""
self._write_data(tempdir, self._device_data_client_2, cmd_data)
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, None, False)
try:
self.assertIsNone(c.client_id)
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir,
self._remove_current(self._device_data_client_2),
cmd_data)
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
True, None, False)
try:
self.assertEqual(c.client_id, "test-2")
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir, [
data for data in self._device_data_client_2
if data.tag in tags or not data.tag
], cmd_data)
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-2", False, None,
False)
try:
self.assertEqual(c.client_id, "test-2")
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir, [
data for data in self._device_data_client_2
if data.tag in tags or not data.tag
], cmd_data)
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-2", True, None, False)
try:
self.assertEqual(c.client_id, "test-2")
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir, [
data for data in self._device_data_client_2
if data.tag in tags or not data.tag
], cmd_data)
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, None, True)
try:
self.assertEqual(c.client_id, "test-2")
self.assertEqual(c.gym_run_id, "test-gym-2")
self._test_client(c, tempdir, [
data for data in self._device_data_client_2
if data.tag in tags or not data.tag
], [
cmd for cmd in cmd_data
if cmd.snapshot is None or cmd.snapshot.gym_run_id == "test-gym-2"
])
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, "test-gym-2", True)
try:
self.assertEqual(c.client_id, "test-2")
self.assertEqual(c.gym_run_id, "test-gym-2")
self._test_client(c, tempdir, [
data for data in self._device_data_client_2
if data.tag in tags or not data.tag
], [
cmd for cmd in cmd_data
if cmd.snapshot is None or cmd.snapshot.gym_run_id == "test-gym-2"
])
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, "test-gym-2", False)
try:
self.assertEqual(c.client_id, "test-2")
self.assertEqual(c.gym_run_id, "test-gym-2")
self._test_client(c, tempdir, [
data for data in self._device_data_client_2
if data.tag in tags or not data.tag
], [
cmd for cmd in cmd_data
if cmd.snapshot is None or cmd.snapshot.gym_run_id == "test-gym-2"
])
finally:
c.close()
def test_serverside(self) -> None:
with tempfile.TemporaryDirectory() as tempdir:
self._write_data(tempdir, self._device_data, self._cmd_data)
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, None, False)
try:
self.assertIsNone(c.client_id)
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir, self._device_data, self._cmd_data)
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
True, None, False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", None))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-1", True, None, False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", None))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-1", False, None,
False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", None))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-1", False,
"test-gym-1", False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-1")
self._test_client(
c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", "test-gym-1"))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-1", False,
"test-gym-1", True)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-1")
self._test_client(
c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", "test-gym-1"))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-1", False, None, True)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-1")
self._test_client(
c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", "test-gym-1"))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, "test-gym-1", False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-1")
self._test_client(
c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", "test-gym-1"))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, "test-gym-1", True)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-1")
self._test_client(
c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", "test-gym-1"))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
False, None, True)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-1")
self._test_client(
c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", "test-gym-1"))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
True, "test-gym-1", False)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-1")
self._test_client(
c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", "test-gym-1"))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
True, "test-gym-1", True)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-1")
self._test_client(
c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", "test-gym-1"))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir, None,
True, None, True)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-1")
self._test_client(
c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", "test-gym-1"))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-2", True, None, False)
try:
self.assertEqual(c.client_id, "test-2")
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir, self._device_data_client_2,
self._filter_cmd(self._cmd_data, "test-2", None))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-2", False, None,
False)
try:
self.assertEqual(c.client_id, "test-2")
self.assertIsNone(c.gym_run_id)
self._test_client(c, tempdir, self._device_data_client_2,
self._filter_cmd(self._cmd_data, "test-2", None))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-2", False,
"test-gym-2", True)
try:
self.assertEqual(c.client_id, "test-2")
self.assertEqual(c.gym_run_id, "test-gym-2")
self._test_client(
c, tempdir, self._device_data_client_2,
self._filter_cmd(self._cmd_data, "test-2", "test-gym-2"))
finally:
c.close()
c = logs_directory_client.LogsDirectoryClient("test-robot", tempdir,
"test-1", False,
"test-gym-3", True)
try:
self.assertEqual(c.client_id, "test-1")
self.assertEqual(c.gym_run_id, "test-gym-3")
self._test_client(
c, tempdir, self._device_data_client_1,
self._filter_cmd(self._cmd_data, "test-1", "test-gym-3"))
finally:
c.close()
self.assertRaises(core.PyReachError,
logs_directory_client.LogsDirectoryClient, "test-robot",
tempdir, "test-3", False, None, False)
self.assertRaises(core.PyReachError,
logs_directory_client.LogsDirectoryClient, "test-robot",
tempdir, "test-3", False, None, True)
self.assertRaises(core.PyReachError,
logs_directory_client.LogsDirectoryClient, "test-robot",
tempdir, "test-3", False, None, True)
self.assertRaises(core.PyReachError,
logs_directory_client.LogsDirectoryClient, "test-robot",
tempdir, "test-2", False, "test-gym-1", False)
self.assertRaises(core.PyReachError,
logs_directory_client.LogsDirectoryClient, "test-robot",
tempdir, "test-1", False, "test-gym-2", False)
self.assertRaises(core.PyReachError,
logs_directory_client.LogsDirectoryClient, "test-robot",
tempdir, "test-1", True, "test-gym-2", False)
self.assertRaises(core.PyReachError,
logs_directory_client.LogsDirectoryClient, "test-robot",
tempdir, "test-2", True, "test-gym-1", True)
self.assertRaises(core.PyReachError,
logs_directory_client.LogsDirectoryClient, "test-robot",
tempdir, "test-2", True, "test-gym-1", False)
self.assertRaises(core.PyReachError,
logs_directory_client.LogsDirectoryClient, "test-robot",
tempdir, "test-1", False, "test-gym-2", True)
def _remove_current(
self,
device_data: List[types_gen.DeviceData]) -> List[types_gen.DeviceData]:
d = [utils.copy_device_data(data) for data in device_data]
for data in d:
if data.connected_clients and data.connected_clients.clients:
for c in data.connected_clients.clients:
c.is_current = False
return d
def _filter_cmd(self, command_data: List[types_gen.CommandData],
client_id: Optional[str],
gym_run_id: Optional[str]) -> List[types_gen.CommandData]:
output = []
for cmd in command_data:
if ((client_id is None or not cmd.origin_client or
cmd.origin_client == client_id) and
(gym_run_id is None or cmd.snapshot is None or
cmd.snapshot.gym_run_id == gym_run_id)):
output.append(cmd)
return output
def _test_client(self, c: logs_directory_client.LogsDirectoryClient,
tempdir: str, device_data: List[types_gen.DeviceData],
command_data: List[types_gen.CommandData]) -> None:
iteration = 0
while True:
have_data = c.device_data_available()
data = c.next_device_data()
if not data:
self.assertFalse(have_data)
self.assertEqual(iteration, len(device_data))
break
self.assertTrue(have_data)
if iteration >= len(device_data):
self.assertIsNone(data.to_json())
self._assert_data(c, tempdir, data, device_data[iteration])
iteration += 1
for iteration in range(len(device_data) - 1, -1, -1):
data = c.seek_device_data(
utils.time_at_timestamp(device_data[iteration].ts), None)
assert data
self._assert_data(c, tempdir, data, device_data[iteration])
for iteration in range(len(device_data) - 1, -1, -1):
data = c.seek_device_data(
utils.time_at_timestamp(device_data[iteration].ts),
device_data[iteration].seq)
assert data
self._assert_data(c, tempdir, data, device_data[iteration])
for iteration in range(len(device_data) - 1, -1, -1):
data = c.seek_device_data(
utils.time_at_timestamp(device_data[iteration].ts),
device_data[iteration].seq + 1000)
self.assertIsNone(data)
self.assertRaises(queue.Empty, c.get_queue().get, False, 0.0)
for cmd in command_data:
if cmd.snapshot:
snapshot = c.next_snapshot()
self.assertEqual(snapshot, snapshot_impl.reverse_snapshot(cmd.snapshot))
for iteration in range(len(command_data) - 1, -1, -1):
cmd = command_data[iteration]
if cmd.snapshot:
snapshot = c.seek_snapshot(cmd.snapshot.gym_run_id,
cmd.snapshot.gym_episode,
cmd.snapshot.gym_step)
self.assertEqual(snapshot, snapshot_impl.reverse_snapshot(cmd.snapshot))
snapshot = c.seek_snapshot(None, None, None)
self.assertEqual(snapshot,
snapshot_impl.reverse_snapshot(command_data[0].snapshot))
self.assertIsNone(c.seek_device_data(1.0, None))
self.assertRaises(queue.Empty, c.get_queue().get, False, 0.0)
c.close()
self.assertIsNone(c.get_queue().get(True, 1.0))
self.assertRaises(queue.Empty, c.get_queue().get, False, 0.0)
def _write_data(self, tempdir: str, device_data: List[types_gen.DeviceData],
cmd_data: List[types_gen.CommandData]) -> None:
os.mkdir(os.path.join(tempdir, "device-data"))
with open(os.path.join(tempdir, "device-data", "00000.json"), "w") as f:
for data in device_data:
f.write(json.dumps(data.to_json()) + "\n")
os.mkdir(os.path.join(tempdir, "command-data"))
with open(os.path.join(tempdir, "command-data", "00000.json"), "w") as f:
for cmd in cmd_data:
f.write(json.dumps(cmd.to_json()) + "\n")
def _assert_data(self, c: logs_directory_client.LogsDirectoryClient,
tempdir: str, data: types_gen.DeviceData,
expect_data: types_gen.DeviceData) -> None:
expect_data = utils.copy_device_data(expect_data)
if expect_data.depth:
expect_data.depth = os.path.join(tempdir, "depth-camera",
"depth-" + str(expect_data.ts) + ".pgm")
if expect_data.color:
expect_data.color = os.path.join(tempdir, "depth-camera",
"color-" + str(expect_data.ts) + ".jpg")
playback_client_test.log_data_equal(self, data, expect_data)
self.assertEqual(c.get_queue().get(True, 1.0), data)
self.assertRaises(queue.Empty, c.get_queue().get, False, 0.0)
def test_data_reader(self) -> None:
device_data = [
types_gen.DeviceData(
ts=1000,
seq=2,
data_type="robot-state",
device_type="robot",
device_name="test"),
types_gen.DeviceData(
ts=2001,
seq=1,
data_type="robot-state",
device_type="robot",
device_name="test"),
types_gen.DeviceData(
ts=2000,
seq=3,
data_type="robot-state",
device_type="robot",
device_name="test"),
]
def factory(
working_directory: str) -> logs_directory_client._DeviceDataReader:
return logs_directory_client._DeviceDataReader(working_directory,
working_directory)
self._test_directory_iterator(device_data, factory)
def test_command_reader(self) -> None:
command_data = [
types_gen.CommandData(
ts=1000,
seq=2,
data_type="frame-request",
device_type="robot",
device_name="test"),
types_gen.CommandData(
ts=2001,
seq=1,
data_type="frame-request",
device_type="robot",
device_name="test"),
types_gen.CommandData(
ts=2000,
seq=3,
data_type="frame-request",
device_type="robot",
device_name="test"),
]
self._test_directory_iterator(command_data,
logs_directory_client._CommandDataReader)
def test_empty_data_reader(self) -> None:
def factory(
working_directory: str) -> logs_directory_client._DeviceDataReader:
return logs_directory_client._DeviceDataReader(working_directory,
working_directory)
empty_data: List[types_gen.DeviceData] = []
self._test_directory_iterator(empty_data, factory)
def test_empty_command_reader(self) -> None:
empty_cmd: List[types_gen.CommandData] = []
self._test_directory_iterator(empty_cmd,
logs_directory_client._CommandDataReader)
def _test_directory_iterator(
self, data: Union[List[types_gen.DeviceData],
List[types_gen.CommandData]],
factory: Callable[[str],
Union[playback_client.Iterator[types_gen.DeviceData],
playback_client.Iterator[types_gen.CommandData]]]
) -> None:
test_invalid_seqs = [
(0.0, 0),
(1.0, 0),
(1.0, 1),
(2.001, 3),
(2.0, 2),
(1.001, None),
(1.2, None),
(None, 4),
(None, 0),
(0.0, None),
]
with tempfile.TemporaryDirectory() as tempdir:
if data:
self.assertGreater(len(data), 2)
with open(os.path.join(tempdir, "00000.json"), "w") as f:
for element in data[0:2]:
f.write(json.dumps(element.to_json()) + "\n")
with open(os.path.join(tempdir, "00001.json"), "w") as f:
for element in data[2:]:
f.write(json.dumps(element.to_json()) + "\n")
def factory_wrapper(
) -> Union[playback_client.Iterator[types_gen.DeviceData],
playback_client.Iterator[types_gen.CommandData]]:
return factory(tempdir)
if data:
playback_client_test.log_iterator_test(self, data, test_invalid_seqs,
factory_wrapper, False)
else:
playback_client_test.empty_log_iterator_test(self, factory_wrapper)
if __name__ == "__main__":
unittest.main()
| 39.652695
| 80
| 0.55892
| 4,753
| 39,732
| 4.448138
| 0.04797
| 0.03065
| 0.023082
| 0.089869
| 0.859285
| 0.841831
| 0.805222
| 0.764261
| 0.747517
| 0.727888
| 0
| 0.017774
| 0.328803
| 39,732
| 1,001
| 81
| 39.692308
| 0.775011
| 0.014648
| 0
| 0.749738
| 0
| 0
| 0.080727
| 0.005929
| 0
| 0
| 0
| 0
| 0.132984
| 1
| 0.018848
| false
| 0
| 0.013613
| 0.003141
| 0.042932
| 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
|
dd0710c4323697be4edfde027a5e9419170be224
| 1,818
|
py
|
Python
|
migrations/versions/281362c70f34_.py
|
TobiasPrt/Smartphoniker-shop
|
6b74a3cc1c81db7a56d70609dbca29ddeec3053f
|
[
"MIT"
] | 2
|
2020-05-11T08:46:45.000Z
|
2020-05-11T09:09:57.000Z
|
migrations/versions/281362c70f34_.py
|
TobiasPrt/Smartphoniker-shop
|
6b74a3cc1c81db7a56d70609dbca29ddeec3053f
|
[
"MIT"
] | 4
|
2021-02-19T13:31:53.000Z
|
2022-02-20T13:34:10.000Z
|
migrations/versions/281362c70f34_.py
|
TobiasPrt/Smartphoniker-shop
|
6b74a3cc1c81db7a56d70609dbca29ddeec3053f
|
[
"MIT"
] | 5
|
2020-04-27T16:25:39.000Z
|
2020-06-07T16:03:15.000Z
|
"""empty message
Revision ID: 281362c70f34
Revises: acff3391146d
Create Date: 2020-05-27 16:58:11.029790
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '281362c70f34'
down_revision = 'acff3391146d'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('color', 'color_code',
existing_type=sa.VARCHAR(length=20),
nullable=False)
op.alter_column('color', 'internal_name',
existing_type=sa.VARCHAR(length=128),
nullable=False)
op.alter_column('color', 'name',
existing_type=sa.VARCHAR(length=128),
nullable=False)
op.alter_column('device_series', 'name',
existing_type=sa.VARCHAR(length=64),
nullable=False)
op.alter_column('manufacturer', 'name',
existing_type=sa.VARCHAR(length=64),
nullable=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('manufacturer', 'name',
existing_type=sa.VARCHAR(length=64),
nullable=True)
op.alter_column('device_series', 'name',
existing_type=sa.VARCHAR(length=64),
nullable=True)
op.alter_column('color', 'name',
existing_type=sa.VARCHAR(length=128),
nullable=True)
op.alter_column('color', 'internal_name',
existing_type=sa.VARCHAR(length=128),
nullable=True)
op.alter_column('color', 'color_code',
existing_type=sa.VARCHAR(length=20),
nullable=True)
# ### end Alembic commands ###
| 31.894737
| 65
| 0.60011
| 200
| 1,818
| 5.31
| 0.3
| 0.065913
| 0.122411
| 0.19774
| 0.727872
| 0.727872
| 0.723164
| 0.723164
| 0.723164
| 0.713748
| 0
| 0.059361
| 0.277228
| 1,818
| 56
| 66
| 32.464286
| 0.748858
| 0.162266
| 0
| 0.789474
| 0
| 0
| 0.119015
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.052632
| false
| 0
| 0.052632
| 0
| 0.105263
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 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
|
dd3c2fd0cab5262a11100e98979113701b2c65bd
| 2,828
|
py
|
Python
|
Projects_Django/MyPets/tienda_mascotas/models.py
|
JuanCasanovaQ/Frameworks_8A
|
353838473b275d366cac8364ef4df72578c0aed8
|
[
"Apache-2.0"
] | null | null | null |
Projects_Django/MyPets/tienda_mascotas/models.py
|
JuanCasanovaQ/Frameworks_8A
|
353838473b275d366cac8364ef4df72578c0aed8
|
[
"Apache-2.0"
] | null | null | null |
Projects_Django/MyPets/tienda_mascotas/models.py
|
JuanCasanovaQ/Frameworks_8A
|
353838473b275d366cac8364ef4df72578c0aed8
|
[
"Apache-2.0"
] | null | null | null |
from django.db import models
from django.db.models.fields.related import ForeignKey
# Create your models here.
class Country(models.Model):
code = models.CharField(max_length=10)
name = models.CharField(max_length=150)
abrev = models.CharField(max_length=4)
status = models.BooleanField()
created_at = models.DateField(auto_now=True)
updatesd_at = models.DateField()
deleted_at = models.DateField()
class User(models.Model):
first_name = models.CharField(max_length=200)
last_name = models.CharField(max_length=200)
id_identification_type = models.IntegerField()
number_id = models.CharField(max_length=15)
id_city = models.IntegerField()
email = models.CharField(max_length=200)
password = models.CharField(max_length=200)
status = models.BooleanField()
created_at = models.DateField(auto_now=True)
updatesd_at = models.DateField()
deleted_at = models.DateField()
class Session(models.Model):
id_user = models.IntegerField()
ip = models.CharField(max_length=200)
status = models.BooleanField()
created_at = models.DateField(auto_now=True)
updatesd_at = models.DateField()
deleted_at = models.DateField()
class Identification_type(models.Model):
type = models.CharField(max_length=150)
abrev = models.CharField(max_length=4)
created_at = models.DateField(auto_now=True)
updatesd_at = models.DateField()
deleted_at = models.DateField()
class City(models.Model):
code = models.CharField(max_length=10)
name = models.CharField(max_length=150)
abrev = models.CharField(max_length=4)
id_country = models.IntegerField()
status = models.BooleanField()
created_at = models.DateField(auto_now=True)
updatesd_at = models.DateField()
deleted_at = models.DateField()
class Pet(models.Model):
code = models.CharField(max_length=10)
name = models.CharField(max_length=150)
id_user = models.IntegerField()
id_type = models.IntegerField()
id_race = models.IntegerField()
status = models.BooleanField()
created_at = models.DateField(auto_now=True)
updatesd_at = models.DateField()
deleted_at = models.DateField()
class Type(models.Model):
code = models.CharField(max_length=10)
name = models.CharField(max_length=150)
abrev = models.CharField(max_length=4)
status = models.BooleanField()
created_at = models.DateField(auto_now=True)
updatesd_at = models.DateField()
deleted_at = models.DateField()
class Race(models.Model):
code = models.CharField(max_length=10)
name = models.CharField(max_length=150)
abrev = models.CharField(max_length=4)
status = models.BooleanField()
created_at = models.DateField(auto_now=True)
updatesd_at = models.DateField()
deleted_at = models.DateField()
| 32.883721
| 54
| 0.724187
| 355
| 2,828
| 5.583099
| 0.140845
| 0.096872
| 0.205853
| 0.266398
| 0.802725
| 0.789102
| 0.75782
| 0.75782
| 0.75782
| 0.75782
| 0
| 0.021213
| 0.166549
| 2,828
| 85
| 55
| 33.270588
| 0.819686
| 0.008487
| 0
| 0.685714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.014286
| 0.028571
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 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
| 1
| 0
|
0
| 9
|
dd3fd65b348e0bcff47a6b9cda24ca0e585cfa0c
| 6,749
|
py
|
Python
|
pirates/leveleditor/worldData/tortuga_building_int_10.py
|
itsyaboyrocket/pirates
|
6ca1e7d571c670b0d976f65e608235707b5737e3
|
[
"BSD-3-Clause"
] | 3
|
2021-02-25T06:38:13.000Z
|
2022-03-22T07:00:15.000Z
|
pirates/leveleditor/worldData/tortuga_building_int_10.py
|
itsyaboyrocket/pirates
|
6ca1e7d571c670b0d976f65e608235707b5737e3
|
[
"BSD-3-Clause"
] | null | null | null |
pirates/leveleditor/worldData/tortuga_building_int_10.py
|
itsyaboyrocket/pirates
|
6ca1e7d571c670b0d976f65e608235707b5737e3
|
[
"BSD-3-Clause"
] | 1
|
2021-02-25T06:38:17.000Z
|
2021-02-25T06:38:17.000Z
|
# uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.leveleditor.worldData.tortuga_building_int_10
from pandac.PandaModules import Point3, VBase3, Vec4, Vec3
objectStruct = {'AmbientColors': {}, 'DirectionalColors': {}, 'FogColors': {}, 'FogRanges': {}, 'Objects': {'1156279496.29dzlu0': {'Type': 'Building Interior', 'Name': '', 'AdditionalData': ['interior_shanty_store_tattoo'], 'Instanced': True, 'Objects': {'1169067906.19mike': {'Type': 'Townsperson', 'Category': 'Commoner', 'AnimSet': 'tatoo', 'CustomModel': 'None', 'GhostColor': 'None', 'GhostFX': 0, 'Greeting Animation': '', 'Hpr': VBase3(-102.509, 1.642, 0.0), 'Level': '37', 'Notice Animation 1': '', 'Notice Animation 2': '', 'Patrol Radius': '12.0000', 'Pos': Point3(6.941, -8.134, -0.178), 'PoseAnim': '', 'PoseFrame': '', 'Private Status': 'All', 'PropLeft': 'None', 'PropRight': 'None', 'Respawns': True, 'Scale': VBase3(1.0, 1.0, 1.0), 'ShopID': 'PORT_ROYAL_DEFAULTS', 'Start State': 'Idle', 'StartFrame': '0', 'Team': 'Villager', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None'}, '1179360000.0dchiappe': {'Type': 'Furniture', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(19.675, 0.0, 0.0), 'Pos': Point3(7.057, -8.171, 0.0), 'Scale': VBase3(1.023, 1.023, 1.023), 'VisSize': '', 'Visual': {'Model': 'models/props/stool_shanty'}}, '1179360000.0dchiappe0': {'Type': 'Furniture', 'DisableCollision': False, 'Holiday': '', 'Hpr': VBase3(-29.781, 0.0, 0.0), 'Objects': {}, 'Pos': Point3(7.771, -4.618, -0.007), 'Scale': VBase3(0.965, 0.965, 0.965), 'VisSize': '', 'Visual': {'Model': 'models/props/stool_shanty'}}, '1179360256.0dchiappe': {'Type': 'Townsperson', 'Category': 'Commoner', 'AnimSet': 'tatoo_receive', 'CustomModel': 'None', 'GhostColor': 'None', 'GhostFX': 0, 'Greeting Animation': '', 'HelpID': 'NONE', 'Holiday': '', 'Hpr': VBase3(-125.548, -4.22, -0.497), 'Level': '37', 'Notice Animation 1': '', 'Notice Animation 2': '', 'Patrol Radius': '12.0000', 'Pos': Point3(7.165, -4.221, 0.093), 'PoseAnim': '', 'PoseFrame': '', 'Private Status': 'All', 'PropLeft': 'None', 'PropRight': 'None', 'Respawns': True, 'Scale': VBase3(1.0, 1.0, 1.0), 'ShopID': 'PORT_ROYAL_DEFAULTS', 'Start State': 'Idle', 'StartFrame': '0', 'Team': 'Villager', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None', 'VisSize': ''}, '1201025152.0dxschafe': {'Type': 'Door Locator Node', 'Name': 'door_locator', 'Hpr': VBase3(-180.0, 0.0, 0.0), 'Pos': Point3(0.044, -4.421, 5.0), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1201025280.0dxschafe': {'Type': 'Townsperson', 'Category': 'Tattoo', 'AnimSet': 'primp', 'CustomModel': 'None', 'GhostColor': 'None', 'GhostFX': 0, 'Greeting Animation': '', 'Hpr': VBase3(-163.551, 0.0, 0.0), 'Level': '37', 'Notice Animation 1': '', 'Notice Animation 2': '', 'Patrol Radius': '1.0000', 'Pos': Point3(16.835, 12.638, 0.0), 'PoseAnim': '', 'PoseFrame': '', 'Private Status': 'All', 'PropLeft': 'None', 'PropRight': 'None', 'Respawns': True, 'Scale': VBase3(1.0, 1.0, 1.0), 'ShopID': 'TORTUGA_DEFAULTS', 'Start State': 'Idle', 'StartFrame': '0', 'Team': 'Villager', 'TrailFX': 'None', 'TrailLeft': 'None', 'TrailRight': 'None'}, '1201122985.55dxschafe': {'Type': 'Light - Dynamic', 'Attenuation': '0.005', 'ConeAngle': '15.0000', 'DropOff': '45.5422', 'FlickRate': '0.5000', 'Flickering': False, 'Hpr': VBase3(170.832, -20.397, 4.921), 'Intensity': '1.0602', 'LightType': 'SPOT', 'Pos': Point3(19.411, 22.344, 13.063), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (1, 1, 1, 1), 'Model': 'models/props/light_tool_bulb'}}, '1201124068.83dxschafe': {'Type': 'Light - Dynamic', 'Attenuation': '0.005', 'ConeAngle': '60.0000', 'DropOff': '29.8193', 'FlickRate': '0.5000', 'Flickering': False, 'Hpr': VBase3(-119.397, -38.379, 0.0), 'Intensity': '0.9639', 'LightType': 'SPOT', 'Pos': Point3(1.086, 14.825, 18.821), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (1, 1, 1, 1), 'Model': 'models/props/light_tool_bulb'}}}, 'Visual': {'Model': 'models/buildings/interior_shanty_store'}}}, 'Node Links': [], 'Layers': {'Collisions': ['1184008208.59kmuller', '1184016064.62kmuller', '1184013852.84kmuller', '1185822696.06kmuller', '1184006140.32kmuller', '1184002350.98kmuller', '1184007573.29kmuller', '1184021176.59kmuller', '1184005963.59kmuller', '1188324241.31akelts', '1184006537.34kmuller', '1184006605.81kmuller', '1187139568.33kmuller', '1188324186.98akelts', '1184006730.66kmuller', '1184007538.51kmuller', '1184006188.41kmuller', '1184021084.27kmuller', '1185824396.94kmuller', '1185824250.16kmuller', '1185823630.52kmuller', '1185823760.23kmuller', '1185824497.83kmuller', '1185824751.45kmuller', '1187739103.34akelts', '1188323993.34akelts', '1184016538.29kmuller', '1185822200.97kmuller', '1184016225.99kmuller', '1195241421.34akelts', '1195242796.08akelts', '1184020642.13kmuller', '1195237994.63akelts', '1184020756.88kmuller', '1184020833.4kmuller', '1185820992.97kmuller', '1185821053.83kmuller', '1184015068.54kmuller', '1184014935.82kmuller', '1185821432.88kmuller', '1185821701.86kmuller', '1195240137.55akelts', '1195241539.38akelts', '1195238422.3akelts', '1195238473.22akelts', '1185821453.17kmuller', '1184021269.96kmuller', '1185821310.89kmuller', '1185821165.59kmuller', '1185821199.36kmuller', '1185822035.98kmuller', '1184015806.59kmuller', '1185822059.48kmuller', '1185920461.76kmuller', '1194984449.66akelts', '1185824206.22kmuller', '1184003446.23kmuller', '1184003254.85kmuller', '1184003218.74kmuller', '1184002700.44kmuller', '1186705073.11kmuller', '1187658531.86akelts', '1186705214.3kmuller', '1185824927.28kmuller', '1184014204.54kmuller', '1184014152.84kmuller']}, 'ObjectIds': {'1156279496.29dzlu0': '["Objects"]["1156279496.29dzlu0"]', '1169067906.19mike': '["Objects"]["1156279496.29dzlu0"]["Objects"]["1169067906.19mike"]', '1179360000.0dchiappe': '["Objects"]["1156279496.29dzlu0"]["Objects"]["1179360000.0dchiappe"]', '1179360000.0dchiappe0': '["Objects"]["1156279496.29dzlu0"]["Objects"]["1179360000.0dchiappe0"]', '1179360256.0dchiappe': '["Objects"]["1156279496.29dzlu0"]["Objects"]["1179360256.0dchiappe"]', '1201025152.0dxschafe': '["Objects"]["1156279496.29dzlu0"]["Objects"]["1201025152.0dxschafe"]', '1201025280.0dxschafe': '["Objects"]["1156279496.29dzlu0"]["Objects"]["1201025280.0dxschafe"]', '1201122985.55dxschafe': '["Objects"]["1156279496.29dzlu0"]["Objects"]["1201122985.55dxschafe"]', '1201124068.83dxschafe': '["Objects"]["1156279496.29dzlu0"]["Objects"]["1201124068.83dxschafe"]'}}
extraInfo = {'camPos': Point3(295.478, -101.859, 7.30613), 'camHpr': VBase3(66.8195, -6.16144, 0), 'focalLength': 1.39999997616, 'skyState': 2, 'fog': 0}
| 964.142857
| 6,298
| 0.676397
| 780
| 6,749
| 5.825641
| 0.435897
| 0.007923
| 0.007923
| 0.010563
| 0.37654
| 0.330106
| 0.305458
| 0.231514
| 0.215889
| 0.215889
| 0
| 0.26852
| 0.077937
| 6,749
| 7
| 6,299
| 964.142857
| 0.461674
| 0.033931
| 0
| 0
| 0
| 0
| 0.631829
| 0.134285
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 7
|
dd6374321202c04d2e14fb1f005b96daccd1a28b
| 36
|
py
|
Python
|
csv_json/__init__.py
|
Rerice/Csv_json_converter
|
54bf0f839d8fff203c1cf96812b96af915449fef
|
[
"MIT"
] | 3
|
2021-06-02T15:32:45.000Z
|
2021-12-13T10:12:25.000Z
|
csv_json/__init__.py
|
Rerice/Csv_json_converter
|
54bf0f839d8fff203c1cf96812b96af915449fef
|
[
"MIT"
] | null | null | null |
csv_json/__init__.py
|
Rerice/Csv_json_converter
|
54bf0f839d8fff203c1cf96812b96af915449fef
|
[
"MIT"
] | 2
|
2021-06-02T15:30:42.000Z
|
2021-06-02T17:28:41.000Z
|
from csv_json.csv_json_conv import *
| 36
| 36
| 0.861111
| 7
| 36
| 4
| 0.714286
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 36
| 1
| 36
| 36
| 0.848485
| 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
|
dd67b0be318886c07c1697a2ac8415ae63718592
| 71,403
|
py
|
Python
|
venv/lib/python3.8/site-packages/spaceone/api/monitoring/v1/alert_pb2.py
|
choonho/plugin-prometheus-mon-webhook
|
afa7d65d12715fd0480fb4f92a9c62da2d6128e0
|
[
"Apache-2.0"
] | null | null | null |
venv/lib/python3.8/site-packages/spaceone/api/monitoring/v1/alert_pb2.py
|
choonho/plugin-prometheus-mon-webhook
|
afa7d65d12715fd0480fb4f92a9c62da2d6128e0
|
[
"Apache-2.0"
] | null | null | null |
venv/lib/python3.8/site-packages/spaceone/api/monitoring/v1/alert_pb2.py
|
choonho/plugin-prometheus-mon-webhook
|
afa7d65d12715fd0480fb4f92a9c62da2d6128e0
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: spaceone/api/monitoring/v1/alert.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from spaceone.api.core.v1 import query_pb2 as spaceone_dot_api_dot_core_dot_v1_dot_query__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='spaceone/api/monitoring/v1/alert.proto',
package='spaceone.api.monitoring.v1',
syntax='proto3',
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n&spaceone/api/monitoring/v1/alert.proto\x12\x1aspaceone.api.monitoring.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a spaceone/api/core/v1/query.proto\"I\n\rAlertResource\x12\x13\n\x0bresource_id\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"<\n\x0e\x41lertResponder\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x13\n\x0bresource_id\x18\x02 \x01(\t\"\xac\x01\n\x12\x43reateAlertRequest\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x10\n\x08\x61ssignee\x18\x03 \x01(\t\x12\x39\n\x07urgency\x18\x04 \x01(\x0e\x32(.spaceone.api.monitoring.v1.AlertUrgency\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12\x11\n\tdomain_id\x18\x0b \x01(\t\"\xb6\x02\n\x12UpdateAlertRequest\x12\x10\n\x08\x61lert_id\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\r\n\x05state\x18\x03 \x01(\t\x12\x16\n\x0estatus_message\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x10\n\x08\x61ssignee\x18\x06 \x01(\t\x12\x39\n\x07urgency\x18\x07 \x01(\x0e\x32(.spaceone.api.monitoring.v1.AlertUrgency\x12\x12\n\nproject_id\x18\x08 \x01(\t\x12\x1c\n\x14reset_status_message\x18\x0b \x01(\x08\x12\x19\n\x11reset_description\x18\x0c \x01(\x08\x12\x16\n\x0ereset_assignee\x18\r \x01(\x08\x12\x11\n\tdomain_id\x18\x15 \x01(\t\"N\n\x17UpdateAlertStateRequest\x12\x10\n\x08\x61lert_id\x18\x01 \x01(\t\x12\x12\n\naccess_key\x18\x02 \x01(\t\x12\r\n\x05state\x18\x03 \x01(\t\"H\n\x11MergeAlertRequest\x12\x0e\n\x06\x61lerts\x18\x01 \x03(\t\x12\x10\n\x08merge_to\x18\x02 \x01(\t\x12\x11\n\tdomain_id\x18\x03 \x01(\t\"K\n\x12SnoozeAlertRequest\x12\x10\n\x08\x61lert_id\x18\x01 \x01(\t\x12\x10\n\x08\x65nd_time\x18\x02 \x01(\t\x12\x11\n\tdomain_id\x18\x03 \x01(\t\"h\n\x15\x41lertResponderRequest\x12\x10\n\x08\x61lert_id\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x13\n\x0bresource_id\x18\x03 \x01(\t\x12\x11\n\tdomain_id\x18\x04 \x01(\t\"X\n\x1d\x41lertProjectDependencyRequest\x12\x10\n\x08\x61lert_id\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x11\n\tdomain_id\x18\x03 \x01(\t\"3\n\x0c\x41lertRequest\x12\x10\n\x08\x61lert_id\x18\x01 \x01(\t\x12\x11\n\tdomain_id\x18\x02 \x01(\t\"D\n\x0fGetAlertRequest\x12\x10\n\x08\x61lert_id\x18\x01 \x01(\t\x12\x11\n\tdomain_id\x18\x02 \x01(\t\x12\x0c\n\x04only\x18\x03 \x03(\t\"\x9d\x03\n\nAlertQuery\x12*\n\x05query\x18\x01 \x01(\x0b\x32\x1b.spaceone.api.core.v1.Query\x12\x14\n\x0c\x61lert_number\x18\x02 \x01(\x05\x12\x10\n\x08\x61lert_id\x18\x03 \x01(\t\x12\r\n\x05title\x18\x04 \x01(\t\x12\x35\n\x05state\x18\x05 \x01(\x0e\x32&.spaceone.api.monitoring.v1.AlertState\x12\x10\n\x08\x61ssignee\x18\x06 \x01(\t\x12\x39\n\x07urgency\x18\x07 \x01(\x0e\x32(.spaceone.api.monitoring.v1.AlertUrgency\x12\x10\n\x08severity\x18\x08 \x01(\t\x12\x12\n\nis_snoozed\x18\t \x01(\t\x12\x13\n\x0bresource_id\x18\n \x01(\t\x12\x14\n\x0ctriggered_by\x18\x0b \x01(\t\x12\x12\n\nwebhook_id\x18\x0c \x01(\t\x12\x1c\n\x14\x65scalation_policy_id\x18\r \x01(\t\x12\x12\n\nproject_id\x18\x0e \x01(\t\x12\x11\n\tdomain_id\x18\x0f \x01(\t\"\x9a\x06\n\tAlertInfo\x12\x14\n\x0c\x61lert_number\x18\x01 \x01(\x05\x12\x10\n\x08\x61lert_id\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x35\n\x05state\x18\x04 \x01(\x0e\x32&.spaceone.api.monitoring.v1.AlertState\x12\x16\n\x0estatus_message\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x10\n\x08\x61ssignee\x18\x07 \x01(\t\x12\x39\n\x07urgency\x18\x08 \x01(\x0e\x32(.spaceone.api.monitoring.v1.AlertUrgency\x12\x10\n\x08severity\x18\t \x01(\t\x12\x0c\n\x04rule\x18\n \x01(\t\x12;\n\x08resource\x18\x0b \x01(\x0b\x32).spaceone.api.monitoring.v1.AlertResource\x12\x30\n\x0f\x61\x64\x64itional_info\x18\x0c \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x12\n\nis_snoozed\x18\r \x01(\x08\x12\x18\n\x10snoozed_end_time\x18\x0e \x01(\t\x12\x17\n\x0f\x65scalation_step\x18\x0f \x01(\x05\x12\x16\n\x0e\x65scalation_ttl\x18\x10 \x01(\x05\x12>\n\nresponders\x18\x11 \x03(\x0b\x32*.spaceone.api.monitoring.v1.AlertResponder\x12\x1c\n\x14project_dependencies\x18\x12 \x03(\t\x12\x14\n\x0ctriggered_by\x18\x15 \x01(\t\x12\x12\n\nwebhook_id\x18\x16 \x01(\t\x12\x1c\n\x14\x65scalation_policy_id\x18\x17 \x01(\t\x12\x12\n\nproject_id\x18\x18 \x01(\t\x12\x11\n\tdomain_id\x18\x19 \x01(\t\x12\x12\n\ncreated_at\x18\x1f \x01(\t\x12\x12\n\nupdated_at\x18 \x01(\t\x12\x17\n\x0f\x61\x63knowledged_at\x18! \x01(\t\x12\x13\n\x0bresolved_at\x18\" \x01(\t\x12\x14\n\x0c\x65scalated_at\x18# \x01(\t\"Y\n\nAlertsInfo\x12\x36\n\x07results\x18\x01 \x03(\x0b\x32%.spaceone.api.monitoring.v1.AlertInfo\x12\x13\n\x0btotal_count\x18\x02 \x01(\x05\"Y\n\x0e\x41lertStatQuery\x12\x34\n\x05query\x18\x01 \x01(\x0b\x32%.spaceone.api.core.v1.StatisticsQuery\x12\x11\n\tdomain_id\x18\x02 \x01(\t*9\n\x0c\x41lertUrgency\x12\x16\n\x12\x41LERT_URGENCY_NONE\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\x07\n\x03LOW\x10\x02*\\\n\nAlertState\x12\x14\n\x10\x41LERT_STATE_NONE\x10\x00\x12\r\n\tTRIGGERED\x10\x01\x12\x10\n\x0c\x41\x43KNOWLEDGED\x10\x02\x12\x0c\n\x08RESOLVED\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x32\x9e\x0f\n\x05\x41lert\x12~\n\x06\x63reate\x12..spaceone.api.monitoring.v1.CreateAlertRequest\x1a%.spaceone.api.monitoring.v1.AlertInfo\"\x1d\x82\xd3\xe4\x93\x02\x17\"\x15/monitoring/v1/alerts\x12\x88\x01\n\x06update\x12..spaceone.api.monitoring.v1.UpdateAlertRequest\x1a%.spaceone.api.monitoring.v1.AlertInfo\"\'\x82\xd3\xe4\x93\x02!\x1a\x1f/monitoring/v1/alert/{alert_id}\x12\xa8\x01\n\x0cupdate_state\x12\x33.spaceone.api.monitoring.v1.UpdateAlertStateRequest\x1a%.spaceone.api.monitoring.v1.AlertInfo\"<\x82\xd3\xe4\x93\x02\x36\"4/monitoring/v1/alert/{alert_id}/{access_key}/{state}\x12\x82\x01\n\x05merge\x12-.spaceone.api.monitoring.v1.MergeAlertRequest\x1a%.spaceone.api.monitoring.v1.AlertInfo\"#\x82\xd3\xe4\x93\x02\x1d\"\x1b/monitoring/v1/alerts/merge\x12\x8f\x01\n\x06snooze\x12..spaceone.api.monitoring.v1.SnoozeAlertRequest\x1a%.spaceone.api.monitoring.v1.AlertInfo\".\x82\xd3\xe4\x93\x02(\"&/monitoring/v1/alert/{alert_id}/snooze\x12\x9d\x01\n\radd_responder\x12\x31.spaceone.api.monitoring.v1.AlertResponderRequest\x1a%.spaceone.api.monitoring.v1.AlertInfo\"2\x82\xd3\xe4\x93\x02,\"*/monitoring/v1/alert/{alert_id}/responders\x12\xa0\x01\n\x10remove_responder\x12\x31.spaceone.api.monitoring.v1.AlertResponderRequest\x1a%.spaceone.api.monitoring.v1.AlertInfo\"2\x82\xd3\xe4\x93\x02,**/monitoring/v1/alert/{alert_id}/responders\x12\xb8\x01\n\x16\x61\x64\x64_project_dependency\x12\x39.spaceone.api.monitoring.v1.AlertProjectDependencyRequest\x1a%.spaceone.api.monitoring.v1.AlertInfo\"<\x82\xd3\xe4\x93\x02\x36\"4/monitoring/v1/alert/{alert_id}/project-dependencies\x12\xc6\x01\n\x19remove_project_dependency\x12\x39.spaceone.api.monitoring.v1.AlertProjectDependencyRequest\x1a%.spaceone.api.monitoring.v1.AlertInfo\"G\x82\xd3\xe4\x93\x02\x41*?/monitoring/v1/alert/{alert_id}/project-dependency/{project_id}\x12s\n\x06\x64\x65lete\x12(.spaceone.api.monitoring.v1.AlertRequest\x1a\x16.google.protobuf.Empty\"\'\x82\xd3\xe4\x93\x02!*\x1f/monitoring/v1/alert/{alert_id}\x12\x82\x01\n\x03get\x12+.spaceone.api.monitoring.v1.GetAlertRequest\x1a%.spaceone.api.monitoring.v1.AlertInfo\"\'\x82\xd3\xe4\x93\x02!\x12\x1f/monitoring/v1/alert/{alert_id}\x12\x95\x01\n\x04list\x12&.spaceone.api.monitoring.v1.AlertQuery\x1a&.spaceone.api.monitoring.v1.AlertsInfo\"=\x82\xd3\xe4\x93\x02\x37\x12\x15/monitoring/v1/alertsZ\x1e\"\x1c/monitoring/v1/alerts/search\x12o\n\x04stat\x12*.spaceone.api.monitoring.v1.AlertStatQuery\x1a\x17.google.protobuf.Struct\"\"\x82\xd3\xe4\x93\x02\x1c\"\x1a/monitoring/v1/alerts/statb\x06proto3'
,
dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,spaceone_dot_api_dot_core_dot_v1_dot_query__pb2.DESCRIPTOR,])
_ALERTURGENCY = _descriptor.EnumDescriptor(
name='AlertUrgency',
full_name='spaceone.api.monitoring.v1.AlertUrgency',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='ALERT_URGENCY_NONE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='HIGH', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='LOW', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=2763,
serialized_end=2820,
)
_sym_db.RegisterEnumDescriptor(_ALERTURGENCY)
AlertUrgency = enum_type_wrapper.EnumTypeWrapper(_ALERTURGENCY)
_ALERTSTATE = _descriptor.EnumDescriptor(
name='AlertState',
full_name='spaceone.api.monitoring.v1.AlertState',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='ALERT_STATE_NONE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='TRIGGERED', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='ACKNOWLEDGED', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='RESOLVED', index=3, number=3,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='ERROR', index=4, number=4,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=2822,
serialized_end=2914,
)
_sym_db.RegisterEnumDescriptor(_ALERTSTATE)
AlertState = enum_type_wrapper.EnumTypeWrapper(_ALERTSTATE)
ALERT_URGENCY_NONE = 0
HIGH = 1
LOW = 2
ALERT_STATE_NONE = 0
TRIGGERED = 1
ACKNOWLEDGED = 2
RESOLVED = 3
ERROR = 4
_ALERTRESOURCE = _descriptor.Descriptor(
name='AlertResource',
full_name='spaceone.api.monitoring.v1.AlertResource',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='resource_id', full_name='spaceone.api.monitoring.v1.AlertResource.resource_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource_type', full_name='spaceone.api.monitoring.v1.AlertResource.resource_type', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.monitoring.v1.AlertResource.name', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=193,
serialized_end=266,
)
_ALERTRESPONDER = _descriptor.Descriptor(
name='AlertResponder',
full_name='spaceone.api.monitoring.v1.AlertResponder',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='resource_type', full_name='spaceone.api.monitoring.v1.AlertResponder.resource_type', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource_id', full_name='spaceone.api.monitoring.v1.AlertResponder.resource_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=268,
serialized_end=328,
)
_CREATEALERTREQUEST = _descriptor.Descriptor(
name='CreateAlertRequest',
full_name='spaceone.api.monitoring.v1.CreateAlertRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='title', full_name='spaceone.api.monitoring.v1.CreateAlertRequest.title', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='description', full_name='spaceone.api.monitoring.v1.CreateAlertRequest.description', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='assignee', full_name='spaceone.api.monitoring.v1.CreateAlertRequest.assignee', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='urgency', full_name='spaceone.api.monitoring.v1.CreateAlertRequest.urgency', index=3,
number=4, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_id', full_name='spaceone.api.monitoring.v1.CreateAlertRequest.project_id', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.CreateAlertRequest.domain_id', index=5,
number=11, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=331,
serialized_end=503,
)
_UPDATEALERTREQUEST = _descriptor.Descriptor(
name='UpdateAlertRequest',
full_name='spaceone.api.monitoring.v1.UpdateAlertRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='alert_id', full_name='spaceone.api.monitoring.v1.UpdateAlertRequest.alert_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='title', full_name='spaceone.api.monitoring.v1.UpdateAlertRequest.title', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='state', full_name='spaceone.api.monitoring.v1.UpdateAlertRequest.state', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='status_message', full_name='spaceone.api.monitoring.v1.UpdateAlertRequest.status_message', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='description', full_name='spaceone.api.monitoring.v1.UpdateAlertRequest.description', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='assignee', full_name='spaceone.api.monitoring.v1.UpdateAlertRequest.assignee', index=5,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='urgency', full_name='spaceone.api.monitoring.v1.UpdateAlertRequest.urgency', index=6,
number=7, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_id', full_name='spaceone.api.monitoring.v1.UpdateAlertRequest.project_id', index=7,
number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='reset_status_message', full_name='spaceone.api.monitoring.v1.UpdateAlertRequest.reset_status_message', index=8,
number=11, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='reset_description', full_name='spaceone.api.monitoring.v1.UpdateAlertRequest.reset_description', index=9,
number=12, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='reset_assignee', full_name='spaceone.api.monitoring.v1.UpdateAlertRequest.reset_assignee', index=10,
number=13, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.UpdateAlertRequest.domain_id', index=11,
number=21, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=506,
serialized_end=816,
)
_UPDATEALERTSTATEREQUEST = _descriptor.Descriptor(
name='UpdateAlertStateRequest',
full_name='spaceone.api.monitoring.v1.UpdateAlertStateRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='alert_id', full_name='spaceone.api.monitoring.v1.UpdateAlertStateRequest.alert_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='access_key', full_name='spaceone.api.monitoring.v1.UpdateAlertStateRequest.access_key', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='state', full_name='spaceone.api.monitoring.v1.UpdateAlertStateRequest.state', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=818,
serialized_end=896,
)
_MERGEALERTREQUEST = _descriptor.Descriptor(
name='MergeAlertRequest',
full_name='spaceone.api.monitoring.v1.MergeAlertRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='alerts', full_name='spaceone.api.monitoring.v1.MergeAlertRequest.alerts', index=0,
number=1, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='merge_to', full_name='spaceone.api.monitoring.v1.MergeAlertRequest.merge_to', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.MergeAlertRequest.domain_id', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=898,
serialized_end=970,
)
_SNOOZEALERTREQUEST = _descriptor.Descriptor(
name='SnoozeAlertRequest',
full_name='spaceone.api.monitoring.v1.SnoozeAlertRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='alert_id', full_name='spaceone.api.monitoring.v1.SnoozeAlertRequest.alert_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='end_time', full_name='spaceone.api.monitoring.v1.SnoozeAlertRequest.end_time', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.SnoozeAlertRequest.domain_id', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=972,
serialized_end=1047,
)
_ALERTRESPONDERREQUEST = _descriptor.Descriptor(
name='AlertResponderRequest',
full_name='spaceone.api.monitoring.v1.AlertResponderRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='alert_id', full_name='spaceone.api.monitoring.v1.AlertResponderRequest.alert_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource_type', full_name='spaceone.api.monitoring.v1.AlertResponderRequest.resource_type', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource_id', full_name='spaceone.api.monitoring.v1.AlertResponderRequest.resource_id', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.AlertResponderRequest.domain_id', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1049,
serialized_end=1153,
)
_ALERTPROJECTDEPENDENCYREQUEST = _descriptor.Descriptor(
name='AlertProjectDependencyRequest',
full_name='spaceone.api.monitoring.v1.AlertProjectDependencyRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='alert_id', full_name='spaceone.api.monitoring.v1.AlertProjectDependencyRequest.alert_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_id', full_name='spaceone.api.monitoring.v1.AlertProjectDependencyRequest.project_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.AlertProjectDependencyRequest.domain_id', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1155,
serialized_end=1243,
)
_ALERTREQUEST = _descriptor.Descriptor(
name='AlertRequest',
full_name='spaceone.api.monitoring.v1.AlertRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='alert_id', full_name='spaceone.api.monitoring.v1.AlertRequest.alert_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.AlertRequest.domain_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1245,
serialized_end=1296,
)
_GETALERTREQUEST = _descriptor.Descriptor(
name='GetAlertRequest',
full_name='spaceone.api.monitoring.v1.GetAlertRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='alert_id', full_name='spaceone.api.monitoring.v1.GetAlertRequest.alert_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.GetAlertRequest.domain_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='only', full_name='spaceone.api.monitoring.v1.GetAlertRequest.only', index=2,
number=3, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1298,
serialized_end=1366,
)
_ALERTQUERY = _descriptor.Descriptor(
name='AlertQuery',
full_name='spaceone.api.monitoring.v1.AlertQuery',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='query', full_name='spaceone.api.monitoring.v1.AlertQuery.query', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='alert_number', full_name='spaceone.api.monitoring.v1.AlertQuery.alert_number', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='alert_id', full_name='spaceone.api.monitoring.v1.AlertQuery.alert_id', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='title', full_name='spaceone.api.monitoring.v1.AlertQuery.title', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='state', full_name='spaceone.api.monitoring.v1.AlertQuery.state', index=4,
number=5, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='assignee', full_name='spaceone.api.monitoring.v1.AlertQuery.assignee', index=5,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='urgency', full_name='spaceone.api.monitoring.v1.AlertQuery.urgency', index=6,
number=7, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='severity', full_name='spaceone.api.monitoring.v1.AlertQuery.severity', index=7,
number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='is_snoozed', full_name='spaceone.api.monitoring.v1.AlertQuery.is_snoozed', index=8,
number=9, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource_id', full_name='spaceone.api.monitoring.v1.AlertQuery.resource_id', index=9,
number=10, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='triggered_by', full_name='spaceone.api.monitoring.v1.AlertQuery.triggered_by', index=10,
number=11, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='webhook_id', full_name='spaceone.api.monitoring.v1.AlertQuery.webhook_id', index=11,
number=12, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='escalation_policy_id', full_name='spaceone.api.monitoring.v1.AlertQuery.escalation_policy_id', index=12,
number=13, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_id', full_name='spaceone.api.monitoring.v1.AlertQuery.project_id', index=13,
number=14, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.AlertQuery.domain_id', index=14,
number=15, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1369,
serialized_end=1782,
)
_ALERTINFO = _descriptor.Descriptor(
name='AlertInfo',
full_name='spaceone.api.monitoring.v1.AlertInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='alert_number', full_name='spaceone.api.monitoring.v1.AlertInfo.alert_number', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='alert_id', full_name='spaceone.api.monitoring.v1.AlertInfo.alert_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='title', full_name='spaceone.api.monitoring.v1.AlertInfo.title', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='state', full_name='spaceone.api.monitoring.v1.AlertInfo.state', index=3,
number=4, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='status_message', full_name='spaceone.api.monitoring.v1.AlertInfo.status_message', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='description', full_name='spaceone.api.monitoring.v1.AlertInfo.description', index=5,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='assignee', full_name='spaceone.api.monitoring.v1.AlertInfo.assignee', index=6,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='urgency', full_name='spaceone.api.monitoring.v1.AlertInfo.urgency', index=7,
number=8, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='severity', full_name='spaceone.api.monitoring.v1.AlertInfo.severity', index=8,
number=9, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='rule', full_name='spaceone.api.monitoring.v1.AlertInfo.rule', index=9,
number=10, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resource', full_name='spaceone.api.monitoring.v1.AlertInfo.resource', index=10,
number=11, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='additional_info', full_name='spaceone.api.monitoring.v1.AlertInfo.additional_info', index=11,
number=12, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='is_snoozed', full_name='spaceone.api.monitoring.v1.AlertInfo.is_snoozed', index=12,
number=13, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='snoozed_end_time', full_name='spaceone.api.monitoring.v1.AlertInfo.snoozed_end_time', index=13,
number=14, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='escalation_step', full_name='spaceone.api.monitoring.v1.AlertInfo.escalation_step', index=14,
number=15, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='escalation_ttl', full_name='spaceone.api.monitoring.v1.AlertInfo.escalation_ttl', index=15,
number=16, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='responders', full_name='spaceone.api.monitoring.v1.AlertInfo.responders', index=16,
number=17, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_dependencies', full_name='spaceone.api.monitoring.v1.AlertInfo.project_dependencies', index=17,
number=18, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='triggered_by', full_name='spaceone.api.monitoring.v1.AlertInfo.triggered_by', index=18,
number=21, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='webhook_id', full_name='spaceone.api.monitoring.v1.AlertInfo.webhook_id', index=19,
number=22, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='escalation_policy_id', full_name='spaceone.api.monitoring.v1.AlertInfo.escalation_policy_id', index=20,
number=23, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_id', full_name='spaceone.api.monitoring.v1.AlertInfo.project_id', index=21,
number=24, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.AlertInfo.domain_id', index=22,
number=25, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='created_at', full_name='spaceone.api.monitoring.v1.AlertInfo.created_at', index=23,
number=31, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='updated_at', full_name='spaceone.api.monitoring.v1.AlertInfo.updated_at', index=24,
number=32, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='acknowledged_at', full_name='spaceone.api.monitoring.v1.AlertInfo.acknowledged_at', index=25,
number=33, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='resolved_at', full_name='spaceone.api.monitoring.v1.AlertInfo.resolved_at', index=26,
number=34, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='escalated_at', full_name='spaceone.api.monitoring.v1.AlertInfo.escalated_at', index=27,
number=35, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1785,
serialized_end=2579,
)
_ALERTSINFO = _descriptor.Descriptor(
name='AlertsInfo',
full_name='spaceone.api.monitoring.v1.AlertsInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='results', full_name='spaceone.api.monitoring.v1.AlertsInfo.results', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='total_count', full_name='spaceone.api.monitoring.v1.AlertsInfo.total_count', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2581,
serialized_end=2670,
)
_ALERTSTATQUERY = _descriptor.Descriptor(
name='AlertStatQuery',
full_name='spaceone.api.monitoring.v1.AlertStatQuery',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='query', full_name='spaceone.api.monitoring.v1.AlertStatQuery.query', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.AlertStatQuery.domain_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2672,
serialized_end=2761,
)
_CREATEALERTREQUEST.fields_by_name['urgency'].enum_type = _ALERTURGENCY
_UPDATEALERTREQUEST.fields_by_name['urgency'].enum_type = _ALERTURGENCY
_ALERTQUERY.fields_by_name['query'].message_type = spaceone_dot_api_dot_core_dot_v1_dot_query__pb2._QUERY
_ALERTQUERY.fields_by_name['state'].enum_type = _ALERTSTATE
_ALERTQUERY.fields_by_name['urgency'].enum_type = _ALERTURGENCY
_ALERTINFO.fields_by_name['state'].enum_type = _ALERTSTATE
_ALERTINFO.fields_by_name['urgency'].enum_type = _ALERTURGENCY
_ALERTINFO.fields_by_name['resource'].message_type = _ALERTRESOURCE
_ALERTINFO.fields_by_name['additional_info'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_ALERTINFO.fields_by_name['responders'].message_type = _ALERTRESPONDER
_ALERTSINFO.fields_by_name['results'].message_type = _ALERTINFO
_ALERTSTATQUERY.fields_by_name['query'].message_type = spaceone_dot_api_dot_core_dot_v1_dot_query__pb2._STATISTICSQUERY
DESCRIPTOR.message_types_by_name['AlertResource'] = _ALERTRESOURCE
DESCRIPTOR.message_types_by_name['AlertResponder'] = _ALERTRESPONDER
DESCRIPTOR.message_types_by_name['CreateAlertRequest'] = _CREATEALERTREQUEST
DESCRIPTOR.message_types_by_name['UpdateAlertRequest'] = _UPDATEALERTREQUEST
DESCRIPTOR.message_types_by_name['UpdateAlertStateRequest'] = _UPDATEALERTSTATEREQUEST
DESCRIPTOR.message_types_by_name['MergeAlertRequest'] = _MERGEALERTREQUEST
DESCRIPTOR.message_types_by_name['SnoozeAlertRequest'] = _SNOOZEALERTREQUEST
DESCRIPTOR.message_types_by_name['AlertResponderRequest'] = _ALERTRESPONDERREQUEST
DESCRIPTOR.message_types_by_name['AlertProjectDependencyRequest'] = _ALERTPROJECTDEPENDENCYREQUEST
DESCRIPTOR.message_types_by_name['AlertRequest'] = _ALERTREQUEST
DESCRIPTOR.message_types_by_name['GetAlertRequest'] = _GETALERTREQUEST
DESCRIPTOR.message_types_by_name['AlertQuery'] = _ALERTQUERY
DESCRIPTOR.message_types_by_name['AlertInfo'] = _ALERTINFO
DESCRIPTOR.message_types_by_name['AlertsInfo'] = _ALERTSINFO
DESCRIPTOR.message_types_by_name['AlertStatQuery'] = _ALERTSTATQUERY
DESCRIPTOR.enum_types_by_name['AlertUrgency'] = _ALERTURGENCY
DESCRIPTOR.enum_types_by_name['AlertState'] = _ALERTSTATE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
AlertResource = _reflection.GeneratedProtocolMessageType('AlertResource', (_message.Message,), {
'DESCRIPTOR' : _ALERTRESOURCE,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.AlertResource)
})
_sym_db.RegisterMessage(AlertResource)
AlertResponder = _reflection.GeneratedProtocolMessageType('AlertResponder', (_message.Message,), {
'DESCRIPTOR' : _ALERTRESPONDER,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.AlertResponder)
})
_sym_db.RegisterMessage(AlertResponder)
CreateAlertRequest = _reflection.GeneratedProtocolMessageType('CreateAlertRequest', (_message.Message,), {
'DESCRIPTOR' : _CREATEALERTREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.CreateAlertRequest)
})
_sym_db.RegisterMessage(CreateAlertRequest)
UpdateAlertRequest = _reflection.GeneratedProtocolMessageType('UpdateAlertRequest', (_message.Message,), {
'DESCRIPTOR' : _UPDATEALERTREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.UpdateAlertRequest)
})
_sym_db.RegisterMessage(UpdateAlertRequest)
UpdateAlertStateRequest = _reflection.GeneratedProtocolMessageType('UpdateAlertStateRequest', (_message.Message,), {
'DESCRIPTOR' : _UPDATEALERTSTATEREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.UpdateAlertStateRequest)
})
_sym_db.RegisterMessage(UpdateAlertStateRequest)
MergeAlertRequest = _reflection.GeneratedProtocolMessageType('MergeAlertRequest', (_message.Message,), {
'DESCRIPTOR' : _MERGEALERTREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.MergeAlertRequest)
})
_sym_db.RegisterMessage(MergeAlertRequest)
SnoozeAlertRequest = _reflection.GeneratedProtocolMessageType('SnoozeAlertRequest', (_message.Message,), {
'DESCRIPTOR' : _SNOOZEALERTREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.SnoozeAlertRequest)
})
_sym_db.RegisterMessage(SnoozeAlertRequest)
AlertResponderRequest = _reflection.GeneratedProtocolMessageType('AlertResponderRequest', (_message.Message,), {
'DESCRIPTOR' : _ALERTRESPONDERREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.AlertResponderRequest)
})
_sym_db.RegisterMessage(AlertResponderRequest)
AlertProjectDependencyRequest = _reflection.GeneratedProtocolMessageType('AlertProjectDependencyRequest', (_message.Message,), {
'DESCRIPTOR' : _ALERTPROJECTDEPENDENCYREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.AlertProjectDependencyRequest)
})
_sym_db.RegisterMessage(AlertProjectDependencyRequest)
AlertRequest = _reflection.GeneratedProtocolMessageType('AlertRequest', (_message.Message,), {
'DESCRIPTOR' : _ALERTREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.AlertRequest)
})
_sym_db.RegisterMessage(AlertRequest)
GetAlertRequest = _reflection.GeneratedProtocolMessageType('GetAlertRequest', (_message.Message,), {
'DESCRIPTOR' : _GETALERTREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.GetAlertRequest)
})
_sym_db.RegisterMessage(GetAlertRequest)
AlertQuery = _reflection.GeneratedProtocolMessageType('AlertQuery', (_message.Message,), {
'DESCRIPTOR' : _ALERTQUERY,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.AlertQuery)
})
_sym_db.RegisterMessage(AlertQuery)
AlertInfo = _reflection.GeneratedProtocolMessageType('AlertInfo', (_message.Message,), {
'DESCRIPTOR' : _ALERTINFO,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.AlertInfo)
})
_sym_db.RegisterMessage(AlertInfo)
AlertsInfo = _reflection.GeneratedProtocolMessageType('AlertsInfo', (_message.Message,), {
'DESCRIPTOR' : _ALERTSINFO,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.AlertsInfo)
})
_sym_db.RegisterMessage(AlertsInfo)
AlertStatQuery = _reflection.GeneratedProtocolMessageType('AlertStatQuery', (_message.Message,), {
'DESCRIPTOR' : _ALERTSTATQUERY,
'__module__' : 'spaceone.api.monitoring.v1.alert_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.AlertStatQuery)
})
_sym_db.RegisterMessage(AlertStatQuery)
_ALERT = _descriptor.ServiceDescriptor(
name='Alert',
full_name='spaceone.api.monitoring.v1.Alert',
file=DESCRIPTOR,
index=0,
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_start=2917,
serialized_end=4867,
methods=[
_descriptor.MethodDescriptor(
name='create',
full_name='spaceone.api.monitoring.v1.Alert.create',
index=0,
containing_service=None,
input_type=_CREATEALERTREQUEST,
output_type=_ALERTINFO,
serialized_options=b'\202\323\344\223\002\027\"\025/monitoring/v1/alerts',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='update',
full_name='spaceone.api.monitoring.v1.Alert.update',
index=1,
containing_service=None,
input_type=_UPDATEALERTREQUEST,
output_type=_ALERTINFO,
serialized_options=b'\202\323\344\223\002!\032\037/monitoring/v1/alert/{alert_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='update_state',
full_name='spaceone.api.monitoring.v1.Alert.update_state',
index=2,
containing_service=None,
input_type=_UPDATEALERTSTATEREQUEST,
output_type=_ALERTINFO,
serialized_options=b'\202\323\344\223\0026\"4/monitoring/v1/alert/{alert_id}/{access_key}/{state}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='merge',
full_name='spaceone.api.monitoring.v1.Alert.merge',
index=3,
containing_service=None,
input_type=_MERGEALERTREQUEST,
output_type=_ALERTINFO,
serialized_options=b'\202\323\344\223\002\035\"\033/monitoring/v1/alerts/merge',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='snooze',
full_name='spaceone.api.monitoring.v1.Alert.snooze',
index=4,
containing_service=None,
input_type=_SNOOZEALERTREQUEST,
output_type=_ALERTINFO,
serialized_options=b'\202\323\344\223\002(\"&/monitoring/v1/alert/{alert_id}/snooze',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='add_responder',
full_name='spaceone.api.monitoring.v1.Alert.add_responder',
index=5,
containing_service=None,
input_type=_ALERTRESPONDERREQUEST,
output_type=_ALERTINFO,
serialized_options=b'\202\323\344\223\002,\"*/monitoring/v1/alert/{alert_id}/responders',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='remove_responder',
full_name='spaceone.api.monitoring.v1.Alert.remove_responder',
index=6,
containing_service=None,
input_type=_ALERTRESPONDERREQUEST,
output_type=_ALERTINFO,
serialized_options=b'\202\323\344\223\002,**/monitoring/v1/alert/{alert_id}/responders',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='add_project_dependency',
full_name='spaceone.api.monitoring.v1.Alert.add_project_dependency',
index=7,
containing_service=None,
input_type=_ALERTPROJECTDEPENDENCYREQUEST,
output_type=_ALERTINFO,
serialized_options=b'\202\323\344\223\0026\"4/monitoring/v1/alert/{alert_id}/project-dependencies',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='remove_project_dependency',
full_name='spaceone.api.monitoring.v1.Alert.remove_project_dependency',
index=8,
containing_service=None,
input_type=_ALERTPROJECTDEPENDENCYREQUEST,
output_type=_ALERTINFO,
serialized_options=b'\202\323\344\223\002A*?/monitoring/v1/alert/{alert_id}/project-dependency/{project_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='delete',
full_name='spaceone.api.monitoring.v1.Alert.delete',
index=9,
containing_service=None,
input_type=_ALERTREQUEST,
output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
serialized_options=b'\202\323\344\223\002!*\037/monitoring/v1/alert/{alert_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='get',
full_name='spaceone.api.monitoring.v1.Alert.get',
index=10,
containing_service=None,
input_type=_GETALERTREQUEST,
output_type=_ALERTINFO,
serialized_options=b'\202\323\344\223\002!\022\037/monitoring/v1/alert/{alert_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='list',
full_name='spaceone.api.monitoring.v1.Alert.list',
index=11,
containing_service=None,
input_type=_ALERTQUERY,
output_type=_ALERTSINFO,
serialized_options=b'\202\323\344\223\0027\022\025/monitoring/v1/alertsZ\036\"\034/monitoring/v1/alerts/search',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='stat',
full_name='spaceone.api.monitoring.v1.Alert.stat',
index=12,
containing_service=None,
input_type=_ALERTSTATQUERY,
output_type=google_dot_protobuf_dot_struct__pb2._STRUCT,
serialized_options=b'\202\323\344\223\002\034\"\032/monitoring/v1/alerts/stat',
create_key=_descriptor._internal_create_key,
),
])
_sym_db.RegisterServiceDescriptor(_ALERT)
DESCRIPTOR.services_by_name['Alert'] = _ALERT
# @@protoc_insertion_point(module_scope)
| 50.676366
| 7,646
| 0.759086
| 9,370
| 71,403
| 5.489541
| 0.04365
| 0.046348
| 0.083111
| 0.084511
| 0.829792
| 0.792387
| 0.778895
| 0.729941
| 0.692945
| 0.677645
| 0
| 0.044397
| 0.113273
| 71,403
| 1,408
| 7,647
| 50.712358
| 0.768001
| 0.020475
| 0
| 0.696307
| 1
| 0.01055
| 0.238772
| 0.202815
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.006782
| 0
| 0.006782
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
dd793146f92f3801277eeab8ef75d59d722ca146
| 5,581
|
py
|
Python
|
rdmo/questions/tests/test_validator_locked_questions.py
|
berkerY/rdmo
|
c0500f9b6caff9106a254a05e0d0e8018fc8db28
|
[
"Apache-2.0"
] | 77
|
2016-08-09T11:40:20.000Z
|
2022-03-06T11:03:26.000Z
|
rdmo/questions/tests/test_validator_locked_questions.py
|
MSpenger/rdmo
|
c0500f9b6caff9106a254a05e0d0e8018fc8db28
|
[
"Apache-2.0"
] | 377
|
2016-07-01T13:59:36.000Z
|
2022-03-30T13:53:19.000Z
|
rdmo/questions/tests/test_validator_locked_questions.py
|
MSpenger/rdmo
|
c0500f9b6caff9106a254a05e0d0e8018fc8db28
|
[
"Apache-2.0"
] | 47
|
2016-06-23T11:32:19.000Z
|
2022-03-01T11:34:37.000Z
|
import pytest
from django.core.exceptions import ValidationError
from rest_framework.exceptions import \
ValidationError as RestFameworkValidationError
from ..models import Question, QuestionSet
from ..serializers.v1 import QuestionSerializer
from ..validators import QuestionLockedValidator
def test_create(db):
QuestionLockedValidator()({
'questionset': QuestionSet.objects.first(),
'locked': False
})
def test_create_locked(db):
QuestionLockedValidator()({
'questionset': QuestionSet.objects.first(),
'locked': True
})
def test_update(db):
question = Question.objects.first()
QuestionLockedValidator(question)({
'questionset': question.questionset,
'locked': False
})
def test_update_error(db):
question = Question.objects.first()
question.locked = True
question.save()
with pytest.raises(ValidationError):
QuestionLockedValidator(question)({
'questionset': question.questionset,
'locked': True
})
def test_update_parent_error(db):
question = Question.objects.first()
question.questionset.locked = True
question.questionset.save()
with pytest.raises(ValidationError):
QuestionLockedValidator(question)({
'questionset': question.questionset,
'locked': False
})
def test_update_parent_parent_error(db):
question = Question.objects.first()
question.questionset.section.locked = True
question.questionset.section.save()
with pytest.raises(ValidationError):
QuestionLockedValidator(question)({
'questionset': question.questionset,
'locked': False
})
def test_update_parent_parent_parent_error(db):
question = Question.objects.first()
question.questionset.section.catalog.locked = True
question.questionset.section.catalog.save()
with pytest.raises(ValidationError):
QuestionLockedValidator(question)({
'questionset': question.questionset,
'locked': False
})
def test_update_lock(db):
question = Question.objects.first()
QuestionLockedValidator(question)({
'questionset': question.questionset,
'locked': True
})
def test_update_unlock(db):
question = Question.objects.first()
question.locked = True
question.save()
QuestionLockedValidator(question)({
'questionset': question.questionset,
'locked': False
})
def test_serializer_create(db):
validator = QuestionLockedValidator()
validator.set_context(QuestionSerializer())
validator({
'questionset': QuestionSet.objects.first(),
'locked': False
})
def test_serializer_create_locked(db):
validator = QuestionLockedValidator()
validator.set_context(QuestionSerializer())
validator({
'questionset': QuestionSet.objects.first(),
'locked': True
})
def test_serializer_update(db):
question = Question.objects.first()
validator = QuestionLockedValidator()
validator.set_context(QuestionSerializer(instance=question))
validator({
'questionset': question.questionset,
'locked': False
})
def test_serializer_update_error(db):
question = Question.objects.first()
question.locked = True
question.save()
validator = QuestionLockedValidator()
validator.set_context(QuestionSerializer(instance=question))
with pytest.raises(RestFameworkValidationError):
validator({
'questionset': question.questionset,
'locked': True
})
def test_serializer_update_parent_error(db):
question = Question.objects.first()
question.questionset.locked = True
question.questionset.save()
validator = QuestionLockedValidator()
validator.set_context(QuestionSerializer(instance=question))
with pytest.raises(RestFameworkValidationError):
validator({
'questionset': question.questionset,
'locked': True
})
def test_serializer_update_parent_parent_error(db):
question = Question.objects.first()
question.questionset.section.locked = True
question.questionset.section.save()
validator = QuestionLockedValidator()
validator.set_context(QuestionSerializer(instance=question))
with pytest.raises(RestFameworkValidationError):
validator({
'questionset': question.questionset,
'locked': True
})
def test_serializer_update_parent_parent_parent_error(db):
question = Question.objects.first()
question.questionset.section.catalog.locked = True
question.questionset.section.catalog.save()
validator = QuestionLockedValidator()
validator.set_context(QuestionSerializer(instance=question))
with pytest.raises(RestFameworkValidationError):
validator({
'questionset': question.questionset,
'locked': True
})
def test_serializer_update_lock(db):
question = Question.objects.first()
validator = QuestionLockedValidator()
validator.set_context(QuestionSerializer(instance=question))
validator({
'questionset': question.questionset,
'locked': True
})
def test_serializer_update_unlock(db):
question = Question.objects.first()
question.locked = True
question.save()
validator = QuestionLockedValidator()
validator.set_context(QuestionSerializer(instance=question))
validator({
'questionset': question.questionset,
'locked': False
})
| 25.600917
| 64
| 0.689124
| 486
| 5,581
| 7.783951
| 0.088477
| 0.170764
| 0.105736
| 0.092519
| 0.924927
| 0.924927
| 0.913296
| 0.897965
| 0.85752
| 0.836638
| 0
| 0.000227
| 0.209281
| 5,581
| 217
| 65
| 25.718894
| 0.857013
| 0
| 0
| 0.840764
| 0
| 0
| 0.054829
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.11465
| false
| 0
| 0.038217
| 0
| 0.152866
| 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
|
b0767a0c923e3d01ffc014eff24c6e6e510dea0d
| 118
|
py
|
Python
|
ilexconf/console/__init__.py
|
vduseev/holly-config
|
92b7f902d92a4bae0f9fef6241b5ef3e11b44082
|
[
"MIT"
] | 9
|
2020-10-04T15:55:08.000Z
|
2020-10-09T11:48:44.000Z
|
ilexconf/console/__init__.py
|
vduseev/holly-config
|
92b7f902d92a4bae0f9fef6241b5ef3e11b44082
|
[
"MIT"
] | 47
|
2020-10-10T23:19:15.000Z
|
2021-04-02T21:29:36.000Z
|
ilexconf/console/__init__.py
|
ilexconf/ilexconf
|
92b7f902d92a4bae0f9fef6241b5ef3e11b44082
|
[
"MIT"
] | null | null | null |
from ilexconf.console.application import Application
def main(): # pragma: no cover
return Application().run()
| 19.666667
| 52
| 0.737288
| 14
| 118
| 6.214286
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161017
| 118
| 5
| 53
| 23.6
| 0.878788
| 0.135593
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0.333333
| 1
| 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
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 1
| 1
| 0
|
0
| 7
|
9fd914093a9d2ec4b79940394bc875e521269c52
| 6,659
|
py
|
Python
|
src/mhealth/data_analysis_tests/cross_correlator_test.py
|
hirsch-lab/mhealth
|
ad4287483cee206c7b8ff6216293f19d71296129
|
[
"MIT"
] | 2
|
2021-01-05T10:53:57.000Z
|
2021-02-26T09:15:14.000Z
|
src/mhealth/data_analysis_tests/cross_correlator_test.py
|
hirsch-lab/mhealth
|
ad4287483cee206c7b8ff6216293f19d71296129
|
[
"MIT"
] | 3
|
2020-12-15T11:29:25.000Z
|
2021-05-07T09:18:43.000Z
|
src/mhealth/data_analysis_tests/cross_correlator_test.py
|
hirsch-lab/mhealth
|
ad4287483cee206c7b8ff6216293f19d71296129
|
[
"MIT"
] | null | null | null |
import os
import glob
import unittest
from ..utils import testing
from ..utils import everion_keys
from ..utils.file_helper import FileHelper
from ..utils.data_aggregator import Normalization
from ..visualization.vis_properties import VisProperties
from ..data_analysis.cross_correlator import CrossCorrelator
_MHEALTH_DATA = os.getenv('MHEALTH_DATA', '../../resources')
_MHEALTH_OUT_DIR = os.path.join(_MHEALTH_DATA, 'output')
class CrossCorrelatorTest(testing.TestCase):
in_dir = f'{_MHEALTH_DATA}/vital_signals/'
in_dir_mixed = f'{_MHEALTH_DATA}/mixed_vital_raw_signals/'
out_dir = _MHEALTH_OUT_DIR
correlator = CrossCorrelator()
def test_cross_correlator_daily(self):
out_dir = FileHelper.get_out_dir(in_dir=self.in_dir,
out_dir=self.out_dir,
out_dir_suffix='_daily_cross')
self.correlator.plot_daily_correlations(
VisProperties(in_dir=self.in_dir, out_dir=out_dir,
normalization=Normalization.NONE,
keys={'heart_rate', 'respiration_rate'},
short_keys=everion_keys.SHORT_NAMES_VITAL,
min_scale=0, max_scale=100,
start_idx=0, end_idx=3))
files = list(out_dir.glob("**/*.png"))
self.assertEqual(6, len(files))
def test_cross_correlator_hours_vital(self):
out_dir = FileHelper.get_out_dir(in_dir=self.in_dir,
out_dir=self.out_dir,
out_dir_suffix='_cross')
self.correlator.plot_hourly_correlations(
VisProperties(in_dir=self.in_dir, out_dir=out_dir,
normalization=Normalization.NONE,
keys=everion_keys.MAJOR_VITAL,
short_keys=everion_keys.SHORT_NAMES_VITAL,
min_scale=0, max_scale=100,
start_idx=0, end_idx=3))
files = list(out_dir.glob("**/*.png"))
self.assertEqual(3, len(files))
def test_cross_correlator_hours_mixed_vital_raw(self):
out_dir = FileHelper.get_out_dir(in_dir=self.in_dir_mixed,
out_dir=self.out_dir,
out_dir_suffix='_cross')
self.correlator.plot_hourly_correlations(
VisProperties(in_dir=self.in_dir_mixed, out_dir=out_dir,
normalization=Normalization.NONE,
keys=everion_keys.MAJOR_MIXED_VITAL_RAW,
short_keys=everion_keys.SHORT_NAMES_MIXED_VITAL_RAW,
min_scale=0, max_scale=100,
start_idx=0, end_idx=3))
files = list(out_dir.glob("**/*.png"))
self.assertEqual(5, len(files))
def test_cross_correlator_daily_mixed_vital_raw(self):
out_dir = FileHelper.get_out_dir(in_dir=self.in_dir_mixed,
out_dir=self.out_dir,
out_dir_suffix='_daily_cross')
self.correlator.plot_daily_correlations(
VisProperties(in_dir=self.in_dir_mixed, out_dir=out_dir,
normalization=Normalization.NONE,
keys=everion_keys.MAJOR_MIXED_VITAL_RAW,
short_keys=everion_keys.SHORT_NAMES_MIXED_VITAL_RAW,
min_scale=0, max_scale=100,
start_idx=0, end_idx=3))
files = list(out_dir.glob("**/*.png"))
self.assertEqual(25, len(files))
@testing.skip_because_is_runner
def test_cross_hours_vital(self):
in_dir = ''
out_dir = FileHelper.get_out_dir(in_dir=in_dir,
out_dir=self.out_dir,
out_dir_suffix='_cross')
self.correlator.plot_hourly_correlations(
VisProperties(in_dir=in_dir, out_dir=out_dir,
normalization=Normalization.NONE,
keys=everion_keys.MAJOR_VITAL,
short_keys=everion_keys.SHORT_NAMES_VITAL,
min_scale=0, max_scale=100,
start_idx=0, end_idx=3))
self.assertTrue(True)
@testing.skip_because_is_runner
def test_cross_days_vital(self):
in_dir = ''
out_dir = FileHelper.get_out_dir(in_dir=in_dir,
out_dir=self.out_dir,
out_dir_suffix='_daily_cross')
self.correlator.plot_daily_correlations(
VisProperties(in_dir=in_dir, out_dir=out_dir,
normalization=Normalization.NONE,
keys=everion_keys.MAJOR_VITAL,
short_keys=everion_keys.SHORT_NAMES_VITAL,
min_scale=0, max_scale=100,
start_idx=0, end_idx=3))
self.assertTrue(True)
@testing.skip_because_is_runner
def test_cross_correlator_hours_mixed_raw_vital(self):
in_dir = ''
out_dir = FileHelper.get_out_dir(in_dir=in_dir,
out_dir=self.out_dir,
out_dir_suffix='_cross')
self.correlator.plot_hourly_correlations(
VisProperties(in_dir=in_dir, out_dir=out_dir,
normalization=Normalization.NONE,
keys=everion_keys.MAJOR_MIXED_VITAL_RAW,
short_keys=everion_keys.SHORT_NAMES_MIXED_VITAL_RAW,
min_scale=0, max_scale=100,
start_idx=0, end_idx=3))
self.assertTrue(True)
@testing.skip_because_is_runner
def test_cross_correlator_days_mixed_vital_raw(self):
in_dir = ''
out_dir = FileHelper.get_out_dir(in_dir=in_dir,
out_dir=self.out_dir,
out_dir_suffix='_daily_cross')
self.correlator.plot_daily_correlations(
VisProperties(in_dir=in_dir, out_dir=out_dir,
normalization=Normalization.NONE,
keys=everion_keys.MAJOR_MIXED_VITAL_RAW,
short_keys=everion_keys.SHORT_NAMES_MIXED_VITAL_RAW,
min_scale=0, max_scale=100,
start_idx=0, end_idx=3))
self.assertTrue(True)
if __name__ == '__main__':
unittest.main()
| 44.691275
| 78
| 0.565851
| 746
| 6,659
| 4.613941
| 0.112601
| 0.10982
| 0.083672
| 0.051133
| 0.830331
| 0.821034
| 0.809413
| 0.789076
| 0.778036
| 0.778036
| 0
| 0.012363
| 0.35621
| 6,659
| 148
| 79
| 44.993243
| 0.79053
| 0
| 0
| 0.753968
| 0
| 0
| 0.036192
| 0.010512
| 0
| 0
| 0
| 0
| 0.063492
| 1
| 0.063492
| false
| 0
| 0.071429
| 0
| 0.174603
| 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
|
9fe5a28b405ba0411a5720a42bbe49f07b08a96f
| 8,697
|
py
|
Python
|
core/data/collators.py
|
manzar96/st7
|
8dac6fa3497e5a3594766a232a9e8436120e9563
|
[
"MIT"
] | null | null | null |
core/data/collators.py
|
manzar96/st7
|
8dac6fa3497e5a3594766a232a9e8436120e9563
|
[
"MIT"
] | null | null | null |
core/data/collators.py
|
manzar96/st7
|
8dac6fa3497e5a3594766a232a9e8436120e9563
|
[
"MIT"
] | null | null | null |
import torch
from torch.nn.utils.rnn import pad_sequence, pack_padded_sequence
from core.utils.masks import pad_mask, subsequent_mask
from core.utils.tensors import mktensor
class Task71aCollator(object):
def __init__(self, pad_indx=0, device='cpu'):
self.pad_indx = pad_indx
self.device = device
def __call__(self, batch):
myid, text_input, is_humor = map(list, zip(*batch))
input_lengths = torch.tensor(
[len(s) for s in text_input], device=self.device)
# attention mask
max_length = max(input_lengths)
inputs_pad_mask = pad_mask(input_lengths, max_length=max_length,
device=self.device)
# Pad inputs and targets
padded_inputs = (
pad_sequence(text_input, batch_first=True,
padding_value=self.pad_indx)
.to(self.device))
is_humor = mktensor(is_humor, dtype=torch.long)
return padded_inputs,inputs_pad_mask, is_humor
class Task71aCollatorTest(object):
def __init__(self, pad_indx=0, device='cpu'):
self.pad_indx = pad_indx
self.device = device
def __call__(self, batch):
myid, text_input, is_humor = map(list, zip(*batch))
input_lengths = torch.tensor(
[len(s) for s in text_input], device=self.device)
# attention mask
max_length = max(input_lengths)
inputs_pad_mask = pad_mask(input_lengths, max_length=max_length,
device=self.device)
# Pad inputs and targets
padded_inputs = (
pad_sequence(text_input, batch_first=True,
padding_value=self.pad_indx)
.to(self.device))
return myid, padded_inputs, inputs_pad_mask
class Task71aCollatorFeatures(object):
def __init__(self, pad_indx=0, device='cpu'):
self.pad_indx = pad_indx
self.device = device
def __call__(self, batch):
myid, text_input, is_humor = map(list, zip(*batch))
input_lengths = torch.tensor(
[len(s) for s in text_input], device=self.device)
# attention mask
max_length = max(input_lengths)
inputs_pad_mask = pad_mask(input_lengths, max_length=max_length,
device=self.device)
# Pad inputs and targets
padded_inputs = (
pad_sequence(text_input, batch_first=True,
padding_value=self.pad_indx)
.to(self.device))
is_humor = mktensor(is_humor, dtype=torch.long)
return myid, padded_inputs,inputs_pad_mask, is_humor
class ShortTextDatasetCollator(object):
def __init__(self, pad_indx=0, device='cpu'):
self.pad_indx = pad_indx
self.device = device
def __call__(self, batch):
text_input, is_humor = map(list, zip(*batch))
input_lengths = torch.tensor(
[len(s) for s in text_input], device=self.device)
# attention mask
max_length = max(input_lengths)
inputs_pad_mask = pad_mask(input_lengths, max_length=max_length,
device=self.device)
# Pad inputs and targets
padded_inputs = (
pad_sequence(text_input, batch_first=True,
padding_value=self.pad_indx)
.to(self.device))
is_humor = mktensor(is_humor, dtype=torch.long)
return padded_inputs,inputs_pad_mask, is_humor
class Task723Collator(object):
def __init__(self, pad_indx=0, device='cpu'):
self.pad_indx = pad_indx
self.device = device
def __call__(self, batch):
myid, text_input, humor_rating,humor_contr = map(list, zip(*batch))
input_lengths = torch.tensor(
[len(s) for s in text_input], device=self.device)
# attention mask
max_length = max(input_lengths)
inputs_pad_mask = pad_mask(input_lengths, max_length=max_length,
device=self.device)
# Pad inputs and targets
padded_inputs = (
pad_sequence(text_input, batch_first=True,
padding_value=self.pad_indx)
.to(self.device))
humor_rating = mktensor(humor_rating, dtype=torch.float)
humor_contr = mktensor(humor_contr, dtype=torch.long)
return padded_inputs,inputs_pad_mask, humor_rating, humor_contr
class Task723CollatorTest(object):
def __init__(self, pad_indx=0, device='cpu'):
self.pad_indx = pad_indx
self.device = device
def __call__(self, batch):
myid, text_input, humor_rat, humor_contr = map(list, zip(*batch))
input_lengths = torch.tensor(
[len(s) for s in text_input], device=self.device)
# attention mask
max_length = max(input_lengths)
inputs_pad_mask = pad_mask(input_lengths, max_length=max_length,
device=self.device)
# Pad inputs and targets
padded_inputs = (
pad_sequence(text_input, batch_first=True,
padding_value=self.pad_indx)
.to(self.device))
return myid, padded_inputs, inputs_pad_mask
class Task723CollatorFeatures(object):
def __init__(self, pad_indx=0, device='cpu'):
self.pad_indx = pad_indx
self.device = device
def __call__(self, batch):
myid, text_input, humor_rating,humor_contr = map(list, zip(*batch))
input_lengths = torch.tensor(
[len(s) for s in text_input], device=self.device)
# attention mask
max_length = max(input_lengths)
inputs_pad_mask = pad_mask(input_lengths, max_length=max_length,
device=self.device)
# Pad inputs and targets
padded_inputs = (
pad_sequence(text_input, batch_first=True,
padding_value=self.pad_indx)
.to(self.device))
humor_rating = mktensor(humor_rating, dtype=torch.float)
humor_contr = mktensor(humor_contr, dtype=torch.long)
return myid, padded_inputs,inputs_pad_mask, humor_rating, humor_contr
class Task74Collator(object):
def __init__(self, pad_indx=0, device='cpu'):
self.pad_indx = pad_indx
self.device = device
def __call__(self, batch):
myid, text_input, off = map(list, zip(*batch))
input_lengths = torch.tensor(
[len(s) for s in text_input], device=self.device)
# attention mask
max_length = max(input_lengths)
inputs_pad_mask = pad_mask(input_lengths, max_length=max_length,
device=self.device)
# Pad inputs and targets
padded_inputs = (
pad_sequence(text_input, batch_first=True,
padding_value=self.pad_indx)
.to(self.device))
off = mktensor(off, dtype=torch.float)
return padded_inputs,inputs_pad_mask, off
class Task74CollatorTest(object):
def __init__(self, pad_indx=0, device='cpu'):
self.pad_indx = pad_indx
self.device = device
def __call__(self, batch):
myid, text_input, off = map(list, zip(*batch))
input_lengths = torch.tensor(
[len(s) for s in text_input], device=self.device)
# attention mask
max_length = max(input_lengths)
inputs_pad_mask = pad_mask(input_lengths, max_length=max_length,
device=self.device)
# Pad inputs and targets
padded_inputs = (
pad_sequence(text_input, batch_first=True,
padding_value=self.pad_indx)
.to(self.device))
return myid, padded_inputs, inputs_pad_mask
class Task74CollatorFeatures(object):
def __init__(self, pad_indx=0, device='cpu'):
self.pad_indx = pad_indx
self.device = device
def __call__(self, batch):
myid, text_input, off = map(list, zip(*batch))
input_lengths = torch.tensor(
[len(s) for s in text_input], device=self.device)
# attention mask
max_length = max(input_lengths)
inputs_pad_mask = pad_mask(input_lengths, max_length=max_length,
device=self.device)
# Pad inputs and targets
padded_inputs = (
pad_sequence(text_input, batch_first=True,
padding_value=self.pad_indx)
.to(self.device))
off = mktensor(off, dtype=torch.float)
return myid, padded_inputs, inputs_pad_mask,off
| 33.321839
| 77
| 0.609176
| 1,060
| 8,697
| 4.671698
| 0.066038
| 0.056543
| 0.06664
| 0.03433
| 0.929523
| 0.929523
| 0.923263
| 0.917407
| 0.914984
| 0.914984
| 0
| 0.005117
| 0.303438
| 8,697
| 261
| 78
| 33.321839
| 0.812314
| 0.043578
| 0
| 0.878613
| 0
| 0
| 0.003615
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.115607
| false
| 0
| 0.023121
| 0
| 0.254335
| 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
|
b048467d0a750345394b6d343d01156aad3e1cef
| 109
|
py
|
Python
|
pylib/gna/graph/__init__.py
|
gnafit/gna
|
c1a58dac11783342c97a2da1b19c97b85bce0394
|
[
"MIT"
] | 5
|
2019-10-14T01:06:57.000Z
|
2021-02-02T16:33:06.000Z
|
pylib/gna/graph/__init__.py
|
gnafit/gna
|
c1a58dac11783342c97a2da1b19c97b85bce0394
|
[
"MIT"
] | null | null | null |
pylib/gna/graph/__init__.py
|
gnafit/gna
|
c1a58dac11783342c97a2da1b19c97b85bce0394
|
[
"MIT"
] | null | null | null |
from gna.graph.walk import GraphWalker
from gna.graph.timeit import *
from gna.graph.walk_functions import *
| 27.25
| 38
| 0.816514
| 17
| 109
| 5.176471
| 0.470588
| 0.238636
| 0.409091
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110092
| 109
| 3
| 39
| 36.333333
| 0.907216
| 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
|
c6929965a631981dae06929029921384cdc65b4d
| 2,156
|
py
|
Python
|
test.py
|
adrianlazar-personal/py-jwt-validator
|
1d586129a1279f90b4b326aa29f40b9302004e43
|
[
"MIT"
] | 6
|
2020-05-28T20:22:23.000Z
|
2021-09-21T06:26:52.000Z
|
test.py
|
adrianlazar-personal/py-jwt-validator
|
1d586129a1279f90b4b326aa29f40b9302004e43
|
[
"MIT"
] | 4
|
2020-11-09T23:12:38.000Z
|
2021-03-03T16:39:59.000Z
|
test.py
|
adrianlazar-personal/py-jwt-validator
|
1d586129a1279f90b4b326aa29f40b9302004e43
|
[
"MIT"
] | 1
|
2020-12-07T15:00:35.000Z
|
2020-12-07T15:00:35.000Z
|
from py_jwt_validator import PyJwtValidator, PyJwtException
import requests
jwt = 'eyJraWQiOiIyMjIiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdF9oYXNoIjoic2pvdjVKajlXLXdkblBZUDd3djZ0USIsInN1YiI6Imh0dHBzOi8vbG9naW4uc2FsZXNmb3JjZS5jb20vaWQvMDBEMXQwMDAwMDBEVUo2RUFPLzAwNTF0MDAwMDAwRHlhUEFBUyIsInpvbmVpbmZvIjoiRXVyb3BlL0R1YmxpbiIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhZGRyZXNzIjp7ImNvdW50cnkiOiJSTyJ9LCJwcm9maWxlIjoiaHR0cHM6Ly9hZHJpYW4tcHJvZC1kZXYtZWQubXkuc2FsZXNmb3JjZS5jb20vMDA1MXQwMDAwMDBEeWFQQUFTIiwiaXNzIjoiaHR0cHM6Ly9hZHJpYW4tcHJvZC1kZXYtZWQubXkuc2FsZXNmb3JjZS5jb20iLCJwaG9uZV9udW1iZXJfdmVyaWZpZWQiOnRydWUsInByZWZlcnJlZF91c2VybmFtZSI6ImFkcmlhbnNhbGVzZm9yY2VAbWFpbGluYXRvci5jb20iLCJnaXZlbl9uYW1lIjoiQWRyaWFuIiwibG9jYWxlIjoiZW5fSUVfRVVSTyIsIm5vbmNlIjoibm9uY2UiLCJwaWN0dXJlIjoiaHR0cHM6Ly9hZHJpYW4tcHJvZC1kZXYtZWQtLWMuZXUxNi5jb250ZW50LmZvcmNlLmNvbS9wcm9maWxlcGhvdG8vMDA1L0YiLCJhdWQiOiIzTVZHOWZUTG1KNjBwSjVKRF9GLndaTE1TZXJsRm03VmxCUWZPNWJhNHRSbDVrLmFPenhiTUVEN3g1ZTF6M2pwUmU2M1ZQOTNCbEp4eU5QUG9oWkcyLGh0dHA6Ly9sb2NhbGhvc3Q6NTUwMCIsInVwZGF0ZWRfYXQiOiIyMDE5LTA1LTAzVDE1OjQ4OjUyWiIsIm5pY2tuYW1lIjoiYWRyaWFuc2FsZXNmb3JjZSIsIm5hbWUiOiJBZHJpYW4gTGF6YXIiLCJwaG9uZV9udW1iZXIiOiIrNDAgMDcyNTUxMTg4NCIsImV4cCI6MTU4MDQwMTMxNiwiaWF0IjoxNTgwNDAxMTk2LCJmYW1pbHlfbmFtZSI6IkxhemFyIiwiZW1haWwiOiJhZHJpYW5zYWxlc2ZvcmNlQG1haWxpbmF0b3IuY29tIn0.QrEyD4qt1ZzT1-1ncdCqYxpGNsne8E22jwnHCvn3ygId1ZcA3305Mso2WfNASyMAyFWFcyc_sQmc67RZKFuMk0pdflkCwLl6JJdL9IKZo8qjcUmWdalAdpxU61F-NyUSa7IE6eh5y-Dm_qtrhxMXrqen9ugwf1MIiBm2VwgdaQFymEa8jKojfljOivHnEafX0D91NFLAFZPebPnMQp9YE-UR0n49lGT4x68avkqGXaRRVtxBCP_r5swOvqW9OL2Sa3kvSwUlp62Edf2Rxke6REnaWpYZs3rbGlQAzIsVAbansZBXv0dGJU8z2EFOmi7bKThjscqP-VmtASl1TJVrgWVBoRE9EyT10AUpGEuAAfTjGEtNOAq_u0UcFZc9quphy4cSJ2y66-KNwvD73y0Vl9KoeyJPc6Mrnu7yCVXTgsateaUwVn3dx2Cw0Jf3azUO-G5RfnQTpdE7huwofXUyh_WmaYVQ997lcXiVdhndZmSVDPEB9t05-qHCC5hafmnQqMpBvV-eI-OKhMVxwhdjzZnwmrALj-2Z9ApqfKsHxTy27RtIfNKPTijOAW8L6YwI909J__F7_tcPHOtEmusmg-CvU5qPUeq8D3pPC_IdzZBD-3GmavzzVeEjN1ucuo6aIIcvmsjQzeR4r_ZvWWdjx0gOHiGEraO2uETGiA3zesk'
try:
print(PyJwtValidator(jwt, auto_verify=False, check_expiry=False).verify(True))
except PyJwtException as e:
print(f"Exception caught. Error: {e}")
| 269.5
| 1,920
| 0.967532
| 57
| 2,156
| 36.350877
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113829
| 0.013915
| 2,156
| 8
| 1,921
| 269.5
| 0.860771
| 0
| 0
| 0
| 0
| 0.142857
| 0.899397
| 0.886416
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.285714
| 0
| 0.285714
| 0.285714
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
c6a59cf0b7d0aebf7e2f62e142e7553ec2e18c60
| 32,332
|
py
|
Python
|
IRIS_data_download/IRIS_download_support/obspy/io/ascii/tests/test_ascii.py
|
earthinversion/Fnet_IRIS_data_automated_download
|
09a6e0c992662feac95744935e038d1c68539fa1
|
[
"MIT"
] | 2
|
2020-03-05T01:03:01.000Z
|
2020-12-17T05:04:07.000Z
|
IRIS_data_download/IRIS_download_support/obspy/io/ascii/tests/test_ascii.py
|
earthinversion/Fnet_IRIS_data_automated_download
|
09a6e0c992662feac95744935e038d1c68539fa1
|
[
"MIT"
] | 4
|
2021-03-31T19:25:55.000Z
|
2021-12-13T20:32:46.000Z
|
IRIS_data_download/IRIS_download_support/obspy/io/ascii/tests/test_ascii.py
|
earthinversion/Fnet_IRIS_data_automated_download
|
09a6e0c992662feac95744935e038d1c68539fa1
|
[
"MIT"
] | 2
|
2020-09-08T19:33:40.000Z
|
2021-04-05T09:47:50.000Z
|
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from future.builtins import * # NOQA @UnusedWildImport
import os
import unittest
import numpy as np
from obspy import Trace, UTCDateTime, read
from obspy.io.ascii.core import (_determine_dtype, _is_slist, _is_tspair,
_read_slist, _read_tspair, _write_slist,
_write_tspair)
from obspy.core.util import NamedTemporaryFile
class ASCIITestCase(unittest.TestCase):
"""
"""
def setUp(self):
# Directory where the test files are located
self.path = os.path.dirname(__file__)
def test_is_slist_file(self):
"""
Testing SLIST file format.
"""
testfile = os.path.join(self.path, 'data', 'slist.ascii')
self.assertEqual(_is_slist(testfile), True)
testfile = os.path.join(self.path, 'data', 'slist_2_traces.ascii')
self.assertEqual(_is_slist(testfile), True)
testfile = os.path.join(self.path, 'data', 'tspair.ascii')
self.assertEqual(_is_slist(testfile), False)
# not existing file should fail
testfile = os.path.join(self.path, 'data', 'xyz')
self.assertEqual(_is_slist(testfile), False)
def test_read_slist_file_single_trace(self):
"""
Read SLIST file test via obspy.core.ascii._read_slist.
"""
testfile = os.path.join(self.path, 'data', 'slist.ascii')
# read
stream = _read_slist(testfile)
stream.verify()
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHZ')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 635)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
# check first 4 samples
data = [185, 181, 185, 189]
np.testing.assert_array_almost_equal(stream[0].data[0:4], data)
# check last 4 samples
data = [761, 755, 748, 746]
np.testing.assert_array_almost_equal(stream[0].data[-4:], data)
def test_read_slist_file_multiple_traces(self):
"""
Read SLIST file test via obspy.core.ascii._read_slist.
"""
testfile = os.path.join(self.path, 'data', 'slist_2_traces.ascii')
# read
stream = _read_slist(testfile)
stream.verify()
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHZ')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 635)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
# check first 4 samples
data = [185, 181, 185, 189]
np.testing.assert_array_almost_equal(stream[0].data[0:4], data)
# check last 4 samples
data = [761, 755, 748, 746]
np.testing.assert_array_almost_equal(stream[0].data[-4:], data)
# second trace
self.assertEqual(stream[1].stats.network, 'XX')
self.assertEqual(stream[1].stats.station, 'TEST')
self.assertEqual(stream[1].stats.location, '')
self.assertEqual(stream[1].stats.channel, 'BHE')
self.assertEqual(stream[1].stats.sampling_rate, 40.0)
self.assertEqual(stream[1].stats.npts, 630)
self.assertEqual(stream[1].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[1].stats.calib, 1.0e-00)
# check first 4 samples
data = [185, 181, 185, 189]
np.testing.assert_array_almost_equal(stream[1].data[0:4], data)
# check last 4 samples
data = [781, 785, 778, 772]
np.testing.assert_array_almost_equal(stream[1].data[-4:], data)
def test_read_slist_file_head_only(self):
"""
Read SLIST file test via obspy.core.ascii._read_slist.
"""
testfile = os.path.join(self.path, 'data', 'slist.ascii')
# read
stream = _read_slist(testfile, headonly=True)
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHZ')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 635)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
self.assertEqual(len(stream[0].data), 0)
def test_read_slist_file_encoding(self):
"""
Read SLIST file test via obspy.core.ascii._read_slist.
"""
# float32
testfile = os.path.join(self.path, 'data', 'slist_float.ascii')
stream = _read_slist(testfile)
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHZ')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 12)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
data = [185.01, 181.02, 185.03, 189.04, 194.05, 205.06,
209.07, 214.08, 222.09, 225.98, 226.99, 219.00]
np.testing.assert_array_almost_equal(stream[0].data, data, decimal=2)
# unknown encoding
testfile = os.path.join(self.path, 'data', 'slist_unknown.ascii')
self.assertRaises(NotImplementedError, _read_slist, testfile)
def test_is_tspair_file(self):
"""
Testing TSPAIR file format.
"""
testfile = os.path.join(self.path, 'data', 'tspair.ascii')
self.assertEqual(_is_tspair(testfile), True)
testfile = os.path.join(self.path, 'data', 'tspair_2_traces.ascii')
self.assertEqual(_is_tspair(testfile), True)
testfile = os.path.join(self.path, 'data', 'slist.ascii')
self.assertEqual(_is_tspair(testfile), False)
# not existing file should fail
testfile = os.path.join(self.path, 'data', 'xyz')
self.assertEqual(_is_tspair(testfile), False)
def test_read_tspair_file_single_trace(self):
"""
Read TSPAIR file test via obspy.core.ascii._read_tspair.
"""
testfile = os.path.join(self.path, 'data', 'tspair.ascii')
# read
stream = _read_tspair(testfile)
stream.verify()
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHZ')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 635)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
self.assertEqual(stream[0].stats.mseed.dataquality, 'R')
# check first 4 samples
data = [185, 181, 185, 189]
np.testing.assert_array_almost_equal(stream[0].data[0:4], data)
# check last 4 samples
data = [761, 755, 748, 746]
np.testing.assert_array_almost_equal(stream[0].data[-4:], data)
def test_read_tspair_file_multiple_traces(self):
"""
Read TSPAIR file test via obspy.core.ascii._read_tspair.
"""
testfile = os.path.join(self.path, 'data', 'tspair_2_traces.ascii')
# read
stream = _read_tspair(testfile)
stream.verify()
# sort traces to ensure comparable results
stream.sort()
self.assertEqual(stream[1].stats.network, 'XX')
self.assertEqual(stream[1].stats.station, 'TEST')
self.assertEqual(stream[1].stats.location, '')
self.assertEqual(stream[1].stats.channel, 'BHZ')
self.assertEqual(stream[1].stats.sampling_rate, 40.0)
self.assertEqual(stream[1].stats.npts, 635)
self.assertEqual(stream[1].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[1].stats.calib, 1.0e-00)
self.assertEqual(stream[1].stats.mseed.dataquality, 'R')
# check first 4 samples
data = [185, 181, 185, 189]
np.testing.assert_array_almost_equal(stream[1].data[0:4], data)
# check last 4 samples
data = [761, 755, 748, 746]
np.testing.assert_array_almost_equal(stream[1].data[-4:], data)
# second trace
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHE')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 630)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
self.assertEqual(stream[0].stats.mseed.dataquality, 'R')
# check first 4 samples
data = [185, 181, 185, 189]
np.testing.assert_array_almost_equal(stream[0].data[0:4], data)
# check last 4 samples
data = [781, 785, 778, 772]
np.testing.assert_array_almost_equal(stream[0].data[-4:], data)
def test_read_tspair_head_only(self):
"""
Read TSPAIR file test via obspy.core.ascii._read_tspair.
"""
testfile = os.path.join(self.path, 'data', 'tspair.ascii')
# read
stream = _read_tspair(testfile, headonly=True)
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHZ')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 635)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
self.assertEqual(stream[0].stats.mseed.dataquality, 'R')
self.assertEqual(len(stream[0].data), 0)
def test_read_tspair_file_encoding(self):
"""
Read TSPAIR file test via obspy.core.ascii._read_tspair.
"""
# float32
testfile = os.path.join(self.path, 'data', 'tspair_float.ascii')
stream = _read_tspair(testfile)
stream.verify()
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHZ')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 12)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
self.assertEqual(stream[0].stats.mseed.dataquality, 'R')
data = [185.01, 181.02, 185.03, 189.04, 194.05, 205.06,
209.07, 214.08, 222.09, 225.98, 226.99, 219.00]
np.testing.assert_array_almost_equal(stream[0].data, data, decimal=2)
# unknown encoding
testfile = os.path.join(self.path, 'data', 'tspair_unknown.ascii')
self.assertRaises(NotImplementedError, _read_tspair, testfile)
def test_write_tspair(self):
"""
Write TSPAIR file test via obspy.core.ascii._write_tspair.
"""
# float32
testfile = os.path.join(self.path, 'data', 'tspair_float.ascii')
stream_orig = _read_tspair(testfile)
with NamedTemporaryFile() as tf:
tmpfile = tf.name
# write
_write_tspair(stream_orig, tmpfile)
# look at the raw data
with open(tmpfile, 'rt') as f:
lines = f.readlines()
self.assertEqual(
lines[0].strip(),
'TIMESERIES XX_TEST__BHZ_R, 12 samples, 40 sps, ' +
'2008-01-15T00:00:00.025000, TSPAIR, FLOAT, Counts')
self.assertEqual(
lines[1].strip(),
'2008-01-15T00:00:00.025000 +1.8500999450e+02')
# read again
stream = _read_tspair(tmpfile)
stream.verify()
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHZ')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 12)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
self.assertEqual(stream[0].stats.mseed.dataquality, 'R')
data = [185.01, 181.02, 185.03, 189.04, 194.05, 205.06,
209.07, 214.08, 222.09, 225.98, 226.99, 219.00]
np.testing.assert_array_almost_equal(stream[0].data, data,
decimal=2)
# compare raw header
with open(testfile, 'rt') as f:
lines_orig = f.readlines()
with open(tmpfile, 'rt') as f:
lines_new = f.readlines()
self.assertEqual(lines_orig[0], lines_new[0])
def test_write_tspair_custom_fmt(self):
"""
Write TSPAIR file test via obspy.core.ascii._write_tspair.
"""
# float
testfile_orig = os.path.join(self.path, 'data', 'tspair_float.ascii')
testfile = os.path.join(self.path, 'data',
'tspair_float_custom_fmt.ascii')
stream_orig = _read_tspair(testfile_orig)
with NamedTemporaryFile() as tf:
tmpfile = tf.name
# write
_write_tspair(stream_orig, tmpfile, custom_fmt='%3.14f')
# look at the raw data
with open(tmpfile, 'rt') as f:
lines = f.readlines()
self.assertEqual(
lines[0].strip(),
'TIMESERIES XX_TEST__BHZ_R, 12 samples, 40 sps, ' +
'2008-01-15T00:00:00.025000, TSPAIR, FLOAT, Counts')
self.assertEqual(
lines[1].strip(),
'2008-01-15T00:00:00.025000 185.00999450000000')
# read again
stream = _read_tspair(tmpfile)
stream.verify()
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHZ')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 12)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
self.assertEqual(stream[0].stats.mseed.dataquality, 'R')
data = [185.01, 181.02, 185.03, 189.04, 194.05, 205.06,
209.07, 214.08, 222.09, 225.98, 226.99, 219.00]
np.testing.assert_array_almost_equal(stream[0].data, data,
decimal=2)
# compare raw header
with open(testfile, 'rt') as f:
lines_orig = f.readlines()
with open(tmpfile, 'rt') as f:
lines_new = f.readlines()
self.assertEqual(lines_orig[0], lines_new[0])
def test_write_tspair_custom_fmt_custom(self):
"""
Write TSPAIR file test via obspy.core.ascii._write_tspair.
"""
# float
testfile_orig = os.path.join(self.path, 'data', 'tspair_float.ascii')
stream_orig = _read_tspair(testfile_orig)
with NamedTemporaryFile() as tf:
tmpfile = tf.name
# write
_write_tspair(stream_orig, tmpfile, custom_fmt='%+r')
self.assertRaises(NotImplementedError, _read_tspair, tmpfile)
# look at the raw data
with open(tmpfile, 'rt') as f:
lines = f.readlines()
self.assertEqual(
lines[0].strip(),
'TIMESERIES XX_TEST__BHZ_R, 12 samples, 40 sps, ' +
'2008-01-15T00:00:00.025000, TSPAIR, CUSTOM, Counts')
self.assertEqual(
lines[1].strip(),
'2008-01-15T00:00:00.025000 185.0099945')
def test_write_tspair_file_multiple_traces(self):
"""
Write TSPAIR file test via obspy.core.ascii._write_tspair.
"""
testfile = os.path.join(self.path, 'data', 'tspair_2_traces.ascii')
stream_orig = _read_tspair(testfile)
with NamedTemporaryFile() as tf:
tmpfile = tf.name
# write
_write_tspair(stream_orig, tmpfile)
# look at the raw data
with open(tmpfile, 'rt') as f:
lines = f.readlines()
self.assertTrue(lines[0].startswith('TIMESERIES'))
self.assertIn('TSPAIR', lines[0])
self.assertEqual(lines[1], '2008-01-15T00:00:00.025000 185\n')
# test issue #321 (problems in time stamping)
self.assertEqual(lines[-1], '2008-01-15T00:00:15.750000 772\n')
# read again
stream = _read_tspair(tmpfile)
stream.verify()
# sort traces to ensure comparable results
stream.sort()
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHE')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 630)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
self.assertEqual(stream[0].stats.mseed.dataquality, 'R')
# check first 4 samples
data = [185, 181, 185, 189]
np.testing.assert_array_almost_equal(stream[0].data[0:4], data)
# check last 4 samples
data = [781, 785, 778, 772]
np.testing.assert_array_almost_equal(stream[0].data[-4:], data)
# second trace
self.assertEqual(stream[1].stats.network, 'XX')
self.assertEqual(stream[1].stats.station, 'TEST')
self.assertEqual(stream[1].stats.location, '')
self.assertEqual(stream[1].stats.channel, 'BHZ')
self.assertEqual(stream[1].stats.sampling_rate, 40.0)
self.assertEqual(stream[1].stats.npts, 635)
self.assertEqual(stream[1].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[1].stats.calib, 1.0e-00)
self.assertEqual(stream[0].stats.mseed.dataquality, 'R')
# check first 4 samples
data = [185, 181, 185, 189]
np.testing.assert_array_almost_equal(stream[1].data[0:4], data)
# check last 4 samples
data = [761, 755, 748, 746]
np.testing.assert_array_almost_equal(stream[1].data[-4:], data)
def test_write_slist(self):
"""
Write SLIST file test via obspy.core.ascii._write_tspair.
"""
# float32
testfile = os.path.join(self.path, 'data', 'slist_float.ascii')
stream_orig = _read_slist(testfile)
with NamedTemporaryFile() as tf:
tmpfile = tf.name
# write
_write_slist(stream_orig, tmpfile)
# look at the raw data
with open(tmpfile, 'rt') as f:
lines = f.readlines()
self.assertEqual(
lines[0].strip(),
'TIMESERIES XX_TEST__BHZ_R, 12 samples, 40 sps, ' +
'2008-01-15T00:00:00.025000, SLIST, FLOAT, Counts')
self.assertEqual(
lines[1].strip(),
'+1.8500999450e+02\t+1.8102000430e+02\t+1.8502999880e+02\t' +
'+1.8903999330e+02\t+1.9405000310e+02\t+2.0505999760e+02')
# read again
stream = _read_slist(tmpfile)
stream.verify()
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHZ')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 12)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
self.assertEqual(stream[0].stats.mseed.dataquality, 'R')
data = [185.01, 181.02, 185.03, 189.04, 194.05, 205.06,
209.07, 214.08, 222.09, 225.98, 226.99, 219.00]
np.testing.assert_array_almost_equal(stream[0].data, data,
decimal=2)
# compare raw header
with open(testfile, 'rt') as f:
lines_orig = f.readlines()
with open(tmpfile, 'rt') as f:
lines_new = f.readlines()
self.assertEqual(lines_orig[0], lines_new[0])
def test_write_slist_custom_fmt_float(self):
"""
Write SLIST file test via obspy.core.ascii._write_tspair.
"""
# float
testfile_orig = os.path.join(self.path, 'data', 'slist_float.ascii')
testfile = os.path.join(self.path, 'data',
'slist_float_custom_fmt.ascii')
stream_orig = _read_slist(testfile_orig)
with NamedTemporaryFile() as tf:
tmpfile = tf.name
# write
_write_slist(stream_orig, tmpfile, custom_fmt='%3.14f')
# look at the raw data
with open(tmpfile, 'rt') as f:
lines = f.readlines()
self.assertEqual(
lines[0].strip(),
'TIMESERIES XX_TEST__BHZ_R, 12 samples, 40 sps, ' +
'2008-01-15T00:00:00.025000, SLIST, FLOAT, Counts')
self.assertEqual(
lines[1].strip(),
'185.00999450000000\t181.02000430000001\t' +
'185.02999879999999\t189.03999329999999\t' +
'194.05000310000000\t205.05999760000000')
# read again
stream = _read_slist(tmpfile)
stream.verify()
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHZ')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 12)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
self.assertEqual(stream[0].stats.mseed.dataquality, 'R')
data = [185.01, 181.02, 185.03, 189.04, 194.05, 205.06,
209.07, 214.08, 222.09, 225.98, 226.99, 219.00]
np.testing.assert_array_almost_equal(stream[0].data, data,
decimal=2)
# compare raw header
with open(testfile, 'rt') as f:
lines_orig = f.readlines()
with open(tmpfile, 'rt') as f:
lines_new = f.readlines()
self.assertEqual(lines_orig[0], lines_new[0])
def test_write_slist_custom_fmt_custom(self):
"""
Write SLIST file test via obspy.core.ascii._write_tspair.
"""
# float
testfile_orig = os.path.join(self.path, 'data', 'slist_float.ascii')
stream_orig = _read_slist(testfile_orig)
with NamedTemporaryFile() as tf:
tmpfile = tf.name
# write
_write_slist(stream_orig, tmpfile, custom_fmt='%+r')
self.assertRaises(NotImplementedError, _read_slist, tmpfile)
# look at the raw data
with open(tmpfile, 'rt') as f:
lines = f.readlines()
self.assertEqual(
lines[0].strip(),
'TIMESERIES XX_TEST__BHZ_R, 12 samples, 40 sps, ' +
'2008-01-15T00:00:00.025000, SLIST, CUSTOM, Counts')
self.assertEqual(
lines[1].strip(),
'185.0099945\t181.02000430000001\t' +
'185.02999879999999\t189.03999329999999\t' +
'194.0500031\t205.0599976')
def test_write_slist_file_multiple_traces(self):
"""
Write SLIST file test via obspy.core.ascii._write_tspair.
"""
testfile = os.path.join(self.path, 'data', 'slist_2_traces.ascii')
stream_orig = _read_slist(testfile)
with NamedTemporaryFile() as tf:
tmpfile = tf.name
# write
_write_slist(stream_orig, tmpfile)
# look at the raw data
with open(tmpfile, 'rt') as f:
lines = f.readlines()
self.assertTrue(lines[0].startswith('TIMESERIES'))
self.assertIn('SLIST', lines[0])
self.assertEqual(lines[1].strip(), '185\t181\t185\t189\t194\t205')
# read again
stream = _read_slist(tmpfile)
stream.verify()
# sort traces to ensure comparable results
stream.sort()
self.assertEqual(stream[0].stats.network, 'XX')
self.assertEqual(stream[0].stats.station, 'TEST')
self.assertEqual(stream[0].stats.location, '')
self.assertEqual(stream[0].stats.channel, 'BHE')
self.assertEqual(stream[0].stats.sampling_rate, 40.0)
self.assertEqual(stream[0].stats.npts, 630)
self.assertEqual(stream[0].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[0].stats.calib, 1.0e-00)
self.assertEqual(stream[0].stats.mseed.dataquality, 'R')
# check first 4 samples
data = [185, 181, 185, 189]
np.testing.assert_array_almost_equal(stream[0].data[0:4], data)
# check last 4 samples
data = [781, 785, 778, 772]
np.testing.assert_array_almost_equal(stream[0].data[-4:], data)
# second trace
self.assertEqual(stream[1].stats.network, 'XX')
self.assertEqual(stream[1].stats.station, 'TEST')
self.assertEqual(stream[1].stats.location, '')
self.assertEqual(stream[1].stats.channel, 'BHZ')
self.assertEqual(stream[1].stats.sampling_rate, 40.0)
self.assertEqual(stream[1].stats.npts, 635)
self.assertEqual(stream[1].stats.starttime,
UTCDateTime("2008-01-15T00:00:00.025000"))
self.assertEqual(stream[1].stats.calib, 1.0e-00)
self.assertEqual(stream[0].stats.mseed.dataquality, 'R')
# check first 4 samples
data = [185, 181, 185, 189]
np.testing.assert_array_almost_equal(stream[1].data[0:4], data)
# check last 4 samples
data = [761, 755, 748, 746]
np.testing.assert_array_almost_equal(stream[1].data[-4:], data)
def test_write_small_trace(self):
"""
Tests writing Traces containing 0, 1 or 2 samples only.
"""
for format in ['SLIST', 'TSPAIR']:
for num in range(0, 4):
tr = Trace(data=np.arange(num))
with NamedTemporaryFile() as tf:
tempfile = tf.name
tr.write(tempfile, format=format)
# test results
st = read(tempfile, format=format)
self.assertEqual(len(st), 1)
self.assertEqual(len(st[0]), num)
def test_float_sampling_rates_write_and_read(self):
"""
Tests writing and reading Traces with floating point and with less than
1 Hz sampling rates.
"""
tr = Trace(np.arange(10))
check_sampling_rates = (0.000000001, 1.000000001, 100.000000001,
99.999999999, 1.5, 1.666666, 10000.0001)
for format in ['SLIST', 'TSPAIR']:
for sps in check_sampling_rates:
tr.stats.sampling_rate = sps
with NamedTemporaryFile() as tf:
tempfile = tf.name
tr.write(tempfile, format=format)
# test results
got = read(tempfile, format=format)[0]
self.assertEqual(tr.stats.sampling_rate,
got.stats.sampling_rate)
def test_determine_dtype(self):
"""
Tests _determine_dtype for properly returned types
"""
float_formats = ['%+10.10e', '%+.10e', '%.3e',
'%+10.10E', '%+.10E', '%.3E',
'%+10.10f', '%+.10f', '%.3f',
'%+10.10F', '%+.10F', '%.3F',
'%+10.10g', '%+.10g', '%.3g',
'%+10.10G', '%+.10G', '%.3G']
int_formats = ['%+10.10i', '%+.10i', '%.3i',
'%+10.10I', '%+.10I', '%.3I',
'%+10.10d', '%+.10d', '%.3d',
'%+10.10D', '%+.10D', '%.3D']
custom_formats = ['%+10.10s', '%+.10s', '%.3s',
'%+10.10x', '%+.10x', '%.3x',
'%+10.10k', '%+.10k', '%.3k',
'%+10.10z', '%+.10z', '%.3z',
'%+10.10w', '%+.10w', '%.3w',
'%+10.10q', '%+.10q', '%.3q']
for format in float_formats:
self.assertEqual('FLOAT', _determine_dtype(format))
for format in int_formats:
self.assertEqual('INTEGER', _determine_dtype(format))
for format in custom_formats:
self.assertEqual('CUSTOM', _determine_dtype(format))
self.assertRaises(ValueError, _determine_dtype, '')
def test_regression_against_mseed2ascii(self):
"""
Regression test against issue #2165.
"""
mseed_file = os.path.join(self.path, "data", "miniseed_record.mseed")
mseed2ascii_file = os.path.join(
self.path, "data", "mseed2ascii_miniseed_record.txt")
with NamedTemporaryFile() as tf:
# Write as TSPAIR
read(mseed_file).write(tf.name, format="TSPAIR")
# Check all lines aside from the first as they differ.
with open(tf.name, "rt") as fh:
actual_lines = fh.readlines()[1:]
with open(mseed2ascii_file, "rt") as fh:
expected_lines = fh.readlines()[1:]
for actual, expected in zip(actual_lines, expected_lines):
self.assertEqual(actual.strip(), expected.strip())
def suite():
return unittest.makeSuite(ASCIITestCase, 'test')
if __name__ == '__main__':
unittest.main(defaultTest='suite')
| 45.346424
| 79
| 0.578034
| 3,899
| 32,332
| 4.674019
| 0.074635
| 0.158856
| 0.180915
| 0.149693
| 0.874945
| 0.860459
| 0.843503
| 0.836315
| 0.825944
| 0.814036
| 0
| 0.095058
| 0.287115
| 32,332
| 712
| 80
| 45.410112
| 0.695605
| 0.079704
| 0
| 0.773764
| 0
| 0.003802
| 0.097221
| 0.044151
| 0
| 0
| 0
| 0
| 0.43346
| 1
| 0.045627
| false
| 0
| 0.015209
| 0.001901
| 0.064639
| 0.001901
| 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
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
c6b714242593972ca83e47dd6c36c7d8b16188e4
| 41,780
|
py
|
Python
|
venv/lib/python3.8/site-packages/spaceone/api/power_scheduler/v1/schedule_rule_pb2.py
|
choonho/plugin-prometheus-mon-webhook
|
afa7d65d12715fd0480fb4f92a9c62da2d6128e0
|
[
"Apache-2.0"
] | null | null | null |
venv/lib/python3.8/site-packages/spaceone/api/power_scheduler/v1/schedule_rule_pb2.py
|
choonho/plugin-prometheus-mon-webhook
|
afa7d65d12715fd0480fb4f92a9c62da2d6128e0
|
[
"Apache-2.0"
] | null | null | null |
venv/lib/python3.8/site-packages/spaceone/api/power_scheduler/v1/schedule_rule_pb2.py
|
choonho/plugin-prometheus-mon-webhook
|
afa7d65d12715fd0480fb4f92a9c62da2d6128e0
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: spaceone/api/power_scheduler/v1/schedule_rule.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from spaceone.api.core.v1 import query_pb2 as spaceone_dot_api_dot_core_dot_v1_dot_query__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='spaceone/api/power_scheduler/v1/schedule_rule.proto',
package='spaceone.api.power_scheduler.v1',
syntax='proto3',
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n3spaceone/api/power_scheduler/v1/schedule_rule.proto\x12\x1fspaceone.api.power_scheduler.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a spaceone/api/core/v1/query.proto\"\xd1\x02\n\x19\x43reateScheduleRuleRequest\x12\x13\n\x0bschedule_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32\x32.spaceone.api.power_scheduler.v1.ScheduleRuleState\x12<\n\trule_type\x18\x04 \x01(\x0e\x32).spaceone.api.power_scheduler.v1.RuleType\x12\x33\n\x04rule\x18\x05 \x03(\x0b\x32%.spaceone.api.power_scheduler.v1.Rule\x12\x10\n\x08priority\x18\x06 \x01(\x05\x12%\n\x04tags\x18\x0b \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07user_id\x18\x17 \x01(\t\x12\x11\n\tdomain_id\x18\x16 \x01(\t\"\xf5\x01\n\x19UpdateScheduleRuleRequest\x12\x18\n\x10schedule_rule_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32\x32.spaceone.api.power_scheduler.v1.ScheduleRuleState\x12\x33\n\x04rule\x18\x04 \x03(\x0b\x32%.spaceone.api.power_scheduler.v1.Rule\x12%\n\x04tags\x18\x0b \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x11\n\tdomain_id\x18\x16 \x01(\t\"B\n\x13ScheduleRuleRequest\x12\x18\n\x10schedule_rule_id\x18\x01 \x01(\t\x12\x11\n\tdomain_id\x18\x02 \x01(\t\"S\n\x16GetScheduleRuleRequest\x12\x18\n\x10schedule_rule_id\x18\x01 \x01(\t\x12\x11\n\tdomain_id\x18\x02 \x01(\t\x12\x0c\n\x04only\x18\x03 \x03(\t\"\xf8\x01\n\x11ScheduleRuleQuery\x12*\n\x05query\x18\x01 \x01(\x0b\x32\x1b.spaceone.api.core.v1.Query\x12\x18\n\x10schedule_rule_id\x18\x02 \x01(\t\x12\x13\n\x0bschedule_id\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x10\n\x08priority\x18\x05 \x01(\x05\x12\x41\n\x05state\x18\x06 \x01(\x0e\x32\x32.spaceone.api.power_scheduler.v1.ScheduleRuleState\x12\x12\n\nproject_id\x18\x08 \x01(\t\x12\x11\n\tdomain_id\x18\t \x01(\t\">\n\x04Rule\x12\r\n\x03\x64\x61y\x18\x01 \x01(\tH\x00\x12\x0e\n\x04\x64\x61te\x18\x02 \x01(\tH\x00\x12\r\n\x05times\x18\x03 \x03(\x05\x42\x08\n\x06\x66ormat\"\x85\x03\n\x08RuleInfo\x12\x18\n\x10schedule_rule_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32\x32.spaceone.api.power_scheduler.v1.ScheduleRuleState\x12<\n\trule_type\x18\x04 \x01(\x0e\x32).spaceone.api.power_scheduler.v1.RuleType\x12\x33\n\x04rule\x18\x05 \x03(\x0b\x32%.spaceone.api.power_scheduler.v1.Rule\x12\x10\n\x08priority\x18\x06 \x01(\x05\x12\x13\n\x0bschedule_id\x18\x07 \x01(\t\x12%\n\x04tags\x18\x0c \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x12\n\nproject_id\x18\x15 \x01(\t\x12\x11\n\tdomain_id\x18\x16 \x01(\t\x12\x12\n\ncreated_by\x18\x17 \x01(\t\x12\x12\n\ncreated_at\x18\x1f \x01(\t\"\\\n\tRulesInfo\x12:\n\x07results\x18\x01 \x03(\x0b\x32).spaceone.api.power_scheduler.v1.RuleInfo\x12\x13\n\x0btotal_count\x18\x02 \x01(\x05\"`\n\x15ScheduleRuleStatQuery\x12\x34\n\x05query\x18\x01 \x01(\x0b\x32%.spaceone.api.core.v1.StatisticsQuery\x12\x11\n\tdomain_id\x18\x02 \x01(\t*B\n\x11ScheduleRuleState\x12\x13\n\x0fRULE_STATE_NONE\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0b\n\x07STOPPED\x10\x02*7\n\x08RuleType\x12\x12\n\x0eRULE_TYPE_NONE\x10\x00\x12\x0b\n\x07ROUTINE\x10\x01\x12\n\n\x06TICKET\x10\x02\x32\xea\x07\n\x0cScheduleRule\x12\x9b\x01\n\x06\x63reate\x12:.spaceone.api.power_scheduler.v1.CreateScheduleRuleRequest\x1a).spaceone.api.power_scheduler.v1.RuleInfo\"*\x82\xd3\xe4\x93\x02$\"\"/power-scheduler/v1/schedule-rules\x12\xad\x01\n\x06update\x12:.spaceone.api.power_scheduler.v1.UpdateScheduleRuleRequest\x1a).spaceone.api.power_scheduler.v1.RuleInfo\"<\x82\xd3\xe4\x93\x02\x36\x1a\x34/power-scheduler/v1/schedule-rule/{schedule_rule_id}\x12\x94\x01\n\x06\x64\x65lete\x12\x34.spaceone.api.power_scheduler.v1.ScheduleRuleRequest\x1a\x16.google.protobuf.Empty\"<\x82\xd3\xe4\x93\x02\x36*4/power-scheduler/v1/schedule-rule/{schedule_rule_id}\x12\xa7\x01\n\x03get\x12\x37.spaceone.api.power_scheduler.v1.GetScheduleRuleRequest\x1a).spaceone.api.power_scheduler.v1.RuleInfo\"<\x82\xd3\xe4\x93\x02\x36\x12\x34/power-scheduler/v1/schedule-rule/{schedule_rule_id}\x12\xbf\x01\n\x04list\x12\x32.spaceone.api.power_scheduler.v1.ScheduleRuleQuery\x1a*.spaceone.api.power_scheduler.v1.RulesInfo\"W\x82\xd3\xe4\x93\x02Q\x12\"/power-scheduler/v1/schedule-rulesZ+\")/power-scheduler/v1/schedule-rules/search\x12\x88\x01\n\x04stat\x12\x36.spaceone.api.power_scheduler.v1.ScheduleRuleStatQuery\x1a\x17.google.protobuf.Struct\"/\x82\xd3\xe4\x93\x02)\"\'/power-scheduler/v1/schedule-rules/statb\x06proto3'
,
dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,spaceone_dot_api_dot_core_dot_v1_dot_query__pb2.DESCRIPTOR,])
_SCHEDULERULESTATE = _descriptor.EnumDescriptor(
name='ScheduleRuleState',
full_name='spaceone.api.power_scheduler.v1.ScheduleRuleState',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='RULE_STATE_NONE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='RUNNING', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='STOPPED', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=1851,
serialized_end=1917,
)
_sym_db.RegisterEnumDescriptor(_SCHEDULERULESTATE)
ScheduleRuleState = enum_type_wrapper.EnumTypeWrapper(_SCHEDULERULESTATE)
_RULETYPE = _descriptor.EnumDescriptor(
name='RuleType',
full_name='spaceone.api.power_scheduler.v1.RuleType',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='RULE_TYPE_NONE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='ROUTINE', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='TICKET', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=1919,
serialized_end=1974,
)
_sym_db.RegisterEnumDescriptor(_RULETYPE)
RuleType = enum_type_wrapper.EnumTypeWrapper(_RULETYPE)
RULE_STATE_NONE = 0
RUNNING = 1
STOPPED = 2
RULE_TYPE_NONE = 0
ROUTINE = 1
TICKET = 2
_CREATESCHEDULERULEREQUEST = _descriptor.Descriptor(
name='CreateScheduleRuleRequest',
full_name='spaceone.api.power_scheduler.v1.CreateScheduleRuleRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='schedule_id', full_name='spaceone.api.power_scheduler.v1.CreateScheduleRuleRequest.schedule_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.power_scheduler.v1.CreateScheduleRuleRequest.name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='state', full_name='spaceone.api.power_scheduler.v1.CreateScheduleRuleRequest.state', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='rule_type', full_name='spaceone.api.power_scheduler.v1.CreateScheduleRuleRequest.rule_type', index=3,
number=4, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='rule', full_name='spaceone.api.power_scheduler.v1.CreateScheduleRuleRequest.rule', index=4,
number=5, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='priority', full_name='spaceone.api.power_scheduler.v1.CreateScheduleRuleRequest.priority', index=5,
number=6, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tags', full_name='spaceone.api.power_scheduler.v1.CreateScheduleRuleRequest.tags', index=6,
number=11, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='user_id', full_name='spaceone.api.power_scheduler.v1.CreateScheduleRuleRequest.user_id', index=7,
number=23, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.power_scheduler.v1.CreateScheduleRuleRequest.domain_id', index=8,
number=22, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=212,
serialized_end=549,
)
_UPDATESCHEDULERULEREQUEST = _descriptor.Descriptor(
name='UpdateScheduleRuleRequest',
full_name='spaceone.api.power_scheduler.v1.UpdateScheduleRuleRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='schedule_rule_id', full_name='spaceone.api.power_scheduler.v1.UpdateScheduleRuleRequest.schedule_rule_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.power_scheduler.v1.UpdateScheduleRuleRequest.name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='state', full_name='spaceone.api.power_scheduler.v1.UpdateScheduleRuleRequest.state', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='rule', full_name='spaceone.api.power_scheduler.v1.UpdateScheduleRuleRequest.rule', index=3,
number=4, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tags', full_name='spaceone.api.power_scheduler.v1.UpdateScheduleRuleRequest.tags', index=4,
number=11, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.power_scheduler.v1.UpdateScheduleRuleRequest.domain_id', index=5,
number=22, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=552,
serialized_end=797,
)
_SCHEDULERULEREQUEST = _descriptor.Descriptor(
name='ScheduleRuleRequest',
full_name='spaceone.api.power_scheduler.v1.ScheduleRuleRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='schedule_rule_id', full_name='spaceone.api.power_scheduler.v1.ScheduleRuleRequest.schedule_rule_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.power_scheduler.v1.ScheduleRuleRequest.domain_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=799,
serialized_end=865,
)
_GETSCHEDULERULEREQUEST = _descriptor.Descriptor(
name='GetScheduleRuleRequest',
full_name='spaceone.api.power_scheduler.v1.GetScheduleRuleRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='schedule_rule_id', full_name='spaceone.api.power_scheduler.v1.GetScheduleRuleRequest.schedule_rule_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.power_scheduler.v1.GetScheduleRuleRequest.domain_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='only', full_name='spaceone.api.power_scheduler.v1.GetScheduleRuleRequest.only', index=2,
number=3, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=867,
serialized_end=950,
)
_SCHEDULERULEQUERY = _descriptor.Descriptor(
name='ScheduleRuleQuery',
full_name='spaceone.api.power_scheduler.v1.ScheduleRuleQuery',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='query', full_name='spaceone.api.power_scheduler.v1.ScheduleRuleQuery.query', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='schedule_rule_id', full_name='spaceone.api.power_scheduler.v1.ScheduleRuleQuery.schedule_rule_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='schedule_id', full_name='spaceone.api.power_scheduler.v1.ScheduleRuleQuery.schedule_id', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.power_scheduler.v1.ScheduleRuleQuery.name', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='priority', full_name='spaceone.api.power_scheduler.v1.ScheduleRuleQuery.priority', index=4,
number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='state', full_name='spaceone.api.power_scheduler.v1.ScheduleRuleQuery.state', index=5,
number=6, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_id', full_name='spaceone.api.power_scheduler.v1.ScheduleRuleQuery.project_id', index=6,
number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.power_scheduler.v1.ScheduleRuleQuery.domain_id', index=7,
number=9, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=953,
serialized_end=1201,
)
_RULE = _descriptor.Descriptor(
name='Rule',
full_name='spaceone.api.power_scheduler.v1.Rule',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='day', full_name='spaceone.api.power_scheduler.v1.Rule.day', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='date', full_name='spaceone.api.power_scheduler.v1.Rule.date', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='times', full_name='spaceone.api.power_scheduler.v1.Rule.times', index=2,
number=3, type=5, cpp_type=1, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='format', full_name='spaceone.api.power_scheduler.v1.Rule.format',
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
],
serialized_start=1203,
serialized_end=1265,
)
_RULEINFO = _descriptor.Descriptor(
name='RuleInfo',
full_name='spaceone.api.power_scheduler.v1.RuleInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='schedule_rule_id', full_name='spaceone.api.power_scheduler.v1.RuleInfo.schedule_rule_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.power_scheduler.v1.RuleInfo.name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='state', full_name='spaceone.api.power_scheduler.v1.RuleInfo.state', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='rule_type', full_name='spaceone.api.power_scheduler.v1.RuleInfo.rule_type', index=3,
number=4, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='rule', full_name='spaceone.api.power_scheduler.v1.RuleInfo.rule', index=4,
number=5, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='priority', full_name='spaceone.api.power_scheduler.v1.RuleInfo.priority', index=5,
number=6, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='schedule_id', full_name='spaceone.api.power_scheduler.v1.RuleInfo.schedule_id', index=6,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tags', full_name='spaceone.api.power_scheduler.v1.RuleInfo.tags', index=7,
number=12, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_id', full_name='spaceone.api.power_scheduler.v1.RuleInfo.project_id', index=8,
number=21, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.power_scheduler.v1.RuleInfo.domain_id', index=9,
number=22, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='created_by', full_name='spaceone.api.power_scheduler.v1.RuleInfo.created_by', index=10,
number=23, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='created_at', full_name='spaceone.api.power_scheduler.v1.RuleInfo.created_at', index=11,
number=31, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1268,
serialized_end=1657,
)
_RULESINFO = _descriptor.Descriptor(
name='RulesInfo',
full_name='spaceone.api.power_scheduler.v1.RulesInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='results', full_name='spaceone.api.power_scheduler.v1.RulesInfo.results', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='total_count', full_name='spaceone.api.power_scheduler.v1.RulesInfo.total_count', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1659,
serialized_end=1751,
)
_SCHEDULERULESTATQUERY = _descriptor.Descriptor(
name='ScheduleRuleStatQuery',
full_name='spaceone.api.power_scheduler.v1.ScheduleRuleStatQuery',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='query', full_name='spaceone.api.power_scheduler.v1.ScheduleRuleStatQuery.query', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.power_scheduler.v1.ScheduleRuleStatQuery.domain_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1753,
serialized_end=1849,
)
_CREATESCHEDULERULEREQUEST.fields_by_name['state'].enum_type = _SCHEDULERULESTATE
_CREATESCHEDULERULEREQUEST.fields_by_name['rule_type'].enum_type = _RULETYPE
_CREATESCHEDULERULEREQUEST.fields_by_name['rule'].message_type = _RULE
_CREATESCHEDULERULEREQUEST.fields_by_name['tags'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_UPDATESCHEDULERULEREQUEST.fields_by_name['state'].enum_type = _SCHEDULERULESTATE
_UPDATESCHEDULERULEREQUEST.fields_by_name['rule'].message_type = _RULE
_UPDATESCHEDULERULEREQUEST.fields_by_name['tags'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_SCHEDULERULEQUERY.fields_by_name['query'].message_type = spaceone_dot_api_dot_core_dot_v1_dot_query__pb2._QUERY
_SCHEDULERULEQUERY.fields_by_name['state'].enum_type = _SCHEDULERULESTATE
_RULE.oneofs_by_name['format'].fields.append(
_RULE.fields_by_name['day'])
_RULE.fields_by_name['day'].containing_oneof = _RULE.oneofs_by_name['format']
_RULE.oneofs_by_name['format'].fields.append(
_RULE.fields_by_name['date'])
_RULE.fields_by_name['date'].containing_oneof = _RULE.oneofs_by_name['format']
_RULEINFO.fields_by_name['state'].enum_type = _SCHEDULERULESTATE
_RULEINFO.fields_by_name['rule_type'].enum_type = _RULETYPE
_RULEINFO.fields_by_name['rule'].message_type = _RULE
_RULEINFO.fields_by_name['tags'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_RULESINFO.fields_by_name['results'].message_type = _RULEINFO
_SCHEDULERULESTATQUERY.fields_by_name['query'].message_type = spaceone_dot_api_dot_core_dot_v1_dot_query__pb2._STATISTICSQUERY
DESCRIPTOR.message_types_by_name['CreateScheduleRuleRequest'] = _CREATESCHEDULERULEREQUEST
DESCRIPTOR.message_types_by_name['UpdateScheduleRuleRequest'] = _UPDATESCHEDULERULEREQUEST
DESCRIPTOR.message_types_by_name['ScheduleRuleRequest'] = _SCHEDULERULEREQUEST
DESCRIPTOR.message_types_by_name['GetScheduleRuleRequest'] = _GETSCHEDULERULEREQUEST
DESCRIPTOR.message_types_by_name['ScheduleRuleQuery'] = _SCHEDULERULEQUERY
DESCRIPTOR.message_types_by_name['Rule'] = _RULE
DESCRIPTOR.message_types_by_name['RuleInfo'] = _RULEINFO
DESCRIPTOR.message_types_by_name['RulesInfo'] = _RULESINFO
DESCRIPTOR.message_types_by_name['ScheduleRuleStatQuery'] = _SCHEDULERULESTATQUERY
DESCRIPTOR.enum_types_by_name['ScheduleRuleState'] = _SCHEDULERULESTATE
DESCRIPTOR.enum_types_by_name['RuleType'] = _RULETYPE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
CreateScheduleRuleRequest = _reflection.GeneratedProtocolMessageType('CreateScheduleRuleRequest', (_message.Message,), {
'DESCRIPTOR' : _CREATESCHEDULERULEREQUEST,
'__module__' : 'spaceone.api.power_scheduler.v1.schedule_rule_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.power_scheduler.v1.CreateScheduleRuleRequest)
})
_sym_db.RegisterMessage(CreateScheduleRuleRequest)
UpdateScheduleRuleRequest = _reflection.GeneratedProtocolMessageType('UpdateScheduleRuleRequest', (_message.Message,), {
'DESCRIPTOR' : _UPDATESCHEDULERULEREQUEST,
'__module__' : 'spaceone.api.power_scheduler.v1.schedule_rule_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.power_scheduler.v1.UpdateScheduleRuleRequest)
})
_sym_db.RegisterMessage(UpdateScheduleRuleRequest)
ScheduleRuleRequest = _reflection.GeneratedProtocolMessageType('ScheduleRuleRequest', (_message.Message,), {
'DESCRIPTOR' : _SCHEDULERULEREQUEST,
'__module__' : 'spaceone.api.power_scheduler.v1.schedule_rule_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.power_scheduler.v1.ScheduleRuleRequest)
})
_sym_db.RegisterMessage(ScheduleRuleRequest)
GetScheduleRuleRequest = _reflection.GeneratedProtocolMessageType('GetScheduleRuleRequest', (_message.Message,), {
'DESCRIPTOR' : _GETSCHEDULERULEREQUEST,
'__module__' : 'spaceone.api.power_scheduler.v1.schedule_rule_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.power_scheduler.v1.GetScheduleRuleRequest)
})
_sym_db.RegisterMessage(GetScheduleRuleRequest)
ScheduleRuleQuery = _reflection.GeneratedProtocolMessageType('ScheduleRuleQuery', (_message.Message,), {
'DESCRIPTOR' : _SCHEDULERULEQUERY,
'__module__' : 'spaceone.api.power_scheduler.v1.schedule_rule_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.power_scheduler.v1.ScheduleRuleQuery)
})
_sym_db.RegisterMessage(ScheduleRuleQuery)
Rule = _reflection.GeneratedProtocolMessageType('Rule', (_message.Message,), {
'DESCRIPTOR' : _RULE,
'__module__' : 'spaceone.api.power_scheduler.v1.schedule_rule_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.power_scheduler.v1.Rule)
})
_sym_db.RegisterMessage(Rule)
RuleInfo = _reflection.GeneratedProtocolMessageType('RuleInfo', (_message.Message,), {
'DESCRIPTOR' : _RULEINFO,
'__module__' : 'spaceone.api.power_scheduler.v1.schedule_rule_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.power_scheduler.v1.RuleInfo)
})
_sym_db.RegisterMessage(RuleInfo)
RulesInfo = _reflection.GeneratedProtocolMessageType('RulesInfo', (_message.Message,), {
'DESCRIPTOR' : _RULESINFO,
'__module__' : 'spaceone.api.power_scheduler.v1.schedule_rule_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.power_scheduler.v1.RulesInfo)
})
_sym_db.RegisterMessage(RulesInfo)
ScheduleRuleStatQuery = _reflection.GeneratedProtocolMessageType('ScheduleRuleStatQuery', (_message.Message,), {
'DESCRIPTOR' : _SCHEDULERULESTATQUERY,
'__module__' : 'spaceone.api.power_scheduler.v1.schedule_rule_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.power_scheduler.v1.ScheduleRuleStatQuery)
})
_sym_db.RegisterMessage(ScheduleRuleStatQuery)
_SCHEDULERULE = _descriptor.ServiceDescriptor(
name='ScheduleRule',
full_name='spaceone.api.power_scheduler.v1.ScheduleRule',
file=DESCRIPTOR,
index=0,
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_start=1977,
serialized_end=2979,
methods=[
_descriptor.MethodDescriptor(
name='create',
full_name='spaceone.api.power_scheduler.v1.ScheduleRule.create',
index=0,
containing_service=None,
input_type=_CREATESCHEDULERULEREQUEST,
output_type=_RULEINFO,
serialized_options=b'\202\323\344\223\002$\"\"/power-scheduler/v1/schedule-rules',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='update',
full_name='spaceone.api.power_scheduler.v1.ScheduleRule.update',
index=1,
containing_service=None,
input_type=_UPDATESCHEDULERULEREQUEST,
output_type=_RULEINFO,
serialized_options=b'\202\323\344\223\0026\0324/power-scheduler/v1/schedule-rule/{schedule_rule_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='delete',
full_name='spaceone.api.power_scheduler.v1.ScheduleRule.delete',
index=2,
containing_service=None,
input_type=_SCHEDULERULEREQUEST,
output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
serialized_options=b'\202\323\344\223\0026*4/power-scheduler/v1/schedule-rule/{schedule_rule_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='get',
full_name='spaceone.api.power_scheduler.v1.ScheduleRule.get',
index=3,
containing_service=None,
input_type=_GETSCHEDULERULEREQUEST,
output_type=_RULEINFO,
serialized_options=b'\202\323\344\223\0026\0224/power-scheduler/v1/schedule-rule/{schedule_rule_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='list',
full_name='spaceone.api.power_scheduler.v1.ScheduleRule.list',
index=4,
containing_service=None,
input_type=_SCHEDULERULEQUERY,
output_type=_RULESINFO,
serialized_options=b'\202\323\344\223\002Q\022\"/power-scheduler/v1/schedule-rulesZ+\")/power-scheduler/v1/schedule-rules/search',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='stat',
full_name='spaceone.api.power_scheduler.v1.ScheduleRule.stat',
index=5,
containing_service=None,
input_type=_SCHEDULERULESTATQUERY,
output_type=google_dot_protobuf_dot_struct__pb2._STRUCT,
serialized_options=b'\202\323\344\223\002)\"\'/power-scheduler/v1/schedule-rules/stat',
create_key=_descriptor._internal_create_key,
),
])
_sym_db.RegisterServiceDescriptor(_SCHEDULERULE)
DESCRIPTOR.services_by_name['ScheduleRule'] = _SCHEDULERULE
# @@protoc_insertion_point(module_scope)
| 50.035928
| 4,517
| 0.769196
| 5,439
| 41,780
| 5.586137
| 0.056076
| 0.042655
| 0.064773
| 0.068163
| 0.814304
| 0.787579
| 0.754929
| 0.736267
| 0.67936
| 0.655301
| 0
| 0.041287
| 0.108401
| 41,780
| 834
| 4,518
| 50.095923
| 0.774342
| 0.024725
| 0
| 0.661519
| 1
| 0.001287
| 0.257268
| 0.226822
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.011583
| 0
| 0.011583
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
c6dd53889ed24a20c2e564119c4f2587d1b0b030
| 12,891
|
py
|
Python
|
Functions/learning_models.py
|
goyalpike/RK4_SinDy
|
7a53b03611f28915244a86f11de6552e513d0dbb
|
[
"MIT"
] | null | null | null |
Functions/learning_models.py
|
goyalpike/RK4_SinDy
|
7a53b03611f28915244a86f11de6552e513d0dbb
|
[
"MIT"
] | null | null | null |
Functions/learning_models.py
|
goyalpike/RK4_SinDy
|
7a53b03611f28915244a86f11de6552e513d0dbb
|
[
"MIT"
] | null | null | null |
""" Training of a network """
import torch
import sys
import torch_optimizer as optim_all
import numpy as np
from .modules import rk4th_onestep_SparseId, rk4th_onestep_SparseId_parameter
def learning_sparse_model(dictionary, Coeffs, dataloaders, Params,lr_reduction = 10, quite = False):
'''
Parameters
----------
dictionary : A function
It is a symbolic dictionary, containing potential candidate functions that describes dynamics.
Coeffs : float
Coefficients that picks correct features from the dictionary .
dataloaders : dataset
dataloaders contains the data that follows PyTorch framework.
Params : dataclass
Containing additional auxilary parameters.
lr_reduction : float, optional
The learning rate is reduced by lr_reduction after each iteration. The default is 10.
quite : bool, optional
It decides whether to print coeffs after each iteration. The default is False.
Returns
-------
Coeffs : float
Non-zero coefficients picks features from the dictionary and
also determines right coefficients in front of the features.
loss_track : float
tacking loss after each epoch and iteration.
'''
# Define optimizer
opt_func = optim_all.RAdam(Coeffs.parameters(), lr = Params.lr,weight_decay=Params.weightdecay)
# Define loss function
criteria = torch.nn.MSELoss()
# pre-allocate memory for loss_fuction
loss_track = np.zeros((Params.num_iter,Params.num_epochs))
#########################
###### Training #########
#########################
for p in range(Params.num_iter):
for g in range(Params.num_epochs):
Coeffs.train()
for y in dataloaders['train']:
opt_func.zero_grad()
loss_new = torch.autograd.Variable(torch.tensor([0.],requires_grad=True))
weights = 2**(-0.5*torch.linspace(0,0,1))
for i in range(y[0].shape[0]):
yi = y[0][i]
timesteps_i = torch.tensor(np.diff(y[1][i],axis=0)).float()
y_total = yi
##################################
# One forward step predictions
##################################
y_pred = rk4th_onestep_SparseId(y_total[:-1],dictionary,Coeffs,timestep = timesteps_i)
loss_new += criteria(y_pred,y_total[1:])
##################################
# One backward step predictions
##################################
y_pred_back = rk4th_onestep_SparseId(y_total[1:],dictionary, Coeffs,timestep = -timesteps_i)
loss_new += weights[0]*criteria(y_pred_back, y_total[:-1])
loss_new /= y[0].shape[0]
loss_track[p,g] += loss_new.item()
loss_new.backward()
opt_func.step()
sys.stdout.write("\r [Iter %d/%d] [Epoch %d/%d] [Training loss: %.2e] [Learning rate: %.2e]"
% (p+1,Params.num_iter,g+1,Params.num_epochs,loss_track[p,g],opt_func.param_groups[0]['lr']))
# Removing the coefficients smaller than tol and set gradients w.r.t. them to zero
# so that they will not be updated in the iterations
Ws = Coeffs.linear.weight.detach().clone()
Mask_Ws = (Ws.abs() > Params.tol_coeffs).type(torch.float)
Coeffs.linear.weight = torch.nn.Parameter(Ws * Mask_Ws)
if not quite:
print('\n')
print(Ws)
print('\nError in coeffs due to truncation: {}'.format((Ws - Coeffs.linear.weight).abs().max()))
print('Printing coeffs after {} iter after truncation'.format(p+1))
print(Coeffs.linear.weight)
print('\n'+'='*50)
Coeffs.linear.weight.register_hook(lambda grad: grad.mul_(Mask_Ws))
new_lr = opt_func.param_groups[0]['lr']/lr_reduction
opt_func = optim_all.RAdam(Coeffs.parameters(), lr = new_lr,weight_decay=Params.weightdecay)
return Coeffs, loss_track
def learning_sparse_model_parameter(dictionary, Coeffs, dataloaders, Params,lr_reduction = 10, quite = False):
'''
Here, we tailor sparse learning for parameter cases. The script is tested for a single parametes.
Parameters
----------
dictionary : A function
It is a symbolic dictionary, containing potential candidate functions that describes dynamics.
Coeffs : float
Coefficients that picks correct features from the dictionary .
dataloaders : dataset
dataloaders contains the data that follows PyTorch framework.
Params : dataclass
Containing additional auxilary parameters.
lr_reduction : float, optional
The learning rate is reduced by lr_reduction after each iteration. The default is 10.
quite : bool, optional
It decides whether to print coeffs after each iteration. The default is False.
Returns
-------
Coeffs : float
Non-zero coefficients picks features from the dictionary and
also determines right coefficients in front of the features.
loss_track : float
tacking loss after each epoch and iteration.
'''
# Define optimizer
opt_func = optim_all.RAdam(Coeffs.parameters(), lr = Params.lr,weight_decay=Params.weightdecay)
# Define loss functions
criteria = torch.nn.MSELoss()
# pre-allocate memory for loss_fuction
loss_track = np.zeros((Params.num_iter,Params.num_epochs))
#########################
###### Training #########
#########################
for p in range(Params.num_iter):
for g in range(Params.num_epochs):
Coeffs.train()
for y in dataloaders['train']:
opt_func.zero_grad()
loss_new = torch.autograd.Variable(torch.tensor([0.],requires_grad=True))
weights = 2**(-0.5*torch.linspace(0,0,1))
for i in range(y[0].shape[0]):
yi = y[0][i]
mui = y[2][i]
timesteps_i = torch.tensor(np.diff(y[1][i],axis=0)).float()
##########################
# One forward step predictions
y_pred = rk4th_onestep_SparseId_parameter(yi[:-1],mui[:-1],dictionary,Coeffs,timestep = timesteps_i)
loss_new += criteria(y_pred,yi[1:])
# One backward step predictions
y_pred_back = rk4th_onestep_SparseId_parameter(yi[1:],mui[:-1],dictionary, Coeffs,timestep = -timesteps_i)
loss_new += weights[0]*criteria(y_pred_back, yi[:-1])
loss_new /= y[0].shape[0]
loss_track[p,g] += loss_new.item()
loss_new.backward()
opt_func.step()
sys.stdout.write("\r [Iter %d/%d] [Epoch %d/%d] [Training loss: %.2e] [Learning rate: %.2e]"
% (p+1,Params.num_iter,g+1,Params.num_epochs,loss_track[p,g],opt_func.param_groups[0]['lr']))
# Removing the coefficients smaller than tol and set gradients w.r.t. them to zero
# so that they will not be updated in the iterations
Ws = Coeffs.linear.weight.detach().clone()
Mask_Ws = (Ws.abs() > Params.tol_coeffs).type(torch.float)
Coeffs.linear.weight = torch.nn.Parameter(Ws * Mask_Ws)
if not quite:
print('\n')
print(Ws)
print('\nError in coeffs due to truncation: {}'.format((Ws - Coeffs.linear.weight).abs().max()))
print('Printing coeffs after {} iter after truncation'.format(p+1))
print(Coeffs.linear.weight)
print('\n'+'='*50)
Coeffs.linear.weight.register_hook(lambda grad: grad.mul_(Mask_Ws))
new_lr = opt_func.param_groups[0]['lr']/lr_reduction
opt_func = optim_all.RAdam(Coeffs.parameters(), lr = new_lr,weight_decay=Params.weightdecay)
return Coeffs, loss_track
def learning_sparse_model_rational(dictionary, Coeffs_rational, dataloaders, Params,lr_reduction = 10, quite = False):
'''
Here, we tailor sparse learning for parameter cases. The script is tested for a single parametes.
Parameters
----------
dictionary : A function
It is a symbolic dictionary, containing potential candidate functions that describes dynamics.
Coeffs : float
Coefficients that picks correct features from the dictionary .
dataloaders : dataset
dataloaders contains the data that follows PyTorch framework.
Params : dataclass
Containing additional auxilary parameters.
lr_reduction : float, optional
The learning rate is reduced by lr_reduction after each iteration. The default is 10.
quite : bool, optional
It decides whether to print coeffs after each iteration. The default is False.
Returns
-------
Coeffs : float
Non-zero coefficients picks features from the dictionary and
also determines right coefficients in front of the features.
loss_track : float
tacking loss after each epoch and iteration.
'''
# Define optimizer
opt_func = optim_all.RAdam(Coeffs_rational.parameters(), lr = Params.lr,weight_decay=Params.weightdecay)
# Define loss function
criteria = torch.nn.MSELoss()
# pre-allocate memory for loss_fuction
loss_track = np.zeros((Params.num_iter,Params.num_epochs))
#########################
###### Training #########
#########################
for p in range(Params.num_iter):
for g in range(Params.num_epochs):
Coeffs_rational.train()
for y in dataloaders['train']:
opt_func.zero_grad()
loss_new = torch.autograd.Variable(torch.tensor([0.],requires_grad=True))
weights = 2**(-0.5*torch.linspace(0,0,1))
for i in range(y[0].shape[0]):
yi = y[0][i]
timesteps_i = torch.tensor(np.diff(y[1][i],axis=0)).float()
y_total = yi
##########################
# One forward step predictions
y_pred = rk4th_onestep_SparseId(y_total[:-1],dictionary,Coeffs_rational,timestep = timesteps_i)
loss_new += criteria(y_pred,y_total[1:])
# One backward step predictions
y_pred_back = rk4th_onestep_SparseId(y_total[1:],dictionary, Coeffs_rational,timestep = -timesteps_i)
loss_new += weights[0]*criteria(y_pred_back, y_total[:-1])
loss_new /= y[0].shape[0]
loss_track[p,g] += loss_new.item()
loss_new.backward()
opt_func.step()
sys.stdout.write("\r [Forced zero terms %d/%d] [Epoch %d/%d] [Training loss: %.2e] [Learning rate: %.2e]"
% (p,Params.num_iter,g+1,Params.num_epochs,loss_track[p,g],opt_func.param_groups[0]['lr']))
torch.save(Coeffs_rational,Params.save_model_path+'MM_model_coefficients_iter_{}.pkl'.format(p))
# Removing the coefficients smaller than tol and set gradients w.r.t. them to zero
# so that they will not be updated in the iterations
Ws_Num = Coeffs_rational.numerator.weight.detach().clone()
Ws_Den = Coeffs_rational.denominator.weight.detach().clone()
if len(Ws_Den[Ws_Den!=0]) == 0:
Adp_tol = torch.min(Ws_Num[Ws_Num!=0].abs().min()) + 1e-5
else:
Adp_tol = torch.min(Ws_Num[Ws_Num!=0].abs().min(), Ws_Den[Ws_Den!=0].abs().min()) + 1e-5
Mask_Ws_Num = (Ws_Num.abs() > Adp_tol).type(torch.float)
Mask_Ws_Den = (Ws_Den.abs() > Adp_tol).type(torch.float)
Coeffs_rational.numerator.weight = torch.nn.Parameter(Ws_Num * Mask_Ws_Num)
Coeffs_rational.denominator.weight = torch.nn.Parameter(Ws_Den * Mask_Ws_Den)
Coeffs_rational.numerator.weight.register_hook(lambda grad: grad.mul_(Mask_Ws_Num))
Coeffs_rational.denominator.weight.register_hook(lambda grad: grad.mul_(Mask_Ws_Den))
new_lr = opt_func.param_groups[0]['lr']/lr_reduction
opt_func = optim_all.RAdam(Coeffs_rational.parameters(), lr = new_lr,weight_decay=Params.weightdecay)
return Coeffs_rational, loss_track
| 44.298969
| 135
| 0.581258
| 1,551
| 12,891
| 4.672469
| 0.132818
| 0.017387
| 0.024838
| 0.020698
| 0.9259
| 0.915413
| 0.909066
| 0.899683
| 0.899683
| 0.872085
| 0
| 0.012262
| 0.291444
| 12,891
| 290
| 136
| 44.451724
| 0.781147
| 0.276937
| 0
| 0.709677
| 0
| 0.024194
| 0.054795
| 0.003831
| 0
| 0
| 0
| 0
| 0
| 1
| 0.024194
| false
| 0
| 0.040323
| 0
| 0.08871
| 0.096774
| 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
|
05a1b225db67c9294be8ffcb48b01e142b5fd38c
| 51,802
|
py
|
Python
|
python source files/trainer.py
|
barneyga/A-Recurrent-Model-of-Approximate-Enumeration
|
8a0ca5094a2e180939c25e55f376f30dfa1095bd
|
[
"MIT"
] | null | null | null |
python source files/trainer.py
|
barneyga/A-Recurrent-Model-of-Approximate-Enumeration
|
8a0ca5094a2e180939c25e55f376f30dfa1095bd
|
[
"MIT"
] | 1
|
2021-12-08T00:52:53.000Z
|
2021-12-08T00:52:53.000Z
|
python source files/trainer.py
|
barneyga/A-Recurrent-Model-of-Approximate-Enumeration
|
8a0ca5094a2e180939c25e55f376f30dfa1095bd
|
[
"MIT"
] | null | null | null |
import os
import time
import shutil
import pickle
import torch
import torch.nn.functional as F
from tqdm import tqdm
from torch.optim.lr_scheduler import ReduceLROnPlateau
from tensorboard_logger import configure, log_value
import pandas as pd
from model import RecurrentAttention
from stop_model import StopRecurrentAttention
from utils import AverageMeter
class Trainer:
"""A Recurrent Attention Model trainer.
All hyperparameters are provided by the user in the
config file.
"""
def __init__(self, config, data_loader):
"""
Construct a new Trainer instance.
Args:
config: object containing command line arguments.
data_loader: A data iterator.
"""
self.config = config
if config.use_gpu and torch.cuda.is_available():
self.device = torch.device("cuda")
else:
self.device = torch.device("cpu")
# glimpse network params
self.patch_size = config.patch_size
self.glimpse_scale = config.glimpse_scale
self.num_patches = config.num_patches
self.loc_hidden = config.loc_hidden
self.glimpse_hidden = config.glimpse_hidden
# core network params
self.num_glimpses = config.num_glimpses
self.hidden_size = config.hidden_size
self.include_stop = config.include_stop
# reinforce params
self.std = config.std
self.M = config.M
# data params
if config.is_train:
self.train_loader = data_loader[0]
self.valid_loader = data_loader[1]
self.num_train = len(self.train_loader.sampler.indices)
self.num_valid = len(self.valid_loader.sampler.indices)
else:
self.test_loader = data_loader
self.num_test = len(self.test_loader.dataset)
self.num_classes = config.num_classes
self.num_channels = config.num_channels
# training params
self.epochs = config.epochs
self.start_epoch = 0
self.momentum = config.momentum
self.lr = config.init_lr
self.hesitation_penalty = config.hesitation_penalty
# misc params
self.best = config.best
self.logs_dir = config.logs_dir
self.best_valid_acc = 0.0
self.counter = 0
self.lr_patience = config.lr_patience
self.train_patience = config.train_patience
self.use_tensorboard = config.use_tensorboard
self.resume = config.resume
self.print_freq = config.print_freq
self.plot_freq = config.plot_freq
self.model_name = config.model_name
self.model_dir = config.model_dir
self.plot_dir = config.plot_dir
# configure tensorboard logging
if self.use_tensorboard:
tensorboard_dir = self.logs_dir + self.model_name
print("[*] Saving tensorboard logs to {}".format(tensorboard_dir))
if not os.path.exists(tensorboard_dir):
os.makedirs(tensorboard_dir)
configure(tensorboard_dir)
# build RAM model
if self.include_stop:
self.model = StopRecurrentAttention(
self.patch_size,
self.num_patches,
self.glimpse_scale,
self.num_channels,
self.loc_hidden,
self.glimpse_hidden,
self.std,
self.hidden_size,
self.num_classes,
)
else:
self.model = RecurrentAttention(
self.patch_size,
self.num_patches,
self.glimpse_scale,
self.num_channels,
self.loc_hidden,
self.glimpse_hidden,
self.std,
self.hidden_size,
self.num_classes,
)
self.model.to(self.device)
# initialize optimizer and scheduler
self.optimizer = torch.optim.Adam(
self.model.parameters(), lr=self.config.init_lr
)
self.scheduler = ReduceLROnPlateau(
self.optimizer, "min", patience=self.lr_patience
)
def reset(self):
h_t = torch.zeros(
self.batch_size,
self.hidden_size,
dtype=torch.float,
device=self.device,
requires_grad=True,
)
l_t = torch.zeros(
self.batch_size,
2,
dtype=torch.float,
device=self.device,
requires_grad=True,
)
l_t.requires_grad = True
if not self.include_stop:
return h_t, l_t
s_t = torch.ones(
self.batch_size,
1,
dtype=torch.float,
device=self.device,
requires_grad=True,
)
return h_t, l_t, s_t
def train(self):
"""Train the model on the training set.
A checkpoint of the model is saved after each epoch
and if the validation accuracy is improved upon,
a separate ckpt is created for use on the test set.
"""
# load the most recent checkpoint
if self.resume:
self.load_checkpoint(best=False)
print(
"\n[*] Train on {} samples, validate on {} samples".format(
self.num_train, self.num_valid
)
)
for epoch in range(self.start_epoch, self.epochs):
print(
"\nEpoch: {}/{} - LR: {:.6f}".format(
epoch + 1, self.epochs, self.optimizer.param_groups[0]["lr"]
)
)
# train for 1 epoch
if self.include_stop:
train_loss, train_acc = self.train_one_epoch_stop(epoch)
else:
train_loss, train_acc = self.train_one_epoch(epoch)
# evaluate on validation set
if self.include_stop:
valid_loss, valid_acc = self.validate(epoch)
else:
valid_loss, valid_acc = self.validate(epoch)
# # reduce lr if validation loss plateaus
self.scheduler.step(-valid_acc)
is_best = valid_acc > self.best_valid_acc
msg1 = "train loss: {:.3f} - train acc: {:.3f} "
msg2 = "- val loss: {:.3f} - val acc: {:.3f} - val err: {:.3f}"
if is_best:
self.counter = 0
msg2 += " [*]"
msg = msg1 + msg2
print(
msg.format(
train_loss, train_acc, valid_loss, valid_acc, 100 - valid_acc
)
)
# check for improvement
if not is_best:
self.counter += 1
if self.counter > self.train_patience:
print("[!] No improvement in a while, stopping training.")
return
self.best_valid_acc = max(valid_acc, self.best_valid_acc)
self.save_checkpoint(
{
"epoch": epoch + 1,
"model_state": self.model.state_dict(),
"optim_state": self.optimizer.state_dict(),
"best_valid_acc": self.best_valid_acc,
},
is_best,
)
def train_one_epoch_stop(self, epoch):
"""
Train the model for 1 epoch of the training set.
An epoch corresponds to one full pass through the entire
training set in successive mini-batches.
This is used by train() and should not be called manually.
"""
self.model.train()
batch_time = AverageMeter()
losses = AverageMeter()
accs = AverageMeter()
tic = time.time()
with tqdm(total=self.num_train) as pbar:
for i, (x, y) in enumerate(self.train_loader):
self.optimizer.zero_grad()
x, y = x.to(self.device), y.to(self.device, dtype=torch.int64)
plot = False
if (epoch % self.plot_freq == 0) and (i == 0):
plot = True
# initialize location vector and hidden state
self.batch_size = x.shape[0]
h_t, l_t, s_t = self.reset()
# save images
imgs = []
imgs.append(x[0:9])
# extract the glimpses
locs = []
l_log_pi = []
s_log_pi = []
baselines = []
log_probas = []
stop_signals = []
for t in range(self.num_glimpses):
# forward pass through model
h_t, l_t, s_t, b_t, log_ps, l_p, s_p = self.model(x, l_t, h_t, s_t, t == self.num_glimpses - 1)
# store
locs.append(l_t[0:9])
baselines.append(b_t)
l_log_pi.append(l_p)
s_log_pi.append(s_p)
log_probas.append(log_ps)
stop_signals.append(s_t)
# # last iteration
# h_t, l_t, b_t, log_probas, p = self.model(x, l_t, h_t, last=True)
# log_pi.append(p)
# baselines.append(b_t)
# locs.append(l_t[0:9])
# convert list to tensors and reshape
baselines = torch.stack(baselines).transpose(1, 0)
l_log_pi = torch.stack(l_log_pi).transpose(1, 0)
s_log_pi = torch.stack(s_log_pi).transpose(1, 0)
log_probas = torch.stack(log_probas).transpose(1, 0)
stop_signals = torch.stack(stop_signals).transpose(1, 0).squeeze(2)
#process stop signals
up_through_stop = stop_signals
count = torch.arange(self.batch_size)
num_steps = torch.sum(stop_signals, dim=1).long()
up_through_stop[count,num_steps] += 1
#extract log_probas at first stop signal
log_probas = log_probas[count,num_steps,:]
#clip histories after stop signal
baselines = baselines * up_through_stop
l_log_pi = l_log_pi * up_through_stop
s_log_pi = s_log_pi * up_through_stop
# calculate reward
predicted = torch.max(log_probas, 1)[1]
R = (predicted.detach() == y).float()
R = R.unsqueeze(1).repeat(1, self.num_glimpses)
mask = (torch.arange(R.size(1), device=num_steps.device)==num_steps.unsqueeze(1))
R = mask*R #Reward of 1 at first stop signal
R = R - stop_signals * self.hesitation_penalty
# compute losses for differentiable modules
loss_action = F.nll_loss(log_probas, y)
loss_baseline = F.mse_loss(baselines, R)
# compute reinforce loss
# summed over timesteps and averaged across batch
adjusted_reward = R - baselines.detach()
loss_reinforce = torch.sum(-l_log_pi * adjusted_reward, dim=1) + torch.sum(-s_log_pi * adjusted_reward, dim=1)
loss_reinforce = torch.mean(loss_reinforce, dim=0)
# sum up into a hybrid loss
loss = loss_action + loss_baseline + loss_reinforce * 0.01
# compute accuracy
correct = (predicted == y).float()
acc = 100 * (correct.sum() / len(y))
# store
losses.update(loss.item(), x.size()[0])
accs.update(acc.item(), x.size()[0])
# compute gradients and update SGD
loss.backward()
self.optimizer.step()
# measure elapsed time
toc = time.time()
batch_time.update(toc - tic)
pbar.set_description(
(
"{:.1f}s - loss: {:.3f} - acc: {:.3f}".format(
(toc - tic), loss.item(), acc.item()
)
)
)
pbar.update(self.batch_size)
# dump the glimpses and locs
if plot:
imgs = [g.cpu().data.numpy().squeeze() for g in imgs]
locs = [l.cpu().data.numpy() for l in locs]
pickle.dump(
imgs, open(self.plot_dir + "g_{}.p".format(epoch + 1), "wb")
)
pickle.dump(
locs, open(self.plot_dir + "l_{}.p".format(epoch + 1), "wb")
)
# log to tensorboard
if self.use_tensorboard:
iteration = epoch * len(self.train_loader) + i
log_value("train_loss", losses.avg, iteration)
log_value("train_acc", accs.avg, iteration)
return losses.avg, accs.avg
@torch.no_grad()
def validate_stop(self, epoch):
"""Evaluate the RAM model on the validation set.
"""
losses = AverageMeter()
accs = AverageMeter()
for i, (x, y) in enumerate(self.valid_loader):
x, y = x.to(self.device), y.to(self.device, dtype=torch.int64)
# duplicate M times
x = x.repeat(self.M, 1, 1, 1)
# initialize location vector and hidden state
self.batch_size = x.shape[0]
h_t, l_t, s_t = self.reset()
# extract the glimpses
l_log_pi = []
s_log_pi = []
baselines = []
log_probas = []
stop_signals = []
for t in range(self.num_glimpses):
# forward pass through model
h_t, l_t, s_t, b_t, log_ps, l_p, s_p = self.model(x, l_t, h_t, s_t)
# store
baselines.append(b_t)
l_log_pi.append(l_p)
s_log_pi.append(s_p)
log_probas.append(log_ps)
stop_signals.append(s_t)
# convert list to tensors and reshape
baselines = torch.stack(baselines).transpose(1, 0)
l_log_pi = torch.stack(l_log_pi).transpose(1, 0)
s_log_pi = torch.stack(s_log_pi).transpose(1, 0)
log_probas = torch.stack(log_probas).transpose(1, 0)
stop_signals = torch.stack(stop_signals).transpose(1, 0).squeeze(2)
#process stop signals
up_through_stop = stop_signals
count = torch.arange(self.batch_size)
num_steps = torch.sum(stop_signals, dim=1).long()
up_through_stop[count,num_steps] += 1
#extract log_probas at first stop signal
log_probas = log_probas[count,num_steps,:]
#clip histories after stop signal
baselines = baselines * up_through_stop
l_log_pi = l_log_pi * up_through_stop
s_log_pi = s_log_pi * up_through_stop
# average
log_probas = log_probas.view(self.M, -1, log_probas.shape[-1])
log_probas = torch.mean(log_probas, dim=0)
baselines = baselines.contiguous().view(self.M, -1, baselines.shape[-1])
baselines = torch.mean(baselines, dim=0)
l_log_pi = l_log_pi.contiguous().view(self.M, -1, l_log_pi.shape[-1])
l_log_pi = torch.mean(l_log_pi, dim=0)
s_log_pi = s_log_pi.contiguous().view(self.M, -1, s_log_pi.shape[-1])
s_log_pi = torch.mean(s_log_pi, dim=0)
# calculate reward
predicted = torch.max(log_probas, 1)[1]
R = (predicted.detach() == y).float()
R = R.unsqueeze(1).repeat(1, self.num_glimpses)
mask = (torch.arange(R.size(1), device=num_steps.device)==num_steps.unsqueeze(1))
R = mask*R
R = R - stop_signals * self.hesitation_penalty
# compute losses for differentiable modules
loss_action = F.nll_loss(log_probas, y)
loss_baseline = F.mse_loss(baselines, R)
# compute reinforce loss
adjusted_reward = R - baselines.detach()
loss_reinforce = torch.sum(-l_log_pi * adjusted_reward, dim=1) + torch.sum(-s_log_pi * adjusted_reward, dim=1)
loss_reinforce = torch.mean(loss_reinforce, dim=0)
# sum up into a hybrid loss
loss = loss_action + loss_baseline + loss_reinforce * 0.01
# compute accuracy
correct = (predicted == y).float()
acc = 100 * (correct.sum() / len(y))
# store
losses.update(loss.item(), x.size()[0])
accs.update(acc.item(), x.size()[0])
# log to tensorboard
if self.use_tensorboard:
iteration = epoch * len(self.valid_loader) + i
log_value("valid_loss", losses.avg, iteration)
log_value("valid_acc", accs.avg, iteration)
return losses.avg, accs.avg
@torch.no_grad()
def test_stop(self):
"""Test the RAM model.
This function should only be called at the very
end once the model has finished training.
"""
correct = 0
# load the best checkpoint
self.load_checkpoint(best=self.best)
# removed image, final_softmax, hidden layer, softmax, final_persistant_softmax
cols = ['image_id', 'timestep', 'num_dots', 'area',
'num_steps', 'final_prediction', 'next_location', 'prediction',
'final_persistant_absolute_error', 'final_persistant_prediction',
'absolute_error', 'stop_signal', 'stop_probability']
# changed naming to SMALL
filename = self.model_name + "_SMALL.csv"
test_path = os.path.join(self.model_dir, filename)
for i, (x, y, a) in enumerate(self.test_loader):
df_dict = {column_name : [] for column_name in cols}
batch_size = x.shape[0]
df_dict['image_id'].extend(sum([[image_id]*self.num_glimpses for image_id in range(i*batch_size, (i+1)*batch_size)], []))
df_dict['timestep'].extend(sum([list(range(self.num_glimpses)) for image_id in range(i*batch_size, (i+1)*batch_size)], []))
# df_dict['image'].extend(x.repeat_interleave(self.num_glimpses, dim=0).cpu().tolist())
repeat_y = y.repeat_interleave(self.num_glimpses)
df_dict['num_dots'].extend(repeat_y.cpu().tolist())
df_dict['area'].extend(a.repeat_interleave(self.num_glimpses).cpu().tolist())
x, y = x.to(self.device), y.to(self.device, dtype=torch.int64)
# initialize location vector and hidden state
self.batch_size = x.shape[0]
h_t, l_t, s_t = self.reset()
# extract the glimpses
l_ts = []
h_ts = []
output_log_probas = []
stop_signals = []
stop_log_probs = []
for t in range(self.num_glimpses):
# forward pass through model
h_t, l_t, s_t, b_t, log_ps, l_p, s_p = self.model(x, l_t, h_t, s_t)
# store
h_ts.append(h_t)
l_ts.append(l_t)
output_log_probas.append(log_ps)
stop_signals.append(s_t)
stop_log_probs.append(s_p)
# convert list to tensors and reshape
output_log_probas = torch.stack(output_log_probas).transpose(1, 0)
h_ts = torch.stack(h_ts).transpose(1, 0)
l_ts = torch.stack(l_ts).transpose(1, 0)
stop_log_probs = torch.stack(stop_log_probs).transpose(1, 0)
stop_signals = torch.stack(stop_signals).transpose(1, 0)
stretched_output_log_probas = output_log_probas.reshape(batch_size*self.num_glimpses, -1)
stretched_h_ts = h_ts.reshape(batch_size * self.num_glimpses, -1)
stretched_l_ts = l_ts.reshape(batch_size * self.num_glimpses, -1)
stretched_stop_log_probs = stop_log_probs.reshape(batch_size * self.num_glimpses, -1)
stretched_stop_signals = stop_signals.reshape(batch_size * self.num_glimpses, -1)
softmaxes = torch.exp(output_log_probas)
stretched_softmaxes = softmaxes.reshape(batch_size * self.num_glimpses, -1)
stretched_stop_probs = torch.exp(stretched_stop_log_probs)
# df_dict['softmax'].extend(stretched_softmaxes.cpu().tolist())
df_dict['stop_probability'].extend(stretched_stop_probs.squeeze(1).cpu().tolist())
# df_dict['hidden_layer'].extend(stretched_h_ts.cpu().tolist())
df_dict['next_location'].extend(stretched_l_ts.cpu().tolist())
stop_signals = stop_signals.squeeze(2)
df_dict['stop_signal'].extend(stretched_stop_signals.squeeze(1).cpu().tolist())
#process stop signals
count = torch.arange(batch_size)
num_steps = torch.sum(stop_signals, dim=1).long()
#print(f"num steps: {num_steps}")
df_dict['num_steps'].extend(num_steps.repeat_interleave(self.num_glimpses).cpu().tolist())
up_through_stop = stop_signals
up_through_stop[count,num_steps] += 1
final_persistant_mask = (up_through_stop == 0)
#print(f"mask shape: {final_persistant_mask.shape}")
#print(f"mask: {final_persistant_mask}")
#extract output_log_probas at first stop signal
final_softmax = softmaxes[count,num_steps,:]
#print(f"final soft shape: {final_softmax.shape}")
#print(f"final soft: {final_softmax}")
# df_dict['final_softmax'].extend(final_softmax.repeat_interleave(self.num_glimpses, dim = 0).cpu().tolist())
unsqueezed_final_persistant_mask = final_persistant_mask.unsqueeze(2)
repeated_final_softmax = final_softmax.unsqueeze(1).repeat(1,self.num_glimpses,1)
final_persistant_softmaxes = torch.where(unsqueezed_final_persistant_mask, repeated_final_softmax, softmaxes)
# df_dict['final_persistant_softmax'].extend(final_persistant_softmaxes.reshape(batch_size*self.num_glimpses, -1).cpu().tolist())
final_pred = final_softmax.data.max(1, keepdim=True)[1]
#print(f"final pred: {final_pred}")
df_dict['final_prediction'].extend(final_pred.repeat_interleave(self.num_glimpses).cpu().tolist())
correct += final_pred.eq(y.data.view_as(final_pred)).cpu().sum()
stretched_predictions = stretched_softmaxes.data.max(1, keepdim=True)[1].squeeze(1)
df_dict['prediction'].extend(stretched_predictions.cpu().tolist())
predictions = stretched_predictions.reshape(batch_size, self.num_glimpses)
repeated_final_pred = final_pred.repeat(1, self.num_glimpses)
final_persistant_predictions = torch.where(final_persistant_mask, repeated_final_pred, predictions)
stretched_final_persistant_predictions = final_persistant_predictions.reshape(batch_size*self.num_glimpses, -1)
#print(f"stretched_final_persistant_predictions shape: {stretched_final_persistant_predictions.shape}")
#print(f"stretched_final_persistant_predictions: {stretched_final_persistant_predictions}")
df_dict['final_persistant_prediction'].extend(stretched_final_persistant_predictions.squeeze(1).cpu().tolist())
#print(f"stretched_pred/y devices: {stretched_predictions.device}, {repeat_y.device}")
stretched_error = torch.abs(stretched_predictions - repeat_y.cuda())
df_dict['absolute_error'].extend(stretched_error.cpu().tolist())
#print(f"error : {df_dict['absolute_error']}")
final_error = torch.abs(final_pred - y.unsqueeze(1))
error = stretched_error.reshape(batch_size, self.num_glimpses)
repeated_final_error = final_error.repeat(1, self.num_glimpses)
# print(f"shapes: {final_persistant_mask.shape}, {repeated_final_error.shape}, {error.shape}")
final_persistant_error = torch.where(final_persistant_mask, repeated_final_error, error.long())
stretched_final_persistant_error = final_persistant_error.reshape(batch_size*self.num_glimpses, -1)
#print(f"stretched_final_persistant_error shape: {stretched_final_persistant_error.shape}")
#print(f"stretched_final_persistant_error: {stretched_final_persistant_error}")
df_dict['final_persistant_absolute_error'].extend(stretched_final_persistant_error.squeeze(1).cpu().tolist())
df = pd.DataFrame(df_dict)
df.to_csv(test_path, mode='a', header=not os.path.exists(test_path))
perc = (100.0 * correct) / (self.num_test)
error = 100 - perc
print(
"[*] Test Acc: {}/{} ({:.2f}% - {:.2f}%)".format(
correct, self.num_test, perc, error
)
)
def save_checkpoint(self, state, is_best):
"""Saves a checkpoint of the model.
If this model has reached the best validation accuracy thus
far, a seperate file with the suffix `best` is created.
"""
filename = self.model_name + "_ckpt.pth.tar"
model_path = os.path.join(self.model_dir, filename)
torch.save(state, model_path)
if is_best:
filename = self.model_name + "_model_best.pth.tar"
shutil.copyfile(model_path, os.path.join(self.model_dir, filename))
def load_checkpoint(self, best=False):
"""Load the best copy of a model.
This is useful for 2 cases:
- Resuming training with the most recent model checkpoint.
- Loading the best validation model to evaluate on the test data.
Args:
best: if set to True, loads the best model.
Use this if you want to evaluate your model
on the test data. Else, set to False in which
case the most recent version of the checkpoint
is used.
"""
print("[*] Loading model from {}".format(self.model_dir))
filename = self.model_name + "_ckpt.pth.tar"
if best:
filename = self.model_name + "_model_best.pth.tar"
model_path = os.path.join(self.model_dir, filename)
model = torch.load(model_path)
# load variables from checkpoint
self.start_epoch = model["epoch"]
self.best_valid_acc = model["best_valid_acc"]
self.model.load_state_dict(model["model_state"])
self.optimizer.load_state_dict(model["optim_state"])
if best:
print(
"[*] Loaded {} checkpoint @ epoch {} "
"with best valid acc of {:.3f}".format(
filename, model["epoch"], model["best_valid_acc"]
)
)
else:
print("[*] Loaded {} checkpoint @ epoch {}".format(filename, model["epoch"]))
def save_checkpoint(self, state, is_best):
"""Saves a checkpoint of the model.
If this model has reached the best validation accuracy thus
far, a seperate file with the suffix `best` is created.
"""
filename = self.model_name + "_ckpt.pth.tar"
model_path = os.path.join(self.model_dir, filename)
torch.save(state, model_path)
if is_best:
filename = self.model_name + "_model_best.pth.tar"
shutil.copyfile(model_path, os.path.join(self.model_dir, filename))
def load_checkpoint(self, best=False):
"""Load the best copy of a model.
This is useful for 2 cases:
- Resuming training with the most recent model checkpoint.
- Loading the best validation model to evaluate on the test data.
Args:
best: if set to True, loads the best model.
Use this if you want to evaluate your model
on the test data. Else, set to False in which
case the most recent version of the checkpoint
is used.
"""
print("[*] Loading model from {}".format(self.model_dir))
filename = self.model_name + "_ckpt.pth.tar"
if best:
filename = self.model_name + "_model_best.pth.tar"
model_path = os.path.join(self.model_dir, filename)
model = torch.load(model_path)
# load variables from checkpoint
self.start_epoch = model["epoch"]
self.best_valid_acc = model["best_valid_acc"]
self.model.load_state_dict(model["model_state"])
self.optimizer.load_state_dict(model["optim_state"])
if best:
print(
"[*] Loaded {} checkpoint @ epoch {} "
"with best valid acc of {:.3f}".format(
filename, model["epoch"], model["best_valid_acc"]
)
)
else:
print("[*] Loaded {} checkpoint @ epoch {}".format(filename, model["epoch"]))
def train_one_epoch(self, epoch):
"""
Train the model for 1 epoch of the training set.
An epoch corresponds to one full pass through the entire
training set in successive mini-batches.
This is used by train() and should not be called manually.
"""
self.model.train()
batch_time = AverageMeter()
losses = AverageMeter()
accs = AverageMeter()
tic = time.time()
with tqdm(total=self.num_train) as pbar:
for i, (x, y) in enumerate(self.train_loader):
self.optimizer.zero_grad()
x, y = x.to(self.device), y.to(self.device, dtype=torch.int64)
plot = False
if (epoch % self.plot_freq == 0) and (i == 0):
plot = True
# initialize location vector and hidden state
self.batch_size = x.shape[0]
#h_t, l_t, s_t = self.reset()
h_t, l_t = self.reset()
# save images
imgs = []
imgs.append(x[0:9])
# extract the glimpses
locs = []
l_log_pi = []
#s_log_pi = []
baselines = []
log_probas = []
#stop_signals = []
for t in range(self.num_glimpses):
# forward pass through model
#h_t, l_t, s_t, b_t, log_ps, l_p, s_p = self.model(x, l_t, h_t, s_t, t == self.num_glimpses - 1)
h_t, l_t, b_t, log_ps, l_p = self.model(x, l_t, h_t, t == self.num_glimpses - 1)
# store
locs.append(l_t[0:9])
baselines.append(b_t)
l_log_pi.append(l_p)
#s_log_pi.append(s_p)
log_probas.append(log_ps)
#stop_signals.append(s_t)
# # last iteration
# h_t, l_t, b_t, log_probas, p = self.model(x, l_t, h_t, last=True)
# log_pi.append(p)
# baselines.append(b_t)
# locs.append(l_t[0:9])
# convert list to tensors and reshape
baselines = torch.stack(baselines).transpose(1, 0)
l_log_pi = torch.stack(l_log_pi).transpose(1, 0)
#s_log_pi = torch.stack(s_log_pi).transpose(1, 0)
log_probas = torch.stack(log_probas).transpose(1, 0)
#stop_signals = torch.stack(stop_signals).transpose(1, 0).squeeze(2)
#process stop signals
#up_through_stop = stop_signals
#count = torch.arange(self.batch_size)
#num_steps = torch.sum(stop_signals, dim=1).long()
#up_through_stop[count,num_steps] += 1
#extract log_probas at first stop signal
#log_probas = log_probas[count,num_steps,:]
#clip histories after stop signal
#baselines = baselines * up_through_stop
#l_log_pi = l_log_pi * up_through_stop
#s_log_pi = s_log_pi * up_through_stop
# calculate reward
predicted = torch.max(log_probas, 2)[1]
repeat_y = y.unsqueeze(1).repeat(1, self.num_glimpses)
R = (predicted.detach() == repeat_y).float()
#R = R.unsqueeze(1).repeat(1, self.num_glimpses)
#mask = (torch.arange(R.size(1), device=num_steps.device)==num_steps.unsqueeze(1))
#R = mask*R #Reward of 1 at first stop signal
#R = R - stop_signals * self.hesitation_penalty
# compute losses for differentiable modules
#loss_action = F.nll_loss(log_probas, y)
loss_action = F.nll_loss(log_probas.reshape(self.batch_size * self.num_glimpses, -1), repeat_y.reshape(self.batch_size*self.num_glimpses))
loss_baseline = F.mse_loss(baselines, R)
# compute reinforce loss
# summed over timesteps and averaged across batch
adjusted_reward = R - baselines.detach()
loss_reinforce = torch.sum(-l_log_pi * adjusted_reward, dim=1) #+ torch.sum(-s_log_pi * adjusted_reward, dim=1)
loss_reinforce = torch.mean(loss_reinforce, dim=0)
# sum up into a hybrid loss
loss = loss_action + loss_baseline + loss_reinforce * 0.01
# compute accuracy
correct = (predicted[:,-1] == y).float()
acc = 100 * (correct.sum() / len(y))
# store
losses.update(loss.item(), x.size()[0])
accs.update(acc.item(), x.size()[0])
# compute gradients and update SGD
loss.backward()
self.optimizer.step()
# measure elapsed time
toc = time.time()
batch_time.update(toc - tic)
pbar.set_description(
(
"{:.1f}s - loss: {:.3f} - acc: {:.3f}".format(
(toc - tic), loss.item(), acc.item()
)
)
)
pbar.update(self.batch_size)
# dump the glimpses and locs
if plot:
imgs = [g.cpu().data.numpy().squeeze() for g in imgs]
locs = [l.cpu().data.numpy() for l in locs]
pickle.dump(
imgs, open(self.plot_dir + "g_{}.p".format(epoch + 1), "wb")
)
pickle.dump(
locs, open(self.plot_dir + "l_{}.p".format(epoch + 1), "wb")
)
# log to tensorboard
if self.use_tensorboard:
iteration = epoch * len(self.train_loader) + i
log_value("train_loss", losses.avg, iteration)
log_value("train_acc", accs.avg, iteration)
return losses.avg, accs.avg
@torch.no_grad()
def validate(self, epoch):
"""Evaluate the RAM model on the validation set.
"""
losses = AverageMeter()
accs = AverageMeter()
for i, (x, y) in enumerate(self.valid_loader):
x, y = x.to(self.device), y.to(self.device, dtype=torch.int64)
# duplicate M times
x = x.repeat(self.M, 1, 1, 1)
# initialize location vector and hidden state
self.batch_size = x.shape[0]
#h_t, l_t, s_t = self.reset()
h_t, l_t = self.reset()
# extract the glimpses
l_log_pi = []
#s_log_pi = []
baselines = []
log_probas = []
#stop_signals = []
for t in range(self.num_glimpses):
# forward pass through model
#h_t, l_t, s_t, b_t, log_ps, l_p, s_p = self.model(x, l_t, h_t, s_t)
h_t, l_t, b_t, log_ps, l_p = self.model(x, l_t, h_t)
# store
baselines.append(b_t)
l_log_pi.append(l_p)
#s_log_pi.append(s_p)
log_probas.append(log_ps)
#stop_signals.append(s_t)
# convert list to tensors and reshape
baselines = torch.stack(baselines).transpose(1, 0)
l_log_pi = torch.stack(l_log_pi).transpose(1, 0)
#s_log_pi = torch.stack(s_log_pi).transpose(1, 0)
log_probas = torch.stack(log_probas).transpose(1, 0)
#stop_signals = torch.stack(stop_signals).transpose(1, 0).squeeze(2)
#process stop signals
#up_through_stop = stop_signals
#count = torch.arange(self.batch_size)
#num_steps = torch.sum(stop_signals, dim=1).long()
#up_through_stop[count,num_steps] += 1
#extract log_probas at first stop signal
#log_probas = log_probas[count,num_steps,:]
#clip histories after stop signal
#baselines = baselines * up_through_stop
#l_log_pi = l_log_pi * up_through_stop
#s_log_pi = s_log_pi * up_through_stop
# average
log_probas = log_probas.contiguous().view(self.M, -1, log_probas.shape[-2], log_probas.shape[-1])
log_probas = torch.mean(log_probas, dim=0)
baselines = baselines.contiguous().view(self.M, -1, baselines.shape[-1])
baselines = torch.mean(baselines, dim=0)
l_log_pi = l_log_pi.contiguous().view(self.M, -1, l_log_pi.shape[-1])
l_log_pi = torch.mean(l_log_pi, dim=0)
#s_log_pi = s_log_pi.contiguous().view(self.M, -1, s_log_pi.shape[-1])
#s_log_pi = torch.mean(s_log_pi, dim=0)
# calculate reward
repeat_y = y.unsqueeze(1).repeat(1, self.num_glimpses)
predicted = torch.max(log_probas, 2)[1]
R = (predicted.detach() == repeat_y).float()
#R = R.unsqueeze(1).repeat(1, self.num_glimpses)
#mask = (torch.arange(R.size(1), device=num_steps.device)==num_steps.unsqueeze(1))
#R = mask*R
#R = R - stop_signals * self.hesitation_penalty
# compute losses for differentiable modules
loss_action = F.nll_loss(log_probas.reshape(self.batch_size * self.num_glimpses, -1), repeat_y.reshape(self.batch_size * self.num_glimpses))
loss_baseline = F.mse_loss(baselines, R)
# compute reinforce loss
adjusted_reward = R - baselines.detach()
loss_reinforce = torch.sum(-l_log_pi * adjusted_reward, dim=1)# + torch.sum(-s_log_pi * adjusted_reward, dim=1)
loss_reinforce = torch.mean(loss_reinforce, dim=0)
# sum up into a hybrid loss
loss = loss_action + loss_baseline + loss_reinforce * 0.01
# compute accuracy
correct = (predicted[:,-1] == y).float()
acc = 100 * (correct.sum() / len(y))
# store
losses.update(loss.item(), x.size()[0])
accs.update(acc.item(), x.size()[0])
# log to tensorboard
if self.use_tensorboard:
iteration = epoch * len(self.valid_loader) + i
log_value("valid_loss", losses.avg, iteration)
log_value("valid_acc", accs.avg, iteration)
return losses.avg, accs.avg
@torch.no_grad()
def test(self):
"""Test the RAM model.
This function should only be called at the very
end once the model has finished training.
"""
correct = 0
# load the best checkpoint
self.load_checkpoint(best=self.best)
# removed image, final_softmax, hidden layer, softmax, final_persistant_softmax
cols = ['image_id', 'image', 'timestep', 'num_dots', 'area',
'next_location', 'prediction',
'absolute_error']
# changed naming to SMALL
filename = self.model_name + "_SMALL.csv"
test_path = os.path.join(self.model_dir, filename)
for i, (x, y, a) in enumerate(self.test_loader):
df_dict = {column_name : [] for column_name in cols}
batch_size = x.shape[0]
df_dict['image_id'].extend(sum([[image_id]*self.num_glimpses for image_id in range(i*batch_size, (i+1)*batch_size)], []))
df_dict['timestep'].extend(sum([list(range(self.num_glimpses)) for image_id in range(i*batch_size, (i+1)*batch_size)], []))
df_dict['image'].extend(x.repeat_interleave(self.num_glimpses, dim=0).cpu().tolist())
repeat_y = y.repeat_interleave(self.num_glimpses)
df_dict['num_dots'].extend(repeat_y.cpu().tolist())
df_dict['area'].extend(a.repeat_interleave(self.num_glimpses).cpu().tolist())
x, y = x.to(self.device), y.to(self.device, dtype=torch.int64)
# initialize location vector and hidden state
self.batch_size = x.shape[0]
#h_t, l_t, s_t = self.reset()
h_t, l_t = self.reset()
# extract the glimpses
l_ts = []
h_ts = []
output_log_probas = []
#stop_signals = []
#stop_log_probs = []
for t in range(self.num_glimpses):
# forward pass through model
#h_t, l_t, s_t, b_t, log_ps, l_p, s_p = self.model(x, l_t, h_t, s_t)
h_t, l_t, b_t, log_ps, l_p = self.model(x, l_t, h_t)
# store
h_ts.append(h_t)
l_ts.append(l_t)
output_log_probas.append(log_ps)
#stop_signals.append(s_t)
#stop_log_probs.append(s_p)
# convert list to tensors and reshape
output_log_probas = torch.stack(output_log_probas).transpose(1, 0)
h_ts = torch.stack(h_ts).transpose(1, 0)
l_ts = torch.stack(l_ts).transpose(1, 0)
#stop_log_probs = torch.stack(stop_log_probs).transpose(1, 0)
#stop_signals = torch.stack(stop_signals).transpose(1, 0)
stretched_output_log_probas = output_log_probas.reshape(batch_size*self.num_glimpses, -1)
stretched_h_ts = h_ts.reshape(batch_size * self.num_glimpses, -1)
stretched_l_ts = l_ts.reshape(batch_size * self.num_glimpses, -1)
#stretched_stop_log_probs = stop_log_probs.reshape(batch_size * self.num_glimpses, -1)
#stretched_stop_signals = stop_signals.reshape(batch_size * self.num_glimpses, -1)
softmaxes = torch.exp(output_log_probas)
stretched_softmaxes = softmaxes.reshape(batch_size * self.num_glimpses, -1)
#stretched_stop_probs = torch.exp(stretched_stop_log_probs)
# df_dict['softmax'].extend(stretched_softmaxes.cpu().tolist())
#df_dict['stop_probability'].extend(stretched_stop_probs.squeeze(1).cpu().tolist())
# df_dict['hidden_layer'].extend(stretched_h_ts.cpu().tolist())
df_dict['next_location'].extend(stretched_l_ts.cpu().tolist())
#stop_signals = stop_signals.squeeze(2)
#df_dict['stop_signal'].extend(stretched_stop_signals.squeeze(1).cpu().tolist())
#process stop signals
#count = torch.arange(batch_size)
#num_steps = torch.sum(stop_signals, dim=1).long()
#print(f"num steps: {num_steps}")
#df_dict['num_steps'].extend(num_steps.repeat_interleave(self.num_glimpses).cpu().tolist())
#up_through_stop = stop_signals
#up_through_stop[count,num_steps] += 1
#final_persistant_mask = (up_through_stop == 0)
#print(f"mask shape: {final_persistant_mask.shape}")
#print(f"mask: {final_persistant_mask}")
#extract output_log_probas at first stop signal
#final_softmax = softmaxes[count,num_steps,:]
#print(f"final soft shape: {final_softmax.shape}")
#print(f"final soft: {final_softmax}")
# df_dict['final_softmax'].extend(final_softmax.repeat_interleave(self.num_glimpses, dim = 0).cpu().tolist())
#unsqueezed_final_persistant_mask = final_persistant_mask.unsqueeze(2)
#repeated_final_softmax = final_softmax.unsqueeze(1).repeat(1,self.num_glimpses,1)
#final_persistant_softmaxes = torch.where(unsqueezed_final_persistant_mask, repeated_final_softmax, softmaxes)
# df_dict['final_persistant_softmax'].extend(final_persistant_softmaxes.reshape(batch_size*self.num_glimpses, -1).cpu().tolist())
final_pred = output_log_probas[:,-1,:].data.max(1, keepdim=True)[1]
#print(f"final pred: {final_pred}")
#df_dict['final_prediction'].extend(final_pred.repeat_interleave(self.num_glimpses).cpu().tolist())
correct += final_pred.eq(y.data.view_as(final_pred)).cpu().sum()
stretched_predictions = stretched_output_log_probas.data.max(1, keepdim=True)[1].squeeze(1)
df_dict['prediction'].extend(stretched_predictions.cpu().tolist())
predictions = stretched_predictions.reshape(batch_size, self.num_glimpses)
#repeated_final_pred = final_pred.repeat(1, self.num_glimpses)
#final_persistant_predictions = torch.where(final_persistant_mask, repeated_final_pred, predictions)
#stretched_final_persistant_predictions = final_persistant_predictions.reshape(batch_size*self.num_glimpses, -1)
#print(f"stretched_final_persistant_predictions shape: {stretched_final_persistant_predictions.shape}")
#print(f"stretched_final_persistant_predictions: {stretched_final_persistant_predictions}")
#df_dict['final_persistant_prediction'].extend(stretched_final_persistant_predictions.squeeze(1).cpu().tolist())
#print(f"stretched_pred/y devices: {stretched_predictions.device}, {repeat_y.device}")
stretched_error = torch.abs(stretched_predictions - repeat_y.cuda())
df_dict['absolute_error'].extend(stretched_error.cpu().tolist())
#print(f"error : {df_dict['absolute_error']}")
#final_error = torch.abs(final_pred - y.unsqueeze(1))
#error = stretched_error.reshape(batch_size, self.num_glimpses)
#repeated_final_error = final_error.repeat(1, self.num_glimpses)
# print(f"shapes: {final_persistant_mask.shape}, {repeated_final_error.shape}, {error.shape}")
#final_persistant_error = torch.where(final_persistant_mask, repeated_final_error, error.long())
#stretched_final_persistant_error = final_persistant_error.reshape(batch_size*self.num_glimpses, -1)
#print(f"stretched_final_persistant_error shape: {stretched_final_persistant_error.shape}")
#print(f"stretched_final_persistant_error: {stretched_final_persistant_error}")
#df_dict['final_persistant_absolute_error'].extend(stretched_final_persistant_error.squeeze(1).cpu().tolist())
df = pd.DataFrame(df_dict)
df.to_csv(test_path, mode='a', header=not os.path.exists(test_path))
perc = (100.0 * correct) / (self.num_test)
error = 100 - perc
print(
"[*] Test Acc: {}/{} ({:.2f}% - {:.2f}%)".format(
correct, self.num_test, perc, error
)
)
def save_checkpoint(self, state, is_best):
"""Saves a checkpoint of the model.
If this model has reached the best validation accuracy thus
far, a seperate file with the suffix `best` is created.
"""
filename = self.model_name + "_ckpt.pth.tar"
model_path = os.path.join(self.model_dir, filename)
torch.save(state, model_path)
if is_best:
filename = self.model_name + "_model_best.pth.tar"
shutil.copyfile(model_path, os.path.join(self.model_dir, filename))
def load_checkpoint(self, best=False):
"""Load the best copy of a model.
This is useful for 2 cases:
- Resuming training with the most recent model checkpoint.
- Loading the best validation model to evaluate on the test data.
Args:
best: if set to True, loads the best model.
Use this if you want to evaluate your model
on the test data. Else, set to False in which
case the most recent version of the checkpoint
is used.
"""
print("[*] Loading model from {}".format(self.model_dir))
filename = self.model_name + "_ckpt.pth.tar"
if best:
filename = self.model_name + "_model_best.pth.tar"
model_path = os.path.join(self.model_dir, filename)
model = torch.load(model_path)
# load variables from checkpoint
self.start_epoch = model["epoch"]
self.best_valid_acc = model["best_valid_acc"]
self.model.load_state_dict(model["model_state"])
self.optimizer.load_state_dict(model["optim_state"])
if best:
print(
"[*] Loaded {} checkpoint @ epoch {} "
"with best valid acc of {:.3f}".format(
filename, model["epoch"], model["best_valid_acc"]
)
)
else:
print("[*] Loaded {} checkpoint @ epoch {}".format(filename, model["epoch"]))
def save_checkpoint(self, state, is_best):
"""Saves a checkpoint of the model.
If this model has reached the best validation accuracy thus
far, a seperate file with the suffix `best` is created.
"""
filename = self.model_name + "_ckpt.pth.tar"
model_path = os.path.join(self.model_dir, filename)
torch.save(state, model_path)
if is_best:
filename = self.model_name + "_model_best.pth.tar"
shutil.copyfile(model_path, os.path.join(self.model_dir, filename))
def load_checkpoint(self, best=False):
"""Load the best copy of a model.
This is useful for 2 cases:
- Resuming training with the most recent model checkpoint.
- Loading the best validation model to evaluate on the test data.
Args:
best: if set to True, loads the best model.
Use this if you want to evaluate your model
on the test data. Else, set to False in which
case the most recent version of the checkpoint
is used.
"""
print("[*] Loading model from {}".format(self.model_dir))
filename = self.model_name + "_ckpt.pth.tar"
if best:
filename = self.model_name + "_model_best.pth.tar"
model_path = os.path.join(self.model_dir, filename)
model = torch.load(model_path)
# load variables from checkpoint
self.start_epoch = model["epoch"]
self.best_valid_acc = model["best_valid_acc"]
self.model.load_state_dict(model["model_state"])
self.optimizer.load_state_dict(model["optim_state"])
if best:
print(
"[*] Loaded {} checkpoint @ epoch {} "
"with best valid acc of {:.3f}".format(
filename, model["epoch"], model["best_valid_acc"]
)
)
else:
print("[*] Loaded {} checkpoint @ epoch {}".format(filename, model["epoch"]))
| 40.032457
| 154
| 0.572661
| 6,403
| 51,802
| 4.395752
| 0.06044
| 0.020891
| 0.034108
| 0.01478
| 0.875684
| 0.873659
| 0.871136
| 0.863604
| 0.861188
| 0.859518
| 0
| 0.010113
| 0.322381
| 51,802
| 1,293
| 155
| 40.063418
| 0.791721
| 0.256148
| 0
| 0.708211
| 0
| 0.001466
| 0.055751
| 0.003088
| 0
| 0
| 0
| 0
| 0
| 1
| 0.024927
| false
| 0
| 0.019062
| 0
| 0.055718
| 0.029326
| 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
|
af03e1bca2e6bcaf4e2f161d2b4078d32b20e402
| 421
|
py
|
Python
|
tests/parser/aggregates.count.assignment.17.test.py
|
veltri/DLV2
|
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
|
[
"Apache-2.0"
] | null | null | null |
tests/parser/aggregates.count.assignment.17.test.py
|
veltri/DLV2
|
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
|
[
"Apache-2.0"
] | null | null | null |
tests/parser/aggregates.count.assignment.17.test.py
|
veltri/DLV2
|
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
|
[
"Apache-2.0"
] | null | null | null |
input = """
a(S,T,Z) :- #count{X: r(T,X)} = Z, #count{W: q(W,S)} = T, #count{K: p(K,Y)} = S.
q(1,1).
q(2,2).
r(1,1).
r(1,2).
r(1,3).
r(2,2).
r(3,3).
p(1,1).
p(2,2).
%out{ a(2,1,3) }
%repository error
"""
output = """
a(S,T,Z) :- #count{X: r(T,X)} = Z, #count{W: q(W,S)} = T, #count{K: p(K,Y)} = S.
q(1,1).
q(2,2).
r(1,1).
r(1,2).
r(1,3).
r(2,2).
r(3,3).
p(1,1).
p(2,2).
%out{ a(2,1,3) }
%repository error
"""
| 10.268293
| 80
| 0.420428
| 114
| 421
| 1.552632
| 0.175439
| 0.067797
| 0.067797
| 0.045198
| 0.937853
| 0.937853
| 0.937853
| 0.937853
| 0.937853
| 0.937853
| 0
| 0.121739
| 0.180523
| 421
| 40
| 81
| 10.525
| 0.391304
| 0
| 0
| 0.928571
| 0
| 0.071429
| 0.926366
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
af16e083f971bbc4e21d58523158391bc67070fb
| 7,669
|
py
|
Python
|
pwbs/tests/TTTTTT_test_6.py
|
paip-web/pwbs
|
21622712b6975ab68b7f5d7c1a944fa826ea87ba
|
[
"MIT"
] | 2
|
2020-01-07T16:07:56.000Z
|
2020-02-15T05:57:58.000Z
|
pwbs/tests/TTTTTT_test_6.py
|
paip-web/pwbs
|
21622712b6975ab68b7f5d7c1a944fa826ea87ba
|
[
"MIT"
] | 3
|
2020-07-03T21:28:02.000Z
|
2021-06-25T15:29:18.000Z
|
pwbs/tests/TTTTTT_test_6.py
|
paip-web/pwbs
|
21622712b6975ab68b7f5d7c1a944fa826ea87ba
|
[
"MIT"
] | 1
|
2020-02-15T06:00:08.000Z
|
2020-02-15T06:00:08.000Z
|
"""
This for future test of Event Manager.
For now it's just contain snippets for it.
"""
test(PWBS_EM)
def test(PWBS_EM: PWBSEventManager):
funct = lambda event_name, *args, **kwargs: print("{0}: {1} | {2}".format(event_name, args, kwargs))
# PWBS Event Called in pwbs.__init__.main() when PWBS class is initialized
PWBS_EM.addHandler("pwbs-event--pwbs_class-initialized", funct)
# PWBS Event Called in pwbs.__init__.main() before PWBS.main() is called
PWBS_EM.addHandler("pwbs-event--pwbs_class-before-main", funct)
# PWBS Event Called in pwbs.__init__.main() after PWBS.main() is called (before quit)
PWBS_EM.addHandler("pwbs-event--pwbs_class-after-main", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.__init__ after argparser being initialized
PWBS_EM.addHandler("pwbs-event--pwbs_class-argparser-initilized", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.__init__ before parser_initializer being called
PWBS_EM.addHandler("pwbs-event--pwbs_class-before-parser_initializer", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.__init__ after parser_initializer being called
PWBS_EM.addHandler("pwbs-event--pwbs_class-after-parser_initializer", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.parser_initializer after specialtasks group is created
PWBS_EM.addHandler("pwbs-event--pwbs_class-parser_initializer-specialtasks-groupcreated-start", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.parser_initializer after specialtasks group has added all PWBS special tasks
PWBS_EM.addHandler("pwbs-event--pwbs_class-parser_initializer-specialtasks-groupcreated-end", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.parser_initializer after localconfigtasks group is created
PWBS_EM.addHandler("pwbs-event--pwbs_class-parser_initializer-localconfigtasks-groupcreated", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.__init__ before PWBS Config Manager is created
PWBS_EM.addHandler("pwbs-event--pwbs_class-before-configmanager-created", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.__init__ after PWBS Config Manager is created
PWBS_EM.addHandler("pwbs-event--pwbs_class-after-configmanager-created", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.__init__ in "Try for errors" block if there are errors
PWBS_EM.addHandler("pwbs-event--pwbs_class-configmanager-errored", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.localconfig_parser_initializer at start of function
PWBS_EM.addHandler("pwbs-event--pwbs_class-localconfig_parser_initilizer-started", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.localconfig_parser_initializer on every element in CommandList object from Configuration Manager
PWBS_EM.addHandler("pwbs-event--pwbs_class-localconfig_parser_initilizer-command-listitem", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.main before argparser.parse_args()
PWBS_EM.addHandler("pwbs-event--pwbs_class-main-before-parseargs", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.main after argparser.parse_args()
PWBS_EM.addHandler("pwbs-event--pwbs_class-main-after-parseargs", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.main before special_tasks_interpreter being called
PWBS_EM.addHandler("pwbs-event--pwbs_class-main-before-specialtaskinterpreter", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.main after special_tasks_interpreter being called
PWBS_EM.addHandler("pwbs-event--pwbs_class-main-after-specialtaskinterpreter", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.main before task_runner being called
PWBS_EM.addHandler("pwbs-event--pwbs_class-main-before-taskinterpreter", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.main after task_runner being called
PWBS_EM.addHandler("pwbs-event--pwbs_class-main-after-taskinterpreter", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.main on throwing NotImplmentedError
PWBS_EM.addHandler("pwbs-event--pwbs_class-main-notimplementedfeatureerror", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter before verbose Special Task
PWBS_EM.addHandler("pwbs-event--before-specialtask-verbose", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter before debug Special Task
PWBS_EM.addHandler("pwbs-event--before-specialtask-debug", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter before version Special Task
PWBS_EM.addHandler("pwbs-event--before-specialtask-version", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter before log Special Task
PWBS_EM.addHandler("pwbs-event--before-specialtask-log", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter before logfile Special Task
PWBS_EM.addHandler("pwbs-event--before-specialtask-logfile", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter before configfile Special Task
PWBS_EM.addHandler("pwbs-event--before-specialtask-configfile", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter before test_mode Special Task
PWBS_EM.addHandler("pwbs-event--before-specialtask-test_mode", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter before run_tests Special Task
PWBS_EM.addHandler("pwbs-event--before-specialtask-run_tests", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter before verbose Special Task
PWBS_EM.addHandler("pwbs-event--after-specialtask-verbose", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter after debug Special Task
PWBS_EM.addHandler("pwbs-event--after-specialtask-debug", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter after version Special Task
PWBS_EM.addHandler("pwbs-event--after-specialtask-version", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter after log Special Task
PWBS_EM.addHandler("pwbs-event--after-specialtask-log", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter after logfile Special Task
PWBS_EM.addHandler("pwbs-event--after-specialtask-logfile", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter after configfile Special Task
PWBS_EM.addHandler("pwbs-event--after-specialtask-configfile", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter after test_mode Special Task
PWBS_EM.addHandler("pwbs-event--after-specialtask-test_mode", funct)
# PWBS Event Called in pwbs.pwbs_class.PWBS.special_tasks_interpreter after run_tests Special Task
PWBS_EM.addHandler("pwbs-event--after-specialtask-run_tests", funct)
# PWBS Event Called on start of PWBS
PWBS_EM.addHandler("pwbs-event--start", funct)
# PWBS Event Called on exit of PWBS
PWBS_EM.addHandler("pwbs-event--quit", funct)
# PWBS Event Called in test_runner on start of run_test function
PWBS_EM.addHandler("pwbs-event--test-runner--start-run_test", funct)
# PWBS Event Called in test_runner on run test function
PWBS_EM.addHandler("pwbs-event--test-runner--run-test-function", funct)
# PWBS Event Called in test_runner on end of run_test function
PWBS_EM.addHandler("pwbs-event--test-runner--end-run_test", funct)
# PWBS Event Called in test_runner before test
PWBS_EM.addHandler("pwbs-event--test-runner--before-test", funct)
# PWBS Event Called in test_runner after test
PWBS_EM.addHandler("pwbs-event--test-runner--after-test", funct)
| 78.255102
| 144
| 0.784978
| 1,101
| 7,669
| 5.273388
| 0.090827
| 0.136411
| 0.113676
| 0.151567
| 0.893558
| 0.887702
| 0.886324
| 0.857217
| 0.771271
| 0.635722
| 0
| 0.000445
| 0.121528
| 7,669
| 97
| 145
| 79.061856
| 0.861363
| 0.500587
| 0
| 0
| 0
| 0
| 0.507806
| 0.495369
| 0
| 0
| 0
| 0
| 0
| 1
| 0.021277
| false
| 0
| 0
| 0
| 0.021277
| 0.021277
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
afc59e6ec8b3a8d303a471a47f51dc9d406f4096
| 222
|
py
|
Python
|
rastervision/analyzer/__init__.py
|
carderne/raster-vision
|
915fbcd3263d8f2193e65c2cd0eb53e050a47a01
|
[
"Apache-2.0"
] | 4
|
2019-03-11T12:38:15.000Z
|
2021-04-06T14:57:52.000Z
|
rastervision/analyzer/__init__.py
|
carderne/raster-vision
|
915fbcd3263d8f2193e65c2cd0eb53e050a47a01
|
[
"Apache-2.0"
] | null | null | null |
rastervision/analyzer/__init__.py
|
carderne/raster-vision
|
915fbcd3263d8f2193e65c2cd0eb53e050a47a01
|
[
"Apache-2.0"
] | 1
|
2021-02-25T18:23:27.000Z
|
2021-02-25T18:23:27.000Z
|
# flake8: noqa
from rastervision.analyzer.analyzer import *
from rastervision.analyzer.analyzer_config import *
from rastervision.analyzer.stats_analyzer import *
from rastervision.analyzer.stats_analyzer_config import *
| 31.714286
| 57
| 0.846847
| 26
| 222
| 7.076923
| 0.307692
| 0.347826
| 0.521739
| 0.48913
| 0.673913
| 0.467391
| 0
| 0
| 0
| 0
| 0
| 0.004951
| 0.09009
| 222
| 6
| 58
| 37
| 0.905941
| 0.054054
| 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
|
bb85cd6b9000d3cdaff7738f7a55a4fc05c3ab98
| 89
|
py
|
Python
|
guillotina_volto/blocks/__init__.py
|
enfold/guillotina-volto
|
d38ee300470c813c99341eaeb2ba8a2b5fb7d778
|
[
"BSD-2-Clause"
] | 5
|
2018-11-11T07:19:06.000Z
|
2020-01-18T11:04:15.000Z
|
guillotina_volto/blocks/__init__.py
|
enfold/guillotina-volto
|
d38ee300470c813c99341eaeb2ba8a2b5fb7d778
|
[
"BSD-2-Clause"
] | 4
|
2021-05-14T20:21:03.000Z
|
2021-11-18T01:27:04.000Z
|
guillotina_volto/blocks/__init__.py
|
enfold/guillotina-volto
|
d38ee300470c813c99341eaeb2ba8a2b5fb7d778
|
[
"BSD-2-Clause"
] | 2
|
2019-06-14T10:42:22.000Z
|
2020-05-09T13:09:09.000Z
|
from . import default # noqa
from . import types # noqa
from . import standard # noqa
| 22.25
| 30
| 0.696629
| 12
| 89
| 5.166667
| 0.5
| 0.483871
| 0.451613
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.235955
| 89
| 3
| 31
| 29.666667
| 0.911765
| 0.157303
| 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
|
bbb782cb3b44f4866569b38680bb03a8e7730b26
| 10,441
|
py
|
Python
|
pgtrigger/tests/test_multi_db.py
|
tiholic/django-pgtrigger
|
ef8878115bef1a933405ab86d7f7c117252d970c
|
[
"BSD-3-Clause"
] | 135
|
2020-06-27T14:02:46.000Z
|
2021-05-27T01:07:41.000Z
|
pgtrigger/tests/test_multi_db.py
|
tiholic/django-pgtrigger
|
ef8878115bef1a933405ab86d7f7c117252d970c
|
[
"BSD-3-Clause"
] | 25
|
2021-06-19T20:28:52.000Z
|
2022-03-22T23:14:59.000Z
|
pgtrigger/tests/test_multi_db.py
|
tiholic/django-pgtrigger
|
ef8878115bef1a933405ab86d7f7c117252d970c
|
[
"BSD-3-Clause"
] | 7
|
2020-06-29T02:26:05.000Z
|
2021-04-25T14:42:33.000Z
|
"""Tests multi-database support"""
import contextlib
import io
import sys
from django.core.management import call_command
import django.test
import pgtrigger
import pgtrigger.tests.models as test_models
@contextlib.contextmanager
def capture_stdout():
old_stdout = sys.stdout
sys.stdout = out = io.StringIO()
try:
yield out
finally:
sys.stdout = old_stdout
class ToLogRouter:
"""
Route the "ToLog" model to the "other" database
"""
route_app_labels = {'auth', 'contenttypes'}
def db_for_write(self, model, **hints):
"""
Attempts to write auth and contenttypes models go to auth_db.
"""
if model == test_models.ToLogModel:
return 'other'
return None
@django.test.override_settings(
DATABASE_ROUTERS=['pgtrigger.tests.test_multi_db.ToLogRouter']
)
class MultiDB(django.test.TestCase):
databases = ['default', 'other']
def setUp(self):
# Trigger installation is originally executed during
# test case setup, before any settings are overridden. Uninstall
# and re-install all triggers to make sure they are properly installed.
# Doing so also ensures that pruning across mutliple databases works
with self.settings(
DATABASE_ROUTERS=['pgtrigger.tests.test_multi_db.ToLogRouter']
):
call_command('pgtrigger', 'uninstall')
call_command('pgtrigger', 'install')
def test_full_ls(self):
with capture_stdout() as captured:
call_command('pgtrigger', 'ls')
lines = sorted(captured.getvalue().split('\n'))
assert lines == [
'',
'tests.CustomSoftDelete:soft_delete'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.FSM:fsm'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.SoftDelete:soft_delete'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.TestTrigger:protect_delete'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.TestTrigger:protect_misc_insert'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.ToLogModel:after_update_row_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.ToLogModel:after_update_statement_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.ToLogModel:update_of_statement_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
]
def test_single_db_enable(self):
call_command('pgtrigger', 'disable')
call_command('pgtrigger', 'enable', '--database', 'other')
with capture_stdout() as captured:
call_command('pgtrigger', 'ls')
lines = sorted(captured.getvalue().split('\n'))
assert lines == [
'',
'tests.CustomSoftDelete:soft_delete'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[91mDISABLED\x1b[0m',
'tests.FSM:fsm'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[91mDISABLED\x1b[0m',
'tests.SoftDelete:soft_delete'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[91mDISABLED\x1b[0m',
'tests.TestTrigger:protect_delete'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[91mDISABLED\x1b[0m',
'tests.TestTrigger:protect_misc_insert'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[91mDISABLED\x1b[0m',
'tests.ToLogModel:after_update_row_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.ToLogModel:after_update_statement_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.ToLogModel:update_of_statement_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
]
def test_single_db_disable(self):
call_command('pgtrigger', 'disable', '--database', 'other')
with capture_stdout() as captured:
call_command('pgtrigger', 'ls')
lines = sorted(captured.getvalue().split('\n'))
assert lines == [
'',
'tests.CustomSoftDelete:soft_delete'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.FSM:fsm'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.SoftDelete:soft_delete'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.TestTrigger:protect_delete'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.TestTrigger:protect_misc_insert'
'\tdefault'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.ToLogModel:after_update_row_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[91mDISABLED\x1b[0m',
'tests.ToLogModel:after_update_statement_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[91mDISABLED\x1b[0m',
'tests.ToLogModel:update_of_statement_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[91mDISABLED\x1b[0m',
]
def test_single_db_ls(self):
"""Only list a single database"""
with capture_stdout() as captured:
call_command('pgtrigger', 'ls', '--database', 'other')
lines = sorted(captured.getvalue().split('\n'))
assert lines == [
'',
'tests.ToLogModel:after_update_row_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.ToLogModel:after_update_statement_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.ToLogModel:update_of_statement_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
]
def test_single_db_uninstall(self):
"""Uninstall a single database and verify results"""
call_command('pgtrigger', 'uninstall', '--database', 'default')
with capture_stdout() as captured:
call_command('pgtrigger', 'ls')
lines = sorted(captured.getvalue().split('\n'))
assert lines == [
'',
'tests.CustomSoftDelete:soft_delete'
'\tdefault'
'\t\x1b[91mUNINSTALLED\x1b[0m',
'tests.FSM:fsm' '\tdefault' '\t\x1b[91mUNINSTALLED\x1b[0m',
'tests.SoftDelete:soft_delete'
'\tdefault'
'\t\x1b[91mUNINSTALLED\x1b[0m',
'tests.TestTrigger:protect_delete'
'\tdefault'
'\t\x1b[91mUNINSTALLED\x1b[0m',
'tests.TestTrigger:protect_misc_insert'
'\tdefault'
'\t\x1b[91mUNINSTALLED\x1b[0m',
'tests.ToLogModel:after_update_row_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.ToLogModel:after_update_statement_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.ToLogModel:update_of_statement_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
]
def test_single_db_install(self):
"""Install a single database and verify results"""
call_command('pgtrigger', 'uninstall')
call_command('pgtrigger', 'install', '--database', 'other')
with capture_stdout() as captured:
call_command('pgtrigger', 'ls')
lines = sorted(captured.getvalue().split('\n'))
assert lines == [
'',
'tests.CustomSoftDelete:soft_delete'
'\tdefault'
'\t\x1b[91mUNINSTALLED\x1b[0m',
'tests.FSM:fsm' '\tdefault' '\t\x1b[91mUNINSTALLED\x1b[0m',
'tests.SoftDelete:soft_delete'
'\tdefault'
'\t\x1b[91mUNINSTALLED\x1b[0m',
'tests.TestTrigger:protect_delete'
'\tdefault'
'\t\x1b[91mUNINSTALLED\x1b[0m',
'tests.TestTrigger:protect_misc_insert'
'\tdefault'
'\t\x1b[91mUNINSTALLED\x1b[0m',
'tests.ToLogModel:after_update_row_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.ToLogModel:after_update_statement_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
'tests.ToLogModel:update_of_statement_test'
'\tother'
'\t\x1b[92mINSTALLED\x1b[0m'
'\t\x1b[92mENABLED\x1b[0m',
]
def test_invalid_args(self):
with self.assertRaises(ValueError):
pgtrigger.get('uri', database='other')
| 37.422939
| 79
| 0.514702
| 1,007
| 10,441
| 5.201589
| 0.136048
| 0.058037
| 0.070638
| 0.119702
| 0.805842
| 0.794005
| 0.791142
| 0.791142
| 0.775296
| 0.735013
| 0
| 0.05681
| 0.359353
| 10,441
| 278
| 80
| 37.557554
| 0.726267
| 0.048846
| 0
| 0.792531
| 0
| 0
| 0.421319
| 0.34583
| 0
| 0
| 0
| 0
| 0.029046
| 1
| 0.041494
| false
| 0
| 0.029046
| 0
| 0.095436
| 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
|
bbd055bb557e945cf33d02d1ba1783662b82c31f
| 63
|
py
|
Python
|
bot/exchange/__init__.py
|
colticol/bold-arbitrager
|
aef6683a3f41d47a51d24367819d183ecacea3a0
|
[
"Apache-2.0"
] | null | null | null |
bot/exchange/__init__.py
|
colticol/bold-arbitrager
|
aef6683a3f41d47a51d24367819d183ecacea3a0
|
[
"Apache-2.0"
] | null | null | null |
bot/exchange/__init__.py
|
colticol/bold-arbitrager
|
aef6683a3f41d47a51d24367819d183ecacea3a0
|
[
"Apache-2.0"
] | null | null | null |
from . import exchange_controller
from . import exchange_client
| 31.5
| 33
| 0.857143
| 8
| 63
| 6.5
| 0.625
| 0.384615
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 63
| 2
| 34
| 31.5
| 0.928571
| 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
|
a5559dfa11b05a0a8b6fa50b10ff68e791bc3b1c
| 4,577
|
py
|
Python
|
mobilenet_v3_configs.py
|
1e100/mobilenet_v3
|
4c5058db6960741e849294c7701e7fddfa241a15
|
[
"BSD-3-Clause"
] | 8
|
2019-09-25T08:41:27.000Z
|
2020-07-26T12:49:41.000Z
|
mobilenet_v3_configs.py
|
1e100/mobilenet_v3
|
4c5058db6960741e849294c7701e7fddfa241a15
|
[
"BSD-3-Clause"
] | null | null | null |
mobilenet_v3_configs.py
|
1e100/mobilenet_v3
|
4c5058db6960741e849294c7701e7fddfa241a15
|
[
"BSD-3-Clause"
] | 4
|
2019-10-04T21:32:56.000Z
|
2020-08-05T12:36:52.000Z
|
""" Configurations shared between PyTorch and Keras. """
CONFIG = {
"large": [
# in_ch, exp, out_ch, ks, stride, dilation, se, activation
[16, 16, 16, 3, 1, 1, None, "relu"],
[16, 64, 24, 3, 2, 1, None, "relu"],
[24, 72, 24, 3, 1, 1, None, "relu"],
[24, 72, 40, 5, 2, 1, 0.25, "relu"],
[40, 120, 40, 5, 1, 1, 0.25, "relu"],
[40, 120, 40, 5, 1, 1, 0.25, "relu"],
[40, 240, 80, 3, 2, 1, None, "hardswish"],
[80, 200, 80, 3, 1, 1, None, "hardswish"],
[80, 184, 80, 3, 1, 1, None, "hardswish"],
[80, 184, 80, 3, 1, 1, None, "hardswish"],
[80, 480, 112, 3, 1, 1, 0.25, "hardswish"],
[112, 672, 112, 3, 1, 1, 0.25, "hardswish"],
[112, 672, 160, 5, 2, 1, 0.25, "hardswish"],
[160, 960, 160, 5, 1, 1, 0.25, "hardswish"],
[160, 960, 160, 5, 1, 1, 0.25, "hardswish"],
],
"small": [
# in_ch, exp, out_ch, ks, stride, dilation, se, activation
[16, 16, 16, 3, 2, 1, 0.25, "relu"],
[16, 72, 24, 3, 2, 1, None, "relu"],
[24, 88, 24, 3, 1, 1, None, "relu"],
[24, 96, 40, 5, 2, 1, 0.25, "hardswish"],
[40, 240, 40, 5, 1, 1, 0.25, "hardswish"],
[40, 240, 40, 5, 1, 1, 0.25, "hardswish"],
[40, 120, 48, 5, 1, 1, 0.25, "hardswish"],
[48, 144, 48, 5, 1, 1, 0.25, "hardswish"],
[48, 288, 96, 5, 2, 1, 0.25, "hardswish"],
[96, 576, 96, 5, 1, 1, 0.25, "hardswish"],
[96, 576, 96, 5, 1, 1, 0.25, "hardswish"],
],
"large_detection": [
# in_ch, exp, out_ch, ks, stride, dilation, se, activation
[16, 16, 16, 3, 1, 1, None, "relu"],
[16, 64, 24, 3, 2, 1, None, "relu"],
[24, 72, 24, 3, 1, 1, None, "relu"],
[24, 72, 40, 5, 2, 1, 0.25, "relu"],
[40, 120, 40, 5, 1, 1, 0.25, "relu"],
[40, 120, 40, 5, 1, 1, 0.25, "relu"],
[40, 240, 80, 3, 2, 1, None, "hardswish"],
[80, 200, 80, 3, 1, 1, None, "hardswish"],
[80, 184, 80, 3, 1, 1, None, "hardswish"],
[80, 184, 80, 3, 1, 1, None, "hardswish"],
[80, 480, 112, 3, 1, 1, 0.25, "hardswish"],
[112, 672, 112, 3, 1, 1, 0.25, "hardswish"],
[112, 672, 80, 5, 2, 1, 0.25, "hardswish"],
[80, 480, 80, 5, 1, 1, 0.25, "hardswish"],
[80, 480, 80, 5, 1, 1, 0.25, "hardswish"],
],
"small_detection": [
# in_ch, exp, out_ch, ks, stride, dilation, se, activation
[16, 16, 16, 3, 2, 1, 0.25, "relu"],
[16, 72, 24, 3, 2, 1, None, "relu"],
[24, 88, 24, 3, 1, 1, None, "relu"],
[24, 96, 40, 5, 2, 1, 0.25, "hardswish"],
[40, 240, 40, 5, 1, 1, 0.25, "hardswish"],
[40, 240, 40, 5, 1, 1, 0.25, "hardswish"],
[40, 120, 48, 5, 1, 1, 0.25, "hardswish"],
[48, 144, 48, 5, 1, 1, 0.25, "hardswish"],
[48, 288, 48, 5, 2, 1, 0.25, "hardswish"],
[48, 288, 48, 5, 1, 1, 0.25, "hardswish"],
[48, 288, 48, 5, 1, 1, 0.25, "hardswish"],
],
# Stride 16, last 3 blocks dilated by 2.
"large_segmentation": [
# in_ch, exp, out_ch, ks, stride, dilation, se, activation
[16, 16, 16, 3, 1, 1, None, "relu"],
[16, 64, 24, 3, 2, 1, None, "relu"],
[24, 72, 24, 3, 1, 1, None, "relu"],
[24, 72, 40, 5, 2, 1, 0.25, "relu"],
[40, 120, 40, 5, 1, 1, 0.25, "relu"],
[40, 120, 40, 5, 1, 1, 0.25, "relu"],
[40, 240, 80, 3, 2, 1, None, "hardswish"],
[80, 200, 80, 3, 1, 1, None, "hardswish"],
[80, 184, 80, 3, 1, 1, None, "hardswish"],
[80, 184, 80, 3, 1, 1, None, "hardswish"],
[80, 480, 112, 3, 1, 1, 0.25, "hardswish"],
[112, 672, 112, 3, 1, 1, 0.25, "hardswish"],
[112, 672, 80, 5, 1, 2, 0.25, "hardswish"],
[80, 480, 80, 5, 1, 2, 0.25, "hardswish"],
[80, 480, 80, 5, 1, 2, 0.25, "hardswish"],
],
# Stride 16, last 3 blocks dilated by 2.
"small_segmentation": [
# in_ch, exp, out_ch, ks, stride, dilation, se, activation
[16, 16, 16, 3, 2, 1, 0.25, "relu"],
[16, 72, 24, 3, 2, 1, None, "relu"],
[24, 88, 24, 3, 1, 1, None, "relu"],
[24, 96, 40, 5, 2, 1, 0.25, "hardswish"],
[40, 240, 40, 5, 1, 1, 0.25, "hardswish"],
[40, 240, 40, 5, 1, 1, 0.25, "hardswish"],
[40, 120, 48, 5, 1, 1, 0.25, "hardswish"],
[48, 144, 48, 5, 1, 1, 0.25, "hardswish"],
[48, 288, 48, 5, 1, 2, 0.25, "hardswish"],
[48, 288, 48, 5, 1, 2, 0.25, "hardswish"],
[48, 288, 48, 5, 1, 2, 0.25, "hardswish"],
],
}
| 44.436893
| 66
| 0.444614
| 768
| 4,577
| 2.628906
| 0.070313
| 0.07578
| 0.089153
| 0.212481
| 0.963843
| 0.963843
| 0.960872
| 0.955919
| 0.955919
| 0.955919
| 0
| 0.299167
| 0.317894
| 4,577
| 102
| 67
| 44.872549
| 0.347534
| 0.102687
| 0
| 0.858696
| 0
| 0
| 0.157097
| 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
| 1
| 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
| 0
|
0
| 10
|
a58be826db80a8cc6c893e8f64d3265192b6d0a2
| 27,777
|
py
|
Python
|
tests/test_utils.py
|
grantsrb/langpractice
|
59cf8f53b85fa8b4d639ffc6e175ec22c0d2362c
|
[
"MIT"
] | null | null | null |
tests/test_utils.py
|
grantsrb/langpractice
|
59cf8f53b85fa8b4d639ffc6e175ec22c0d2362c
|
[
"MIT"
] | null | null | null |
tests/test_utils.py
|
grantsrb/langpractice
|
59cf8f53b85fa8b4d639ffc6e175ec22c0d2362c
|
[
"MIT"
] | null | null | null |
from langpractice.utils.utils import *
import unittest
import torch.nn.functional as F
class TestUtils(unittest.TestCase):
def test_zipfian1(self):
n_loops = 5000
low = 1
high = 10
order = 1
counts = {i:0 for i in range(low, high+1)}
tot = 0
for i in range(n_loops):
samp = zipfian(low, high, order)
counts[samp] += 1
tot += 1
targ_probs = {k:1/(k**order) for k in counts.keys()}
s = np.sum(list(targ_probs.values()))
targ_probs = {k:v/s for k,v in targ_probs.items()}
for k,v in counts.items():
prob = v/tot
diff = prob-targ_probs[k]
self.assertTrue(np.abs(diff) < 0.03)
def test_zipfian2(self):
n_loops = 5000
low = 1
high = 10
order = 2
counts = {i:0 for i in range(low, high+1)}
tot = 0
for i in range(n_loops):
samp = zipfian(low, high, order)
counts[samp] += 1
tot += 1
targ_probs = {k:1/(k**order) for k in counts.keys()}
s = np.sum(list(targ_probs.values()))
targ_probs = {k:v/s for k,v in targ_probs.items()}
for k,v in counts.items():
prob = v/tot
diff = prob-targ_probs[k]
self.assertTrue(np.abs(diff) < 0.03)
def test_piraha_labels(self):
weights = {
3: torch.FloatTensor([.55, .45]),
4: torch.FloatTensor([.4, .6]),
5: torch.FloatTensor([.4, .6]),
6: torch.FloatTensor([.4, .6]),
7: torch.FloatTensor([.45, .55]),
8: torch.FloatTensor([.3, .7]),
9: torch.FloatTensor([.3, .7]),
10: torch.FloatTensor([.3, .7]),
}
n_items = torch.randint(0,11, (100,))
avgs = torch.zeros_like(n_items)
n_loops = 5000
for i in range(n_loops):
labels = torch.zeros_like(n_items)
labels = get_piraha_labels(labels,n_items)
avgs = avgs + labels
avgs = avgs/n_loops
for k in weights.keys():
targ = weights[k][0]*2 + weights[k][1]*3
avg = avgs[n_items==k]
if len(avg) > 0:
avg = avg.mean()
diff = float(avg-targ)
self.assertTrue(np.abs(diff)<0.01)
def test_duplicate_labels(self):
n_items = torch.randint(0,11, (100,))
avgs = torch.zeros_like(n_items)
n_loops = 5000
for i in range(n_loops):
labels = torch.zeros_like(n_items)
labels = get_duplicate_labels(labels,n_items, 22)
if i < 20:
for n,l in zip(n_items,labels):
self.assertTrue((n*2)==l or (n*2+1)==l)
avgs = avgs + labels
avgs = avgs/n_loops
for i in range(torch.max(n_items)):
avg = avgs[n_items==i]
if len(avg) > 0:
avg = avg.mean()
targ = ((i*2)+.5)
diff = targ-avg
self.assertTrue(np.abs(diff)<0.01)
def test_get_lang_labels_english(self):
max_label = 10
use_count_words = 1
n_samps = 100
n_items = torch.randint(0,max_label+10, (n_samps,))
n_targs = n_items.clone()
labels = get_lang_labels(
n_items,
n_targs,
max_label,
use_count_words
)
labels = labels.cpu().detach().numpy()
n_items = n_items.cpu().detach().numpy()
idx = n_items<max_label
self.assertTrue(np.array_equal(labels[idx],n_items[idx]))
self.assertTrue(
np.array_equal(
labels[~idx],
np.ones_like(labels[~idx])*max_label
)
)
def test_get_lang_labels_comparison(self):
max_label = 10
use_count_words = 0
n_samps = 100
n_items = torch.randint(0,max_label+10, (n_samps,))
n_targs = torch.randint(0,max_label+10, (n_samps,))
labels = get_lang_labels(
n_items,
n_targs,
max_label,
use_count_words
)
labels = labels.cpu().detach().numpy()
n_items = n_items.cpu().detach().numpy()
n_targs = n_targs.cpu().detach().numpy()
idx = n_items<n_targs
goal = np.zeros_like(labels[idx])
self.assertTrue(np.array_equal(labels[idx],goal))
idx = n_items==n_targs
goal = np.ones_like(labels[idx])
self.assertTrue(np.array_equal(labels[idx],goal))
idx = n_items>n_targs
goal = np.ones_like(labels[idx])*2
self.assertTrue(np.array_equal(labels[idx],goal))
def test_calc_accs(self):
logits = torch.FloatTensor([[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
]])
# 0 correct
targs = torch.LongTensor([[ 0, 1, 0, 0, ]])
accs = calc_accs(logits, targs,prepender="test")
self.assertEqual(0, accs["test_acc"])
# 1 correct
targs = torch.LongTensor([[ 0, 0, 0, 0, ]])
accs = calc_accs(logits, targs,prepender="test")
self.assertEqual(1/4, accs["test_acc"])
# all correct
targs = torch.LongTensor([[ 3,0,1,2 ]])
accs = calc_accs(logits, targs,prepender="test")
self.assertEqual(1, accs["test_acc"])
def test_calc_losses(self):
logits = torch.FloatTensor([[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
]])
loss_fxn = F.cross_entropy
# 0 correct
targs = torch.LongTensor([[ 0, 1, 0, 0, ]])
targ_loss = loss_fxn(
logits.reshape(-1,logits.shape[-1]),
targs.reshape(-1),
reduction="none"
).mean().item()
losses = calc_losses(
logits,
targs,
loss_fxn=loss_fxn,
prepender="test"
)
self.assertEqual(targ_loss, losses["test_loss"])
# 1 correct
targs = torch.LongTensor([[ 0, 0, 0, 0, ]])
targ_loss = loss_fxn(
logits.reshape(-1,logits.shape[-1]),
targs.reshape(-1),
reduction="none"
).mean().item()
losses = calc_losses(
logits,
targs,
loss_fxn=loss_fxn,
prepender="test"
)
self.assertEqual(targ_loss, losses["test_loss"])
# all correct
targs = torch.LongTensor([[ 3,0,1,2 ]])
targ_loss = loss_fxn(
logits.reshape(-1,logits.shape[-1]),
targs.reshape(-1),
reduction="none"
).mean().item()
losses = calc_losses(
logits,
targs,
loss_fxn=loss_fxn,
prepender="test"
)
self.assertEqual(targ_loss, losses["test_loss"])
def test_calc_accs_categories(self):
logits = torch.FloatTensor([
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
],
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
],
])
categories = torch.LongTensor([
[ 1, 1, 3, 0, ],
[ 0, 3, 0, 3, ],
])
# 0 correct
targs = torch.LongTensor([
[ 0, 1, 0, 0, ],
[ 0, 1, 0, 0, ]
])
accs = calc_accs(logits, targs, categories, prepender="test")
self.assertEqual(0, accs["test_accctg_0"])
self.assertEqual(0, accs["test_accctg_1"])
self.assertEqual(0, accs["test_accctg_3"])
# 1 correct 1
targs = torch.LongTensor([
[ 0, 0, 0, 0, ],
[ 0, 1, 0, 0, ]
])
accs = calc_accs(logits, targs, categories,prepender="test")
self.assertEqual(0, accs["test_accctg_0"])
self.assertEqual(1/2, accs["test_accctg_1"])
self.assertEqual(0, accs["test_accctg_3"])
# all correct 0
targs = torch.LongTensor([
[ 0, 0, 0, 2, ],
[ 3, 1, 1, 0, ]
])
accs = calc_accs(logits, targs, categories,prepender="test")
self.assertEqual(1, accs["test_accctg_0"])
self.assertEqual(1/2, accs["test_accctg_1"])
self.assertEqual(0, accs["test_accctg_3"])
def test_calc_losses_categories(self):
logits = torch.FloatTensor([
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
],
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
],
])
categories = torch.LongTensor([
[ 1, 1, 3, 0, ],
[ 0, 3, 0, 3, ],
])
loss_fxn = F.cross_entropy
# 0 correct
targs = torch.LongTensor([
[ 0, 1, 0, 0, ],
[ 0, 1, 0, 0, ]
])
losses = calc_losses(logits, targs, categories, prepender="test")
idxs = categories.reshape(-1)==0
targ_loss = loss_fxn(
logits.reshape(-1,logits.shape[-1])[idxs],
targs.reshape(-1)[idxs],
).item()
self.assertEqual(targ_loss, losses["test_lossctg_0"])
idxs = categories.reshape(-1)==1
targ_loss = loss_fxn(
logits.reshape(-1,logits.shape[-1])[idxs],
targs.reshape(-1)[idxs],
).item()
self.assertEqual(targ_loss, losses["test_lossctg_1"])
idxs = categories.reshape(-1)==3
targ_loss = loss_fxn(
logits.reshape(-1,logits.shape[-1])[idxs],
targs.reshape(-1)[idxs],
).item()
self.assertEqual(targ_loss, losses["test_lossctg_3"])
# 1 correct 1
targs = torch.LongTensor([
[ 0, 0, 0, 0, ],
[ 0, 1, 0, 0, ]
])
losses = calc_losses(logits, targs, categories,prepender="test")
idxs = categories.reshape(-1)==0
targ_loss = loss_fxn(
logits.reshape(-1,logits.shape[-1])[idxs],
targs.reshape(-1)[idxs],
).item()
self.assertEqual(targ_loss, losses["test_lossctg_0"])
idxs = categories.reshape(-1)==1
targ_loss = loss_fxn(
logits.reshape(-1,logits.shape[-1])[idxs],
targs.reshape(-1)[idxs],
).item()
self.assertEqual(targ_loss, losses["test_lossctg_1"])
idxs = categories.reshape(-1)==3
targ_loss = loss_fxn(
logits.reshape(-1,logits.shape[-1])[idxs],
targs.reshape(-1)[idxs],
).item()
self.assertEqual(targ_loss, losses["test_lossctg_3"])
# all correct 0
targs = torch.LongTensor([
[ 0, 0, 0, 2, ],
[ 3, 1, 1, 0, ]
])
losses = calc_losses(logits, targs, categories,prepender="test")
idxs = categories.reshape(-1)==0
targ_loss = loss_fxn(
logits.reshape(-1,logits.shape[-1])[idxs],
targs.reshape(-1)[idxs],
).item()
self.assertEqual(targ_loss, losses["test_lossctg_0"])
idxs = categories.reshape(-1)==1
targ_loss = loss_fxn(
logits.reshape(-1,logits.shape[-1])[idxs],
targs.reshape(-1)[idxs],
).item()
self.assertEqual(targ_loss, losses["test_lossctg_1"])
idxs = categories.reshape(-1)==3
targ_loss = loss_fxn(
logits.reshape(-1,logits.shape[-1])[idxs],
targs.reshape(-1)[idxs],
).item()
self.assertEqual(targ_loss, losses["test_lossctg_3"])
def test_avg_over_dicts(self):
vals = np.arange(10)
dicts = [ {"foo": i, "poo": i*i} for i in vals ]
avgs = avg_over_dicts(dicts)
self.assertEqual(np.mean(vals), avgs["foo"])
self.assertEqual(np.mean(vals**2), avgs["poo"])
def test_calc_lang_loss_and_accs(self):
loss_fxn = torch.nn.CrossEntropyLoss()
langs = (torch.FloatTensor([
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
],
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
]
]).cuda(),)
drops = torch.LongTensor([
[ 1,1,1,1 ],
[ 1,1,1,1 ],
])
# 0 correct
targs = torch.LongTensor([
[ 0, 1, 0, 0, ],
[ 0, 1, 0, 0, ],
])
targ_loss = loss_fxn(langs[0].reshape(-1,4), targs.cuda().reshape(-1))
targ_accs = calc_accs(langs[0].cpu(), targs, targs, prepender="test_lang")
loss, losses, accs = calc_lang_loss_and_accs(
langs,
targs.reshape(-1),
drops.reshape(-1),
loss_fxn=loss_fxn,
categories=targs.reshape(-1),
prepender="test"
)
self.assertEqual(float(loss), float(targ_loss))
for k in targ_accs.keys():
self.assertEqual(targ_accs[k], accs[k])
targ_losses = calc_losses(langs[0].cpu(), targs, targs, prepender="test_lang")
for k in targ_losses.keys():
self.assertEqual(targ_losses[k], losses[k])
# 3 correct
targs = torch.LongTensor([
[ 3, 1, 1, 0, ],
[ 0, 0, 0, 0, ],
])
targ_loss = loss_fxn(langs[0].reshape(-1,4), targs.cuda().reshape(-1))
targ_accs = calc_accs(langs[0].cpu(), targs, targs, prepender="test_lang")
loss, losses, accs = calc_lang_loss_and_accs(
langs,
targs.reshape(-1),
drops.reshape(-1),
loss_fxn=loss_fxn,
categories=targs.reshape(-1),
prepender="test"
)
self.assertEqual(float(loss), float(targ_loss))
for k in targ_accs.keys():
self.assertEqual(targ_accs[k], accs[k])
targ_losses = calc_losses(langs[0].cpu(), targs, targs, prepender="test_lang")
for k in targ_losses.keys():
self.assertAlmostEqual(targ_losses[k], losses[k], places=4)
def test_calc_lang_loss_and_accs_drops(self):
loss_fxn = torch.nn.CrossEntropyLoss()
langs = (torch.FloatTensor([
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
],
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
]
]).cuda(),)
drops = torch.LongTensor([
[ 0,1,0,1 ],
[ 1,0,1,0 ],
])
dropped_lang = torch.FloatTensor([
[
[4,1,2,3],
[-100,-5,100,0],
],
[
[1,2,3,4],
[-1,2,-3,-4],
]
]).cuda()
# 0 correct
targs = torch.LongTensor([
[ 0, 1, 0, 0, ],
[ 0, 1, 0, 0, ],
])
dropped_targs = torch.LongTensor([
[ 1, 0, ],
[ 0, 0, ],
])
targ_loss = loss_fxn(
dropped_lang.reshape(-1,4),
dropped_targs.cuda().reshape(-1)
)
targ_accs = calc_accs(
dropped_lang.cpu(),
dropped_targs,
dropped_targs,
prepender="test_lang"
)
targ_losses = calc_losses(
dropped_lang.cpu(),
dropped_targs,
dropped_targs,
prepender="test_lang"
)
loss, losses, accs = calc_lang_loss_and_accs(
langs,
targs.reshape(-1),
drops.reshape(-1),
loss_fxn,
categories=targs.reshape(-1),
prepender="test"
)
self.assertEqual(float(loss), float(targ_loss))
for k in targ_accs.keys():
self.assertEqual(targ_accs[k], accs[k])
for k in targ_losses.keys():
self.assertEqual(targ_losses[k], losses[k])
# 3 correct
targs = torch.LongTensor([
[ 3, 0, 1, 2, ],
[ 0, 0, 0, 0, ],
])
dropped_targs = torch.LongTensor([
[ 0, 2, ],
[ 0, 0, ],
])
targ_loss = loss_fxn(
dropped_lang.reshape(-1,4),
dropped_targs.cuda().reshape(-1)
)
targ_accs = calc_accs(
dropped_lang.cpu(),
dropped_targs,
dropped_targs,
prepender="test_lang"
)
targ_losses = calc_losses(
dropped_lang.cpu(),
dropped_targs,
dropped_targs,
prepender="test_lang"
)
loss, losses, accs = calc_lang_loss_and_accs(
langs,
targs.reshape(-1),
drops.reshape(-1),
loss_fxn,
categories=targs.reshape(-1),
prepender="test"
)
self.assertEqual(float(loss), float(targ_loss))
for k in targ_accs.keys():
self.assertEqual(targ_accs[k], accs[k])
for k in targ_losses.keys():
self.assertAlmostEqual(targ_losses[k], losses[k], places=4)
def test_calc_actn_loss_and_accs(self):
loss_fxn = torch.nn.CrossEntropyLoss()
actns = torch.FloatTensor([
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
],
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
]
]).cuda()
n_targs = torch.LongTensor([
[ 0, 1, 2, 3 ],
[ 4, 3, 2, 1 ],
])
# 0 correct
targs = torch.LongTensor([
[ 0, 1, 0, 0, ],
[ 0, 1, 0, 0, ],
])
targ_loss = loss_fxn(actns.reshape(-1,4), targs.cuda().reshape(-1))
targ_accs = calc_accs(
actns.cpu(),
targs,
n_targs,
prepender="test_actn"
)
loss, accs = calc_actn_loss_and_accs(
actns,
targs.reshape(-1),
n_targs.reshape(-1),
loss_fxn,
prepender="test"
)
self.assertEqual(float(loss), float(targ_loss))
for k in targ_accs.keys():
self.assertEqual(targ_accs[k], accs[k])
# 3 correct
targs = torch.LongTensor([
[ 3, 1, 1, 0, ],
[ 0, 0, 0, 0, ],
])
targ_loss = loss_fxn(actns.reshape(-1,4), targs.cuda().reshape(-1))
targ_accs = calc_accs(
actns.cpu().reshape(-1,4),
targs.reshape(-1),
n_targs.reshape(-1),
prepender="test_actn"
)
loss, accs = calc_actn_loss_and_accs(
actns,
targs.reshape(-1),
n_targs.reshape(-1),
loss_fxn,
prepender="test"
)
self.assertEqual(float(loss), float(targ_loss))
for k in targ_accs.keys():
self.assertEqual(targ_accs[k], accs[k])
def test_get_loss_and_accs_phase0(self):
phase = 0
loss_fxn = torch.nn.CrossEntropyLoss()
preds = (torch.FloatTensor([
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
],
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
]
]).cuda(),)
drops = torch.LongTensor([
[ 0,1,0,1 ],
[ 1,0,1,0 ],
])
n_targs = torch.LongTensor([
[ 0, 1, 2, 3 ],
[ 4, 3, 2, 1 ],
])
# 0 correct
targs = torch.LongTensor([
[ 0, 1, 0, 0, ],
[ 0, 1, 0, 0, ],
])
targ_loss, _, targ_accs = calc_lang_loss_and_accs(
preds,
targs.reshape(-1),
drops.reshape(-1),
loss_fxn,
categories=targs.reshape(-1),
prepender="test"
)
loss, losses, accs = get_loss_and_accs(
phase=phase,
actn_preds=preds,
lang_preds=preds,
actn_targs=targs.reshape(-1),
lang_targs=targs.reshape(-1),
drops=drops.reshape(-1),
n_targs=n_targs.reshape(-1),
n_items=targs.reshape(-1),
prepender="test",
loss_fxn=loss_fxn,
lang_p=0.5
)
self.assertEqual(float(loss), float(targ_loss))
for k in targ_accs.keys():
self.assertEqual(targ_accs[k], accs[k])
# 3 correct
targs = torch.LongTensor([
[ 3, 1, 1, 0, ],
[ 0, 0, 0, 0, ],
])
targ_loss, _, targ_accs = calc_lang_loss_and_accs(
preds,
targs.reshape(-1),
drops.reshape(-1),
loss_fxn,
categories=targs.reshape(-1),
prepender="test"
)
loss, losses, accs = get_loss_and_accs(
phase=phase,
actn_preds=preds,
lang_preds=preds,
actn_targs=targs.reshape(-1),
lang_targs=targs.reshape(-1),
drops=drops.reshape(-1),
n_targs=n_targs.reshape(-1),
n_items=targs.reshape(-1),
prepender="test",
loss_fxn=loss_fxn,
lang_p=0.5
)
self.assertEqual(float(loss), float(targ_loss))
for k in targ_accs.keys():
self.assertEqual(targ_accs[k], accs[k])
def test_get_loss_and_accs_phase1(self):
phase = 1
loss_fxn = torch.nn.CrossEntropyLoss()
preds = torch.FloatTensor([
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
],
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
]
]).cuda()
drops = torch.LongTensor([
[ 0,1,0,1 ],
[ 1,0,1,0 ],
])
n_targs = torch.LongTensor([
[ 0, 1, 2, 3 ],
[ 4, 3, 2, 1 ],
])
# 0 correct
targs = torch.LongTensor([
[ 0, 1, 0, 0, ],
[ 0, 1, 0, 0, ],
])
targ_loss, targ_accs = calc_actn_loss_and_accs(
preds,
targs.reshape(-1),
n_targs.reshape(-1),
loss_fxn,
prepender="test"
)
loss, losses, accs = get_loss_and_accs(
phase=phase,
actn_preds=preds,
lang_preds=preds,
actn_targs=targs.reshape(-1),
lang_targs=targs.reshape(-1),
drops=drops.reshape(-1),
n_targs=n_targs.reshape(-1),
n_items=targs.reshape(-1),
prepender="test",
loss_fxn=loss_fxn,
lang_p=0.5
)
self.assertEqual(float(loss), float(targ_loss))
for k in targ_accs.keys():
self.assertEqual(targ_accs[k], accs[k])
# 3 correct
targs = torch.LongTensor([
[ 3, 1, 1, 0, ],
[ 0, 0, 0, 0, ],
])
targ_loss, targ_accs = calc_actn_loss_and_accs(
preds,
targs.reshape(-1),
n_targs.reshape(-1),
loss_fxn,
prepender="test"
)
loss, losses, accs = get_loss_and_accs(
phase=phase,
actn_preds=preds,
lang_preds=preds,
actn_targs=targs.reshape(-1),
lang_targs=targs.reshape(-1),
drops=drops.reshape(-1),
n_targs=n_targs.reshape(-1),
n_items=targs.reshape(-1),
prepender="test",
loss_fxn=loss_fxn,
lang_p=0.5
)
self.assertEqual(float(loss), float(targ_loss))
for k in targ_accs.keys():
self.assertEqual(targ_accs[k], accs[k])
def test_get_loss_and_accs_phase2(self):
phase = 2
loss_fxn = torch.nn.CrossEntropyLoss()
actns = torch.FloatTensor([
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
],
[
[1,2,3,4],
[4,1,2,3],
[-1,2,-3,-4],
[-100,-5,100,0],
]
]).cuda()
langs = (actns.clone(),)
drops = torch.LongTensor([
[ 0,1,0,1 ],
[ 1,0,1,0 ],
])
n_targs = torch.LongTensor([
[ 0, 1, 2, 3 ],
[ 4, 3, 2, 1 ],
])
# 0 correct
targs = torch.LongTensor([
[ 0, 1, 0, 0, ],
[ 0, 1, 0, 0, ],
])
lang_targ_loss, _, lang_targ_accs = calc_lang_loss_and_accs(
langs,
targs.reshape(-1),
drops.reshape(-1),
loss_fxn,
categories=targs.reshape(-1),
prepender="test"
)
actn_targ_loss, actn_targ_accs = calc_actn_loss_and_accs(
actns,
targs.reshape(-1),
n_targs.reshape(-1),
loss_fxn,
prepender="test"
)
targ_loss = 0.5*lang_targ_loss + 0.5*actn_targ_loss
targ_accs = {**lang_targ_accs, **actn_targ_accs}
loss, losses, accs = get_loss_and_accs(
phase=phase,
actn_preds=actns,
lang_preds=langs,
actn_targs=targs.reshape(-1),
lang_targs=targs.reshape(-1),
drops=drops.reshape(-1),
n_targs=n_targs.reshape(-1),
n_items=targs.reshape(-1),
prepender="test",
loss_fxn=loss_fxn,
lang_p=0.5
)
self.assertEqual(float(loss), float(targ_loss))
for k in targ_accs.keys():
self.assertEqual(targ_accs[k], accs[k])
# 3 correct
targs = torch.LongTensor([
[ 3, 1, 1, 0, ],
[ 0, 0, 0, 0, ],
])
lang_targ_loss, _, lang_targ_accs = calc_lang_loss_and_accs(
langs,
targs.reshape(-1),
drops.reshape(-1),
loss_fxn,
categories=targs.reshape(-1),
prepender="test"
)
actn_targ_loss, actn_targ_accs = calc_actn_loss_and_accs(
actns,
targs.reshape(-1),
n_targs.reshape(-1),
loss_fxn,
prepender="test"
)
targ_loss = 0.5*lang_targ_loss + 0.5*actn_targ_loss
targ_accs = {**lang_targ_accs, **actn_targ_accs}
loss, losses, accs = get_loss_and_accs(
phase=phase,
actn_preds=actns,
lang_preds=langs,
actn_targs=targs.reshape(-1),
lang_targs=targs.reshape(-1),
drops=drops.reshape(-1),
n_targs=n_targs.reshape(-1),
n_items=targs.reshape(-1),
prepender="test",
loss_fxn=loss_fxn,
lang_p=0.5
)
self.assertEqual(float(loss), float(targ_loss))
for k in targ_accs.keys():
self.assertEqual(targ_accs[k], accs[k])
if __name__=="__main__":
unittest.main()
| 31.89093
| 86
| 0.464161
| 3,275
| 27,777
| 3.757557
| 0.045802
| 0.07411
| 0.069722
| 0.013652
| 0.922477
| 0.913863
| 0.907362
| 0.888591
| 0.87372
| 0.848692
| 0
| 0.059794
| 0.393095
| 27,777
| 870
| 87
| 31.927586
| 0.670186
| 0.00918
| 0
| 0.820732
| 0
| 0
| 0.019784
| 0
| 0
| 0
| 0
| 0
| 0.078049
| 1
| 0.020732
| false
| 0
| 0.003659
| 0
| 0.02561
| 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
|
a5a5088a8ab15596ca84187c9c0e0627828850f9
| 683
|
py
|
Python
|
CondTools/L1Trigger/python/L1ConfigTSCKeys_cff.py
|
ckamtsikis/cmssw
|
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
|
[
"Apache-2.0"
] | 852
|
2015-01-11T21:03:51.000Z
|
2022-03-25T21:14:00.000Z
|
CondTools/L1Trigger/python/L1ConfigTSCKeys_cff.py
|
ckamtsikis/cmssw
|
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
|
[
"Apache-2.0"
] | 30,371
|
2015-01-02T00:14:40.000Z
|
2022-03-31T23:26:05.000Z
|
CondTools/L1Trigger/python/L1ConfigTSCKeys_cff.py
|
ckamtsikis/cmssw
|
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
|
[
"Apache-2.0"
] | 3,240
|
2015-01-02T05:53:18.000Z
|
2022-03-31T17:24:21.000Z
|
from L1TriggerConfig.CSCTFConfigProducers.CSCTFObjectKeysOnline_cfi import *
from L1TriggerConfig.DTTrackFinder.L1DTTFTSCObjectKeysOnline_cfi import *
from L1TriggerConfig.RPCTriggerConfig.L1RPCObjectKeysOnline_cfi import *
from L1TriggerConfig.GMTConfigProducers.L1MuGMTParametersKeysOnlineProd_cfi import *
from L1TriggerConfig.L1ScalesProducers.L1MuTriggerScaleKeysOnlineProd_cfi import *
L1MuTriggerScaleKeysOnlineProd.subsystemLabel = 'GMTScales'
from L1TriggerConfig.RCTConfigProducers.L1RCTObjectKeysOnline_cfi import *
from L1TriggerConfig.GctConfigProducers.L1GctTSCObjectKeysOnline_cfi import *
from L1TriggerConfig.L1GtConfigProducers.l1GtTscObjectKeysOnline_cfi import *
| 68.3
| 84
| 0.90776
| 51
| 683
| 12
| 0.431373
| 0.248366
| 0.127451
| 0.27451
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027778
| 0.051245
| 683
| 9
| 85
| 75.888889
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0.013177
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.888889
| 0
| 0.888889
| 0
| 0
| 0
| 1
| null | 1
| 0
| 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
|
3c42183d7ca6ff665b6de8859306ffa82f1f09f2
| 1,667
|
py
|
Python
|
legacy/functional_code/pulson440/__init__.py
|
jjimmykang/bwsi-backprojection
|
440e21f90e2a1d0d1c28bfd9a0faaf97129378a5
|
[
"MIT"
] | 1
|
2020-02-09T19:09:27.000Z
|
2020-02-09T19:09:27.000Z
|
legacy/functional_code/pulson440/__init__.py
|
jjimmykang/bwsi-backprojection
|
440e21f90e2a1d0d1c28bfd9a0faaf97129378a5
|
[
"MIT"
] | null | null | null |
legacy/functional_code/pulson440/__init__.py
|
jjimmykang/bwsi-backprojection
|
440e21f90e2a1d0d1c28bfd9a0faaf97129378a5
|
[
"MIT"
] | null | null | null |
__pyarmor__(__name__, __file__, b'\xe2\x50\x8c\x64\x26\x42\xd6\x01\x5c\x5c\xf8\xa8\x85\x0c\x21\xe7\x0a\xa2\x45\x58\x6e\xc9\x3c\xd5\x55\x40\x64\x69\x7d\x5f\x63\xcb\x41\xdc\x71\xdf\x4d\x82\x99\xc8\xc1\x98\xfd\x46\x67\x20\x2f\xed\x4b\xf6\xf9\x41\x55\x5c\x47\x3c\x78\x07\x75\x5d\x9b\x88\xa2\x6e\x5e\x78\xf3\x9c\x88\xba\xed\x07\xab\xfe\x63\x70\x5d\x62\xc4\xbe\xfd\x5d\x4c\x32\x27\x59\x91\x67\x1e\xb0\x09\xec\x0b\x12\x11\x95\xce\xb2\xee\x37\xe2\x0e\x96\xb7\x83\x5e\x28\x3a\xde\x3f\xd7\xea\x21\x4b\xeb\x6e\x65\x36\x4c\x34\x8b\xd6\x28\x44\x50\x1e\xd0\xe8\x0b\xd9\x61\x73\x2c\xb2\x29\xf7\x42\xb4\x2e\x08\x97\x23\xd0\xd3\x76\xcf\xf0\xe9\xb7\x3c\x9e\xc4\x57\xc6\xab\x9f\xbb\xbb\x63\xc3\x80\xf3\x9d\x1e\x6d\x3c\xaf\x91\x80\x55\xbb\xc8\xa2\x26\x03\x92\xdd\x15\x99\x70\x84\xc0\xcd\x34\xcf\x1f\x23\xea\xba\xad\x7a\x1e\xe1\xb6\x93\xed\x61\xa7\xf2\x15\x58\x20\x19\x08\xca\x8c\x31\x89\x05\x52\x81\xde\xfa\x76\x9a\xa3\x91\x5b\x25\xb8\x2b\xd0\x4f\xfb\x4a\x92\x15\x71\x4f\x8e\xf2\x6e\xe8\xdb\x23\xb4\x9f\xee\x94\xd0\x7a\x58\xeb\x22\xb7\x25\x08\xac\x2e\xf9\xa1\x0c\x37\xc5\xe8\x58\xe6\x26\xaf\x21\xce\x28\x4c\xdf\x09\xdc\xf8\xd7\x78\xe5\xc2\xb7\x32\x78\x09\x03\xf7\x28\x4f\x25\xc6\xe8\x87\x28\xef\x7a\x84\x1b\x88\x23\x5d\xf4\x6c\xf4\x0c\xa2\x02\x3b\x2e\x56\x30\xcd\x24\xff\x8f\xb8\xb0\x7c\x7c\x2e\x84\x60\x13\x25\xfe\xcc\x1b\x2d\xa3\xe1\xe2\x45\xff\x3f\x0b\xfe\xca\x49\x50\xbd\x3d\x64\x8e\xb5\xe9\x62\xcf\xaf\xb7\x99\x80\x7a\xfc\xdf\x31\x65\xf1\x24\xd9\xec\x50\xd9\x7f\xd0\xf6\x4a\xcd\xfc\x3d\x7e\xfd\xf8\x3c\xd5\x16\xfe\x8a\x68\xb7\xf3\xf2\x13\x1d\xa9\x91\x9a\x51\x8e\xc0\xa5\x81\x04\xd6\x08\x90\xf1\xcd\x69\x01\x2b\xd5\x29\xe3\x4e\x7b\x16\x4a\xf6\x61\xd8\x1f\xde\x87\xb2\x40\x8d\x68', 1)
| 1,667
| 1,667
| 0.74985
| 412
| 1,667
| 3.004854
| 0.51699
| 0.009693
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.301683
| 0.0018
| 1,667
| 1
| 1,667
| 1,667
| 0.442308
| 0
| 0
| 0
| 0
| 1
| 0.976019
| 0.976019
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
3c8c318c871167bf3f056e1a05ea008558ab1c56
| 78
|
py
|
Python
|
tests/test_test.py
|
Smirenost/volga
|
109191ee994e99a831d90f3e8aa1d82fc766ca8b
|
[
"MIT"
] | 1
|
2020-11-05T23:40:02.000Z
|
2020-11-05T23:40:02.000Z
|
tests/test_test.py
|
Smirenost/volga
|
109191ee994e99a831d90f3e8aa1d82fc766ca8b
|
[
"MIT"
] | 3
|
2020-11-05T23:46:34.000Z
|
2020-11-12T22:42:12.000Z
|
tests/test_test.py
|
Smirenost/volga
|
109191ee994e99a831d90f3e8aa1d82fc766ca8b
|
[
"MIT"
] | null | null | null |
from volga.json import foo_test
def test_mock():
assert 1 == foo_test()
| 13
| 31
| 0.692308
| 13
| 78
| 3.923077
| 0.769231
| 0.27451
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016129
| 0.205128
| 78
| 5
| 32
| 15.6
| 0.806452
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 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
|
b1cf5ce6c13872161132303618fee46973f05973
| 7,588
|
py
|
Python
|
culpable/fault_projections.py
|
cossatot/at_fault
|
63beba4d616e89ebb4c2eaf48230717a4179d4e2
|
[
"MIT"
] | 3
|
2019-12-09T05:25:04.000Z
|
2021-04-25T14:55:25.000Z
|
culpable/fault_projections.py
|
cossatot/culpable
|
63beba4d616e89ebb4c2eaf48230717a4179d4e2
|
[
"MIT"
] | 9
|
2016-10-11T16:11:42.000Z
|
2017-01-04T21:17:27.000Z
|
culpable/fault_projections.py
|
cossatot/culpable
|
63beba4d616e89ebb4c2eaf48230717a4179d4e2
|
[
"MIT"
] | null | null | null |
import numpy as np
from numpy import sin, cos, tan, degrees, radians, arctan, arcsin
# Slip projections
## To/From offset
def offset_from_vert_sep(vert_sep, dip, rake=90.):
dip_slip = dip_slip_from_vert_sep(vert_sep, dip, rake)
return offset_from_dip_slip(dip_slip, dip, rake)
def vert_sep_from_offset(offset, dip, rake=90.):
dip_slip = dip_slip_from_offset(offset, dip, rake)
return vert_sep_from_dip_slip(dip_slip, dip, rake)
def offset_from_hor_sep(hor_sep, dip, rake=90.):
dip_slip = dip_slip_from_hor_sep(hor_sep, dip, rake)
return offset_from_dip_slip(dip_slip, dip, rake)
def hor_sep_from_offset(offset, dip, rake=90.):
dip_slip = dip_slip_from_offset(offset, dip, rake)
return hor_sep_from_dip_slip(dip_slip, dip, rake)
def offset_from_strike_slip(strike_slip, dip, rake=0.):
return strike_slip / cos( radians(rake))
def strike_slip_from_offset(offset, dip, rake=0.):
return offset * cos( radians(rake))
def offset_from_dip_slip(dip_slip, dip, rake=90.):
return dip_slip / sin( radians(rake))
def dip_slip_from_offset(offset, dip, rake=90.):
return offset * sin( radians(rake))
def heave_from_offset(offset, dip, rake=90.):
apparent_dip = apparent_dip_from_dip_rake(dip, rake)
return offset * cos( radians(apparent_dip))
def offset_from_heave(heave, dip, rake=90.):
apparent_dip = apparent_dip_from_dip_rake(dip, rake)
return heave / cos( radians(apparent_dip))
## Others
def beta_from_dip_rake(dip, rake):
'''
Returns beta, the angle (in degrees) between the strike and the
trend of apparent dip.
'''
return degrees( arctan( tan(radians(rake)) * cos(radians(dip))))
def apparent_dip_from_dip_rake(dip, rake):
return degrees( arcsin( sin(radians(dip)) * sin(radians(rake))))
def hor_sep_from_vert_sep(vert_sep, dip, rake=90.):
offset = offset_from_vert_sep(vert_sep, dip, rake)
return hor_sep_from_offset(offset, dip, rake)
def vert_sep_from_hor_sep(hor_sep, dip, rake=90.):
offset = offset_from_hor_sep(hor_sep, dip, rake)
return vert_sep_from_offset(offset, dip, rake)
def dip_slip_from_vert_sep(vert_sep, dip, rake=90.):
return vert_sep / sin(radians(dip))
def vert_sep_from_dip_slip(dip_slip, dip, rake=90.):
return dip_slip * sin(radians(dip))
def strike_slip_from_vert_sep(vert_sep, dip, rake=0.):
offset = offset_from_vert_sep(vert_sep, dip, rake)
return strike_slip_from_offset(offset, dip, rake)
def vert_sep_from_strike_slip(strike_slip, dip, rake=0.):
offset = offset_from_strike_slip(strike_slip, dip, rake)
return vert_sep_from_offset(offset, dip, rake)
def heave_from_vert_sep(vert_sep, dip, rake=90.):
offset = offset_from_vert_sep(vert_sep, dip, rake)
return heave_from_offset(offset, dip, rake)
def vert_sep_from_heave(heave, dip, rake=90.):
offset = offset_from_heave(heave, dip, rake)
return vert_sep_from_offset(offset, dip, rake)
def hor_sep_from_dip_slip(dip_slip, dip, rake=90.):
return dip_slip * cos(radians(dip))
def dip_slip_from_hor_sep(hor_sep, dip, rake=90.):
return hor_sep / cos(radians(dip))
def hor_sep_from_strike_slip(strike_slip, dip, rake=0.):
offset = offset_from_strike_slip(strike_slip, dip, rake)
return hor_sep_from_offset(offset, dip, rake)
def strike_slip_from_hor_sep(hor_sep, dip, rake=0.):
offset = offset_from_hor_sep(hor_sep, dip, rake)
return strike_slip_from_offset(offset, dip, rake)
def hor_sep_from_heave(heave, dip, rake=90.):
offset = offset_from_heave(heave, dip, rake)
return hor_sep_from_offset(offset, dip, rake)
def heave_from_hor_sep(hor_sep, dip, rake=90.):
offset = offset_from_hor_sep(hor_sep, dip, rake)
return heave_from_offset(offset, dip, rake)
def dip_slip_from_heave(heave, dip, rake=90.):
offset = offset_from_heave(heave, dip, rake)
return dip_slip_from_offset(offset, dip, rake)
def heave_from_dip_slip(dip_slip, dip, rake=90.):
offset = offset_from_dip_slip(dip_slip, dip, rake)
return heave_from_offset(offset, dip, rake)
def dip_slip_from_strike_slip(strike_slip, dip, rake):
offset = offset_from_strike_slip(strike_slip, dip, rake)
return dip_slip_from_offset(offset, dip, rake)
def strike_slip_from_dip_slip(dip_slip, dip, rake):
offset = offset_from_dip_slip(dip_slip, dip, rake)
return strike_slip_from_offset(offset, dip, rake)
def heave_from_strike_slip(strike_slip, dip, rake=0.):
hs = hor_sep_from_strike_slip(strike_slip, dip, rake)
return np.sqrt(strike_slip**2 + hs**2)
def strike_slip_from_heave(heave, dip, rake=0.):
offset = offset_from_heave(heave, dip, rake)
return strike_slip_from_offset(offset, dip, rake)
# aggregator functions
def slip_components_from_offset(offset, dip, rake):
slip_comps = {'offset' : offset}
slip_comps['hor_sep'] = hor_sep_from_offset(offset, dip, rake)
slip_comps['vert_sep'] = vert_sep_from_offset(offset, dip, rake)
slip_comps['dip_slip'] = dip_slip_from_offset(offset, dip, rake)
slip_comps['strike_slip'] = strike_slip_from_offset(offset, dip, rake)
slip_comps['heave'] = heave_from_offset(offset, dip, rake)
return slip_comps
def slip_components_from_hor_sep(hor_sep, dip, rake):
slip_comps = {'hor_sep' : hor_sep}
slip_comps['offset'] = offset_from_hor_sep(hor_sep, dip, rake)
slip_comps['vert_sep'] = vert_sep_from_hor_sep(hor_sep, dip, rake)
slip_comps['dip_slip'] = dip_slip_from_hor_sep(hor_sep, dip, rake)
slip_comps['strike_slip'] = strike_slip_from_hor_sep(hor_sep, dip, rake)
slip_comps['heave'] = heave_from_hor_sep(hor_sep, dip, rake)
return slip_comps
def slip_components_from_vert_sep(vert_sep, dip, rake):
slip_comps = {'vert_sep' : vert_sep}
slip_comps['hor_sep'] = hor_sep_from_vert_sep(vert_sep, dip, rake)
slip_comps['offset'] = offset_from_vert_sep(vert_sep, dip, rake)
slip_comps['dip_slip'] = dip_slip_from_vert_sep(vert_sep, dip, rake)
slip_comps['strike_slip'] = strike_slip_from_vert_sep(vert_sep, dip, rake)
slip_comps['heave'] = heave_from_vert_sep(vert_sep, dip, rake)
return slip_comps
def slip_components_from_dip_slip(dip_slip, dip, rake):
slip_comps = {'dip_slip' : dip_slip}
slip_comps['hor_sep'] = hor_sep_from_dip_slip(dip_slip, dip, rake)
slip_comps['vert_sep'] = vert_sep_from_dip_slip(dip_slip, dip, rake)
slip_comps['offset'] = offset_from_dip_slip(dip_slip, dip, rake)
slip_comps['strike_slip'] = strike_slip_from_dip_slip(dip_slip, dip, rake)
slip_comps['heave'] = heave_from_dip_slip(dip_slip, dip, rake)
return slip_comps
def slip_components_from_strike_slip(strike_slip, dip, rake):
slip_comps = {'strike_slip' : strike_slip}
slip_comps['hor_sep'] = hor_sep_from_strike_slip(strike_slip, dip, rake)
slip_comps['vert_sep'] = vert_sep_from_strike_slip(strike_slip, dip, rake)
slip_comps['dip_slip'] = dip_slip_from_strike_slip(strike_slip, dip, rake)
slip_comps['offset'] = offset_from_strike_slip(strike_slip, dip, rake)
slip_comps['heave'] = heave_from_strike_slip(strike_slip, dip, rake)
return slip_comps
def slip_components_from_heave(heave, dip, rake):
slip_comps = {'heave' : heave}
slip_comps['hor_sep'] = hor_sep_from_heave(heave, dip, rake)
slip_comps['vert_sep'] = vert_sep_from_heave(heave, dip, rake)
slip_comps['dip_slip'] = dip_slip_from_heave(heave, dip, rake)
slip_comps['strike_slip'] = strike_slip_from_heave(heave, dip, rake)
slip_comps['offset'] = offset_from_heave(heave, dip, rake)
return slip_comps
| 32.289362
| 78
| 0.741566
| 1,240
| 7,588
| 4.135484
| 0.03629
| 0.154251
| 0.085803
| 0.093604
| 0.896646
| 0.88319
| 0.86564
| 0.821568
| 0.728159
| 0.510725
| 0
| 0.00773
| 0.147601
| 7,588
| 234
| 79
| 32.42735
| 0.785096
| 0.019373
| 0
| 0.308824
| 0
| 0
| 0.036418
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.279412
| false
| 0
| 0.014706
| 0.066176
| 0.573529
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 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
| 0
| 1
| 0
|
0
| 7
|
b1de66542e990852570d0825e181d49c32975991
| 48
|
py
|
Python
|
python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorWidthAndPrecision_after.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorWidthAndPrecision_after.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorWidthAndPrecision_after.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
f'{1:.5d} {2:3.5d} {3:3d} {"spam":>20} {4:<#d}'
| 24
| 47
| 0.395833
| 12
| 48
| 1.583333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.232558
| 0.104167
| 48
| 1
| 48
| 48
| 0.209302
| 0
| 0
| 0
| 0
| 1
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 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
| 0
|
0
| 9
|
59253833cbcb18241d731edddc82a7004e814b3e
| 3,163
|
py
|
Python
|
catkin_ws/build/baxter_core_msgs/cmake/baxter_core_msgs-genmsg-context.py
|
roop-pal/robotic-folding
|
a0e062ac6d23cd07fe10e3f45abc4ba50e533141
|
[
"RSA-MD"
] | null | null | null |
catkin_ws/build/baxter_core_msgs/cmake/baxter_core_msgs-genmsg-context.py
|
roop-pal/robotic-folding
|
a0e062ac6d23cd07fe10e3f45abc4ba50e533141
|
[
"RSA-MD"
] | null | null | null |
catkin_ws/build/baxter_core_msgs/cmake/baxter_core_msgs-genmsg-context.py
|
roop-pal/robotic-folding
|
a0e062ac6d23cd07fe10e3f45abc4ba50e533141
|
[
"RSA-MD"
] | null | null | null |
# generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/AnalogIOState.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/AnalogIOStates.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/AnalogOutputCommand.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/AssemblyState.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/AssemblyStates.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/CameraControl.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/CameraSettings.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/CollisionAvoidanceState.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/CollisionDetectionState.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/DigitalIOState.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/DigitalIOStates.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/DigitalOutputCommand.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/EndEffectorCommand.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/EndEffectorProperties.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/EndEffectorState.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/EndpointState.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/EndpointStates.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/HeadPanCommand.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/HeadState.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/JointCommand.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/NavigatorState.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/NavigatorStates.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/RobustControllerStatus.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/SEAJointState.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/URDFConfiguration.msg"
services_str = "/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/srv/CloseCamera.srv;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/srv/ListCameras.srv;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/srv/OpenCamera.srv;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/srv/SolvePositionIK.srv"
pkg_name = "baxter_core_msgs"
dependencies_str = "geometry_msgs;sensor_msgs;std_msgs"
langs = "gencpp;geneus;genlisp;gennodejs;genpy"
dep_include_paths_str = "baxter_core_msgs;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg;geometry_msgs;/opt/ros/kinetic/share/geometry_msgs/cmake/../msg;sensor_msgs;/opt/ros/kinetic/share/sensor_msgs/cmake/../msg;std_msgs;/opt/ros/kinetic/share/std_msgs/cmake/../msg"
PYTHON_EXECUTABLE = "/usr/bin/python"
package_has_static_sources = '' == 'TRUE'
genmsg_check_deps_script = "/opt/ros/kinetic/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py"
| 263.583333
| 2,159
| 0.863737
| 482
| 3,163
| 5.358921
| 0.170124
| 0.123887
| 0.173442
| 0.243902
| 0.674797
| 0.649245
| 0.649245
| 0.649245
| 0.649245
| 0.649245
| 0
| 0
| 0.010749
| 3,163
| 11
| 2,160
| 287.545455
| 0.825503
| 0.015492
| 0
| 0
| 1
| 0.333333
| 0.934769
| 0.923522
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
3ca2ace31bf9ede1d629dd5fbae03c55bc75f2bf
| 71
|
py
|
Python
|
labs/py3code.py
|
turing4ever/illustrated-python-3-course
|
d1faff57590713fcd1c6a9215529d6f9c629b046
|
[
"MIT"
] | 57
|
2018-04-25T21:57:07.000Z
|
2021-12-21T19:09:00.000Z
|
labs/py3code.py
|
radovankavicky/illustrated-python-3-course
|
d1faff57590713fcd1c6a9215529d6f9c629b046
|
[
"MIT"
] | 4
|
2018-04-30T05:32:46.000Z
|
2021-12-06T17:55:36.000Z
|
labs/py3code.py
|
radovankavicky/illustrated-python-3-course
|
d1faff57590713fcd1c6a9215529d6f9c629b046
|
[
"MIT"
] | 26
|
2018-04-27T06:11:35.000Z
|
2021-04-11T12:07:37.000Z
|
# place super_test.py code here
# place keyword_test.py code here
| 8.875
| 33
| 0.732394
| 12
| 71
| 4.166667
| 0.583333
| 0.24
| 0.4
| 0.56
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.211268
| 71
| 7
| 34
| 10.142857
| 0.892857
| 0.859155
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
3cc66fc74313d0ecd7ced030e26d629577fa26a1
| 74
|
py
|
Python
|
Level1/count_p_and_y.py
|
chae-heechan/Programmers_Python_Algorithm_Study
|
c61af0b1b97d790e2332581eb0b7da42c3e510fa
|
[
"MIT"
] | null | null | null |
Level1/count_p_and_y.py
|
chae-heechan/Programmers_Python_Algorithm_Study
|
c61af0b1b97d790e2332581eb0b7da42c3e510fa
|
[
"MIT"
] | null | null | null |
Level1/count_p_and_y.py
|
chae-heechan/Programmers_Python_Algorithm_Study
|
c61af0b1b97d790e2332581eb0b7da42c3e510fa
|
[
"MIT"
] | null | null | null |
def solution(s):
return (s.lower().count('p') == s.lower().count('y'))
| 37
| 57
| 0.567568
| 12
| 74
| 3.5
| 0.666667
| 0.285714
| 0.52381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121622
| 74
| 2
| 57
| 37
| 0.646154
| 0
| 0
| 0
| 0
| 0
| 0.026667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 7
|
596187b54ca231442ef296c49a1a09d46c903d01
| 2,843
|
py
|
Python
|
tests/org_group_tests.py
|
JonLMyers/MetroTransitAPI
|
d8f467570368cd563d69564b680cfdd47ad6b622
|
[
"MIT"
] | null | null | null |
tests/org_group_tests.py
|
JonLMyers/MetroTransitAPI
|
d8f467570368cd563d69564b680cfdd47ad6b622
|
[
"MIT"
] | null | null | null |
tests/org_group_tests.py
|
JonLMyers/MetroTransitAPI
|
d8f467570368cd563d69564b680cfdd47ad6b622
|
[
"MIT"
] | null | null | null |
import requests
import json
token = ''
email_token = ''
print("######## Pass ########")
target = 'http://127.0.0.1:5000/login'
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
data = {'username': 'jon@aaxus.com', 'password': 'password125'}
r = requests.post(target, data=json.dumps(data), headers=headers)
print(r.status_code, r.reason)
print(r.text)
data = json.loads(r.text)
token = data['access_token']
print(token)
print("######## Pass ########")
target = 'http://127.0.0.1:5000/group/manage'
headers = {'Content-type': 'application/json', 'Accept': 'text/plain', 'authorization': 'Bearer ' + token}
data = {
'name': 'Dev Ops',
'description': 'Devops',
'org_name': 'Aaxus'
}
r = requests.post(target, data=json.dumps(data), headers=headers)
print(r.status_code, r.reason)
print(r.text)
print("######## Pass ########")
target = 'http://127.0.0.1:5000/group/manage'
headers = {'Content-type': 'application/json', 'Accept': 'text/plain', 'authorization': 'Bearer ' + token}
data = {
'org_name': 'Aaxus',
'id': 'Dev Ops',
'description': 'Developer Operations Organization',
'member_username': ['spiro@aaxus.com', 'anthony@aaxus.com', 'ben@aaxus.com'],
'admin_username': ['spiro@aaxus.com', 'anthony@aaxus.com']
}
r = requests.put(target, data=json.dumps(data), headers=headers)
print(r.status_code, r.reason)
print(r.text)
print("######## Pass ########")
target = 'http://127.0.0.1:5000/group/manage'
headers = {'Content-type': 'application/json', 'Accept': 'text/plain', 'authorization': 'Bearer ' + token}
data = {
'org_name': 'Aaxus',
'id': 'Dev Ops',
'remove_admin': ['spiro@aaxus.com'],
'remove_member': ['ben@aaxus.com']
}
r = requests.put(target, data=json.dumps(data), headers=headers)
print(r.status_code, r.reason)
print(r.text)
print("######## Pass ########")
target = 'http://127.0.0.1:5000/group/manage'
headers = {'Content-type': 'application/json', 'Accept': 'text/plain', 'authorization': 'Bearer ' + token}
data = {
'name': 'Executives',
'description': 'Devops',
'org_name': 'Aaxus'
}
r = requests.post(target, data=json.dumps(data), headers=headers)
print(r.status_code, r.reason)
print(r.text)
print("######## Pass ########")
target = 'http://127.0.0.1:5000/group/view'
headers = {'Content-type': 'application/json', 'Accept': 'text/plain', 'authorization': 'Bearer ' + token}
data = {
'org_name': 'Aaxus',
'id': 'Dev Ops',
}
r = requests.post(target, data=json.dumps(data), headers=headers)
print(r.status_code, r.reason)
print(r.text)
print("######## Pass ########")
target = 'http://127.0.0.1:5000/group/view?org_name=Aaxus'
headers = {'Content-type': 'application/json', 'Accept': 'text/plain', 'authorization': 'Bearer ' + token}
r = requests.get(target, headers=headers)
print(r.status_code, r.reason)
print(r.text)
| 33.05814
| 106
| 0.638762
| 378
| 2,843
| 4.753968
| 0.15873
| 0.046745
| 0.058431
| 0.074012
| 0.84808
| 0.84808
| 0.84808
| 0.812465
| 0.785754
| 0.785754
| 0
| 0.029107
| 0.117833
| 2,843
| 86
| 107
| 33.05814
| 0.6874
| 0
| 0
| 0.675325
| 0
| 0
| 0.432489
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.103896
| 0.025974
| 0
| 0.025974
| 0.285714
| 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
|
5980640bb02c2631ecc30d2c519d9ed76e0a3bab
| 2,422
|
py
|
Python
|
genomics_data_index/test/unit/variant/service/test_SQLQueryInBatcher.py
|
apetkau/genomics-data-index
|
d0cc119fd57b8cbd701affb1c84450cf7832fa01
|
[
"Apache-2.0"
] | 12
|
2021-05-03T20:56:05.000Z
|
2022-01-04T14:52:19.000Z
|
genomics_data_index/test/unit/variant/service/test_SQLQueryInBatcher.py
|
apetkau/thesis-index
|
6c96e9ed75d8e661437effe62a939727a0b473fc
|
[
"Apache-2.0"
] | 30
|
2021-04-26T23:03:40.000Z
|
2022-02-25T18:41:14.000Z
|
genomics_data_index/test/unit/variant/service/test_SQLQueryInBatcher.py
|
apetkau/genomics-data-index
|
d0cc119fd57b8cbd701affb1c84450cf7832fa01
|
[
"Apache-2.0"
] | null | null | null |
from genomics_data_index.storage.service import SQLQueryInBatcherDict, SQLQueryInBatcherList
def test_sql_query_in_batcher_dict():
in_data = ['A', 'B', 'C', 'D', 'E']
# Test batch size 1
batcher = SQLQueryInBatcherDict(in_data=in_data, batch_size=1)
results = batcher.process(lambda in_batch: {x: True for x in in_batch})
assert isinstance(results, dict)
assert 5 == len(results)
assert {'A', 'B', 'C', 'D', 'E'} == set(results.keys())
# Test batch size 2
batcher = SQLQueryInBatcherDict(in_data=in_data, batch_size=2)
results = batcher.process(lambda in_batch: {x: True for x in in_batch})
assert isinstance(results, dict)
assert 5 == len(results)
assert {'A', 'B', 'C', 'D', 'E'} == set(results.keys())
# Test batch size 5
batcher = SQLQueryInBatcherDict(in_data=in_data, batch_size=5)
results = batcher.process(lambda in_batch: {x: True for x in in_batch})
assert isinstance(results, dict)
assert 5 == len(results)
assert {'A', 'B', 'C', 'D', 'E'} == set(results.keys())
# Test batch size 6
batcher = SQLQueryInBatcherDict(in_data=in_data, batch_size=6)
results = batcher.process(lambda in_batch: {x: True for x in in_batch})
assert isinstance(results, dict)
assert 5 == len(results)
assert {'A', 'B', 'C', 'D', 'E'} == set(results.keys())
def test_sql_query_in_batcher_list():
in_data = ['A', 'B', 'C', 'D', 'E']
# Test batch size 1
batcher = SQLQueryInBatcherList(in_data=in_data, batch_size=1)
results = batcher.process(lambda in_batch: [x for x in in_batch])
assert isinstance(results, list)
assert 5 == len(results)
assert in_data == results
# Test batch size 2
batcher = SQLQueryInBatcherList(in_data=in_data, batch_size=2)
results = batcher.process(lambda in_batch: in_batch)
assert isinstance(results, list)
assert 5 == len(results)
assert in_data == results
# Test batch size 5
batcher = SQLQueryInBatcherList(in_data=in_data, batch_size=5)
results = batcher.process(lambda in_batch: in_batch)
assert isinstance(results, list)
assert 5 == len(results)
assert in_data == results
# Test batch size 6
batcher = SQLQueryInBatcherList(in_data=in_data, batch_size=6)
results = batcher.process(lambda in_batch: in_batch)
assert isinstance(results, list)
assert 5 == len(results)
assert in_data == results
| 36.69697
| 92
| 0.676301
| 345
| 2,422
| 4.57971
| 0.113043
| 0.083544
| 0.065823
| 0.060759
| 0.942405
| 0.938608
| 0.908228
| 0.908228
| 0.771519
| 0.771519
| 0
| 0.012327
| 0.196119
| 2,422
| 65
| 93
| 37.261538
| 0.799178
| 0.059042
| 0
| 0.733333
| 0
| 0
| 0.013216
| 0
| 0
| 0
| 0
| 0
| 0.533333
| 1
| 0.044444
| false
| 0
| 0.022222
| 0
| 0.066667
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
59c742adf96364dce950bb712608164f85d74648
| 3,548
|
py
|
Python
|
action_hero/__init__.py
|
sobolevn/action-hero
|
75ff10dc8b01ee8d00367c63e8eccbbee9cc7d42
|
[
"MIT"
] | 91
|
2019-09-26T20:55:55.000Z
|
2021-10-19T22:27:21.000Z
|
action_hero/__init__.py
|
kadimisetty/action-heroes
|
f203e2e130dce970db803d6447bf7518c5e54285
|
[
"MIT"
] | 1
|
2020-02-07T02:51:40.000Z
|
2020-02-07T02:51:40.000Z
|
action_hero/__init__.py
|
kadimisetty/action-heroes
|
f203e2e130dce970db803d6447bf7518c5e54285
|
[
"MIT"
] | 5
|
2020-02-02T03:40:47.000Z
|
2020-11-05T10:53:11.000Z
|
from action_hero.utils import PipelineAction, DebugAction
from action_hero.net import (
EmailIsValidAction,
IPIsValidIPAddressAction,
IPIsValidIPv4AddressAction,
IPIsValidIPv6AddressAction,
URLIsNotReachableAction,
URLIsReachableAction,
URLWithHTTPResponseStatusCodeAction,
)
from action_hero.path import (
DirectoryDoesNotExistAction,
DirectoryExistsAction,
DirectoryIsExecutableAction,
DirectoryIsNotExecutableAction,
DirectoryIsNotReadableAction,
DirectoryIsNotWritableAction,
DirectoryIsReadableAction,
DirectoryIsValidAction,
DirectoryIsWritableAction,
EnsureDirectoryAction,
EnsureFileAction,
FileDoesNotExistAction,
FileExistsAction,
FileHasExtensionAction,
FileIsEmptyAction,
FileIsExecutableAction,
FileIsNotEmptyAction,
FileIsNotExecutableAction,
FileIsNotReadableAction,
FileIsNotWritableAction,
FileIsReadableAction,
FileIsWritableAction,
PathDoesNotExistsAction,
PathExistsAction,
PathIsExecutableAction,
PathIsNotExecutableAction,
PathIsNotReadableAction,
PathIsNotWritableAction,
PathIsReadableAction,
PathIsValidAction,
PathIsWritableAction,
ResolvePathAction,
)
from action_hero.types import (
IsConvertibleToFloatAction,
IsConvertibleToIntAction,
IsConvertibleToUUIDAction,
IsFalsyAction,
IsTruthyAction,
)
from action_hero.misc import (
ChoicesAction,
CollectIntoDictAction,
CollectIntoListAction,
CollectIntoTupleAction,
ConfirmAction,
GetInputAction,
GetSecretInputAction,
LoadJSONFromFileAction,
LoadPickleFromFileAction,
LoadYAMLFromFileAction,
NotifyAndContinueAction,
NotifyAndExitAction,
)
__all__ = [
# utils
"PipelineAction",
"DebugAction",
# net & email
"EmailIsValidAction",
"IPIsValidIPAddressAction",
"IPIsValidIPv4AddressAction",
"IPIsValidIPv6AddressAction",
"URLIsNotReachableAction",
"URLIsReachableAction",
"URLWithHTTPResponseStatusCodeAction",
# path
"DirectoryDoesNotExistAction",
"DirectoryExistsAction",
"DirectoryIsExecutableAction",
"DirectoryIsNotExecutableAction",
"DirectoryIsNotReadableAction",
"DirectoryIsNotWritableAction",
"DirectoryIsReadableAction",
"DirectoryIsValidAction",
"DirectoryIsWritableAction",
"EnsureDirectoryAction",
"EnsureFileAction",
"FileDoesNotExistAction",
"FileExistsAction",
"FileHasExtensionAction",
"FileIsEmptyAction",
"FileIsExecutableAction",
"FileIsNotEmptyAction",
"FileIsNotExecutableAction",
"FileIsNotReadableAction",
"FileIsNotWritableAction",
"FileIsReadableAction",
"FileIsValidAction",
"FileIsWritableAction",
"PathDoesNotExistsAction",
"PathExistsAction",
"PathIsExecutableAction",
"PathIsNotExecutableAction",
"PathIsNotReadableAction",
"PathIsNotWritableAction",
"PathIsReadableAction",
"PathIsValidAction",
"PathIsWritableAction",
"ResolvePathAction",
# types
"IsConvertibleToFloatAction",
"IsConvertibleToIntAction",
"IsConvertibleToUUIDAction",
"IsFalsyAction",
"IsTruthyAction",
# misc
"ChoicesAction",
"CollectIntoDictAction",
"CollectIntoListAction",
"CollectIntoTupleAction",
"ConfirmAction",
"GetInputAction",
"GetSecretInputAction",
"LoadJSONFromFileAction",
"LoadPickleFromFileAction",
"LoadYAMLFromFileAction",
"NotifyAndContinueAction",
"NotifyAndExitAction",
]
| 26.477612
| 57
| 0.748027
| 149
| 3,548
| 17.751678
| 0.469799
| 0.018904
| 0.026465
| 0.071078
| 0.917958
| 0.840832
| 0.840832
| 0.710775
| 0.710775
| 0.710775
| 0
| 0.001375
| 0.17982
| 3,548
| 133
| 58
| 26.676692
| 0.90756
| 0.009301
| 0
| 0
| 0
| 0
| 0.357937
| 0.248219
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.039683
| 0
| 0.039683
| 0
| 0
| 0
| 1
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
59d7bc70d0cd6ce2ad0e48f732a97f7f77c87753
| 476
|
py
|
Python
|
mongo_test/utils/dal/__init__.py
|
Vuong02011996/data_base_test
|
a57940970ce52a25e10f2262fb94530b1ae2681c
|
[
"MIT"
] | null | null | null |
mongo_test/utils/dal/__init__.py
|
Vuong02011996/data_base_test
|
a57940970ce52a25e10f2262fb94530b1ae2681c
|
[
"MIT"
] | null | null | null |
mongo_test/utils/dal/__init__.py
|
Vuong02011996/data_base_test
|
a57940970ce52a25e10f2262fb94530b1ae2681c
|
[
"MIT"
] | null | null | null |
from mongo_test.utils.dal.identity_dal import *
from mongo_test.utils.dal.object_dal import *
from mongo_test.utils.dal.detection_dal import *
from mongo_test.utils.dal.user_dal import *
from mongo_test.utils.dal.process_dal import *
from mongo_test.utils.dal.camera_dal import *
from mongo_test.utils.dal.logger_dal import *
from mongo_test.utils.dal.cluster_dal import *
from mongo_test.utils.dal.cluster_element_dal import *
from mongo_test.utils.dal.parameter_dal import *
| 47.6
| 54
| 0.834034
| 81
| 476
| 4.641975
| 0.197531
| 0.239362
| 0.345745
| 0.478723
| 0.81117
| 0.755319
| 0.755319
| 0.196809
| 0
| 0
| 0
| 0
| 0.081933
| 476
| 10
| 55
| 47.6
| 0.860412
| 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
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 9
|
ab8027d182e0e15b016e3b8845f76c6510fbe065
| 296,545
|
bzl
|
Python
|
obj/.cache/build/azfkn5bh.4tg/cuwh0ddu.bzl
|
Kvble/sorting-visualizer
|
e5c3fc04c4fc342d673140817713540909fd7e7a
|
[
"MIT"
] | 2
|
2021-12-03T21:43:39.000Z
|
2021-12-24T13:29:11.000Z
|
obj/.cache/build/azfkn5bh.4tg/cuwh0ddu.bzl
|
Kvble/sorting-visualizer
|
e5c3fc04c4fc342d673140817713540909fd7e7a
|
[
"MIT"
] | null | null | null |
obj/.cache/build/azfkn5bh.4tg/cuwh0ddu.bzl
|
Kvble/sorting-visualizer
|
e5c3fc04c4fc342d673140817713540909fd7e7a
|
[
"MIT"
] | null | null | null |
{"Item1":[{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.yml"},"to":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.yml"},"to":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/LICENSE.md"},"to":{"sourceType":"file","value":"~/toc.yml"},"reportedBy":{"sourceType":"file","value":"~/toc.yml"},"type":"metadata"},{"from":{"sourceType":"file","value":"~/articles/intro.md"},"to":{"sourceType":"file","value":"~/articles/toc.md"},"reportedBy":{"sourceType":"file","value":"~/articles/toc.md"},"type":"metadata"},{"from":{"sourceType":"file","value":"~/index.md"},"to":{"sourceType":"file","value":"~/toc.yml"},"reportedBy":{"sourceType":"file","value":"~/toc.yml"},"type":"metadata"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.yml"},"to":{"sourceType":"file","value":"~/obj/api/toc.yml"},"reportedBy":{"sourceType":"file","value":"~/obj/api/toc.yml"},"type":"metadata"},{"from":{"sourceType":"file","value":"~/api/index.md"},"to":{"sourceType":"file","value":"~/obj/api/toc.yml"},"reportedBy":{"sourceType":"file","value":"~/obj/api/toc.yml"},"type":"metadata"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"file","value":"~/obj/api/toc.yml"},"reportedBy":{"sourceType":"file","value":"~/obj/api/toc.yml"},"type":"metadata"},{"from":{"sourceType":"file","value":"~/README.md"},"to":{"sourceType":"file","value":"~/toc.yml"},"reportedBy":{"sourceType":"file","value":"~/toc.yml"},"type":"metadata"},{"from":{"sourceType":"file","value":"~/articles/toc.md"},"to":{"sourceType":"file","value":"~/toc.yml"},"reportedBy":{"sourceType":"file","value":"~/toc.yml"},"type":"metadata"},{"from":{"sourceType":"file","value":"~/obj/api/toc.yml"},"to":{"sourceType":"file","value":"~/toc.yml"},"reportedBy":{"sourceType":"file","value":"~/toc.yml"},"type":"metadata"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.SetVisibleCore(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Activate"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ActivateMdiChild(System.Windows.Forms.Form)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AddOwnedForm(System.Windows.Forms.Form)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AdjustFormScrollbars(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Close"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.CreateControlsInstance"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.CreateHandle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DefWndProc(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ProcessMnemonic(System.Char)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.CenterToParent"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.CenterToScreen"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.LayoutMdi(System.Windows.Forms.MdiLayout)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnActivated(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnBackgroundImageChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnBackgroundImageLayoutChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnClosing(System.ComponentModel.CancelEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnClosed(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnFormClosing(System.Windows.Forms.FormClosingEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnFormClosed(System.Windows.Forms.FormClosedEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnCreateControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnDeactivate(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnEnabledChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnEnter(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnFontChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnHandleCreated(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnHandleDestroyed(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnHelpButtonClicked(System.ComponentModel.CancelEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnLayout(System.Windows.Forms.LayoutEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnLoad(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnMaximizedBoundsChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnMaximumSizeChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnMinimumSizeChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnInputLanguageChanged(System.Windows.Forms.InputLanguageChangedEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnInputLanguageChanging(System.Windows.Forms.InputLanguageChangingEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnVisibleChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnMdiChildActivate(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnMenuStart(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnMenuComplete(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnPaint(System.Windows.Forms.PaintEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnResize(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnDpiChanged(System.Windows.Forms.DpiChangedEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnGetDpiScaledSize(System.Int32,System.Int32,System.Drawing.Size@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnRightToLeftLayoutChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnShown(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnTextChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ProcessCmdKey(System.Windows.Forms.Message@,System.Windows.Forms.Keys)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ProcessDialogKey(System.Windows.Forms.Keys)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ProcessDialogChar(System.Char)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ProcessKeyPreview(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ProcessTabKey(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.RemoveOwnedForm(System.Windows.Forms.Form)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Select(System.Boolean,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.GetScaledBounds(System.Drawing.Rectangle,System.Drawing.SizeF,System.Windows.Forms.BoundsSpecified)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ScaleControl(System.Drawing.SizeF,System.Windows.Forms.BoundsSpecified)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.SetBoundsCore(System.Int32,System.Int32,System.Int32,System.Int32,System.Windows.Forms.BoundsSpecified)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.SetClientSizeCore(System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.SetDesktopBounds(System.Int32,System.Int32,System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.SetDesktopLocation(System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Show(System.Windows.Forms.IWin32Window)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ShowDialog"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ToString"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.UpdateDefaultButton"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnResizeBegin(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnResizeEnd(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnStyleChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ValidateChildren"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ValidateChildren(System.Windows.Forms.ValidationConstraints)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AcceptButton"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ActiveForm"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ActiveMdiChild"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AllowTransparency"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AutoScroll"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AutoSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AutoSizeMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AutoValidate"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.BackColor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.FormBorderStyle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.CancelButton"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ClientSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ControlBox"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.CreateParams"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DefaultImeMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DefaultSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DesktopBounds"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DesktopLocation"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DialogResult"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.HelpButton"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Icon"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.IsMdiChild"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.IsMdiContainer"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.IsRestrictedWindow"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.KeyPreview"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Location"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MaximizedBounds"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MaximumSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MainMenuStrip"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Menu"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MinimumSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MaximizeBox"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MdiChildren"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MdiParent"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MergedMenu"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MinimizeBox"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Modal"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Opacity"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OwnedForms"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Owner"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.RestoreBounds"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.RightToLeftLayout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ShowInTaskbar"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ShowIcon"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ShowWithoutActivation"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Size"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.SizeGripStyle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.StartPosition"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Text"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.TopLevel"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.TopMost"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.TransparencyKey"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.WindowState"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AutoSizeChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AutoValidateChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.HelpButtonClicked"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MaximizedBoundsChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MaximumSizeChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MinimumSizeChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Activated"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Deactivate"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.FormClosing"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.FormClosed"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Load"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MdiChildActivate"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MenuComplete"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MenuStart"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.InputLanguageChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.InputLanguageChanging"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.RightToLeftLayoutChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Shown"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DpiChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ResizeBegin"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ResizeEnd"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.System#Windows#Forms#IContainerControl#ActivateControl(System.Windows.Forms.Control)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.OnAutoValidateChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.OnParentChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.PerformAutoScale"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.Validate"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.Validate(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.AutoScaleDimensions"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.AutoScaleFactor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.AutoScaleMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.BindingContext"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.CanEnableIme"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.ActiveControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.CurrentAutoScaleDimensions"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.ParentForm"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollStateAutoScrolling"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollStateHScrollVisible"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollStateVScrollVisible"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollStateUserHasScrolled"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollStateFullDrag"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.GetScrollState(System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.OnMouseWheel(System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.OnRightToLeftChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.OnPaintBackground(System.Windows.Forms.PaintEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.OnPaddingChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.SetDisplayRectLocation(System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollControlIntoView(System.Windows.Forms.Control)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollToControl(System.Windows.Forms.Control)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.OnScroll(System.Windows.Forms.ScrollEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.SetAutoScrollMargin(System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.SetScrollState(System.Int32,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.AutoScrollMargin"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.AutoScrollPosition"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.AutoScrollMinSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.DisplayRectangle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.HScroll"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.HorizontalScroll"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.VScroll"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.VerticalScroll"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.Scroll"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetAccessibilityObjectById(System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SetAutoSizeMode(System.Windows.Forms.AutoSizeMode)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetAutoSizeMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetPreferredSize(System.Drawing.Size)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibilityNotifyClients(System.Windows.Forms.AccessibleEvents,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibilityNotifyClients(System.Windows.Forms.AccessibleEvents,System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BeginInvoke(System.Delegate)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BeginInvoke(System.Delegate,System.Object[])"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BringToFront"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Contains(System.Windows.Forms.Control)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CreateAccessibilityInstance"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CreateGraphics"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CreateControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DestroyHandle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DoDragDrop(System.Object,System.Windows.Forms.DragDropEffects)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DrawToBitmap(System.Drawing.Bitmap,System.Drawing.Rectangle)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.EndInvoke(System.IAsyncResult)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.FindForm"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetTopLevel"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RaiseKeyEvent(System.Object,System.Windows.Forms.KeyEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RaiseMouseEvent(System.Object,System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Focus"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.FromChildHandle(System.IntPtr)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.FromHandle(System.IntPtr)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetChildAtPoint(System.Drawing.Point,System.Windows.Forms.GetChildAtPointSkip)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetChildAtPoint(System.Drawing.Point)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetContainerControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetNextControl(System.Windows.Forms.Control,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetStyle(System.Windows.Forms.ControlStyles)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Hide"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InitLayout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidate(System.Drawing.Region)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidate(System.Drawing.Region,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidate"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidate(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidate(System.Drawing.Rectangle)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidate(System.Drawing.Rectangle,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invoke(System.Delegate)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invoke(System.Delegate,System.Object[])"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InvokePaint(System.Windows.Forms.Control,System.Windows.Forms.PaintEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InvokePaintBackground(System.Windows.Forms.Control,System.Windows.Forms.PaintEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsKeyLocked(System.Windows.Forms.Keys)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsInputChar(System.Char)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsInputKey(System.Windows.Forms.Keys)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsMnemonic(System.Char,System.String)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.LogicalToDeviceUnits(System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.LogicalToDeviceUnits(System.Drawing.Size)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ScaleBitmapLogicalToDevice(System.Drawing.Bitmap@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.NotifyInvalidate(System.Drawing.Rectangle)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InvokeOnClick(System.Windows.Forms.Control,System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnAutoSizeChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnBackColorChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnBindingContextChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnCausesValidationChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnContextMenuChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnContextMenuStripChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnCursorChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDockChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnForeColorChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnNotifyMessage(System.Windows.Forms.Message)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentBackColorChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentBackgroundImageChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentBindingContextChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentCursorChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentEnabledChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentFontChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentForeColorChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentRightToLeftChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentVisibleChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnPrint(System.Windows.Forms.PaintEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnTabIndexChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnTabStopChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnClick(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnClientSizeChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnControlAdded(System.Windows.Forms.ControlEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnControlRemoved(System.Windows.Forms.ControlEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnLocationChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDoubleClick(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDragEnter(System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDragOver(System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDragLeave(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDragDrop(System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnGiveFeedback(System.Windows.Forms.GiveFeedbackEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InvokeGotFocus(System.Windows.Forms.Control,System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnGotFocus(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnHelpRequested(System.Windows.Forms.HelpEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnInvalidated(System.Windows.Forms.InvalidateEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnKeyDown(System.Windows.Forms.KeyEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnKeyPress(System.Windows.Forms.KeyPressEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnKeyUp(System.Windows.Forms.KeyEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnLeave(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InvokeLostFocus(System.Windows.Forms.Control,System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnLostFocus(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMarginChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseDoubleClick(System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseClick(System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseCaptureChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseDown(System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseEnter(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseLeave(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDpiChangedBeforeParent(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDpiChangedAfterParent(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseHover(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseMove(System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseUp(System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMove(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnQueryContinueDrag(System.Windows.Forms.QueryContinueDragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnRegionChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnPreviewKeyDown(System.Windows.Forms.PreviewKeyDownEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnSizeChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnChangeUICues(System.Windows.Forms.UICuesEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnSystemColorsChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnValidating(System.ComponentModel.CancelEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnValidated(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RescaleConstantsForDpi(System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PerformLayout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PerformLayout(System.Windows.Forms.Control,System.String)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PointToClient(System.Drawing.Point)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PointToScreen(System.Drawing.Point)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PreProcessMessage(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PreProcessControlMessage(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ProcessKeyEventArgs(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ProcessKeyMessage(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RaiseDragEvent(System.Object,System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RaisePaintEvent(System.Object,System.Windows.Forms.PaintEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RecreateHandle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RectangleToClient(System.Drawing.Rectangle)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RectangleToScreen(System.Drawing.Rectangle)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ReflectMessage(System.IntPtr,System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Refresh"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ResetMouseEventArgs"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ResetText"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ResumeLayout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ResumeLayout(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Scale(System.Drawing.SizeF)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Select"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SelectNextControl(System.Windows.Forms.Control,System.Boolean,System.Boolean,System.Boolean,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SendToBack"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SetBounds(System.Int32,System.Int32,System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SetBounds(System.Int32,System.Int32,System.Int32,System.Int32,System.Windows.Forms.BoundsSpecified)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SizeFromClientSize(System.Drawing.Size)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SetStyle(System.Windows.Forms.ControlStyles,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SetTopLevel(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RtlTranslateAlignment(System.Windows.Forms.HorizontalAlignment)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RtlTranslateAlignment(System.Windows.Forms.LeftRightAlignment)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RtlTranslateAlignment(System.Drawing.ContentAlignment)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RtlTranslateHorizontal(System.Windows.Forms.HorizontalAlignment)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RtlTranslateLeftRight(System.Windows.Forms.LeftRightAlignment)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RtlTranslateContent(System.Drawing.ContentAlignment)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Show"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SuspendLayout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Update"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.UpdateBounds"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.UpdateBounds(System.Int32,System.Int32,System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.UpdateBounds(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.UpdateZOrder"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.UpdateStyles"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.System#Windows#Forms#IDropTarget#OnDragEnter(System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.System#Windows#Forms#IDropTarget#OnDragOver(System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.System#Windows#Forms#IDropTarget#OnDragLeave(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.System#Windows#Forms#IDropTarget#OnDragDrop(System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnImeModeChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibilityObject"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibleDefaultActionDescription"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibleDescription"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibleName"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibleRole"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AllowDrop"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Anchor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AutoScrollOffset"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.LayoutEngine"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BackgroundImage"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BackgroundImageLayout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Bottom"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Bounds"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CanFocus"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CanRaiseEvents"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CanSelect"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Capture"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CausesValidation"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ClientRectangle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CompanyName"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ContainsFocus"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ContextMenu"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ContextMenuStrip"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Controls"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Created"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Cursor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DataBindings"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultBackColor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultCursor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultFont"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultForeColor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultMargin"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultMaximumSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultMinimumSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultPadding"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DeviceDpi"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsDisposed"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Disposing"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Dock"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DoubleBuffered"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Enabled"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Focused"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Font"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.FontHeight"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ForeColor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Handle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.HasChildren"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Height"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsHandleCreated"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InvokeRequired"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsAccessible"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsMirrored"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Left"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Margin"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ModifierKeys"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseButtons"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MousePosition"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Name"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Parent"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ProductName"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ProductVersion"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RecreatingHandle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Region"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RenderRightToLeft"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ResizeRedraw"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Right"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RightToLeft"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ScaleChildren"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Site"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.TabIndex"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.TabStop"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Tag"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Top"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.TopLevelControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ShowKeyboardCues"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ShowFocusCues"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.UseWaitCursor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Visible"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Width"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PreferredSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Padding"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ImeMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ImeModeBase"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PropagatingImeMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BackColorChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BackgroundImageChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BackgroundImageLayoutChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BindingContextChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CausesValidationChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ClientSizeChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ContextMenuChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ContextMenuStripChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CursorChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DockChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.EnabledChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.FontChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ForeColorChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.LocationChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MarginChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RegionChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RightToLeftChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SizeChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.TabIndexChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.TabStopChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.TextChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.VisibleChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Click"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ControlAdded"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ControlRemoved"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DragDrop"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DragEnter"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DragOver"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DragLeave"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GiveFeedback"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.HandleCreated"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.HandleDestroyed"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.HelpRequested"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidated"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PaddingChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Paint"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.QueryContinueDrag"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.QueryAccessibilityHelp"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DoubleClick"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Enter"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GotFocus"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.KeyDown"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.KeyPress"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.KeyUp"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Layout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Leave"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.LostFocus"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseClick"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseDoubleClick"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseCaptureChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseDown"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseEnter"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseLeave"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DpiChangedBeforeParent"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DpiChangedAfterParent"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseHover"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseMove"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseUp"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseWheel"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Move"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PreviewKeyDown"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Resize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ChangeUICues"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.StyleChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SystemColorsChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Validating"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Validated"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ParentChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ImeModeChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component.Dispose"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component.GetService(System.Type)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component.Events"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component.Container"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component.DesignMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component.Disposed"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.MarshalByRefObject.MemberwiseClone(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.MarshalByRefObject.GetLifetimeService"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.MarshalByRefObject.InitializeLifetimeService"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.MarshalByRefObject.CreateObjRef(System.Type)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object.Equals(System.Object)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object.Equals(System.Object,System.Object)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object.ReferenceEquals(System.Object,System.Object)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object.GetHashCode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object.GetType"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object.MemberwiseClone"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"children"},{"from":{"sourceType":"file","value":"~/toc.yml"},"to":{"sourceType":"file","value":"~/articles/intro.md"},"reportedBy":{"sourceType":"file","value":"~/toc.yml"},"type":"file"},{"from":{"sourceType":"file","value":"~/toc.yml"},"to":{"sourceType":"file","value":"~/api/index.md"},"reportedBy":{"sourceType":"file","value":"~/toc.yml"},"type":"file"},{"from":{"sourceType":"file","value":"~/articles/toc.md"},"to":{"sourceType":"file","value":"~/articles/intro.md"},"reportedBy":{"sourceType":"file","value":"~/articles/toc.md"},"type":"file"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InvokeRequired"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetChildAtPoint(System.Drawing.Point)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ResetText"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.ParentForm"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.HandleCreated"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnMenuComplete(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidate(System.Drawing.Region)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Text"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnPreviewKeyDown(System.Windows.Forms.PreviewKeyDownEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ImeMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RenderRightToLeft"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BackgroundImageLayout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DefaultSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.CreateHandle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.MarshalByRefObject.MemberwiseClone(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ResizeEnd"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ShowFocusCues"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentForeColorChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseDoubleClick"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Random"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentRightToLeftChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Validated"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ActiveForm"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ControlRemoved"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnGiveFeedback(System.Windows.Forms.GiveFeedbackEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.NotifyInvalidate(System.Drawing.Rectangle)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ContainsFocus"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetChildAtPoint(System.Drawing.Point,System.Windows.Forms.GetChildAtPointSkip)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.FontHeight"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentBackColorChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.OnScroll(System.Windows.Forms.ScrollEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Controls"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DialogResult"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentVisibleChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.EnabledChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.LogicalToDeviceUnits(System.Drawing.Size)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ForeColor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AutoSizeChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.CanEnableIme"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ClientSizeChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MinimumSizeChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ForeColorChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseDown"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsDisposed"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PaddingChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DpiChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DesktopLocation"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Height"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnTabIndexChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseUp"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.UpdateDefaultButton"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnResizeBegin(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.MarshalByRefObject"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.IsMdiChild"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Select"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.OnParentChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component.Container"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AllowTransparency"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Scale(System.Drawing.SizeF)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.RightToLeftLayoutChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MaximumSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component.Events"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.System#Windows#Forms#IDropTarget#OnDragDrop(System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AutoSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.KeyUp"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ProcessKeyPreview(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ProcessCmdKey(System.Windows.Forms.Message@,System.Windows.Forms.Keys)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnClosed(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.IsMdiContainer"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnGetDpiScaledSize(System.Int32,System.Int32,System.Drawing.Size@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.FormClosing"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMove(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.BindingContext"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnSizeChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.FromHandle(System.IntPtr)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnContextMenuStripChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnResizeEnd(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.OnRightToLeftChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ValidateChildren"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.SetDisplayRectLocation(System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnShown(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDockChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.AutoScaleFactor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.GetScaledBounds(System.Drawing.Rectangle,System.Drawing.SizeF,System.Windows.Forms.BoundsSpecified)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Size"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.SetVisibleCore(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnInputLanguageChanging(System.Windows.Forms.InputLanguageChangingEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Location"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnCreateControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object.Equals(System.Object,System.Object)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CreateAccessibilityInstance"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnRightToLeftLayoutChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.IContainerControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object.ReferenceEquals(System.Object,System.Object)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.System#Windows#Forms#IDropTarget#OnDragOver(System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ProductName"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.OnPaddingChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.HandleDestroyed"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.DisplayRectangle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnTabStopChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibilityNotifyClients(System.Windows.Forms.AccessibleEvents,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DeviceDpi"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Focus"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.yml"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.AutoScrollPosition"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Close"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RtlTranslateAlignment(System.Windows.Forms.LeftRightAlignment)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnBindingContextChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.EndInvoke(System.IAsyncResult)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentFontChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SetTopLevel(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidate(System.Drawing.Rectangle,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DataBindings"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseEnter(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.StyleChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Activated"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.BackColor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibleName"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.AutoScaleMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RtlTranslateAlignment(System.Drawing.ContentAlignment)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object.Equals(System.Object)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CanSelect"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CursorChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CreateControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Layout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.AutoScrollMargin"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Padding"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.TabIndex"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnLocationChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object.GetHashCode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultCursor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.HasChildren"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseMove"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollControlIntoView(System.Windows.Forms.Control)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.UpdateBounds(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.KeyPreview"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnAutoSizeChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.CancelButton"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnLoad(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Dispose(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MergedMenu"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AutoScroll"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DpiChangedBeforeParent"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnMaximizedBoundsChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ContextMenuStripChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Int32"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DoubleClick"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CausesValidationChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.OnAutoValidateChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ShowWithoutActivation"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.LostFocus"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InitLayout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DefWndProc(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.KeyDown"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.System#Windows#Forms#IContainerControl#ActivateControl(System.Windows.Forms.Control)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CanFocus"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnHelpRequested(System.Windows.Forms.HelpEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.IComponent"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDragDrop(System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnActivated(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollStateVScrollVisible"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetAutoSizeMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Resize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Enabled"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Margin"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CausesValidation"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PreviewKeyDown"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RaiseKeyEvent(System.Object,System.Windows.Forms.KeyEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.FromChildHandle(System.IntPtr)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.HelpButtonClicked"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.System#Windows#Forms#IDropTarget#OnDragEnter(System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseCaptureChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Cursor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.LocationChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseClick"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnControlAdded(System.Windows.Forms.ControlEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Hide"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.SetScrollState(System.Int32,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BackColorChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InvokePaint(System.Windows.Forms.Control,System.Windows.Forms.PaintEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PointToScreen(System.Drawing.Point)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ContextMenu"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RtlTranslateAlignment(System.Windows.Forms.HorizontalAlignment)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetStyle(System.Windows.Forms.ControlStyles)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DockChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RecreateHandle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AutoValidateChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseClick(System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Show(System.Windows.Forms.IWin32Window)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.RemoveOwnedForm(System.Windows.Forms.Form)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PointToClient(System.Drawing.Point)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RecreatingHandle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ScaleBitmapLogicalToDevice(System.Drawing.Bitmap@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.LayoutMdi(System.Windows.Forms.MdiLayout)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.IDisposable"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultBackColor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.VerticalScroll"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ValidateChildren(System.Windows.Forms.ValidationConstraints)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnDeactivate(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultMaximumSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.Scroll"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Menu"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Bottom"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Click"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RescaleConstantsForDpi(System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.VisibleChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MousePosition"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Focused"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.Validate(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnMaximumSizeChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.FormClosed"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.LogicalToDeviceUnits(System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.MarshalByRefObject.GetLifetimeService"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Tag"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnMinimumSizeChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollToControl(System.Windows.Forms.Control)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.HelpButton"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ActivateMdiChild(System.Windows.Forms.Form)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseLeave(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnFormClosed(System.Windows.Forms.FormClosedEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PreProcessControlMessage(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnHandleCreated(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Font"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.CreateParams"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BeginInvoke(System.Delegate)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Capture"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.CurrentAutoScaleDimensions"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.HScroll"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Created"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DragLeave"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnRegionChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidate(System.Drawing.Region,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentBindingContextChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ScaleControl(System.Drawing.SizeF,System.Windows.Forms.BoundsSpecified)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PerformLayout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Width"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.IBindableComponent"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Contains(System.Windows.Forms.Control)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.FindForm"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollStateFullDrag"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Handle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GotFocus"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DefaultImeMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AutoSizeMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.AutoScaleDimensions"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.TopLevelControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RightToLeft"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DrawToBitmap(System.Drawing.Bitmap,System.Drawing.Rectangle)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsKeyLocked(System.Windows.Forms.Keys)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetPreferredSize(System.Drawing.Size)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BringToFront"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DragEnter"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SelectNextControl(System.Windows.Forms.Control,System.Boolean,System.Boolean,System.Boolean,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetAccessibilityObjectById(System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RegionChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.UseWaitCursor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Dock"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnInvalidated(System.Windows.Forms.InvalidateEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.RightToLeftLayout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.InputLanguageChanging"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component.GetService(System.Type)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibilityNotifyClients(System.Windows.Forms.AccessibleEvents,System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnContextMenuChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.HelpRequested"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BackgroundImageLayoutChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BackgroundImageChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDragEnter(System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ClientRectangle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultMargin"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DestroyHandle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultFont"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsMnemonic(System.Char,System.String)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnSystemColorsChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ImeModeChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ActiveMdiChild"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ClientSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.QueryContinueDrag"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibilityObject"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DoDragDrop(System.Object,System.Windows.Forms.DragDropEffects)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnForeColorChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnValidating(System.ComponentModel.CancelEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Bounds"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollStateAutoScrolling"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetTopLevel"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ChangeUICues"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnHandleDestroyed(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDpiChangedAfterParent(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseEnter"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MainMenuStrip"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.DesktopBounds"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibleDescription"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Enter"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDragOver(System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnPrint(System.Windows.Forms.PaintEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invoke(System.Delegate)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component.Dispose"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SetStyle(System.Windows.Forms.ControlStyles,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ResumeLayout(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseHover"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ResizeBegin"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.EventArgs"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SuspendLayout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AllowDrop"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SizeFromClientSize(System.Drawing.Size)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Select(System.Boolean,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ContextMenuChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ProductVersion"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component.DesignMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnKeyUp(System.Windows.Forms.KeyEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Region"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.ActiveControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Opacity"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ProcessDialogKey(System.Windows.Forms.Keys)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnVisibleChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.TabStopChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.GetScrollState(System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ControlBox"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SetBounds(System.Int32,System.Int32,System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnBackgroundImageLayoutChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.TabIndexChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnLeave(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MarginChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.SetAutoScrollMargin(System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.SetBoundsCore(System.Int32,System.Int32,System.Int32,System.Int32,System.Windows.Forms.BoundsSpecified)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MdiChildren"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnEnabledChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.UpdateBounds(System.Int32,System.Int32,System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnControlRemoved(System.Windows.Forms.ControlEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RtlTranslateHorizontal(System.Windows.Forms.HorizontalAlignment)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MaximizedBounds"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnLayout(System.Windows.Forms.LayoutEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AddOwnedForm(System.Windows.Forms.Form)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseMove(System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidate"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PreferredSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollStateHScrollVisible"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PerformLayout(System.Windows.Forms.Control,System.String)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.OnMouseWheel(System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnClick(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ShowIcon"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsInputChar(System.Char)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseLeave"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.CreateControlsInstance"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnCursorChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DragDrop"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetContainerControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnEnter(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Deactivate"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultMinimumSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnKeyPress(System.Windows.Forms.KeyPressEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ProcessMnemonic(System.Char)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ImeModeBase"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.KeyPress"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AutoValidate"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ProcessKeyEventArgs(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.MarshalByRefObject.InitializeLifetimeService"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.UpdateBounds"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseDown(System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnBackgroundImageChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RtlTranslateContent(System.Drawing.ContentAlignment)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsInputKey(System.Windows.Forms.Keys)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnFontChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnGotFocus(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Refresh"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.RestoreBounds"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Disposing"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DragOver"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultPadding"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.SetDesktopBounds(System.Int32,System.Int32,System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Boolean"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Top"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.FormBorderStyle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibleDefaultActionDescription"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InvokeLostFocus(System.Windows.Forms.Control,System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Parent"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Validating"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.Validate"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Move"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MaximizedBoundsChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.SetClientSizeCore(System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.QueryAccessibilityHelp"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnClientSizeChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MenuStart"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Paint"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDoubleClick(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SetAutoSizeMode(System.Windows.Forms.AutoSizeMode)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RectangleToScreen(System.Drawing.Rectangle)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Modal"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ControlAdded"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RaiseMouseEvent(System.Object,System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnValidated(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidate(System.Drawing.Rectangle)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MaximumSizeChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.IWin32Window"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnImeModeChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AccessibleRole"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.SetDesktopLocation(System.Int32,System.Int32)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invoke(System.Delegate,System.Object[])"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ResetMouseEventArgs"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.SizeGripStyle"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.ISynchronizeInvoke"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InvokeGotFocus(System.Windows.Forms.Control,System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDragLeave(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.FontChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ShowDialog"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnLostFocus(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidate(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CanRaiseEvents"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GetNextControl(System.Windows.Forms.Control,System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnDpiChanged(System.Windows.Forms.DpiChangedEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentCursorChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.UpdateZOrder"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnKeyDown(System.Windows.Forms.KeyEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.IDropTarget"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ToString"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RightToLeftChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnPaint(System.Windows.Forms.PaintEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MenuComplete"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.IsRestrictedWindow"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.MarshalByRefObject.CreateObjRef(System.Type)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ResizeRedraw"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.ComponentModel.Component.Disposed"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BeginInvoke(System.Delegate,System.Object[])"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Show"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OwnedForms"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.StartPosition"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseCaptureChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object.MemberwiseClone"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Icon"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Site"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.TransparencyKey"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Right"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnStyleChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.UpdateStyles"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.CenterToScreen"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MdiParent"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.TextChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Object.GetType"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Activate"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseButtons"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DefaultForeColor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RaisePaintEvent(System.Object,System.Windows.Forms.PaintEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.LayoutEngine"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.CenterToParent"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.VScroll"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Anchor"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.HorizontalScroll"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.AutoScrollMinSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MinimumSize"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.TabStop"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Left"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnMenuStart(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.InputLanguageChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseHover(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PropagatingImeMode"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.PreProcessMessage(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DoubleBuffered"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RectangleToClient(System.Drawing.Rectangle)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ProcessTabKey(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ResumeLayout"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnBackColorChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ParentChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Update"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnNotifyMessage(System.Windows.Forms.Message)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ContainerControl.PerformAutoScale"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SendToBack"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Leave"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsMirrored"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CreateGraphics"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MdiChildActivate"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Shown"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AcceptButton"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RtlTranslateLeftRight(System.Windows.Forms.LeftRightAlignment)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InvokeOnClick(System.Windows.Forms.Control,System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnFormClosing(System.Windows.Forms.FormClosingEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnInputLanguageChanged(System.Windows.Forms.InputLanguageChangedEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.CompanyName"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseDoubleClick(System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnDpiChangedBeforeParent(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMarginChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.DpiChangedAfterParent"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsHandleCreated"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.IsAccessible"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnHelpButtonClicked(System.ComponentModel.CancelEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentBackgroundImageChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.InvokePaintBackground(System.Windows.Forms.Control,System.Windows.Forms.PaintEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Invalidated"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnCausesValidationChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.GiveFeedback"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnChangeUICues(System.Windows.Forms.UICuesEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ScaleChildren"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.ScrollStateUserHasScrolled"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnParentEnabledChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SizeChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.MouseWheel"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MaximizeBox"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Owner"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SetBounds(System.Int32,System.Int32,System.Int32,System.Int32,System.Windows.Forms.BoundsSpecified)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Visible"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.TopMost"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BindingContextChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnQueryContinueDrag(System.Windows.Forms.QueryContinueDragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnTextChanged(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnResize(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.BackgroundImage"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ProcessDialogChar(System.Char)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnClosing(System.ComponentModel.CancelEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ProcessKeyMessage(System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.Name"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.ShowInTaskbar"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.TopLevel"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ModifierKeys"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.ScrollableControl.OnPaintBackground(System.Windows.Forms.PaintEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.WindowState"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.MinimizeBox"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.System#Windows#Forms#IDropTarget#OnDragLeave(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.RaiseDragEvent(System.Object,System.Windows.Forms.DragEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.OnMouseUp(System.Windows.Forms.MouseEventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.Load"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ReflectMessage(System.IntPtr,System.Windows.Forms.Message@)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.OnMdiChildActivate(System.EventArgs)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Form.AdjustFormScrollbars(System.Boolean)"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.SystemColorsChanged"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ShowKeyboardCues"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.AutoScrollOffset"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"to":{"sourceType":"uid","value":"System.Windows.Forms.Control.ContextMenuStrip"},"reportedBy":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/toc.yml"},"to":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.yml"},"reportedBy":{"sourceType":"file","value":"~/obj/api/toc.yml"},"type":"uid"},{"from":{"sourceType":"file","value":"~/obj/api/toc.yml"},"to":{"sourceType":"file","value":"~/obj/api/SortingVisualizer.FrmMain.yml"},"reportedBy":{"sourceType":"file","value":"~/obj/api/toc.yml"},"type":"uid"}],"Item2":{"bookmark":{"Name":"bookmark","Phase":"link","Transitivity":"none"},"file":{"Name":"file","Phase":"link","Transitivity":"none"},"reference":{"Name":"reference","Phase":"link","Transitivity":"none"},"overwrite":{"Name":"overwrite","Phase":"link","Transitivity":"all"},"uid":{"Name":"uid","Phase":"link","Transitivity":"none"},"overwriteFragments":{"Name":"overwriteFragments","Phase":"compile","Transitivity":"all"},"include":{"Name":"include","Phase":"compile","Transitivity":"all"},"children":{"Name":"children","Phase":"link","Transitivity":"all"},"metadata":{"Name":"metadata","Phase":"link","Transitivity":"never"}},"Item3":[{"reference":{"sourceType":"uid","value":"SortingVisualizer"},"file":"~/obj/api/SortingVisualizer.yml","reportedBy":"~/obj/api/SortingVisualizer.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.#ctor"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.initWindowSettings"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.initParameters"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.genRandomNumber(System.Random)"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.enableSortButtons"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.disableSortButtons"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.FrmMain_Load(System.Object,System.EventArgs)"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.exitToolStripMenuItem_Click(System.Object,System.EventArgs)"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.githubToolStripMenuItem_Click(System.Object,System.EventArgs)"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.btnGenerateArray_Click(System.Object,System.EventArgs)"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.btnMergeSort_Click(System.Object,System.EventArgs)"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.btnQuickSort_Click(System.Object,System.EventArgs)"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.btnInsertionSort_Click(System.Object,System.EventArgs)"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.printArray"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.Dispose(System.Boolean)"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.#ctor*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.initWindowSettings*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.initParameters*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.genRandomNumber*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.enableSortButtons*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.disableSortButtons*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.FrmMain_Load*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.exitToolStripMenuItem_Click*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.githubToolStripMenuItem_Click*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.btnGenerateArray_Click*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.btnMergeSort_Click*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.btnQuickSort_Click*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.btnInsertionSort_Click*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.printArray*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"},{"reference":{"sourceType":"uid","value":"SortingVisualizer.FrmMain.Dispose*"},"file":"~/obj/api/SortingVisualizer.FrmMain.yml","reportedBy":"~/obj/api/SortingVisualizer.FrmMain.yml"}]}
| 296,545
| 296,545
| 0.718259
| 33,017
| 296,545
| 6.450677
| 0.018203
| 0.24757
| 0.234879
| 0.305096
| 0.997338
| 0.996854
| 0.996399
| 0.996023
| 0.996023
| 0.995718
| 0
| 0.000658
| 0
| 296,545
| 1
| 296,545
| 296,545
| 0.717554
| 0
| 0
| 0
| 0
| 68
| 0.783811
| 0.482957
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 17
|
aba3ca3cb2abe792a4ee6dcd8344c35aa3650122
| 430
|
py
|
Python
|
donkeycar/parts/model_wrappers/__init__.py
|
augustin-barillec/tortue-rapide
|
92dbde0a98bfabbedf3bc3502fc648d254ac330a
|
[
"MIT"
] | 12
|
2019-05-28T17:57:57.000Z
|
2022-01-14T14:46:30.000Z
|
donkeycar/parts/model_wrappers/__init__.py
|
augustin-barillec/tortue-rapide
|
92dbde0a98bfabbedf3bc3502fc648d254ac330a
|
[
"MIT"
] | 7
|
2019-12-16T22:09:49.000Z
|
2021-09-12T15:35:41.000Z
|
donkeycar/parts/model_wrappers/__init__.py
|
augustin-barillec/tortue-rapide
|
92dbde0a98bfabbedf3bc3502fc648d254ac330a
|
[
"MIT"
] | 2
|
2021-01-24T15:31:57.000Z
|
2021-07-28T17:23:29.000Z
|
from donkeycar.parts.model_wrappers.Angle5FlipSharpThrottleOn import Angle5FlipSharpThrottleOn
from donkeycar.parts.model_wrappers.Angle5ifelse import Angle5ifelse
from donkeycar.parts.model_wrappers.Angle3ifelse import Angle3ifelse
from donkeycar.parts.model_wrappers.Angle3speedy import SpeedyFranklin3choices
from donkeycar.parts.model_wrappers.Angle51 import Angle51
from donkeycar.parts.model_wrappers.Angle52 import Angle52
| 61.428571
| 94
| 0.902326
| 48
| 430
| 7.958333
| 0.270833
| 0.204188
| 0.282723
| 0.361257
| 0.486911
| 0
| 0
| 0
| 0
| 0
| 0
| 0.039409
| 0.055814
| 430
| 6
| 95
| 71.666667
| 0.901478
| 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
|
abca83db476237da93239ae54ed493e9e869002d
| 48
|
py
|
Python
|
randomForestRules/__init__.py
|
lukassykora/randomForestRules
|
9da3b510a488a2453f48c220bbc289854917a86a
|
[
"MIT"
] | 3
|
2020-01-08T14:49:47.000Z
|
2021-07-24T17:53:32.000Z
|
randomForestRules/__init__.py
|
lukassykora/randomForestRules
|
9da3b510a488a2453f48c220bbc289854917a86a
|
[
"MIT"
] | 2
|
2020-11-01T17:00:22.000Z
|
2021-08-22T17:13:06.000Z
|
randomForestRules/__init__.py
|
lukassykora/randomForestRules
|
9da3b510a488a2453f48c220bbc289854917a86a
|
[
"MIT"
] | 4
|
2020-01-08T14:49:49.000Z
|
2021-07-24T17:53:38.000Z
|
from .randomForestRules import RandomForestRules
| 48
| 48
| 0.916667
| 4
| 48
| 11
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 48
| 1
| 48
| 48
| 0.977778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 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
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
055b1e351a5242b821e047dfcb5c1f7591a3c693
| 509
|
py
|
Python
|
id.py
|
txkodo/pyDatapack
|
f647e0043d09e3d456a8019fb00cb945c0d6b6a7
|
[
"MIT"
] | null | null | null |
id.py
|
txkodo/pyDatapack
|
f647e0043d09e3d456a8019fb00cb945c0d6b6a7
|
[
"MIT"
] | null | null | null |
id.py
|
txkodo/pyDatapack
|
f647e0043d09e3d456a8019fb00cb945c0d6b6a7
|
[
"MIT"
] | null | null | null |
import string
import secrets
def gen_objective_id():
return ''.join(secrets.choice(string.ascii_lowercase + string.digits) for _ in range(16))
def gen_scoreholder_id():
return ''.join(secrets.choice(string.ascii_lowercase + string.digits) for _ in range(16))
def gen_function_id():
return ''.join(secrets.choice(string.ascii_lowercase + string.digits) for _ in range(16))
def gen_datapath_id():
return ''.join(secrets.choice(string.ascii_lowercase + string.digits) for _ in range(16))
| 36.357143
| 92
| 0.740668
| 72
| 509
| 5.013889
| 0.277778
| 0.066482
| 0.132964
| 0.210526
| 0.814404
| 0.814404
| 0.814404
| 0.814404
| 0.814404
| 0.814404
| 0
| 0.018141
| 0.133595
| 509
| 14
| 93
| 36.357143
| 0.800454
| 0
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| true
| 0
| 0.2
| 0.4
| 1
| 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
| 1
| 1
| 0
| 0
| 1
| 1
| 0
|
0
| 11
|
057c9190ccad439b376e3bce3f11d837eb5a4576
| 42
|
py
|
Python
|
tests/test_modules/simple_test_package/aa.py
|
ajylee/call_map
|
21e7684b0814eae6f16cd4bc75597dc4e9239ec0
|
[
"BSD-2-Clause"
] | 20
|
2017-12-24T00:19:15.000Z
|
2021-11-15T07:42:25.000Z
|
tests/test_modules/simple_test_package/aa.py
|
ajylee/call_map
|
21e7684b0814eae6f16cd4bc75597dc4e9239ec0
|
[
"BSD-2-Clause"
] | 1
|
2017-10-22T21:03:41.000Z
|
2017-12-24T04:26:22.000Z
|
tests/test_modules/simple_test_package/aa.py
|
ajylee/call_map
|
21e7684b0814eae6f16cd4bc75597dc4e9239ec0
|
[
"BSD-2-Clause"
] | 2
|
2017-11-04T10:06:59.000Z
|
2019-08-01T22:24:49.000Z
|
from . import bb
def foo():
bb.bar()
| 8.4
| 16
| 0.547619
| 7
| 42
| 3.285714
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 42
| 4
| 17
| 10.5
| 0.766667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 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
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
5529bf458e89cd64db669da48d12a440dd5e7310
| 14,095
|
py
|
Python
|
tests/grammar/test_data_type.py
|
Daniihh/sqlpyparser
|
aad1d613c02d4f8fa6b833c060a683cf7e194b1c
|
[
"MIT"
] | 28
|
2016-02-13T10:20:21.000Z
|
2022-03-10T02:41:58.000Z
|
tests/grammar/test_data_type.py
|
Daniihh/sqlpyparser
|
aad1d613c02d4f8fa6b833c060a683cf7e194b1c
|
[
"MIT"
] | 22
|
2016-02-15T15:55:09.000Z
|
2017-09-12T13:49:17.000Z
|
tests/grammar/test_data_type.py
|
Daniihh/sqlpyparser
|
aad1d613c02d4f8fa6b833c060a683cf7e194b1c
|
[
"MIT"
] | 16
|
2016-02-15T16:41:23.000Z
|
2021-05-18T04:51:52.000Z
|
# -*- encoding:utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import unittest
import pyparsing
from mysqlparse.grammar.data_type import data_type_syntax
class DataTypeSyntaxTest(unittest.TestCase):
def test_bit(self):
self.assertEquals(data_type_syntax.parseString("BIT").data_type, 'BIT')
self.assertEquals(data_type_syntax.parseString("BIT(8)").data_type, 'BIT')
self.assertEquals(data_type_syntax.parseString("BIT(8)").length[0], '8')
def test_integers(self):
type_list = ['TINYINT', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT']
type_plain = "{type_name}".format
type_with_length = "{type_name}(8)".format
type_with_unsigned = "{type_name}(8) unsigned".format
type_with_zerofill = "{type_name}(8) zerofill".format
type_with_all_modifiers = "{type_name}(8) UNSIGNED ZEROFILL".format
for type_name in type_list:
self.assertEquals(
data_type_syntax.parseString(type_plain(type_name=type_name)).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString(type_with_length(type_name=type_name)).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString(type_with_length(type_name=type_name)).length[0],
'8',
)
self.assertFalse(
data_type_syntax.parseString(type_with_length(type_name=type_name)).unsigned,
)
self.assertFalse(
data_type_syntax.parseString(type_with_length(type_name=type_name)).zerofill,
)
self.assertEquals(
data_type_syntax.parseString(type_with_unsigned(type_name=type_name)).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString(type_with_unsigned(type_name=type_name)).length[0],
'8',
)
self.assertTrue(
data_type_syntax.parseString(type_with_unsigned(type_name=type_name)).unsigned,
)
self.assertEquals(
data_type_syntax.parseString(type_with_zerofill(type_name=type_name)).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString(type_with_zerofill(type_name=type_name)).length[0],
'8',
)
self.assertTrue(
data_type_syntax.parseString(type_with_zerofill(type_name=type_name)).zerofill,
)
self.assertEquals(
data_type_syntax.parseString(type_with_all_modifiers(type_name=type_name)).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString(type_with_all_modifiers(type_name=type_name)).length[0],
'8',
)
self.assertTrue(
data_type_syntax.parseString(type_with_all_modifiers(type_name=type_name)).unsigned,
)
self.assertTrue(
data_type_syntax.parseString(type_with_all_modifiers(type_name=type_name)).zerofill,
)
def test_decimals(self):
type_list = ['REAL', 'DOUBLE', 'FLOAT', 'DECIMAL', 'NUMERIC']
for type_name in type_list:
self.assertEquals(
data_type_syntax.parseString("{type_name}".format(type_name=type_name)).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString("{type_name}(10)".format(type_name=type_name)).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString("{type_name}(10)".format(type_name=type_name)).length,
'10',
)
self.assertEquals(
data_type_syntax.parseString("{type_name}(10, 2)".format(type_name=type_name)).decimals,
'2',
)
self.assertFalse(
data_type_syntax.parseString("{type_name}(10, 2)".format(type_name=type_name)).unsigned,
)
self.assertFalse(
data_type_syntax.parseString("{type_name}(10, 2)".format(type_name=type_name)).zerofill,
)
self.assertTrue(
data_type_syntax.parseString("{type_name}(10, 2) UNSIGNED".format(type_name=type_name)).unsigned,
)
self.assertTrue(
data_type_syntax.parseString("{type_name}(10, 2) ZEROFILL".format(type_name=type_name)).zerofill,
)
self.assertTrue(
data_type_syntax.parseString("{type_name}(10, 2) UNSIGNED ZEROFILL".format(type_name=type_name)).unsigned,
)
self.assertTrue(
data_type_syntax.parseString("{type_name}(10, 2) UNSIGNED ZEROFILL".format(type_name=type_name)).zerofill,
)
def test_datetimes(self):
self.assertEquals(data_type_syntax.parseString("DATE").data_type, 'DATE')
self.assertEquals(data_type_syntax.parseString("YEAR").data_type, 'YEAR')
type_list = ['TIME', 'TIMESTAMP', 'DATETIME']
type_plain = "{type_name}".format
type_with_precision = "{type_name}(6)".format
for type_name in type_list:
self.assertEquals(
data_type_syntax.parseString(type_plain(type_name=type_name)).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString(type_with_precision(type_name=type_name)).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString(type_with_precision(type_name=type_name)).precision[0],
'6',
)
def test_chars(self):
self.assertEquals(data_type_syntax.parseString("CHAR").data_type, 'CHAR')
self.assertEquals(data_type_syntax.parseString("CHAR(8)").length[0], '8')
self.assertEquals(data_type_syntax.parseString("CHAR(8) BINARY").length[0], '8')
self.assertEquals(data_type_syntax.parseString("CHAR(8) BINARY").binary, True)
self.assertEquals(data_type_syntax.parseString("CHAR(8) CHARACTER SET 'utf8'").character_set, "utf8")
self.assertEquals(data_type_syntax.parseString("CHAR(8) COLLATE 'utf8_general'").collation_name, "utf8_general")
self.assertEquals(
data_type_syntax.parseString(
"CHAR(8) BINARY CHARACTER SET 'utf8' COLLATE 'utf8_general'"
).character_set,
"utf8"
)
self.assertEquals(
data_type_syntax.parseString(
"CHAR(8) BINARY CHARACTER SET 'utf8' COLLATE 'utf8_general'"
).collation_name,
"utf8_general"
)
self.assertTrue(
data_type_syntax.parseString(
"CHAR(8) BINARY CHARACTER SET 'utf8' COLLATE 'utf8_general'"
).binary,
)
def test_varchar(self):
with self.assertRaises(pyparsing.ParseException):
data_type_syntax.parseString("VARCHAR").data_type
self.assertEquals(data_type_syntax.parseString("VARCHAR(8)").length[0], '8')
self.assertEquals(data_type_syntax.parseString("VARCHAR(8) BINARY").length[0], '8')
self.assertEquals(data_type_syntax.parseString("VARCHAR(8) BINARY").binary, True)
self.assertEquals(data_type_syntax.parseString("VARCHAR(8) CHARACTER SET 'utf8'").character_set, "utf8")
self.assertEquals(
data_type_syntax.parseString("VARCHAR(8) COLLATE 'utf8_general'").collation_name,
"utf8_general",
)
self.assertEquals(
data_type_syntax.parseString(
"VARCHAR(8) BINARY CHARACTER SET 'utf8' COLLATE 'utf8_general'"
).character_set,
"utf8"
)
self.assertEquals(
data_type_syntax.parseString(
"VARCHAR(8) BINARY CHARACTER SET 'utf8' COLLATE 'utf8_general'"
).collation_name,
"utf8_general"
)
self.assertTrue(
data_type_syntax.parseString(
"VARCHAR(8) BINARY CHARACTER SET 'utf8' COLLATE 'utf8_general'"
).binary,
)
def test_binary(self):
self.assertEquals(data_type_syntax.parseString("BINARY").data_type, 'BINARY')
self.assertEquals(data_type_syntax.parseString("BINARY(8)").data_type, 'BINARY')
self.assertEquals(data_type_syntax.parseString("BINARY(8)").length[0], '8')
def test_varbinary(self):
with self.assertRaises(pyparsing.ParseException):
data_type_syntax.parseString("VARBINARY").data_type
self.assertEquals(data_type_syntax.parseString("VARBINARY(8)").length[0], '8')
def test_blobs(self):
type_list = ['TINYBLOB', 'BLOB', 'MEDIUMBLOB', 'LONGBLOB']
for type_name in type_list:
self.assertEquals(data_type_syntax.parseString(type_name).data_type, type_name)
def test_texts(self):
type_list = ['TINYTEXT', 'TEXT', 'MEDIUMTEXT', 'LONGTEXT']
for type_name in type_list:
self.assertEquals(data_type_syntax.parseString(type_name).data_type, type_name)
self.assertEquals(
data_type_syntax.parseString(
"{type_name} BINARY".format(type_name=type_name)
).data_type,
type_name,
)
self.assertTrue(
data_type_syntax.parseString(
"{type_name} BINARY".format(type_name=type_name)
).binary,
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name} CHARACTER SET 'utf8'".format(type_name=type_name)
).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name} CHARACTER SET 'utf8'".format(type_name=type_name)
).character_set,
'utf8',
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name} COLLATE 'utf8_general_ci'".format(type_name=type_name)
).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name} COLLATE 'utf8_general_ci'".format(type_name=type_name)
).collation_name,
'utf8_general_ci',
)
self.assertFalse(
data_type_syntax.parseString(
"{type_name} COLLATE 'utf8_general_ci'".format(type_name=type_name)
).binary,
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name} BINARY CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'".format(type_name=type_name)
).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name} BINARY CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'".format(type_name=type_name)
).character_set,
'utf8',
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name} BINARY CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'".format(type_name=type_name)
).collation_name,
'utf8_general_ci',
)
self.assertTrue(
data_type_syntax.parseString(
"{type_name} BINARY CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'".format(type_name=type_name)
).binary,
)
def test_enumerables(self):
type_list = ['ENUM', 'SET']
for type_name in type_list:
self.assertEquals(
data_type_syntax.parseString(
"{type_name}('option1', 'option2', 'option3')".format(type_name=type_name)
).data_type,
type_name,
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name}('option1', 'option2', 'option3')".format(type_name=type_name)
).value_list.asList(),
['option1', 'option2', 'option3'],
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name}('option1', 'option2', 'option3') CHARACTER SET 'utf8'".format(type_name=type_name)
).value_list.asList(),
['option1', 'option2', 'option3'],
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name}('option1', 'option2', 'option3') CHARACTER SET 'utf8'".format(type_name=type_name)
).character_set,
'utf8',
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name}('option1', 'option2', 'option3') CHARACTER SET 'utf8'".format(type_name=type_name)
).value_list.asList(),
['option1', 'option2', 'option3'],
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name}('option1', 'option2', 'option3') CHARACTER SET 'utf8'".format(type_name=type_name)
).character_set,
'utf8',
)
self.assertEquals(
data_type_syntax.parseString(
"{type_name}('option1', 'option2', 'option3') CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'".format(
type_name=type_name
)
).collation_name,
'utf8_general_ci',
)
| 40.386819
| 122
| 0.57602
| 1,430
| 14,095
| 5.353147
| 0.068531
| 0.157805
| 0.140823
| 0.248204
| 0.915741
| 0.901372
| 0.885304
| 0.847028
| 0.823514
| 0.818811
| 0
| 0.016511
| 0.316779
| 14,095
| 348
| 123
| 40.502874
| 0.778401
| 0.001561
| 0
| 0.557377
| 0
| 0
| 0.162462
| 0.010945
| 0
| 0
| 0
| 0
| 0.24918
| 1
| 0.036066
| false
| 0
| 0.013115
| 0
| 0.052459
| 0.003279
| 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
|
559bff5f8a9189b7032f820f194b11e430ff84ea
| 24,336
|
py
|
Python
|
sdk/python/pulumi_digitalocean/database_connection_pool.py
|
mikealgj/pulumi-digitalocean
|
77c109ab364eb69b7668b007c29413f5d2c95209
|
[
"ECL-2.0",
"Apache-2.0"
] | 53
|
2019-04-25T14:43:12.000Z
|
2022-03-14T15:51:44.000Z
|
sdk/python/pulumi_digitalocean/database_connection_pool.py
|
mikealgj/pulumi-digitalocean
|
77c109ab364eb69b7668b007c29413f5d2c95209
|
[
"ECL-2.0",
"Apache-2.0"
] | 158
|
2019-04-15T21:47:18.000Z
|
2022-03-29T21:21:57.000Z
|
sdk/python/pulumi_digitalocean/database_connection_pool.py
|
mikealgj/pulumi-digitalocean
|
77c109ab364eb69b7668b007c29413f5d2c95209
|
[
"ECL-2.0",
"Apache-2.0"
] | 10
|
2019-04-15T20:16:11.000Z
|
2021-05-28T19:08:32.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
__all__ = ['DatabaseConnectionPoolArgs', 'DatabaseConnectionPool']
@pulumi.input_type
class DatabaseConnectionPoolArgs:
def __init__(__self__, *,
cluster_id: pulumi.Input[str],
db_name: pulumi.Input[str],
mode: pulumi.Input[str],
size: pulumi.Input[int],
user: pulumi.Input[str],
name: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a DatabaseConnectionPool resource.
:param pulumi.Input[str] cluster_id: The ID of the source database cluster. Note: This must be a PostgreSQL cluster.
:param pulumi.Input[str] db_name: The database for use with the connection pool.
:param pulumi.Input[str] mode: The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.
:param pulumi.Input[int] size: The desired size of the PGBouncer connection pool.
:param pulumi.Input[str] user: The name of the database user for use with the connection pool.
:param pulumi.Input[str] name: The name for the database connection pool.
"""
pulumi.set(__self__, "cluster_id", cluster_id)
pulumi.set(__self__, "db_name", db_name)
pulumi.set(__self__, "mode", mode)
pulumi.set(__self__, "size", size)
pulumi.set(__self__, "user", user)
if name is not None:
pulumi.set(__self__, "name", name)
@property
@pulumi.getter(name="clusterId")
def cluster_id(self) -> pulumi.Input[str]:
"""
The ID of the source database cluster. Note: This must be a PostgreSQL cluster.
"""
return pulumi.get(self, "cluster_id")
@cluster_id.setter
def cluster_id(self, value: pulumi.Input[str]):
pulumi.set(self, "cluster_id", value)
@property
@pulumi.getter(name="dbName")
def db_name(self) -> pulumi.Input[str]:
"""
The database for use with the connection pool.
"""
return pulumi.get(self, "db_name")
@db_name.setter
def db_name(self, value: pulumi.Input[str]):
pulumi.set(self, "db_name", value)
@property
@pulumi.getter
def mode(self) -> pulumi.Input[str]:
"""
The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.
"""
return pulumi.get(self, "mode")
@mode.setter
def mode(self, value: pulumi.Input[str]):
pulumi.set(self, "mode", value)
@property
@pulumi.getter
def size(self) -> pulumi.Input[int]:
"""
The desired size of the PGBouncer connection pool.
"""
return pulumi.get(self, "size")
@size.setter
def size(self, value: pulumi.Input[int]):
pulumi.set(self, "size", value)
@property
@pulumi.getter
def user(self) -> pulumi.Input[str]:
"""
The name of the database user for use with the connection pool.
"""
return pulumi.get(self, "user")
@user.setter
def user(self, value: pulumi.Input[str]):
pulumi.set(self, "user", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name for the database connection pool.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@pulumi.input_type
class _DatabaseConnectionPoolState:
def __init__(__self__, *,
cluster_id: Optional[pulumi.Input[str]] = None,
db_name: Optional[pulumi.Input[str]] = None,
host: Optional[pulumi.Input[str]] = None,
mode: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
password: Optional[pulumi.Input[str]] = None,
port: Optional[pulumi.Input[int]] = None,
private_host: Optional[pulumi.Input[str]] = None,
private_uri: Optional[pulumi.Input[str]] = None,
size: Optional[pulumi.Input[int]] = None,
uri: Optional[pulumi.Input[str]] = None,
user: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering DatabaseConnectionPool resources.
:param pulumi.Input[str] cluster_id: The ID of the source database cluster. Note: This must be a PostgreSQL cluster.
:param pulumi.Input[str] db_name: The database for use with the connection pool.
:param pulumi.Input[str] host: The hostname used to connect to the database connection pool.
:param pulumi.Input[str] mode: The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.
:param pulumi.Input[str] name: The name for the database connection pool.
:param pulumi.Input[str] password: Password for the connection pool's user.
:param pulumi.Input[int] port: Network port that the database connection pool is listening on.
:param pulumi.Input[str] private_host: Same as `host`, but only accessible from resources within the account and in the same region.
:param pulumi.Input[str] private_uri: Same as `uri`, but only accessible from resources within the account and in the same region.
:param pulumi.Input[int] size: The desired size of the PGBouncer connection pool.
:param pulumi.Input[str] uri: The full URI for connecting to the database connection pool.
:param pulumi.Input[str] user: The name of the database user for use with the connection pool.
"""
if cluster_id is not None:
pulumi.set(__self__, "cluster_id", cluster_id)
if db_name is not None:
pulumi.set(__self__, "db_name", db_name)
if host is not None:
pulumi.set(__self__, "host", host)
if mode is not None:
pulumi.set(__self__, "mode", mode)
if name is not None:
pulumi.set(__self__, "name", name)
if password is not None:
pulumi.set(__self__, "password", password)
if port is not None:
pulumi.set(__self__, "port", port)
if private_host is not None:
pulumi.set(__self__, "private_host", private_host)
if private_uri is not None:
pulumi.set(__self__, "private_uri", private_uri)
if size is not None:
pulumi.set(__self__, "size", size)
if uri is not None:
pulumi.set(__self__, "uri", uri)
if user is not None:
pulumi.set(__self__, "user", user)
@property
@pulumi.getter(name="clusterId")
def cluster_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the source database cluster. Note: This must be a PostgreSQL cluster.
"""
return pulumi.get(self, "cluster_id")
@cluster_id.setter
def cluster_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "cluster_id", value)
@property
@pulumi.getter(name="dbName")
def db_name(self) -> Optional[pulumi.Input[str]]:
"""
The database for use with the connection pool.
"""
return pulumi.get(self, "db_name")
@db_name.setter
def db_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "db_name", value)
@property
@pulumi.getter
def host(self) -> Optional[pulumi.Input[str]]:
"""
The hostname used to connect to the database connection pool.
"""
return pulumi.get(self, "host")
@host.setter
def host(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "host", value)
@property
@pulumi.getter
def mode(self) -> Optional[pulumi.Input[str]]:
"""
The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.
"""
return pulumi.get(self, "mode")
@mode.setter
def mode(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "mode", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name for the database connection pool.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def password(self) -> Optional[pulumi.Input[str]]:
"""
Password for the connection pool's user.
"""
return pulumi.get(self, "password")
@password.setter
def password(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "password", value)
@property
@pulumi.getter
def port(self) -> Optional[pulumi.Input[int]]:
"""
Network port that the database connection pool is listening on.
"""
return pulumi.get(self, "port")
@port.setter
def port(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "port", value)
@property
@pulumi.getter(name="privateHost")
def private_host(self) -> Optional[pulumi.Input[str]]:
"""
Same as `host`, but only accessible from resources within the account and in the same region.
"""
return pulumi.get(self, "private_host")
@private_host.setter
def private_host(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "private_host", value)
@property
@pulumi.getter(name="privateUri")
def private_uri(self) -> Optional[pulumi.Input[str]]:
"""
Same as `uri`, but only accessible from resources within the account and in the same region.
"""
return pulumi.get(self, "private_uri")
@private_uri.setter
def private_uri(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "private_uri", value)
@property
@pulumi.getter
def size(self) -> Optional[pulumi.Input[int]]:
"""
The desired size of the PGBouncer connection pool.
"""
return pulumi.get(self, "size")
@size.setter
def size(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "size", value)
@property
@pulumi.getter
def uri(self) -> Optional[pulumi.Input[str]]:
"""
The full URI for connecting to the database connection pool.
"""
return pulumi.get(self, "uri")
@uri.setter
def uri(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "uri", value)
@property
@pulumi.getter
def user(self) -> Optional[pulumi.Input[str]]:
"""
The name of the database user for use with the connection pool.
"""
return pulumi.get(self, "user")
@user.setter
def user(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "user", value)
class DatabaseConnectionPool(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
cluster_id: Optional[pulumi.Input[str]] = None,
db_name: Optional[pulumi.Input[str]] = None,
mode: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
size: Optional[pulumi.Input[int]] = None,
user: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Provides a DigitalOcean database connection pool resource.
## Example Usage
### Create a new PostgreSQL database connection pool
```python
import pulumi
import pulumi_digitalocean as digitalocean
postgres_example = digitalocean.DatabaseCluster("postgres-example",
engine="pg",
version="11",
size="db-s-1vcpu-1gb",
region="nyc1",
node_count=1)
pool_01 = digitalocean.DatabaseConnectionPool("pool-01",
cluster_id=postgres_example.id,
mode="transaction",
size=20,
db_name="defaultdb",
user="doadmin")
```
## Import
Database connection pools can be imported using the `id` of the source database cluster and the `name` of the connection pool joined with a comma. For example
```sh
$ pulumi import digitalocean:index/databaseConnectionPool:DatabaseConnectionPool pool-01 245bcfd0-7f31-4ce6-a2bc-475a116cca97,pool-01
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] cluster_id: The ID of the source database cluster. Note: This must be a PostgreSQL cluster.
:param pulumi.Input[str] db_name: The database for use with the connection pool.
:param pulumi.Input[str] mode: The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.
:param pulumi.Input[str] name: The name for the database connection pool.
:param pulumi.Input[int] size: The desired size of the PGBouncer connection pool.
:param pulumi.Input[str] user: The name of the database user for use with the connection pool.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: DatabaseConnectionPoolArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Provides a DigitalOcean database connection pool resource.
## Example Usage
### Create a new PostgreSQL database connection pool
```python
import pulumi
import pulumi_digitalocean as digitalocean
postgres_example = digitalocean.DatabaseCluster("postgres-example",
engine="pg",
version="11",
size="db-s-1vcpu-1gb",
region="nyc1",
node_count=1)
pool_01 = digitalocean.DatabaseConnectionPool("pool-01",
cluster_id=postgres_example.id,
mode="transaction",
size=20,
db_name="defaultdb",
user="doadmin")
```
## Import
Database connection pools can be imported using the `id` of the source database cluster and the `name` of the connection pool joined with a comma. For example
```sh
$ pulumi import digitalocean:index/databaseConnectionPool:DatabaseConnectionPool pool-01 245bcfd0-7f31-4ce6-a2bc-475a116cca97,pool-01
```
:param str resource_name: The name of the resource.
:param DatabaseConnectionPoolArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(DatabaseConnectionPoolArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
cluster_id: Optional[pulumi.Input[str]] = None,
db_name: Optional[pulumi.Input[str]] = None,
mode: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
size: Optional[pulumi.Input[int]] = None,
user: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = DatabaseConnectionPoolArgs.__new__(DatabaseConnectionPoolArgs)
if cluster_id is None and not opts.urn:
raise TypeError("Missing required property 'cluster_id'")
__props__.__dict__["cluster_id"] = cluster_id
if db_name is None and not opts.urn:
raise TypeError("Missing required property 'db_name'")
__props__.__dict__["db_name"] = db_name
if mode is None and not opts.urn:
raise TypeError("Missing required property 'mode'")
__props__.__dict__["mode"] = mode
__props__.__dict__["name"] = name
if size is None and not opts.urn:
raise TypeError("Missing required property 'size'")
__props__.__dict__["size"] = size
if user is None and not opts.urn:
raise TypeError("Missing required property 'user'")
__props__.__dict__["user"] = user
__props__.__dict__["host"] = None
__props__.__dict__["password"] = None
__props__.__dict__["port"] = None
__props__.__dict__["private_host"] = None
__props__.__dict__["private_uri"] = None
__props__.__dict__["uri"] = None
super(DatabaseConnectionPool, __self__).__init__(
'digitalocean:index/databaseConnectionPool:DatabaseConnectionPool',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
cluster_id: Optional[pulumi.Input[str]] = None,
db_name: Optional[pulumi.Input[str]] = None,
host: Optional[pulumi.Input[str]] = None,
mode: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
password: Optional[pulumi.Input[str]] = None,
port: Optional[pulumi.Input[int]] = None,
private_host: Optional[pulumi.Input[str]] = None,
private_uri: Optional[pulumi.Input[str]] = None,
size: Optional[pulumi.Input[int]] = None,
uri: Optional[pulumi.Input[str]] = None,
user: Optional[pulumi.Input[str]] = None) -> 'DatabaseConnectionPool':
"""
Get an existing DatabaseConnectionPool resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] cluster_id: The ID of the source database cluster. Note: This must be a PostgreSQL cluster.
:param pulumi.Input[str] db_name: The database for use with the connection pool.
:param pulumi.Input[str] host: The hostname used to connect to the database connection pool.
:param pulumi.Input[str] mode: The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.
:param pulumi.Input[str] name: The name for the database connection pool.
:param pulumi.Input[str] password: Password for the connection pool's user.
:param pulumi.Input[int] port: Network port that the database connection pool is listening on.
:param pulumi.Input[str] private_host: Same as `host`, but only accessible from resources within the account and in the same region.
:param pulumi.Input[str] private_uri: Same as `uri`, but only accessible from resources within the account and in the same region.
:param pulumi.Input[int] size: The desired size of the PGBouncer connection pool.
:param pulumi.Input[str] uri: The full URI for connecting to the database connection pool.
:param pulumi.Input[str] user: The name of the database user for use with the connection pool.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _DatabaseConnectionPoolState.__new__(_DatabaseConnectionPoolState)
__props__.__dict__["cluster_id"] = cluster_id
__props__.__dict__["db_name"] = db_name
__props__.__dict__["host"] = host
__props__.__dict__["mode"] = mode
__props__.__dict__["name"] = name
__props__.__dict__["password"] = password
__props__.__dict__["port"] = port
__props__.__dict__["private_host"] = private_host
__props__.__dict__["private_uri"] = private_uri
__props__.__dict__["size"] = size
__props__.__dict__["uri"] = uri
__props__.__dict__["user"] = user
return DatabaseConnectionPool(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="clusterId")
def cluster_id(self) -> pulumi.Output[str]:
"""
The ID of the source database cluster. Note: This must be a PostgreSQL cluster.
"""
return pulumi.get(self, "cluster_id")
@property
@pulumi.getter(name="dbName")
def db_name(self) -> pulumi.Output[str]:
"""
The database for use with the connection pool.
"""
return pulumi.get(self, "db_name")
@property
@pulumi.getter
def host(self) -> pulumi.Output[str]:
"""
The hostname used to connect to the database connection pool.
"""
return pulumi.get(self, "host")
@property
@pulumi.getter
def mode(self) -> pulumi.Output[str]:
"""
The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.
"""
return pulumi.get(self, "mode")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
The name for the database connection pool.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter
def password(self) -> pulumi.Output[str]:
"""
Password for the connection pool's user.
"""
return pulumi.get(self, "password")
@property
@pulumi.getter
def port(self) -> pulumi.Output[int]:
"""
Network port that the database connection pool is listening on.
"""
return pulumi.get(self, "port")
@property
@pulumi.getter(name="privateHost")
def private_host(self) -> pulumi.Output[str]:
"""
Same as `host`, but only accessible from resources within the account and in the same region.
"""
return pulumi.get(self, "private_host")
@property
@pulumi.getter(name="privateUri")
def private_uri(self) -> pulumi.Output[str]:
"""
Same as `uri`, but only accessible from resources within the account and in the same region.
"""
return pulumi.get(self, "private_uri")
@property
@pulumi.getter
def size(self) -> pulumi.Output[int]:
"""
The desired size of the PGBouncer connection pool.
"""
return pulumi.get(self, "size")
@property
@pulumi.getter
def uri(self) -> pulumi.Output[str]:
"""
The full URI for connecting to the database connection pool.
"""
return pulumi.get(self, "uri")
@property
@pulumi.getter
def user(self) -> pulumi.Output[str]:
"""
The name of the database user for use with the connection pool.
"""
return pulumi.get(self, "user")
| 39.764706
| 166
| 0.623973
| 2,900
| 24,336
| 5.056552
| 0.068966
| 0.088516
| 0.092608
| 0.079514
| 0.832856
| 0.803191
| 0.764048
| 0.723609
| 0.709083
| 0.681533
| 0
| 0.003896
| 0.27223
| 24,336
| 611
| 167
| 39.829787
| 0.824064
| 0.344921
| 0
| 0.579882
| 1
| 0
| 0.076085
| 0.009302
| 0
| 0
| 0
| 0
| 0
| 1
| 0.162722
| false
| 0.04142
| 0.014793
| 0
| 0.278107
| 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
|
e965d671abefc6771ef8f31d4904d2ca170eeb5c
| 84
|
py
|
Python
|
EKF/swig/python/test.py
|
fx815/EKF
|
ac33a6500d6cedd441758cae2f9aa7192f0f2a87
|
[
"BSD-3-Clause"
] | 38
|
2017-09-03T18:27:48.000Z
|
2022-01-25T04:56:57.000Z
|
EKF/swig/python/test.py
|
fx815/EKF
|
ac33a6500d6cedd441758cae2f9aa7192f0f2a87
|
[
"BSD-3-Clause"
] | 1
|
2020-08-24T03:28:49.000Z
|
2020-08-24T03:28:49.000Z
|
EKF/swig/python/test.py
|
fx815/EKF
|
ac33a6500d6cedd441758cae2f9aa7192f0f2a87
|
[
"BSD-3-Clause"
] | 10
|
2018-05-11T18:57:27.000Z
|
2022-03-10T02:53:54.000Z
|
import swig_example
swig_example.swig_example_hello()
swig_example.link_liba_hello()
| 28
| 33
| 0.892857
| 13
| 84
| 5.230769
| 0.461538
| 0.647059
| 0.441176
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035714
| 84
| 3
| 34
| 28
| 0.839506
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 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
|
e971243f262537809157c1b4baa49f7bcb8914f9
| 88
|
py
|
Python
|
xallennlp/training/__init__.py
|
himkt/xallennlp
|
073a1475398e59c70230623016f4036432b9c186
|
[
"MIT"
] | null | null | null |
xallennlp/training/__init__.py
|
himkt/xallennlp
|
073a1475398e59c70230623016f4036432b9c186
|
[
"MIT"
] | null | null | null |
xallennlp/training/__init__.py
|
himkt/xallennlp
|
073a1475398e59c70230623016f4036432b9c186
|
[
"MIT"
] | null | null | null |
import xallennlp.training.mlflow_callback
import xallennlp.training.mlflow_checkpointer
| 29.333333
| 45
| 0.909091
| 10
| 88
| 7.8
| 0.6
| 0.384615
| 0.589744
| 0.74359
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045455
| 88
| 2
| 46
| 44
| 0.928571
| 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
|
e98ead08452c6bd2e01e97b70008a25d1afdf8fe
| 4,494
|
py
|
Python
|
examples/FasterRCNN/dataset/data_configs_dict.py
|
ruodingt/tensorpack
|
026006457f3ecdedf23d1bb57c8610591d936b3e
|
[
"Apache-2.0"
] | null | null | null |
examples/FasterRCNN/dataset/data_configs_dict.py
|
ruodingt/tensorpack
|
026006457f3ecdedf23d1bb57c8610591d936b3e
|
[
"Apache-2.0"
] | null | null | null |
examples/FasterRCNN/dataset/data_configs_dict.py
|
ruodingt/tensorpack
|
026006457f3ecdedf23d1bb57c8610591d936b3e
|
[
"Apache-2.0"
] | null | null | null |
import os
from dataset.data_config import DataConfig
images_data_base_dir = os.path.abspath('../../../data/datasets_coco/')
data_conf = {
DataConfig.IMAGE_BASEDIR: images_data_base_dir,
DataConfig.TRAIN: [
{
DataConfig.NICKNAME: 'decay_train',
DataConfig.ANN_PATH: os.path.join(os.path.abspath('../../../data/'),
'coco_stack_out/web_decay_600-5.json')
}
]
,
DataConfig.EVAL: [
{
DataConfig.NICKNAME: 'decay_eval',
DataConfig.ANN_PATH: os.path.join(os.path.abspath('../../../data/'),
'coco_stack_out/legacy_decay-3.json')
}
]
}
# images_data_base_dir = os.path.abspath('../../../data/datasets_coco/')
data_conf_tooth_only = {
DataConfig.IMAGE_BASEDIR: os.path.abspath('../../../data/datasets_coco/'),
DataConfig.TRAIN: [
{
DataConfig.NICKNAME: 'decay_train',
DataConfig.ANN_PATH: os.path.join(os.path.abspath('../../../data/'),
'coco_stack_out/web_decay_600-6-tooth.json')
}
]
,
DataConfig.EVAL: [
{
DataConfig.NICKNAME: 'decay_eval',
DataConfig.ANN_PATH: os.path.join(os.path.abspath('../../../data/'),
'coco_stack_out/legacy_decay-7-tooth.json') #
}
]
}
data_conf_tooth_legacy_of = {
DataConfig.IMAGE_BASEDIR: os.path.abspath('../../../data/datasets_coco/'),
DataConfig.TRAIN: [
{
DataConfig.NICKNAME: 'decay_train',
DataConfig.ANN_PATH: os.path.join(os.path.abspath('../../../data/'),
'coco_stack_out/legacy_decay-7-tooth.json')
}
]
,
DataConfig.EVAL: [
{
DataConfig.NICKNAME: 'decay_eval',
DataConfig.ANN_PATH: os.path.join(os.path.abspath('../../../data/'),
'coco_stack_out/legacy_decay-7-tooth.json') #
}
]
}
data_conf_tooth_web_of = {
DataConfig.IMAGE_BASEDIR: os.path.abspath('../../../data/datasets_coco/'),
DataConfig.TRAIN: [
{
DataConfig.NICKNAME: 'decay_train',
DataConfig.ANN_PATH: os.path.join(os.path.abspath('../../../data/'),
'coco_stack_out/web_decay_600-6-tooth.json')
}
]
,
DataConfig.EVAL: [
{
DataConfig.NICKNAME: 'decay_eval',
DataConfig.ANN_PATH: os.path.join(os.path.abspath('../../../data/'),
'coco_stack_out/web_decay_600-6-tooth.json') #
}
]
}
data_conf_lesion_only = {
DataConfig.IMAGE_BASEDIR: os.path.abspath('../../../data/datasets_coco/'),
DataConfig.TRAIN: [
{
DataConfig.NICKNAME: 'decay_train',
DataConfig.ANN_PATH: os.path.join(os.path.abspath('../../../data/'),
'coco_stack_out/web_decay_600-9-lesion.json')
}
]
,
DataConfig.EVAL: [
{
DataConfig.NICKNAME: 'decay_eval',
DataConfig.ANN_PATH: os.path.join(os.path.abspath('../../../data/'),
'coco_stack_out/legacy_decay-8-lesion.json') #
}
]
}
data_conf_gingivitis_only = {
DataConfig.IMAGE_BASEDIR: os.path.abspath('../../../data/datasets_coco/'),
DataConfig.TRAIN: [
{
DataConfig.NICKNAME: 'decay_train',
DataConfig.ANN_PATH: os.path.join(os.path.abspath('../../../data/'),
'coco_stack_out/gingivitis_web_490-13-ging.json')
}
]
,
DataConfig.EVAL: [
{
DataConfig.NICKNAME: 'decay_eval',
DataConfig.ANN_PATH: os.path.join(os.path.abspath('../../../data/'),
'coco_stack_out/legacy_decay-14-ging.json') #
}
]
}
| 36.536585
| 99
| 0.459947
| 396
| 4,494
| 4.949495
| 0.111111
| 0.094898
| 0.12602
| 0.164796
| 0.905102
| 0.905102
| 0.905102
| 0.905102
| 0.905102
| 0.905102
| 0
| 0.011786
| 0.395861
| 4,494
| 122
| 100
| 36.836066
| 0.710129
| 0.015576
| 0
| 0.423423
| 0
| 0
| 0.213493
| 0.146932
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.018018
| 0
| 0.018018
| 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
|
758282c4a758ece35ff671a6c5cb62d706708b74
| 2,903
|
py
|
Python
|
game/tests/node_test.py
|
madvid/42_Gomoku
|
e57ac625d977d874dc5791e5455d7c145669c6d8
|
[
"MIT"
] | null | null | null |
game/tests/node_test.py
|
madvid/42_Gomoku
|
e57ac625d977d874dc5791e5455d7c145669c6d8
|
[
"MIT"
] | null | null | null |
game/tests/node_test.py
|
madvid/42_Gomoku
|
e57ac625d977d874dc5791e5455d7c145669c6d8
|
[
"MIT"
] | null | null | null |
from board import Node
from metrics import *
parent = Node(None, np.zeros((5,5)), 1)
parent.nb_free_three = 0
def test_node1():
g = np.array([
[1, -1, -1],
[1, -1, -1],
[1, 1, 0]
])
n = Node(parent, g, BLACK)
next_mv = n.generate_next_moves()
assert (next_mv[0].grid == np.array([
[1, -1, -1],
[1, -1, -1],
[1, 1, -1]
])).all()
assert next_mv[0].color == WHITE
def test_node2():
g = np.array([
[0, -1, -1],
[1, -1, -1],
[1, 1, 1]
])
n = Node(parent, g, BLACK)
next_mv = n.generate_next_moves()
assert (next_mv[0].grid == np.array([
[-1, -1, -1],
[1, -1, -1],
[1, 1, 1]
])).all()
assert next_mv[0].color == WHITE
def test_row1():
g = np.array([
[1, 1, 1, 1],
[1, 1, 1, 1],
[1, -1, -1, 0],
[1, 1, 1, 1],
[1, 1, 1, 1]
])
n = Node(parent, g, WHITE)
next_mv = n.generate_next_moves()
assert (next_mv[0].grid == np.array([
[1, 1, 1, 1],
[1, 1, 1, 1],
[1, 0, 0, 1],
[1, 1, 1, 1],
[1, 1, 1, 1]
])).all()
def test_col1():
g = np.array([
[1, 0, 1, 1],
[1, -1, 1, 1],
[1, -1, 1, 1],
[1, 1, 1, 1],
[1, 1, 1, 1]
])
n = Node(parent, g, WHITE)
next_mv = n.generate_next_moves()
assert (next_mv[0].grid == np.array([
[1, 1, 1, 1],
[1, 0, 1, 1],
[1, 0, 1, 1],
[1, 1, 1, 1],
[1, 1, 1, 1]
])).all()
def test_diag1():
g = np.array([
[1, 1, 1, 1],
[1, -1, 1, 1],
[1, 1, -1, 1],
[1, 1, 1, 0],
[1, 1, 1, 1]
])
n = Node(parent, g, WHITE)
next_mv = n.generate_next_moves()
assert (next_mv[0].grid == np.array([
[1, 1, 1, 1],
[1, 0, 1, 1],
[1, 1, 0, 1],
[1, 1, 1, 1],
[1, 1, 1, 1]
])).all()
def test_diag2():
g = np.array([
[0, 1, 1, 1],
[1, -1, 1, 1],
[1, 1, -1, 1],
[1, 1, 1, 1]
])
n = Node(parent, g, WHITE)
next_mv = n.generate_next_moves()
assert (next_mv[0].grid == np.array([
[1, 1, 1, 1],
[1, 0, 1, 1],
[1, 1, 0, 1],
[1, 1, 1, 1]
])).all()
def test_rdiag1():
g = np.array([
[1, 1, 1, 1, 1],
[1, 1, 1, 0, 1],
[1, 1, -1, 1, 1],
[1, -1, 1, 1, 1],
[1, 1, 1, 1, 1]
])
n = Node(parent, g, WHITE)
next_mv = n.generate_next_moves()
assert (next_mv[0].grid == np.array([
[1, 1, 1, 1, 1],
[1, 1, 1, 1, 1],
[1, 1, 0, 1, 1],
[1, 0, 1, 1, 1],
[1, 1, 1, 1, 1]
])).all()
| 23.224
| 41
| 0.349983
| 445
| 2,903
| 2.195506
| 0.083146
| 0.397134
| 0.515865
| 0.581372
| 0.87001
| 0.87001
| 0.87001
| 0.87001
| 0.859775
| 0.856704
| 0
| 0.15703
| 0.434034
| 2,903
| 124
| 42
| 23.41129
| 0.437614
| 0
| 0
| 0.791304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078261
| 1
| 0.06087
| false
| 0
| 0.017391
| 0
| 0.078261
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 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
| 0
|
0
| 11
|
75a788822e459f07f9a702bbea56e3b4f3a259e6
| 16,405
|
py
|
Python
|
select-utxos.py
|
The-New-Fork/python-blocknotify
|
56733218c0231044e859a967f767a6674b4ac85e
|
[
"Apache-2.0"
] | 1
|
2021-10-01T15:54:51.000Z
|
2021-10-01T15:54:51.000Z
|
select-utxos.py
|
The-New-Fork/python-blocknotify
|
56733218c0231044e859a967f767a6674b4ac85e
|
[
"Apache-2.0"
] | null | null | null |
select-utxos.py
|
The-New-Fork/python-blocknotify
|
56733218c0231044e859a967f767a6674b4ac85e
|
[
"Apache-2.0"
] | 1
|
2021-07-22T08:11:50.000Z
|
2021-07-22T08:11:50.000Z
|
from lib import rpclib
from slickrpc import Proxy
from lib import transaction, bitcoin, util
from lib.util import bfh, bh2u
from lib.transaction import Transaction
import requests
import pytest
import subprocess
import json
import sys
import os
from dotenv import load_dotenv
load_dotenv(verbose=True)
IMPORT_API_HOST = str(os.getenv("IMPORT_API_HOST"))
IMPORT_API_PORT = str(os.getenv("IMPORT_API_PORT"))
IMPORT_API_BASE_URL = IMPORT_API_HOST
rpc_user = os.getenv("IJUICE_KOMODO_NODE_USERNAME")
rpc_password = os.getenv("IJUICE_KOMODO_NODE_PASSWORD")
port = os.getenv("IJUICE_KOMODO_NODE_RPC_PORT")
address = ""
amount = 0
greedy = True
if len(sys.argv) >= 3:
address = sys.argv[1]
amount = float(sys.argv[2])
greedy = bool(sys.argv[3])
#this_node_pubkey = os.getenv("THIS_NODE_PUBKEY")
#this_node_wif = os.getenv("THIS_NODE_WIF")
def get_utxos_api(address):
komodo_node_ip = os.getenv("IJUICE_KOMODO_NODE_IPV4_ADDR")
rpc_connect = rpc_connection = Proxy("http://" + rpc_user + ":" + rpc_password + "@" + komodo_node_ip + ":" + port)
url = "https://blockchain-explorer.thenewfork.staging.do.unchain.io/insight-api-komodo/addrs/"+ address +"/utxo"
try:
res = requests.get(url)
except Exception as e:
print(e)
return res.text
array_of_utxos = []
array_of_utxos_final = []
amount_final = -10000000000
def get_utxos(utxos, amount, greedy):
global array_of_utxos
global array_of_utxos_final
global amount_final
if len(array_of_utxos) >= len(array_of_utxos_final) and len(array_of_utxos_final) > 0:
return False
if amount <= 0 and amount > amount_final:
return True
flag = False
cheap_copy = array_of_utxos
for utxo in utxos:
for uxto_in_array in array_of_utxos:
if uxto_in_array['txid'] == utxo['txid']:
flag = True
if flag == False:
array_of_utxos = array_of_utxos + [utxo]
if get_utxos(utxos, amount - utxo['amount'], greedy) == True:
array_of_utxos_final = array_of_utxos
amount_final = amount
if greedy == True:
return True
flag = False
array_of_utxos = cheap_copy
return False
string = get_utxos_api(address)
to_python = ""
try:
to_python = json.loads(string)
except Exception as e:
print(e)
exit()
final = []
for utxo in to_python:
if utxo['confirmations'] > 10:
final = final + [utxo]
get_utxos(final, amount, greedy)
print(array_of_utxos_final)
#TESTING
def is_json(myjson):
try:
json_object = json.loads(myjson)
except ValueError as e:
return False
return True
def test_api():
test = get_utxos_api("RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW")
assert is_json(test) == True
def test_get_utxos():
testcase = [{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"6d2dbbf64d839bedece788632d6233337494d1d51247823058832a16c1cf1d92","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.01833945,"satoshis":1833945,"confirmations":0,"ts":1602181139},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"ba474f6ddff5883a13bd456570769cd8de54b448cd5baa872fd99d253dc3df79","vout":0,"scriptPubKey":"2102f2cdd772ab57eae35996c0d39ad34fe06304c4d3981ffe71a596634fa26f8744ac","amount":0.04444815,"satoshis":4444815,"height":104219,"confirmations":1},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"95f7f0a9ccd4256be902d773f884c6b13bff465feaa87b56a61a8773a3cd990b","vout":0,"scriptPubKey":"2102f2cdd772ab57eae35996c0d39ad34fe06304c4d3981ffe71a596634fa26f8744ac","amount":0.01014884,"satoshis":1014884,"height":104104,"confirmations":116},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"1e562a43ce53a17c1b0cd2f3a7561d943a849d870e0efd4c9f37c8ce750c015b","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":103904,"confirmations":316},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"cad9777cfd1ea164236800506b24ff633702914a87000be019d82523911fdce2","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":103902,"confirmations":318},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"41451a102cfd2780377c33a67d1ed96b3f70fbb616664a7f431115f83f1beb22","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":103901,"confirmations":319},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"7e7390d8176edb9fef91cbd1843c656da7543169baf361971d6bc7eefa498066","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99497,"confirmations":4723},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"19c73bac8031b52b2c3f9f93c3e40f03dc4747a093703907c0e0a8ef09192fac","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99496,"confirmations":4724},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"db60669396d0bb0aa7b81b9325edfe708c879ff0253c9919af1b892efdefac10","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99492,"confirmations":4728},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"2a39930043b87bc3976c6fc39445708103c6c00f88cb8acd18ad24bbaa83a72e","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99486,"confirmations":4734},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"62b29ebbed4e423a72247c116dafe39643c0f6318c4cc435973f1650407a4c06","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99481,"confirmations":4739},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"32a9965986c5922bf9b0de8fbfbac6a9eea70ba8f9a094b084123e97c918631e","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99477,"confirmations":4743},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"8e8ae844ac5a192602031ef0ae1b69aa60900ad73feb3604a0cd2042978c3f80","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99476,"confirmations":4744},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"9ccc0668d3bd89be852ad45cf51c415c212cf861ca0e7b6622b6d71d139ebfd0","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99476,"confirmations":4744},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"ee2495ab86e04fb7c9a0d051df12621516d86845e72b05bc901e222366b4c8fb","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99476,"confirmations":4744},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"4ce3087fc3e3b3f8d586b2d77b4584d819130d141461a3a23c83d22d35128ecf","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99475,"confirmations":4745},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"6edbe4a746e1f84851eda54fc05e7f967367318866a65d73060847ac60497bc9","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99474,"confirmations":4746},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"c16f7f55dee528b925489e9ec4979a4a6215c9cf11b7a1db02ff822189956f0a","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99473,"confirmations":4747},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"11bb33a95f3f1c713e801754031ff4b0fa7fe17242b2c74d223dee08c2568ae4","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99473,"confirmations":4747},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"2dc4e28f322a641169afbce755db55d8cc4547771a29a4e75f0af850016f67aa","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99342,"confirmations":4878},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"98604c684398bc399a45168d30f7ff4515da1145d53f7584d4388b3d69053b7f","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99341,"confirmations":4879},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"ba506982f94df57e2e80418e8a7393568b2892f1c01184d1ea46419c21413ee4","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99339,"confirmations":4881},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"7956be14d1e0681bec8cc8528d7fede271254cbc6ca7d34ae413748ce972182b","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99339,"confirmations":4881},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"49444806b8f9d32efd9536578dfd106e56fa5594bda37f772b7c4b5e582f971f","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99324,"confirmations":4896},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"0fbb4254adce7fc38a3391cd695061d05e43bdf2c27bdad0a4ba0ee076a966e1","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99320,"confirmations":4900},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"6f0f621ae5b071a1a3ab653ee296c426dfaf099586095606a6dcc11c89893c3a","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99316,"confirmations":4904},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"9b25d4de15729fd11cc8d9b40da4eaa3093186a7c7caf4b991bb7101fb9dd56f","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99312,"confirmations":4908},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"c75171dd9737181cde71adf9196f8fddb3710abcd038242a6f99984aba9d1d77","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99307,"confirmations":4913},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"94e047f42834c829fda5f0dc2cdda88d37c67968c180f8e0bb8a61ef812f2934","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99304,"confirmations":4916},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"c56cbc57e260b418519cf43c209b90079a47c0fd50aca8671e35597cc5f6c9d7","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99301,"confirmations":4919},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"1b368d690f8f3db7239248d5140b710ea75f6a0b788c61bb434759087df9e884","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99299,"confirmations":4921},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"923ffde12287052acbeda7cd825fcb390db099dcd4a6ef42a503ccbed32aca5d","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":99297,"confirmations":4923},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"8a0f23e3f8230458e299f96996fbce97859b07d6b85bfd83d2610aa8ca159c7a","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":94589,"confirmations":9631},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"5c73c06f2999b00453f5eacbcb60845ba2554a0a540860a051d55ee18a490935","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":0.05,"satoshis":5000000,"height":94442,"confirmations":9778},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"fed38c710ceaf82d0ef54316df7447171d4b1ec6d499a4b231846b8c9dd33a31","vout":0,"scriptPubKey":"2102f2cdd772ab57eae35996c0d39ad34fe06304c4d3981ffe71a596634fa26f8744ac","amount":0.28400257,"satoshis":28400257,"height":94145,"confirmations":10075},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"bdde13adb442e0a0b2c5b7220957a2e4d3b9fbbbc47ad3523d35cd996495b608","vout":0,"scriptPubKey":"2102f2cdd772ab57eae35996c0d39ad34fe06304c4d3981ffe71a596634fa26f8744ac","amount":0.0743478,"satoshis":7434780,"height":94144,"confirmations":10076},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"c064d930a22eaa5a73d0b04201abb304d6d2dffab0f11a3f7652a16724c3d484","vout":2,"scriptPubKey":"2102f2cdd772ab57eae35996c0d39ad34fe06304c4d3981ffe71a596634fa26f8744ac","amount":0.3054992,"satoshis":30549920,"height":94137,"confirmations":10083},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"7dcb33a923f7c25fc8738eb5fc7a230455b55b7285281fc6b41dfa42db900e88","vout":0,"scriptPubKey":"2102f2cdd772ab57eae35996c0d39ad34fe06304c4d3981ffe71a596634fa26f8744ac","amount":0.95629085,"satoshis":95629085,"height":94137,"confirmations":10083},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"a25b4fb86c86c22fa127838496ae35e75c92ae30d1d80e85ed7fd6135371ddb5","vout":0,"scriptPubKey":"2102f2cdd772ab57eae35996c0d39ad34fe06304c4d3981ffe71a596634fa26f8744ac","amount":0.8299,"satoshis":82990000,"height":94137,"confirmations":10083},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"f76a8d2ebdab28f39ac76365c36aaaaa4c7cce36ac12f38f32b27548f9ddc6e4","vout":0,"scriptPubKey":"2102f2cdd772ab57eae35996c0d39ad34fe06304c4d3981ffe71a596634fa26f8744ac","amount":0.69274518,"satoshis":69274518,"height":94137,"confirmations":10083},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"fa58a094f7de0c816f1a40ab3322afded4ccdf89cbe3b6b2702ac1011062a0d2","vout":0,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":3.979,"satoshis":397900000,"height":91157,"confirmations":13063},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"b27d126a997f960cdc9e4b82aac74c2c26437005e7025c1bdd188d2ea9b561d1","vout":1,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":1.11,"satoshis":111000000,"height":90011,"confirmations":14209},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"8005ab6aaa009c48a1c43d01b21b09f8a2e6c853a3a197d46f0c0fa1344e14e1","vout":1,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":1.11,"satoshis":111000000,"height":90011,"confirmations":14209},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"15a307cd75a630718b63a28a7465e01309dc1d5c0542791fc384b35e86f30b2c","vout":1,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":1.11,"satoshis":111000000,"height":90010,"confirmations":14210},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"5a090d5dd686bed104ae13472262e7cd9d96608f74631351f1252e0d40be70d4","vout":1,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":1.11,"satoshis":111000000,"height":90010,"confirmations":14210},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"3cdf23999fa1354eded15493bda356d5829cc60a1c0d708a07f2cd8406f47328","vout":1,"scriptPubKey":"76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac","amount":1.11,"satoshis":111000000,"height":90010,"confirmations":14210},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"be25a04b0dc9196cf9b65dff78ec8c57e58114aae398699046680e25d03fa015","vout":0,"scriptPubKey":"2102f2cdd772ab57eae35996c0d39ad34fe06304c4d3981ffe71a596634fa26f8744ac","amount":1.10944966,"satoshis":110944966,"height":89762,"confirmations":14458},{"address":"RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW","txid":"6e975f08b1ee2a3aa02c2b96ebef588b405576acf24f4c81aff1a929085f168b","vout":0,"scriptPubKey":"2102f2cdd772ab57eae35996c0d39ad34fe06304c4d3981ffe71a596634fa26f8744ac","amount":0.97999673,"satoshis":97999673,"height":89762,"confirmations":14458}]
get_utxos(testcase, 0.01, True)
assert array_of_utxos_final == [{'address': 'RLw3bxciVDqY31qSZh8L4EuM2uo3GJEVEW', 'txid': '6d2dbbf64d839bedece788632d6233337494d1d51247823058832a16c1cf1d92', 'vout': 0, 'scriptPubKey': '76a9147fd21d91b20b713c5a73fe77db4c262117b77d2888ac', 'amount': 0.01833945, 'satoshis': 1833945, 'confirmations': 0, 'ts': 1602181139}]
| 132.298387
| 13,219
| 0.820055
| 1,244
| 16,405
| 10.721865
| 0.209807
| 0.150622
| 0.165317
| 0.17079
| 0.47166
| 0.44377
| 0.380192
| 0.358
| 0.358
| 0.358
| 0
| 0.327852
| 0.039866
| 16,405
| 123
| 13,220
| 133.373984
| 0.518951
| 0.005913
| 0
| 0.170455
| 0
| 0.011364
| 0.65532
| 0.465808
| 0
| 0
| 0
| 0
| 0.022727
| 1
| 0.056818
| false
| 0.022727
| 0.170455
| 0
| 0.306818
| 0.034091
| 0
| 0
| 1
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
75de5bb6fec2ff1e86bf17bc2c0b9b36441cdf30
| 211
|
py
|
Python
|
reverse_geocode_test.py
|
falcaopetri/trajectory-data
|
7f81343086ccd00d3d9f52899a7032d987fc0a66
|
[
"MIT"
] | 1
|
2019-05-21T15:52:28.000Z
|
2019-05-21T15:52:28.000Z
|
reverse_geocode_test.py
|
falcaopetri/trajectory-data
|
7f81343086ccd00d3d9f52899a7032d987fc0a66
|
[
"MIT"
] | null | null | null |
reverse_geocode_test.py
|
falcaopetri/trajectory-data
|
7f81343086ccd00d3d9f52899a7032d987fc0a66
|
[
"MIT"
] | 1
|
2020-08-18T14:38:52.000Z
|
2020-08-18T14:38:52.000Z
|
import reverse_geocode
reverse_geocode.search([(35.6963860567411,139.686436661882)])
reverse_geocode.search([(-33.8236171057086,151.021885871887)])
reverse_geocode.search([(47.3111740195794,8.52681624913163)])
| 35.166667
| 62
| 0.824645
| 24
| 211
| 7.083333
| 0.666667
| 0.329412
| 0.352941
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.439024
| 0.028436
| 211
| 5
| 63
| 42.2
| 0.390244
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 1
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
2f028c07302e47df287d4dc5d37f771ec2181806
| 30,394
|
py
|
Python
|
tb_api_client/swagger_client/apis/user_controller_api.py
|
MOSAIC-LoPoW/oss7-thingsboard-backend-example
|
9b289dd7fdbb6e932ca338ad497a7bb1fc84d010
|
[
"Apache-2.0"
] | 5
|
2017-11-27T15:48:16.000Z
|
2020-09-21T04:18:47.000Z
|
tb_api_client/swagger_client/apis/user_controller_api.py
|
MOSAIC-LoPoW/oss7-thingsboard-backend-example
|
9b289dd7fdbb6e932ca338ad497a7bb1fc84d010
|
[
"Apache-2.0"
] | null | null | null |
tb_api_client/swagger_client/apis/user_controller_api.py
|
MOSAIC-LoPoW/oss7-thingsboard-backend-example
|
9b289dd7fdbb6e932ca338ad497a7bb1fc84d010
|
[
"Apache-2.0"
] | 6
|
2018-01-14T17:23:46.000Z
|
2019-06-24T13:38:54.000Z
|
# coding: utf-8
"""
Thingsboard REST API
For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>.
OpenAPI spec version: 2.0
Contact: info@thingsboard.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from six import iteritems
from ..api_client import ApiClient
class UserControllerApi(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):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def delete_user_using_delete(self, user_id, **kwargs):
"""
deleteUser
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.delete_user_using_delete(user_id, async=True)
>>> result = thread.get()
:param async bool
:param str user_id: userId (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.delete_user_using_delete_with_http_info(user_id, **kwargs)
else:
(data) = self.delete_user_using_delete_with_http_info(user_id, **kwargs)
return data
def delete_user_using_delete_with_http_info(self, user_id, **kwargs):
"""
deleteUser
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.delete_user_using_delete_with_http_info(user_id, async=True)
>>> result = thread.get()
:param async bool
:param str user_id: userId (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['user_id']
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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_user_using_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'user_id' is set
if ('user_id' not in params) or (params['user_id'] is None):
raise ValueError("Missing the required parameter `user_id` when calling `delete_user_using_delete`")
collection_formats = {}
path_params = {}
if 'user_id' in params:
path_params['userId'] = params['user_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(['*/*'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = ['X-Authorization']
return self.api_client.call_api('/api/user/{userId}', '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,
async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_activation_link_using_get(self, user_id, **kwargs):
"""
getActivationLink
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_activation_link_using_get(user_id, async=True)
>>> result = thread.get()
:param async bool
:param str user_id: userId (required)
:return: str
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_activation_link_using_get_with_http_info(user_id, **kwargs)
else:
(data) = self.get_activation_link_using_get_with_http_info(user_id, **kwargs)
return data
def get_activation_link_using_get_with_http_info(self, user_id, **kwargs):
"""
getActivationLink
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_activation_link_using_get_with_http_info(user_id, async=True)
>>> result = thread.get()
:param async bool
:param str user_id: userId (required)
:return: str
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['user_id']
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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_activation_link_using_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'user_id' is set
if ('user_id' not in params) or (params['user_id'] is None):
raise ValueError("Missing the required parameter `user_id` when calling `get_activation_link_using_get`")
collection_formats = {}
path_params = {}
if 'user_id' in params:
path_params['userId'] = params['user_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(['text/plain'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = ['X-Authorization']
return self.api_client.call_api('/api/user/{userId}/activationLink', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='str',
auth_settings=auth_settings,
async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_customer_users_using_get(self, customer_id, limit, **kwargs):
"""
getCustomerUsers
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_customer_users_using_get(customer_id, limit, async=True)
>>> result = thread.get()
:param async bool
:param str customer_id: customerId (required)
:param str limit: limit (required)
:param str text_search: textSearch
:param str id_offset: idOffset
:param str text_offset: textOffset
:return: TextPageDataUser
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_customer_users_using_get_with_http_info(customer_id, limit, **kwargs)
else:
(data) = self.get_customer_users_using_get_with_http_info(customer_id, limit, **kwargs)
return data
def get_customer_users_using_get_with_http_info(self, customer_id, limit, **kwargs):
"""
getCustomerUsers
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_customer_users_using_get_with_http_info(customer_id, limit, async=True)
>>> result = thread.get()
:param async bool
:param str customer_id: customerId (required)
:param str limit: limit (required)
:param str text_search: textSearch
:param str id_offset: idOffset
:param str text_offset: textOffset
:return: TextPageDataUser
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['customer_id', 'limit', 'text_search', 'id_offset', 'text_offset']
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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_customer_users_using_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'customer_id' is set
if ('customer_id' not in params) or (params['customer_id'] is None):
raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_users_using_get`")
# verify the required parameter 'limit' is set
if ('limit' not in params) or (params['limit'] is None):
raise ValueError("Missing the required parameter `limit` when calling `get_customer_users_using_get`")
collection_formats = {}
path_params = {}
if 'customer_id' in params:
path_params['customerId'] = params['customer_id']
query_params = []
if 'text_search' in params:
query_params.append(('textSearch', params['text_search']))
if 'id_offset' in params:
query_params.append(('idOffset', params['id_offset']))
if 'text_offset' in params:
query_params.append(('textOffset', params['text_offset']))
if 'limit' in params:
query_params.append(('limit', params['limit']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['*/*'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = ['X-Authorization']
return self.api_client.call_api('/api/customer/{customerId}/users', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TextPageDataUser',
auth_settings=auth_settings,
async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_tenant_admins_using_get(self, tenant_id, limit, **kwargs):
"""
getTenantAdmins
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_tenant_admins_using_get(tenant_id, limit, async=True)
>>> result = thread.get()
:param async bool
:param str tenant_id: tenantId (required)
:param str limit: limit (required)
:param str text_search: textSearch
:param str id_offset: idOffset
:param str text_offset: textOffset
:return: TextPageDataUser
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_tenant_admins_using_get_with_http_info(tenant_id, limit, **kwargs)
else:
(data) = self.get_tenant_admins_using_get_with_http_info(tenant_id, limit, **kwargs)
return data
def get_tenant_admins_using_get_with_http_info(self, tenant_id, limit, **kwargs):
"""
getTenantAdmins
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_tenant_admins_using_get_with_http_info(tenant_id, limit, async=True)
>>> result = thread.get()
:param async bool
:param str tenant_id: tenantId (required)
:param str limit: limit (required)
:param str text_search: textSearch
:param str id_offset: idOffset
:param str text_offset: textOffset
:return: TextPageDataUser
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['tenant_id', 'limit', 'text_search', 'id_offset', 'text_offset']
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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_tenant_admins_using_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'tenant_id' is set
if ('tenant_id' not in params) or (params['tenant_id'] is None):
raise ValueError("Missing the required parameter `tenant_id` when calling `get_tenant_admins_using_get`")
# verify the required parameter 'limit' is set
if ('limit' not in params) or (params['limit'] is None):
raise ValueError("Missing the required parameter `limit` when calling `get_tenant_admins_using_get`")
collection_formats = {}
path_params = {}
if 'tenant_id' in params:
path_params['tenantId'] = params['tenant_id']
query_params = []
if 'text_search' in params:
query_params.append(('textSearch', params['text_search']))
if 'id_offset' in params:
query_params.append(('idOffset', params['id_offset']))
if 'text_offset' in params:
query_params.append(('textOffset', params['text_offset']))
if 'limit' in params:
query_params.append(('limit', params['limit']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['*/*'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = ['X-Authorization']
return self.api_client.call_api('/api/tenant/{tenantId}/users', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TextPageDataUser',
auth_settings=auth_settings,
async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_user_by_id_using_get(self, user_id, **kwargs):
"""
getUserById
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_user_by_id_using_get(user_id, async=True)
>>> result = thread.get()
:param async bool
:param str user_id: userId (required)
:return: User
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_user_by_id_using_get_with_http_info(user_id, **kwargs)
else:
(data) = self.get_user_by_id_using_get_with_http_info(user_id, **kwargs)
return data
def get_user_by_id_using_get_with_http_info(self, user_id, **kwargs):
"""
getUserById
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_user_by_id_using_get_with_http_info(user_id, async=True)
>>> result = thread.get()
:param async bool
:param str user_id: userId (required)
:return: User
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['user_id']
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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_user_by_id_using_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'user_id' is set
if ('user_id' not in params) or (params['user_id'] is None):
raise ValueError("Missing the required parameter `user_id` when calling `get_user_by_id_using_get`")
collection_formats = {}
path_params = {}
if 'user_id' in params:
path_params['userId'] = params['user_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(['*/*'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = ['X-Authorization']
return self.api_client.call_api('/api/user/{userId}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='User',
auth_settings=auth_settings,
async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def save_user_using_post(self, user, **kwargs):
"""
saveUser
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.save_user_using_post(user, async=True)
>>> result = thread.get()
:param async bool
:param User user: user (required)
:param bool send_activation_mail: sendActivationMail
:return: User
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.save_user_using_post_with_http_info(user, **kwargs)
else:
(data) = self.save_user_using_post_with_http_info(user, **kwargs)
return data
def save_user_using_post_with_http_info(self, user, **kwargs):
"""
saveUser
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.save_user_using_post_with_http_info(user, async=True)
>>> result = thread.get()
:param async bool
:param User user: user (required)
:param bool send_activation_mail: sendActivationMail
:return: User
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['user', 'send_activation_mail']
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 save_user_using_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'user' is set
if ('user' not in params) or (params['user'] is None):
raise ValueError("Missing the required parameter `user` when calling `save_user_using_post`")
collection_formats = {}
path_params = {}
query_params = []
if 'send_activation_mail' in params:
query_params.append(('sendActivationMail', params['send_activation_mail']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'user' in params:
body_params = params['user']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['*/*'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = ['X-Authorization']
return self.api_client.call_api('/api/user', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='User',
auth_settings=auth_settings,
async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def send_activation_email_using_post(self, email, **kwargs):
"""
sendActivationEmail
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.send_activation_email_using_post(email, async=True)
>>> result = thread.get()
:param async bool
:param str email: email (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.send_activation_email_using_post_with_http_info(email, **kwargs)
else:
(data) = self.send_activation_email_using_post_with_http_info(email, **kwargs)
return data
def send_activation_email_using_post_with_http_info(self, email, **kwargs):
"""
sendActivationEmail
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.send_activation_email_using_post_with_http_info(email, async=True)
>>> result = thread.get()
:param async bool
:param str email: email (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['email']
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
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 send_activation_email_using_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'email' is set
if ('email' not in params) or (params['email'] is None):
raise ValueError("Missing the required parameter `email` when calling `send_activation_email_using_post`")
collection_formats = {}
path_params = {}
query_params = []
if 'email' in params:
query_params.append(('email', params['email']))
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['*/*'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = ['X-Authorization']
return self.api_client.call_api('/api/user/sendActivationMail', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
| 40.471372
| 149
| 0.560012
| 3,170
| 30,394
| 5.078233
| 0.058675
| 0.016772
| 0.024351
| 0.031308
| 0.936141
| 0.918748
| 0.907877
| 0.886259
| 0.874767
| 0.854205
| 0
| 0.000255
| 0.354741
| 30,394
| 750
| 150
| 40.525333
| 0.820569
| 0.032046
| 0
| 0.775819
| 0
| 0
| 0.171837
| 0.047267
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.015113
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
f933130df8fe669a9af1c9efd51088775e210fbc
| 99
|
py
|
Python
|
stable_baselines3/bear/__init__.py
|
mjyoo2/stable-baselines3
|
ef7a580219df6d977b56fb99e503890bd5211195
|
[
"MIT"
] | null | null | null |
stable_baselines3/bear/__init__.py
|
mjyoo2/stable-baselines3
|
ef7a580219df6d977b56fb99e503890bd5211195
|
[
"MIT"
] | null | null | null |
stable_baselines3/bear/__init__.py
|
mjyoo2/stable-baselines3
|
ef7a580219df6d977b56fb99e503890bd5211195
|
[
"MIT"
] | null | null | null |
from stable_baselines3.bear.policies import BearPolicy
from stable_baselines3.bear.bear import BEAR
| 49.5
| 54
| 0.888889
| 14
| 99
| 6.142857
| 0.5
| 0.232558
| 0.465116
| 0.55814
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021739
| 0.070707
| 99
| 2
| 55
| 49.5
| 0.913043
| 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
|
f96ca18e0cac4358cc1ae51e86890db7bc505477
| 1,550
|
py
|
Python
|
src/pySUMOQt/Designer/css_rc.py
|
pySUMO/pysumo
|
889969f94bd45e2b67e25ff46452378351ca5186
|
[
"BSD-2-Clause"
] | 7
|
2015-08-21T17:17:35.000Z
|
2021-03-02T21:40:00.000Z
|
src/pySUMOQt/Designer/css_rc.py
|
pySUMO/pysumo
|
889969f94bd45e2b67e25ff46452378351ca5186
|
[
"BSD-2-Clause"
] | 2
|
2015-04-14T12:40:37.000Z
|
2015-04-14T12:44:03.000Z
|
src/pySUMOQt/Designer/css_rc.py
|
pySUMO/pysumo
|
889969f94bd45e2b67e25ff46452378351ca5186
|
[
"BSD-2-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
# Resource object code
#
# Created: Di. Feb 3 12:11:53 2015
# by: The Resource Compiler for PySide (Qt v4.8.4)
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore
qt_resource_data = b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x009QStatusBar::item \x0a{ \x0a\x09border-left: 1px solid #AAAAAA;\x0a} \x0a\x00\x00\x00\x00"
qt_resource_name = b"\x00\x03\x00\x00j\xa3\x00c\x00s\x00s\x00\x0e\x0bq\xe6\xc3\x00M\x00a\x00i\x00n\x00W\x00i\x00n\x00d\x00o\x00w\x00.\x00c\x00s\x00s\x00\x0b\x08\x22\xc1\xc3\x00M\x00e\x00n\x00u\x00b\x00a\x00r\x00.\x00c\x00s\x00s\x00\x10\x05[\x0fC\x00P\x00y\x00S\x00u\x00m\x00o\x00W\x00i\x00d\x00g\x00e\x00t\x00.\x00c\x00s\x00s\x00\x0d\x0d\xd42\xe3\x00S\x00t\x00a\x00t\x00u\x00s\x00b\x00a\x00r\x00.\x00c\x00s\x00s\x00\x0b\x083\x86\xe3\x00T\x00o\x00o\x00l\x00b\x00a\x00r\x00.\x00c\x00s\x00s"
qt_resource_struct = b"\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x02\x00\x00\x00\x05\x00\x00\x00\x02\x00\x00\x00J\x00\x00\x00\x00\x00\x01\x00\x00\x00\x08\x00\x00\x00.\x00\x00\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x90\x00\x00\x00\x00\x00\x01\x00\x00\x00I\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00p\x00\x00\x00\x00\x00\x01\x00\x00\x00\x0c"
def qInitResources():
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()
| 70.454545
| 488
| 0.75871
| 300
| 1,550
| 3.86
| 0.32
| 0.373057
| 0.396373
| 0.331606
| 0.43696
| 0.421416
| 0.380829
| 0.354922
| 0.274611
| 0.119171
| 0
| 0.298222
| 0.056774
| 1,550
| 21
| 489
| 73.809524
| 0.493844
| 0.117419
| 0
| 0
| 0
| 0.333333
| 0.731618
| 0.678676
| 0
| 0
| 0.005882
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.111111
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
f9e2a6cf566ceeaab2c7f9874c63accbd13dbe53
| 88
|
py
|
Python
|
project/server/main/__init__.py
|
ardikabs/dnsmanager
|
4d2f302ea9f54fd4d5416328dc46a1c47b573e5b
|
[
"MIT"
] | 1
|
2019-01-15T10:33:04.000Z
|
2019-01-15T10:33:04.000Z
|
project/server/main/__init__.py
|
ardikabs/dnsmanager
|
4d2f302ea9f54fd4d5416328dc46a1c47b573e5b
|
[
"MIT"
] | null | null | null |
project/server/main/__init__.py
|
ardikabs/dnsmanager
|
4d2f302ea9f54fd4d5416328dc46a1c47b573e5b
|
[
"MIT"
] | null | null | null |
from . import modules
def init_app(app, **kwargs):
modules.init_app(app, **kwargs)
| 17.6
| 35
| 0.693182
| 13
| 88
| 4.538462
| 0.538462
| 0.237288
| 0.338983
| 0.542373
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159091
| 88
| 5
| 35
| 17.6
| 0.797297
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 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
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 8
|
dda43962342edb0739a7efdbd01b8d80c87c5e19
| 26,474
|
py
|
Python
|
libica/openapi/libgds/api/volumes_api.py
|
umccr-illumina/libica
|
916d27eea499f29bee590268b84208effb0cc576
|
[
"MIT"
] | null | null | null |
libica/openapi/libgds/api/volumes_api.py
|
umccr-illumina/libica
|
916d27eea499f29bee590268b84208effb0cc576
|
[
"MIT"
] | 4
|
2021-11-15T10:47:51.000Z
|
2022-02-22T04:43:20.000Z
|
libica/openapi/libgds/api/volumes_api.py
|
umccr-illumina/libica
|
916d27eea499f29bee590268b84208effb0cc576
|
[
"MIT"
] | null | null | null |
# coding: utf-8
"""
Genomic Data Store Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from libica.openapi.libgds.api_client import ApiClient
from libica.openapi.libgds.exceptions import ( # noqa: F401
ApiTypeError,
ApiValueError
)
class VolumesApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def create_volume(self, body, **kwargs): # noqa: E501
"""Create a volume in GDS and receive temporary credentials for upload # noqa: E501
Create a volume in GDS to hold folders and files. Returns upload credentials to the root folder of the volume when the include=objectStoreAccess parameter is used. You must create a volume prior to uploading files or folders. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_volume(body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param CreateVolumeRequest body: (required)
:param str include: Optionally include additional fields in the response. Possible values: ObjectStoreAccess
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: CreateVolumeResponse
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.create_volume_with_http_info(body, **kwargs) # noqa: E501
def create_volume_with_http_info(self, body, **kwargs): # noqa: E501
"""Create a volume in GDS and receive temporary credentials for upload # noqa: E501
Create a volume in GDS to hold folders and files. Returns upload credentials to the root folder of the volume when the include=objectStoreAccess parameter is used. You must create a volume prior to uploading files or folders. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_volume_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param CreateVolumeRequest body: (required)
:param str include: Optionally include additional fields in the response. Possible values: ObjectStoreAccess
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(CreateVolumeResponse, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = [
'body',
'include'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method create_volume" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
local_var_params['body'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `body` when calling `create_volume`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'include' in local_var_params and local_var_params['include'] is not None: # noqa: E501
query_params.append(('include', local_var_params['include'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/v1/volumes', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='CreateVolumeResponse', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_volume(self, volume_id, **kwargs): # noqa: E501
"""Deletes a volume by Id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_volume(volume_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str volume_id: Unique identifier for the Volume to be deleted. (required)
:param bool purge_object_store_data: Optional and for BYOB only. If true, the volume's data in object storage will be erased. This field is ignored for non-BYOB volumes where the object store data is always removed upon deleting the volume.
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: VolumeResponse
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.delete_volume_with_http_info(volume_id, **kwargs) # noqa: E501
def delete_volume_with_http_info(self, volume_id, **kwargs): # noqa: E501
"""Deletes a volume by Id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_volume_with_http_info(volume_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str volume_id: Unique identifier for the Volume to be deleted. (required)
:param bool purge_object_store_data: Optional and for BYOB only. If true, the volume's data in object storage will be erased. This field is ignored for non-BYOB volumes where the object store data is always removed upon deleting the volume.
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(VolumeResponse, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = [
'volume_id',
'purge_object_store_data'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_volume" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'volume_id' is set
if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501
local_var_params['volume_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `volume_id` when calling `delete_volume`") # noqa: E501
collection_formats = {}
path_params = {}
if 'volume_id' in local_var_params:
path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501
query_params = []
if 'purge_object_store_data' in local_var_params and local_var_params['purge_object_store_data'] is not None: # noqa: E501
query_params.append(('purgeObjectStoreData', local_var_params['purge_object_store_data'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/v1/volumes/{volumeId}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='VolumeResponse', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def get_volume(self, volume_id, **kwargs): # noqa: E501
"""Get information for the specified volume ID or volume name # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_volume(volume_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str volume_id: Unique identifier for the volume to retrieve information for. (required)
:param str tenant_id: Optional parameter to see shared data in another tenant
:param str metadata_include: Optional parameter to specify comma separated patterns to include metadata by their field names.
:param str metadata_exclude: Optional parameter to specify comma separated patterns to exclude metadata by their field names.
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: VolumeResponse
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.get_volume_with_http_info(volume_id, **kwargs) # noqa: E501
def get_volume_with_http_info(self, volume_id, **kwargs): # noqa: E501
"""Get information for the specified volume ID or volume name # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_volume_with_http_info(volume_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str volume_id: Unique identifier for the volume to retrieve information for. (required)
:param str tenant_id: Optional parameter to see shared data in another tenant
:param str metadata_include: Optional parameter to specify comma separated patterns to include metadata by their field names.
:param str metadata_exclude: Optional parameter to specify comma separated patterns to exclude metadata by their field names.
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(VolumeResponse, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = [
'volume_id',
'tenant_id',
'metadata_include',
'metadata_exclude'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_volume" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'volume_id' is set
if self.api_client.client_side_validation and ('volume_id' not in local_var_params or # noqa: E501
local_var_params['volume_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `volume_id` when calling `get_volume`") # noqa: E501
collection_formats = {}
path_params = {}
if 'volume_id' in local_var_params:
path_params['volumeId'] = local_var_params['volume_id'] # noqa: E501
query_params = []
if 'tenant_id' in local_var_params and local_var_params['tenant_id'] is not None: # noqa: E501
query_params.append(('tenantId', local_var_params['tenant_id'])) # noqa: E501
if 'metadata_include' in local_var_params and local_var_params['metadata_include'] is not None: # noqa: E501
query_params.append(('metadata.include', local_var_params['metadata_include'])) # noqa: E501
if 'metadata_exclude' in local_var_params and local_var_params['metadata_exclude'] is not None: # noqa: E501
query_params.append(('metadata.exclude', local_var_params['metadata_exclude'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/v1/volumes/{volumeId}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='VolumeResponse', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def list_volumes(self, **kwargs): # noqa: E501
"""Get a list of volumes # noqa: E501
Get a list of volumes accessible by the current JWT token’s tenant ID in GDS. The default sort returned is alphabetical, ascending. The default page size is 10 items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_volumes(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param int page_size: START_DESC END_DESC
:param str page_token: START_DESC END_DESC
:param str include: Optionally include additional fields in the response. Multiple fields can be included by comma-separation. Possible values: TotalItemCount, InheritedAcl
:param str tenant_id: Optional parameter to see shared data in another tenant
:param str volume_configuration_name: Unique name of the volume configuration
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: VolumeListResponse
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.list_volumes_with_http_info(**kwargs) # noqa: E501
def list_volumes_with_http_info(self, **kwargs): # noqa: E501
"""Get a list of volumes # noqa: E501
Get a list of volumes accessible by the current JWT token’s tenant ID in GDS. The default sort returned is alphabetical, ascending. The default page size is 10 items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_volumes_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param int page_size: START_DESC END_DESC
:param str page_token: START_DESC END_DESC
:param str include: Optionally include additional fields in the response. Multiple fields can be included by comma-separation. Possible values: TotalItemCount, InheritedAcl
:param str tenant_id: Optional parameter to see shared data in another tenant
:param str volume_configuration_name: Unique name of the volume configuration
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(VolumeListResponse, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = [
'page_size',
'page_token',
'include',
'tenant_id',
'volume_configuration_name'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method list_volumes" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] > 1000: # noqa: E501
raise ApiValueError("Invalid value for parameter `page_size` when calling `list_volumes`, must be a value less than or equal to `1000`") # noqa: E501
if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] < 0: # noqa: E501
raise ApiValueError("Invalid value for parameter `page_size` when calling `list_volumes`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501
query_params.append(('pageSize', local_var_params['page_size'])) # noqa: E501
if 'page_token' in local_var_params and local_var_params['page_token'] is not None: # noqa: E501
query_params.append(('pageToken', local_var_params['page_token'])) # noqa: E501
if 'include' in local_var_params and local_var_params['include'] is not None: # noqa: E501
query_params.append(('include', local_var_params['include'])) # noqa: E501
if 'tenant_id' in local_var_params and local_var_params['tenant_id'] is not None: # noqa: E501
query_params.append(('tenantId', local_var_params['tenant_id'])) # noqa: E501
if 'volume_configuration_name' in local_var_params and local_var_params['volume_configuration_name'] is not None: # noqa: E501
query_params.append(('volumeConfigurationName', local_var_params['volume_configuration_name'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/v1/volumes', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='VolumeListResponse', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
| 49.116883
| 261
| 0.619136
| 3,087
| 26,474
| 5.082604
| 0.088111
| 0.04385
| 0.069598
| 0.022945
| 0.914532
| 0.899809
| 0.893435
| 0.888273
| 0.875398
| 0.855577
| 0
| 0.014802
| 0.310984
| 26,474
| 538
| 262
| 49.208178
| 0.845348
| 0.480018
| 0
| 0.660232
| 1
| 0.007722
| 0.196854
| 0.042631
| 0
| 0
| 0
| 0
| 0
| 1
| 0.034749
| false
| 0
| 0.019305
| 0
| 0.088803
| 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
|
ddf3aa22469fb9543ce65c54187ad310deed6e44
| 67,701
|
py
|
Python
|
src/genie/libs/parser/iosxe/tests/ShowIpBgpDetail/cli/equal/golden_output2_expected.py
|
balmasea/genieparser
|
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
|
[
"Apache-2.0"
] | 204
|
2018-06-27T00:55:27.000Z
|
2022-03-06T21:12:18.000Z
|
src/genie/libs/parser/iosxe/tests/ShowIpBgpDetail/cli/equal/golden_output2_expected.py
|
balmasea/genieparser
|
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
|
[
"Apache-2.0"
] | 468
|
2018-06-19T00:33:18.000Z
|
2022-03-31T23:23:35.000Z
|
src/genie/libs/parser/iosxe/tests/ShowIpBgpDetail/cli/equal/golden_output2_expected.py
|
balmasea/genieparser
|
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
|
[
"Apache-2.0"
] | 309
|
2019-01-16T20:21:07.000Z
|
2022-03-30T12:56:41.000Z
|
expected_output = {
"instance": {
"default": {
"vrf": {
"L3VPN-0050": {
"address_family": {
"vpnv4": {
"default_vrf": "L3VPN-0050",
"prefixes": {
"10.4.1.0/24": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2467",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933597",
},
"10.44.105.0/24": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "6620",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933498",
},
"172.16.100.10/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2904",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933541",
},
"172.16.100.11/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2903",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933540",
},
"172.16.100.12/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2901",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933539",
},
"172.16.100.13/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "5466",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933538",
},
"172.16.100.14/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "5465",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933537",
},
"172.16.100.15/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "5464",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933536",
},
"172.16.100.16/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2914",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933551",
},
"172.16.100.17/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2913",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933550",
},
"172.16.100.18/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2912",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933549",
},
"172.16.100.19/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2911",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933548",
},
"172.16.100.2/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"community": "62000:2",
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2468",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933598",
},
"172.16.100.20/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2910",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933547",
},
"172.16.100.21/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2909",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933546",
},
"172.16.100.22/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2908",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933545",
},
"172.16.100.23/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2907",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933544",
},
"172.16.100.24/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2923",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933559",
},
"172.16.100.25/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2922",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933558",
},
"172.16.100.26/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2920",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933557",
},
"172.16.100.27/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2919",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933556",
},
"172.16.100.28/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2918",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933555",
},
"172.16.100.29/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2917",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933554",
},
"172.16.100.3/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "5463",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933535",
},
"172.16.100.30/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2916",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933553",
},
"172.16.100.31/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2915",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933552",
},
"172.16.100.32/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "6630",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933506",
},
"172.16.100.33/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "6629",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933505",
},
"172.16.100.34/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "6627",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933504",
},
"172.16.100.35/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "6626",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933503",
},
"172.16.100.36/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "6625",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933502",
},
"172.16.100.37/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "6624",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933501",
},
"172.16.100.38/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "6623",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933500",
},
"172.16.100.4/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "5462",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933534",
},
"172.16.100.5/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "5461",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933533",
},
"172.16.100.6/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "5460",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933532",
},
"172.16.100.7/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "5459",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933531",
},
"172.16.100.8/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2906",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933543",
},
"172.16.100.9/32": {
"available_path": "1",
"best_path": "1",
"index": {
1: {
"ext_community": "RT:5918:50",
"gateway": "192.168.10.253",
"localpref": 100,
"metric": 0,
"mpls_labels": {
"in": "2905",
"out": "nolabel",
},
"next_hop": "192.168.10.253",
"next_hop_via": "vrf L3VPN-0050",
"origin_codes": "?",
"originator": "192.168.10.253",
"recipient_pathid": "0",
"refresh_epoch": 1,
"route_info": "62000",
"status_codes": "*>",
"transfer_pathid": "0x0",
"update_group": 724,
}
},
"paths": "1 available, best #1, table L3VPN-0050",
"table_version": "16933542",
},
},
"route_distinguisher": "5918:50",
}
}
}
}
}
}
}
| 60.936994
| 86
| 0.203084
| 3,139
| 67,701
| 4.192737
| 0.05575
| 0.053339
| 0.071119
| 0.097789
| 0.926601
| 0.926601
| 0.926601
| 0.926601
| 0.926601
| 0.924246
| 0
| 0.184565
| 0.706208
| 67,701
| 1,110
| 87
| 60.991892
| 0.477124
| 0
| 0
| 0.736937
| 0
| 0
| 0.214487
| 0
| 0
| 0
| 0.001728
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
fb2b12951a9311d135394c012f89a0e99ed10eee
| 13,425
|
py
|
Python
|
mtp_cashbook/apps/disbursements/tests/test_functional.py
|
uk-gov-mirror/ministryofjustice.money-to-prisoners-cashbook
|
d35a621e21631e577faacaeacb5ab9f883c9b4f4
|
[
"MIT"
] | 4
|
2016-01-05T12:21:39.000Z
|
2016-12-22T15:56:37.000Z
|
mtp_cashbook/apps/disbursements/tests/test_functional.py
|
uk-gov-mirror/ministryofjustice.money-to-prisoners-cashbook
|
d35a621e21631e577faacaeacb5ab9f883c9b4f4
|
[
"MIT"
] | 132
|
2015-06-10T09:53:14.000Z
|
2022-02-01T17:35:54.000Z
|
mtp_cashbook/apps/disbursements/tests/test_functional.py
|
uk-gov-mirror/ministryofjustice.money-to-prisoners-cashbook
|
d35a621e21631e577faacaeacb5ab9f883c9b4f4
|
[
"MIT"
] | 3
|
2015-07-07T14:40:33.000Z
|
2021-04-11T06:20:14.000Z
|
from django.utils.crypto import get_random_string
from cashbook.tests.test_functional import CashbookTestCase
from disbursements.templatetags.disbursements import format_sortcode
class DisbursementTestCase(CashbookTestCase):
def tearDown(self):
self.click_logout()
def click_button(self, text=None):
buttons = self.driver.find_elements_by_class_name('govuk-button')
if text:
button = None
for button in buttons:
if button.text.strip() == text or button.get_attribute('value') == text:
break
button = None
self.assertIsNotNone(button)
else:
self.assertEqual(len(buttons), 1)
button = buttons[0]
button.click()
def test_create_bank_transfer_disbursement(self):
self.login(self.username, self.username)
self.assertShowingView('home')
self.click_on_text('Digital disbursements')
self.assertShowingView('disbursements:start')
self.click_button('Start now')
self.assertShowingView('disbursements:sending_method')
self.click_on_text_substring('Bank transfer')
self.click_button('Next')
self.assertShowingView('disbursements:prisoner')
self.fill_in_form({
'id_prisoner_number': 'A1401AE',
})
self.click_button('Next')
self.assertShowingView('disbursements:prisoner_check')
self.assertInSource('JILLY HALL')
self.click_on_text_substring('Yes')
self.click_button('Next')
self.assertShowingView('disbursements:amount')
self.fill_in_form({
'id_amount': '11a',
})
self.click_button('Next')
self.assertShowingView('disbursements:amount')
self.assertInSource('Enter amount as a number')
self.get_element('id_amount').clear()
self.fill_in_form({
'id_amount': '11',
})
self.click_button('Next')
self.assertShowingView('disbursements:recipient_contact')
contact_form = {
'id_recipient_first_name': 'Mary-' + get_random_string(3),
'id_recipient_last_name': 'Halls-' + get_random_string(3),
'id_recipient_email': 'mary-halls-' + get_random_string(3) + '@outside.local',
}
self.fill_in_form(contact_form)
self.click_button('Next')
self.assertShowingView('disbursements:recipient_postcode')
postcode_form = {
'id_postcode': 'PostCode-' + get_random_string(3),
}
self.fill_in_form(postcode_form)
self.click_button('Find address')
self.assertShowingView('disbursements:recipient_address')
address_form = {
'id_address_line1': 'Street-' + get_random_string(3),
'id_city': 'City-' + get_random_string(3),
'id_postcode': 'PostCode-' + get_random_string(3),
}
self.fill_in_form(address_form)
self.click_button('Next')
self.assertShowingView('disbursements:recipient_bank_account')
self.assertInSource('%s %s' % (contact_form['id_recipient_first_name'],
contact_form['id_recipient_last_name']))
bank_account = {
'id_sort_code': get_random_string(6, '0123456789'),
'id_account_number': get_random_string(8, '0123456789'),
}
self.fill_in_form(bank_account)
self.click_button('Next')
self.assertShowingView('disbursements:remittance_description')
self.click_on_text_substring('Yes')
self.type_in('id_remittance_description', 'LEGAL FEES')
self.click_button('Next')
self.assertShowingView('disbursements:details_check')
self.assertInSource('Bank transfer')
self.assertInSource('£11.00')
for key in ('id_recipient_first_name', 'id_recipient_last_name',
'id_recipient_email'):
self.assertInSource(contact_form[key])
for key in ('id_address_line1', 'id_city'):
self.assertInSource(address_form[key])
self.assertInSource(address_form['id_postcode'].upper())
self.assertInSource(format_sortcode(bank_account['id_sort_code']))
self.assertInSource(bank_account['id_account_number'])
self.assertInSource('JILLY HALL')
self.assertInSource('A1401AE')
self.assertInSource('LEGAL FEES')
self.click_on_text_substring('No')
try:
self.click_button('Next')
except AssertionError:
pass
self.assertShowingView('disbursements:details_check')
self.click_on_text_substring('Yes')
self.click_button('Next')
self.assertShowingView('disbursements:handover')
self.click_button()
self.assertShowingView('disbursements:created')
self.assertInSource('request is ready for your colleague')
self.click_logout()
# log in as another user to confirm request
self.login(self.username + '-ua', self.username + '-ua')
self.assertShowingView('home')
self.click_on_text('Digital disbursements')
self.click_on_text('Confirm payments')
self.assertShowingView('disbursements:pending_list')
self.assertInSource(contact_form['id_recipient_first_name'])
self.assertInSource(contact_form['id_recipient_last_name'])
self.driver.find_element_by_xpath(
'//*[text()[contains(.,"' + contact_form['id_recipient_first_name'] + '")]]/..'
).find_element_by_class_name('govuk-button').click()
self.assertShowingView('disbursements:pending_detail')
self.assertInSource(contact_form['id_recipient_first_name'])
self.assertInSource('entered by HMP Leeds Clerk')
self.click_on_text_substring('Yes')
self.click_button('Confirm payment')
self.assertShowingView('disbursements:confirmed')
self.assertInSource('request sent to SSCL')
self.click_on_text_substring('Confirm another payment')
self.assertShowingView('disbursements:pending_list')
self.assertNotInSource(contact_form['id_recipient_first_name'])
self.click_logout()
# search for new request
self.login(self.username, self.username)
self.assertShowingView('home')
self.click_on_text('Digital disbursements')
self.click_on_link('Payments made')
self.assertShowingView('disbursements:search')
self.click_on_link('Recipient')
self.type_in('id_recipient_name', contact_form['id_recipient_first_name'], send_return=True)
self.assertShowingView('disbursements:search')
self.assertNotInSource('There was a problem')
self.get_element('id_recipient_name').clear()
self.click_on_link('Recipient')
self.assertInSource('Entered by HMP Leeds Clerk')
self.assertInSource('Confirmed by HMP Leeds Clerk')
self.assertInSource('Bank transfer')
self.assertInSource('£11.00')
for key in ('id_recipient_first_name', 'id_recipient_last_name', 'id_address_line1', 'id_city'):
self.assertInSource(contact_form[key])
self.assertInSource(contact_form['id_postcode'].upper())
self.assertInSource(format_sortcode(bank_account['id_sort_code']))
self.assertInSource(bank_account['id_account_number'])
self.assertInSource('JILLY HALL')
self.assertInSource('A1401AE')
def test_create_cheque_disbursement_to_company(self):
self.login(self.username, self.username)
self.assertShowingView('home')
self.click_on_text('Digital disbursements')
self.assertShowingView('disbursements:start')
self.click_button('Start now')
self.assertShowingView('disbursements:sending_method')
self.click_on_text_substring('Cheque')
self.click_button('Next')
self.assertShowingView('disbursements:prisoner')
self.fill_in_form({
'id_prisoner_number': 'A1401AE',
})
self.click_button('Next')
self.assertShowingView('disbursements:prisoner_check')
self.assertInSource('JILLY HALL')
self.click_on_text_substring('Yes')
self.click_button('Next')
self.assertShowingView('disbursements:amount')
self.fill_in_form({
'id_amount': '11a',
})
self.click_button('Next')
self.assertShowingView('disbursements:amount')
self.assertInSource('Enter amount as a number')
self.get_element('id_amount').clear()
self.fill_in_form({
'id_amount': '11',
})
self.click_button('Next')
self.assertShowingView('disbursements:recipient_contact')
self.click_on_text_substring('Company')
contact_form = {
'id_recipient_company_name': 'Boots-' + get_random_string(3),
}
self.fill_in_form(contact_form)
self.click_button('Next')
self.assertShowingView('disbursements:recipient_postcode')
postcode_form = {
'id_postcode': 'PostCode-' + get_random_string(3),
}
self.fill_in_form(postcode_form)
self.click_button('Find address')
self.assertShowingView('disbursements:recipient_address')
address_form = {
'id_address_line1': 'Street-' + get_random_string(3),
'id_city': 'City-' + get_random_string(3),
'id_postcode': 'PostCode-' + get_random_string(3),
}
self.fill_in_form(address_form)
self.click_button('Next')
self.assertShowingView('disbursements:remittance_description')
self.click_on_text_substring('Yes')
self.type_in('id_remittance_description', 'LEGAL FEES')
self.click_on_text_substring('No')
self.click_button('Next')
self.assertShowingView('disbursements:details_check')
self.assertInSource('Cheque')
self.assertInSource('£11.00')
for key in ('id_recipient_company_name',):
self.assertInSource(contact_form[key])
for key in ('id_address_line1', 'id_city'):
self.assertInSource(address_form[key])
self.assertInSource(address_form['id_postcode'].upper())
self.assertInSource('Company:')
self.assertInSource('JILLY HALL')
self.assertInSource('A1401AE')
self.assertNotInSource('LEGAL FEES')
self.assertInSource('Payment from JILLY HALL')
self.click_on_text_substring('No')
try:
self.click_button('Next')
except AssertionError:
pass
self.assertShowingView('disbursements:details_check')
self.click_on_text_substring('Yes')
self.click_button('Next')
self.assertShowingView('disbursements:handover')
self.get_element('.govuk-button').click()
self.assertShowingView('disbursements:created')
self.assertInSource('request is ready for your colleague')
self.click_logout()
# log in as another user to confirm request
self.login(self.username + '-ua', self.username + '-ua')
self.assertShowingView('home')
self.click_on_text('Digital disbursements')
self.click_on_text('Confirm payments')
self.assertShowingView('disbursements:pending_list')
self.assertInSource(contact_form['id_recipient_first_name'])
self.assertInSource(contact_form['id_recipient_last_name'])
self.driver.find_element_by_xpath(
'//*[text()[contains(.,"' + contact_form['id_recipient_first_name'] + '")]]/..'
).find_element_by_class_name('govuk-button').click()
self.assertShowingView('disbursements:pending_detail')
self.assertInSource(contact_form['id_recipient_first_name'])
self.assertInSource('entered by HMP Leeds Clerk')
self.click_on_text_substring('Yes')
self.click_button('Confirm payment')
self.assertShowingView('disbursements:confirmed')
self.assertInSource('request sent to SSCL')
self.click_on_text_substring('Confirm another payment')
self.assertShowingView('disbursements:pending_list')
self.assertNotInSource(contact_form['id_recipient_company_name'])
self.click_logout()
# search for new request
self.login(self.username, self.username)
self.assertShowingView('home')
self.click_on_text('Digital disbursements')
self.click_on_link('Payments made')
self.assertShowingView('disbursements:search')
self.click_on_link('Recipient')
self.type_in('id_recipient_name', contact_form['id_recipient_company_name'], send_return=True)
self.assertShowingView('disbursements:search')
self.assertNotInSource('There was a problem')
self.get_element('id_recipient_name').clear()
self.click_on_link('Recipient')
self.assertInSource('Entered by HMP Leeds Clerk')
self.assertInSource('Confirmed by HMP Leeds Clerk')
self.assertInSource('Cheque')
self.assertInSource('£11.00')
for key in ('id_recipient_company_name', 'id_address_line1', 'id_city'):
self.assertInSource(contact_form[key])
self.assertInSource(contact_form['id_postcode'].upper())
self.assertInSource('JILLY HALL')
self.assertInSource('A1401AE')
| 39.60177
| 104
| 0.659367
| 1,438
| 13,425
| 5.874826
| 0.111961
| 0.067116
| 0.165009
| 0.042614
| 0.901042
| 0.890033
| 0.864702
| 0.85902
| 0.846946
| 0.845881
| 0
| 0.008657
| 0.225624
| 13,425
| 338
| 105
| 39.718935
| 0.803578
| 0.009609
| 0
| 0.805054
| 0
| 0
| 0.263186
| 0.111429
| 0
| 0
| 0
| 0
| 0.397112
| 1
| 0.01444
| false
| 0.00722
| 0.01083
| 0
| 0.028881
| 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
|
3491ecdf0d743d67d90929ff69bd755f765fc9ba
| 44,309
|
py
|
Python
|
src/module_factions.py
|
faycalki/medieval-conquests
|
113e13e2b166b79517c14f2c13f7561307a89f75
|
[
"MIT"
] | 7
|
2019-08-11T14:20:20.000Z
|
2021-11-21T06:48:24.000Z
|
src/module_factions.py
|
faycalki/medieval-conquests
|
113e13e2b166b79517c14f2c13f7561307a89f75
|
[
"MIT"
] | null | null | null |
src/module_factions.py
|
faycalki/medieval-conquests
|
113e13e2b166b79517c14f2c13f7561307a89f75
|
[
"MIT"
] | null | null | null |
# -*- coding: utf8 -*-
from header_factions import *
####################################################################################################################
# Each faction record contains the following fields:
# 1) Faction id: used for referencing factions in other files.
# The prefix fac_ is automatically added before each faction id.
# 2) Faction name.
# 3) Faction flags. See header_factions.py for a list of available flags
# 4) Faction coherence. Relation between members of this faction.
# 5) Relations. This is a list of relation records.
# Each relation record is a tuple that contains the following fields:
# 5.1) Faction. Which other faction this relation is referring to
# 5.2) Value: Relation value between the two factions.
# Values range between -1 and 1.
# 6) Ranks
# 7) Faction color (default is gray)
####################################################################################################################
factions = [
("no_faction", "No Faction", 0, 0.9, []),
("commoners", "Commoners", 0, 0.1, [("forest_bandits",-0.20),("player_faction",0.10),("mountain_bandits",-0.20),("undeads",-0.70),("outlaws",-0.60)]),
("outlaws", "Outlaws", 0, 0.5, [("kingdom_9",-0.05),("kingdom_15",-0.05),("kingdom_23",-0.05),("kingdom_3",-0.05),("kingdom_24",-0.05),("kingdom_10",-0.05),("kingdom_1",-0.05),("kingdom_20",-0.05),("kingdom_13",-0.05),("kingdom_19",-0.05),("kingdom_36",-0.05),("kingdom_11",-0.05),("player_supporters_faction",-0.05),("kingdom_34",-0.05),("kingdom_37",-0.05),("kingdom_25",-0.05),("kingdom_8",-0.05),("kingdom_5",-0.05),("kingdom_42",-0.05),("kingdom_2",-0.05),("kingdom_31",-0.05),("merchants",-0.50),("kingdom_22",-0.05),("kingdom_32",-0.05),("innocents",-0.05),("kingdom_35",-0.05),("player_faction",-0.15),("kingdom_18",-0.05),("kingdom_26",-0.05),("papacy",-0.05),("kingdom_38",-0.05),("kingdom_28",-0.05),("crusade",-0.05),("kingdom_39",-0.05),("kingdom_30",-0.05),("manhunters",-0.60),("kingdom_7",-0.05),("kingdom_16",-0.05),("kingdom_6",-0.05),("kingdom_12",-0.05),("kingdom_33",-0.05),("kingdom_40",-0.05),("kingdom_4",-0.05),("kingdom_29",-0.05),("commoners",-0.60),("kingdom_41",-0.05),("kingdom_14",-0.05),("kingdom_17",-0.05),("kingdom_27",-0.05)], [], 0x00888888),
("neutral", "Neutral", 0, 0.1, [], [], 0x00ffffff),
("innocents", "Innocents", ff_always_hide_label, 0.5, [("outlaws",-0.05),("dark_knights",-0.90)]),
("merchants", "Merchants", ff_always_hide_label, 0.5, [("forest_bandits",-0.50),("deserters",-0.50),("mountain_bandits",-0.50),("outlaws",-0.50)]),
("dark_knights", "{!}Dark Knights", 0, 0.5, [("innocents",-0.90),("player_faction",-0.40)]),
("culture_finnish", "{!}culture finnish", 0, 0.9, []),
("culture_mazovian", "{!}culture mazovian", 0, 0.9, []),
("culture_serbian", "{!}culture serbian", 0, 0.9, []),
("culture_welsh", "{!}culture welsh", 0, 0.9, []),
("culture_teutonic", "{!}culture teutonic", 0, 0.9, []),
("culture_balkan", "{!}culture balkan", 0, 0.9, []),
("culture_rus", "{!}culture rus", 0, 0.9, []),
("culture_nordic", "{!}culture nordic", 0, 0.9, []),
("culture_baltic", "{!}culture baltic", 0, 0.9, []),
("culture_marinid", "{!}culture marinid", 0, 0.9, []),
("culture_mamluke", "{!}culture mamluke", 0, 0.9, []),
("culture_byzantium", "{!}culture byzantium", 0, 0.9, []),
("culture_iberian", "{!}culture iberian", 0, 0.9, []),
("culture_italian", "{!}culture italian", 0, 0.9, []),
("culture_andalus", "{!}culture andalus", 0, 0.9, []),
("culture_gaelic", "{!}culture gaelic", 0, 0.9, []),
("culture_anatolian_christian", "{!}culture anatolian", 0, 0.9, []),
("culture_anatolian", "{!}culture anatolian", 0, 0.9, []),
("culture_scotish", "{!}culture scotish", 0, 0.9, []),
("culture_western", "{!}culture western", 0, 0.9, []),
("culture_mongol", "{!}culture mongol", 0, 0.9, []),
("player_faction", "Player Faction", 0, 0.9, [("black_khergits",-0.30),("player_supporters_faction",1.00),("peasant_rebels",-0.40),("forest_bandits",-0.15),("manhunters",0.10),("deserters",-0.10),("mountain_bandits",-0.15),("undeads",-0.50),("outlaws",-0.15),("dark_knights",-0.40),("commoners",0.10)], [], 0x00cccccc),
("player_supporters_faction", "Player's Supporters", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("player_faction",1.00),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00468493),
("kingdom_1", "Teutonic Order", 0, 0.9, [("black_khergits",-0.02),("kingdom_8",-0.20),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("kingdom_6",0.50),("mountain_bandits",-0.05),("outlaws",-0.05),("kingdom_75",-0.50),("kingdom_76",-0.50),("kingdom_77",-0.50),("kingdom_78",-0.50),("kingdom_4",0.10),("kingdom_14",0.10),("kingdom_43",-40.00)], [], 0x00e9e9e9),
("kingdom_2", "Kingdom of Lithuania", 0, 0.9, [("black_khergits",-0.02),("kingdom_3",0.10),("kingdom_36",0.50),("kingdom_34",0.50),("peasant_rebels",-0.10),("forest_bandits",-0.05),("kingdom_35",0.50),("crusade",-0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05),("kingdom_33",0.50)], [], 0x00badeb2),
("kingdom_3", "Golden Horde", 0, 0.9, [("kingdom_8",0.10),("kingdom_5",-1.00),("kingdom_2",0.10),("peasant_rebels",-0.10),("forest_bandits",-0.05),("crusade",-0.50),("deserters",-0.02),("kingdom_7",-1.00),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00a33e32),
("kingdom_4", "Kingdom of Denmark", 0, 0.9, [("kingdom_1",0.10),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x009b1a1a),
("kingdom_5", "Polish Principalities", 0, 0.9, [("kingdom_3",-1.00),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("kingdom_7",0.10),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00ff0000),
("kingdom_6", "Holy Roman Empire", 0, 0.9, [("kingdom_1",0.50),("kingdom_42",1.00),("peasant_rebels",-0.10),("forest_bandits",-0.05),("kingdom_38",0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05),("kingdom_41",1.00)], [], 0x00ffcc00),
("kingdom_7", "Kingdom of Hungary", 0, 0.9, [("kingdom_3",-1.00),("kingdom_5",0.10),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00289327),
("kingdom_8", "Novgorod Republic", 0, 0.9, [("kingdom_3",0.10),("kingdom_1",-0.20),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05),("kingdom_14",-0.20)], [], 0x009e0b6f),
("kingdom_9", "Kingdom of England", 0, 0.9, [("kingdom_37",-1.00),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("kingdom_79",-0.50),("outlaws",-0.05)], [], 0x00931124),
("kingdom_10", "Kingdom of France", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00002395),
("kingdom_11", "Kingdom of Norway", 0, 0.9, [("kingdom_13",-0.20),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05),("kingdom_12",-0.20)], [], 0x006669d6),
("kingdom_12", "Kingdom of Scotland", 0, 0.9, [("kingdom_11",-0.20),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x0022d8a7),
("kingdom_13", "Gaelic Kingdoms", 0, 0.9, [("kingdom_11",-0.20),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x0077b322),
("kingdom_14", "Kingdom of Sweden", 0, 0.9, [("kingdom_1",0.10),("kingdom_8",-0.20),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x003254b5),
("kingdom_15", "Kingdom of Halych-Volhynia", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00ece874),
("kingdom_16", "Kingdom of Portugal", 0, 0.9, [("kingdom_20",-40.00),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00003399),
("kingdom_17", "Crown of Aragon", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x0007b233),
("kingdom_18", "Crown of Castile", 0, 0.9, [("kingdom_20",-40.00),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00d85ac4),
("kingdom_19", "Kingdom of Navarre", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00f7f497),
("kingdom_20", "Emirate of Granada", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("kingdom_18",-40.00),("crusade",-0.50),("deserters",-0.02),("kingdom_16",-40.00),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00abc904),
("papacy", "Papal States", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("crusade",-0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00fff17a),
("kingdom_22", "Byzantine Empire", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("kingdom_26",-1.00),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00760d0d),
("kingdom_23", "Crusader States", 0, 0.9, [("kingdom_25",-1.00),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05),("kingdom_27",0.10)], [], 0x00f3efb8),
("kingdom_24", "Kingdom of Sicily", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00799cb5),
("kingdom_25", "Mamluk Sultanate", 0, 0.9, [("kingdom_23",-1.00),("peasant_rebels",-0.10),("forest_bandits",-0.05),("crusade",-0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05),("kingdom_27",-1.00)], [], 0x00ebe800),
("kingdom_26", "Latin Empire", 0, 0.9, [("peasant_rebels",-0.10),("kingdom_22",-1.00),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00b26248),
("kingdom_27", "Ilkhanate", 0, 0.9, [("kingdom_23",0.10),("kingdom_25",-1.00),("peasant_rebels",-0.10),("forest_bandits",-0.05),("crusade",-0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00e19004),
("kingdom_28", "Hafsid Dynasty", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("crusade",-0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00a48460),
("kingdom_29", "Kingdom of Serbia", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00b38263),
("kingdom_30", "Bulgarian Empire", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x0076a296),
("kingdom_31", "Marinid Dynasty", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("crusade",-0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00c1272d),
("kingdom_32", "Republic of Venice", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00c1172d),
("kingdom_33", "Yotvingians", 0, 0.9, [("kingdom_2",0.50),("peasant_rebels",-0.10),("forest_bandits",-0.05),("crusade",-0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x003e7583),
("kingdom_34", "Prussians", 0, 0.9, [("kingdom_2",0.50),("peasant_rebels",-0.10),("forest_bandits",-0.05),("crusade",-0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x0065c0d7),
("kingdom_35", "Curonians", 0, 0.9, [("kingdom_2",0.50),("peasant_rebels",-0.10),("forest_bandits",-0.05),("crusade",-0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x003e7583),
("kingdom_36", "Samogitians", 0, 0.9, [("kingdom_2",0.50),("peasant_rebels",-0.10),("forest_bandits",-0.05),("crusade",-0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00529cae),
("kingdom_37", "Principality of Wales", 0, 0.9, [("kingdom_9",-1.00),("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x0000dc00),
("kingdom_38", "Republic of Genoa", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("crusade",-0.50),("kingdom_39",-0.50),("deserters",-0.02),("kingdom_6",0.50),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00e1900a),
("kingdom_39", "Republic of Pisa", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("kingdom_38",-0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x0007e233),
("kingdom_40", "Guelphs", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05),("kingdom_41",-0.80)], [], 0x003254e5),
("kingdom_41", "Ghibellines", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("kingdom_6",1.00),("mountain_bandits",-0.05),("outlaws",-0.05),("kingdom_40",-0.80)], [], 0x009e026a),
("kingdom_42", "Kingdom of Bohemia", 0, 0.9, [("peasant_rebels",-0.10),("forest_bandits",-0.05),("deserters",-0.02),("kingdom_6",1.00),("mountain_bandits",-0.05),("outlaws",-0.05)], [], 0x00e8e8e8),
#####Kaos Safe Begin
#MAUAL EDITS REQUIRED
#####Kaos begin add factions correct major faction, also fix the colors for the factions, especially for the start as king/prince, as well as for the rebels/civ.
#Module factions Search for this line ("kingdoms_end","{!}kingdoms_end", 0, 0,[], []), and place these lines above it
#KAOS (POLITICAL)
#Begin rebels (They are only named this until they win the war, if they win the war) must be double amount of regular factions to test for simple_trigger errors, empire too. *42-84
("kingdom_43", "Teutonics-Prussians", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05),("kingdom_1", -40.00)], [], 0x00888888), #0x00c9c9c9 #Change colors here, as well as relations 0XCC9900 is color, ("forest_bandits", -0.05) means -5 relations against forest bandits, must apply to both factions.
("kingdom_44", "Wendish Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00698064),
("kingdom_45", "Pecheng Clan", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00813229),
("kingdom_46", "Kingdom of Scandinavia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x008a372d),
("kingdom_47", "Pomeralia Principalities", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00872f2f),
("kingdom_48", "Empire of Germania", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x008c7001),
("kingdom_49", "Empire of Carpathia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00278c25),
("kingdom_50", "Kievan Rus", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x006555d6), #0x00E714A3
("kingdom_51", "Kingdom of Brittania", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x006a1c12),
("kingdom_52", "New Francia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00243777),
("kingdom_53", "Kingdom of Norge", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x000f1d67),
("kingdom_54", "Chiefdom of Kemi", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00105a46),
("kingdom_55", "Kingdom of Ireland", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x0048720e),
("kingdom_56", "Chiefdom of Sapmi", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00314375),
("kingdom_57", "Kingdom of Galicia-Volhynia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00737013),
("kingdom_58", "Hispania", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00002b80),
("kingdom_59", "Principality of Catalonia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00035218),
("kingdom_60", "Crown of Leon", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00572850),
("kingdom_61", "Kingdom of Vasconia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x006d6b44),
("kingdom_62", "Ahlidid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00485500),
("kingdom_63", "Union of Papacy", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00817408),
("kingdom_64", "Eastern Roman Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00440000),
("kingdom_65", "Kingdom of Armenia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00858369),
("kingdom_66", "Kingdom of Apulia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x002c4557),
("kingdom_67", "Hashimid Emirate", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x006f6d00),
("kingdom_68", "Empire of Aegean", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x008c5341),
("kingdom_69", "Kingdom of Georgia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00ed370b), #Red
("kingdom_70", "Maghrawavid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x006F6457),
("kingdom_71", "Kingdom of Epirius", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00338681),
("kingdom_72", "Kingdom of Karvuna-Moesia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00394f49),
("kingdom_73", "Zayanid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00803739),
("kingdom_74", "Kingdom of Croatia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00881184),
("kingdom_75", "Middle Rurikid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("kingdom_1", -0.50),("kingdom_78", 0.85),("kingdom_76", 0.85),("kingdom_77", 0.85),("forest_bandits", -0.05)], [], 0x00566f75),
("kingdom_76", "West Rurikid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("kingdom_1", -0.50),("kingdom_75", 0.85),("kingdom_78", 0.85),("kingdom_77", 0.85),("forest_bandits", -0.05)], [], 0x0048DAFF),
("kingdom_77", "East Rurikid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("kingdom_1", -0.50),("kingdom_75", 0.85),("kingdom_76", 0.85),("kingdom_78", 0.85),("forest_bandits", -0.05)], [], 0x00B1EFFF),
("kingdom_78", "North Rurikid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("kingdom_1", -0.50),("kingdom_75", 0.85),("kingdom_76", 0.85),("kingdom_77", 0.85),("forest_bandits", -0.05)], [], 0x0028464f),
("kingdom_79", "Kingdom of Gwynedd", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("kingdom_9", -0.80),("forest_bandits", -0.05)], [], 0x00526652),
("kingdom_80", "Most Serene House Doria", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00FFAD26),
("kingdom_81", "Most Serene House D'Appiano", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00F19E0E),
("kingdom_82", "Kingdom of Italy", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00a19c7d),
("kingdom_83", "Kingdom of Florence", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x005d1144),
("kingdom_84", "Kingdom of House Premyslid", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x0075728a),
#End rebels
##Begin rebels old colors
# ("kingdom_43", "Teutonics-Prussians", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05),("kingdom_1", -40.00)], [], 0x00888888), #0x00c9c9c9 #Change colors here, as well as relations 0XCC9900 is color, ("forest_bandits", -0.05) means -5 relations against forest bandits, must apply to both factions.
# ("kingdom_44", "Wendish Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x009DC196),
# ("kingdom_45", "Pecheng Clan", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00a33e32),
# ("kingdom_46", "Kingdom of Scandinavia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00EC5D4C),
# ("kingdom_47", "Pomeralia Principalities", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00FF5A5A),
# ("kingdom_48", "Empire of Germania", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00BD9700),
# ("kingdom_49", "Empire of Carpathia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x003DD93B),
# ("kingdom_50", "Kievan Rus", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00700c50), #0x00E714A3
# ("kingdom_51", "Kingdom of Brittania", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00DE3622),
# ("kingdom_52", "New Francia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x003D69FA),
# ("kingdom_53", "Kingdom of Norge", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00FF3737),
# ("kingdom_54", "Chiefdom of Kemi", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00157B5F),
# ("kingdom_55", "Kingdom of Ireland", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x0090E715),
# ("kingdom_56", "Chiefdom of Sapmi", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00668EFF),
# ("kingdom_57", "Kingdom of Galicia-Volhynia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00FFF826),
# ("kingdom_58", "Hispania", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x000055FF),
# ("kingdom_59", "Principality of Catalonia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x0004681E),
# ("kingdom_60", "Crown of Leon", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x0078366E),
# ("kingdom_61", "Kingdom of Vasconia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00ADAA6A),
# ("kingdom_62", "Ahlidid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00586800),
# ("kingdom_63", "Union of Papacy", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00F0D80B),
# ("kingdom_64", "Eastern Roman Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x004E0000),
# ("kingdom_65", "Kingdom of Armenia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00FFFFFF),
# ("kingdom_66", "Kingdom of Apulia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x003B5D75),
# ("kingdom_67", "Hashimid Emirate", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x007A7800),
# ("kingdom_68", "Empire of Aegean", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00FF8C66),
# ("kingdom_69", "Kingdom of Georgia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00855400),
# ("kingdom_70", "Maghrawavid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x006F6457),
# ("kingdom_71", "Kingdom of Epirius", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00B86938),
# ("kingdom_72", "Kingdom of Karvuna-Moesia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x004C6961),
# ("kingdom_73", "Zayanid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00BB4C50),
# ("kingdom_74", "Kingdom of Croatia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00B916B4),
# ("kingdom_75", "Middle Rurikid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("kingdom_1", -0.50),("kingdom_78", 0.85),("kingdom_76", 0.85),("kingdom_77", 0.85),("forest_bandits", -0.05)], [], 0x006C8B93),
# ("kingdom_76", "West Rurikid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("kingdom_1", -0.50),("kingdom_75", 0.85),("kingdom_78", 0.85),("kingdom_77", 0.85),("forest_bandits", -0.05)], [], 0x0048DAFF),
# ("kingdom_77", "East Rurikid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("kingdom_1", -0.50),("kingdom_75", 0.85),("kingdom_76", 0.85),("kingdom_78", 0.85),("forest_bandits", -0.05)], [], 0x00B1EFFF),
# ("kingdom_78", "North Rurikid Dynasty", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("kingdom_1", -0.50),("kingdom_75", 0.85),("kingdom_76", 0.85),("kingdom_77", 0.85),("forest_bandits", -0.05)], [], 0x00376571),
# ("kingdom_79", "Kingdom of Gwynedd", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("kingdom_9", -0.80),("forest_bandits", -0.05)], [], 0x00A0D1A0),
# ("kingdom_80", "Most Serene House Doria", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00FFAD26),
# ("kingdom_81", "Most Serene House D'Appiano", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00F19E0E),
# ("kingdom_82", "Kingdom of Italy", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00A1ADE1),
# ("kingdom_83", "Kingdom of Florence", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00D8239C),
# ("kingdom_84", "Kingdom of House Premyslid", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x00aca6ce),
# #End old colors
#Begin Civil (If rebels win the war, they change to a civil faction below). #84-126 for testing
# ("kingdom_85", "Empire Of Swadia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC9900),
# ("kingdom_86", "Empire Of Vaegir", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X669999),
# ("kingdom_87", "Khergit Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC66FF),
# ("kingdom_88", "Empire Of Nord", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X3333FF),
# ("kingdom_89", "Empire Of Rhodok", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X99FF66),
# ("kingdom_90", "Sarranid Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCCFF66),
# ("kingdom_91", "Empire Of Swadia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC9900),
# ("kingdom_92", "Empire Of Vaegir", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X669999),
# ("kingdom_93", "Khergit Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC66FF),
# ("kingdom_94", "Empire Of Nord", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X3333FF),
# ("kingdom_95", "Empire Of Rhodok", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X99FF66),
# ("kingdom_96", "Sarranid Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCCFF66),
# ("kingdom_97", "Empire Of Swadia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC9900),
# ("kingdom_98", "Empire Of Vaegir", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X669999),
# ("kingdom_99", "Khergit Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC66FF),
# ("kingdom_100", "Empire Of Nord", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X3333FF),
# ("kingdom_101", "Empire Of Rhodok", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X99FF66),
# ("kingdom_102", "Sarranid Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCCFF66),
# ("kingdom_103", "Empire Of Swadia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC9900),
# ("kingdom_104", "Empire Of Vaegir", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X669999),
# ("kingdom_105", "Khergit Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC66FF),
# ("kingdom_106", "Empire Of Nord", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X3333FF),
# ("kingdom_107", "Empire Of Rhodok", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X99FF66),
# ("kingdom_108", "Sarranid Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCCFF66),
# ("kingdom_109", "Empire Of Swadia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC9900),
# ("kingdom_110", "Empire Of Vaegir", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X669999),
# ("kingdom_111", "Khergit Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC66FF),
# ("kingdom_112", "Empire Of Nord", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X3333FF),
# ("kingdom_113", "Empire Of Rhodok", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X99FF66),
# ("kingdom_114", "Sarranid Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCCFF66),
# ("kingdom_115", "Empire Of Swadia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC9900),
# ("kingdom_116", "Empire Of Vaegir", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X669999),
# ("kingdom_117", "Khergit Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC66FF),
# ("kingdom_118", "Empire Of Nord", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X3333FF),
# ("kingdom_119", "Empire Of Rhodok", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X99FF66),
# ("kingdom_120", "Sarranid Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCCFF66),
# ("kingdom_121", "Empire Of Swadia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC9900),
# ("kingdom_122", "Empire Of Vaegir", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X669999),
# ("kingdom_123", "Khergit Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCC66FF),
# ("kingdom_124", "Empire Of Nord", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X3333FF),
# ("kingdom_125", "Empire Of Rhodok", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0X99FF66),
# ("kingdom_126", "Sarranid Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0XCCFF66),
#End civil
#KAOS (POLITICAL)
#####Kaos Safe End
#####Kaos end add faction
("kingdoms_end", "{!}kingdoms end", 0, 0.0, []),
("robber_knights", "{!}robber knights", 0, 0.1, []),
("khergits", "{!}Khergits", 0, 0.5, []),
("black_khergits", "{!}Black Khergits", 0, 0.5, [("kingdom_1",-0.02),("kingdom_2",-0.02),("player_faction",-0.30)]),
("manhunters", "Manhunters", 0, 0.5, [("forest_bandits",-0.60),("player_faction",0.10),("deserters",-0.60),("mountain_bandits",-0.60),("outlaws",-0.60)]),
("deserters", "Deserters", 0, 0.5, [("kingdom_9",-0.02),("kingdom_15",-0.02),("kingdom_23",-0.02),("kingdom_3",-0.02),("kingdom_24",-0.02),("kingdom_10",-0.02),("kingdom_1",-0.02),("kingdom_20",-0.02),("kingdom_13",-0.02),("kingdom_19",-0.02),("kingdom_36",-0.02),("kingdom_11",-0.02),("player_supporters_faction",-0.02),("kingdom_34",-0.02),("kingdom_37",-0.02),("kingdom_25",-0.02),("kingdom_8",-0.02),("kingdom_5",-0.02),("kingdom_42",-0.02),("kingdom_2",-0.02),("kingdom_31",-0.02),("merchants",-0.50),("kingdom_22",-0.02),("kingdom_32",-0.02),("kingdom_35",-0.02),("player_faction",-0.10),("kingdom_18",-0.02),("kingdom_26",-0.02),("papacy",-0.02),("kingdom_38",-0.02),("kingdom_28",-0.02),("crusade",-0.02),("kingdom_39",-0.02),("kingdom_30",-0.02),("manhunters",-0.60),("kingdom_7",-0.02),("kingdom_16",-0.02),("kingdom_6",-0.02),("kingdom_12",-0.02),("kingdom_33",-0.02),("kingdom_40",-0.02),("kingdom_4",-0.02),("kingdom_29",-0.02),("kingdom_41",-0.02),("kingdom_14",-0.02),("kingdom_17",-0.02),("kingdom_27",-0.02)], [], 0x00888888),
("mountain_bandits", "Mountain Bandits", 0, 0.5, [("kingdom_9",-0.05),("kingdom_15",-0.05),("kingdom_23",-0.05),("kingdom_3",-0.05),("kingdom_24",-0.05),("kingdom_10",-0.05),("kingdom_1",-0.05),("kingdom_20",-0.05),("kingdom_13",-0.05),("kingdom_19",-0.05),("kingdom_36",-0.05),("kingdom_11",-0.05),("player_supporters_faction",-0.05),("kingdom_34",-0.05),("kingdom_37",-0.05),("kingdom_25",-0.05),("kingdom_8",-0.05),("kingdom_5",-0.05),("kingdom_42",-0.05),("kingdom_2",-0.05),("kingdom_31",-0.05),("merchants",-0.50),("kingdom_22",-0.05),("kingdom_32",-0.05),("kingdom_35",-0.05),("player_faction",-0.15),("kingdom_18",-0.05),("kingdom_26",-0.05),("papacy",-0.05),("kingdom_38",-0.05),("kingdom_28",-0.05),("crusade",-0.05),("kingdom_39",-0.05),("kingdom_30",-0.05),("manhunters",-0.60),("kingdom_7",-0.05),("kingdom_16",-0.05),("kingdom_6",-0.05),("kingdom_12",-0.05),("kingdom_33",-0.05),("kingdom_40",-0.05),("kingdom_4",-0.05),("kingdom_29",-0.05),("commoners",-0.20),("kingdom_41",-0.05),("kingdom_14",-0.05),("kingdom_17",-0.05),("kingdom_27",-0.05)], [], 0x00888888),
("forest_bandits", "Forest Bandits", 0, 0.5, [("kingdom_9",-0.05),("kingdom_15",-0.05),("kingdom_23",-0.05),("kingdom_3",-0.05),("kingdom_24",-0.05),("kingdom_10",-0.05),("kingdom_1",-0.05),("kingdom_20",-0.05),("kingdom_13",-0.05),("kingdom_19",-0.05),("kingdom_36",-0.05),("kingdom_11",-0.05),("player_supporters_faction",-0.05),("kingdom_34",-0.05),("kingdom_37",-0.05),("kingdom_25",-0.05),("kingdom_8",-0.05),("kingdom_5",-0.05),("kingdom_42",-0.05),("kingdom_2",-0.05),("kingdom_31",-0.05),("merchants",-0.50),("kingdom_22",-0.05),("kingdom_32",-0.05),("kingdom_35",-0.05),("player_faction",-0.15),("kingdom_18",-0.05),("kingdom_26",-0.05),("papacy",-0.05),("kingdom_38",-0.05),("kingdom_28",-0.05),("crusade",-0.05),("kingdom_39",-0.05),("kingdom_30",-0.05),("manhunters",-0.60),("kingdom_7",-0.05),("kingdom_16",-0.05),("kingdom_6",-0.05),("kingdom_12",-0.05),("kingdom_33",-0.05),("kingdom_40",-0.05),("kingdom_4",-0.05),("kingdom_29",-0.05),("commoners",-0.20),("kingdom_41",-0.05),("kingdom_14",-0.05),("kingdom_17",-0.05),("kingdom_27",-0.05)], [], 0x00888888),
("undeads", "{!}Undeads", 0, 0.5, [("player_faction",-0.50),("commoners",-0.70)]),
("slavers", "{!}Slavers", 0, 0.1, []),
("peasant_rebels", "{!}Peasant Rebels", 0, 1.0, [("kingdom_9",-0.10),("kingdom_15",-0.10),("kingdom_23",-0.10),("kingdom_3",-0.10),("kingdom_24",-0.10),("kingdom_10",-0.10),("noble_refugees",-1.00),("kingdom_1",-0.10),("kingdom_20",-0.10),("kingdom_13",-0.10),("kingdom_19",-0.10),("kingdom_36",-0.10),("kingdom_11",-0.10),("player_supporters_faction",-0.10),("kingdom_34",-0.10),("kingdom_37",-0.10),("kingdom_25",-0.10),("kingdom_8",-0.10),("kingdom_5",-0.10),("kingdom_42",-0.10),("kingdom_2",-0.10),("kingdom_31",-0.10),("kingdom_22",-0.10),("kingdom_32",-0.10),("kingdom_35",-0.10),("player_faction",-0.40),("kingdom_18",-0.10),("kingdom_26",-0.10),("papacy",-0.10),("kingdom_38",-0.10),("kingdom_28",-0.10),("crusade",-0.10),("kingdom_39",-0.10),("kingdom_30",-0.10),("kingdom_7",-0.10),("kingdom_16",-0.10),("kingdom_6",-0.10),("kingdom_12",-0.10),("kingdom_33",-0.10),("kingdom_40",-0.10),("kingdom_4",-0.10),("kingdom_29",-0.10),("kingdom_41",-0.10),("kingdom_14",-0.10),("kingdom_17",-0.10),("kingdom_27",-0.10)]),
("noble_refugees", "{!}Noble Refugees", 0, 0.5, [("peasant_rebels",-1.00)]),
("crusade", "Crusaders", 0, 0.9, [("kingdom_3",-0.50),("kingdom_20",-0.50),("kingdom_36",-0.50),("kingdom_34",-0.50),("kingdom_25",-0.50),("kingdom_2",-0.50),("kingdom_31",-0.50),("peasant_rebels",-0.10),("forest_bandits",-0.05),("kingdom_35",-0.50),("papacy",-0.50),("kingdom_38",-0.50),("kingdom_28",-0.50),("deserters",-0.02),("mountain_bandits",-0.05),("outlaws",-0.05),("kingdom_33",-0.50),("kingdom_27",-0.50)], [], 0x00fff17a),
("end_minor_faction", "Village Idiots", 0, 0.9, [], [], 0x00fff17a),
]
| 131.091716
| 1,080
| 0.608296
| 6,674
| 44,309
| 3.876236
| 0.080611
| 0.074913
| 0.132199
| 0.106378
| 0.774256
| 0.758678
| 0.746463
| 0.740356
| 0.733939
| 0.732741
| 0
| 0.156141
| 0.075515
| 44,309
| 338
| 1,081
| 131.091716
| 0.475405
| 0.398068
| 0
| 0
| 0
| 0
| 0.474925
| 0.00768
| 0
| 0
| 0.03536
| 0
| 0
| 1
| 0
| false
| 0
| 0.007634
| 0
| 0.007634
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 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
| 8
|
3499539f373f9ce023ee2fc68de3748959a132f3
| 5,190
|
py
|
Python
|
install.py
|
mrobraven/majestic-pi
|
8ebe001a0e2f2eca475c2a390228e7810630f62e
|
[
"MIT"
] | null | null | null |
install.py
|
mrobraven/majestic-pi
|
8ebe001a0e2f2eca475c2a390228e7810630f62e
|
[
"MIT"
] | null | null | null |
install.py
|
mrobraven/majestic-pi
|
8ebe001a0e2f2eca475c2a390228e7810630f62e
|
[
"MIT"
] | null | null | null |
import os
os.mkdir("3D")
os.chdir("3D")
print("Configuring 3D...")
print("Fetching Intro...")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/intro.mp4")
print("Fetching 3D Feature...")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/3D/glasses.mp4")
print("Fetching Odeon Mimics...")
os.mkdir("mimics")
os.chdir("mimics")
os.mkdir("Odeon")
os.chdir("Odeon")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Odeon/1.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Odeon/2.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Odeon/3.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Odeon/4.mp4")
print("Fetching Vue Mimics...")
os.chdir("..")
os.mkdir("Vue")
os.chdir("Vue")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Vue/1.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Vue/2.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Vue/3.mp4")
print("Fetching Cineworld Mimics...")
os.chdir("..")
os.mkdir("Cineworld")
os.chdir("Cineworld")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Cineworld/1.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Cineworld/2.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Cineworld/3.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Cineworld/4.mp4")
print("Fetching Adverts...")
os.chdir("..")
os.chdir("..")
os.mkdir("DCP")
os.chdir("DCP")
os.mkdir("adverts")
os.chdir("adverts")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/DCP/adverts/Digital_Cinema_Media.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/DCP/adverts/Pearl_And_Dean.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/DCP/adverts/Pearl_And_Dean_Old.mp4")
os.rename("Digital_Cinema_Media.mp4", "Digital_Cinema_Media.dca.mp4")
os.rename("Pearl_And_Dean.mp4", "Pearl_And_Dean.dca.mp4")
os.rename("Pearl_And_Dean_Old.mp4", "Pearl_And_Dean_Old.dca.mp4")
os.chdir("..")
os.chdir("..")
os.chdir("..")
os.mkdir("2D")
os.chdir("2D")
print("Configuring 2D...")
print("Fetching Intro...")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/intro.mp4")
print("Fetching 3D Feature...")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/3D/glasses.mp4")
print("Fetching Odeon Mimics...")
os.mkdir("mimics")
os.chdir("mimics")
os.mkdir("Odeon")
os.chdir("Odeon")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Odeon/1.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Odeon/2.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Odeon/3.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Odeon/4.mp4")
print("Fetching Vue Mimics...")
os.chdir("..")
os.mkdir("Vue")
os.chdir("Vue")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Vue/1.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Vue/2.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Vue/3.mp4")
print("Fetching Cineworld Mimics...")
os.chdir("..")
os.mkdir("Cineworld")
os.chdir("Cineworld")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Cineworld/1.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Cineworld/2.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Cineworld/3.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/mimics/Cineworld/4.mp4")
print("Fetching Adverts...")
os.chdir("..")
os.chdir("..")
os.mkdir("DCP")
os.chdir("DCP")
os.mkdir("adverts")
os.chdir("adverts")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/DCP/adverts/Digital_Cinema_Media.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/DCP/adverts/Pearl_And_Dean.mp4")
os.system("wget https://raw.githubusercontent.com/mrobraven/majestic-pi/master/majestic-pi/DCP/adverts/Pearl_And_Dean_Old.mp4")
os.rename("Digital_Cinema_Media.mp4", "Digital_Cinema_Media.dca.mp4")
os.rename("Pearl_And_Dean.mp4", "Pearl_And_Dean.dca.mp4")
os.rename("Pearl_And_Dean_Old.mp4", "Pearl_And_Dean_Old.dca.mp4")
print("Done!")
| 55.212766
| 129
| 0.773796
| 782
| 5,190
| 5.081841
| 0.054987
| 0.161047
| 0.096628
| 0.13689
| 0.979366
| 0.977604
| 0.97232
| 0.97232
| 0.97232
| 0.97232
| 0
| 0.015091
| 0.029672
| 5,190
| 93
| 130
| 55.806452
| 0.774027
| 0
| 0
| 0.913978
| 0
| 0.344086
| 0.764355
| 0.047013
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.010753
| 0
| 0.010753
| 0.16129
| 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
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
34b7a38557b1f2eeaa8850899a55b7d31360dad9
| 13,534
|
py
|
Python
|
test/unit_tests/braket/jobs/local/test_local_job_container.py
|
orclassiq/amazon-braket-sdk-python
|
69acaf54237ecbee14b5b5f0549fa28e32eba83b
|
[
"Apache-2.0"
] | null | null | null |
test/unit_tests/braket/jobs/local/test_local_job_container.py
|
orclassiq/amazon-braket-sdk-python
|
69acaf54237ecbee14b5b5f0549fa28e32eba83b
|
[
"Apache-2.0"
] | null | null | null |
test/unit_tests/braket/jobs/local/test_local_job_container.py
|
orclassiq/amazon-braket-sdk-python
|
69acaf54237ecbee14b5b5f0549fa28e32eba83b
|
[
"Apache-2.0"
] | null | null | null |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file 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.
import base64
import subprocess
from pathlib import Path
from unittest.mock import Mock, patch
import pytest
from braket.jobs.local.local_job_container import _LocalJobContainer
@pytest.fixture
def repo_uri():
return "012345678901.dkr.ecr.us-west-2.amazonaws.com"
@pytest.fixture
def image_uri(repo_uri):
return f"{repo_uri}/my-repo:my-tag"
@pytest.fixture
def aws_session():
_aws_session = Mock()
return _aws_session
@patch("subprocess.check_output")
@patch("subprocess.run")
def test_start_and_stop(mock_run, mock_check_output, image_uri, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
mock_check_output.side_effect = [
str.encode(local_image_name),
str.encode(running_container_name),
]
with _LocalJobContainer(image_uri, aws_session):
pass
mock_check_output.assert_any_call(["docker", "images", "-q", image_uri])
mock_check_output.assert_any_call(
["docker", "run", "-d", "--rm", local_image_name, "tail", "-f", "/dev/null"]
)
assert mock_check_output.call_count == 2
mock_run.assert_any_call(["docker", "stop", running_container_name])
assert mock_run.call_count == 1
@patch("subprocess.check_output")
@patch("subprocess.run")
def test_pull_container(mock_run, mock_check_output, repo_uri, image_uri, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
test_token = "Test Token"
mock_check_output.side_effect = [
str.encode(""),
str.encode(local_image_name),
str.encode(running_container_name),
]
aws_session.ecr_client.get_authorization_token.return_value = {
"authorizationData": [{"authorizationToken": base64.b64encode(str.encode(test_token))}]
}
with _LocalJobContainer(image_uri, aws_session):
pass
mock_check_output.assert_any_call(["docker", "images", "-q", image_uri])
mock_check_output.assert_any_call(
["docker", "run", "-d", "--rm", local_image_name, "tail", "-f", "/dev/null"]
)
assert mock_check_output.call_count == 3
mock_run.assert_any_call(["docker", "login", "-u", "AWS", "-p", test_token, repo_uri])
mock_run.assert_any_call(["docker", "pull", image_uri])
mock_run.assert_any_call(["docker", "stop", running_container_name])
assert mock_run.call_count == 3
@patch("subprocess.check_output")
@patch("subprocess.run")
def test_run_job_success(mock_run, mock_check_output, repo_uri, image_uri, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
env_variables = {
"ENV0": "VALUE0",
"ENV1": "VALUE1",
}
run_program_name = "Run Program Name"
expected_run_output = "Expected Run Output"
mock_check_output.side_effect = [
str.encode(local_image_name),
str.encode(running_container_name),
str.encode(run_program_name),
str.encode(expected_run_output),
]
with _LocalJobContainer(image_uri, aws_session) as container:
container.run_local_job(env_variables)
run_output = container.run_log
assert run_output == expected_run_output
mock_check_output.assert_any_call(["docker", "images", "-q", image_uri])
mock_check_output.assert_any_call(
["docker", "run", "-d", "--rm", local_image_name, "tail", "-f", "/dev/null"]
)
mock_check_output.assert_any_call(
["docker", "exec", running_container_name, "printenv", "SAGEMAKER_PROGRAM"]
)
mock_check_output.assert_any_call(
[
"docker",
"exec",
"-w",
"/opt/ml/code/",
"-e",
"ENV0=VALUE0",
"-e",
"ENV1=VALUE1",
running_container_name,
"python",
run_program_name,
]
)
assert mock_check_output.call_count == 4
mock_run.assert_any_call(["docker", "stop", running_container_name])
assert mock_run.call_count == 1
@patch("subprocess.check_output")
@patch("subprocess.run")
def test_customer_script_fails(mock_run, mock_check_output, repo_uri, image_uri, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
env_variables = {
"ENV0": "VALUE0",
"ENV1": "VALUE1",
}
run_program_name = "Run Program Name"
expected_error_output = "Expected Error Output"
mock_check_output.side_effect = [
str.encode(local_image_name),
str.encode(running_container_name),
str.encode(run_program_name),
subprocess.CalledProcessError("Test Error", "test", str.encode(expected_error_output)),
]
with _LocalJobContainer(image_uri, aws_session) as container:
container.run_local_job(env_variables)
run_output = container.run_log
assert run_output == expected_error_output
assert mock_check_output.call_count == 4
mock_run.assert_any_call(["docker", "stop", running_container_name])
assert mock_run.call_count == 1
@patch("subprocess.check_output")
@patch("subprocess.run")
def test_make_dir(mock_run, mock_check_output, repo_uri, image_uri, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
test_dir_path = "/test/dir/path"
mock_check_output.side_effect = [
str.encode(local_image_name),
str.encode(running_container_name),
str.encode(""),
]
with _LocalJobContainer(image_uri, aws_session) as container:
container.makedir(test_dir_path)
mock_check_output.assert_any_call(["docker", "images", "-q", image_uri])
mock_check_output.assert_any_call(
["docker", "run", "-d", "--rm", local_image_name, "tail", "-f", "/dev/null"]
)
mock_check_output.assert_any_call(
["docker", "exec", running_container_name, "mkdir", "-p", test_dir_path]
)
assert mock_check_output.call_count == 3
mock_run.assert_any_call(["docker", "stop", running_container_name])
assert mock_run.call_count == 1
@patch("subprocess.check_output")
@patch("subprocess.run")
def test_copy_to(mock_run, mock_check_output, repo_uri, image_uri, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
source_path = str(Path("test", "source", "dir", "path", "srcfile.txt"))
dest_path = str(Path("test", "dest", "dir", "path", "dstfile.txt"))
mock_check_output.side_effect = [
str.encode(local_image_name),
str.encode(running_container_name),
str.encode(""),
str.encode(""),
]
with _LocalJobContainer(image_uri, aws_session) as container:
container.copy_to(source_path, dest_path)
mock_check_output.assert_any_call(["docker", "images", "-q", image_uri])
mock_check_output.assert_any_call(
["docker", "run", "-d", "--rm", local_image_name, "tail", "-f", "/dev/null"]
)
mock_check_output.assert_any_call(
[
"docker",
"exec",
running_container_name,
"mkdir",
"-p",
str(Path("test", "dest", "dir", "path")),
]
)
mock_check_output.assert_any_call(
["docker", "cp", source_path, f"{running_container_name}:{dest_path}"]
)
assert mock_check_output.call_count == 4
mock_run.assert_any_call(["docker", "stop", running_container_name])
assert mock_run.call_count == 1
@patch("subprocess.check_output")
@patch("subprocess.run")
def test_copy_from(mock_run, mock_check_output, repo_uri, image_uri, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
source_path = "/test/source/dir/path/srcfile.txt"
dest_path = "/test/dest/dir/path/dstfile.txt"
mock_check_output.side_effect = [
str.encode(local_image_name),
str.encode(running_container_name),
str.encode(""),
str.encode(""),
]
with _LocalJobContainer(image_uri, aws_session) as container:
container.copy_from(source_path, dest_path)
mock_check_output.assert_any_call(["docker", "images", "-q", image_uri])
mock_check_output.assert_any_call(
["docker", "run", "-d", "--rm", local_image_name, "tail", "-f", "/dev/null"]
)
mock_check_output.assert_any_call(
["docker", "cp", f"{running_container_name}:{source_path}", dest_path]
)
assert mock_check_output.call_count == 3
mock_run.assert_any_call(["docker", "stop", running_container_name])
assert mock_run.call_count == 1
@patch("subprocess.check_output")
@patch("subprocess.run")
@pytest.mark.xfail(raises=ValueError)
def test_run_fails_no_program(mock_run, mock_check_output, repo_uri, image_uri, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
env_variables = {
"ENV0": "VALUE0",
"ENV1": "VALUE1",
}
mock_check_output.side_effect = [
str.encode(local_image_name),
str.encode(running_container_name),
str.encode(""),
]
with _LocalJobContainer(image_uri, aws_session) as container:
container.run_local_job(env_variables)
@patch("subprocess.check_output")
@patch("subprocess.run")
@pytest.mark.xfail(raises=subprocess.CalledProcessError)
def test_make_dir_fails(mock_run, mock_check_output, repo_uri, image_uri, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
test_dir_path = "/test/dir/path"
mock_check_output.side_effect = [
str.encode(local_image_name),
str.encode(running_container_name),
subprocess.CalledProcessError("Test Error", "test", str.encode("test output")),
]
with _LocalJobContainer(image_uri, aws_session) as container:
container.makedir(test_dir_path)
@patch("subprocess.check_output")
@patch("subprocess.run")
@pytest.mark.xfail(raises=subprocess.CalledProcessError)
def test_copy_to_fails(mock_run, mock_check_output, repo_uri, image_uri, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
source_path = "/test/source/dir/path/srcfile.txt"
dest_path = "/test/dest/dir/path/dstfile.txt"
mock_check_output.side_effect = [
str.encode(local_image_name),
str.encode(running_container_name),
subprocess.CalledProcessError("Test Error", "test", str.encode("test output")),
]
with _LocalJobContainer(image_uri, aws_session) as container:
container.copy_to(source_path, dest_path)
@patch("subprocess.check_output")
@patch("subprocess.run")
@pytest.mark.xfail(raises=subprocess.CalledProcessError)
def test_copy_from_fails(mock_run, mock_check_output, repo_uri, image_uri, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
source_path = "/test/source/dir/path/srcfile.txt"
dest_path = "/test/dest/dir/path/dstfile.txt"
mock_check_output.side_effect = [
str.encode(local_image_name),
str.encode(running_container_name),
subprocess.CalledProcessError("Test Error", "test", str.encode("test output")),
]
with _LocalJobContainer(image_uri, aws_session) as container:
container.copy_from(source_path, dest_path)
@patch("subprocess.check_output")
@patch("subprocess.run")
@pytest.mark.xfail(raises=ValueError)
def test_pull_fails_no_auth(mock_run, mock_check_output, repo_uri, image_uri, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
mock_check_output.side_effect = [
str.encode(""),
str.encode(local_image_name),
str.encode(running_container_name),
]
aws_session.ecr_client.get_authorization_token.return_value = {}
with _LocalJobContainer(image_uri, aws_session):
pass
@patch("subprocess.check_output")
@patch("subprocess.run")
@pytest.mark.xfail(raises=ValueError)
def test_pull_fails_invalid_uri(mock_run, mock_check_output, aws_session):
local_image_name = "LocalImageName"
running_container_name = "RunningContainer"
mock_check_output.side_effect = [
str.encode(""),
str.encode(local_image_name),
str.encode(running_container_name),
]
aws_session.ecr_client.get_authorization_token.return_value = {}
with _LocalJobContainer("TestURI", aws_session):
pass
@patch("subprocess.check_output")
@patch("subprocess.run")
@pytest.mark.xfail(raises=ValueError)
def test_pull_fails_unknown_reason(mock_run, mock_check_output, repo_uri, image_uri, aws_session):
test_token = "Test Token"
mock_check_output.side_effect = [
str.encode(""),
str.encode(""),
]
aws_session.ecr_client.get_authorization_token.return_value = {
"authorizationData": [{"authorizationToken": base64.b64encode(str.encode(test_token))}]
}
with _LocalJobContainer(image_uri, aws_session):
pass
| 37.079452
| 98
| 0.69935
| 1,709
| 13,534
| 5.177882
| 0.103569
| 0.083286
| 0.089841
| 0.057973
| 0.869929
| 0.864956
| 0.862922
| 0.858402
| 0.843372
| 0.822805
| 0
| 0.005118
| 0.177036
| 13,534
| 364
| 99
| 37.181319
| 0.78937
| 0.03953
| 0
| 0.720635
| 0
| 0
| 0.166487
| 0.050593
| 0
| 0
| 0
| 0
| 0.136508
| 1
| 0.053968
| false
| 0.015873
| 0.019048
| 0.006349
| 0.08254
| 0.003175
| 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
|
34f37aac957cd2dcc7bd8c099147d678a15c4634
| 160
|
py
|
Python
|
pythran/tests/user_defined_import/simple_case_main.py
|
davidbrochart/pythran
|
24b6c8650fe99791a4091cbdc2c24686e86aa67c
|
[
"BSD-3-Clause"
] | 1,647
|
2015-01-13T01:45:38.000Z
|
2022-03-28T01:23:41.000Z
|
pythran/tests/user_defined_import/simple_case_main.py
|
davidbrochart/pythran
|
24b6c8650fe99791a4091cbdc2c24686e86aa67c
|
[
"BSD-3-Clause"
] | 1,116
|
2015-01-01T09:52:05.000Z
|
2022-03-18T21:06:40.000Z
|
pythran/tests/user_defined_import/simple_case_main.py
|
davidbrochart/pythran
|
24b6c8650fe99791a4091cbdc2c24686e86aa67c
|
[
"BSD-3-Clause"
] | 180
|
2015-02-12T02:47:28.000Z
|
2022-03-14T10:28:18.000Z
|
#pythran export entry()
#runas entry()
import simple_case_import
def forward(a):
return simple_case_import.imported(a)
def entry():
return forward(1)
| 16
| 41
| 0.7375
| 23
| 160
| 4.956522
| 0.565217
| 0.175439
| 0.280702
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007407
| 0.15625
| 160
| 9
| 42
| 17.777778
| 0.837037
| 0.21875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0.4
| 0.4
| 1.2
| 0
| 1
| 0
| 0
| null | 0
| 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
| 1
| 1
| 1
| 0
|
0
| 7
|
9b3a30a350d4766ec5248befbf7cb18770423342
| 10,867
|
py
|
Python
|
molsysmt/forms/viewers/api_nglview_NGLWidget.py
|
uibcdf/MolSysMT
|
9866a6fb090df9fff36af113a45164da4b674c09
|
[
"MIT"
] | 3
|
2020-06-02T03:55:52.000Z
|
2022-03-21T04:43:52.000Z
|
molsysmt/forms/viewers/api_nglview_NGLWidget.py
|
uibcdf/MolSysMT
|
9866a6fb090df9fff36af113a45164da4b674c09
|
[
"MIT"
] | 28
|
2020-06-24T00:55:53.000Z
|
2021-07-16T22:09:19.000Z
|
molsysmt/forms/viewers/api_nglview_NGLWidget.py
|
uibcdf/MolSysMT
|
9866a6fb090df9fff36af113a45164da4b674c09
|
[
"MIT"
] | 1
|
2021-06-17T18:55:25.000Z
|
2021-06-17T18:55:25.000Z
|
from molsysmt._private_tools.exceptions import *
from molsysmt.forms.common_gets import *
import numpy as np
from nglview import widget as _nglview_widget
import importlib
import sys
from molsysmt.molecular_system import molecular_system_components
form_name='nglview.NGLWidget'
is_form = {
_nglview_widget.NGLWidget: form_name
}
info=["NGLView visualization native object","http://nglviewer.org/nglview/latest/_modules/nglview/widget.html"]
has = molecular_system_components.copy()
for ii in ['elements', 'coordinates', 'box']:
has[ii]=True
def to_openmm_PDBFile(item, molecular_system=None, atom_indices='all', frame_indices='all'):
from io import StringIO
from simtk.openmm.app import PDBFile
try:
structure_string = item.component_0.get_structure_string()
except:
structure_string = item.get_state()['_ngl_msg_archive'][0]['args'][0]['data']
str_as_file = StringIO(structure_string)
tmp_item = PDBFile(str_as_file)
str_as_file.close()
del(str_as_file)
if molecular_system is not None:
tmp_molecular_system = molecular_system.combine_with_items(tmp_item)
else:
tmp_molecular_system = None
return tmp_item, tmp_molecular_system
def to_molsysmt_Topology(item, molecular_system=None, atom_indices='all', frame_indices='all'):
from molsysmt.native.io.topology.viewers import from_nglview_NGLWidget as nglview_NGLWidget_to_molsysmt_Topology
tmp_item, tmp_molecular_system = nglview_NGLWidget_to_molsysmt_Topology(item, molecular_system=molecular_system, atom_indices=atom_indices, frame_indices='all')
return tmp_item, tmp_molecular_system
def to_nglview_NGLWidget(item, molecular_system=None, atom_indices='all', frame_indices='all', copy_if_all=True):
tmp_molecular_system = None
if (atom_indices is 'all') and (frame_indices is 'all'):
if copy_if_all:
tmp_item = extract_item(item)
if tmp_molecular_system is not None:
tmp_molecular_system = molecular_system.combine_with_items(tmp_item)
else:
tmp_item = item
if tmp_molecular_system is not None:
tmp_molecular_system = molecular_system
else:
tmp_item = extract_item(item, atom_indices=atom_indices, frame_indices=frame_indices)
if tmp_molecular_system is not None:
tmp_molecular_system = molecular_system.combine_with_items(tmp_item, atom_indices=atom_indices, frame_indices=frame_indices)
return tmp_item, tmp_molecular_system
def extract_item(item, atom_indices='all', frame_indices='all'):
if (atom_indices is 'all') and (frame_indices is 'all'):
raise NotImplementedError()
else:
raise NotImplementedError()
return tmp_item
def add(item, from_item, atom_indices='all', frame_indices='all'):
raise NotImplementedError
def append_frames(item, step=None, time=None, coordinates=None, box=None):
raise NotImplementedError
###### Get
def aux_get(item, indices='all', frame_indices='all'):
from molsysmt.forms import forms
method_name = sys._getframe(1).f_code.co_name
if 'openmm.PDBFile' in forms:
tmp_item, _ = to_openmm_PDBFile(item)
module = importlib.import_module('molsysmt.forms.classes.api_openmm_PDBFile')
_get = getattr(module, method_name)
output = _get(tmp_item, indices=indices, frame_indices=frame_indices)
else:
raise NotImplementedError
return output
## Atom
def get_atom_index_from_atom(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_atom_id_from_atom(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_atom_name_from_atom(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_atom_type_from_atom(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_group_index_from_atom (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_component_index_from_atom (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_chain_index_from_atom (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_molecule_index_from_atom (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_entity_index_from_atom (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_inner_bonded_atoms_from_atom (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_n_inner_bonds_from_atom (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_coordinates_from_atom(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_frame_from_atom(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
## group
def get_group_id_from_group(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_group_name_from_group(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_group_type_from_group(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
## component
def get_component_id_from_component (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_component_name_from_component (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_component_type_from_component (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
## molecule
def get_molecule_id_from_molecule (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_molecule_name_from_molecule (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_molecule_type_from_molecule (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
## chain
def get_chain_id_from_chain (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_chain_name_from_chain (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_chain_type_from_chain (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
## entity
def get_entity_id_from_entity (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_entity_name_from_entity (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_entity_type_from_entity (item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
## system
def get_n_atoms_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_n_groups_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_n_components_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_n_chains_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_n_molecules_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_n_entities_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_n_bonds_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_coordinates_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_box_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_box_shape_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_box_lengths_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_box_angles_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_box_volume_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_time_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_step_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_n_frames_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_bonded_atoms_from_system(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
## bond
def get_bond_order_from_bond(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_bond_type_from_bond(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
def get_atom_index_from_bond(item, indices='all', frame_indices='all'):
return aux_get(item, indices=indices, frame_indices=frame_indices)
###### Set
def set_box_to_system(item, indices='all', frame_indices='all', value=None):
raise NotImplementedError
def set_coordinates_to_system(item, indices='all', frame_indices='all', value=None):
raise NotImplementedError
| 33.334356
| 164
| 0.767829
| 1,555
| 10,867
| 5.015434
| 0.082315
| 0.247724
| 0.25093
| 0.157969
| 0.792666
| 0.775612
| 0.763944
| 0.739967
| 0.730735
| 0.718425
| 0
| 0.000421
| 0.125058
| 10,867
| 325
| 165
| 33.436923
| 0.819836
| 0.005705
| 0
| 0.418605
| 0
| 0
| 0.052715
| 0.003805
| 0
| 0
| 0
| 0
| 0
| 1
| 0.331395
| false
| 0
| 0.069767
| 0.27907
| 0.709302
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 9
|
9b56838a87136d14ec040f4d65ab94a7e2ebd723
| 146,532
|
py
|
Python
|
V1/R1/N2HF_armors_v1_r1.py
|
N2HF-OFFICIAL/n2hf
|
de4a26a3b70082cd2375cc3fe7a5c2fd09cec085
|
[
"MIT"
] | null | null | null |
V1/R1/N2HF_armors_v1_r1.py
|
N2HF-OFFICIAL/n2hf
|
de4a26a3b70082cd2375cc3fe7a5c2fd09cec085
|
[
"MIT"
] | null | null | null |
V1/R1/N2HF_armors_v1_r1.py
|
N2HF-OFFICIAL/n2hf
|
de4a26a3b70082cd2375cc3fe7a5c2fd09cec085
|
[
"MIT"
] | null | null | null |
from PIL import Image
import os
import numpy as np
import pandas as pd
from random import seed
from random import randint
dirname = os.path.dirname('')
dimensions = 600, 600
def make_armors(ma, ma2, ma3):
count_doojunggap = 0
count_gyungbyungap = 0
count_chalgap = 0
for x in range(0, ma2):
b=ma3
seed(x+b)
## 1이 진한거 2가 연한거
## a : 두정갑 주 색 (빨강)
aa = randint(0, 400)
if aa<100:
# a1 색상
a1 = (randint(130, 150), randint(30, 50), randint(30, 40))
c=randint(0,500)
seed(c)
# a2 색상
a2 = (randint(190, 210), randint(0, 20), randint(0, 20))
d = randint(501,1000)
seed(d)
elif 100<=aa<200:
# a1 색상
a1 = (randint(80, 100), randint(20, 40), randint(20, 40))
c=randint(0,500)
seed(c)
# a2 색상
a2 = (randint(130, 150), randint(25, 45), randint(25, 45))
d = randint(501,1000)
seed(d)
elif 200<=aa<300:
# a1 색상
a1 = (randint(5, 25), randint(5, 25), randint(50, 70))
c=randint(0,500)
seed(c)
# a2 색상
a2 = (randint(45, 65), randint(35, 55), randint(115, 135))
d = randint(501,1000)
seed(d)
else:
# a1 색상
a1 = (randint(25, 45), randint(55, 75), randint(20, 40))
c=randint(0,500)
seed(c)
# a2 색상
a2 = (randint(30, 50), randint(105, 125), randint(45, 65))
d = randint(501,1000)
seed(d)
## b : 어두운 철 부분 (찰갑 투구 주색)
# b1 색상
b1 = (randint(0, 100), randint(0, 100), randint(0, 100))
e=randint(1001,1500)
seed(e)
# b2 색상
b2 = (b1[0]+randint(30, 60), b1[1]+randint(30, 60), b1[2]+randint(30, 60))
f = randint(1501,2000)
seed(f)
## c : 찰갑 주색 (어두운 나무색)
cc = randint(0, 200)
if cc<100:
# c1 색상
c1 = (randint(50, 100), randint(0, 40), randint(0, 40))
g=randint(2001,2500)
seed(g)
# c2 색상
c2 = (c1[0]+randint(30, 60), c1[1]+randint(30, 60), c1[2]+randint(30, 60))
h = randint(2501,3000)
seed(h)
else:
# c1 색상
c1 = (randint(60, 80), randint(60, 80), randint(70, 90))
g=randint(2001,2500)
seed(g)
# c2 색상
c2 = (randint(130, 150), randint(125, 145), randint(120, 140))
h = randint(2501,3000)
seed(h)
# d 벨트부분
dd = randint(0, 300)
if dd<100:
# d1 색상
d1 = (randint(0, 30), randint(0, 30), randint(200, 230))
i=randint(3001,3500)
seed(i)
# d2 색상
d2 = (d1[0]+randint(30, 60), d1[1]+randint(30, 60), d1[2]+randint(0, 26))
j=randint(3501,4000)
seed(j)
elif 100<=dd<200:
d1 = (randint(0, 40), randint(60, 100), randint(40, 80))
i=randint(3001,3500)
seed(i)
# d2 색상
d2 = (randint(0, 20), randint(150, 190), randint(60, 100))
j=randint(3501,4000)
seed(j)
else:
d1 = (randint(60, 100), randint(50, 90), randint(0, 40))
i=randint(3001,3500)
seed(i)
# d2 색상
d2 = (randint(150, 190), randint(110, 150), randint(0, 20))
j=randint(3501,4000)
seed(j)
## e : 두정갑 노란솔 & 금속 (금색, 노란색)
# e1 색상
e1 = (randint(190, 220), randint(120, 180), randint(10, 40))
k = randint(4001,4500)
seed(k)
# e2 색상
e2 = (e1[0]+randint(0, 26), e1[1]+randint(20, 50), e1[2]+randint(0, 30))
l = randint(5001,5500)
seed(l)
## f : 솔 부분 (빨강, 초록, 파랑 범위 중 1개)
# f1 색상
f1 = (randint(0, 200), randint(0, 200), randint(0, 200))
m = randint(5501,6000)
seed(m)
# f2 색상
f2 = (f1[0]+randint(0, 50), f1[1]+randint(0, 50), f1[2]+randint(0, 50))
n = randint(6501,7000)
seed(n)
## 배경색
bg1 = randint(0,300)
if bg1 < 100: # 194, 164, 29 /
# bg1 : 누런~주황 ex) 194, 164, 29
bg1_1 = (randint(110, 150), randint(55, 95), randint(0, 25))
o = randint(7501,8000)
seed(o)
bg1_2 = (randint(150, 190), randint(75, 115), randint(0, 20))
p = randint(8001,8500)
seed(p)
bg1_3 = (randint(175, 215), randint(145, 185), randint(10, 50))
q = randint(8501,9000)
seed(q)
elif 100 <= bg1 < 200: # 141, 179, 173 / 45, 125, 112 / 0, 80, 67
bg1_3 = (randint(125, 155), randint(165, 195), randint(160, 190))
r = randint(9001,9500)
seed(r)
bg1_2 = (randint(30, 60), randint(110, 140), randint(95, 125))
s = randint(9501,10000)
seed(s)
bg1_1 = (randint(0, 30), randint(65, 95), randint(50, 80))
t = randint(10001,10500)
seed(t)
else: # 127, 173, 218 / 50, 97, 143 / 1, 40, 78
bg1_3 = (randint(115, 145), randint(160, 190), randint(205, 235))
r = randint(9001,9500)
seed(r)
bg1_2 = (randint(35, 65), randint(85, 115), randint(130, 160))
s = randint(9501,10000)
seed(s)
bg1_1 = (randint(0, 30), randint(25, 55), randint(65, 95))
t = randint(10001,10500)
seed(t)
bg2 = randint(0,300)
if bg2 < 100: # 166, 148, 105 / 121, 61, 0 / 97, 69, 0
bg2_3 = (randint(150, 180), randint(130, 160), randint(90, 120))
r = randint(9001,9500)
seed(r)
bg2_2 = (randint(105, 135), randint(45, 75), randint(0, 30))
s = randint(9501,10000)
seed(s)
bg2_1 = (randint(80, 110), randint(55, 85), randint(0, 30))
t = randint(10001,10500)
seed(t)
elif 100 <= bg2 < 200: # 141, 179, 173 / 45, 125, 112 / 0, 80, 67
bg2_3 = (randint(125, 155), randint(165, 195), randint(160, 190))
r = randint(9001,9500)
seed(r)
bg2_2 = (randint(30, 60), randint(110, 140), randint(95, 125))
s = randint(9501,10000)
seed(s)
bg2_1 = (randint(0, 30), randint(65, 95), randint(50, 80))
t = randint(10001,10500)
seed(t)
else: # 127, 173, 218 / 50, 97, 143 / 1, 40, 78
bg2_3 = (randint(115, 145), randint(160, 190), randint(205, 235))
r = randint(9001,9500)
seed(r)
bg2_2 = (randint(35, 65), randint(85, 115), randint(130, 160))
s = randint(9501,10000)
seed(s)
bg2_1 = (randint(0, 30), randint(25, 55), randint(65, 95))
t = randint(10001,10500)
seed(t)
bg3 = randint(0,300)
if bg3 < 100:
# bg3_1 : 갈색 ex) 179, 86, 5 / bg3_2 : 황토 ex) 222, 161, 108
bg3_1 = (randint(150, 200), randint(70, 100), randint(0, 10))
u = randint(10501,11000)
seed(u)
bg3_2 = (bg3_1[0]+randint(30, 55), bg3_1[1]+randint(30, 55), bg3_1[2]+randint(30, 55))
v = randint(11001,11500)
seed(v)
elif 100 <= bg3 <200 : # 127, 173, 218 / 50, 97, 143
bg3_2 = (randint(115, 145), randint(160, 190), randint(205, 235))
r = randint(9001,9500)
seed(r)
bg3_1 = (randint(35, 65), randint(85, 115), randint(130, 160))
s = randint(9501,10000)
seed(s)
else: # 141, 179, 173 / 45, 125, 112
bg3_2 = (randint(125, 155), randint(165, 195), randint(160, 190))
r = randint(9001,9500)
seed(r)
bg3_1 = (randint(30, 60), randint(110, 140), randint(95, 125))
s = randint(9501,10000)
seed(s)
## g : 경계 (검은색)
g = (0, 0, 0)
w = randint(11500,12001)
seed(w)
## h : 두정갑 투구 금속 (금색)
h = (randint(180, 230), randint(100, 200), randint(0, 50))
x = randint(12001,12501)
seed(x)
## i : 어두운 회색 & 검은색
i = (randint(0, 100), randint(0, 100), randint(0, 100))
x1 = randint(12001,12501)
seed(x1)
## j : 투구 빛 (흰색)
j = (randint(230, 256), randint(230, 256), randint(230, 256))
x2 = randint(12001,12501)
seed(x2)
## k : 두정갑 투구 주 색 (어두움)
k = (randint(0, 100), randint(0, 100), randint(0, 100))
x3 = randint(12001,12501)
seed(x3)
## l : 경변갑 주 색 (어두운 갈색)
ll = randint(0, 200)
if ll<100:
l1 = (randint(30, 90), randint(0, 30), randint(0, 30))
o1 = randint(7501,8000)
seed(o1)
l2 = (l1[0]+randint(10, 26), l1[1]+randint(10, 26), l1[2]+randint(0, 10))
p1 = randint(8001,8500)
seed(p1)
l3 = (l2[0]+randint(20, 26), l2[1]+randint(20, 26), l2[2]+randint(0, 10))
q1 = randint(8501,9000)
seed(q1)
else:
l1 = (randint(30, 90), randint(0, 30), randint(0, 30))
o1 = randint(7501,8000)
seed(o1)
l2 = (l1[0]+randint(10, 26), l1[1]+randint(10, 26), l1[2]+randint(0, 10))
p1 = randint(8001,8500)
seed(p1)
l3 = (randint(90, 110), randint(90, 110), randint(90, 110))
q1 = randint(8501,9000)
seed(q1)
## m : 경변갑 철판 (어두운 색 or 어두운 은색)
m = (randint(0, 100), randint(0, 100), randint(0, 100))
x4 = randint(12001,12501)
seed(x4)
DooJungGap1 = [
[bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_1, bg1_1, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3],
[bg1_1, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, f2, f2, f2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_3, bg1_3],
[bg1_3, bg1_1, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, f2, f1, f1, f1, f2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_3],
[bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, g, f2, bg1_3, f1, f2, h, f2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_1, bg1_1, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2],
[bg1_3, bg1_3, bg1_3, bg1_1, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, g, f2, f2, f2, f1, f2, bg1_3, h, f1, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_1],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, f2, f1, f2, bg1_3, f1, h, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, f1, f2, bg1_3, f1, bg1_3, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, f1, g, g, f1, bg1_3, g, h, h, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, bg1_3, bg1_3, g, g, j, h, h, k, g, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, g, g, e1, k, h, h, k, e1, g, g, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, g, e2, g, k, k, h, h, k, k, e1, e2, g, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, g, e2, a2, g, k, k, h, h, k, k, k, e2, a2, g, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, a2, e2, e2, h, h, e1, e1, h, h, h, e2, a2, g, bg1_2, bg1_2, bg1_1, bg1_1, bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, a2, a2, e2, e2, h, g, h, h, g, h, g, e2, a2, g, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, e1, a2, a2, e2, g, g, g, g, g, g, g, g, e2, a2, e1, g, g, g, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, e2, a1, e1, a2, e2, g, i, i, i, i, i, i, g, e2, a2, a2, a2, e1, e2, g, bg1_3, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_1, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, g, g, e2, a1, a2, e2, e2, g, i, i, i, i, i, i, g, e2, a1, a2, e1, a2, a2, e2, g, g, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, a2, e2, g, e2, e2, e2, e2, g, a1, e2, i, i, i, i, e2, g, e2, e2, a1, a2, a2, a2, e2, g, a2, g, bg1_3, bg1_3, bg1_1, bg1_1, bg1_3, bg1_3, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, a2, e2, a2, a2, a1, g, g, g, g, a1, a2, a1, e2, e2, e2, e2, a2, a1, g, e2, e2, e2, e2, e2, g, a1, e2, a2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_1, bg1_3, bg1_2, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, a2, a2, a2, a2, a2, e2, a1, a1, a1, a1, a2, a2, a2, a1, e2, e2, a2, a2, a2, a1, g, g, g, g, g, a1, a2, a2, a2, a2, g, g, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_1, bg1_2, bg1_2],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, a2, a2, a2, a2, a2, e2, a2, a2, a2, a2, e2, a2, e2, a2, e2, a2, e2, e2, a2, e1, a2, e2, a2, e1, a1, a1, e2, a2, e2, a2, a2, a2, a2, a2, g, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_1, bg1_1],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, a2, a2, a2, a2, a2, a2, a2, a2, a2, e2, a2, a2, a2, a2, a2, a2, a2, e2, e2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a1, a2, a2, a2, a2, a2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, a2, a2, a1, a2, a2, a2, a2, a1, e1, a2, a2, a2, e1, a2, e2, a2, e2, a2, e2, e2, a2, e2, a2, e1, a2, e2, a2, e2, a2, e1, a1, a2, a2, a2, a2, a2, a2, a2, g, g, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, g, e2, a2, a2, a1, a2, a2, a2, a2, a2, a1, a2, a2, a2, a2, a2, a2, a2, a2, a2, e2, e2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a1, a2, a2, a2, a2, a2, a2, a2, a2, e2, g, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, g, e2, a1, a1, a2, a2, a1, a2, a2, a1, e2, g, a2, e2, a2, e2, a2, e2, a2, e2, e2, a2, e2, a2, e2, a2, e2, a2, g, e2, a1, a2, a2, a2, a2, a2, a2, a2, a2, e2, g, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, g, e2, a1, a2, a2, a2, a1, a1, a2, g, g, a2, a2, a2, a1, a2, a2, a2, e2, e2, a2, a2, a2, a2, a2, a2, a2, g, g, a1, a2, a2, a1, a2, a2, a2, a2, e2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, g, e2, a1, a2, a2, a2, a2, a2, g, g, a2, a2, e2, a1, e1, a2, e2, a2, e2, e2, a2, e1, a2, e2, a2, e2, a2, a2, g, g, a1, a1, a2, a2, a2, a2, e2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, g, e2, a1, a2, a2, a2, a2, g, g, a2, a2, a2, a1, a2, a2, a2, a2, e2, e2, a2, a2, a2, a1, a2, a2, a1, a2, g, g, a2, a2, a2, a2, a2, e2, g, bg1_2, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_1, bg1_1, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, g, e2, a1, a2, a2, a2, g, a2, a2, e2, a1, e2, a2, e2, a1, a2, e2, e2, a2, a2, e2, a2, e1, a1, e1, a2, a2, g, a2, a2, a2, a2, e2, g, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3],
[bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_3, g, e2, a1, a2, a2, g, g, a2, a2, a1, a2, a2, a1, a1, a2, a2, e2, e2, a2, a2, a1, a2, a2, a1, a2, a2, a2, g, a2, a2, a2, e2, g, g, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_1, bg1_3, g, e2, a2, a2, g, g, g, g, g, g, a1, a2, a2, a2, a2, e2, e2, a2, a1, a2, a2, a1, a2, a2, g, g, g, g, g, e2, e2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, e2, g, bg1_3, g, d1, d2, d2, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, d1, d1, g, bg1_3, bg1_3, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, bg1_3, bg1_3, g, d1, d2, d2, d2, d2, d2, d2, g, g, d2, d2, g, g, g, d2, d2, d1, d1, d2, d2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, d1, d1, d1, d2, d2, d2, g, g, g, g, g, g, d2, g, d2, d2, d2, d2, d2, d2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, g, g, d1, d1, d1, g, d2, d2, g, g, d1, d2, g, g, d2, d2, g, g, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_1, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, a1, a1, a2, g, g, g, g, d2, d1, g, g, d1, d2, g, g, g, g, a2, a1, a2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2],
[bg1_1, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, a1, a1, e1, a1, a2, g, d2, d2, g, e2, e2, g, d1, d2, g, a2, a1, e1, a1, a2, g, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_2, bg1_1, bg1_1, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2],
[bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, g, a2, a1, a2, a1, a2, g, d2, d1, g, e2, e2, g, d1, d2, g, g, a1, a2, a1, a2, g, bg1_1, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_1, bg1_3, bg1_3, bg1_1, bg1_1, bg1_2, bg1_2, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, g, a2, a2, e2, a1, g, g, d2, g, a1, e2, e2, a2, g, d1, d2, g, a2, e2, a2, a2, g, bg1_3, bg1_1, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_1, bg1_1],
[bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, g, a2, a1, a2, a2, a2, g, d1, g, a1, e2, e2, a2, g, d1, d2, g, a2, a2, a1, a2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_1, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, a2, a1, e2, a2, a2, e1, g, a2, a1, e2, e2, a2, e2, g, d1, d2, g, e2, a2, a2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, g, a2, a2, a2, a2, a2, a2, a2, a2, a1, e2, e2, a2, a2, g, d1, d2, g, a2, a2, a2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_1, bg1_1, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, g, a2, a2, a2, e1, a2, a2, e2, a2, e2, a1, e2, e2, a2, e2, g, d1, d2, g, e1, a2, a2, a2, g, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_1, bg1_3, bg1_2, g, a2, a2, a2, a2, a2, a2, a2, a2, a2, a1, e2, e2, a2, a2, g, d1, d2, g, a2, a2, a2, a2, g, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_3, bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_1, bg1_2, g, a2, a2, a2, e2, a2, a2, e2, a2, e2, a1, e2, e2, a2, e1, g, d1, d2, g, e2, a2, a2, a2, g, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_1, g, e2, e2, e2, a2, a2, a2, a2, a2, a2, a1, e2, e2, a2, a2, g, d1, d2, g, a2, e2, e2, e2, g, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, g, e2, e2, a2, a1, a1, a1, a1, e2, e2, a1, a1, g, d1, d2, g, e2, g, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_1, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, e2, e2, e2, e2, e2, e2, e2, e2, e2, e2, g, g, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, g, g, g, g, g, g, g, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
]
DooJungGap2 = [
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, g, g, g, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1],
[bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, g, f2, f2, f2, g, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, g, f2, f1, f1, f1, f2, g, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, g, g, f2, bg2_2, f1, f2, h, f2, g, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, g, f2, f2, f2, f1, f2, bg2_2, h, f1, g, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2],
[bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, g, f2, f1, f2, bg2_2, f1, h, g, bg2_3, bg2_3, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3],
[bg2_2, bg2_2, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, g, f1, f2, bg2_3, f1, bg2_2, g, g, bg2_2, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_2, bg2_2, bg2_3],
[bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, f1, g, g, f1, bg2_3, g, h, h, g, bg2_3, bg2_3, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, g, bg2_3, bg2_2, g, g, j, h, h, k, g, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, g, g, e1, k, h, h, k, e1, g, g, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, g, e2, g, k, k, h, h, k, k, e1, e2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, e2, a2, g, k, k, h, h, k, k, k, e2, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a2, e2, e2, h, h, e1, e1, h, h, h, e2, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1],
[bg2_1, bg2_1, bg2_1, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a2, a2, e2, e2, h, g, h, h, g, h, g, e2, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_1, bg2_1, bg2_1, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, e1, a2, a2, e2, g, g, g, g, g, g, g, g, e2, a2, e1, g, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, e2, a1, e1, a2, e2, g, i, i, i, i, i, i, g, e2, a2, a2, a2, e1, e2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, g, e2, a1, a2, e2, e2, g, i, i, i, i, i, i, g, e2, a1, a2, e1, a2, a2, e2, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, a2, e2, g, e2, e2, e2, e2, g, a1, e2, i, i, i, i, e2, g, e2, e2, a1, a2, a2, a2, e2, g, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a2, e2, a2, a2, a1, g, g, g, g, a1, a2, a1, e2, e2, e2, e2, a2, a1, g, e2, e2, e2, e2, e2, g, a1, e2, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, a2, a2, a2, a2, a2, e2, a1, a1, a1, a1, a2, a2, a2, a1, e2, e2, a2, a2, a2, a1, g, g, g, g, g, a1, a2, a2, a2, a2, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a2, a2, a2, a2, a2, e2, a2, a2, a2, a2, e2, a2, e2, a2, e2, a2, e2, e2, a2, e1, a2, e2, a2, e1, a1, a1, e2, a2, e2, a2, a2, a2, a2, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a2, a2, a2, a2, a2, a2, a2, a2, a2, e2, a2, a2, a2, a2, a2, a2, a2, e2, e2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a1, a2, a2, a2, a2, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a2, a2, a1, a2, a2, a2, a2, a1, e1, a2, a2, a2, e1, a2, e2, a2, e2, a2, e2, e2, a2, e2, a2, e1, a2, e2, a2, e2, a2, e1, a1, a2, a2, a2, a2, a2, a2, a2, g, g, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, g, e2, a2, a2, a1, a2, a2, a2, a2, a2, a1, a2, a2, a2, a2, a2, a2, a2, a2, a2, e2, e2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a1, a2, a2, a2, a2, a2, a2, a2, a2, e2, g, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, e2, a1, a1, a2, a2, a1, a2, a2, a1, e2, g, a2, e2, a2, e2, a2, e2, a2, e2, e2, a2, e2, a2, e2, a2, e2, a2, g, e2, a1, a2, a2, a2, a2, a2, a2, a2, a2, e2, g, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, e2, a1, a2, a2, a2, a1, a1, a2, g, g, a2, a2, a2, a1, a2, a2, a2, e2, e2, a2, a2, a2, a2, a2, a2, a2, g, g, a1, a2, a2, a1, a2, a2, a2, a2, e2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, e2, a1, a2, a2, a2, a2, a2, g, g, a2, a2, e2, a1, e1, a2, e2, a2, e2, e2, a2, e1, a2, e2, a2, e2, a2, a2, g, g, a1, a1, a2, a2, a2, a2, e2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, g, e2, a1, a2, a2, a2, a2, g, g, a2, a2, a2, a1, a2, a2, a2, a2, e2, e2, a2, a2, a2, a1, a2, a2, a1, a2, g, g, a2, a2, a2, a2, a2, e2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, g, e2, a1, a2, a2, a2, g, a2, a2, e2, a1, e2, a2, e2, a1, a2, e2, e2, a2, a2, e2, a2, e1, a1, e1, a2, a2, g, a2, a2, a2, a2, e2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, g, e2, a1, a2, a2, g, g, a2, a2, a1, a2, a2, a1, a1, a2, a2, e2, e2, a2, a2, a1, a2, a2, a1, a2, a2, a2, g, a2, a2, a2, e2, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, g, e2, a2, a2, g, g, g, g, g, g, a1, a2, a2, a2, a2, e2, e2, a2, a1, a2, a2, a1, a2, a2, g, g, g, g, g, e2, e2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, g, e2, g, bg2_3, g, d1, d2, d2, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, d1, d1, g, bg2_3, bg2_3, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, bg2_1, bg2_1, g, d1, d2, d2, d2, d2, d2, d2, g, g, d2, d2, g, g, g, d2, d2, d1, d1, d2, d2, g, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, d1, d1, d1, d2, d2, d2, g, g, g, g, g, g, d2, g, d2, d2, d2, d2, d2, d2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, g, g, d1, d1, d1, g, d2, d2, g, g, d1, d2, g, g, d2, d2, g, g, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a1, a1, a2, g, g, g, g, d2, d1, g, g, d1, d2, g, g, g, g, a2, a1, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a1, a1, e1, a1, a2, g, d2, d2, g, e2, e2, g, d1, d2, g, a2, a1, e1, a1, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_1, bg2_1, bg2_1, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a2, a1, a2, a1, a2, g, d2, d1, g, e2, e2, g, d1, d2, g, g, a1, a2, a1, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_1, bg2_1, bg2_1, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a2, a2, e2, a1, g, g, d2, g, a1, e2, e2, a2, g, d1, d2, g, a2, e2, a2, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1],
[bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a2, a1, a2, a2, a2, g, d1, g, a1, e2, e2, a2, g, d1, d2, g, a2, a2, a1, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a2, a1, e2, a2, a2, e1, g, a2, a1, e2, e2, a2, e2, g, d1, d2, g, e2, a2, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, a2, a2, a2, a2, a2, a2, a2, a2, a1, e2, e2, a2, a2, g, d1, d2, g, a2, a2, a2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, g, a2, a2, a2, e1, a2, a2, e2, a2, e2, a1, e2, e2, a2, e2, g, d1, d2, g, e1, a2, a2, a2, g, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2],
[bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, g, a2, a2, a2, a2, a2, a2, a2, a2, a2, a1, e2, e2, a2, a2, g, d1, d2, g, a2, a2, a2, a2, g, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3],
[bg2_2, bg2_2, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, g, a2, a2, a2, e2, a2, a2, e2, a2, e2, a1, e2, e2, a2, e1, g, d1, d2, g, e2, a2, a2, a2, g, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_2, bg2_2, bg2_3],
[bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, g, e2, e2, e2, a2, a2, a2, a2, a2, a2, a1, e2, e2, a2, a2, g, d1, d2, g, a2, e2, e2, e2, g, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, g, g, g, e2, e2, a2, a1, a1, a1, a1, e2, e2, a1, a1, g, d1, d2, g, e2, g, g, g, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, e2, e2, e2, e2, e2, e2, e2, e2, e2, e2, g, g, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, g, g, g, g, g, g, g, g, g, g, g, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3],
]
DooJungGap3 = [
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, g, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, f2, f2, f2, g, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, g, f2, f1, f1, f1, f2, g, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, g, g, f2, bg3_2, f1, f2, h, f2, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, g, f2, f2, f2, f1, f2, bg3_2, h, f1, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, g, f2, f1, f2, bg3_1, f1, h, g, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, f1, f2, bg3_1, f1, bg3_1, g, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, f1, g, g, f1, bg3_2, g, h, h, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, bg3_2, bg3_2, g, g, j, h, h, k, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, g, e1, k, h, h, k, e1, g, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, e2, g, k, k, h, h, k, k, e1, e2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, e2, a2, g, k, k, h, h, k, k, k, e2, a2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, a2, e2, e2, h, h, e1, e1, h, h, h, e2, a2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, a2, a2, e2, e2, h, g, h, h, g, h, g, e2, a2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, e1, a2, a2, e2, g, g, g, g, g, g, g, g, e2, a2, e1, g, g, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, e2, a1, e1, a2, e2, g, i, i, i, i, i, i, g, e2, a2, a2, a2, e1, e2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, g, g, e2, a1, a2, e2, e2, g, i, i, i, i, i, i, g, e2, a1, a2, e1, a2, a2, e2, g, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, g, g, a2, e2, g, e2, e2, e2, e2, g, a1, e2, i, i, i, i, e2, g, e2, e2, a1, a2, a2, a2, e2, g, a2, g, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, g, a2, e2, a2, a2, a1, g, g, g, g, a1, a2, a1, e2, e2, e2, e2, a2, a1, g, e2, e2, e2, e2, e2, g, a1, e2, a2, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, g, g, a2, a2, a2, a2, a2, e2, a1, a1, a1, a1, a2, a2, a2, a1, e2, e2, a2, a2, a2, a1, g, g, g, g, g, a1, a2, a2, a2, a2, g, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, g, a2, a2, a2, a2, a2, e2, a2, a2, a2, a2, e2, a2, e2, a2, e2, a2, e2, e2, a2, e1, a2, e2, a2, e1, a1, a1, e2, a2, e2, a2, a2, a2, a2, a2, g, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, g, a2, a2, a2, a2, a2, a2, a2, a2, a2, e2, a2, a2, a2, a2, a2, a2, a2, e2, e2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a1, a2, a2, a2, a2, a2, g, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, g, a2, a2, a1, a2, a2, a2, a2, a1, e1, a2, a2, a2, e1, a2, e2, a2, e2, a2, e2, e2, a2, e2, a2, e1, a2, e2, a2, e2, a2, e1, a1, a2, a2, a2, a2, a2, a2, a2, g, g, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, g, e2, a2, a2, a1, a2, a2, a2, a2, a2, a1, a2, a2, a2, a2, a2, a2, a2, a2, a2, e2, e2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a2, a1, a2, a2, a2, a2, a2, a2, a2, a2, e2, g, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, g, e2, a1, a1, a2, a2, a1, a2, a2, a1, e2, g, a2, e2, a2, e2, a2, e2, a2, e2, e2, a2, e2, a2, e2, a2, e2, a2, g, e2, a1, a2, a2, a2, a2, a2, a2, a2, a2, e2, g, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, g, e2, a1, a2, a2, a2, a1, a1, a2, g, g, a2, a2, a2, a1, a2, a2, a2, e2, e2, a2, a2, a2, a2, a2, a2, a2, g, g, a1, a2, a2, a1, a2, a2, a2, a2, e2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, g, e2, a1, a2, a2, a2, a2, a2, g, g, a2, a2, e2, a1, e1, a2, e2, a2, e2, e2, a2, e1, a2, e2, a2, e2, a2, a2, g, g, a1, a1, a2, a2, a2, a2, e2, g, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, g, e2, a1, a2, a2, a2, a2, g, g, a2, a2, a2, a1, a2, a2, a2, a2, e2, e2, a2, a2, a2, a1, a2, a2, a1, a2, g, g, a2, a2, a2, a2, a2, e2, g, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, g, e2, a1, a2, a2, a2, g, a2, a2, e2, a1, e2, a2, e2, a1, a2, e2, e2, a2, a2, e2, a2, e1, a1, e1, a2, a2, g, a2, a2, a2, a2, e2, g, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, g, e2, a1, a2, a2, g, g, a2, a2, a1, a2, a2, a1, a1, a2, a2, e2, e2, a2, a2, a1, a2, a2, a1, a2, a2, a2, g, a2, a2, a2, e2, g, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, g, e2, a2, a2, g, g, g, g, g, g, a1, a2, a2, a2, a2, e2, e2, a2, a1, a2, a2, a1, a2, a2, g, g, g, g, g, e2, e2, g, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, g, e2, g, bg3_1, g, d1, d2, d2, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, d1, d1, g, bg3_1, bg3_1, g, g, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, g, bg3_2, bg3_1, g, d1, d2, d2, d2, d2, d2, d2, g, g, d2, d2, g, g, g, d2, d2, d1, d1, d2, d2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, g, d1, d1, d1, d2, d2, d2, g, g, g, g, g, g, d2, g, d2, d2, d2, d2, d2, d2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, g, g, g, d1, d1, d1, g, d2, d2, g, g, d1, d2, g, g, d2, d2, g, g, g, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, a1, a1, a2, g, g, g, g, d2, d1, g, g, d1, d2, g, g, g, g, a2, a1, a2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, a1, a1, e1, a1, a2, g, d2, d2, g, e2, e2, g, d1, d2, g, a2, a1, e1, a1, a2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, a2, a1, a2, a1, a2, g, d2, d1, g, e2, e2, g, d1, d2, g, g, a1, a2, a1, a2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, a2, a2, e2, a1, g, g, d2, g, a1, e2, e2, a2, g, d1, d2, g, a2, e2, a2, a2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, a2, a1, a2, a2, a2, g, d1, g, a1, e2, e2, a2, g, d1, d2, g, a2, a2, a1, a2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, a2, a1, e2, a2, a2, e1, g, a2, a1, e2, e2, a2, e2, g, d1, d2, g, e2, a2, a2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, a2, a2, a2, a2, a2, a2, a2, a2, a1, e2, e2, a2, a2, g, d1, d2, g, a2, a2, a2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, a2, a2, a2, e1, a2, a2, e2, a2, e2, a1, e2, e2, a2, e2, g, d1, d2, g, e1, a2, a2, a2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, a2, a2, a2, a2, a2, a2, a2, a2, a2, a1, e2, e2, a2, a2, g, d1, d2, g, a2, a2, a2, a2, g, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, a2, a2, a2, e2, a2, a2, e2, a2, e2, a1, e2, e2, a2, e1, g, d1, d2, g, e2, a2, a2, a2, g, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, g, e2, e2, e2, a2, a2, a2, a2, a2, a2, a1, e2, e2, a2, a2, g, d1, d2, g, a2, e2, e2, e2, g, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, g, g, g, e2, e2, a2, a1, a1, a1, a1, e2, e2, a1, a1, g, d1, d2, g, e2, g, g, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, g, g, e2, e2, e2, e2, e2, e2, e2, e2, e2, e2, g, g, g, g, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, g, g, g, g, g, g, g, g, g, g, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
]
GyungByunGap1 = [
[bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_1, bg1_1, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3],
[bg1_1, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, f2, f2, f2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_3, bg1_3],
[bg1_3, bg1_1, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, f2, f1, f1, f1, f2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_3],
[bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, g, f2, bg1_3, f1, f2, e2, f2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_1, bg1_1, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2],
[bg1_3, bg1_3, bg1_3, bg1_1, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, g, f2, f2, f2, f1, f2, bg1_3, e2, f1, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_1],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, f2, f1, f2, bg1_3, f1, e2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, f1, f2, bg1_3, f1, bg1_3, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, f1, g, g, f1, bg1_3, g, e2, e2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, bg1_3, bg1_3, bg1_3, g, j, e2, e2, e2, g, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, g, e1, e2, e2, e2, e2, e2, g, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, g, e1, e2, e2, e2, e2, e2, e2, e2, g, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, g, e1, e2, e2, e2, e2, e2, e2, e2, g, bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, l3, e1, e1, e1, e2, e2, e1, e1, e2, l3, g, bg1_2, bg1_2, bg1_2, bg1_1, bg1_1, bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, l3, e1, g, g, e1, e1, g, g, e1, l3, g, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, l3, l3, g, i, i, g, g, i, i, g, l3, l3, g, bg1_2, bg1_2, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, l3, l3, l3, g, i, i, i, i, i, i, g, l1, l3, g, g, g, g, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_1, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, g, g, l1, g, l3, l3, l1, g, i, i, i, i, i, i, g, l1, l3, g, l3, l2, l3, g, g, g, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, l3, l3, l2, l1, g, l1, l1, g, l1, g, i, i, i, i, g, g, l1, l3, l3, g, l3, l2, l3, l3, l2, g, bg1_3, bg1_3, bg1_1, bg1_1, bg1_3, bg1_3, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, l2, l3, l3, l2, l3, l1, g, g, g, l1, l3, l1, g, g, g, g, l3, l1, g, l1, g, l3, l2, l2, l3, l2, l3, l3, g, g, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_1, bg1_3, bg1_2, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, l3, l3, l2, l3, l2, l3, l2, l3, l1, l1, l1, l3, l2, l3, l1, l3, g, l3, l2, l3, l1, g, l3, l2, l3, l2, l3, l3, l2, l2, l3, l3, g, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_1, bg1_2, bg1_2],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, l3, l3, l2, l3, l2, l3, l2, l3, l2, l3, m, m, l3, m, m, l3, l2, g, l2, l3, m, m, l3, m, m, l3, l3, l2, l3, l3, l3, l3, l2, l3, g, g, bg1_1, bg1_3, bg1_3, bg1_3, bg1_1, bg1_1],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, l3, l2, l3, l3, l2, l3, l3, l2, l3, l3, l2, m, m, l2, m, m, l2, l3, g, l3, l3, m, m, l2, m, m, l3, l2, l3, l2, l1, l2, l3, l3, l2, l3, l2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, l3, l2, l3, l3, l2, l2, l3, l1, l3, l2, l2, l3, m, m, l3, m, m, l3, l2, g, l3, l2, m, m, l3, m, m, l3, l3, l3, l1, l3, l3, l2, l3, l3, l2, l3, l2, g, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, g, l1, l2, l3, l1, l3, l2, l3, l2, l3, l1, l3, l3, l2, l3, l2, l3, l3, l2, l3, g, l3, l2, l3, l3, l2, l3, l3, l3, l3, l2, l3, l1, l3, l2, l3, l2, l2, l3, l2, l3, l1, g, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, g, l1, l2, l3, l2, l3, l1, l3, l2, l1, l2, g, m, m, l3, m, m, l3, l3, g, l2, l3, m, m, l3, m, m, l2, g, l3, l1, l3, l2, l3, l2, l3, l3, l2, l3, l1, g, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, g, l1, l2, l2, l3, l2, l1, l1, l3, g, g, m, m, l2, m, m, l2, l3, g, l3, l2, m, m, l2, m, m, l3, g, g, l1, l2, l3, l1, l3, l3, l2, l3, l1, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, g, l1, l3, l2, l2, l3, l3, l2, g, g, l3, m, m, l3, m, m, l3, l2, g, l2, l3, m, m, l3, m, m, l2, l3, g, g, l1, l1, l3, l2, l2, l3, l1, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, g, l1, l3, l2, l3, l2, l3, g, g, l2, l3, l2, l3, l3, l2, l3, l3, g, l2, l3, l2, l3, l2, l3, l2, l3, l3, g, g, l3, l3, l2, l3, l3, l1, g, bg1_2, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_1, bg1_1, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, g, l1, l3, l2, l3, l3, g, l3, l3, m, m, l2, m, m, l2, l3, g, l3, l2, m, m, l3, m, m, l3, l2, l3, g, l2, l3, l2, l3, l1, g, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3],
[bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_3, g, l1, l2, l3, l2, g, g, l2, l3, m, m, l3, m, m, l3, l2, g, l3, l3, m, m, l2, m, m, l2, l3, l2, g, l3, l2, l3, l1, g, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_1, bg1_3, g, l1, l3, l1, g, g, g, g, g, g, l2, m, m, l2, l3, g, l2, l3, m, m, l3, m, m, l3, g, g, g, g, g, l1, l1, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, l1, g, bg1_3, g, d1, d2, d2, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, d1, d1, g, bg1_3, bg1_3, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, bg1_3, bg1_3, g, d1, d2, d2, d2, d2, d2, d2, g, g, d2, d2, g, g, g, d2, d2, d1, d1, d2, d2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, d1, d1, d1, d2, d2, d2, g, g, g, g, g, g, d2, g, d2, d2, d2, d2, d2, d2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, g, g, d1, d1, d1, g, d2, d2, g, g, d1, d2, g, g, d2, d2, g, g, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_1, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, l1, l1, l3, g, g, g, g, d2, d1, g, g, d1, d2, g, g, g, g, l3, l3, l3, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2],
[bg1_1, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, l1, l1, l2, m, m, g, d2, d2, g, g, l3, g, d1, d2, g, m, m, l3, l2, l3, g, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_2, bg1_1, bg1_1, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2],
[bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, g, l3, l1, l3, m, m, g, d2, d1, g, l1, g, g, d1, d2, g, g, m, m, l3, l2, g, bg1_1, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_1, bg1_3, bg1_3, bg1_1, bg1_1, bg1_2, bg1_2, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, g, l2, l3, l2, m, m, g, d2, g, l3, l1, g, l3, g, d1, d2, g, m, m, l3, l3, g, bg1_3, bg1_1, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_1, bg1_1],
[bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, g, l3, l1, l3, l3, l2, g, d1, g, l2, l1, g, l2, g, d1, d2, g, l2, l3, l2, l3, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_1, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, l2, l1, l2, m, m, l2, g, g, l3, l1, g, l3, l2, g, d1, d2, g, m, l3, l3, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, g, l3, l2, l3, m, m, l3, m, m, l2, l1, g, l2, l3, g, d1, d2, g, m, l3, l2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_1, bg1_1, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, g, l3, l2, l3, l3, m, m, l2, m, m, l3, l1, g, l3, l3, g, d1, d2, g, m, l3, l3, l2, g, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_1, bg1_3, bg1_2, g, l3, l3, l2, l2, l3, l2, l3, l2, l3, l2, l1, g, l3, l2, g, d1, d2, g, l2, l3, l2, l3, g, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_3, bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_1, bg1_2, g, l2, l3, l3, m, m, l3, m, m, l3, l1, g, l3, l2, m, g, g, g, g, l3, l2, l3, l2, g, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_1, g, l1, l1, l1, m, m, l2, m, m, l2, l1, g, l2, l3, m, m, l2, m, m, l3, l1, l1, l1, g, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, g, m, m, l3, m, m, l3, l1, g, l3, l2, m, m, l3, m, m, l1, g, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_1, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, l1, l1, l1, l1, l1, g, l1, l1, l1, l1, l1, l1, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, g, g, g, g, g, g, g, g, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
]
GyungByunGap2 = [
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, m, bg2_3, g, g, g, bg2_3, m, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m],
[bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, g, f2, f2, f2, g, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, g, f2, f1, f1, f1, f2, g, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, g, g, f2, bg2_2, f1, f2, e2, f2, g, bg2_2, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, g, f2, f2, f2, f1, f2, bg2_2, e2, f1, g, bg2_2, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2],
[bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, g, f2, f1, f2, bg2_2, f1, e2, g, bg2_3, bg2_3, bg2_2, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3],
[bg2_2, bg2_2, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, g, f1, f2, bg2_3, f1, bg2_2, g, g, bg2_2, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_2, bg2_2, bg2_3],
[bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, f1, g, g, f1, bg2_3, g, e2, e2, g, bg2_3, bg2_3, bg2_2, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, g, bg2_3, bg2_2, bg2_2, g, j, e2, e2, e2, g, bg2_2, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_2, g, e1, e2, e2, e2, e2, e2, g, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, g, e1, e2, e2, e2, e2, e2, e2, e2, g, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, g, e1, e2, e2, e2, e2, e2, e2, e2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l3, e1, e1, e1, e2, e2, e1, e1, e2, l3, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m],
[m, m, m, m, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l3, e1, g, g, e1, e1, g, g, e1, l3, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, m, m, m, m, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l3, l3, g, i, i, g, g, i, i, g, l3, l3, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, l3, l3, l3, g, i, i, i, i, i, i, g, l1, l3, g, g, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, g, l1, g, l3, l3, l1, g, i, i, i, i, i, i, g, l1, l3, g, l3, l2, l3, g, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, l3, l3, l2, l1, g, l1, l1, g, l1, g, i, i, i, i, g, g, l1, l3, l3, g, l3, l2, l3, l3, l2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, l2, l3, l3, l2, l3, l1, g, g, g, l1, l3, l1, g, g, g, g, l3, l1, g, l1, g, l3, l2, l2, l3, l2, l3, l3, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l3, l3, l2, l3, l2, l3, l2, l3, l1, l1, l1, l3, l2, l3, l1, l3, g, l3, l2, l3, l1, g, l3, l2, l3, l2, l3, l3, l2, l2, l3, l3, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l3, l3, l2, l3, l2, l3, l2, l3, l2, l3, m, m, l3, m, m, l3, l2, g, l2, l3, m, m, l3, m, m, l3, l3, l2, l3, l3, l3, l3, l2, l3, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l3, l2, l3, l3, l2, l3, l3, l2, l3, l3, l2, m, m, l2, m, m, l2, l3, g, l3, l3, m, m, l2, m, m, l3, l2, l3, l2, l1, l2, l3, l3, l2, l3, l2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l3, l2, l3, l3, l2, l2, l3, l1, l3, l2, l2, l3, m, m, l3, m, m, l3, l2, g, l3, l2, m, m, l3, m, m, l3, l3, l3, l1, l3, l3, l2, l3, l3, l2, l3, l2, g, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, g, l1, l2, l3, l1, l3, l2, l3, l2, l3, l1, l3, l3, l2, l3, l2, l3, l3, l2, l3, g, l3, l2, l3, l3, l2, l3, l3, l3, l3, l2, l3, l1, l3, l2, l3, l2, l2, l3, l2, l3, l1, g, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l1, l2, l3, l2, l3, l1, l3, l2, l1, l2, g, m, m, l3, m, m, l3, l3, g, l2, l3, m, m, l3, m, m, l2, g, l3, l1, l3, l2, l3, l2, l3, l3, l2, l3, l1, g, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l1, l2, l2, l3, l2, l1, l1, l3, g, g, m, m, l2, m, m, l2, l3, g, l3, l2, m, m, l2, m, m, l3, g, g, l1, l2, l3, l1, l3, l3, l2, l3, l1, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l1, l3, l2, l2, l3, l3, l2, g, g, l3, m, m, l3, m, m, l3, l2, g, l2, l3, m, m, l3, m, m, l2, l3, g, g, l1, l1, l3, l2, l2, l3, l1, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, g, l1, l3, l2, l3, l2, l3, g, g, l2, l3, l2, l3, l3, l2, l3, l3, g, l2, l3, l2, l3, l2, l3, l2, l3, l3, g, g, l3, l3, l2, l3, l3, l1, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, g, l1, l3, l2, l3, l3, g, l3, l3, m, m, l2, m, m, l2, l3, g, l3, l2, m, m, l3, m, m, l3, l2, l3, g, l2, l3, l2, l3, l1, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, g, l1, l2, l3, l2, g, g, l2, l3, m, m, l3, m, m, l3, l2, g, l3, l3, m, m, l2, m, m, l2, l3, l2, g, l3, l2, l3, l1, g, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, g, l1, l3, l1, g, g, g, g, g, g, l2, m, m, l2, l3, g, l2, l3, m, m, l3, m, m, l3, g, g, g, g, g, l1, l1, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, g, l1, g, bg2_3, g, d1, d2, d2, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, d1, d1, g, bg2_3, bg2_3, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, m, m, g, d1, d2, d2, d2, d2, d2, d2, g, g, d2, d2, g, g, g, d2, d2, d1, d1, d2, d2, g, m, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, d1, d1, d1, d2, d2, d2, g, g, g, g, g, g, d2, g, d2, d2, d2, d2, d2, d2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, g, g, d1, d1, d1, g, d2, d2, g, g, d1, d2, g, g, d2, d2, g, g, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l1, l1, l3, g, g, g, g, d2, d1, g, g, d1, d2, g, g, g, g, l3, l3, l3, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l1, l1, l2, m, m, g, d2, d2, g, g, l3, g, d1, d2, g, m, m, l3, l2, l3, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[m, m, m, m, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l3, l1, l3, m, m, g, d2, d1, g, l1, g, g, d1, d2, g, g, m, m, l3, l2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, m, m, m, m, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l2, l3, l2, m, m, g, d2, g, l3, l1, g, l3, g, d1, d2, g, m, m, l3, l3, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m],
[bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l3, l1, l3, l3, l2, g, d1, g, l2, l1, g, l2, g, d1, d2, g, l2, l3, l2, l3, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l2, l1, l2, m, m, l2, g, g, l3, l1, g, l3, l2, g, d1, d2, g, m, l3, l3, g, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l3, l2, l3, m, m, l3, m, m, l2, l1, g, l2, l3, g, d1, d2, g, m, l3, l2, g, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, g, l3, l2, l3, l3, m, m, l2, m, m, l3, l1, g, l3, l3, g, d1, d2, g, m, l3, l3, l2, g, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2],
[bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, m, bg2_3, bg2_3, bg2_3, g, l3, l3, l2, l2, l3, l2, l3, l2, l3, l2, l1, g, l3, l2, g, d1, d2, g, l2, l3, l2, l3, g, bg2_3, bg2_3, m, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3],
[bg2_2, bg2_2, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, g, l2, l3, l3, m, m, l3, m, m, l3, l1, g, l3, l2, m, g, g, g, g, l3, l2, l3, l2, g, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_2, bg2_2, bg2_3],
[bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, m, bg2_3, bg2_3, bg2_3, g, l1, l1, l1, m, m, l2, m, m, l2, l1, g, l2, l3, m, m, l2, m, m, l3, l1, l1, l1, g, bg2_3, bg2_3, m, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, g, g, g, m, m, l3, m, m, l3, l1, g, l3, l2, m, m, l3, m, m, l1, g, g, g, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, l1, l1, l1, l1, l1, g, l1, l1, l1, l1, l1, l1, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, g, g, g, g, g, g, g, g, g, g, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, m, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3],
]
GyungByunGap3 = [
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, g, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, f2, f2, f2, g, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, g, f2, f1, f1, f1, f2, g, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, g, g, f2, bg3_2, f1, f2, e2, f2, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, g, f2, f2, f2, f1, f2, bg3_2, e2, f1, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, g, f2, f1, f2, bg3_1, f1, e2, g, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, f1, f2, bg3_1, f1, bg3_1, g, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, f1, g, g, f1, bg3_2, g, e2, e2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, bg3_2, bg3_2, bg3_2, g, j, e2, e2, e2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, e1, e2, e2, e2, e2, e2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, e1, e2, e2, e2, e2, e2, e2, e2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, e1, e2, e2, e2, e2, e2, e2, e2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, l3, e1, e1, e1, e2, e2, e1, e1, e2, l3, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, l3, e1, g, g, e1, e1, g, g, e1, l3, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, l3, l3, g, i, i, g, g, i, i, g, l3, l3, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, g, l3, l3, l3, g, i, i, i, i, i, i, g, l1, l3, g, g, g, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, g, g, l1, g, l3, l3, l1, g, i, i, i, i, i, i, g, l1, l3, g, l3, l2, l3, g, g, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, g, g, l3, l3, l2, l1, g, l1, l1, g, l1, g, i, i, i, i, g, g, l1, l3, l3, g, l3, l2, l3, l3, l2, g, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, g, g, l2, l3, l3, l2, l3, l1, g, g, g, l1, l3, l1, g, g, g, g, l3, l1, g, l1, g, l3, l2, l2, l3, l2, l3, l3, g, g, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, g, l3, l3, l2, l3, l2, l3, l2, l3, l1, l1, l1, l3, l2, l3, l1, l3, g, l3, l2, l3, l1, g, l3, l2, l3, l2, l3, l3, l2, l2, l3, l3, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, g, l3, l3, l2, l3, l2, l3, l2, l3, l2, l3, m, m, l3, m, m, l3, l2, g, l2, l3, m, m, l3, m, m, l3, l3, l2, l3, l3, l3, l3, l2, l3, g, g, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, g, l3, l2, l3, l3, l2, l3, l3, l2, l3, l3, l2, m, m, l2, m, m, l2, l3, g, l3, l3, m, m, l2, m, m, l3, l2, l3, l2, l1, l2, l3, l3, l2, l3, l2, g, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, g, l3, l2, l3, l3, l2, l2, l3, l1, l3, l2, l2, l3, m, m, l3, m, m, l3, l2, g, l3, l2, m, m, l3, m, m, l3, l3, l3, l1, l3, l3, l2, l3, l3, l2, l3, l2, g, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, g, l1, l2, l3, l1, l3, l2, l3, l2, l3, l1, l3, l3, l2, l3, l2, l3, l3, l2, l3, g, l3, l2, l3, l3, l2, l3, l3, l3, l3, l2, l3, l1, l3, l2, l3, l2, l2, l3, l2, l3, l1, g, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, g, l1, l2, l3, l2, l3, l1, l3, l2, l1, l2, g, m, m, l3, m, m, l3, l3, g, l2, l3, m, m, l3, m, m, l2, g, l3, l1, l3, l2, l3, l2, l3, l3, l2, l3, l1, g, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, g, l1, l2, l2, l3, l2, l1, l1, l3, g, g, m, m, l2, m, m, l2, l3, g, l3, l2, m, m, l2, m, m, l3, g, g, l1, l2, l3, l1, l3, l3, l2, l3, l1, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, g, l1, l3, l2, l2, l3, l3, l2, g, g, l3, m, m, l3, m, m, l3, l2, g, l2, l3, m, m, l3, m, m, l2, l3, g, g, l1, l1, l3, l2, l2, l3, l1, g, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, g, l1, l3, l2, l3, l2, l3, g, g, l2, l3, l2, l3, l3, l2, l3, l3, g, l2, l3, l2, l3, l2, l3, l2, l3, l3, g, g, l3, l3, l2, l3, l3, l1, g, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, g, l1, l3, l2, l3, l3, g, l3, l3, m, m, l2, m, m, l2, l3, g, l3, l2, m, m, l3, m, m, l3, l2, l3, g, l2, l3, l2, l3, l1, g, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, g, l1, l2, l3, l2, g, g, l2, l3, m, m, l3, m, m, l3, l2, g, l3, l3, m, m, l2, m, m, l2, l3, l2, g, l3, l2, l3, l1, g, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, g, l1, l3, l1, g, g, g, g, g, g, l2, m, m, l2, l3, g, l2, l3, m, m, l3, m, m, l3, g, g, g, g, g, l1, l1, g, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, g, l1, g, bg3_1, g, d1, d2, d2, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, d1, d1, g, bg3_1, bg3_1, g, g, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, g, bg3_2, bg3_1, g, d1, d2, d2, d2, d2, d2, d2, g, g, d2, d2, g, g, g, d2, d2, d1, d1, d2, d2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, g, d1, d1, d1, d2, d2, d2, g, g, g, g, g, g, d2, g, d2, d2, d2, d2, d2, d2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, g, g, g, d1, d1, d1, g, d2, d2, g, g, d1, d2, g, g, d2, d2, g, g, g, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, l1, l1, l3, g, g, g, g, d2, d1, g, g, d1, d2, g, g, g, g, l3, l3, l3, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, l1, l1, l2, m, m, g, d2, d2, g, g, l3, g, d1, d2, g, m, m, l3, l2, l3, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, l3, l1, l3, m, m, g, d2, d1, g, l1, g, g, d1, d2, g, g, m, m, l3, l2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, l2, l3, l2, m, m, g, d2, g, l3, l1, g, l3, g, d1, d2, g, m, m, l3, l3, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, l3, l1, l3, l3, l2, g, d1, g, l2, l1, g, l2, g, d1, d2, g, l2, l3, l2, l3, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, l2, l1, l2, m, m, l2, g, g, l3, l1, g, l3, l2, g, d1, d2, g, m, l3, l3, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, l3, l2, l3, m, m, l3, m, m, l2, l1, g, l2, l3, g, d1, d2, g, m, l3, l2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, l3, l2, l3, l3, m, m, l2, m, m, l3, l1, g, l3, l3, g, d1, d2, g, m, l3, l3, l2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, l3, l3, l2, l2, l3, l2, l3, l2, l3, l2, l1, g, l3, l2, g, d1, d2, g, l2, l3, l2, l3, g, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, l2, l3, l3, m, m, l3, m, m, l3, l1, g, l3, l2, m, g, g, g, g, l3, l2, l3, l2, g, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, g, l1, l1, l1, m, m, l2, m, m, l2, l1, g, l2, l3, m, m, l2, m, m, l3, l1, l1, l1, g, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, g, g, g, m, m, l3, m, m, l3, l1, g, l3, l2, m, m, l3, m, m, l1, g, g, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, g, g, l1, l1, l1, l1, l1, g, l1, l1, l1, l1, l1, l1, g, g, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, g, g, g, g, g, g, g, g, g, g, g, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
]
ChalGap1 = [
[bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_1, bg1_1, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3],
[bg1_1, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_3, bg1_3],
[bg1_3, bg1_1, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_3],
[bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_1, bg1_1, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2],
[bg1_3, bg1_3, bg1_3, bg1_1, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_1],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, b2, b2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, j, b2, b2, b2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, b1, b2, b2, b2, b2, b2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, b1, b2, b2, b2, b2, b2, b2, b2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, g, b1, b2, b2, b2, b2, b2, b2, b2, g, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, g, l3, g, b1, b2, b2, b2, b2, b2, g, l3, g, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, g, l3, g, b1, b1, b1, b1, b1, b1, g, l3, g, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, l3, l3, g, g, g, g, g, g, g, g, l3, l3, g, bg1_2, bg1_2, bg1_1, bg1_1, bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, l3, l3, l3, g, i, i, i, i, i, i, g, l1, l3, g, g, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, g, g, c1, g, l3, l3, l1, g, i, i, i, i, i, i, g, l1, l3, g, c1, c1, c2, g, g, g, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, g, g, c1, c1, c1, c2, g, l1, l1, g, c1, g, i, i, i, i, g, g, l1, l3, l3, g, c2, c1, c1, c2, c1, g, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_1, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, g, g, c1, c2, c1, c2, c1, c2, g, g, g, c2, c1, c2, g, g, g, g, c1, c2, g, l1, g, c2, c1, c1, c2, c1, c1, c2, g, g, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, c1, c2, c1, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, c2, c1, c1, c2, c1, c1, c2, c1, c1, c2, g, bg1_1, bg1_3, bg1_3, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c1, g, g, bg1_2, bg1_2, bg1_1, bg1_3, bg1_2, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, c2, c1, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c1, c2, c1, c2, g, bg1_1, bg1_3, bg1_1, bg1_2, bg1_2],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, c2, c1, c2, c1, c1, c2, c1, c2, c1, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c2, c1, g, bg1_3, bg1_3, bg1_3, bg1_1, bg1_1],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, c2, c1, c2, c1, c1, c2, c1, g, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, g, c2, c1, c1, c2, c1, c2, c1, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, c2, c1, c2, c1, c1, g, bg1_3, bg1_3, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, bg1_3, bg1_3, g, c1, c2, c1, c2, c1, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, g, c2, c1, c2, g, bg1_3, bg1_3, bg1_3, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, bg1_3, bg1_3, bg1_3, g, c1, c2, c1, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, g, c2, g, bg1_3, bg1_3, bg1_3, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, bg1_3, bg1_3, bg1_3, g, c1, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_1, bg1_1, bg1_2, g, bg1_2, bg1_3, bg1_3, g, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, g, bg1_3, bg1_3, bg1_3, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_3, bg1_3, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_3, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_1, bg1_1, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, g, g, g, g, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, g, g, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3],
[bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_1, g, d1, d2, d2, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, d1, d1, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, d1, d2, d2, d2, d2, d2, d2, g, g, d2, d2, g, g, g, d2, d2, d1, d1, d2, d2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, d1, d1, d1, d2, d2, d2, g, g, g, g, g, g, d2, g, d2, d2, d2, d2, d2, d2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, g, g, g, d1, d1, d1, g, d2, d2, g, g, d1, d2, g, g, d2, d2, g, g, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, c2, c1, c2, g, g, g, g, d2, d1, g, g, d1, d2, g, g, g, g, c1, c2, c1, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, g, c1, c2, c1, c2, c1, g, d2, d2, g, g, c1, g, d1, d2, g, c2, c1, c2, c1, c2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_1, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, c1, c2, c1, c2, c1, g, d2, d1, g, c2, c1, g, d1, d2, g, g, c1, c2, c1, c2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2],
[bg1_1, bg1_3, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, g, c2, c1, c2, c1, c2, g, d2, g, c2, c1, c2, c1, g, d1, d2, g, c2, c1, c2, c1, g, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_2, bg1_1, bg1_1, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2],
[bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, g, c2, c1, c2, c1, c2, g, d1, g, c2, c1, c2, c1, g, d1, d2, g, c2, c1, c2, c1, g, bg1_1, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_1, bg1_3, bg1_3, bg1_1, bg1_1, bg1_2, bg1_2, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, g, c1, c2, c1, c2, c1, c2, g, c2, c1, c2, c1, c2, c1, g, d1, d2, g, c2, c1, c2, g, bg1_3, bg1_1, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_1, bg1_1],
[bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, d1, d2, g, c2, c1, c2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_1, bg1_2, bg1_3, bg1_3, bg1_3, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, d1, d2, g, c1, c2, c1, c2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_3, bg1_3, bg1_3, bg1_1, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, d1, d2, g, c1, c2, c1, c2, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_1, bg1_1, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, g, c1, c2, c1, c2, c1, g, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_1, bg1_3, bg1_2, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_3, bg1_1, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_1, bg1_2, bg1_2, g, g, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, g, g, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_1, bg1_1, bg1_2, bg1_2, bg1_2, g, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, g, g, g, g, g, g, g, g, g, g, g, g, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_1, bg1_2, bg1_2, bg1_2, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_2, bg1_3, bg1_2, bg1_2, bg1_2, bg1_2, bg1_2, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_1, bg1_1, bg1_1, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
[bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3, bg1_3],
]
ChalGap2 = [
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1],
[bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, g, g, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2],
[bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, g, b2, b2, g, bg2_3, bg2_3, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3],
[bg2_2, bg2_2, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, g, j, b2, b2, b2, g, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_2, bg2_2, bg2_3],
[bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_3, g, b1, b2, b2, b2, b2, b2, g, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, g, b1, b2, b2, b2, b2, b2, b2, b2, g, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, g, b1, b2, b2, b2, b2, b2, b2, b2, g, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, g, l3, g, b1, b2, b2, b2, b2, b2, g, l3, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l3, g, b1, b1, b1, b1, b1, b1, g, l3, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, l3, l3, g, g, g, g, g, g, g, g, l3, l3, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1],
[bg2_1, bg2_1, bg2_1, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, l3, l3, l3, g, i, i, i, i, i, i, g, l1, l3, g, g, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_1, bg2_1, bg2_1, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, g, c1, g, l3, l3, l1, g, i, i, i, i, i, i, g, l1, l3, g, c1, c1, c2, g, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, c1, c1, c1, c2, g, l1, l1, g, c1, g, i, i, i, i, g, g, l1, l3, l3, g, c2, c1, c1, c2, c1, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, c1, c2, c1, c2, c1, c2, g, g, g, c2, c1, c2, g, g, g, g, c1, c2, g, l1, g, c2, c1, c1, c2, c1, c1, c2, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c1, c2, c1, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, c2, c1, c1, c2, c1, c1, c2, c1, c1, c2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c1, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c2, c1, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c1, c2, c1, c2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c2, c1, c2, c1, c1, c2, c1, c2, c1, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c2, c1, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c2, c1, c2, c1, c1, c2, c1, g, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, g, c2, c1, c1, c2, c1, c2, c1, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c2, c1, c2, c1, c1, g, bg2_3, bg2_2, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, bg2_3, bg2_3, g, c1, c2, c1, c2, c1, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, g, c2, c1, c2, g, bg2_2, bg2_3, bg2_3, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, bg2_3, bg2_2, bg2_3, g, c1, c2, c1, g, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, g, c2, g, bg2_2, bg2_2, bg2_2, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, bg2_2, bg2_2, bg2_3, g, c1, g, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, g, bg2_2, bg2_2, bg2_2, g, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, g, bg2_2, bg2_2, bg2_3, g, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, g, g, g, g, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, g, g, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, g, d1, d2, d2, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, d1, d1, g, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, g, d1, d2, d2, d2, d2, d2, d2, g, g, d2, d2, g, g, g, d2, d2, d1, d1, d2, d2, g, bg2_2, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, g, d1, d1, d1, d2, d2, d2, g, g, g, g, g, g, d2, g, d2, d2, d2, d2, d2, d2, g, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_1, g, g, g, g, d1, d1, d1, g, d2, d2, g, g, d1, d2, g, g, d2, d2, g, g, g, g, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c2, c1, c2, g, g, g, g, d2, d1, g, g, d1, d2, g, g, g, g, c1, c2, c1, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c1, c2, c1, c2, c1, g, d2, d2, g, g, c1, g, d1, d2, g, c2, c1, c2, c1, c2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c1, c2, c1, c2, c1, g, d2, d1, g, c2, c1, g, d1, d2, g, g, c1, c2, c1, c2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c2, c1, c2, c1, c2, g, d2, g, c2, c1, c2, c1, g, d1, d2, g, c2, c1, c2, c1, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3],
[bg2_1, bg2_1, bg2_1, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c2, c1, c2, c1, c2, g, d1, g, c2, c1, c2, c1, g, d1, d2, g, c2, c1, c2, c1, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_1, bg2_1, bg2_1, bg2_3],
[bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c1, c2, c1, c2, c1, c2, g, c2, c1, c2, c1, c2, c1, g, d1, d2, g, c2, c1, c2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1],
[bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, d1, d2, g, c2, c1, c2, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, d1, d2, g, c1, c2, c1, c2, g, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, d1, d2, g, c1, c2, c1, c2, g, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, g, c1, c2, c1, c2, c1, g, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2],
[bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3],
[bg2_2, bg2_2, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, g, g, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, g, g, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_2, bg2_2, bg2_3],
[bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, g, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, g, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3],
[bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, g, g, g, g, g, g, g, g, g, g, g, g, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_2, bg2_3, bg2_3, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_2, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_2, bg2_2, bg2_3, bg2_3, bg2_3, bg2_2, bg2_2],
[bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_3, bg2_1, bg2_3, bg2_3, bg2_3, bg2_2, bg2_3, bg2_2, bg2_3, bg2_3],
]
ChalGap3 = [
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, g, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, g, b2, b2, g, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, g, j, b2, b2, b2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, b1, b2, b2, b2, b2, b2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, b1, b2, b2, b2, b2, b2, b2, b2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, b1, b2, b2, b2, b2, b2, b2, b2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, l3, g, b1, b2, b2, b2, b2, b2, g, l3, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, l3, g, b1, b1, b1, b1, b1, b1, g, l3, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, l3, l3, g, g, g, g, g, g, g, g, l3, l3, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, g, l3, l3, l3, g, i, i, i, i, i, i, g, l1, l3, g, g, g, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, g, g, c1, g, l3, l3, l1, g, i, i, i, i, i, i, g, l1, l3, g, c1, c1, c2, g, g, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, g, c1, c1, c1, c2, g, l1, l1, g, c1, g, i, i, i, i, g, g, l1, l3, l3, g, c2, c1, c1, c2, c1, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, g, c1, c2, c1, c2, c1, c2, g, g, g, c2, c1, c2, g, g, g, g, c1, c2, g, l1, g, c2, c1, c1, c2, c1, c1, c2, g, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, g, c1, c2, c1, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, c2, c1, c1, c2, c1, c1, c2, c1, c1, c2, g, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, g, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c1, g, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, g, c2, c1, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c1, c2, c1, c2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, g, c2, c1, c2, c1, c1, c2, c1, c2, c1, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c1, c2, c1, c1, c2, c1, c2, c1, g, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, g, c2, c1, c2, c1, c1, c2, c1, g, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, g, c2, c1, c1, c2, c1, c2, c1, g, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, g, c2, c1, c2, c1, c1, g, bg3_2, bg3_2, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, bg3_2, bg3_2, g, c1, c2, c1, c2, c1, g, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, g, c2, c1, c2, g, bg3_1, bg3_1, bg3_1, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, bg3_1, bg3_1, bg3_1, g, c1, c2, c1, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, g, c2, g, bg3_2, bg3_2, bg3_2, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, bg3_2, bg3_2, bg3_2, g, c1, g, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, bg3_1, bg3_1, bg3_1, g, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, g, bg3_1, bg3_1, bg3_1, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, g, g, g, g, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, g, g, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, g, d1, d2, d2, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, d1, d1, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, g, d1, d2, d2, d2, d2, d2, d2, g, g, d2, d2, g, g, g, d2, d2, d1, d1, d2, d2, g, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, g, d1, d1, d1, d2, d2, d2, g, g, g, g, g, g, d2, g, d2, d2, d2, d2, d2, d2, g, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_1, g, g, g, g, d1, d1, d1, g, d2, d2, g, g, d1, d2, g, g, d2, d2, g, g, g, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, g, c2, c1, c2, g, g, g, g, d2, d1, g, g, d1, d2, g, g, g, g, c1, c2, c1, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, c1, c2, c1, c2, c1, g, d2, d2, g, g, c1, g, d1, d2, g, c2, c1, c2, c1, c2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, c1, c2, c1, c2, c1, g, d2, d1, g, c2, c1, g, d1, d2, g, g, c1, c2, c1, c2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, c2, c1, c2, c1, c2, g, d2, g, c2, c1, c2, c1, g, d1, d2, g, c2, c1, c2, c1, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, c2, c1, c2, c1, c2, g, d1, g, c2, c1, c2, c1, g, d1, d2, g, c2, c1, c2, c1, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, c1, c2, c1, c2, c1, c2, g, c2, c1, c2, c1, c2, c1, g, d1, d2, g, c2, c1, c2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, d1, d2, g, c2, c1, c2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, d1, d2, g, c1, c2, c1, c2, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, d1, d2, g, c1, c2, c1, c2, g, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, g, g, c1, c2, c1, c2, c1, g, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, g, g, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, g, g, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, g, g, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, c2, c1, g, g, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
[bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, g, g, g, g, g, g, g, g, g, g, g, g, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_1],
[bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_2, bg3_1, bg3_2, bg3_1, bg3_2, bg3_2],
[bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_1, bg3_2, bg3_1, bg3_1, bg3_1],
]
y = randint(12501,13000)
seed(y)
if ma=="doojunggap":
z = randint(13001,13500)
seed(z)
zq = randint(0,300)
if zq < 100:
pixels = DooJungGap1
p = "doojunggap"
count_doojunggap += 1
elif 100 <= zq < 200:
pixels = DooJungGap2
p = "doojunggap"
count_doojunggap += 1
else:
pixels = DooJungGap3
p = "doojunggap"
count_doojunggap += 1
elif ma == "gyungbyungap":
aa = randint(12501,13000)
seed(aa)
zw = randint(0,300)
if zw < 100:
pixels = GyungByunGap1
p = "gyungbyungap"
count_gyungbyungap += 1
elif 100 <= zw < 200:
pixels = GyungByunGap2
p = "gyungbyungap"
count_gyungbyungap += 1
else:
pixels = GyungByunGap3
p = "gyungbyungap"
count_gyungbyungap += 1
elif ma == "chalgap":
ab = randint(13001,13500)
seed(ab)
ze = randint(0,300)
if ze < 100:
pixels = ChalGap1
p = "chalgap"
count_chalgap += 1
elif 100 <= ze < 200:
pixels = ChalGap2
p = "chalgap"
count_chalgap += 1
else:
pixels = ChalGap3
p = "chalgap"
count_chalgap += 1
array = np.array(pixels, dtype=np.uint8)
new_image = Image.fromarray(array)
new_image = new_image.resize(dimensions, resample=0)
if p == "doojunggap":
imgname = dirname + '/armors/' + p + '_' + str(count_doojunggap) + '.png'
elif p == "gyungbyungap":
imgname = dirname + '/armors/' + p + '_' + str(count_gyungbyungap) + '.png'
else:
imgname = dirname + '/armors/' + p + '_' + str(count_chalgap) + '.png'
new_image.save(imgname)
make_armors("doojunggap", 500, 54)
make_armors("gyungbyungap", 500, 41)
make_armors("chalgap", 34, 12113524)
| 163.175947
| 364
| 0.591611
| 37,180
| 146,532
| 1.977838
| 0.007477
| 0.188588
| 0.309372
| 0.302219
| 0.959435
| 0.957232
| 0.948637
| 0.946965
| 0.945224
| 0.940002
| 0
| 0.306069
| 0.236481
| 146,532
| 897
| 365
| 163.35786
| 0.351207
| 0.005296
| 0
| 0.220452
| 0
| 0
| 0.001423
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.001328
| false
| 0
| 0.007968
| 0
| 0.009296
| 0
| 0
| 0
| 1
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 12
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.