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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
47e7a396b8675df94553b436751f763b66277f0c | 11,988 | py | Python | tests/test_math_ops.py | Ben-Wu/ShrugProgrammingLanguage | 1aa95acfe02ebfac147bd23c4a028a4b7b78645c | [
"MIT"
] | 2 | 2018-09-25T06:57:55.000Z | 2019-06-07T19:07:46.000Z | tests/test_math_ops.py | Ben-Wu/ShrugProgrammingLanguage | 1aa95acfe02ebfac147bd23c4a028a4b7b78645c | [
"MIT"
] | 4 | 2018-09-21T22:03:55.000Z | 2019-06-07T19:07:05.000Z | tests/test_math_ops.py | Ben-Wu/ShrugProgrammingLanguage | 1aa95acfe02ebfac147bd23c4a028a4b7b78645c | [
"MIT"
] | null | null | null | import unittest
from .utils import BaseTokenParserTestCase, TokenGenerator
class TestMathOperations(BaseTokenParserTestCase):
"""Integration tests for parsing lines that involve math operations"""
"""ADDITION"""
def test_var_var_addition(self):
tokens = [TokenGenerator.get_id('aa'), TokenGenerator.get_number(5),
TokenGenerator.get_eol(),
TokenGenerator.get_id('bb'), TokenGenerator.get_number(6),
TokenGenerator.get_eol(),
TokenGenerator.get_shrug(), TokenGenerator.get_id('aa'),
TokenGenerator.get_id('bb'), TokenGenerator.get_eol()]
expected = [11]
self.assertEqual(expected, self.process_tokens(tokens))
def test_str_str_addition(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_string('ab'),
TokenGenerator.get_string('cd'), TokenGenerator.get_eol()]
expected = ['abcd']
self.assertEqual(expected, self.process_tokens(tokens))
def test_int_int_addition(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_number(12),
TokenGenerator.get_number(3), TokenGenerator.get_eol()]
expected = [15]
self.assertEqual(expected, self.process_tokens(tokens))
def test_str_int_addition(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_number(12),
TokenGenerator.get_string('abc'), TokenGenerator.get_eol()]
expected = ['12abc']
self.assertEqual(expected, self.process_tokens(tokens))
def test_int_str_addition(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_string('abc'),
TokenGenerator.get_number(34), TokenGenerator.get_eol()]
expected = ['abc34']
self.assertEqual(expected, self.process_tokens(tokens))
def test_assign_addition(self):
tokens = [TokenGenerator.get_id('a'),
TokenGenerator.get_shrug(), TokenGenerator.get_number(12),
TokenGenerator.get_number(3), TokenGenerator.get_eol(),
TokenGenerator.get_id('a'), TokenGenerator.get_eol()]
expected = [15]
self.assertEqual(expected, self.process_tokens(tokens))
def test_bool_bool_addition(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_bool(True),
TokenGenerator.get_bool(True), TokenGenerator.get_eol()]
expected = [2]
self.assertEqual(expected, self.process_tokens(tokens))
"""SUBTRACTION"""
def test_int_int_subtraction(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_number(12),
TokenGenerator.get_shrug(), TokenGenerator.get_number(3),
TokenGenerator.get_eol()]
expected = [9]
self.assertEqual(expected, self.process_tokens(tokens))
def test_str_str_subtraction(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_string('ab'),
TokenGenerator.get_shrug(), TokenGenerator.get_string('cd'),
TokenGenerator.get_eol()]
self.assertRaises(TypeError, self.process_tokens, tokens)
def test_str_int_subtraction(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_number(12),
TokenGenerator.get_shrug(), TokenGenerator.get_string('abc'),
TokenGenerator.get_eol()]
self.assertRaises(TypeError, self.process_tokens, tokens)
def test_int_str_subtraction(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_string('abc'),
TokenGenerator.get_shrug(), TokenGenerator.get_number(34),
TokenGenerator.get_eol()]
self.assertRaises(TypeError, self.process_tokens, tokens)
def test_assign_subtraction(self):
tokens = [TokenGenerator.get_id('a'), TokenGenerator.get_shrug(),
TokenGenerator.get_number(12), TokenGenerator.get_shrug(),
TokenGenerator.get_number(3), TokenGenerator.get_eol(),
TokenGenerator.get_id('a'), TokenGenerator.get_eol()]
expected = [9]
self.assertEqual(expected, self.process_tokens(tokens))
def test_bool_bool_subtraction(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_bool(False),
TokenGenerator.get_shrug(), TokenGenerator.get_bool(True),
TokenGenerator.get_eol()]
expected = [-1]
self.assertEqual(expected, self.process_tokens(tokens))
"""MULTIPLICATION"""
def test_int_int_multiplication(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_number(13),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_number(4), TokenGenerator.get_eol()]
expected = [52]
self.assertEqual(expected, self.process_tokens(tokens))
def test_str_str_multiplication(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_string('ab'),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_string('cd'), TokenGenerator.get_eol()]
self.assertRaises(TypeError, self.process_tokens, tokens)
def test_str_int_multiplication(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_number(3),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_string('abc'), TokenGenerator.get_eol()]
expected = ['abcabcabc']
self.assertEqual(expected, self.process_tokens(tokens))
def test_int_str_multiplication(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_string('abc'),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_number(2), TokenGenerator.get_eol()]
expected = ['abcabc']
self.assertEqual(expected, self.process_tokens(tokens))
def test_assign_multiplication(self):
tokens = [TokenGenerator.get_id('a'), TokenGenerator.get_shrug(),
TokenGenerator.get_number(12), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_number(3),
TokenGenerator.get_eol(), TokenGenerator.get_id('a'),
TokenGenerator.get_eol()]
expected = [36]
self.assertEqual(expected, self.process_tokens(tokens))
def test_bool_bool_multiplication(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_bool(False),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_bool(True), TokenGenerator.get_eol()]
expected = [0]
self.assertEqual(expected, self.process_tokens(tokens))
"""DIVISION"""
def test_int_int_division(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_number(12),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_number(4),
TokenGenerator.get_eol()]
expected = [3]
self.assertEqual(expected, self.process_tokens(tokens))
def test_str_str_division(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_string('ab'),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_string('cd'),
TokenGenerator.get_eol()]
self.assertRaises(TypeError, self.process_tokens, tokens)
def test_str_int_division(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_number(3),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_string('abc'),
TokenGenerator.get_eol()]
self.assertRaises(TypeError, self.process_tokens, tokens)
def test_int_str_division(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_string('abc'),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_number(2),
TokenGenerator.get_eol()]
self.assertRaises(TypeError, self.process_tokens, tokens)
def test_assign_division(self):
tokens = [TokenGenerator.get_id('a'), TokenGenerator.get_shrug(),
TokenGenerator.get_number(14), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_number(3), TokenGenerator.get_eol(),
TokenGenerator.get_id('a'), TokenGenerator.get_eol()]
expected = [4]
self.assertEqual(expected, self.process_tokens(tokens))
def test_bool_bool_division(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_bool(True),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_bool(True),
TokenGenerator.get_eol()]
expected = [1]
self.assertEqual(expected, self.process_tokens(tokens))
"""MODULUS"""
def test_int_int_modulus(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_number(12),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_number(5), TokenGenerator.get_eol()]
expected = [2]
self.assertEqual(expected, self.process_tokens(tokens))
def test_str_str_modulus(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_string('ab'),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_string('cd'), TokenGenerator.get_eol()]
self.assertRaises(TypeError, self.process_tokens, tokens)
def test_str_int_modulus(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_number(3),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_string('abc'), TokenGenerator.get_eol()]
self.assertRaises(TypeError, self.process_tokens, tokens)
def test_int_str_modulus(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_string('abc'),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_number(2), TokenGenerator.get_eol()]
self.assertRaises(TypeError, self.process_tokens, tokens)
def test_assign_modulus(self):
tokens = [TokenGenerator.get_id('a'), TokenGenerator.get_shrug(),
TokenGenerator.get_number(10), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_number(3),
TokenGenerator.get_eol(), TokenGenerator.get_id('a'),
TokenGenerator.get_eol()]
expected = [1]
self.assertEqual(expected, self.process_tokens(tokens))
def test_bool_bool_modulus(self):
tokens = [TokenGenerator.get_shrug(), TokenGenerator.get_bool(True),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_shrug(), TokenGenerator.get_shrug(),
TokenGenerator.get_bool(True), TokenGenerator.get_eol()]
expected = [0]
self.assertEqual(expected, self.process_tokens(tokens))
if __name__ == '__main__':
unittest.main()
| 48.534413 | 79 | 0.654238 | 1,191 | 11,988 | 6.306465 | 0.062972 | 0.463986 | 0.266542 | 0.43616 | 0.94994 | 0.939023 | 0.919851 | 0.905339 | 0.891892 | 0.891892 | 0 | 0.007704 | 0.231231 | 11,988 | 246 | 80 | 48.731707 | 0.807292 | 0.005339 | 0 | 0.681818 | 0 | 0 | 0.008869 | 0 | 0 | 0 | 0 | 0 | 0.156566 | 1 | 0.156566 | false | 0 | 0.010101 | 0 | 0.171717 | 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 |
47e8d46f446888161e60f2b4c5a852e0ac3c8cb8 | 129,930 | py | Python | tests/testflows/aes_encryption/requirements/requirements.py | TisonKun/ClickHouse | 4e11e7cfa9f26a6f2c60bf540b6bc98ac0549e65 | [
"Apache-2.0"
] | 2 | 2021-01-12T07:23:39.000Z | 2021-01-12T07:23:46.000Z | tests/testflows/aes_encryption/requirements/requirements.py | TisonKun/ClickHouse | 4e11e7cfa9f26a6f2c60bf540b6bc98ac0549e65 | [
"Apache-2.0"
] | null | null | null | tests/testflows/aes_encryption/requirements/requirements.py | TisonKun/ClickHouse | 4e11e7cfa9f26a6f2c60bf540b6bc98ac0549e65 | [
"Apache-2.0"
] | 1 | 2021-07-30T19:50:45.000Z | 2021-07-30T19:50:45.000Z | # These requirements were auto generated
# from software requirements specification (SRS)
# document by TestFlows v1.6.201216.1172002.
# Do not edit by hand but re-generate instead
# using 'tfs requirements generate' command.
from testflows.core import Specification
from testflows.core import Requirement
Heading = Specification.Heading
RQ_SRS008_AES_Functions = Requirement(
name='RQ.SRS008.AES.Functions',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support [AES] encryption functions to encrypt and decrypt data.\n'
'\n'
),
link=None,
level=3,
num='4.1.1')
RQ_SRS008_AES_Functions_Compatability_MySQL = Requirement(
name='RQ.SRS008.AES.Functions.Compatability.MySQL',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support [AES] encryption functions compatible with [MySQL 5.7].\n'
'\n'
),
link=None,
level=3,
num='4.1.2')
RQ_SRS008_AES_Functions_Compatability_Dictionaries = Requirement(
name='RQ.SRS008.AES.Functions.Compatability.Dictionaries',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support encryption and decryption of data accessed on remote\n'
'[MySQL] servers using [MySQL Dictionary].\n'
'\n'
),
link=None,
level=3,
num='4.1.3')
RQ_SRS008_AES_Functions_Compatability_Engine_Database_MySQL = Requirement(
name='RQ.SRS008.AES.Functions.Compatability.Engine.Database.MySQL',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support encryption and decryption of data accessed using [MySQL Database Engine],\n'
'\n'
),
link=None,
level=3,
num='4.1.4')
RQ_SRS008_AES_Functions_Compatability_Engine_Table_MySQL = Requirement(
name='RQ.SRS008.AES.Functions.Compatability.Engine.Table.MySQL',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support encryption and decryption of data accessed using [MySQL Table Engine].\n'
'\n'
),
link=None,
level=3,
num='4.1.5')
RQ_SRS008_AES_Functions_Compatability_TableFunction_MySQL = Requirement(
name='RQ.SRS008.AES.Functions.Compatability.TableFunction.MySQL',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support encryption and decryption of data accessed using [MySQL Table Function].\n'
'\n'
),
link=None,
level=3,
num='4.1.6')
RQ_SRS008_AES_Functions_DifferentModes = Requirement(
name='RQ.SRS008.AES.Functions.DifferentModes',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL allow different modes to be supported in a single SQL statement\n'
'using explicit function parameters.\n'
'\n'
),
link=None,
level=3,
num='4.1.7')
RQ_SRS008_AES_Functions_DataFromMultipleSources = Requirement(
name='RQ.SRS008.AES.Functions.DataFromMultipleSources',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support handling encryption and decryption of data from multiple sources\n'
'in the `SELECT` statement, including [ClickHouse] [MergeTree] table as well as [MySQL Dictionary],\n'
'[MySQL Database Engine], [MySQL Table Engine], and [MySQL Table Function]\n'
'with possibly different encryption schemes.\n'
'\n'
),
link=None,
level=3,
num='4.1.8')
RQ_SRS008_AES_Functions_SuppressOutputOfSensitiveValues = Requirement(
name='RQ.SRS008.AES.Functions.SuppressOutputOfSensitiveValues',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL suppress output of [AES] `string` and `key` parameters to the system log,\n'
'error log, and `query_log` table to prevent leakage of sensitive values.\n'
'\n'
),
link=None,
level=3,
num='4.1.9')
RQ_SRS008_AES_Functions_InvalidParameters = Requirement(
name='RQ.SRS008.AES.Functions.InvalidParameters',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error when parameters are invalid.\n'
'\n'
),
link=None,
level=3,
num='4.1.10')
RQ_SRS008_AES_Functions_Mismatched_Key = Requirement(
name='RQ.SRS008.AES.Functions.Mismatched.Key',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return garbage for mismatched keys.\n'
'\n'
),
link=None,
level=3,
num='4.1.11')
RQ_SRS008_AES_Functions_Mismatched_IV = Requirement(
name='RQ.SRS008.AES.Functions.Mismatched.IV',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return garbage for mismatched initialization vector for the modes that use it.\n'
'\n'
),
link=None,
level=3,
num='4.1.12')
RQ_SRS008_AES_Functions_Mismatched_AAD = Requirement(
name='RQ.SRS008.AES.Functions.Mismatched.AAD',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return garbage for mismatched additional authentication data for the modes that use it.\n'
'\n'
),
link=None,
level=3,
num='4.1.13')
RQ_SRS008_AES_Functions_Mismatched_Mode = Requirement(
name='RQ.SRS008.AES.Functions.Mismatched.Mode',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error or garbage for mismatched mode.\n'
'\n'
),
link=None,
level=3,
num='4.1.14')
RQ_SRS008_AES_Functions_Check_Performance = Requirement(
name='RQ.SRS008.AES.Functions.Check.Performance',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'Performance of [AES] encryption functions SHALL be measured.\n'
'\n'
),
link=None,
level=3,
num='4.1.15')
RQ_SRS008_AES_Function_Check_Performance_BestCase = Requirement(
name='RQ.SRS008.AES.Function.Check.Performance.BestCase',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'Performance of [AES] encryption functions SHALL be checked for the best case\n'
'scenario where there is one key, one initialization vector, and one large stream of data.\n'
'\n'
),
link=None,
level=3,
num='4.1.16')
RQ_SRS008_AES_Function_Check_Performance_WorstCase = Requirement(
name='RQ.SRS008.AES.Function.Check.Performance.WorstCase',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'Performance of [AES] encryption functions SHALL be checked for the worst case\n'
'where there are `N` keys, `N` initialization vectors and `N` very small streams of data.\n'
'\n'
),
link=None,
level=3,
num='4.1.17')
RQ_SRS008_AES_Functions_Check_Compression = Requirement(
name='RQ.SRS008.AES.Functions.Check.Compression',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'Effect of [AES] encryption on column compression SHALL be measured.\n'
'\n'
),
link=None,
level=3,
num='4.1.18')
RQ_SRS008_AES_Functions_Check_Compression_LowCardinality = Requirement(
name='RQ.SRS008.AES.Functions.Check.Compression.LowCardinality',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'Effect of [AES] encryption on the compression of a column with [LowCardinality] data type\n'
'SHALL be measured.\n'
'\n'
),
link=None,
level=3,
num='4.1.19')
RQ_SRS008_AES_Encrypt_Function = Requirement(
name='RQ.SRS008.AES.Encrypt.Function',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `encrypt` function to encrypt data using [AES].\n'
'\n'
),
link=None,
level=3,
num='4.2.1')
RQ_SRS008_AES_Encrypt_Function_Syntax = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.Syntax',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support the following syntax for the `encrypt` function\n'
'\n'
'```sql\n'
'encrypt(mode, plaintext, key, [iv, aad])\n'
'```\n'
'\n'
),
link=None,
level=3,
num='4.2.2')
RQ_SRS008_AES_Encrypt_Function_NIST_TestVectors = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.NIST.TestVectors',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] `encrypt` function output SHALL produce output that matches [NIST test vectors].\n'
'\n'
),
link=None,
level=3,
num='4.2.3')
RQ_SRS008_AES_Encrypt_Function_Parameters_PlainText = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.Parameters.PlainText',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `plaintext` accepting any data type as\n'
'the first parameter to the `encrypt` function that SHALL specify the data to be encrypted.\n'
'\n'
),
link=None,
level=3,
num='4.2.4')
RQ_SRS008_AES_Encrypt_Function_Parameters_Key = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.Parameters.Key',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `key` with `String` or `FixedString` data types\n'
'as the second parameter to the `encrypt` function that SHALL specify the encryption key.\n'
'\n'
),
link=None,
level=3,
num='4.2.5')
RQ_SRS008_AES_Encrypt_Function_Parameters_Mode = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.Parameters.Mode',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `mode` with `String` or `FixedString` data types as the third parameter\n'
'to the `encrypt` function that SHALL specify encryption key length and block encryption mode.\n'
'\n'
),
link=None,
level=3,
num='4.2.6')
RQ_SRS008_AES_Encrypt_Function_Parameters_Mode_ValuesFormat = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.ValuesFormat',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support values of the form `aes-[key length]-[mode]` for the `mode` parameter\n'
'of the `encrypt` function where\n'
'the `key_length` SHALL specifies the length of the key and SHALL accept\n'
'`128`, `192`, or `256` as the values and the `mode` SHALL specify the block encryption\n'
'mode and SHALL accept [ECB], [CBC], [CFB128], or [OFB] as well as\n'
'[CTR] and [GCM] as the values. For example, `aes-256-ofb`.\n'
'\n'
),
link=None,
level=3,
num='4.2.7')
RQ_SRS008_AES_Encrypt_Function_Parameters_Mode_Value_Invalid = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.Invalid',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the specified value for the `mode` parameter of the `encrypt`\n'
'function is not valid with the exception where such a mode is supported by the underlying\n'
'[OpenSSL] implementation.\n'
'\n'
),
link=None,
level=3,
num='4.2.8')
RQ_SRS008_AES_Encrypt_Function_Parameters_Mode_Values = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Values',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support the following [AES] block encryption modes as the value for the `mode` parameter\n'
'of the `encrypt` function:\n'
'\n'
'* `aes-128-ecb` that SHALL use [ECB] block mode encryption with 128 bit key\n'
'* `aes-192-ecb` that SHALL use [ECB] block mode encryption with 192 bit key\n'
'* `aes-256-ecb` that SHALL use [ECB] block mode encryption with 256 bit key\n'
'* `aes-128-cbc` that SHALL use [CBC] block mode encryption with 128 bit key\n'
'* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 192 bit key\n'
'* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 256 bit key\n'
'* `aes-128-cfb128` that SHALL use [CFB128] block mode encryption with 128 bit key\n'
'* `aes-192-cfb128` that SHALL use [CFB128] block mode encryption with 192 bit key\n'
'* `aes-256-cfb128` that SHALL use [CFB128] block mode encryption with 256 bit key\n'
'* `aes-128-ofb` that SHALL use [OFB] block mode encryption with 128 bit key\n'
'* `aes-192-ofb` that SHALL use [OFB] block mode encryption with 192 bit key\n'
'* `aes-256-ofb` that SHALL use [OFB] block mode encryption with 256 bit key\n'
'* `aes-128-gcm` that SHALL use [GCM] block mode encryption with 128 bit key\n'
' and `AEAD` 16-byte tag is appended to the resulting ciphertext according to\n'
' the [RFC5116]\n'
'* `aes-192-gcm` that SHALL use [GCM] block mode encryption with 192 bit key\n'
' and `AEAD` 16-byte tag is appended to the resulting ciphertext according to\n'
' the [RFC5116]\n'
'* `aes-256-gcm` that SHALL use [GCM] block mode encryption with 256 bit key\n'
' and `AEAD` 16-byte tag is appended to the resulting ciphertext according to\n'
' the [RFC5116]\n'
'* `aes-128-ctr` that SHALL use [CTR] block mode encryption with 128 bit key\n'
'* `aes-192-ctr` that SHALL use [CTR] block mode encryption with 192 bit key\n'
'* `aes-256-ctr` that SHALL use [CTR] block mode encryption with 256 bit key\n'
'\n'
),
link=None,
level=3,
num='4.2.9')
RQ_SRS008_AES_Encrypt_Function_Parameters_InitializationVector = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.Parameters.InitializationVector',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `iv` with `String` or `FixedString` data types as the optional fourth\n'
'parameter to the `encrypt` function that SHALL specify the initialization vector for block modes that require\n'
'it.\n'
'\n'
),
link=None,
level=3,
num='4.2.10')
RQ_SRS008_AES_Encrypt_Function_Parameters_AdditionalAuthenticatedData = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.Parameters.AdditionalAuthenticatedData',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `aad` with `String` or `FixedString` data types as the optional fifth\n'
'parameter to the `encrypt` function that SHALL specify the additional authenticated data\n'
'for block modes that require it.\n'
'\n'
),
link=None,
level=3,
num='4.2.11')
RQ_SRS008_AES_Encrypt_Function_Parameters_ReturnValue = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.Parameters.ReturnValue',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return the encrypted value of the data\n'
'using `String` data type as the result of `encrypt` function.\n'
'\n'
),
link=None,
level=3,
num='4.2.12')
RQ_SRS008_AES_Encrypt_Function_Key_Length_InvalidLengthError = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.Key.Length.InvalidLengthError',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `key` length is not exact for the `encrypt` function for a given block mode.\n'
'\n'
),
link=None,
level=3,
num='4.2.13')
RQ_SRS008_AES_Encrypt_Function_InitializationVector_Length_InvalidLengthError = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.InitializationVector.Length.InvalidLengthError',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `iv` length is specified and not of the exact size for the `encrypt` function for a given block mode.\n'
'\n'
),
link=None,
level=3,
num='4.2.14')
RQ_SRS008_AES_Encrypt_Function_InitializationVector_NotValidForMode = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.InitializationVector.NotValidForMode',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `iv` is specified for the `encrypt` function for a mode that does not need it.\n'
'\n'
),
link=None,
level=3,
num='4.2.15')
RQ_SRS008_AES_Encrypt_Function_AdditionalAuthenticationData_NotValidForMode = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.AdditionalAuthenticationData.NotValidForMode',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `aad` is specified for the `encrypt` function for a mode that does not need it.\n'
'\n'
),
link=None,
level=3,
num='4.2.16')
RQ_SRS008_AES_Encrypt_Function_AdditionalAuthenticationData_Length = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.AdditionalAuthenticationData.Length',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL not limit the size of the `aad` parameter passed to the `encrypt` function.\n'
'\n'
),
link=None,
level=3,
num='4.2.17')
RQ_SRS008_AES_Encrypt_Function_NonGCMMode_KeyAndInitializationVector_Length = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.NonGCMMode.KeyAndInitializationVector.Length',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error when the `encrypt` function is called with the following parameter values\n'
'when using non-GCM modes\n'
'\n'
'* `aes-128-ecb` mode and `key` is not 16 bytes or `iv` or `aad` is specified\n'
'* `aes-192-ecb` mode and `key` is not 24 bytes or `iv` or `aad` is specified\n'
'* `aes-256-ecb` mode and `key` is not 32 bytes or `iv` or `aad` is specified\n'
'* `aes-128-cbc` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-192-cbc` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-256-cbc` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-128-cfb1` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-192-cfb1` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-256-cfb1` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-128-cfb8` mode and `key` is not 16 bytes and if specified `iv` is not 16 bytes\n'
'* `aes-192-cfb8` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-256-cfb8` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-128-cfb128` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-192-cfb128` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-256-cfb128` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-128-ofb` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-192-ofb` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-256-ofb` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-128-ctr` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes\n'
'* `aes-192-ctr` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes\n'
'* `aes-256-ctr` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes\n'
'\n'
),
link=None,
level=3,
num='4.2.18')
RQ_SRS008_AES_Encrypt_Function_GCMMode_KeyAndInitializationVector_Length = Requirement(
name='RQ.SRS008.AES.Encrypt.Function.GCMMode.KeyAndInitializationVector.Length',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error when the `encrypt` function is called with the following parameter values\n'
'when using GCM modes\n'
'\n'
'* `aes-128-gcm` mode and `key` is not 16 bytes or `iv` is not specified\n'
'* `aes-192-gcm` mode and `key` is not 24 bytes or `iv` is not specified\n'
'* `aes-256-gcm` mode and `key` is not 32 bytes or `iv` is not specified\n'
'\n'
),
link=None,
level=3,
num='4.2.19')
RQ_SRS008_AES_Decrypt_Function = Requirement(
name='RQ.SRS008.AES.Decrypt.Function',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `decrypt` function to decrypt data using [AES].\n'
'\n'
),
link=None,
level=3,
num='4.2.20')
RQ_SRS008_AES_Decrypt_Function_Syntax = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.Syntax',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support the following syntax for the `decrypt` function\n'
'\n'
'```sql\n'
'decrypt(mode, ciphertext, key, [iv, aad])\n'
'```\n'
'\n'
),
link=None,
level=3,
num='4.2.21')
RQ_SRS008_AES_Decrypt_Function_Parameters_CipherText = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.Parameters.CipherText',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `ciphertext` accepting `FixedString` or `String` data types as\n'
'the first parameter to the `decrypt` function that SHALL specify the data to be decrypted.\n'
'\n'
),
link=None,
level=3,
num='4.2.22')
RQ_SRS008_AES_Decrypt_Function_Parameters_Key = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.Parameters.Key',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `key` with `String` or `FixedString` data types\n'
'as the second parameter to the `decrypt` function that SHALL specify the encryption key.\n'
'\n'
),
link=None,
level=3,
num='4.2.23')
RQ_SRS008_AES_Decrypt_Function_Parameters_Mode = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.Parameters.Mode',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `mode` with `String` or `FixedString` data types as the third parameter\n'
'to the `decrypt` function that SHALL specify encryption key length and block encryption mode.\n'
'\n'
),
link=None,
level=3,
num='4.2.24')
RQ_SRS008_AES_Decrypt_Function_Parameters_Mode_ValuesFormat = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.ValuesFormat',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support values of the form `aes-[key length]-[mode]` for the `mode` parameter\n'
'of the `decrypt` function where\n'
'the `key_length` SHALL specifies the length of the key and SHALL accept\n'
'`128`, `192`, or `256` as the values and the `mode` SHALL specify the block encryption\n'
'mode and SHALL accept [ECB], [CBC], [CFB128], or [OFB] as well as\n'
'[CTR] and [GCM] as the values. For example, `aes-256-ofb`.\n'
'\n'
),
link=None,
level=3,
num='4.2.25')
RQ_SRS008_AES_Decrypt_Function_Parameters_Mode_Value_Invalid = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.Invalid',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the specified value for the `mode` parameter of the `decrypt`\n'
'function is not valid with the exception where such a mode is supported by the underlying\n'
'[OpenSSL] implementation.\n'
'\n'
),
link=None,
level=3,
num='4.2.26')
RQ_SRS008_AES_Decrypt_Function_Parameters_Mode_Values = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Values',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support the following [AES] block encryption modes as the value for the `mode` parameter\n'
'of the `decrypt` function:\n'
'\n'
'* `aes-128-ecb` that SHALL use [ECB] block mode encryption with 128 bit key\n'
'* `aes-192-ecb` that SHALL use [ECB] block mode encryption with 192 bit key\n'
'* `aes-256-ecb` that SHALL use [ECB] block mode encryption with 256 bit key\n'
'* `aes-128-cbc` that SHALL use [CBC] block mode encryption with 128 bit key\n'
'* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 192 bit key\n'
'* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 256 bit key\n'
'* `aes-128-cfb128` that SHALL use [CFB128] block mode encryption with 128 bit key\n'
'* `aes-192-cfb128` that SHALL use [CFB128] block mode encryption with 192 bit key\n'
'* `aes-256-cfb128` that SHALL use [CFB128] block mode encryption with 256 bit key\n'
'* `aes-128-ofb` that SHALL use [OFB] block mode encryption with 128 bit key\n'
'* `aes-192-ofb` that SHALL use [OFB] block mode encryption with 192 bit key\n'
'* `aes-256-ofb` that SHALL use [OFB] block mode encryption with 256 bit key\n'
'* `aes-128-gcm` that SHALL use [GCM] block mode encryption with 128 bit key\n'
' and [AEAD] 16-byte tag is expected present at the end of the ciphertext according to\n'
' the [RFC5116]\n'
'* `aes-192-gcm` that SHALL use [GCM] block mode encryption with 192 bit key\n'
' and [AEAD] 16-byte tag is expected present at the end of the ciphertext according to\n'
' the [RFC5116]\n'
'* `aes-256-gcm` that SHALL use [GCM] block mode encryption with 256 bit key\n'
' and [AEAD] 16-byte tag is expected present at the end of the ciphertext according to\n'
' the [RFC5116]\n'
'* `aes-128-ctr` that SHALL use [CTR] block mode encryption with 128 bit key\n'
'* `aes-192-ctr` that SHALL use [CTR] block mode encryption with 192 bit key\n'
'* `aes-256-ctr` that SHALL use [CTR] block mode encryption with 256 bit key\n'
'\n'
),
link=None,
level=3,
num='4.2.27')
RQ_SRS008_AES_Decrypt_Function_Parameters_InitializationVector = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.Parameters.InitializationVector',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `iv` with `String` or `FixedString` data types as the optional fourth\n'
'parameter to the `decrypt` function that SHALL specify the initialization vector for block modes that require\n'
'it.\n'
'\n'
),
link=None,
level=3,
num='4.2.28')
RQ_SRS008_AES_Decrypt_Function_Parameters_AdditionalAuthenticatedData = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.Parameters.AdditionalAuthenticatedData',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `aad` with `String` or `FixedString` data types as the optional fifth\n'
'parameter to the `decrypt` function that SHALL specify the additional authenticated data\n'
'for block modes that require it.\n'
'\n'
),
link=None,
level=3,
num='4.2.29')
RQ_SRS008_AES_Decrypt_Function_Parameters_ReturnValue = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.Parameters.ReturnValue',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return the decrypted value of the data\n'
'using `String` data type as the result of `decrypt` function.\n'
'\n'
),
link=None,
level=3,
num='4.2.30')
RQ_SRS008_AES_Decrypt_Function_Key_Length_InvalidLengthError = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.Key.Length.InvalidLengthError',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `key` length is not exact for the `decrypt` function for a given block mode.\n'
'\n'
),
link=None,
level=3,
num='4.2.31')
RQ_SRS008_AES_Decrypt_Function_InitializationVector_Length_InvalidLengthError = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.InitializationVector.Length.InvalidLengthError',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `iv` is speficified and the length is not exact for the `decrypt` function for a given block mode.\n'
'\n'
),
link=None,
level=3,
num='4.2.32')
RQ_SRS008_AES_Decrypt_Function_InitializationVector_NotValidForMode = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.InitializationVector.NotValidForMode',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `iv` is specified for the `decrypt` function\n'
'for a mode that does not need it.\n'
'\n'
),
link=None,
level=3,
num='4.2.33')
RQ_SRS008_AES_Decrypt_Function_AdditionalAuthenticationData_NotValidForMode = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.AdditionalAuthenticationData.NotValidForMode',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `aad` is specified for the `decrypt` function\n'
'for a mode that does not need it.\n'
'\n'
),
link=None,
level=3,
num='4.2.34')
RQ_SRS008_AES_Decrypt_Function_AdditionalAuthenticationData_Length = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.AdditionalAuthenticationData.Length',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL not limit the size of the `aad` parameter passed to the `decrypt` function.\n'
'\n'
),
link=None,
level=3,
num='4.2.35')
RQ_SRS008_AES_Decrypt_Function_NonGCMMode_KeyAndInitializationVector_Length = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.NonGCMMode.KeyAndInitializationVector.Length',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error when the `decrypt` function is called with the following parameter values\n'
'when using non-GCM modes\n'
'\n'
'* `aes-128-ecb` mode and `key` is not 16 bytes or `iv` or `aad` is specified\n'
'* `aes-192-ecb` mode and `key` is not 24 bytes or `iv` or `aad` is specified\n'
'* `aes-256-ecb` mode and `key` is not 32 bytes or `iv` or `aad` is specified\n'
'* `aes-128-cbc` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-192-cbc` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-256-cbc` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-128-cfb1` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-192-cfb1` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-256-cfb1` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-128-cfb8` mode and `key` is not 16 bytes and if specified `iv` is not 16 bytes\n'
'* `aes-192-cfb8` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-256-cfb8` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-128-cfb128` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-192-cfb128` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-256-cfb128` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-128-ofb` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-192-ofb` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-256-ofb` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified\n'
'* `aes-128-ctr` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes\n'
'* `aes-192-ctr` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes\n'
'* `aes-256-ctr` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes\n'
'\n'
),
link=None,
level=3,
num='4.2.36')
RQ_SRS008_AES_Decrypt_Function_GCMMode_KeyAndInitializationVector_Length = Requirement(
name='RQ.SRS008.AES.Decrypt.Function.GCMMode.KeyAndInitializationVector.Length',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error when the `decrypt` function is called with the following parameter values\n'
'when using GCM modes\n'
'\n'
'* `aes-128-gcm` mode and `key` is not 16 bytes or `iv` is not specified\n'
'* `aes-192-gcm` mode and `key` is not 24 bytes or `iv` is not specified\n'
'* `aes-256-gcm` mode and `key` is not 32 bytes or `iv` is not specified\n'
'\n'
),
link=None,
level=3,
num='4.2.37')
RQ_SRS008_AES_MySQL_Encrypt_Function = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `aes_encrypt_mysql` function to encrypt data using [AES].\n'
'\n'
),
link=None,
level=3,
num='4.3.1')
RQ_SRS008_AES_MySQL_Encrypt_Function_Syntax = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Syntax',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support the following syntax for the `aes_encrypt_mysql` function\n'
'\n'
'```sql\n'
'aes_encrypt_mysql(mode, plaintext, key, [iv])\n'
'```\n'
'\n'
),
link=None,
level=3,
num='4.3.2')
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_PlainText = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.PlainText',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `plaintext` accepting any data type as\n'
'the first parameter to the `aes_encrypt_mysql` function that SHALL specify the data to be encrypted.\n'
'\n'
),
link=None,
level=3,
num='4.3.3')
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Key = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Key',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `key` with `String` or `FixedString` data types\n'
'as the second parameter to the `aes_encrypt_mysql` function that SHALL specify the encryption key.\n'
'\n'
),
link=None,
level=3,
num='4.3.4')
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Mode = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `mode` with `String` or `FixedString` data types as the third parameter\n'
'to the `aes_encrypt_mysql` function that SHALL specify encryption key length and block encryption mode.\n'
'\n'
),
link=None,
level=3,
num='4.3.5')
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Mode_ValuesFormat = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.ValuesFormat',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support values of the form `aes-[key length]-[mode]` for the `mode` parameter\n'
'of the `aes_encrypt_mysql` function where\n'
'the `key_length` SHALL specifies the length of the key and SHALL accept\n'
'`128`, `192`, or `256` as the values and the `mode` SHALL specify the block encryption\n'
'mode and SHALL accept [ECB], [CBC], [CFB128], or [OFB]. For example, `aes-256-ofb`.\n'
'\n'
),
link=None,
level=3,
num='4.3.6')
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Mode_Value_Invalid = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.Invalid',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the specified value for the `mode` parameter of the `aes_encrypt_mysql`\n'
'function is not valid with the exception where such a mode is supported by the underlying\n'
'[OpenSSL] implementation.\n'
'\n'
),
link=None,
level=3,
num='4.3.7')
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Mode_Values = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Values',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support the following [AES] block encryption modes as the value for the `mode` parameter\n'
'of the `aes_encrypt_mysql` function:\n'
'\n'
'* `aes-128-ecb` that SHALL use [ECB] block mode encryption with 128 bit key\n'
'* `aes-192-ecb` that SHALL use [ECB] block mode encryption with 192 bit key\n'
'* `aes-256-ecb` that SHALL use [ECB] block mode encryption with 256 bit key\n'
'* `aes-128-cbc` that SHALL use [CBC] block mode encryption with 128 bit key\n'
'* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 192 bit key\n'
'* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 256 bit key\n'
'* `aes-128-cfb128` that SHALL use [CFB128] block mode encryption with 128 bit key\n'
'* `aes-192-cfb128` that SHALL use [CFB128] block mode encryption with 192 bit key\n'
'* `aes-256-cfb128` that SHALL use [CFB128] block mode encryption with 256 bit key\n'
'* `aes-128-ofb` that SHALL use [OFB] block mode encryption with 128 bit key\n'
'* `aes-192-ofb` that SHALL use [OFB] block mode encryption with 192 bit key\n'
'* `aes-256-ofb` that SHALL use [OFB] block mode encryption with 256 bit key\n'
'\n'
),
link=None,
level=3,
num='4.3.8')
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Mode_Values_GCM_Error = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Values.GCM.Error',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if any of the following [GCM] modes are specified as the value \n'
'for the `mode` parameter of the `aes_encrypt_mysql` function\n'
'\n'
'* `aes-128-gcm`\n'
'* `aes-192-gcm`\n'
'* `aes-256-gcm`\n'
'\n'
),
link=None,
level=3,
num='4.3.9')
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Mode_Values_CTR_Error = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Values.CTR.Error',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if any of the following [CTR] modes are specified as the value \n'
'for the `mode` parameter of the `aes_encrypt_mysql` function\n'
'\n'
'* `aes-128-ctr`\n'
'* `aes-192-ctr`\n'
'* `aes-256-ctr`\n'
'\n'
),
link=None,
level=3,
num='4.3.10')
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_InitializationVector = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.InitializationVector',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `iv` with `String` or `FixedString` data types as the optional fourth\n'
'parameter to the `aes_encrypt_mysql` function that SHALL specify the initialization vector for block modes that require\n'
'it.\n'
'\n'
),
link=None,
level=3,
num='4.3.11')
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_ReturnValue = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.ReturnValue',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return the encrypted value of the data\n'
'using `String` data type as the result of `aes_encrypt_mysql` function.\n'
'\n'
),
link=None,
level=3,
num='4.3.12')
RQ_SRS008_AES_MySQL_Encrypt_Function_Key_Length_TooShortError = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Key.Length.TooShortError',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `key` length is less than the minimum for the `aes_encrypt_mysql`\n'
'function for a given block mode.\n'
'\n'
),
link=None,
level=3,
num='4.3.13')
RQ_SRS008_AES_MySQL_Encrypt_Function_Key_Length_TooLong = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Key.Length.TooLong',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL use folding algorithm specified below if the `key` length is longer than required\n'
'for the `aes_encrypt_mysql` function for a given block mode.\n'
'\n'
'```python\n'
'def fold_key(key, cipher_key_size):\n'
' key = list(key) if not isinstance(key, (list, tuple)) else key\n'
'\t folded_key = key[:cipher_key_size]\n'
'\t for i in range(cipher_key_size, len(key)):\n'
'\t\t print(i % cipher_key_size, i)\n'
'\t\t folded_key[i % cipher_key_size] ^= key[i]\n'
'\t return folded_key\n'
'```\n'
'\n'
),
link=None,
level=3,
num='4.3.14')
RQ_SRS008_AES_MySQL_Encrypt_Function_InitializationVector_Length_TooShortError = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.Length.TooShortError',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `iv` length is specified and is less than the minimum\n'
'that is required for the `aes_encrypt_mysql` function for a given block mode.\n'
'\n'
),
link=None,
level=3,
num='4.3.15')
RQ_SRS008_AES_MySQL_Encrypt_Function_InitializationVector_Length_TooLong = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.Length.TooLong',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL use the first `N` bytes that are required if the `iv` is specified and\n'
'its length is longer than required for the `aes_encrypt_mysql` function for a given block mode.\n'
'\n'
),
link=None,
level=3,
num='4.3.16')
RQ_SRS008_AES_MySQL_Encrypt_Function_InitializationVector_NotValidForMode = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.NotValidForMode',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `iv` is specified for the `aes_encrypt_mysql`\n'
'function for a mode that does not need it.\n'
'\n'
),
link=None,
level=3,
num='4.3.17')
RQ_SRS008_AES_MySQL_Encrypt_Function_Mode_KeyAndInitializationVector_Length = Requirement(
name='RQ.SRS008.AES.MySQL.Encrypt.Function.Mode.KeyAndInitializationVector.Length',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error when the `aes_encrypt_mysql` function is called with the following parameter values\n'
'\n'
'* `aes-128-ecb` mode and `key` is less than 16 bytes or `iv` is specified\n'
'* `aes-192-ecb` mode and `key` is less than 24 bytes or `iv` is specified\n'
'* `aes-256-ecb` mode and `key` is less than 32 bytes or `iv` is specified\n'
'* `aes-128-cbc` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-192-cbc` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-256-cbc` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-128-cfb1` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-192-cfb1` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-256-cfb1` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-128-cfb8` mode and `key` is less than 16 bytes and if specified `iv` is less than 16 bytes\n'
'* `aes-192-cfb8` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-256-cfb8` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-128-cfb128` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-192-cfb128` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-256-cfb128` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-128-ofb` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-192-ofb` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-256-ofb` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes\n'
'\n'
),
link=None,
level=3,
num='4.3.18')
RQ_SRS008_AES_MySQL_Decrypt_Function = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `aes_decrypt_mysql` function to decrypt data using [AES].\n'
'\n'
),
link=None,
level=3,
num='4.3.19')
RQ_SRS008_AES_MySQL_Decrypt_Function_Syntax = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Syntax',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support the following syntax for the `aes_decrypt_mysql` function\n'
'\n'
'```sql\n'
'aes_decrypt_mysql(mode, ciphertext, key, [iv])\n'
'```\n'
'\n'
),
link=None,
level=3,
num='4.3.20')
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_CipherText = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.CipherText',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `ciphertext` accepting any data type as\n'
'the first parameter to the `aes_decrypt_mysql` function that SHALL specify the data to be decrypted.\n'
'\n'
),
link=None,
level=3,
num='4.3.21')
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Key = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Key',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `key` with `String` or `FixedString` data types\n'
'as the second parameter to the `aes_decrypt_mysql` function that SHALL specify the encryption key.\n'
'\n'
),
link=None,
level=3,
num='4.3.22')
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Mode = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `mode` with `String` or `FixedString` data types as the third parameter\n'
'to the `aes_decrypt_mysql` function that SHALL specify encryption key length and block encryption mode.\n'
'\n'
),
link=None,
level=3,
num='4.3.23')
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Mode_ValuesFormat = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.ValuesFormat',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support values of the form `aes-[key length]-[mode]` for the `mode` parameter\n'
'of the `aes_decrypt_mysql` function where\n'
'the `key_length` SHALL specifies the length of the key and SHALL accept\n'
'`128`, `192`, or `256` as the values and the `mode` SHALL specify the block encryption\n'
'mode and SHALL accept [ECB], [CBC], [CFB128], or [OFB]. For example, `aes-256-ofb`.\n'
'\n'
),
link=None,
level=3,
num='4.3.24')
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Mode_Value_Invalid = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.Invalid',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the specified value for the `mode` parameter of the `aes_decrypt_mysql`\n'
'function is not valid with the exception where such a mode is supported by the underlying\n'
'[OpenSSL] implementation.\n'
'\n'
),
link=None,
level=3,
num='4.3.25')
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Mode_Values = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Values',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support the following [AES] block encryption modes as the value for the `mode` parameter\n'
'of the `aes_decrypt_mysql` function:\n'
'\n'
'* `aes-128-ecb` that SHALL use [ECB] block mode encryption with 128 bit key\n'
'* `aes-192-ecb` that SHALL use [ECB] block mode encryption with 192 bit key\n'
'* `aes-256-ecb` that SHALL use [ECB] block mode encryption with 256 bit key\n'
'* `aes-128-cbc` that SHALL use [CBC] block mode encryption with 128 bit key\n'
'* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 192 bit key\n'
'* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 256 bit key\n'
'* `aes-128-cfb128` that SHALL use [CFB128] block mode encryption with 128 bit key\n'
'* `aes-192-cfb128` that SHALL use [CFB128] block mode encryption with 192 bit key\n'
'* `aes-256-cfb128` that SHALL use [CFB128] block mode encryption with 256 bit key\n'
'* `aes-128-ofb` that SHALL use [OFB] block mode encryption with 128 bit key\n'
'* `aes-192-ofb` that SHALL use [OFB] block mode encryption with 192 bit key\n'
'* `aes-256-ofb` that SHALL use [OFB] block mode encryption with 256 bit key\n'
'\n'
),
link=None,
level=3,
num='4.3.26')
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Mode_Values_GCM_Error = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Values.GCM.Error',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if any of the following [GCM] modes are specified as the value \n'
'for the `mode` parameter of the `aes_decrypt_mysql` function\n'
'\n'
'* `aes-128-gcm`\n'
'* `aes-192-gcm`\n'
'* `aes-256-gcm`\n'
'\n'
),
link=None,
level=3,
num='4.3.27')
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Mode_Values_CTR_Error = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Values.CTR.Error',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if any of the following [CTR] modes are specified as the value \n'
'for the `mode` parameter of the `aes_decrypt_mysql` function\n'
'\n'
'* `aes-128-ctr`\n'
'* `aes-192-ctr`\n'
'* `aes-256-ctr`\n'
'\n'
),
link=None,
level=3,
num='4.3.28')
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_InitializationVector = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.InitializationVector',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `iv` with `String` or `FixedString` data types as the optional fourth\n'
'parameter to the `aes_decrypt_mysql` function that SHALL specify the initialization vector for block modes that require\n'
'it.\n'
'\n'
),
link=None,
level=3,
num='4.3.29')
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_ReturnValue = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.ReturnValue',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return the decrypted value of the data\n'
'using `String` data type as the result of `aes_decrypt_mysql` function.\n'
'\n'
),
link=None,
level=3,
num='4.3.30')
RQ_SRS008_AES_MySQL_Decrypt_Function_Key_Length_TooShortError = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Key.Length.TooShortError',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `key` length is less than the minimum for the `aes_decrypt_mysql`\n'
'function for a given block mode.\n'
'\n'
),
link=None,
level=3,
num='4.3.31')
RQ_SRS008_AES_MySQL_Decrypt_Function_Key_Length_TooLong = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Key.Length.TooLong',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL use folding algorithm specified below if the `key` length is longer than required\n'
'for the `aes_decrypt_mysql` function for a given block mode.\n'
'\n'
'```python\n'
'def fold_key(key, cipher_key_size):\n'
' key = list(key) if not isinstance(key, (list, tuple)) else key\n'
'\t folded_key = key[:cipher_key_size]\n'
'\t for i in range(cipher_key_size, len(key)):\n'
'\t\t print(i % cipher_key_size, i)\n'
'\t\t folded_key[i % cipher_key_size] ^= key[i]\n'
'\t return folded_key\n'
'```\n'
'\n'
),
link=None,
level=3,
num='4.3.32')
RQ_SRS008_AES_MySQL_Decrypt_Function_InitializationVector_Length_TooShortError = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.Length.TooShortError',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `iv` length is specified and is less than the minimum\n'
'that is required for the `aes_decrypt_mysql` function for a given block mode.\n'
'\n'
),
link=None,
level=3,
num='4.3.33')
RQ_SRS008_AES_MySQL_Decrypt_Function_InitializationVector_Length_TooLong = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.Length.TooLong',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL use the first `N` bytes that are required if the `iv` is specified and\n'
'its length is longer than required for the `aes_decrypt_mysql` function for a given block mode.\n'
'\n'
),
link=None,
level=3,
num='4.3.34')
RQ_SRS008_AES_MySQL_Decrypt_Function_InitializationVector_NotValidForMode = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.NotValidForMode',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `iv` is specified for the `aes_decrypt_mysql`\n'
'function for a mode that does not need it.\n'
'\n'
),
link=None,
level=3,
num='4.3.35')
RQ_SRS008_AES_MySQL_Decrypt_Function_Mode_KeyAndInitializationVector_Length = Requirement(
name='RQ.SRS008.AES.MySQL.Decrypt.Function.Mode.KeyAndInitializationVector.Length',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error when the `aes_decrypt_mysql` function is called with the following parameter values\n'
'\n'
'* `aes-128-ecb` mode and `key` is less than 16 bytes or `iv` is specified\n'
'* `aes-192-ecb` mode and `key` is less than 24 bytes or `iv` is specified\n'
'* `aes-256-ecb` mode and `key` is less than 32 bytes or `iv` is specified\n'
'* `aes-128-cbc` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-192-cbc` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-256-cbc` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-128-cfb1` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-192-cfb1` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-256-cfb1` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-128-cfb8` mode and `key` is less than 16 bytes and if specified `iv` is less than 16 bytes\n'
'* `aes-192-cfb8` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-256-cfb8` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-128-cfb128` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-192-cfb128` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-256-cfb128` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-128-ofb` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-192-ofb` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes\n'
'* `aes-256-ofb` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes\n'
'\n'
),
link=None,
level=3,
num='4.3.36')
SRS_008_ClickHouse_AES_Encryption_Functions = Specification(
name='SRS-008 ClickHouse AES Encryption Functions',
description=None,
author=None,
date=None,
status=None,
approved_by=None,
approved_date=None,
approved_version=None,
version=None,
group=None,
type=None,
link=None,
uid=None,
parent=None,
children=None,
headings=(
Heading(name='Revision History', level=1, num='1'),
Heading(name='Introduction', level=1, num='2'),
Heading(name='Terminology', level=1, num='3'),
Heading(name='Requirements', level=1, num='4'),
Heading(name='Generic', level=2, num='4.1'),
Heading(name='RQ.SRS008.AES.Functions', level=3, num='4.1.1'),
Heading(name='RQ.SRS008.AES.Functions.Compatability.MySQL', level=3, num='4.1.2'),
Heading(name='RQ.SRS008.AES.Functions.Compatability.Dictionaries', level=3, num='4.1.3'),
Heading(name='RQ.SRS008.AES.Functions.Compatability.Engine.Database.MySQL', level=3, num='4.1.4'),
Heading(name='RQ.SRS008.AES.Functions.Compatability.Engine.Table.MySQL', level=3, num='4.1.5'),
Heading(name='RQ.SRS008.AES.Functions.Compatability.TableFunction.MySQL', level=3, num='4.1.6'),
Heading(name='RQ.SRS008.AES.Functions.DifferentModes', level=3, num='4.1.7'),
Heading(name='RQ.SRS008.AES.Functions.DataFromMultipleSources', level=3, num='4.1.8'),
Heading(name='RQ.SRS008.AES.Functions.SuppressOutputOfSensitiveValues', level=3, num='4.1.9'),
Heading(name='RQ.SRS008.AES.Functions.InvalidParameters', level=3, num='4.1.10'),
Heading(name='RQ.SRS008.AES.Functions.Mismatched.Key', level=3, num='4.1.11'),
Heading(name='RQ.SRS008.AES.Functions.Mismatched.IV', level=3, num='4.1.12'),
Heading(name='RQ.SRS008.AES.Functions.Mismatched.AAD', level=3, num='4.1.13'),
Heading(name='RQ.SRS008.AES.Functions.Mismatched.Mode', level=3, num='4.1.14'),
Heading(name='RQ.SRS008.AES.Functions.Check.Performance', level=3, num='4.1.15'),
Heading(name='RQ.SRS008.AES.Function.Check.Performance.BestCase', level=3, num='4.1.16'),
Heading(name='RQ.SRS008.AES.Function.Check.Performance.WorstCase', level=3, num='4.1.17'),
Heading(name='RQ.SRS008.AES.Functions.Check.Compression', level=3, num='4.1.18'),
Heading(name='RQ.SRS008.AES.Functions.Check.Compression.LowCardinality', level=3, num='4.1.19'),
Heading(name='Specific', level=2, num='4.2'),
Heading(name='RQ.SRS008.AES.Encrypt.Function', level=3, num='4.2.1'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.Syntax', level=3, num='4.2.2'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.NIST.TestVectors', level=3, num='4.2.3'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.Parameters.PlainText', level=3, num='4.2.4'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.Parameters.Key', level=3, num='4.2.5'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.Parameters.Mode', level=3, num='4.2.6'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.ValuesFormat', level=3, num='4.2.7'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.Invalid', level=3, num='4.2.8'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Values', level=3, num='4.2.9'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.Parameters.InitializationVector', level=3, num='4.2.10'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.Parameters.AdditionalAuthenticatedData', level=3, num='4.2.11'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.Parameters.ReturnValue', level=3, num='4.2.12'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.Key.Length.InvalidLengthError', level=3, num='4.2.13'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.InitializationVector.Length.InvalidLengthError', level=3, num='4.2.14'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.InitializationVector.NotValidForMode', level=3, num='4.2.15'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.AdditionalAuthenticationData.NotValidForMode', level=3, num='4.2.16'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.AdditionalAuthenticationData.Length', level=3, num='4.2.17'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.NonGCMMode.KeyAndInitializationVector.Length', level=3, num='4.2.18'),
Heading(name='RQ.SRS008.AES.Encrypt.Function.GCMMode.KeyAndInitializationVector.Length', level=3, num='4.2.19'),
Heading(name='RQ.SRS008.AES.Decrypt.Function', level=3, num='4.2.20'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.Syntax', level=3, num='4.2.21'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.Parameters.CipherText', level=3, num='4.2.22'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.Parameters.Key', level=3, num='4.2.23'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.Parameters.Mode', level=3, num='4.2.24'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.ValuesFormat', level=3, num='4.2.25'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.Invalid', level=3, num='4.2.26'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Values', level=3, num='4.2.27'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.Parameters.InitializationVector', level=3, num='4.2.28'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.Parameters.AdditionalAuthenticatedData', level=3, num='4.2.29'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.Parameters.ReturnValue', level=3, num='4.2.30'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.Key.Length.InvalidLengthError', level=3, num='4.2.31'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.InitializationVector.Length.InvalidLengthError', level=3, num='4.2.32'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.InitializationVector.NotValidForMode', level=3, num='4.2.33'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.AdditionalAuthenticationData.NotValidForMode', level=3, num='4.2.34'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.AdditionalAuthenticationData.Length', level=3, num='4.2.35'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.NonGCMMode.KeyAndInitializationVector.Length', level=3, num='4.2.36'),
Heading(name='RQ.SRS008.AES.Decrypt.Function.GCMMode.KeyAndInitializationVector.Length', level=3, num='4.2.37'),
Heading(name='MySQL Specific Functions', level=2, num='4.3'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function', level=3, num='4.3.1'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Syntax', level=3, num='4.3.2'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.PlainText', level=3, num='4.3.3'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Key', level=3, num='4.3.4'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode', level=3, num='4.3.5'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.ValuesFormat', level=3, num='4.3.6'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.Invalid', level=3, num='4.3.7'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Values', level=3, num='4.3.8'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Values.GCM.Error', level=3, num='4.3.9'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Values.CTR.Error', level=3, num='4.3.10'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.InitializationVector', level=3, num='4.3.11'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.ReturnValue', level=3, num='4.3.12'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Key.Length.TooShortError', level=3, num='4.3.13'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Key.Length.TooLong', level=3, num='4.3.14'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.Length.TooShortError', level=3, num='4.3.15'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.Length.TooLong', level=3, num='4.3.16'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.NotValidForMode', level=3, num='4.3.17'),
Heading(name='RQ.SRS008.AES.MySQL.Encrypt.Function.Mode.KeyAndInitializationVector.Length', level=3, num='4.3.18'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function', level=3, num='4.3.19'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Syntax', level=3, num='4.3.20'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.CipherText', level=3, num='4.3.21'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Key', level=3, num='4.3.22'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode', level=3, num='4.3.23'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.ValuesFormat', level=3, num='4.3.24'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.Invalid', level=3, num='4.3.25'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Values', level=3, num='4.3.26'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Values.GCM.Error', level=3, num='4.3.27'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Values.CTR.Error', level=3, num='4.3.28'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.InitializationVector', level=3, num='4.3.29'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.ReturnValue', level=3, num='4.3.30'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Key.Length.TooShortError', level=3, num='4.3.31'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Key.Length.TooLong', level=3, num='4.3.32'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.Length.TooShortError', level=3, num='4.3.33'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.Length.TooLong', level=3, num='4.3.34'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.NotValidForMode', level=3, num='4.3.35'),
Heading(name='RQ.SRS008.AES.MySQL.Decrypt.Function.Mode.KeyAndInitializationVector.Length', level=3, num='4.3.36'),
Heading(name='References', level=1, num='5'),
),
requirements=(
RQ_SRS008_AES_Functions,
RQ_SRS008_AES_Functions_Compatability_MySQL,
RQ_SRS008_AES_Functions_Compatability_Dictionaries,
RQ_SRS008_AES_Functions_Compatability_Engine_Database_MySQL,
RQ_SRS008_AES_Functions_Compatability_Engine_Table_MySQL,
RQ_SRS008_AES_Functions_Compatability_TableFunction_MySQL,
RQ_SRS008_AES_Functions_DifferentModes,
RQ_SRS008_AES_Functions_DataFromMultipleSources,
RQ_SRS008_AES_Functions_SuppressOutputOfSensitiveValues,
RQ_SRS008_AES_Functions_InvalidParameters,
RQ_SRS008_AES_Functions_Mismatched_Key,
RQ_SRS008_AES_Functions_Mismatched_IV,
RQ_SRS008_AES_Functions_Mismatched_AAD,
RQ_SRS008_AES_Functions_Mismatched_Mode,
RQ_SRS008_AES_Functions_Check_Performance,
RQ_SRS008_AES_Function_Check_Performance_BestCase,
RQ_SRS008_AES_Function_Check_Performance_WorstCase,
RQ_SRS008_AES_Functions_Check_Compression,
RQ_SRS008_AES_Functions_Check_Compression_LowCardinality,
RQ_SRS008_AES_Encrypt_Function,
RQ_SRS008_AES_Encrypt_Function_Syntax,
RQ_SRS008_AES_Encrypt_Function_NIST_TestVectors,
RQ_SRS008_AES_Encrypt_Function_Parameters_PlainText,
RQ_SRS008_AES_Encrypt_Function_Parameters_Key,
RQ_SRS008_AES_Encrypt_Function_Parameters_Mode,
RQ_SRS008_AES_Encrypt_Function_Parameters_Mode_ValuesFormat,
RQ_SRS008_AES_Encrypt_Function_Parameters_Mode_Value_Invalid,
RQ_SRS008_AES_Encrypt_Function_Parameters_Mode_Values,
RQ_SRS008_AES_Encrypt_Function_Parameters_InitializationVector,
RQ_SRS008_AES_Encrypt_Function_Parameters_AdditionalAuthenticatedData,
RQ_SRS008_AES_Encrypt_Function_Parameters_ReturnValue,
RQ_SRS008_AES_Encrypt_Function_Key_Length_InvalidLengthError,
RQ_SRS008_AES_Encrypt_Function_InitializationVector_Length_InvalidLengthError,
RQ_SRS008_AES_Encrypt_Function_InitializationVector_NotValidForMode,
RQ_SRS008_AES_Encrypt_Function_AdditionalAuthenticationData_NotValidForMode,
RQ_SRS008_AES_Encrypt_Function_AdditionalAuthenticationData_Length,
RQ_SRS008_AES_Encrypt_Function_NonGCMMode_KeyAndInitializationVector_Length,
RQ_SRS008_AES_Encrypt_Function_GCMMode_KeyAndInitializationVector_Length,
RQ_SRS008_AES_Decrypt_Function,
RQ_SRS008_AES_Decrypt_Function_Syntax,
RQ_SRS008_AES_Decrypt_Function_Parameters_CipherText,
RQ_SRS008_AES_Decrypt_Function_Parameters_Key,
RQ_SRS008_AES_Decrypt_Function_Parameters_Mode,
RQ_SRS008_AES_Decrypt_Function_Parameters_Mode_ValuesFormat,
RQ_SRS008_AES_Decrypt_Function_Parameters_Mode_Value_Invalid,
RQ_SRS008_AES_Decrypt_Function_Parameters_Mode_Values,
RQ_SRS008_AES_Decrypt_Function_Parameters_InitializationVector,
RQ_SRS008_AES_Decrypt_Function_Parameters_AdditionalAuthenticatedData,
RQ_SRS008_AES_Decrypt_Function_Parameters_ReturnValue,
RQ_SRS008_AES_Decrypt_Function_Key_Length_InvalidLengthError,
RQ_SRS008_AES_Decrypt_Function_InitializationVector_Length_InvalidLengthError,
RQ_SRS008_AES_Decrypt_Function_InitializationVector_NotValidForMode,
RQ_SRS008_AES_Decrypt_Function_AdditionalAuthenticationData_NotValidForMode,
RQ_SRS008_AES_Decrypt_Function_AdditionalAuthenticationData_Length,
RQ_SRS008_AES_Decrypt_Function_NonGCMMode_KeyAndInitializationVector_Length,
RQ_SRS008_AES_Decrypt_Function_GCMMode_KeyAndInitializationVector_Length,
RQ_SRS008_AES_MySQL_Encrypt_Function,
RQ_SRS008_AES_MySQL_Encrypt_Function_Syntax,
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_PlainText,
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Key,
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Mode,
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Mode_ValuesFormat,
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Mode_Value_Invalid,
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Mode_Values,
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Mode_Values_GCM_Error,
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_Mode_Values_CTR_Error,
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_InitializationVector,
RQ_SRS008_AES_MySQL_Encrypt_Function_Parameters_ReturnValue,
RQ_SRS008_AES_MySQL_Encrypt_Function_Key_Length_TooShortError,
RQ_SRS008_AES_MySQL_Encrypt_Function_Key_Length_TooLong,
RQ_SRS008_AES_MySQL_Encrypt_Function_InitializationVector_Length_TooShortError,
RQ_SRS008_AES_MySQL_Encrypt_Function_InitializationVector_Length_TooLong,
RQ_SRS008_AES_MySQL_Encrypt_Function_InitializationVector_NotValidForMode,
RQ_SRS008_AES_MySQL_Encrypt_Function_Mode_KeyAndInitializationVector_Length,
RQ_SRS008_AES_MySQL_Decrypt_Function,
RQ_SRS008_AES_MySQL_Decrypt_Function_Syntax,
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_CipherText,
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Key,
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Mode,
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Mode_ValuesFormat,
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Mode_Value_Invalid,
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Mode_Values,
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Mode_Values_GCM_Error,
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_Mode_Values_CTR_Error,
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_InitializationVector,
RQ_SRS008_AES_MySQL_Decrypt_Function_Parameters_ReturnValue,
RQ_SRS008_AES_MySQL_Decrypt_Function_Key_Length_TooShortError,
RQ_SRS008_AES_MySQL_Decrypt_Function_Key_Length_TooLong,
RQ_SRS008_AES_MySQL_Decrypt_Function_InitializationVector_Length_TooShortError,
RQ_SRS008_AES_MySQL_Decrypt_Function_InitializationVector_Length_TooLong,
RQ_SRS008_AES_MySQL_Decrypt_Function_InitializationVector_NotValidForMode,
RQ_SRS008_AES_MySQL_Decrypt_Function_Mode_KeyAndInitializationVector_Length,
),
content='''
# SRS-008 ClickHouse AES Encryption Functions
# Software Requirements Specification
## Table of Contents
* 1 [Revision History](#revision-history)
* 2 [Introduction](#introduction)
* 3 [Terminology](#terminology)
* 4 [Requirements](#requirements)
* 4.1 [Generic](#generic)
* 4.1.1 [RQ.SRS008.AES.Functions](#rqsrs008aesfunctions)
* 4.1.2 [RQ.SRS008.AES.Functions.Compatability.MySQL](#rqsrs008aesfunctionscompatabilitymysql)
* 4.1.3 [RQ.SRS008.AES.Functions.Compatability.Dictionaries](#rqsrs008aesfunctionscompatabilitydictionaries)
* 4.1.4 [RQ.SRS008.AES.Functions.Compatability.Engine.Database.MySQL](#rqsrs008aesfunctionscompatabilityenginedatabasemysql)
* 4.1.5 [RQ.SRS008.AES.Functions.Compatability.Engine.Table.MySQL](#rqsrs008aesfunctionscompatabilityenginetablemysql)
* 4.1.6 [RQ.SRS008.AES.Functions.Compatability.TableFunction.MySQL](#rqsrs008aesfunctionscompatabilitytablefunctionmysql)
* 4.1.7 [RQ.SRS008.AES.Functions.DifferentModes](#rqsrs008aesfunctionsdifferentmodes)
* 4.1.8 [RQ.SRS008.AES.Functions.DataFromMultipleSources](#rqsrs008aesfunctionsdatafrommultiplesources)
* 4.1.9 [RQ.SRS008.AES.Functions.SuppressOutputOfSensitiveValues](#rqsrs008aesfunctionssuppressoutputofsensitivevalues)
* 4.1.10 [RQ.SRS008.AES.Functions.InvalidParameters](#rqsrs008aesfunctionsinvalidparameters)
* 4.1.11 [RQ.SRS008.AES.Functions.Mismatched.Key](#rqsrs008aesfunctionsmismatchedkey)
* 4.1.12 [RQ.SRS008.AES.Functions.Mismatched.IV](#rqsrs008aesfunctionsmismatchediv)
* 4.1.13 [RQ.SRS008.AES.Functions.Mismatched.AAD](#rqsrs008aesfunctionsmismatchedaad)
* 4.1.14 [RQ.SRS008.AES.Functions.Mismatched.Mode](#rqsrs008aesfunctionsmismatchedmode)
* 4.1.15 [RQ.SRS008.AES.Functions.Check.Performance](#rqsrs008aesfunctionscheckperformance)
* 4.1.16 [RQ.SRS008.AES.Function.Check.Performance.BestCase](#rqsrs008aesfunctioncheckperformancebestcase)
* 4.1.17 [RQ.SRS008.AES.Function.Check.Performance.WorstCase](#rqsrs008aesfunctioncheckperformanceworstcase)
* 4.1.18 [RQ.SRS008.AES.Functions.Check.Compression](#rqsrs008aesfunctionscheckcompression)
* 4.1.19 [RQ.SRS008.AES.Functions.Check.Compression.LowCardinality](#rqsrs008aesfunctionscheckcompressionlowcardinality)
* 4.2 [Specific](#specific)
* 4.2.1 [RQ.SRS008.AES.Encrypt.Function](#rqsrs008aesencryptfunction)
* 4.2.2 [RQ.SRS008.AES.Encrypt.Function.Syntax](#rqsrs008aesencryptfunctionsyntax)
* 4.2.3 [RQ.SRS008.AES.Encrypt.Function.NIST.TestVectors](#rqsrs008aesencryptfunctionnisttestvectors)
* 4.2.4 [RQ.SRS008.AES.Encrypt.Function.Parameters.PlainText](#rqsrs008aesencryptfunctionparametersplaintext)
* 4.2.5 [RQ.SRS008.AES.Encrypt.Function.Parameters.Key](#rqsrs008aesencryptfunctionparameterskey)
* 4.2.6 [RQ.SRS008.AES.Encrypt.Function.Parameters.Mode](#rqsrs008aesencryptfunctionparametersmode)
* 4.2.7 [RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.ValuesFormat](#rqsrs008aesencryptfunctionparametersmodevaluesformat)
* 4.2.8 [RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.Invalid](#rqsrs008aesencryptfunctionparametersmodevalueinvalid)
* 4.2.9 [RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Values](#rqsrs008aesencryptfunctionparametersmodevalues)
* 4.2.10 [RQ.SRS008.AES.Encrypt.Function.Parameters.InitializationVector](#rqsrs008aesencryptfunctionparametersinitializationvector)
* 4.2.11 [RQ.SRS008.AES.Encrypt.Function.Parameters.AdditionalAuthenticatedData](#rqsrs008aesencryptfunctionparametersadditionalauthenticateddata)
* 4.2.12 [RQ.SRS008.AES.Encrypt.Function.Parameters.ReturnValue](#rqsrs008aesencryptfunctionparametersreturnvalue)
* 4.2.13 [RQ.SRS008.AES.Encrypt.Function.Key.Length.InvalidLengthError](#rqsrs008aesencryptfunctionkeylengthinvalidlengtherror)
* 4.2.14 [RQ.SRS008.AES.Encrypt.Function.InitializationVector.Length.InvalidLengthError](#rqsrs008aesencryptfunctioninitializationvectorlengthinvalidlengtherror)
* 4.2.15 [RQ.SRS008.AES.Encrypt.Function.InitializationVector.NotValidForMode](#rqsrs008aesencryptfunctioninitializationvectornotvalidformode)
* 4.2.16 [RQ.SRS008.AES.Encrypt.Function.AdditionalAuthenticationData.NotValidForMode](#rqsrs008aesencryptfunctionadditionalauthenticationdatanotvalidformode)
* 4.2.17 [RQ.SRS008.AES.Encrypt.Function.AdditionalAuthenticationData.Length](#rqsrs008aesencryptfunctionadditionalauthenticationdatalength)
* 4.2.18 [RQ.SRS008.AES.Encrypt.Function.NonGCMMode.KeyAndInitializationVector.Length](#rqsrs008aesencryptfunctionnongcmmodekeyandinitializationvectorlength)
* 4.2.19 [RQ.SRS008.AES.Encrypt.Function.GCMMode.KeyAndInitializationVector.Length](#rqsrs008aesencryptfunctiongcmmodekeyandinitializationvectorlength)
* 4.2.20 [RQ.SRS008.AES.Decrypt.Function](#rqsrs008aesdecryptfunction)
* 4.2.21 [RQ.SRS008.AES.Decrypt.Function.Syntax](#rqsrs008aesdecryptfunctionsyntax)
* 4.2.22 [RQ.SRS008.AES.Decrypt.Function.Parameters.CipherText](#rqsrs008aesdecryptfunctionparametersciphertext)
* 4.2.23 [RQ.SRS008.AES.Decrypt.Function.Parameters.Key](#rqsrs008aesdecryptfunctionparameterskey)
* 4.2.24 [RQ.SRS008.AES.Decrypt.Function.Parameters.Mode](#rqsrs008aesdecryptfunctionparametersmode)
* 4.2.25 [RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.ValuesFormat](#rqsrs008aesdecryptfunctionparametersmodevaluesformat)
* 4.2.26 [RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.Invalid](#rqsrs008aesdecryptfunctionparametersmodevalueinvalid)
* 4.2.27 [RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Values](#rqsrs008aesdecryptfunctionparametersmodevalues)
* 4.2.28 [RQ.SRS008.AES.Decrypt.Function.Parameters.InitializationVector](#rqsrs008aesdecryptfunctionparametersinitializationvector)
* 4.2.29 [RQ.SRS008.AES.Decrypt.Function.Parameters.AdditionalAuthenticatedData](#rqsrs008aesdecryptfunctionparametersadditionalauthenticateddata)
* 4.2.30 [RQ.SRS008.AES.Decrypt.Function.Parameters.ReturnValue](#rqsrs008aesdecryptfunctionparametersreturnvalue)
* 4.2.31 [RQ.SRS008.AES.Decrypt.Function.Key.Length.InvalidLengthError](#rqsrs008aesdecryptfunctionkeylengthinvalidlengtherror)
* 4.2.32 [RQ.SRS008.AES.Decrypt.Function.InitializationVector.Length.InvalidLengthError](#rqsrs008aesdecryptfunctioninitializationvectorlengthinvalidlengtherror)
* 4.2.33 [RQ.SRS008.AES.Decrypt.Function.InitializationVector.NotValidForMode](#rqsrs008aesdecryptfunctioninitializationvectornotvalidformode)
* 4.2.34 [RQ.SRS008.AES.Decrypt.Function.AdditionalAuthenticationData.NotValidForMode](#rqsrs008aesdecryptfunctionadditionalauthenticationdatanotvalidformode)
* 4.2.35 [RQ.SRS008.AES.Decrypt.Function.AdditionalAuthenticationData.Length](#rqsrs008aesdecryptfunctionadditionalauthenticationdatalength)
* 4.2.36 [RQ.SRS008.AES.Decrypt.Function.NonGCMMode.KeyAndInitializationVector.Length](#rqsrs008aesdecryptfunctionnongcmmodekeyandinitializationvectorlength)
* 4.2.37 [RQ.SRS008.AES.Decrypt.Function.GCMMode.KeyAndInitializationVector.Length](#rqsrs008aesdecryptfunctiongcmmodekeyandinitializationvectorlength)
* 4.3 [MySQL Specific Functions](#mysql-specific-functions)
* 4.3.1 [RQ.SRS008.AES.MySQL.Encrypt.Function](#rqsrs008aesmysqlencryptfunction)
* 4.3.2 [RQ.SRS008.AES.MySQL.Encrypt.Function.Syntax](#rqsrs008aesmysqlencryptfunctionsyntax)
* 4.3.3 [RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.PlainText](#rqsrs008aesmysqlencryptfunctionparametersplaintext)
* 4.3.4 [RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Key](#rqsrs008aesmysqlencryptfunctionparameterskey)
* 4.3.5 [RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode](#rqsrs008aesmysqlencryptfunctionparametersmode)
* 4.3.6 [RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.ValuesFormat](#rqsrs008aesmysqlencryptfunctionparametersmodevaluesformat)
* 4.3.7 [RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.Invalid](#rqsrs008aesmysqlencryptfunctionparametersmodevalueinvalid)
* 4.3.8 [RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Values](#rqsrs008aesmysqlencryptfunctionparametersmodevalues)
* 4.3.9 [RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Values.GCM.Error](#rqsrs008aesmysqlencryptfunctionparametersmodevaluesgcmerror)
* 4.3.10 [RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Values.CTR.Error](#rqsrs008aesmysqlencryptfunctionparametersmodevaluesctrerror)
* 4.3.11 [RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.InitializationVector](#rqsrs008aesmysqlencryptfunctionparametersinitializationvector)
* 4.3.12 [RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.ReturnValue](#rqsrs008aesmysqlencryptfunctionparametersreturnvalue)
* 4.3.13 [RQ.SRS008.AES.MySQL.Encrypt.Function.Key.Length.TooShortError](#rqsrs008aesmysqlencryptfunctionkeylengthtooshorterror)
* 4.3.14 [RQ.SRS008.AES.MySQL.Encrypt.Function.Key.Length.TooLong](#rqsrs008aesmysqlencryptfunctionkeylengthtoolong)
* 4.3.15 [RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.Length.TooShortError](#rqsrs008aesmysqlencryptfunctioninitializationvectorlengthtooshorterror)
* 4.3.16 [RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.Length.TooLong](#rqsrs008aesmysqlencryptfunctioninitializationvectorlengthtoolong)
* 4.3.17 [RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.NotValidForMode](#rqsrs008aesmysqlencryptfunctioninitializationvectornotvalidformode)
* 4.3.18 [RQ.SRS008.AES.MySQL.Encrypt.Function.Mode.KeyAndInitializationVector.Length](#rqsrs008aesmysqlencryptfunctionmodekeyandinitializationvectorlength)
* 4.3.19 [RQ.SRS008.AES.MySQL.Decrypt.Function](#rqsrs008aesmysqldecryptfunction)
* 4.3.20 [RQ.SRS008.AES.MySQL.Decrypt.Function.Syntax](#rqsrs008aesmysqldecryptfunctionsyntax)
* 4.3.21 [RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.CipherText](#rqsrs008aesmysqldecryptfunctionparametersciphertext)
* 4.3.22 [RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Key](#rqsrs008aesmysqldecryptfunctionparameterskey)
* 4.3.23 [RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode](#rqsrs008aesmysqldecryptfunctionparametersmode)
* 4.3.24 [RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.ValuesFormat](#rqsrs008aesmysqldecryptfunctionparametersmodevaluesformat)
* 4.3.25 [RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.Invalid](#rqsrs008aesmysqldecryptfunctionparametersmodevalueinvalid)
* 4.3.26 [RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Values](#rqsrs008aesmysqldecryptfunctionparametersmodevalues)
* 4.3.27 [RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Values.GCM.Error](#rqsrs008aesmysqldecryptfunctionparametersmodevaluesgcmerror)
* 4.3.28 [RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Values.CTR.Error](#rqsrs008aesmysqldecryptfunctionparametersmodevaluesctrerror)
* 4.3.29 [RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.InitializationVector](#rqsrs008aesmysqldecryptfunctionparametersinitializationvector)
* 4.3.30 [RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.ReturnValue](#rqsrs008aesmysqldecryptfunctionparametersreturnvalue)
* 4.3.31 [RQ.SRS008.AES.MySQL.Decrypt.Function.Key.Length.TooShortError](#rqsrs008aesmysqldecryptfunctionkeylengthtooshorterror)
* 4.3.32 [RQ.SRS008.AES.MySQL.Decrypt.Function.Key.Length.TooLong](#rqsrs008aesmysqldecryptfunctionkeylengthtoolong)
* 4.3.33 [RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.Length.TooShortError](#rqsrs008aesmysqldecryptfunctioninitializationvectorlengthtooshorterror)
* 4.3.34 [RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.Length.TooLong](#rqsrs008aesmysqldecryptfunctioninitializationvectorlengthtoolong)
* 4.3.35 [RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.NotValidForMode](#rqsrs008aesmysqldecryptfunctioninitializationvectornotvalidformode)
* 4.3.36 [RQ.SRS008.AES.MySQL.Decrypt.Function.Mode.KeyAndInitializationVector.Length](#rqsrs008aesmysqldecryptfunctionmodekeyandinitializationvectorlength)
* 5 [References](#references)
## Revision History
This document is stored in an electronic form using [Git] source control management software
hosted in a [GitHub Repository].
All the updates are tracked using the [Revision History].
## Introduction
Users need an ability to encrypt and decrypt column data with tenant specific keys.
Use cases include protection of sensitive column values and [GDPR] right to forget policies.
The implementation will support capabilities of the [MySQL aes_encrypt] and [MySQL aes_decrypt]
functions which encrypt and decrypt values using the [AES] (Advanced Encryption Standard)
algorithm. This functionality will enable encryption and decryption of data
accessed on remote [MySQL] servers via [MySQL Dictionary] or [MySQL Database Engine],
[MySQL Table Engine], or [MySQL Table Function].
## Terminology
* **AES** -
Advanced Encryption Standard ([AES])
## Requirements
### Generic
#### RQ.SRS008.AES.Functions
version: 1.0
[ClickHouse] SHALL support [AES] encryption functions to encrypt and decrypt data.
#### RQ.SRS008.AES.Functions.Compatability.MySQL
version: 1.0
[ClickHouse] SHALL support [AES] encryption functions compatible with [MySQL 5.7].
#### RQ.SRS008.AES.Functions.Compatability.Dictionaries
version: 1.0
[ClickHouse] SHALL support encryption and decryption of data accessed on remote
[MySQL] servers using [MySQL Dictionary].
#### RQ.SRS008.AES.Functions.Compatability.Engine.Database.MySQL
version: 1.0
[ClickHouse] SHALL support encryption and decryption of data accessed using [MySQL Database Engine],
#### RQ.SRS008.AES.Functions.Compatability.Engine.Table.MySQL
version: 1.0
[ClickHouse] SHALL support encryption and decryption of data accessed using [MySQL Table Engine].
#### RQ.SRS008.AES.Functions.Compatability.TableFunction.MySQL
version: 1.0
[ClickHouse] SHALL support encryption and decryption of data accessed using [MySQL Table Function].
#### RQ.SRS008.AES.Functions.DifferentModes
version: 1.0
[ClickHouse] SHALL allow different modes to be supported in a single SQL statement
using explicit function parameters.
#### RQ.SRS008.AES.Functions.DataFromMultipleSources
version: 1.0
[ClickHouse] SHALL support handling encryption and decryption of data from multiple sources
in the `SELECT` statement, including [ClickHouse] [MergeTree] table as well as [MySQL Dictionary],
[MySQL Database Engine], [MySQL Table Engine], and [MySQL Table Function]
with possibly different encryption schemes.
#### RQ.SRS008.AES.Functions.SuppressOutputOfSensitiveValues
version: 1.0
[ClickHouse] SHALL suppress output of [AES] `string` and `key` parameters to the system log,
error log, and `query_log` table to prevent leakage of sensitive values.
#### RQ.SRS008.AES.Functions.InvalidParameters
version: 1.0
[ClickHouse] SHALL return an error when parameters are invalid.
#### RQ.SRS008.AES.Functions.Mismatched.Key
version: 1.0
[ClickHouse] SHALL return garbage for mismatched keys.
#### RQ.SRS008.AES.Functions.Mismatched.IV
version: 1.0
[ClickHouse] SHALL return garbage for mismatched initialization vector for the modes that use it.
#### RQ.SRS008.AES.Functions.Mismatched.AAD
version: 1.0
[ClickHouse] SHALL return garbage for mismatched additional authentication data for the modes that use it.
#### RQ.SRS008.AES.Functions.Mismatched.Mode
version: 1.0
[ClickHouse] SHALL return an error or garbage for mismatched mode.
#### RQ.SRS008.AES.Functions.Check.Performance
version: 1.0
Performance of [AES] encryption functions SHALL be measured.
#### RQ.SRS008.AES.Function.Check.Performance.BestCase
version: 1.0
Performance of [AES] encryption functions SHALL be checked for the best case
scenario where there is one key, one initialization vector, and one large stream of data.
#### RQ.SRS008.AES.Function.Check.Performance.WorstCase
version: 1.0
Performance of [AES] encryption functions SHALL be checked for the worst case
where there are `N` keys, `N` initialization vectors and `N` very small streams of data.
#### RQ.SRS008.AES.Functions.Check.Compression
version: 1.0
Effect of [AES] encryption on column compression SHALL be measured.
#### RQ.SRS008.AES.Functions.Check.Compression.LowCardinality
version: 1.0
Effect of [AES] encryption on the compression of a column with [LowCardinality] data type
SHALL be measured.
### Specific
#### RQ.SRS008.AES.Encrypt.Function
version: 1.0
[ClickHouse] SHALL support `encrypt` function to encrypt data using [AES].
#### RQ.SRS008.AES.Encrypt.Function.Syntax
version: 1.0
[ClickHouse] SHALL support the following syntax for the `encrypt` function
```sql
encrypt(mode, plaintext, key, [iv, aad])
```
#### RQ.SRS008.AES.Encrypt.Function.NIST.TestVectors
version: 1.0
[ClickHouse] `encrypt` function output SHALL produce output that matches [NIST test vectors].
#### RQ.SRS008.AES.Encrypt.Function.Parameters.PlainText
version: 1.0
[ClickHouse] SHALL support `plaintext` accepting any data type as
the first parameter to the `encrypt` function that SHALL specify the data to be encrypted.
#### RQ.SRS008.AES.Encrypt.Function.Parameters.Key
version: 1.0
[ClickHouse] SHALL support `key` with `String` or `FixedString` data types
as the second parameter to the `encrypt` function that SHALL specify the encryption key.
#### RQ.SRS008.AES.Encrypt.Function.Parameters.Mode
version: 1.0
[ClickHouse] SHALL support `mode` with `String` or `FixedString` data types as the third parameter
to the `encrypt` function that SHALL specify encryption key length and block encryption mode.
#### RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.ValuesFormat
version: 1.0
[ClickHouse] SHALL support values of the form `aes-[key length]-[mode]` for the `mode` parameter
of the `encrypt` function where
the `key_length` SHALL specifies the length of the key and SHALL accept
`128`, `192`, or `256` as the values and the `mode` SHALL specify the block encryption
mode and SHALL accept [ECB], [CBC], [CFB128], or [OFB] as well as
[CTR] and [GCM] as the values. For example, `aes-256-ofb`.
#### RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.Invalid
version: 1.0
[ClickHouse] SHALL return an error if the specified value for the `mode` parameter of the `encrypt`
function is not valid with the exception where such a mode is supported by the underlying
[OpenSSL] implementation.
#### RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Values
version: 1.0
[ClickHouse] SHALL support the following [AES] block encryption modes as the value for the `mode` parameter
of the `encrypt` function:
* `aes-128-ecb` that SHALL use [ECB] block mode encryption with 128 bit key
* `aes-192-ecb` that SHALL use [ECB] block mode encryption with 192 bit key
* `aes-256-ecb` that SHALL use [ECB] block mode encryption with 256 bit key
* `aes-128-cbc` that SHALL use [CBC] block mode encryption with 128 bit key
* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 192 bit key
* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 256 bit key
* `aes-128-cfb128` that SHALL use [CFB128] block mode encryption with 128 bit key
* `aes-192-cfb128` that SHALL use [CFB128] block mode encryption with 192 bit key
* `aes-256-cfb128` that SHALL use [CFB128] block mode encryption with 256 bit key
* `aes-128-ofb` that SHALL use [OFB] block mode encryption with 128 bit key
* `aes-192-ofb` that SHALL use [OFB] block mode encryption with 192 bit key
* `aes-256-ofb` that SHALL use [OFB] block mode encryption with 256 bit key
* `aes-128-gcm` that SHALL use [GCM] block mode encryption with 128 bit key
and `AEAD` 16-byte tag is appended to the resulting ciphertext according to
the [RFC5116]
* `aes-192-gcm` that SHALL use [GCM] block mode encryption with 192 bit key
and `AEAD` 16-byte tag is appended to the resulting ciphertext according to
the [RFC5116]
* `aes-256-gcm` that SHALL use [GCM] block mode encryption with 256 bit key
and `AEAD` 16-byte tag is appended to the resulting ciphertext according to
the [RFC5116]
* `aes-128-ctr` that SHALL use [CTR] block mode encryption with 128 bit key
* `aes-192-ctr` that SHALL use [CTR] block mode encryption with 192 bit key
* `aes-256-ctr` that SHALL use [CTR] block mode encryption with 256 bit key
#### RQ.SRS008.AES.Encrypt.Function.Parameters.InitializationVector
version: 1.0
[ClickHouse] SHALL support `iv` with `String` or `FixedString` data types as the optional fourth
parameter to the `encrypt` function that SHALL specify the initialization vector for block modes that require
it.
#### RQ.SRS008.AES.Encrypt.Function.Parameters.AdditionalAuthenticatedData
version: 1.0
[ClickHouse] SHALL support `aad` with `String` or `FixedString` data types as the optional fifth
parameter to the `encrypt` function that SHALL specify the additional authenticated data
for block modes that require it.
#### RQ.SRS008.AES.Encrypt.Function.Parameters.ReturnValue
version: 1.0
[ClickHouse] SHALL return the encrypted value of the data
using `String` data type as the result of `encrypt` function.
#### RQ.SRS008.AES.Encrypt.Function.Key.Length.InvalidLengthError
version: 1.0
[ClickHouse] SHALL return an error if the `key` length is not exact for the `encrypt` function for a given block mode.
#### RQ.SRS008.AES.Encrypt.Function.InitializationVector.Length.InvalidLengthError
version: 1.0
[ClickHouse] SHALL return an error if the `iv` length is specified and not of the exact size for the `encrypt` function for a given block mode.
#### RQ.SRS008.AES.Encrypt.Function.InitializationVector.NotValidForMode
version: 1.0
[ClickHouse] SHALL return an error if the `iv` is specified for the `encrypt` function for a mode that does not need it.
#### RQ.SRS008.AES.Encrypt.Function.AdditionalAuthenticationData.NotValidForMode
version: 1.0
[ClickHouse] SHALL return an error if the `aad` is specified for the `encrypt` function for a mode that does not need it.
#### RQ.SRS008.AES.Encrypt.Function.AdditionalAuthenticationData.Length
version: 1.0
[ClickHouse] SHALL not limit the size of the `aad` parameter passed to the `encrypt` function.
#### RQ.SRS008.AES.Encrypt.Function.NonGCMMode.KeyAndInitializationVector.Length
version: 1.0
[ClickHouse] SHALL return an error when the `encrypt` function is called with the following parameter values
when using non-GCM modes
* `aes-128-ecb` mode and `key` is not 16 bytes or `iv` or `aad` is specified
* `aes-192-ecb` mode and `key` is not 24 bytes or `iv` or `aad` is specified
* `aes-256-ecb` mode and `key` is not 32 bytes or `iv` or `aad` is specified
* `aes-128-cbc` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-192-cbc` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-256-cbc` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-128-cfb1` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-192-cfb1` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-256-cfb1` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-128-cfb8` mode and `key` is not 16 bytes and if specified `iv` is not 16 bytes
* `aes-192-cfb8` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-256-cfb8` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-128-cfb128` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-192-cfb128` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-256-cfb128` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-128-ofb` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-192-ofb` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-256-ofb` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-128-ctr` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes
* `aes-192-ctr` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes
* `aes-256-ctr` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes
#### RQ.SRS008.AES.Encrypt.Function.GCMMode.KeyAndInitializationVector.Length
version: 1.0
[ClickHouse] SHALL return an error when the `encrypt` function is called with the following parameter values
when using GCM modes
* `aes-128-gcm` mode and `key` is not 16 bytes or `iv` is not specified
* `aes-192-gcm` mode and `key` is not 24 bytes or `iv` is not specified
* `aes-256-gcm` mode and `key` is not 32 bytes or `iv` is not specified
#### RQ.SRS008.AES.Decrypt.Function
version: 1.0
[ClickHouse] SHALL support `decrypt` function to decrypt data using [AES].
#### RQ.SRS008.AES.Decrypt.Function.Syntax
version: 1.0
[ClickHouse] SHALL support the following syntax for the `decrypt` function
```sql
decrypt(mode, ciphertext, key, [iv, aad])
```
#### RQ.SRS008.AES.Decrypt.Function.Parameters.CipherText
version: 1.0
[ClickHouse] SHALL support `ciphertext` accepting `FixedString` or `String` data types as
the first parameter to the `decrypt` function that SHALL specify the data to be decrypted.
#### RQ.SRS008.AES.Decrypt.Function.Parameters.Key
version: 1.0
[ClickHouse] SHALL support `key` with `String` or `FixedString` data types
as the second parameter to the `decrypt` function that SHALL specify the encryption key.
#### RQ.SRS008.AES.Decrypt.Function.Parameters.Mode
version: 1.0
[ClickHouse] SHALL support `mode` with `String` or `FixedString` data types as the third parameter
to the `decrypt` function that SHALL specify encryption key length and block encryption mode.
#### RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.ValuesFormat
version: 1.0
[ClickHouse] SHALL support values of the form `aes-[key length]-[mode]` for the `mode` parameter
of the `decrypt` function where
the `key_length` SHALL specifies the length of the key and SHALL accept
`128`, `192`, or `256` as the values and the `mode` SHALL specify the block encryption
mode and SHALL accept [ECB], [CBC], [CFB128], or [OFB] as well as
[CTR] and [GCM] as the values. For example, `aes-256-ofb`.
#### RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.Invalid
version: 1.0
[ClickHouse] SHALL return an error if the specified value for the `mode` parameter of the `decrypt`
function is not valid with the exception where such a mode is supported by the underlying
[OpenSSL] implementation.
#### RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Values
version: 1.0
[ClickHouse] SHALL support the following [AES] block encryption modes as the value for the `mode` parameter
of the `decrypt` function:
* `aes-128-ecb` that SHALL use [ECB] block mode encryption with 128 bit key
* `aes-192-ecb` that SHALL use [ECB] block mode encryption with 192 bit key
* `aes-256-ecb` that SHALL use [ECB] block mode encryption with 256 bit key
* `aes-128-cbc` that SHALL use [CBC] block mode encryption with 128 bit key
* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 192 bit key
* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 256 bit key
* `aes-128-cfb128` that SHALL use [CFB128] block mode encryption with 128 bit key
* `aes-192-cfb128` that SHALL use [CFB128] block mode encryption with 192 bit key
* `aes-256-cfb128` that SHALL use [CFB128] block mode encryption with 256 bit key
* `aes-128-ofb` that SHALL use [OFB] block mode encryption with 128 bit key
* `aes-192-ofb` that SHALL use [OFB] block mode encryption with 192 bit key
* `aes-256-ofb` that SHALL use [OFB] block mode encryption with 256 bit key
* `aes-128-gcm` that SHALL use [GCM] block mode encryption with 128 bit key
and [AEAD] 16-byte tag is expected present at the end of the ciphertext according to
the [RFC5116]
* `aes-192-gcm` that SHALL use [GCM] block mode encryption with 192 bit key
and [AEAD] 16-byte tag is expected present at the end of the ciphertext according to
the [RFC5116]
* `aes-256-gcm` that SHALL use [GCM] block mode encryption with 256 bit key
and [AEAD] 16-byte tag is expected present at the end of the ciphertext according to
the [RFC5116]
* `aes-128-ctr` that SHALL use [CTR] block mode encryption with 128 bit key
* `aes-192-ctr` that SHALL use [CTR] block mode encryption with 192 bit key
* `aes-256-ctr` that SHALL use [CTR] block mode encryption with 256 bit key
#### RQ.SRS008.AES.Decrypt.Function.Parameters.InitializationVector
version: 1.0
[ClickHouse] SHALL support `iv` with `String` or `FixedString` data types as the optional fourth
parameter to the `decrypt` function that SHALL specify the initialization vector for block modes that require
it.
#### RQ.SRS008.AES.Decrypt.Function.Parameters.AdditionalAuthenticatedData
version: 1.0
[ClickHouse] SHALL support `aad` with `String` or `FixedString` data types as the optional fifth
parameter to the `decrypt` function that SHALL specify the additional authenticated data
for block modes that require it.
#### RQ.SRS008.AES.Decrypt.Function.Parameters.ReturnValue
version: 1.0
[ClickHouse] SHALL return the decrypted value of the data
using `String` data type as the result of `decrypt` function.
#### RQ.SRS008.AES.Decrypt.Function.Key.Length.InvalidLengthError
version: 1.0
[ClickHouse] SHALL return an error if the `key` length is not exact for the `decrypt` function for a given block mode.
#### RQ.SRS008.AES.Decrypt.Function.InitializationVector.Length.InvalidLengthError
version: 1.0
[ClickHouse] SHALL return an error if the `iv` is speficified and the length is not exact for the `decrypt` function for a given block mode.
#### RQ.SRS008.AES.Decrypt.Function.InitializationVector.NotValidForMode
version: 1.0
[ClickHouse] SHALL return an error if the `iv` is specified for the `decrypt` function
for a mode that does not need it.
#### RQ.SRS008.AES.Decrypt.Function.AdditionalAuthenticationData.NotValidForMode
version: 1.0
[ClickHouse] SHALL return an error if the `aad` is specified for the `decrypt` function
for a mode that does not need it.
#### RQ.SRS008.AES.Decrypt.Function.AdditionalAuthenticationData.Length
version: 1.0
[ClickHouse] SHALL not limit the size of the `aad` parameter passed to the `decrypt` function.
#### RQ.SRS008.AES.Decrypt.Function.NonGCMMode.KeyAndInitializationVector.Length
version: 1.0
[ClickHouse] SHALL return an error when the `decrypt` function is called with the following parameter values
when using non-GCM modes
* `aes-128-ecb` mode and `key` is not 16 bytes or `iv` or `aad` is specified
* `aes-192-ecb` mode and `key` is not 24 bytes or `iv` or `aad` is specified
* `aes-256-ecb` mode and `key` is not 32 bytes or `iv` or `aad` is specified
* `aes-128-cbc` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-192-cbc` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-256-cbc` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-128-cfb1` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-192-cfb1` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-256-cfb1` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-128-cfb8` mode and `key` is not 16 bytes and if specified `iv` is not 16 bytes
* `aes-192-cfb8` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-256-cfb8` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-128-cfb128` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-192-cfb128` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-256-cfb128` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-128-ofb` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-192-ofb` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-256-ofb` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes or `aad` is specified
* `aes-128-ctr` mode and `key` is not 16 bytes or if specified `iv` is not 16 bytes
* `aes-192-ctr` mode and `key` is not 24 bytes or if specified `iv` is not 16 bytes
* `aes-256-ctr` mode and `key` is not 32 bytes or if specified `iv` is not 16 bytes
#### RQ.SRS008.AES.Decrypt.Function.GCMMode.KeyAndInitializationVector.Length
version: 1.0
[ClickHouse] SHALL return an error when the `decrypt` function is called with the following parameter values
when using GCM modes
* `aes-128-gcm` mode and `key` is not 16 bytes or `iv` is not specified
* `aes-192-gcm` mode and `key` is not 24 bytes or `iv` is not specified
* `aes-256-gcm` mode and `key` is not 32 bytes or `iv` is not specified
### MySQL Specific Functions
#### RQ.SRS008.AES.MySQL.Encrypt.Function
version: 1.0
[ClickHouse] SHALL support `aes_encrypt_mysql` function to encrypt data using [AES].
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Syntax
version: 1.0
[ClickHouse] SHALL support the following syntax for the `aes_encrypt_mysql` function
```sql
aes_encrypt_mysql(mode, plaintext, key, [iv])
```
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.PlainText
version: 1.0
[ClickHouse] SHALL support `plaintext` accepting any data type as
the first parameter to the `aes_encrypt_mysql` function that SHALL specify the data to be encrypted.
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Key
version: 1.0
[ClickHouse] SHALL support `key` with `String` or `FixedString` data types
as the second parameter to the `aes_encrypt_mysql` function that SHALL specify the encryption key.
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode
version: 1.0
[ClickHouse] SHALL support `mode` with `String` or `FixedString` data types as the third parameter
to the `aes_encrypt_mysql` function that SHALL specify encryption key length and block encryption mode.
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.ValuesFormat
version: 1.0
[ClickHouse] SHALL support values of the form `aes-[key length]-[mode]` for the `mode` parameter
of the `aes_encrypt_mysql` function where
the `key_length` SHALL specifies the length of the key and SHALL accept
`128`, `192`, or `256` as the values and the `mode` SHALL specify the block encryption
mode and SHALL accept [ECB], [CBC], [CFB128], or [OFB]. For example, `aes-256-ofb`.
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.Invalid
version: 1.0
[ClickHouse] SHALL return an error if the specified value for the `mode` parameter of the `aes_encrypt_mysql`
function is not valid with the exception where such a mode is supported by the underlying
[OpenSSL] implementation.
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Values
version: 1.0
[ClickHouse] SHALL support the following [AES] block encryption modes as the value for the `mode` parameter
of the `aes_encrypt_mysql` function:
* `aes-128-ecb` that SHALL use [ECB] block mode encryption with 128 bit key
* `aes-192-ecb` that SHALL use [ECB] block mode encryption with 192 bit key
* `aes-256-ecb` that SHALL use [ECB] block mode encryption with 256 bit key
* `aes-128-cbc` that SHALL use [CBC] block mode encryption with 128 bit key
* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 192 bit key
* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 256 bit key
* `aes-128-cfb128` that SHALL use [CFB128] block mode encryption with 128 bit key
* `aes-192-cfb128` that SHALL use [CFB128] block mode encryption with 192 bit key
* `aes-256-cfb128` that SHALL use [CFB128] block mode encryption with 256 bit key
* `aes-128-ofb` that SHALL use [OFB] block mode encryption with 128 bit key
* `aes-192-ofb` that SHALL use [OFB] block mode encryption with 192 bit key
* `aes-256-ofb` that SHALL use [OFB] block mode encryption with 256 bit key
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Values.GCM.Error
version: 1.0
[ClickHouse] SHALL return an error if any of the following [GCM] modes are specified as the value
for the `mode` parameter of the `aes_encrypt_mysql` function
* `aes-128-gcm`
* `aes-192-gcm`
* `aes-256-gcm`
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Values.CTR.Error
version: 1.0
[ClickHouse] SHALL return an error if any of the following [CTR] modes are specified as the value
for the `mode` parameter of the `aes_encrypt_mysql` function
* `aes-128-ctr`
* `aes-192-ctr`
* `aes-256-ctr`
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.InitializationVector
version: 1.0
[ClickHouse] SHALL support `iv` with `String` or `FixedString` data types as the optional fourth
parameter to the `aes_encrypt_mysql` function that SHALL specify the initialization vector for block modes that require
it.
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.ReturnValue
version: 1.0
[ClickHouse] SHALL return the encrypted value of the data
using `String` data type as the result of `aes_encrypt_mysql` function.
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Key.Length.TooShortError
version: 1.0
[ClickHouse] SHALL return an error if the `key` length is less than the minimum for the `aes_encrypt_mysql`
function for a given block mode.
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Key.Length.TooLong
version: 1.0
[ClickHouse] SHALL use folding algorithm specified below if the `key` length is longer than required
for the `aes_encrypt_mysql` function for a given block mode.
```python
def fold_key(key, cipher_key_size):
key = list(key) if not isinstance(key, (list, tuple)) else key
folded_key = key[:cipher_key_size]
for i in range(cipher_key_size, len(key)):
print(i % cipher_key_size, i)
folded_key[i % cipher_key_size] ^= key[i]
return folded_key
```
#### RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.Length.TooShortError
version: 1.0
[ClickHouse] SHALL return an error if the `iv` length is specified and is less than the minimum
that is required for the `aes_encrypt_mysql` function for a given block mode.
#### RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.Length.TooLong
version: 1.0
[ClickHouse] SHALL use the first `N` bytes that are required if the `iv` is specified and
its length is longer than required for the `aes_encrypt_mysql` function for a given block mode.
#### RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.NotValidForMode
version: 1.0
[ClickHouse] SHALL return an error if the `iv` is specified for the `aes_encrypt_mysql`
function for a mode that does not need it.
#### RQ.SRS008.AES.MySQL.Encrypt.Function.Mode.KeyAndInitializationVector.Length
version: 1.0
[ClickHouse] SHALL return an error when the `aes_encrypt_mysql` function is called with the following parameter values
* `aes-128-ecb` mode and `key` is less than 16 bytes or `iv` is specified
* `aes-192-ecb` mode and `key` is less than 24 bytes or `iv` is specified
* `aes-256-ecb` mode and `key` is less than 32 bytes or `iv` is specified
* `aes-128-cbc` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes
* `aes-192-cbc` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes
* `aes-256-cbc` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes
* `aes-128-cfb1` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes
* `aes-192-cfb1` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes
* `aes-256-cfb1` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes
* `aes-128-cfb8` mode and `key` is less than 16 bytes and if specified `iv` is less than 16 bytes
* `aes-192-cfb8` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes
* `aes-256-cfb8` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes
* `aes-128-cfb128` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes
* `aes-192-cfb128` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes
* `aes-256-cfb128` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes
* `aes-128-ofb` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes
* `aes-192-ofb` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes
* `aes-256-ofb` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes
#### RQ.SRS008.AES.MySQL.Decrypt.Function
version: 1.0
[ClickHouse] SHALL support `aes_decrypt_mysql` function to decrypt data using [AES].
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Syntax
version: 1.0
[ClickHouse] SHALL support the following syntax for the `aes_decrypt_mysql` function
```sql
aes_decrypt_mysql(mode, ciphertext, key, [iv])
```
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.CipherText
version: 1.0
[ClickHouse] SHALL support `ciphertext` accepting any data type as
the first parameter to the `aes_decrypt_mysql` function that SHALL specify the data to be decrypted.
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Key
version: 1.0
[ClickHouse] SHALL support `key` with `String` or `FixedString` data types
as the second parameter to the `aes_decrypt_mysql` function that SHALL specify the encryption key.
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode
version: 1.0
[ClickHouse] SHALL support `mode` with `String` or `FixedString` data types as the third parameter
to the `aes_decrypt_mysql` function that SHALL specify encryption key length and block encryption mode.
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.ValuesFormat
version: 1.0
[ClickHouse] SHALL support values of the form `aes-[key length]-[mode]` for the `mode` parameter
of the `aes_decrypt_mysql` function where
the `key_length` SHALL specifies the length of the key and SHALL accept
`128`, `192`, or `256` as the values and the `mode` SHALL specify the block encryption
mode and SHALL accept [ECB], [CBC], [CFB128], or [OFB]. For example, `aes-256-ofb`.
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.Invalid
version: 1.0
[ClickHouse] SHALL return an error if the specified value for the `mode` parameter of the `aes_decrypt_mysql`
function is not valid with the exception where such a mode is supported by the underlying
[OpenSSL] implementation.
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Values
version: 1.0
[ClickHouse] SHALL support the following [AES] block encryption modes as the value for the `mode` parameter
of the `aes_decrypt_mysql` function:
* `aes-128-ecb` that SHALL use [ECB] block mode encryption with 128 bit key
* `aes-192-ecb` that SHALL use [ECB] block mode encryption with 192 bit key
* `aes-256-ecb` that SHALL use [ECB] block mode encryption with 256 bit key
* `aes-128-cbc` that SHALL use [CBC] block mode encryption with 128 bit key
* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 192 bit key
* `aes-192-cbc` that SHALL use [CBC] block mode encryption with 256 bit key
* `aes-128-cfb128` that SHALL use [CFB128] block mode encryption with 128 bit key
* `aes-192-cfb128` that SHALL use [CFB128] block mode encryption with 192 bit key
* `aes-256-cfb128` that SHALL use [CFB128] block mode encryption with 256 bit key
* `aes-128-ofb` that SHALL use [OFB] block mode encryption with 128 bit key
* `aes-192-ofb` that SHALL use [OFB] block mode encryption with 192 bit key
* `aes-256-ofb` that SHALL use [OFB] block mode encryption with 256 bit key
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Values.GCM.Error
version: 1.0
[ClickHouse] SHALL return an error if any of the following [GCM] modes are specified as the value
for the `mode` parameter of the `aes_decrypt_mysql` function
* `aes-128-gcm`
* `aes-192-gcm`
* `aes-256-gcm`
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Values.CTR.Error
version: 1.0
[ClickHouse] SHALL return an error if any of the following [CTR] modes are specified as the value
for the `mode` parameter of the `aes_decrypt_mysql` function
* `aes-128-ctr`
* `aes-192-ctr`
* `aes-256-ctr`
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.InitializationVector
version: 1.0
[ClickHouse] SHALL support `iv` with `String` or `FixedString` data types as the optional fourth
parameter to the `aes_decrypt_mysql` function that SHALL specify the initialization vector for block modes that require
it.
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.ReturnValue
version: 1.0
[ClickHouse] SHALL return the decrypted value of the data
using `String` data type as the result of `aes_decrypt_mysql` function.
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Key.Length.TooShortError
version: 1.0
[ClickHouse] SHALL return an error if the `key` length is less than the minimum for the `aes_decrypt_mysql`
function for a given block mode.
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Key.Length.TooLong
version: 1.0
[ClickHouse] SHALL use folding algorithm specified below if the `key` length is longer than required
for the `aes_decrypt_mysql` function for a given block mode.
```python
def fold_key(key, cipher_key_size):
key = list(key) if not isinstance(key, (list, tuple)) else key
folded_key = key[:cipher_key_size]
for i in range(cipher_key_size, len(key)):
print(i % cipher_key_size, i)
folded_key[i % cipher_key_size] ^= key[i]
return folded_key
```
#### RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.Length.TooShortError
version: 1.0
[ClickHouse] SHALL return an error if the `iv` length is specified and is less than the minimum
that is required for the `aes_decrypt_mysql` function for a given block mode.
#### RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.Length.TooLong
version: 1.0
[ClickHouse] SHALL use the first `N` bytes that are required if the `iv` is specified and
its length is longer than required for the `aes_decrypt_mysql` function for a given block mode.
#### RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.NotValidForMode
version: 1.0
[ClickHouse] SHALL return an error if the `iv` is specified for the `aes_decrypt_mysql`
function for a mode that does not need it.
#### RQ.SRS008.AES.MySQL.Decrypt.Function.Mode.KeyAndInitializationVector.Length
version: 1.0
[ClickHouse] SHALL return an error when the `aes_decrypt_mysql` function is called with the following parameter values
* `aes-128-ecb` mode and `key` is less than 16 bytes or `iv` is specified
* `aes-192-ecb` mode and `key` is less than 24 bytes or `iv` is specified
* `aes-256-ecb` mode and `key` is less than 32 bytes or `iv` is specified
* `aes-128-cbc` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes
* `aes-192-cbc` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes
* `aes-256-cbc` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes
* `aes-128-cfb1` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes
* `aes-192-cfb1` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes
* `aes-256-cfb1` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes
* `aes-128-cfb8` mode and `key` is less than 16 bytes and if specified `iv` is less than 16 bytes
* `aes-192-cfb8` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes
* `aes-256-cfb8` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes
* `aes-128-cfb128` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes
* `aes-192-cfb128` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes
* `aes-256-cfb128` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes
* `aes-128-ofb` mode and `key` is less than 16 bytes or if specified `iv` is less than 16 bytes
* `aes-192-ofb` mode and `key` is less than 24 bytes or if specified `iv` is less than 16 bytes
* `aes-256-ofb` mode and `key` is less than 32 bytes or if specified `iv` is less than 16 bytes
## References
* **GDPR:** https://en.wikipedia.org/wiki/General_Data_Protection_Regulation
* **MySQL:** https://www.mysql.com/
* **AES:** https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
* **ClickHouse:** https://clickhouse.tech
* **Git:** https://git-scm.com/
[OpenSSL]: https://www.openssl.org/
[LowCardinality]: https://clickhouse.tech/docs/en/sql-reference/data-types/lowcardinality/
[MergeTree]: https://clickhouse.tech/docs/en/engines/table-engines/mergetree-family/mergetree/
[MySQL Database Engine]: https://clickhouse.tech/docs/en/engines/database-engines/mysql/
[MySQL Table Engine]: https://clickhouse.tech/docs/en/engines/table-engines/integrations/mysql/
[MySQL Table Function]: https://clickhouse.tech/docs/en/sql-reference/table-functions/mysql/
[MySQL Dictionary]: https://clickhouse.tech/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources/#dicts-external_dicts_dict_sources-mysql
[GCM]: https://en.wikipedia.org/wiki/Galois/Counter_Mode
[CTR]: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_(CTR)
[CBC]: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_block_chaining_(CBC)
[ECB]: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_codebook_(ECB)
[CFB]: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_feedback_(CFB)
[CFB128]: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_feedback_(CFB)
[OFB]: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Output_feedback_(OFB)
[GDPR]: https://en.wikipedia.org/wiki/General_Data_Protection_Regulation
[RFC5116]: https://tools.ietf.org/html/rfc5116#section-5.1
[MySQL]: https://www.mysql.com/
[MySQL 5.7]: https://dev.mysql.com/doc/refman/5.7/en/
[MySQL aes_encrypt]: https://dev.mysql.com/doc/refman/5.7/en/encryption-functions.html#function_aes-encrypt
[MySQL aes_decrypt]: https://dev.mysql.com/doc/refman/5.7/en/encryption-functions.html#function_aes-decrypt
[AES]: https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
[ClickHouse]: https://clickhouse.tech
[GitHub repository]: https://github.com/ClickHouse/ClickHouse/blob/master/tests/testflows/aes_encryption/requirements/requirements.md
[Revision history]: https://github.com/ClickHouse/ClickHouse/commits/master/tests/testflows/aes_encryption/requirements/requirements.md
[Git]: https://git-scm.com/
[NIST test vectors]: https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program
''')
| 45.685654 | 169 | 0.709043 | 18,656 | 129,930 | 4.858062 | 0.026104 | 0.048725 | 0.066996 | 0.038132 | 0.922599 | 0.915162 | 0.898689 | 0.863282 | 0.795337 | 0.709429 | 0 | 0.055474 | 0.176164 | 129,930 | 2,843 | 170 | 45.701724 | 0.79123 | 0.001655 | 0 | 0.631287 | 1 | 0.204752 | 0.706489 | 0.205298 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.001584 | 0.000792 | 0 | 0.001584 | 0.001584 | 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 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
9a6b92d18cf2b5e98e4450d68d93b860ea01ef2d | 9,823 | py | Python | test.py | data-respons-solutions/nvram | f0e2bf13193fa7a068e52c81adb40ad73e4ce3ef | [
"MIT"
] | null | null | null | test.py | data-respons-solutions/nvram | f0e2bf13193fa7a068e52c81adb40ad73e4ce3ef | [
"MIT"
] | null | null | null | test.py | data-respons-solutions/nvram | f0e2bf13193fa7a068e52c81adb40ad73e4ce3ef | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import unittest
import tempfile
import os
import subprocess
from subprocess import CalledProcessError
def nvram(env, arglist, sys=False):
args = ['./nvram']
if sys:
args.append('--sys')
args.extend(arglist)
r = subprocess.run(args, capture_output=True, text=True, env=env, check=True)
return r.stdout
'''
USER mode
'''
class test_user_base(unittest.TestCase):
def setUp(self):
self.tmpdir = tempfile.TemporaryDirectory()
self.dir = self.tmpdir.name
self.env = {
'NVRAM_SYSTEM_A': f'{self.dir}/system_a',
'NVRAM_SYSTEM_B': f'{self.dir}/system_b',
'NVRAM_USER_A': f'{self.dir}/user_a',
'NVRAM_USER_B': f'{self.dir}/user_b',
}
self.sys = False
def tearDown(self):
self.assertFalse(os.path.isfile(self.env['NVRAM_SYSTEM_A']))
self.assertFalse(os.path.isfile(self.env['NVRAM_SYSTEM_B']))
self.tmpdir.cleanup()
def nvram_set(self, key, val):
nvram(self.env, ['set', key, val], sys=self.sys)
def nvram_get(self, key):
return nvram(self.env, ['get', key], sys=self.sys).rstrip()
def nvram_list(self):
stdout = nvram(self.env, ['list'], sys=self.sys)
return dict(pair.split("=") for pair in stdout.split())
def nvram_delete(self, key):
nvram(self.env, ['delete', key], sys=self.sys)
class test_user_set_get(test_user_base):
def test_set_get(self):
key = 'key1'
val = 'val1'
self.nvram_set(key, val)
self.assertEqual(val, self.nvram_get(key))
def test_set_get_multiple(self):
attributes = {}
for i in range(10):
key = f'key{i}'
val = f'val{i}'
attributes[key] = val
self.nvram_set(key, val)
for key, value in attributes.items():
read = self.nvram_get(key)
self.assertEqual(read, value)
def test_empty(self):
key = 'key1'
with self.assertRaises(CalledProcessError):
self.nvram_get(key)
def test_overwrite(self):
key = 'key1'
val1 = 'val1'
val2 = 'val2'
self.nvram_set(key, val1)
self.nvram_set(key, val2)
self.assertEqual(val2, self.nvram_get(key))
def test_with_prefix(self):
key = 'SYS_key1'
val = 'val1'
with self.assertRaises(CalledProcessError):
self.nvram_set(key, val)
class test_user_list(test_user_base):
def test_list(self):
attributes = {}
for i in range(10):
key = f'key{i}'
val = f'val{i}'
attributes[key] = val
self.nvram_set(key, val)
d = self.nvram_list()
self.assertEqual(d, attributes)
def test_empty(self):
d = self.nvram_list()
self.assertEqual(0, len(d))
class test_user_delete(test_user_base):
def test_delete(self):
key = 'key1'
val = 'val1'
self.nvram_set(key, val)
self.nvram_delete(key)
with self.assertRaises(CalledProcessError):
self.nvram_get(key)
def test_empty(self):
key = 'key1'
self.nvram_delete(key)
'''
SYSTEM mode (--sys)
'''
class test_system_base(test_user_base):
def setUp(self):
super().setUp()
self.sys = True
self.env['NVRAM_SYSTEM_UNLOCK'] = '16440'
def tearDown(self):
self.assertFalse(os.path.isfile(self.env['NVRAM_USER_A']))
self.assertFalse(os.path.isfile(self.env['NVRAM_USER_B']))
self.tmpdir.cleanup()
class test_system_set_get(test_system_base):
def test_set_get(self):
key = 'SYS_key1'
val = 'val1'
self.nvram_set(key, val)
self.assertEqual(val, self.nvram_get(key))
def test_set_get_multiple(self):
attributes = {}
for i in range(10):
key = f'SYS_key{i}'
val = f'val{i}'
attributes[key] = val
self.nvram_set(key, val)
for key, value in attributes.items():
read = self.nvram_get(key)
self.assertEqual(read, value)
def test_empty(self):
key = 'SYS_key1'
with self.assertRaises(CalledProcessError):
self.nvram_get(key)
def test_overwrite(self):
key = 'SYS_key1'
val1 = 'val1'
val2 = 'val2'
self.nvram_set(key, val1)
self.nvram_set(key, val2)
self.assertEqual(val2, self.nvram_get(key))
def test_without_prefix(self):
key = 'key1'
val = 'val1'
with self.assertRaises(CalledProcessError):
self.nvram_set(key, val)
def test_without_unlock(self):
key = 'SYS_key1'
val = 'val1'
self.env.pop('NVRAM_SYSTEM_UNLOCK')
with self.assertRaises(CalledProcessError):
self.nvram_set(key, val)
class test_system_list(test_system_base):
def test_list(self):
attributes = {}
for i in range(10):
key = f'SYS_key{i}'
val = f'val{i}'
attributes[key] = val
self.nvram_set(key, val)
d = self.nvram_list()
self.assertEqual(d, attributes)
def test_empty(self):
d = self.nvram_list()
self.assertEqual(0, len(d))
class test_system_delete(test_system_base):
def test_delete(self):
key = 'SYS_key1'
val = 'val1'
self.nvram_set(key, val)
self.nvram_delete(key)
with self.assertRaises(CalledProcessError):
self.nvram_get(key)
def test_empty(self):
key = 'SYS_key1'
self.nvram_delete(key)
def test_without_unlock(self):
key = 'SYS_key1'
self.env.pop('NVRAM_SYSTEM_UNLOCK')
with self.assertRaises(CalledProcessError):
self.nvram_delete(key)
'''
Mixed mode
'''
class test_mixed_base(test_user_base):
def setUp(self):
super().setUp()
self.env['NVRAM_SYSTEM_UNLOCK'] = '16440'
def tearDown(self):
self.tmpdir.cleanup()
class test_mixed_list(test_mixed_base):
def tearDown(self):
self.assertTrue(os.path.isfile(self.env['NVRAM_SYSTEM_A']))
self.assertTrue(os.path.isfile(self.env['NVRAM_SYSTEM_B']))
self.assertTrue(os.path.isfile(self.env['NVRAM_USER_A']))
self.assertTrue(os.path.isfile(self.env['NVRAM_USER_B']))
super().tearDown()
def test_list(self):
self.sys = True
attributes = {}
for i in range(10):
key = f'SYS_key{i}'
val = f'val{i}'
attributes[key] = val
self.nvram_set(key, val)
self.sys = False
for i in range(10):
key = f'key{i}'
val = f'val{i}'
attributes[key] = val
self.nvram_set(key, val)
d = self.nvram_list()
self.assertEqual(d, attributes)
class test_mixed_delete(test_mixed_base):
def tearDown(self):
self.assertTrue(os.path.isfile(self.env['NVRAM_SYSTEM_A']))
self.assertTrue(os.path.isfile(self.env['NVRAM_USER_A']))
super().tearDown()
def test_delete_user(self):
sys_key1 = 'SYS_key1'
sys_val1 = 'SYS_val1'
key1 = 'key1'
val1 = 'val1'
self.sys=True
self.nvram_set(sys_key1, sys_val1)
self.sys=False
self.nvram_set(key1, val1)
self.nvram_delete(key1)
d = self.nvram_list()
self.assertEqual(d, {sys_key1: sys_val1})
def test_system_delete(self):
sys_key1 = 'SYS_key1'
sys_val1 = 'SYS_val1'
key1 = 'key1'
val1 = 'val1'
self.sys=False
self.nvram_set(key1, val1)
self.sys=True
self.nvram_set(sys_key1, sys_val1)
self.nvram_delete(sys_key1)
self.sys=False
d = self.nvram_list()
self.assertEqual(d, {key1: val1})
class test_single_section(test_user_base):
def setUp(self):
self.tmpdir = tempfile.TemporaryDirectory()
self.dir = self.tmpdir.name
self.env = {
'NVRAM_SYSTEM_A': f'{self.dir}/system_a',
'NVRAM_SYSTEM_B': f'{self.dir}/system_b',
'NVRAM_USER_A': '',
'NVRAM_USER_B': '',
}
self.sys = False
def tearDown(self):
self.tmpdir.cleanup()
def test_single_a(self):
self.env['NVRAM_USER_A'] = f'{self.dir}/user_a'
attributes = {}
for i in range(10):
key = f'key{i}'
val = f'val{i}'
attributes[key] = val
self.nvram_set(key, val)
for key, value in attributes.items():
read = self.nvram_get(key)
self.assertEqual(read, value)
self.assertTrue(os.path.isfile(f'{self.dir}/user_a'))
self.assertFalse(os.path.isfile(f'{self.dir}/user_b'))
def test_single_b(self):
self.env['NVRAM_USER_B'] = f'{self.dir}/user_b'
attributes = {}
for i in range(10):
key = f'key{i}'
val = f'val{i}'
attributes[key] = val
self.nvram_set(key, val)
for key, value in attributes.items():
read = self.nvram_get(key)
self.assertEqual(read, value)
self.assertTrue(os.path.isfile(f'{self.dir}/user_b'))
self.assertFalse(os.path.isfile(f'{self.dir}/user_a'))
if __name__ == '__main__':
unittest.main() | 29.235119 | 81 | 0.55309 | 1,228 | 9,823 | 4.232899 | 0.074919 | 0.08484 | 0.053097 | 0.054829 | 0.812428 | 0.781839 | 0.764525 | 0.74317 | 0.714121 | 0.667372 | 0 | 0.014125 | 0.322508 | 9,823 | 336 | 82 | 29.235119 | 0.766942 | 0.001731 | 0 | 0.764925 | 0 | 0 | 0.090806 | 0 | 0 | 0 | 0 | 0 | 0.13806 | 1 | 0.149254 | false | 0 | 0.018657 | 0.003731 | 0.223881 | 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 |
7bd1f2cc994a4f48983ecafa4c6516561d64a36f | 2,403 | py | Python | portal/apps/core/migrations/0004_auto_20201115_1637.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 8 | 2020-12-15T17:11:08.000Z | 2021-12-13T22:08:33.000Z | portal/apps/core/migrations/0004_auto_20201115_1637.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 28 | 2020-12-15T17:34:03.000Z | 2022-02-01T04:09:10.000Z | portal/apps/core/migrations/0004_auto_20201115_1637.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 7 | 2020-12-15T19:59:17.000Z | 2021-11-24T16:47:06.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-11-15 16:37
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0003_auto_20201001_1240'),
]
operations = [
migrations.AddField(
model_name='publication',
name='apple_touch_icon_180',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='publication',
name='apple_touch_icon_192',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='publication',
name='apple_touch_icon_512',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='publication',
name='icon',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='publication',
name='icon_png',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='publication',
name='icon_png_16',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='publication',
name='icon_png_32',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='publication',
name='open_graph_image',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='publication',
name='subscribe_box_nl_subscribe_anon',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='publication',
name='subscribe_box_nl_subscribe_auth',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='publication',
name='subscribe_box_question',
field=models.CharField(blank=True, max_length=64, null=True),
),
]
| 33.84507 | 74 | 0.588431 | 250 | 2,403 | 5.432 | 0.244 | 0.145803 | 0.186303 | 0.218704 | 0.82106 | 0.82106 | 0.82106 | 0.793078 | 0.793078 | 0.751841 | 0 | 0.046718 | 0.296296 | 2,403 | 70 | 75 | 34.328571 | 0.756357 | 0.028714 | 0 | 0.68254 | 1 | 0 | 0.146718 | 0.045903 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.031746 | 0 | 0.079365 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
7be778f80f4c7d62c5f6b30a018c4479726b7ba6 | 11,700 | py | Python | stocks/lib_stockplot.py | biljiang/mysite | 15c0a0d7bb6bd46587f4cf805ce43f4c570de1be | [
"BSD-3-Clause"
] | null | null | null | stocks/lib_stockplot.py | biljiang/mysite | 15c0a0d7bb6bd46587f4cf805ce43f4c570de1be | [
"BSD-3-Clause"
] | null | null | null | stocks/lib_stockplot.py | biljiang/mysite | 15c0a0d7bb6bd46587f4cf805ce43f4c570de1be | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import seaborn as sns
import tushare as ts
import matplotlib.pyplot as plt
from datetime import datetime,time
#from pandas.tseries.offsets import BDay
import pandas as pd
#from pandas import DataFrame, Series
import numpy as np
from . import lib_stockselect as l_s
from statsmodels.nonparametric.kde import KDEUnivariate
#from statsmodels.nonparametric.kernel_density import KDEMultivariate
'''
def Last_BD(date = datetime.today().date()):
if date.isoweekday() in [6,7]:
date=(date - BDay(1)).date()
else:
date=(date - BDay(0)).date()
return date
def get_Ln_BD(end_date = datetime.today().date(),n_days=5):
if end_date.isoweekday() in [6,7]:
end_date=(end_date - BDay(1)).date()
else:
end_date=(end_date - BDay(0)).date()
B_day_range = pd.date_range((end_date-BDay(n_days-1)).date(), end_date,freq='B')
return B_day_range
def get_stock_nday(code = None ,date_range=None):
df = DataFrame()
for x in date_range:
data= ts.get_tick_data(code,date=x)
data['date']=x
df = pd.concat([df,data])
df['date_time']=(df.date + ' ' +df.time).apply(
lambda x: datetime.strptime(x,'%Y-%m-%d %H:%M:%S'))
df = df.set_index('date_time')
return df
'''
def stock_tick_plot(code = None, date = None):
df = ts.get_tick_data(code,date)
if len(df)==0:
return
df['date']=date
df['date_time']=(df.date + ' ' +df.time).apply(
lambda x: datetime.strptime(x,'%Y-%m-%d %H:%M:%S'))
df=df.sort_values('time')
df = df.set_index('date_time')
df_B = df[df.type == '买盘']
df_S = df[df.type == '卖盘']
f1=plt.figure('volume')
df.volume.plot()
f2=plt.figure('price')
df.price.plot()
f3=plt.figure('dist')
if len(df_B)!= 0 :
sns.kdeplot(np.log10(df_B.amount), bw=0.1,color='orange')
if len(df_S)!= 0 :
sns.kdeplot(np.log10(df_S.amount), bw=0.1,color='green')
plt.close('all')
return df,f1,f2,f3
'''
def stock_dt(code = None, date = None, pause =0):
df = ts.get_tick_data(code,date,pause=pause)
if (len(df)==0) | (df.price.isnull().all()):
print('None data gotten!')
return
df['date']=date
df['date_time']=(df.date + ' ' +df.time).apply(
lambda x: datetime.strptime(x,'%Y-%m-%d %H:%M:%S'))
df=df.sort_values('time')
df = df.set_index('date_time')
return df
'''
def kde_plot(x,weights,bw=0.02,color= None,ratio =1.0):
x_grid = np.arange(x.min()-0.5, x.max()+0.5 , 0.02)
kde=KDEUnivariate(x)
kde.fit(bw=bw,fft= False, weights=weights)
x_value = kde.evaluate(x_grid)*ratio
plt.plot(x_grid,x_value,color=color)
return
def axes_kde_plot(x,weights,bw=0.02,color= None,ratio =1.0,axes = None):
x_grid = np.arange(x.min()-0.5, x.max()+0.5 , 0.02)
kde=KDEUnivariate(x)
kde.fit(bw=bw,fft= False, weights=weights)
x_value = kde.evaluate(x_grid)*ratio
axes.plot(x_grid,x_value,color=color)
return
def stock_dt_plot(code = None, date = None):
try:
df = pd.read_hdf('../dtdb/zxs'+code+'.h5',('d'+date.replace('-','_')))
except:
try:
df = l_s.stock_dt(code= code, date=date)
except:
print('Getting data failed!')
return
df=df[df.time.duplicated().apply(lambda x: not x)]
df_B = df[df.type == '买盘']
df_B = df_B[df_B.amount != 0]
df_S = df[df.type == '卖盘']
df_S = df_S[df_S.amount != 0]
# plot price detail-------------------
f1, axes = plt.subplots(2, 1,sharex=True,
gridspec_kw = {'height_ratios':[2, 1]},
num='Stock Daily Details')
f1.suptitle('Stock '+code+' on '+date)
f1.subplots_adjust(hspace=0.02)
try:
axes[0].plot(df.price)
#axes[0].set_xticklabels([])
axes[0].set_xlabel('')
data_B = pd.concat([df.time,df_B.volume],axis =1)
data_B = data_B.fillna(0.0)
axes[1].plot(data_B.volume,color='orange',alpha =0.5)
#data_B.volume.plot(color='orange',alpha =0.3)
data_S = pd.concat([df.time,df_S.volume],axis =1)
data_S = data_S.fillna(0.0)
axes[1].plot(data_S.volume,color='green',alpha =0.3)
#data_S.volume.plot(color='green',alpha =0.3)
except:
pass
# plot price distribution--------------------
f2=plt.figure('Price Distribution')
ax1=f2.add_subplot(1,1,1)
ax1.set_title('Price Distribution of '+code+' on '+date)
B_total =0; S_total = 0; amount_total=df.amount.sum()
if len(df_B)!= 0 :
B_total=df_B.amount.sum()
wght_B=np.array([x/B_total for x in df_B.amount])
kde_plot(df_B.price,wght_B,color='orange',ratio = B_total/amount_total)
if len(df_S)!= 0 :
S_total = df_S.amount.sum()
wght_S=np.array([x/S_total for x in df_S.amount])
kde_plot(df_S.price,wght_S,color='green',ratio = S_total/amount_total)
# plot amount distribution-----------------------
f3=plt.figure('dist_amount')
ax2=f3.add_subplot(1,1,1)
ax2.set_title('Amount Distribution of '+code+' on '+date)
B_total =0; S_total = 0; amount_total=df.amount.sum()
if len(df_B)!= 0 :
B_total=df_B.amount.sum()
wght_B=np.array([x/B_total for x in df_B.amount])
kde_plot(np.log10(df_B.amount),wght_B,bw=0.1,color='orange',ratio = B_total/amount_total)
#sns.kdeplot(np.log10(df_B.amount), bw=0.1,color='orange')
if len(df_S)!= 0 :
S_total = df_S.amount.sum()
wght_S=np.array([x/S_total for x in df_S.amount])
kde_plot(np.log10(df_S.amount),wght_S,bw=0.1,color='green',ratio = S_total/amount_total)
#sns.kdeplot(np.log10(df_S.amount), bw=0.1,color='green')
plt.close('all')
return df,df_B,df_S,f1,f2,f3
'''
### get today data--------------------
def stock_today(code = None, pause =0):
df = ts.get_today_ticks(code,pause=pause)
if (len(df)==0) | (df.price.isnull().all()):
print('No data gotten!')
return
df['date']=str(datetime.today().date())
df['date_time']=(df.date + ' ' +df.time).apply(
lambda x: datetime.strptime(x,'%Y-%m-%d %H:%M:%S'))
df=df.sort_values('time')
df = df.set_index('date_time')
return df
'''
def stock_today_plot(code = None,date = None):
try:
df = pd.read_hdf('../dtdb/d'+date.replace('-','_')+'.h5','zxs'+code)
except:
try:
df = l_s.stock_today(code)
except:
print('Getting data failed!')
return
df=df[df.time.duplicated().apply(lambda x: not x)]
df_B = df[df.type == '买盘']
df_B = df_B[df_B.amount != 0]
df_S = df[df.type == '卖盘']
df_S = df_S[df_S.amount != 0]
f1, axes = plt.subplots(2, 1,sharex=True,
gridspec_kw = {'height_ratios':[2, 1]},
num = 'Stock Daily Details')
f1.suptitle('Stock '+code+' on '+date)
f1.subplots_adjust(hspace=0.02)
try:
axes[0].plot(df.price)
axes[0].set_xlabel('')
data_B = pd.concat([df.time,df_B.volume],axis =1)
data_B = data_B.fillna(0.0)
axes[1].plot(data_B.volume,color='orange',alpha =0.5)
data_S = pd.concat([df.time,df_S.volume],axis =1)
data_S = data_S.fillna(0.0)
axes[1].plot(data_S.volume,color='green',alpha =0.3)
except:
pass
f2=plt.figure('Price Distribution')
ax1=f2.add_subplot(1,1,1)
ax1.set_title('Price Distribution of '+code+' on '+date)
B_total =0; S_total = 0; amount_total=df.amount.sum()
if len(df_B)!= 0 :
B_total=df_B.amount.sum()
wght_B=np.array([x/B_total for x in df_B.amount])
kde_plot(df_B.price,wght_B,color='orange',ratio = B_total/amount_total)
if len(df_S)!= 0 :
S_total = df_S.amount.sum()
wght_S=np.array([x/S_total for x in df_S.amount])
kde_plot(df_S.price,wght_S,color='green',ratio = S_total/amount_total)
# plot amount distribution-----------------------
f3=plt.figure('dist_amount')
ax2=f3.add_subplot(1,1,1)
ax2.set_title('Amount Distribution of '+code+' on '+date)
B_total =0; S_total = 0; amount_total=df.amount.sum()
if len(df_B)!= 0 :
B_total=df_B.amount.sum()
wght_B=np.array([x/B_total for x in df_B.amount])
kde_plot(np.log10(df_B.amount),wght_B,bw=0.1,color='orange',ratio = B_total/amount_total)
#sns.kdeplot(np.log10(df_B.amount), bw=0.1,color='orange')
if len(df_S)!= 0 :
S_total = df_S.amount.sum()
wght_S=np.array([x/S_total for x in df_S.amount])
kde_plot(np.log10(df_S.amount),wght_S,bw=0.1,color='green',ratio = S_total/amount_total)
#sns.kdeplot(np.log10(df_S.amount), bw=0.1,color='green')
plt.close('all')
return df,df_B,df_S,f1,f2,f3
def stockDF_plot(df=None,code=None,date=None):
df=df[(df.index>=time(9,30,0)) & (df.index <=time(15,0,0))]
df=df[df.volume != 0]
df=df[df.time.duplicated().apply(lambda x: not x)]
df_B = df[df.type == '买盘']
df_B = df_B[df_B.amount != 0]
df_S = df[df.type == '卖盘']
df_S = df_S[df_S.amount != 0]
f1, axes = plt.subplots(2, 1,sharex=True,
gridspec_kw = {'height_ratios':[2, 1]},
num = 'Stock Daily Details')
f1.suptitle('Stock '+code+' on '+date)
f1.subplots_adjust(hspace=0.02)
try:
axes[0].plot(df.price)
axes[0].set_xlabel('')
data_B = pd.concat([df.time,df_B.volume],axis =1)
data_B = data_B.fillna(0.0)
axes[1].plot(data_B.volume,color='orange',alpha =0.5)
data_S = pd.concat([df.time,df_S.volume],axis =1)
data_S = data_S.fillna(0.0)
axes[1].plot(data_S.volume,color='green',alpha =0.3)
except:
pass
f2=plt.figure('Price Distribution')
ax1=f2.add_subplot(1,1,1)
ax1.set_title('Price Distribution of '+code+' on '+date)
B_total =0; S_total = 0; amount_total=df.amount.sum()
if len(df_B)!= 0 :
B_total=df_B.amount.sum()
wght_B=np.array([x/B_total for x in df_B.amount])
kde_plot(df_B.price,wght_B,color='orange',ratio = B_total/amount_total)
if len(df_S)!= 0 :
S_total = df_S.amount.sum()
wght_S=np.array([x/S_total for x in df_S.amount])
kde_plot(df_S.price,wght_S,color='green',ratio = S_total/amount_total)
# plot amount distribution-----------------------
f3=plt.figure('dist_amount')
ax2=f3.add_subplot(1,1,1)
ax2.set_title('Amount Distribution of '+code+' on '+date)
B_total =0; S_total = 0; amount_total=df.amount.sum()
if len(df_B)!= 0 :
B_total=df_B.amount.sum()
wght_B=np.array([x/B_total for x in df_B.amount])
kde_plot(np.log10(df_B.amount),wght_B,bw=0.1,color='orange',ratio = B_total/amount_total)
#sns.kdeplot(np.log10(df_B.amount), bw=0.1,color='orange')
if len(df_S)!= 0 :
S_total = df_S.amount.sum()
wght_S=np.array([x/S_total for x in df_S.amount])
kde_plot(np.log10(df_S.amount),wght_S,bw=0.1,color='green',ratio = S_total/amount_total)
#sns.kdeplot(np.log10(df_S.amount), bw=0.1,color='green')
plt.close('all')
return df,df_B,df_S,f1,f2,f3
| 38.360656 | 98 | 0.577265 | 1,915 | 11,700 | 3.354569 | 0.093995 | 0.022416 | 0.030822 | 0.019614 | 0.833593 | 0.804328 | 0.789384 | 0.775685 | 0.775685 | 0.7651 | 0 | 0.0309 | 0.244872 | 11,700 | 304 | 99 | 38.486842 | 0.696208 | 0.077179 | 0 | 0.820388 | 0 | 0 | 0.073806 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.029126 | false | 0.014563 | 0.038835 | 0 | 0.11165 | 0.009709 | 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 |
d01b5cfe212abc0af9d23fa5e5be648577e5f76e | 16,207 | py | Python | psono/administration/tests/group.py | dirigeant/psono-server | a18c5b3c4d8bbbe4ecf1615b210d99fb77752205 | [
"Apache-2.0",
"CC0-1.0"
] | 48 | 2018-04-19T15:50:58.000Z | 2022-01-23T15:58:11.000Z | psono/administration/tests/group.py | dirigeant/psono-server | a18c5b3c4d8bbbe4ecf1615b210d99fb77752205 | [
"Apache-2.0",
"CC0-1.0"
] | 9 | 2018-09-13T14:56:18.000Z | 2020-01-17T16:44:33.000Z | psono/administration/tests/group.py | dirigeant/psono-server | a18c5b3c4d8bbbe4ecf1615b210d99fb77752205 | [
"Apache-2.0",
"CC0-1.0"
] | 11 | 2019-09-20T11:53:47.000Z | 2021-07-18T22:41:31.000Z | from django.urls import reverse
from django.conf import settings
from django.contrib.auth.hashers import make_password
from rest_framework import status
import random
import string
import binascii
import os
from restapi import models
from restapi.tests.base import APITestCaseExtended
class ReadGroupTests(APITestCaseExtended):
def setUp(self):
self.test_email = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test1@example.com'
self.test_email2 = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test2@example.com'
self.test_email_bcrypt = 'a'
self.test_email_bcrypt2 = 'b'
self.test_username = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test1@psono.pw'
self.test_username2 = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test2@psono.pw'
self.test_authkey = binascii.hexlify(os.urandom(settings.AUTH_KEY_LENGTH_BYTES)).decode()
self.test_public_key = binascii.hexlify(os.urandom(settings.USER_PUBLIC_KEY_LENGTH_BYTES)).decode()
self.test_private_key = binascii.hexlify(os.urandom(settings.USER_PRIVATE_KEY_LENGTH_BYTES)).decode()
self.test_private_key_nonce = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_private_key_nonce2 = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_secret_key = binascii.hexlify(os.urandom(settings.USER_SECRET_KEY_LENGTH_BYTES)).decode()
self.test_secret_key_nonce = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_secret_key_nonce2 = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_user_sauce = '6df1f310730e5464ce23e05fa4eca0de3fe30805fc8cc1d6b37389262e4bd9c3'
self.test_user_obj = models.User.objects.create(
email=self.test_email,
email_bcrypt=self.test_email_bcrypt,
username=self.test_username,
authkey=make_password(self.test_authkey),
public_key=self.test_public_key,
private_key=self.test_private_key,
private_key_nonce=self.test_private_key_nonce,
secret_key=self.test_secret_key,
secret_key_nonce=self.test_secret_key_nonce,
user_sauce=self.test_user_sauce,
is_email_active=True
)
self.test_group_obj = models.Group.objects.create(
name = 'Test Group',
public_key = 'a123',
)
self.test_group_ob2 = models.Group.objects.create(
name = 'Test Group',
public_key = 'a123',
)
self.admin = models.User.objects.create(
email=self.test_email2,
email_bcrypt=self.test_email_bcrypt2,
username=self.test_username2,
authkey=make_password(self.test_authkey),
public_key=self.test_public_key,
private_key=self.test_private_key,
private_key_nonce=self.test_private_key_nonce2,
secret_key=self.test_secret_key,
secret_key_nonce=self.test_secret_key_nonce2,
user_sauce=self.test_user_sauce,
is_email_active=True,
is_superuser=True
)
def test_read_specific_group_success(self):
"""
Tests GET method on a specific group
"""
url = reverse('admin_group', kwargs={'group_id': str(self.test_group_obj.id)})
data = {
}
self.client.force_authenticate(user=self.admin)
response = self.client.get(url, data)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_read_specific_group_failure_not_exist(self):
"""
Tests GET method on a specific group
"""
url = reverse('admin_group', kwargs={'group_id': '6fdbe7bb-b93f-4ef5-817d-7ef9aa7dd9de'})
data = {
}
self.client.force_authenticate(user=self.admin)
response = self.client.get(url, data)
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
def test_read_specific_group_failure_no_admin_rights(self):
"""
Tests GET method on group
"""
url = reverse('admin_group')
data = {
'group_id': self.test_group_obj.id
}
self.client.force_authenticate(user=self.test_user_obj)
response = self.client.get(url, data)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_read_group_success(self):
"""
Tests GET method on group
"""
url = reverse('admin_group')
data = {
}
self.client.force_authenticate(user=self.admin)
response = self.client.get(url, data)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(len(response.data['groups']), 2)
def test_read_group_failure_without_admin_privileges(self):
"""
Tests GET method on group
"""
url = reverse('admin_group')
data = {
}
self.client.force_authenticate(user=self.test_user_obj)
response = self.client.get(url, data)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
class CreateGroupTests(APITestCaseExtended):
def setUp(self):
self.test_email = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test1@example.com'
self.test_email2 = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test2@example.com'
self.test_email_bcrypt = 'a'
self.test_email_bcrypt2 = 'b'
self.test_username = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test1@psono.pw'
self.test_username2 = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test2@psono.pw'
self.test_authkey = binascii.hexlify(os.urandom(settings.AUTH_KEY_LENGTH_BYTES)).decode()
self.test_public_key = binascii.hexlify(os.urandom(settings.USER_PUBLIC_KEY_LENGTH_BYTES)).decode()
self.test_private_key = binascii.hexlify(os.urandom(settings.USER_PRIVATE_KEY_LENGTH_BYTES)).decode()
self.test_private_key_nonce = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_private_key_nonce2 = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_secret_key = binascii.hexlify(os.urandom(settings.USER_SECRET_KEY_LENGTH_BYTES)).decode()
self.test_secret_key_nonce = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_secret_key_nonce2 = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_user_sauce = '6df1f310730e5464ce23e05fa4eca0de3fe30805fc8cc1d6b37389262e4bd9c3'
self.test_user_obj = models.User.objects.create(
email=self.test_email,
email_bcrypt=self.test_email_bcrypt,
username=self.test_username,
authkey=make_password(self.test_authkey),
public_key=self.test_public_key,
private_key=self.test_private_key,
private_key_nonce=self.test_private_key_nonce,
secret_key=self.test_secret_key,
secret_key_nonce=self.test_secret_key_nonce,
user_sauce=self.test_user_sauce,
is_email_active=True
)
self.admin = models.User.objects.create(
email=self.test_email2,
email_bcrypt=self.test_email_bcrypt2,
username=self.test_username2,
authkey=make_password(self.test_authkey),
public_key=self.test_public_key,
private_key=self.test_private_key,
private_key_nonce=self.test_private_key_nonce2,
secret_key=self.test_secret_key,
secret_key_nonce=self.test_secret_key_nonce2,
user_sauce=self.test_user_sauce,
is_email_active=True,
is_superuser=True
)
def test_create_group(self):
"""
Tests POST method on group
"""
url = reverse('admin_group')
data = {
}
self.client.force_authenticate(user=self.admin)
response = self.client.post(url, data)
self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
class UpdateGroupTests(APITestCaseExtended):
def setUp(self):
self.test_email = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test1@example.com'
self.test_email2 = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test2@example.com'
self.test_email_bcrypt = 'a'
self.test_email_bcrypt2 = 'b'
self.test_username = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test1@psono.pw'
self.test_username2 = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test2@psono.pw'
self.test_authkey = binascii.hexlify(os.urandom(settings.AUTH_KEY_LENGTH_BYTES)).decode()
self.test_public_key = binascii.hexlify(os.urandom(settings.USER_PUBLIC_KEY_LENGTH_BYTES)).decode()
self.test_private_key = binascii.hexlify(os.urandom(settings.USER_PRIVATE_KEY_LENGTH_BYTES)).decode()
self.test_private_key_nonce = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_private_key_nonce2 = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_secret_key = binascii.hexlify(os.urandom(settings.USER_SECRET_KEY_LENGTH_BYTES)).decode()
self.test_secret_key_nonce = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_secret_key_nonce2 = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_user_sauce = '6df1f310730e5464ce23e05fa4eca0de3fe30805fc8cc1d6b37389262e4bd9c3'
self.test_user_obj = models.User.objects.create(
email=self.test_email,
email_bcrypt=self.test_email_bcrypt,
username=self.test_username,
authkey=make_password(self.test_authkey),
public_key=self.test_public_key,
private_key=self.test_private_key,
private_key_nonce=self.test_private_key_nonce,
secret_key=self.test_secret_key,
secret_key_nonce=self.test_secret_key_nonce,
user_sauce=self.test_user_sauce,
is_email_active=True
)
self.admin = models.User.objects.create(
email=self.test_email2,
email_bcrypt=self.test_email_bcrypt2,
username=self.test_username2,
authkey=make_password(self.test_authkey),
public_key=self.test_public_key,
private_key=self.test_private_key,
private_key_nonce=self.test_private_key_nonce2,
secret_key=self.test_secret_key,
secret_key_nonce=self.test_secret_key_nonce2,
user_sauce=self.test_user_sauce,
is_email_active=True,
is_superuser=True
)
def test_update_group(self):
"""
Tests PUT method on group
"""
url = reverse('admin_group')
data = {
}
self.client.force_authenticate(user=self.admin)
response = self.client.put(url, data)
self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
class DeleteGroupTests(APITestCaseExtended):
def setUp(self):
self.test_email = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test1@example.com'
self.test_email2 = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test2@example.com'
self.test_email_bcrypt = 'a'
self.test_email_bcrypt2 = 'b'
self.test_username = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test1@psono.pw'
self.test_username2 = ''.join(random.choice(string.ascii_lowercase) for _ in range(10)) + 'test2@psono.pw'
self.test_authkey = binascii.hexlify(os.urandom(settings.AUTH_KEY_LENGTH_BYTES)).decode()
self.test_public_key = binascii.hexlify(os.urandom(settings.USER_PUBLIC_KEY_LENGTH_BYTES)).decode()
self.test_private_key = binascii.hexlify(os.urandom(settings.USER_PRIVATE_KEY_LENGTH_BYTES)).decode()
self.test_private_key_nonce = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_private_key_nonce2 = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_secret_key = binascii.hexlify(os.urandom(settings.USER_SECRET_KEY_LENGTH_BYTES)).decode()
self.test_secret_key_nonce = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_secret_key_nonce2 = binascii.hexlify(os.urandom(settings.NONCE_LENGTH_BYTES)).decode()
self.test_user_sauce = '6df1f310730e5464ce23e05fa4eca0de3fe30805fc8cc1d6b37389262e4bd9c3'
self.test_user_obj = models.User.objects.create(
email=self.test_email,
email_bcrypt=self.test_email_bcrypt,
username=self.test_username,
authkey=make_password(self.test_authkey),
public_key=self.test_public_key,
private_key=self.test_private_key,
private_key_nonce=self.test_private_key_nonce,
secret_key=self.test_secret_key,
secret_key_nonce=self.test_secret_key_nonce,
user_sauce=self.test_user_sauce,
is_email_active=True
)
self.admin = models.User.objects.create(
email=self.test_email2,
email_bcrypt=self.test_email_bcrypt2,
username=self.test_username2,
authkey=make_password(self.test_authkey),
public_key=self.test_public_key,
private_key=self.test_private_key,
private_key_nonce=self.test_private_key_nonce2,
secret_key=self.test_secret_key,
secret_key_nonce=self.test_secret_key_nonce2,
user_sauce=self.test_user_sauce,
is_email_active=True,
is_superuser=True
)
self.test_group_obj = models.Group.objects.create(
name = 'Test Group',
public_key = 'a123',
)
self.test_group_ob2 = models.Group.objects.create(
name = 'Test Group',
public_key = 'a123',
)
def test_delete_group_success(self):
"""
Tests DELETE method on group
"""
url = reverse('admin_group')
data = {
'group_id': self.test_group_obj.id
}
self.client.force_authenticate(user=self.admin)
response = self.client.delete(url, data)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(models.Duo.objects.all().count(), 0)
def test_delete_group_failure_no_admin(self):
"""
Tests DELETE method on group without being an admin
"""
url = reverse('admin_group')
data = {
'group_id': self.test_group_obj.id
}
self.client.force_authenticate(user=self.test_user_obj)
response = self.client.delete(url, data)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_delete_group_failure_no_group_id(self):
"""
Tests DELETE method on group without a group id
"""
url = reverse('admin_group')
data = {
}
self.client.force_authenticate(user=self.admin)
response = self.client.delete(url, data)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
def test_delete_group_failure_group_id_not_exist(self):
"""
Tests DELETE method on group with a group id that does not exist
"""
url = reverse('admin_group')
data = {
'group_id': '499d3c84-e8ae-4a6b-a4c2-43c79beb069a'
}
self.client.force_authenticate(user=self.admin)
response = self.client.delete(url, data)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) | 40.116337 | 114 | 0.676128 | 2,002 | 16,207 | 5.15035 | 0.071928 | 0.12026 | 0.052759 | 0.074484 | 0.935506 | 0.930172 | 0.91543 | 0.903307 | 0.903307 | 0.903307 | 0 | 0.025492 | 0.225458 | 16,207 | 404 | 115 | 40.116337 | 0.795905 | 0.024557 | 0 | 0.803509 | 0 | 0 | 0.052391 | 0.021085 | 0 | 0 | 0 | 0 | 0.045614 | 1 | 0.052632 | false | 0.031579 | 0.035088 | 0 | 0.101754 | 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 |
ef996b7df9d088ff7fd9b9e2db08f6d701ed9ced | 8,697 | py | Python | models/xception.py | sugaok/my-deep-learning-base | c98c37cf0a5b3cfa5929ebb80aa47bdade4f853f | [
"MIT"
] | 1 | 2019-11-21T12:39:42.000Z | 2019-11-21T12:39:42.000Z | models/xception.py | sugaok/my-deep-learning-base | c98c37cf0a5b3cfa5929ebb80aa47bdade4f853f | [
"MIT"
] | null | null | null | models/xception.py | sugaok/my-deep-learning-base | c98c37cf0a5b3cfa5929ebb80aa47bdade4f853f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""TensorFlow Kerasのモデル"""
from tensorflow import keras
def model_xception_keras(input_shape: tuple, num_classes: int) -> keras.Model:
"""
Keras Applicationsに用意されているXceptionを読み込む。
Xception: Deep Learning with Depthwise Separable Convolutions
François Chollet
https://arxiv.org/abs/1610.02357
Args:
input_shape tuple:
入力の形状を指定する。
num_classes int:
分類するクラス数を指定する。
Returns:
keras.Model:
Xceptionを返す。
"""
return keras.applications.xception.Xception(
include_top=True,
weights=None,
input_tensor=None,
input_shape=input_shape,
pooling=None,
classes=num_classes
)
def model_xception(input_shape: tuple, num_classes: int, entry=True, middle=True) -> keras.Model:
"""
Xceptionを読み込む。
Xception: Deep Learning with Depthwise Separable Convolutions
François Chollet
https://arxiv.org/abs/1610.02357
Args:
input_shape tuple:
入力の形状を指定する。
num_classes int:
分類するクラス数を指定する。
Returns:
keras.Model:
Xceptionを返す。
"""
# Input
inputs = keras.layers.Input(shape=input_shape)
x = inputs
if entry:
# Entry Flow
x = keras.layers.Conv2D(32, 3, 2)(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.Conv2D(64, 3)(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
res = keras.layers.Conv2D(128, 1, 2, padding='valid')(x)
res = keras.layers.BatchNormalization()(res)
x = keras.layers.SeparableConv2D(128, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv2D(128, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.MaxPool2D(3, 2, padding='same')(x)
x = keras.layers.Add()([x, res])
res = keras.layers.Conv2D(256, 1, 2, padding='valid')(x)
res = keras.layers.BatchNormalization()(res)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv2D(256, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv2D(256, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.MaxPool2D(3, 2, padding='same')(x)
x = keras.layers.Add()([x, res])
res = keras.layers.Conv2D(728, 1, 2, padding='valid')(x)
res = keras.layers.BatchNormalization()(res)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv2D(728, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv2D(728, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.MaxPool2D(3, 2, padding='same')(x)
x = keras.layers.Add()([x, res])
else:
x = keras.layers.Conv2D(728, 1, 1, 'same')(x)
if middle:
# Middle Flow
for i in range(8):
res = x
x = keras.layers.SeparableConv2D(728, 3, padding='same', name='middle_sepconv1_%d' % (i + 1))(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.SeparableConv2D(728, 3, padding='same', name='middle_sepconv2_%d' % (i + 1))(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.SeparableConv2D(728, 3, padding='same', name='middle_sepconv3_%d' % (i + 1))(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.Add()([x, res])
# Exit Flow
res = keras.layers.Conv2D(1024, 1, 2, padding='valid')(x)
res = keras.layers.BatchNormalization()(res)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv2D(728, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv2D(1024, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.MaxPool2D(3, 2, padding='same')(x)
x = keras.layers.Add()([x, res])
x = keras.layers.SeparableConv2D(1536, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv2D(2048, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.GlobalAveragePooling2D()(x)
outputs = keras.layers.Dense(num_classes, activation='softmax')(x)
return keras.Model(inputs=inputs, outputs=outputs)
def model_xception_1d(shape: tuple, classes: int) -> keras.Model:
"""
一次元版のXceptionを読み込む。
Xception: Deep Learning with Depthwise Separable Convolutions
François Chollet
https://arxiv.org/abs/1610.02357
Args:
shape tuple:
入力の形状を指定する。
classes int:
分類するクラス数を指定する。
Returns:
keras.Model:
Xceptionを返す。
"""
# Input
inputs = keras.layers.Input(shape=shape)
x = inputs
# Entry Flow
x = keras.layers.Conv1D(32, 3, 2)(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.Conv1D(64, 3)(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
res = keras.layers.Conv1D(128, 1, 2, padding='valid')(x)
res = keras.layers.BatchNormalization()(res)
x = keras.layers.SeparableConv1D(128, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv1D(128, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.MaxPool1D(3, 2, padding='same')(x)
x = keras.layers.Add()([x, res])
res = keras.layers.Conv1D(256, 1, 2, padding='valid')(x)
res = keras.layers.BatchNormalization()(res)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv1D(256, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv1D(256, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.MaxPool1D(3, 2, padding='same')(x)
x = keras.layers.Add()([x, res])
res = keras.layers.Conv1D(728, 1, 2, padding='valid')(x)
res = keras.layers.BatchNormalization()(res)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv1D(728, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv1D(728, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.MaxPool1D(3, 2, padding='same')(x)
x = keras.layers.Add()([x, res])
# Middle Flow
for i in range(8):
res = x
x = keras.layers.SeparableConv1D(728, 3, padding='same', name='middle_sepconv1_%d' % (i + 1))(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.SeparableConv1D(728, 3, padding='same', name='middle_sepconv2_%d' % (i + 1))(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.SeparableConv1D(728, 3, padding='same', name='middle_sepconv3_%d' % (i + 1))(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.Add()([x, res])
# Exit Flow
res = keras.layers.Conv1D(1024, 1, 2, padding='valid')(x)
res = keras.layers.BatchNormalization()(res)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv1D(728, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv1D(1024, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.MaxPool1D(3, 2, padding='same')(x)
x = keras.layers.Add()([x, res])
x = keras.layers.SeparableConv1D(1536, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.SeparableConv1D(2048, 3, padding='same')(x)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.ReLU()(x)
x = keras.layers.GlobalAveragePooling1D()(x)
outputs = keras.layers.Dense(classes, activation='softmax')(x)
return keras.Model(inputs=inputs, outputs=outputs, name="xception_1d")
| 32.451493 | 109 | 0.595493 | 1,069 | 8,697 | 4.813845 | 0.090739 | 0.262923 | 0.240187 | 0.227361 | 0.891566 | 0.864166 | 0.853284 | 0.853284 | 0.853284 | 0.853284 | 0 | 0.042879 | 0.249166 | 8,697 | 267 | 110 | 32.573034 | 0.745176 | 0.109463 | 0 | 0.671233 | 0 | 0 | 0.042953 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.020548 | false | 0 | 0.006849 | 0 | 0.047945 | 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 |
efb4a7d38451e1018b20e93719eab8ae9e760647 | 3,457 | py | Python | downloadbot_common/retry/tests/test_stop_strategies.py | dnguyen0304/downloadbot.common | 25b3ef3d09764e9f8d7969c692b1e6bb87ff24d5 | [
"MIT"
] | null | null | null | downloadbot_common/retry/tests/test_stop_strategies.py | dnguyen0304/downloadbot.common | 25b3ef3d09764e9f8d7969c692b1e6bb87ff24d5 | [
"MIT"
] | null | null | null | downloadbot_common/retry/tests/test_stop_strategies.py | dnguyen0304/downloadbot.common | 25b3ef3d09764e9f8d7969c692b1e6bb87ff24d5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from nose.tools import assert_false, raises
from .. import exceptions, stop_strategies
from ..attempt import Attempt
@raises(exceptions.MaximumRetry)
def test_after_attempt_greater_than_threshold_should_stop():
maximum_attempt = 1
stop_strategy = stop_strategies.AfterAttempt(
maximum_attempt=maximum_attempt)
attempt = Attempt(number=maximum_attempt + 1,
was_successful=None,
result=None,
exception=None,
first_attempt_start_time=None)
stop_strategy.should_stop(attempt=attempt)
def test_after_attempt_equal_to_threshold_should_not_stop():
maximum_attempt = 1
stop_strategy = stop_strategies.AfterAttempt(
maximum_attempt=maximum_attempt)
attempt = Attempt(number=maximum_attempt,
was_successful=None,
result=None,
exception=None,
first_attempt_start_time=None)
assert_false(stop_strategy.should_stop(attempt=attempt))
def test_after_attempt_less_than_threshold_should_not_stop():
maximum_attempt = 1
stop_strategy = stop_strategies.AfterAttempt(
maximum_attempt=maximum_attempt)
attempt = Attempt(number=maximum_attempt - 1,
was_successful=None,
result=None,
exception=None,
first_attempt_start_time=None)
assert_false(stop_strategy.should_stop(attempt=attempt))
@raises(exceptions.MaximumRetry)
def test_after_duration_greater_than_maximum_duration_should_stop():
maximum_duration = 1
stop_strategy = stop_strategies.AfterDuration(
maximum_duration=maximum_duration,
_get_now_in_seconds=lambda: maximum_duration + 1)
attempt = Attempt(number=None,
was_successful=None,
result=None,
exception=None,
first_attempt_start_time=0)
stop_strategy.should_stop(attempt=attempt)
@raises(exceptions.MaximumRetry)
def test_after_duration_equal_to_maximum_duration_should_stop():
maximum_duration = 1
stop_strategy = stop_strategies.AfterDuration(
maximum_duration=maximum_duration,
_get_now_in_seconds=lambda: maximum_duration)
attempt = Attempt(number=None,
was_successful=None,
result=None,
exception=None,
first_attempt_start_time=0)
stop_strategy.should_stop(attempt=attempt)
def test_after_duration_less_than_maximum_duration_should_not_stop():
maximum_duration = 1
stop_strategy = stop_strategies.AfterDuration(
maximum_duration=maximum_duration,
_get_now_in_seconds=lambda: maximum_duration - 1)
attempt = Attempt(number=None,
was_successful=None,
result=None,
exception=None,
first_attempt_start_time=0)
assert_false(stop_strategy.should_stop(attempt=attempt))
def test_after_never_should_not_stop():
stop_strategy = stop_strategies.AfterNever()
attempt = Attempt(number=None,
was_successful=None,
result=None,
exception=None,
first_attempt_start_time=None)
assert_false(stop_strategy.should_stop(attempt=attempt))
| 33.892157 | 69 | 0.655192 | 362 | 3,457 | 5.839779 | 0.135359 | 0.112583 | 0.039735 | 0.086093 | 0.87843 | 0.87843 | 0.87843 | 0.856197 | 0.856197 | 0.85052 | 0 | 0.005629 | 0.28059 | 3,457 | 101 | 70 | 34.227723 | 0.844391 | 0.006075 | 0 | 0.779221 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.064935 | 1 | 0.090909 | false | 0 | 0.038961 | 0 | 0.12987 | 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 |
efd19bd8f0a7ce3379f8cf8c97d47ad847f622e0 | 167 | py | Python | src/main/resources/script/cmdmap.py | wangyues/spring-dev | b261ad08689375ff274cb8bfde62c0217ec5384b | [
"Apache-2.0"
] | 1 | 2017-08-16T08:10:58.000Z | 2017-08-16T08:10:58.000Z | src/main/resources/script/cmdmap.py | wangyues/demo | b261ad08689375ff274cb8bfde62c0217ec5384b | [
"Apache-2.0"
] | null | null | null | src/main/resources/script/cmdmap.py | wangyues/demo | b261ad08689375ff274cb8bfde62c0217ec5384b | [
"Apache-2.0"
] | null | null | null |
maps = {}
def cmd_init(cmd):
def wrapper(func):
maps[cmd] = func
def _func():
return func()
return _func
return wrapper | 13.916667 | 25 | 0.508982 | 19 | 167 | 4.315789 | 0.368421 | 0.365854 | 0.341463 | 0.487805 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.389222 | 167 | 12 | 26 | 13.916667 | 0.803922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.375 | false | 0 | 0 | 0.125 | 0.75 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 7 |
efd723f878edf8ef2fcc3988e4a084239bebca9e | 119,471 | py | Python | header_footer.py | CamRoy008/AlouetteApp | 4aba620c56e38a6697e6eba1dc87b2fddbebc4c5 | [
"MIT"
] | null | null | null | header_footer.py | CamRoy008/AlouetteApp | 4aba620c56e38a6697e6eba1dc87b2fddbebc4c5 | [
"MIT"
] | null | null | null | header_footer.py | CamRoy008/AlouetteApp | 4aba620c56e38a6697e6eba1dc87b2fddbebc4c5 | [
"MIT"
] | null | null | null | # Raw header and footer code copied from GC websites. This html is injected into the webapp using dash-dangerously-set-inner-html
gc_header_en ='''
<html class="no-js" lang="en" dir="ltr">
<header>
<div id="wb-bnr" class="container">
<section id="wb-lng" class="text-right">
<h2 class="wb-inv">Language selection</h2>
<ul class="list-inline margin-bottom-none">
</ul>
</section>
<div class="row">
<div class="brand col-xs-5 col-md-4" property="publisher" typeof="GovernmentOrganization"> <a href="https://www.canada.ca/en.html" property="url"><img src="https://wet-boew.github.io/themes-dist/GCWeb/assets/sig-blk-en.svg" alt="Government of Canada Logo" property="logo"><span class="wb-inv" property="name"> Government of Canada / <span lang="fr">Gouvernement du Canada</span></span></a>
<meta property="areaServed" typeof="Country" content="Canada">
<link property="logo" href="https://wet-boew.github.io/themes-dist/GCWeb/assets/wmms-blk.svg">
</div>
<section id="wb-srch" class="col-lg-8 text-right">
<h2>Search</h2>
<a href="https://www.canada.ca/en/sr/srb.html">
<form action="#" method="post" name="cse-search-box" role="search" class="form-inline">
<div class="form-group">
<label for="wb-srch-q" class="wb-inv">Search Canada.ca</label>
<input id="wb-srch-q" list="wb-srch-q-ac" class="wb-srch-q form-control" name="q" type="search" value="" size="34" maxlength="170" placeholder="Search Canada.ca">
<datalist id="wb-srch-q-ac"> </datalist>
</div>
<div class="form-group submit">
<button type="submit" id="wb-srch-sub" class="btn btn-primary btn-small" name="wb-srch-sub"><span class="glyphicon-search glyphicon"></span><span class="wb-inv">Search</span></button>
</div>
</form>
</a>
</section>
</div>
</div>
<nav class="gcweb-menu" typeof="SiteNavigationElement">
<div class="container">
<h2 class="wb-inv">Menu</h2>
<button type="button" aria-haspopup="true" aria-expanded="false" aria-label="Press the SPACEBAR to expand or the escape key to collapse this menu. Use the Up and Down arrow keys to choose a submenu item. Press the Enter or Right arrow key to expand it, or the Left arrow or Escape key to collapse it. Use the Up and Down arrow keys to choose an item on that level and the Enter key to access it."><span class="wb-inv">Main </span>Menu <span class="expicon glyphicon glyphicon-chevron-down"></span></button>
<ul role="menu" aria-orientation="vertical" data-ajax-replace="https://wet-boew.github.io/themes-dist/GCWeb/ajax/sitemenu-v5-en.html" class="wb-init wb-data-ajax-replace-inited" id="wb-auto-3">
<!-- Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html -->
<!-- DataAjaxFragmentStart -->
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-jobs" aria-expanded="true" href="#">Jobs and the workplace</a>
<ul id="gc-mnu-jobs" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/jobs.html">Jobs<span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/jobs/opportunities.html">Find a job</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/jobs/training.html">Training</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/business-management">Hire and manage employees</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/start-business">Starting a business</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/jobs/workplace.html">Workplace standards</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/finance/pensions.html">Pensions and retirement</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/benefits/ei.html">Employment Insurance and leave</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-jobs-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-jobs-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/employment-social-development/programs/ei/ei-list/ei-roe/access-roe.html">View your Records of Employment</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/employment-social-development/services/sin.html">Apply for a Social Insurance Number (SIN)</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/employment-social-development/services/foreign-workers.html">Hire a temporary foreign worker</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/immigrate-canada/express-entry.html">Immigrate as a skilled worker</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-cit" aria-expanded="false" href="#">Immigration and citizenship</a>
<ul id="gc-mnu-cit" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/immigration-citizenship.html">Immigration<span class="hidden-xs hidden-sm"> and citizenship</span><span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/application.html">My application</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/visit-canada.html">Visit</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/immigrate-canada.html">Immigrate</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/work-canada.html">Work</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/study-canada.html">Study</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/canadian-citizenship.html">Citizenship</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/new-immigrants.html">New immigrants</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/canadians.html">Canadians</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/refugees.html">Refugees and asylum</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/immigration-citizenship/enforcement-violations.html">Enforcement and violations</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-cit-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-cit-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/application/account.html">Sign in or create an account to apply online</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/application/check-status.html">Check your application status</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/application/check-processing-times.html">Check application processing times</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/application/application-forms-guides.html">Find an application form</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.cic.gc.ca/english/information/fees/index.asp">Pay your fees</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.cic.gc.ca/english/visit/visas.asp">Find out if you need an eTA or a visa to visit Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.cic.gc.ca/english/helpcentre/index-featured-can.asp">Have questions? Find answers in the Help Centre</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-travel" aria-expanded="false" href="#">Travel and tourism</a>
<ul id="gc-mnu-travel" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://travel.gc.ca/">Travel<span class="hidden-xs hidden-sm"> and tourism</span><span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/travelling/advisories">Travel advice and advisories</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/canadian-tourism">Canadian attractions, events and experiences</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/immigration-refugees-citizenship/services/canadian-passports.html">Canadian passports</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/travelling">Travelling abroad</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/air">Air travel</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/returning">Returning to Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/assistance">Assistance abroad</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/stay-connected">Stay connected</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/visit">Visit Canada</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-travel-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-travel-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/travelling/children/consent-letter">Consent letter for children travelling abroad</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.cbsa-asfc.gc.ca/bwt-taf/menu-eng.html">Canada - U.S. border wait times</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/travelling/registration">Register as a Canadian abroad</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.cbsa-asfc.gc.ca/prog/nexus/application-demande-eng.html">Apply for NEXUS</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/returning/customs/what-you-can-bring-home-to-canada">What you can bring home to Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/assistance/embassies-consulates">Contact an embassy or consulate</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/travelling/cannabis-and-international-travel">Cannabis and international travel</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-biz" aria-expanded="false" href="#">Business and industry</a>
<ul id="gc-mnu-biz" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business.html">Business<span class="hidden-xs hidden-sm"> and industry</span><span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/start.html">Starting a business</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/grants.html">Business grants and financing</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/taxes.html">Business taxes</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/federal-corporations.html">Federal corporations</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/hire.html">Hiring and managing employees</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/trade.html">International trade and investment</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/permits.html">Permits, licences and regulations</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/doing-business.html">Doing business with government</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/science/innovation.html">R&D and innovation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/research.html">Research and business intelligence</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/ip.html">Intellectual property and copyright</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/maintaingrowimprovebusiness.html">Maintaining your business</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/protecting.html">Protecting your business</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/bankruptcy.html">Insolvency for business</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-biz-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-biz-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.ic.gc.ca/app/scr/cc/CorporationsCanada/fdrlCrpSrch.html?locale=en_CA">Find a corporation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.cbsa-asfc.gc.ca/prog/manif/portal-portail-eng.html">Report your imported goods</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.ic.gc.ca/app/opic-cipo/trdmrks/srch/home?lang=eng">Search for trademarks</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.cbsa-asfc.gc.ca/trade-commerce/tariff-tarif/2018/html/tblmod-1-eng.html">Review custom tariffs for importing goods</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.ic.gc.ca/opic-cipo/cpd/eng/introduction.html">Find a patent</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.cbsa-asfc.gc.ca/comm-eng.html">Import and export from Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.ic.gc.ca/eic/site/075.nsf/eng/home">Name a business</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.ic.gc.ca/app/scr/cc/CorporationsCanada/hm.html?locale=en_CA">Make changes to your corporation (Online Filing Centre)</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-benny" aria-expanded="false" href="#">Benefits</a>
<ul id="gc-mnu-benny" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/benefits.html">Benefits<span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/benefits/ei.html">Employment Insurance and leave</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/benefits/family.html">Family and caregiving benefits</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/benefits/publicpensions.html">Public pensions</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/benefits/education.html">Education and student aid</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/benefits/housing.html">Housing benefits</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/benefits/disability.html">Disability benefits</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.canadabenefits.gc.ca">Benefits finder</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/benefits/calendar.html">Benefit payment dates</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-benny-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-benny-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/benefits/ei/ei-regular-benefit.html">Apply for Employment Insurance</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/benefits/education/student-aid/grants-loans.html">Apply for student loans and grants</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/government/sign-in-online-account.html">Sign in to a Government of Canada online account</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tpsgc-pwgsc.gc.ca/recgen/txt/depot-deposit-eng.html">Sign up for direct deposit</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/benefits/ei/ei-internet-reporting.html">Submit your EI report</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.cra-arc.gc.ca/bnfts/clcltr/cfbc-eng.html">Child and family benefits calculators</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-health" aria-expanded="false" href="#">Health</a>
<ul id="gc-mnu-health" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/health.html">Health<span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/health/food-nutrition.html">Food and nutrition</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/public-health/services/diseases.html">Diseases and conditions</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/public-health/topics/immunization-vaccines.html">Vaccines and immunization</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/health/drug-health-products.html">Drug and health products</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/health/product-safety.html">Product safety</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/health/health-risks-safety.html">Health risks and safety</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/health/healthy-living.html">Healthy living</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/health/aboriginal-health.html">Indigenous health</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/health/health-system-services.html">Health system and services</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/health/science-research-data.html">Science, research and data</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-health-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-health-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/health-canada/services/drugs-medication/cannabis/industry-licensees-applicants/licensed-cultivators-processors-sellers.html">Licensed cultivators, processors and seller of cannabis</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://healthycanadians.gc.ca/recall-alert-rappel-avis/index-eng.php">Food and product recalls and safety alerts</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/health-canada/services/canada-food-guides.html">Canada's food guide</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-taxes" aria-expanded="false" href="#">Taxes</a>
<ul id="gc-mnu-taxes" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/taxes.html">Taxes<span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/taxes/income-tax.html">Income Tax</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses.html">GST/HST</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/payroll.html">Payroll</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/taxes/business-number.html">Business number</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/taxes/savings-and-pension-plans.html">Savings and pension plans</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/taxes/child-and-family-benefits.html">Child and family benefits</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/taxes/excise-taxes-duties-and-levies.html">Excise taxes, duties, and levies</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/taxes/charities.html">Charities and giving</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-taxes-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-taxes-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/revenue-agency/services/e-services/e-services-individuals/account-individuals.html">My Account</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/revenue-agency/services/e-services/e-services-businesses/business-account.html">My Business Account</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/revenue-agency/services/e-services/represent-a-client.html">Represent a Client</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/revenue-agency/services/e-services/e-services-businesses/gst-hst-netfile.html">File a GST/HST return (NETFILE)</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/revenue-agency/services/make-a-payment-canada-revenue-agency.html">Make a payment to the Canada Revenue Agency</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/revenue-agency/services/child-family-benefits/benefit-payment-dates.html">Find the next benefit payment date</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-enviro" aria-expanded="false" href="#">Environment and natural resources</a>
<ul id="gc-mnu-enviro" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/environment.html">Environment<span class="hidden-xs hidden-sm"> and natural resources</span><span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/environment/weather.html">Weather, climate and hazards</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/environment/energy.html">Energy</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/environment/natural-resources.html">Natural resources</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/environment/agricultural-practices.html">Agricultural practices</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/environment/fisheries.html">Fisheries</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/environment/wildlife-plants-species.html">Wildlife, plants and species</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/environment/pollution-waste-management.html">Pollution and waste management</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/environment/conservation.html">Environmental conservation and protection</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-enviro-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-enviro-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://weather.gc.ca/canada_e.html">Local weather forecast</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.nrcan.gc.ca/energy/efficiency/transportation/20996">Fuel-efficient vehicles</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.nrcan.gc.ca/homes">Home energy efficiency</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.registrelep-sararegistry.gc.ca/species/default_e.cfm">Species at risk</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/environment-climate-change/services/seasonal-weather-hazards.html">Prepare for severe weather</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-defence" aria-expanded="false" href="#">National security and defence</a>
<ul id="gc-mnu-defence" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/defence.html"><span class="hidden-xs hidden-sm">National security and defence</span><span class="visible-xs-inline visible-sm-inline">Defence: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/defence/nationalsecurity.html">National security</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/defence/caf.html">Canadian Armed Forces</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/defence/defence-equipment-purchases-upgrades.html">Defence equipment purchases and upgrades</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/en/services/transportation-security.html">Transportation security</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/defence/securingborder.html">Securing the border</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/defence/cybersecurity.html">Cyber security</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/defence/jobs.html">Jobs in national security and defence</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/government/publicservice/benefitsmilitary.html">Services and benefits for the military</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-defence-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-defence-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/department-national-defence/services/caf-jobs/browse-jobs.html">Jobs in the Canadian Armed Forces</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/department-national-defence/services/military-history/history-heritage/insignia-flags/ranks/rank-appointment-insignia.html">Military ranks</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/defence/caf/equipment.html">Defence equipment</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.publicsafety.gc.ca/cnt/ntnl-scrt/cntr-trrrsm/lstd-ntts/crrnt-lstd-ntts-en.aspx">Current list of terrorist entities</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.cadets.ca/en/join/cadets.page">Join the Cadets</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://dgpaapp.forces.gc.ca/en/canada-defence-policy/index.asp">Canada's Defence policy</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-culture" aria-expanded="false" href="#">Culture, history and sport</a>
<ul id="gc-mnu-culture" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/culture.html">Culture<span class="hidden-xs hidden-sm">, history and sport</span><span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/canadian-heritage/services/funding.html">Funding - Culture, history and sport</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/culture/events-celebrations-commemorations.html">Events, celebrations and commemorations</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/culture/cultural-attractions.html">Cultural landmarks and attractions</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/culture/canadian-identity-society.html">Canadian identity and society</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/culture/sport.html">Sport</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/culture/history-heritage.html">History and heritage</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/culture/arts-media.html">Arts and media</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/culture/cultural-youth-programs.html">Cultural youth programs</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/culture/cultural-trade-investment.html">Cultural trade and investment</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-culture-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-culture-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.veterans.gc.ca/eng/remembrance/memorials/canadian-virtual-war-memorial">Visit the Canadian Virtual War Memorial</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/culture/canadian-identity-society/anthems-symbols.html">Anthems and symbols of Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://crtc.gc.ca/eng/8045/d2018.htm">Find a CRTC decision</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.bac-lac.gc.ca/eng/search/Pages/ancestors-search.aspx">Research your family history</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.bac-lac.gc.ca/eng/census/Pages/census.aspx">Search census records</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/culture/cultural-attractions/attractions-canada-capital.html">Landmarks and attractions in Canada’s capital</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-policing" aria-expanded="false" href="#">Policing, justice and emergencies</a>
<ul id="gc-mnu-policing" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/policing.html">Policing<span class="hidden-xs hidden-sm">, justice and emergencies</span><span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/policing/police/index.html">Policing</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/policing/justice.html">Justice</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/policing/emergencies.html">Emergencies</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/policing/corrections.html">Corrections</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/policing/parole.html">Parole, record suspension, expungement and clemency</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/policing/victims.html">Victims of crime</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-policing-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-policing-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.rcmp-grc.gc.ca/cfp-pcaf/online_en-ligne/index-eng.htm">Apply/Renew a firearms licence</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.rcmp-grc.gc.ca/en/criminal-record-checks">Get a criminal records check</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/parole-board/services/record-suspensions/official-pbc-application-guide-and-forms.html">Apply for a criminal record suspension</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.getprepared.gc.ca/cnt/hzd/drng-en.aspx">What to do during an emergency</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/policing/police/community-safety-policing/impaired-driving.html">Know the law on impaired driving</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/policing/police/help-solve-crime.html">Help solve a crime</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-trans" aria-expanded="false" href="#">Transport and infrastructure</a>
<ul id="gc-mnu-trans" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/transport.html">Transport<span class="hidden-xs hidden-sm"> and infrastructure</span><span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/en/services/aviation.html">Aviation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/en/services/marine.html">Marine transportation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/en/services/road.html">Road transportation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/en/services/rail.html">Rail transportation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/en/services/dangerous-goods.html">Dangerous goods</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/en/services/infrastructure.html">Infrastructure</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-trans-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-trans-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/en/services/aviation/drone-safety.html">Drone safety</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/eng/aviationsecurity/page-147.htm">What you can't bring on an airplane</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/eng/marinesafety/oep-vesselreg-menu-728.htm">Register your vessel</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/en/services/road/child-car-seat-safety.html">Child car seat safety</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/eng/tdg/clear-tofc-211.htm">Transporting dangerous goods - Regulations</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tc.gc.ca/eng/acts-regulations/regulations-sor96-433.htm">Canadian Aviation Regulations</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-canworld" aria-expanded="false" href="#">Canada and the world</a>
<ul id="gc-mnu-canworld" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://international.gc.ca/world-monde/index.aspx?lang=eng">Canada and the world<span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://international.gc.ca/world-monde/offices-bureaux/index.aspx?lang=eng">International offices and emergency contacts</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://international.gc.ca/world-monde/study_work_travel-etude_travail_voyage/index.aspx?lang=eng">Study, work and travel worldwide</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://international.gc.ca/world-monde/funding-financement/index.aspx?lang=eng">Funding for international initiatives</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://international.gc.ca/world-monde/issues_development-enjeux_developpement/index.aspx?lang=eng">Global issues and international assistance</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/trade/index.html">International trade and investment</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://international.gc.ca/world-monde/international_relations-relations_internationales/index.aspx?lang=eng">International relations</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://international.gc.ca/world-monde/country-pays/index.aspx?lang=eng">Information by countries and territories</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://international.gc.ca/world-monde/stories-histoires/index.aspx?lang=eng">Stories</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-canworld-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-canworld-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://scholarships-bourses.gc.ca/scholarships-bourses/non_can/opportunities-opportunites.aspx?lang=eng">Find a Canadian scholarship as an international student</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://educanada.ca/index.aspx?lang=eng">Find international study or research opportunities in Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://travel.gc.ca/assistance/embassies-consulates">Contact an embassy or consulate</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://international.gc.ca/world-monde/study_work_travel-etude_travail_voyage/authentication-authentification/index.aspx?lang=eng">Authenticate a document</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://international.gc.ca/protocol-protocole/reps.aspx?lang=eng">Contact a foreign representative in Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://treaty-accord.gc.ca/index.aspx">International treaties signed by Canada</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-money" aria-expanded="false" href="#">Money and finances</a>
<ul id="gc-mnu-money" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/finance.html"><span class="hidden-xs hidden-sm">Money and finances</span><span class="visible-xs-inline visible-sm-inline">Finance: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/finance/manage.html">Managing your money</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/finance/debt.html">Debt and borrowing</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/finance/savings.html">Savings and investments</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/finance/educationfunding.html">Education funding</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/finance/pensions.html">Pensions and retirement</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/finance/fraud.html">Protection from frauds and scams</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/finance/tools.html">Financial tools and calculators</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/financial-consumer-agency/services/financial-literacy-programs.html">Financial literacy programs</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/finance/consumer-affairs.html">Consumer affairs</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/finance/bankruptcy.html">Insolvency</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/taxes.html">Taxes</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/government/system/finances.html">Government finances</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/grants.html">Business grants and financing</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/permits/federallyregulatedindustrysectors/financialservicesregulation.html">Financial and money services regulation</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-money-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-money-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.ic.gc.ca/app/scr/bsf-osb/ins/login.html?lang=eng">Find a bankruptcy or insolvency record</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/jobs/education/student-financial-aid/student-loan.html">Student loans</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tpsgc-pwgsc.gc.ca/recgen/txt/depot-deposit-eng.html">Set up direct deposit</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/financial-consumer-agency/services/mortgages.html">Mortgages</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/financial-consumer-agency/services/credit-reports-score.html">Credit report and scores</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://itools-ioutils.fcac-acfc.gc.ca/BC-CB/NetInc-RevNet-eng.aspx">Make a budget</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/revenue-agency/services/tax/registered-plans-administrators/pspa/mp-rrsp-dpsp-tfsa-limits-ympe.html">Rates and contribution limits</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-science" aria-expanded="false" href="#">Science and innovation</a>
<ul id="gc-mnu-science" role="menu" aria-orientation="vertical">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/science.html">Science<span class="hidden-xs hidden-sm"> and innovation</span><span class="visible-xs-inline visible-sm-inline">: home</span></a>
</li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/science/researchfunding.html">Research funding and awards</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/science/sciencesubjects.html">Science subjects</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/science/open-data.html">Open data, statistics and archives</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/science/institutes.html">Research institutes and facilities</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/science/innovation.html">R&D and innovation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/business/ip.html">Intellectual property and copyright</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/science/scientistsdirectory.html">Directory of scientists and research professionals</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/en/services/science/educationalresources.html">Science education resources</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation">
<a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-science-sub" aria-expanded="true">Most requested</a>
<ul id="gc-mnu-science-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.nrc-cnrc.gc.ca/eng/publications/codes_centre/2015_national_building_code.html">National building codes</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.nrc-cnrc.gc.ca/eng/services/time/web_clock.html#tzpanel-4">Official time across Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.nrc-cnrc.gc.ca/eng/services/sunrise/index.html">Check sunrise and sunset times</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.nrc-cnrc.gc.ca/eng/irap/services/financial_assistance.html">Grants for technological innovation (IRAP)</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://science-libraries.canada.ca/eng/home/">Federal Science Library</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://asc-csa.gc.ca/eng/astronomy/auroramax/hd-480.asp">Live view of northern lights cam</a></li>
</ul>
</li>
</ul>
</li>
<!-- DataAjaxFragmentEnd -->
</ul>
</div>
</nav>
<nav id="wb-bc" property="breadcrumb">
<h2>You are here:</h2>
<div class="container">
<ol class="breadcrumb">
<li><a href="https://www.canada.ca/en.html">Home</a></li>
</ol>
</div>
</nav>
</header>
'''
gc_footer_en = '''
<footer id="wb-info">
<div class="landscape">
<nav class="container wb-navcurr">
<h2 class="wb-inv">About government</h2>
<ul class="list-unstyled colcount-sm-2 colcount-md-3">
<li><a href="https://www.canada.ca/en/contact.html">Contact us</a></li>
<li><a href="https://www.canada.ca/en/government/dept.html">Departments and agencies</a></li>
<li><a href="https://www.canada.ca/en/government/publicservice.html">Public service and military</a></li>
<li><a href="https://www.canada.ca/en/news.html">News</a></li>
<li><a href="https://www.canada.ca/en/government/system/laws.html">Treaties, laws and regulations</a></li>
<li><a href="https://www.canada.ca/en/transparency/reporting.html">Government-wide reporting</a></li>
<li><a href="https://pm.gc.ca/eng">Prime Minister</a></li>
<li><a href="https://www.canada.ca/en/government/system.html">How government works</a></li>
<li><a href="https://open.canada.ca/en/">Open government</a></li>
</ul>
</nav>
</div>
<div class="brand">
<div class="container">
<div class="row">
<nav class="col-md-9 col-lg-10 ftr-urlt-lnk">
<h2 class="wb-inv">About this site</h2>
<ul>
<li><a href="https://www.canada.ca/en/social.html">Social media</a></li>
<li><a href="https://www.canada.ca/en/mobile.html">Mobile applications</a></li>
<li><a href="https://www1.canada.ca/en/newsite.html">About Canada.ca</a></li>
<li><a href="https://www.canada.ca/en/transparency/terms.html">Terms and conditions</a></li>
<li><a href="https://www.canada.ca/en/transparency/privacy.html">Privacy</a></li>
</ul>
</nav>
<div class="col-xs-6 visible-sm visible-xs tofpg"> <a href="#wb-cont">Top of Page <span class="glyphicon glyphicon-chevron-up"></span></a> </div>
<div class="col-xs-6 col-md-3 col-lg-2 text-right"> <img src="https://wet-boew.github.io/themes-dist/GCWeb/assets/wmms-blk.svg" alt="Symbol of the Government of Canada">
</div>
</div>
</div>
</div>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.js"></script>
<script src="https://wet-boew.github.io/themes-dist/GCWeb/wet-boew/js/wet-boew.min.js"></script>
<script src="https://wet-boew.github.io/themes-dist/GCWeb/js/theme.min.js"></script>
'''
gc_header_fr = '''
<html class="no-js" lang="fr" dir="ltr">
<header>
<div id="wb-bnr" class="container">
<section id="wb-lng" class="text-right">
<h2 class="wb-inv">Sélection de la langue</h2>
<div class="row">
<div class="col-md-12">
<ul class="list-inline margin-bottom-none">
<li>
</li>
</ul>
</div>
</div>
</section>
<div class="row">
<div class="brand col-xs-5 col-md-4" property="publisher" typeof="GovernmentOrganization">
<a href="/fr.html" property="url">
<img src="https://wet-boew.github.io/themes-dist/GCWeb/assets/sig-blk-fr.svg" alt="" property="logo">
<span class="wb-inv" property="name"> Gouvernement du Canada</span>
</a>
<meta property="areaServed" typeof="Country" content="Canada">
<link property="logo" href="https://wet-boew.github.io/themes-dist/GCWeb/GCWeb/assets/wmms-blk.svg">
</div>
<section id="wb-srch" class="col-lg-8 text-right">
<h2>Recherche</h2>
<a href="https://www.canada.ca/fr/sr/srb.html">
<form action="/fr/sr/srb.html" method="get" name="cse-search-box" role="search" class="form-inline">
<div class="form-group">
<label for="wb-srch-q" class="wb-inv">Rechercher dans Canada.ca</label>
<input name="cdn" value="canada" type="hidden">
<input name="st" value="s" type="hidden">
<input name="num" value="10" type="hidden">
<input name="langs" value="fr" type="hidden">
<input name="st1rt" value="1" type="hidden">
<input name="s5bm3ts21rch" value="x" type="hidden">
<input id="wb-srch-q" list="wb-srch-q-ac" class="wb-srch-q form-control" name="q" type="search" value="" size="34" maxlength="170" placeholder="Rechercher dans Canada.ca">
<input type="hidden" name="_charset_" value="UTF-8">
<datalist id="wb-srch-q-ac">
</datalist>
</div>
<div class="form-group submit">
<button type="submit" id="wb-srch-sub" class="btn btn-primary btn-small" name="wb-srch-sub"><span class="glyphicon-search glyphicon"></span><span class="wb-inv">Recherche</span></button>
</div>
</form>
</a>
</section>
</div>
</div>
<nav class="gcweb-v2 gcweb-menu wb-init gcweb-menu-inited" typeof="SiteNavigationElement" id="wb-auto-2"><div class="container">
<h2 class="wb-inv">Menu</h2>
<button type="button" aria-haspopup="true" aria-expanded="false" aria-label="Appuyez sur la barre d'espacement pour ouvrir ou sur la touche d'échappement pour fermer le menu. Utilisez les flèches haut et bas pour choisir un élément de sous-menu. Appuyez sur la touche Entrée ou sur la flèche vers la droite pour le développer, ou sur la flèche vers la gauche ou la touche Échap pour le réduire. Utilisez les flèches haut et bas pour choisir un élément de ce niveau et la touche Entrée pour y accéder.">Menu<span class="wb-inv"> principal</span> <span class="expicon glyphicon glyphicon-chevron-down"></span></button>
<ul role="menu" aria-orientation="vertical" data-ajax-replace="/content/dam/canada/sitemenu/sitemenu-v2-fr.html" class="wb-init wb-data-ajax-replace-inited" id="wb-auto-3"><li role="presentation"> <a role="menuitem" tabindex="0" aria-haspopup="true" aria-controls="gc-mnu-jobs" aria-expanded="true" href="#">Emplois et milieu de travail</a>
<ul id="gc-mnu-jobs" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/emplois.html">Emplois<span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/emplois/opportunites.html">Trouver un emploi</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/emplois/formation.html">Formation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/gestion-entreprise">Embauche et gestion de personnel</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/demarrage-entreprise">Démarrage d'entreprise</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/emplois/milieu-travail.html">Normes en milieu de travail</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/finance/pensions.html">Pensions et retraite</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/prestations/ae.html">Prestations d'assurance-emploi et congés</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-jobs-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-jobs-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/emploi-developpement-social/programmes/assurance-emploi/ae-liste/assurance-emploi-re/acceder-re.html">Voir vos Relevés d’emploi</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/emploi-developpement-social/services/numero-assurance-sociale.html">Demander un numéro d’assurance-sociale</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/emploi-developpement-social/services/travailleurs-etrangers.html">Embaucher un travailleur étranger temporaire</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/immigrer-canada/entree-express.html">Immigrer en tant que travailleur qualifié</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-cit" aria-expanded="false" href="#">Immigration et citoyenneté</a>
<ul id="gc-mnu-cit" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/immigration-citoyennete.html">Immigration<span class="hidden-xs hidden-sm"> et citoyenneté</span><span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/demande.html">Ma demande</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/visiter-canada.html">Visiter</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/immigrer-canada.html">Immigrer</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/travailler-canada.html">Travailler</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/etudier-canada.html">Étudier</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/citoyennete-canadienne.html">Citoyenneté</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/nouveaux-immigrants.html">Nouveaux immigrants</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/canadiens.html">Canadiens</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/refugies.html">Réfugiés et octroi de l’asile</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/immigration-citoyennete/application-loi-infractions.html">Application de la loi et infractions</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-cit-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-cit-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/demande/compte.html">Se connecter ou créer un compte pour présenter une demande en ligne</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/demande/verifier-etat.html">Vérifier l’état de sa demande</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.cic.gc.ca/francais/information/delais/index.asp">Vérifier les délais de traitement des demandes</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/demande/formulaires-demande-guides.html">Trouver un formulaire de demande</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.cic.gc.ca/francais/information/frais/index.asp">Payer les frais</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.cic.gc.ca/francais/visiter/visas.asp">Déterminer si vous avez besoin d’une AVE ou d’un visa pour visiter le Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.cic.gc.ca/francais/centre-aide/index-en-vedette-can.asp">Trouver réponse à ses questions dans le Centre d’aide</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-travel" aria-expanded="false" href="#">Voyage et tourisme</a>
<ul id="gc-mnu-travel" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/">Voyage<span class="hidden-xs hidden-sm"> et tourisme</span><span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/voyager/avertissements">Conseils aux voyageurs et avertissements</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/tourisme-canadien">Attraits touristiques, événements et expériences au Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/immigration-refugies-citoyennete/services/passeports-canadiens.html">Passeports canadiens</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/voyager">Voyager à l’étranger</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/avion">Voyager en avion</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/retour">Retour au Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/assistance">Assistance à l’étranger</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/restez-branches">Restez branchés</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/visiter">Visiter le Canada</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-travel-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-travel-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/voyager/enfant/lettre-de-consentement">Lettre de consentement pour les enfants qui voyagent à l’étranger</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.cbsa-asfc.gc.ca/bwt-taf/menu-fra.html">Temps d’attente à la frontière Canada - États-Unis</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/voyager/inscription">Inscrivez-vous comme Canadien à l’étranger</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.cbsa-asfc.gc.ca/prog/nexus/application-demande-fra.html">Adhérez à NEXUS</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/retour/douane/ce-que-vous-pouvez-ramener-au-canada">Ce que vous pouvez ramener au Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/assistance/ambassades-consulats">Communiquer avec une ambassade ou un consulat</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/voyager/le-cannabis-et-les-voyages-a-l-etranger">Le cannabis et les voyages à l’étranger</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-biz" aria-expanded="false" href="#">Entreprises et industrie</a>
<ul id="gc-mnu-biz" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises.html">Entreprises<span class="hidden-xs hidden-sm"> et industrie</span><span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/lancer.html">Démarrage d'entreprise</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/subventions.html">Subventions et financement pour les entreprises</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/impots.html">Taxes et impôt des entreprises</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/societes-de-regime-federal.html">Sociétés de régime fédéral</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/engager.html">Embauche et gestion de personnel</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/commerce.html">Commerce international et investissements</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/permis.html">Permis, licences et règlements</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/faire-affaire.html">Faire affaire avec le gouvernement</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/science/innovation.html">Recherche-développement et innovation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/recherche.html">Recherche et renseignements d'affaires</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/pi.html">Propriété intellectuelle et droit d'auteur</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/maintenirfairecroitreameliorerentreprise.html">Administration de votre entreprise</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/proteger.html">Protection de votre entreprise</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/faillites.html">Insolvabilité pour les entreprises</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-biz-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-biz-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.ic.gc.ca/app/scr/cc/CorporationsCanada/fdrlCrpSrch.html">Trouver une société</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.cbsa-asfc.gc.ca/prog/manif/portal-portail-fra.html">Déclarer vos produits importés</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.ic.gc.ca/app/opic-cipo/trdmrks/srch/accueil?lang=fra">Chercher des marques de commerce</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.cbsa-asfc.gc.ca/trade-commerce/tariff-tarif/2018/html/tblmod-1-fra.html">Réviser les tarifs des douanes pour l’importation de produits</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.ic.gc.ca/opic-cipo/cpd/eng/introduction.html">Trouver un brevet</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.cbsa-asfc.gc.ca/comm-fra.html">Importer et exporter à partir du Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.ic.gc.ca/eic/site/075.nsf/fra/accueil">Trouver un nom pour votre compagnie</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.ic.gc.ca/app/scr/cc/CorporationsCanada/hm.html?f=&selectedDirectorUuid=%3BselectedIncorporatorUuid%3D&metricsId=GTM-WQQH22">Apporter des changements à votre société (Centre de dépôt en ligne)</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-benny" aria-expanded="false" href="#">Prestations</a>
<ul id="gc-mnu-benny" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/prestations.html">Prestations<span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/prestations/ae.html">Prestations d'assurance-emploi et congés</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/prestations/famille.html">Prestations pour familles et proches aidants</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/prestations/pensionspubliques.html">Pensions publiques</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/prestations/etudes.html">Éducation et aide aux étudiants</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/prestations/logement.html">Prestations relatives au logement</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/prestations/handicap.html">Prestations relatives aux personnes handicapées</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.prestationsducanada.gc.ca/">Chercheur de prestations</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/prestations/calendrier.html">Dates de paiement des prestations</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-benny-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-benny-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/prestations/ae/assurance-emploi-reguliere.html">Présenter une demande d’assurance-emploi</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/prestations/education/aide-etudiants/bourses-prets.html">Faire une demande de bourses et de prêts d’études</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/gouvernement/ouvrir-session-dossier-compte-en-ligne.html">Ouvrir une session pour un compte en ligne du gouvernement du Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tpsgc-pwgsc.gc.ca/recgen/txt/depot-deposit-fra.html">Inscrivez-vous au dépôt direct</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-revenu/services/prestations-enfants-familles/calculateur-prestations-enfants-familles.html">Calculateur de prestations pour enfants et familles</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/prestations/ae/assurance-emploi-declaration-internet.html">Soumettre une déclaration d’assurance-emploi</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-health" aria-expanded="false" href="#">Santé</a>
<ul id="gc-mnu-health" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/sante.html">Santé<span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/sante/aliments-et-nutrition.html">Aliments et nutrition</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/sante-publique/services/maladies.html">Maladies et affections</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/sante-publique/sujets/immunisation-et-vaccins.html">Vaccins et immunisation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/sante/medicaments-et-produits-sante.html">Médicaments et produits de santé</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/sante/securite-produits.html">Sécurité des produits</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/sante/securite-et-risque-pour-sante.html">Sécurité et risque pour la santé</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/sante/vie-saine.html">Vie saine</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/sante/sante-autochtones.html">Santé des Autochtones</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/sante/systeme-et-services-sante.html">Système et services de santé</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/sante/science-recherche-et-donnees.html">Science, recherche et données</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-health-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-health-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/sante-canada/services/drogues-medicaments/cannabis/titulaires-licences-demandeurs-industrie/cultivateurs-transformateurs-vendeurs-autorises.html">Cultivateurs, transformateurs et vendeurs de cannabis qui détiennent une licence</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.canadiensensante.gc.ca/recall-alert-rappel-avis/index-fra.php">Rappels d'aliments et de produits et alertes de sécurité</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/sante-canada/services/guides-alimentaires-canada.html">Guide alimentaire du Canada</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-taxes" aria-expanded="false" href="#">Impôts</a>
<ul id="gc-mnu-taxes" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/impots.html">Impôts<span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/impots/impot-sur-le-revenu.html">Impôt sur le revenu</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-revenu/services/impot/entreprises/sujets/tps-tvh-entreprises.html">TPS/TVH</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-revenu/services/impot/entreprises/sujets/retenues-paie.html">Retenues sur la paie</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/impots/numero-dentreprise.html">Numéro d'entreprise</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/impots/regimes-depargne-et-de-pension.html">Régimes d’épargne et de pension</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/impots/prestations-pour-enfants-et-familles.html">Prestations pour enfants et familles</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/impots/taxes-daccise-droits-et-prelevements.html">Taxes d’accise, droits et prélèvements</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/impots/bienfaisance.html">Organismes de bienfaisance et dons</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-taxes-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-taxes-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-revenu/services/services-electroniques/services-electroniques-particuliers/dossier-particuliers.html">Mon dossier</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-revenu/services/services-electroniques/services-electroniques-entreprises/dossier-entreprise.html">Mon dossier d'entreprise</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-revenu/services/services-electroniques/representer-client.html">Représenter un client</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-revenu/services/services-electroniques/services-electroniques-entreprises/impotnet-tps-tvh.html">Transmettre une déclaration de TPS/TVH (IMPÔTNET)</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-revenu/services/faire-paiement-a-agence-revenu-canada.html">Faire un paiement à l'Agence du revenu du Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-revenu/services/prestations-enfants-familles/dates-versement-prestations.html">Trouver la date du prochain versement des prestations</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-enviro" aria-expanded="false" href="#">Environnement et ressources naturelles</a>
<ul id="gc-mnu-enviro" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/environnement.html">Environnement<span class="hidden-xs hidden-sm"> et ressources naturelles</span><span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/environnement/meteo.html">Météo, climat et catastrophes naturelles</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/environnement/energie.html">Énergie</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/environnement/ressources-naturelles.html">Ressources naturelles</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/environnement/pratiques-agricoles.html">Pratiques agricoles</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/environnement/peches.html">Pêches</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/environnement/faune-flore-especes.html">Faune, flore et espèces</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/environnement/pollution-gestion-dechets.html">Pollution et gestion des déchets</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/environnement/conservation.html">Conservation et protection de l'environnement</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-enviro-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-enviro-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://meteo.gc.ca/canada_f.html">Prévisions météo locales</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.rncan.gc.ca/energie/efficacite/transports/20997">Véhicules écoénergétiques</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.rncan.gc.ca/maisons">Efficacité énergétique des maisons</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.registrelep-sararegistry.gc.ca/species/default_f.cfm">Espèces en péril</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/environnement-changement-climatique/services/meteo-saisonniere-dangereuse.html">Préparation aux conditions météorologiques dangereuses</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-defence" aria-expanded="false" href="#">Sécurité nationale et défense</a>
<ul id="gc-mnu-defence" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/defense.html"><span class="hidden-xs hidden-sm">Sécurité nationale et défense</span><span class="visible-xs-inline visible-sm-inline">Défense : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/defense/securitenationale.html">Sécurité nationale</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/defense/fac.html">Forces armées canadiennes</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/defense/achat-mise-a-niveau-equipement-defense.html">Achat et mise à niveau d’équipement de la Défense</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fr/services/surete-transports.html">Sûreté des transports</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/defense/securiserfrontiere.html">Sécuriser la frontière</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/defense/cybersecurite.html">Cybersécurité</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/defense/emplois.html">Emplois en sécurité nationale et en défense</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/gouvernement/fonctionpublique/avantagesmilitaires.html">Services et avantages sociaux du personnel militaire</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-defence-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-defence-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://forces.ca/fr/carrieres/">Emplois dans les Forces armées canadiennes</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/ministere-defense-nationale/services/histoire-militaire/histoire-patrimoine/insignes-drapeaux/grades/insignes-grade-fonction.html">Grades militaires</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/defense/fac/equipement.html">Équipement de la Défense</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.cadets.ca/fr/joignez-vous/cadets.page">Devenir cadet</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://dgpaapp.forces.gc.ca/fr/politique-defense-canada/index.asp">Politique de défense du Canada</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-culture" aria-expanded="false" href="#">Culture, histoire et sport</a>
<ul id="gc-mnu-culture" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/culture.html">Culture<span class="hidden-xs hidden-sm">, histoire et sport</span><span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/patrimoine-canadien/services/financement.html">Financement - Culture, histoire et sport</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/culture/evenements-celebrations-commemorations.html">Événements, célébrations et commémorations</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/culture/attraits-culturels.html">Lieux et attraits culturels</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/culture/identite-canadienne-societe.html">Identité canadienne et société</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/culture/sport.html">Sport</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/culture/histoire-patrimoine.html">Histoire et patrimoine</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/culture/arts-media.html">Arts et média</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/culture/programmes-culturels-jeunes.html">Programmes culturels pour les jeunes</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/culture/commerce-investissement-culturels.html">Commerce et investissement culturels</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-culture-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-culture-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.veterans.gc.ca/fra/remembrance/memorials/canadian-virtual-war-memorial">Visitez le Mémorial virtuel de guerre du Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/culture/identite-canadienne-societe/hymnes-symboles.html">Hymnes et symboles du Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://crtc.gc.ca/fra/8045/d2018.htm">Trouvez une décision du CRTC</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.bac-lac.gc.ca/fra/recherche/Pages/recherche-ancetres.aspx">Faites des recherches sur votre histoire familiale</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.bac-lac.gc.ca/fra/recensements/Pages/recensements.aspx">Cherchez des documents de recensement</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/culture/attraits-culturels/attraits-capitale-canada.html">Lieux et attraits dans la capitale du Canada</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-policing" aria-expanded="false" href="#">Services de police, justice et urgences</a>
<ul id="gc-mnu-policing" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/police.html">Services de police<span class="hidden-xs hidden-sm">, justice et urgences</span><span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/police/servicespolice.html">Services de police</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/police/justice.html">Justice</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/police/urgences.html">Urgences</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/police/correctionnels.html">Services correctionnels</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/police/liberationconditionnelle.html">Libération conditionnelle, suspension du casier, radiation et clémence</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/police/victimes.html">Victimes d'actes criminels</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-policing-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-policing-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.rcmp-grc.gc.ca/cfp-pcaf/online_en-ligne/index-fra.htm">Demander ou renouveler un permis d'arme à feu</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.rcmp-grc.gc.ca/fr/verification-casier-judiciaire">Obtenir une attestation de vérification de casier judiciaire</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/commission-liberations-conditionnelles/services/suspension-du-casier/guide-et-formulaires-de-demande.html">Demander la suspension d’un casier judiciaire</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.preparez-vous.gc.ca/cnt/hzd/drng-fr.aspx">Que faire durant une urgence</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/police/servicespolice/securite-communautaire-police/conduite-facultes-affaiblies.html">Connaissez la loi sur la conduite avec facultés affaiblies</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/police/servicespolice/aider-resoudre-un-crime.html">Aidez à résoudre un crime</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-trans" aria-expanded="false" href="#">Transport et infrastructure</a>
<ul id="gc-mnu-trans" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/transport.html">Transport<span class="hidden-xs hidden-sm"> et infrastructure</span><span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fr/services/aviation.html">Aviation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fr/services/maritime.html">Transport maritime</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fr/services/routier.html">Transport routier</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fr/services/ferroviaire.html">Transport ferroviaire</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fr/services/marchandises-dangereuses.html">Marchandises dangereuses</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fr/services/infrastructures.html">Infrastructure</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-trans-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-trans-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fr/services/aviation/securite-drones.html">Sécurité des drones</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fr/services/surete-transports/aerienne/articles-interdits-bord-avion.html">Articles interdits à bord d’un avion</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fra/securitemaritime/epe-immabatiments-menu-728.htm">Immatriculer votre bâtiment</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fr/services/routier/securite-sieges-auto-enfants.html">Sécurité des sièges d'auto pour enfants</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fra/tmd/clair-tdesm-211.htm">Transporter des marchandises dangereuses - Règlements</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.tc.gc.ca/fr/transports-canada/organisation/lois-reglements/reglements/sor-96-433.html">Règlement de l’aviation canadien</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-canworld" aria-expanded="false" href="#">Canada et le monde</a>
<ul id="gc-mnu-canworld" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="http://international.gc.ca/world-monde/index.aspx?lang=fra">Le Canada et le monde<span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://international.gc.ca/world-monde/offices-bureaux/index.aspx?lang=fra">Bureaux internationaux et contacts d’urgence</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://international.gc.ca/world-monde/study_work_travel-etude_travail_voyage/index.aspx?lang=fra">Étude, travail et voyage partout dans le monde</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://international.gc.ca/world-monde/funding-financement/index.aspx?lang=frag">Financement d’initiatives internationales</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://international.gc.ca/world-monde/issues_development-enjeux_developpement/index.aspx?lang=fra">Enjeux mondiaux et aide internationale</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://www.canada.ca/fr/services/entreprises/commerce/index.html">Commerce international et investissement</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://international.gc.ca/world-monde/international_relations-relations_internationales/index.aspx?lang=fra">Relations internationales</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://international.gc.ca/world-monde/country-pays/index.aspx?lang=fra">Information par pays et territoires</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://international.gc.ca/world-monde/stories-histoires/index.aspx?lang=fra">Histoires</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-canworld-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-canworld-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://scholarships-bourses.gc.ca/scholarships-bourses/non_can/opportunities-opportunites.aspx?lang=fra">Trouver une bourse d’études canadienne en tant qu’étudiant international</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://educanada.ca/index.aspx?lang=fra">Trouver des occasions d’étude ou de recherche au Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://voyage.gc.ca/assistance/ambassades-consulats">Communiquer avec une ambassade ou un consulat</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://international.gc.ca/world-monde/study_work_travel-etude_travail_voyage/authentication-authentification/index.aspx?lang=fra">Authentifier un document</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://international.gc.ca/protocol-protocole/reps.aspx?lang=fra">Communiquer avec un représentant étranger au Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://treaty-accord.gc.ca/index.aspx?Lang=fra">Traités internationaux signés par le Canada</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-money" aria-expanded="false" href="#">Argent et finances</a>
<ul id="gc-mnu-money" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/finance.html"><span class="hidden-xs hidden-sm">Argent et finances</span><span class="visible-xs-inline visible-sm-inline">Finances : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/finance/gerer.html">Gérer votre argent</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/finance/dettes.html">Dettes et emprunts</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/finance/epargne.html">Épargne et investissement</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/finance/financementetudes.html">Financement des études</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/finance/pensions.html">Pensions et retraite</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/finance/fraude.html">Protection contre la fraude et les escroqueries</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/finance/outils.html">Calculatrices et outils financiers</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-consommation-matiere-financiere/services/programmes-litteratie-financiere.html">Programmes de littératie financière</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/finance/questions-consommation.html">Questions de consommation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/finance/faillite.html">Insolvabilité</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/impots.html">Impôts</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/gouvernement/systeme/finances.html">Finances publiques</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/subventions.html">Subventions et financement pour les entreprises</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/permis/secteursindustriereglementationfederale/regleservicesfinanciers.html">Réglementation des services financiers et monétaires</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-money-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-money-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.ic.gc.ca/app/scr/bsf-osb/ins/connexion.html?lang=fra">Trouver un dossier de faillite ou d’insolvabilité</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/emplois/education/aide-financiere-etudiants/pret-etudiants.html">Prêts étudiants</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.tpsgc-pwgsc.gc.ca/recgen/txt/depot-deposit-fra.html">Inscrivez-vous au dépôt direct</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-consommation-matiere-financiere/services/hypotheques.html">Obtenir des renseignements sur les hypothèques</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-consommation-matiere-financiere/services/dossier-pointage-credit.html">Dossiers et cotes de crédit</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://itools-ioutils.fcac-acfc.gc.ca/BC-CB/NetInc-RevNet-fra.aspx">Faire un budget</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/agence-revenu/services/impot/administrateurs-regimes-enregistres/fesp/plafonds-cd-reer-rpdb-celi-mgap.html">Taux et limites de contribution</a></li>
</ul>
</li>
</ul>
</li>
<li role="presentation"> <a role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-science" aria-expanded="false" href="#">Science et innovation</a>
<ul id="gc-mnu-science" role="menu" aria-orientation="vertical">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/science.html">Science<span class="hidden-xs hidden-sm"> et innovation</span><span class="visible-xs-inline visible-sm-inline"> : accueil</span></a> </li>
<li role="separator"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/science/financementrecherche.html">Financement, subventions et prix pour la recherche</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/science/themesscientifiques.html">Thèmes scientifiques</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/science/donnees-ouvertes.html">Données ouvertes, statistiques et archives</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/science/instituts.html">Instituts et établissements de recherches</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/science/innovation.html">R-D et innovation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/entreprises/pi.html">Propriété intellectuelle et droit d'auteur</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/science/repertoirescientifiques.html">Répertoire des scientifiques et des professionnels de la recherche</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.canada.ca/fr/services/science/ressourcespedagogiques.html">Ressources pédagogiques scientifiques</a></li>
<li role="separator" aria-orientation="vertical"></li>
<li role="presentation"> <a data-keep-expanded="md-min" href="#" role="menuitem" tabindex="-1" aria-haspopup="true" aria-controls="gc-mnu-science-sub" aria-expanded="true">En demande</a>
<ul id="gc-mnu-science-sub" role="menu" aria-orientation="vertical">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.nrc-cnrc.gc.ca/fra/publications/centre_codes/2015_code_national_batiment.html">Code national du bâtiment</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.nrc-cnrc.gc.ca/fra/services/heure/horloge_web.html#tzpanel-4">Heures officielles au Canada</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.nrc-cnrc.gc.ca/fra/services/levers/index.html">Trouver les heures de levers et de couchers du soleil</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.nrc-cnrc.gc.ca/fra/pari/services/aide_financiere.html">Bourses pour l’innovation technologique (PARI)</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://science-libraries.canada.ca/fra/accueil/">Bibliothèque scientifique fédérale</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://asc-csa.gc.ca/fra/astronomie/auroramax/hd-480.asp">Aurores boréales en direct</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div></nav>
<nav id="wb-bc" property="breadcrumb"><h2 class="wb-inv">Vous êtes ici :</h2><div class="container"><ol class="breadcrumb">
<li><a href="/fr.html">Accueil</a></li>
</ol></div></nav>
<div data-ajax-replace="/bin/canada/alert/messages.fr.html" class="original wb-init wb-data-ajax-replace-inited" id="wb-auto-4"></div>
</header>
'''
gc_footer_fr = '''
<div class="global-footer">
<footer id="wb-info">
<div class="landscape">
<nav class="container wb-navcurr">
<h2 class="wb-inv">Au sujet du gouvernement</h2>
<ul class="list-unstyled colcount-sm-2 colcount-md-3">
<li><a href="https://www.canada.ca/fr/contact.html">Contactez-nous</a></li>
<li><a href="https://www.canada.ca/fr/gouvernement/min.html">Ministères et organismes</a></li>
<li><a href="https://www.canada.ca/fr/gouvernement/fonctionpublique.html">Fonction publique et force militaire</a></li>
<li><a href="https://www.canada.ca/fr/nouvelles.html">Nouvelles</a></li>
<li><a href="https://www.canada.ca/fr/gouvernement/systeme/lois.html">Traités, lois et règlements</a></li>
<li><a href="https://www.canada.ca/fr/transparence/rapports.html">Rapports à l'échelle du gouvernement</a></li>
<li><a href="https://pm.gc.ca/fr">Premier ministre</a></li>
<li><a href="https://www.canada.ca/fr/gouvernement/systeme.html">À propos du gouvernement</a></li>
<li><a href="http://ouvert.canada.ca/">Gouvernement ouvert</a></li>
</ul>
</nav>
</div>
<div class="brand">
<div class="container">
<div class="row">
<nav class="col-md-10 ftr-urlt-lnk">
<h2 class="wb-inv">À propos de ce site</h2>
<ul>
<li><a href="https://www.canada.ca/fr/sociaux.html">Médias sociaux</a></li>
<li><a href="https://www.canada.ca/fr/mobile.html">Applications mobiles</a></li>
<li><a href="https://www.canada.ca/fr/gouvernement/a-propos.html">À propos de Canada.ca</a></li>
<li><a href="https://www.canada.ca/fr/transparence/avis.html">Avis</a></li>
<li><a href="https://www.canada.ca/fr/transparence/confidentialite.html">Confidentialité</a></li>
</ul>
</nav>
<div class="col-xs-6 visible-sm visible-xs tofpg">
<a href="#wb-cont">Haut de la page <span class="glyphicon glyphicon-chevron-up"></span></a>
</div>
<div class="col-xs-6 col-md-2 text-right">
<img src="https://wet-boew.github.io/themes-dist/GCWeb/assets/wmms-blk.svg" alt="Symbole du gouvernement du Canada">
</div>
</div>
</div>
</div>
</footer>
</div>
''' | 112.179343 | 618 | 0.684928 | 17,035 | 119,471 | 4.800294 | 0.086528 | 0.043511 | 0.117325 | 0.123843 | 0.763418 | 0.754797 | 0.750297 | 0.740098 | 0.734374 | 0.730816 | 0 | 0.006629 | 0.118648 | 119,471 | 1,065 | 619 | 112.179343 | 0.769972 | 0.001063 | 0 | 0.407946 | 0 | 0.599806 | 0.999204 | 0.175544 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.001938 | 0.005814 | 0 | 0.005814 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
ef0956fd5fc7aab99e2b427a0784db8b24c1e993 | 3,341 | py | Python | test/field/test_link.py | marrow/mongo | 1a8e5fe9047b6a5bb2eaeea95f3dc085c737067f | [
"MIT"
] | 22 | 2016-03-22T05:32:26.000Z | 2021-06-19T06:23:47.000Z | test/field/test_link.py | marrow/mongo | 1a8e5fe9047b6a5bb2eaeea95f3dc085c737067f | [
"MIT"
] | 59 | 2016-02-19T22:21:33.000Z | 2022-01-17T19:40:44.000Z | test/field/test_link.py | marrow/mongo | 1a8e5fe9047b6a5bb2eaeea95f3dc085c737067f | [
"MIT"
] | 5 | 2016-06-24T06:55:44.000Z | 2021-07-12T22:33:07.000Z | # encoding: utf-8
from __future__ import unicode_literals
import pytest
from common import FieldExam
from marrow.mongo.field import Link
from marrow.schema.compat import str, unicode
class TestLinkField(FieldExam):
__field__ = Link
def test_complete_url(self, Sample):
uri = "http://user:pass@host:8088/path?query#fragment"
inst = Sample(uri)
assert inst['field'] == uri
assert inst.field == uri
def test_mailto(self, Sample):
uri = "mailto:user@example.com"
inst = Sample(uri)
assert inst['field'] == uri
assert inst.field == uri
def test_urn(self, Sample):
uri = "urn:ISBN0-486-27557-4"
inst = Sample(uri)
assert inst['field'] == uri
assert inst.field == uri
@pytest.mark.skip(reason="See: https://github.com/marrow/uri/issues/4")
def test_protocol_relative(self, Sample):
uri = "//example.com/protocol/relative"
inst = Sample(uri)
assert inst['field'] == uri
assert inst.field == uri
def test_host_relative(self, Sample):
uri = "/host/relative"
inst = Sample(uri)
assert inst['field'] == uri
assert inst.field == uri
def test_context_relative(self, Sample):
uri = "local/relative"
inst = Sample(uri)
assert inst['field'] == uri
assert inst.field == uri
def test_fragment_only(self, Sample):
uri = "#fragment-only"
inst = Sample(uri)
assert inst['field'] == uri
assert inst.field == uri
class TestLinkFieldAbsoluteSafety(FieldExam):
__field__ = Link
__kwargs__ = {'absolute': True}
def test_complete_url(self, Sample):
uri = "http://user:pass@host:8088/path?query#fragment"
inst = Sample(uri)
assert inst['field'] == uri
def test_mailto(self, Sample):
uri = "mailto:user@example.com"
inst = Sample(uri)
assert inst['field'] == uri
def test_urn(self, Sample):
uri = "urn:ISBN0-486-27557-4"
inst = Sample(uri)
assert inst['field'] == uri
def test_protocol_relative(self, Sample):
uri = "//example.com/protocol/relative"
with pytest.raises(ValueError):
Sample(uri)
def test_host_relative(self, Sample):
uri = "/host/relative"
with pytest.raises(ValueError):
Sample(uri)
def test_context_relative(self, Sample):
uri = "local/relative"
with pytest.raises(ValueError):
Sample(uri)
def test_fragment_only(self, Sample):
uri = "#fragment-only"
with pytest.raises(ValueError):
Sample(uri)
class TestLinkFieldProtocolSafety(FieldExam):
__field__ = Link
__kwargs__ = {'protocols': {'http', 'https'}}
def test_complete_url(self, Sample):
uri = "http://user:pass@host:8088/path?query#fragment"
inst = Sample(uri)
assert inst['field'] == uri
def test_mailto(self, Sample):
uri = "mailto:user@example.com"
with pytest.raises(ValueError):
Sample(uri)
def test_urn(self, Sample):
uri = "urn:ISBN0-486-27557-4"
with pytest.raises(ValueError):
Sample(uri)
def test_protocol_relative(self, Sample):
uri = "//example.com/protocol/relative"
with pytest.raises(ValueError):
Sample(uri)
def test_host_relative(self, Sample):
uri = "/host/relative"
with pytest.raises(ValueError):
Sample(uri)
def test_context_relative(self, Sample):
uri = "local/relative"
with pytest.raises(ValueError):
Sample(uri)
def test_fragment_only(self, Sample):
uri = "#fragment-only"
with pytest.raises(ValueError):
Sample(uri)
| 22.727891 | 72 | 0.692308 | 448 | 3,341 | 5.026786 | 0.147321 | 0.167851 | 0.121226 | 0.143872 | 0.831705 | 0.831705 | 0.831705 | 0.831705 | 0.803286 | 0.803286 | 0 | 0.015862 | 0.16971 | 3,341 | 146 | 73 | 22.883562 | 0.795963 | 0.00449 | 0 | 0.895238 | 0 | 0 | 0.184416 | 0.06769 | 0 | 0 | 0 | 0 | 0.171429 | 1 | 0.2 | false | 0.028571 | 0.047619 | 0 | 0.32381 | 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 |
ef12f92b60272dfada8a813c47a4b0e7f46359f7 | 204 | py | Python | commands/__init__.py | flifloo/teleexit | b0e64a571e590c2fac692703f12a2bd481a7c127 | [
"MIT"
] | 1 | 2022-01-31T19:27:05.000Z | 2022-01-31T19:27:05.000Z | commands/__init__.py | flifloo/teleexit | b0e64a571e590c2fac692703f12a2bd481a7c127 | [
"MIT"
] | null | null | null | commands/__init__.py | flifloo/teleexit | b0e64a571e590c2fac692703f12a2bd481a7c127 | [
"MIT"
] | null | null | null | from commands.cancel import cancel_handler
from commands.start import start_handler
from main import updater
updater.dispatcher.add_handler(start_handler)
updater.dispatcher.add_handler(cancel_handler)
| 25.5 | 46 | 0.872549 | 28 | 204 | 6.142857 | 0.357143 | 0.139535 | 0.232558 | 0.313953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.078431 | 204 | 7 | 47 | 29.142857 | 0.914894 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.6 | 0 | 0.6 | 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 |
ef1a6c204ad4c977b47af617bc4a048b381e3d26 | 133 | py | Python | gym_extensions/__init__.py | vBarbaros/gym-extensions | f17058459b36756cd9bb0877689ab29a729e9dd0 | [
"MIT"
] | 1 | 2018-06-06T21:30:49.000Z | 2018-06-06T21:30:49.000Z | gym_extensions/__init__.py | vBarbaros/gym-extensions | f17058459b36756cd9bb0877689ab29a729e9dd0 | [
"MIT"
] | null | null | null | gym_extensions/__init__.py | vBarbaros/gym-extensions | f17058459b36756cd9bb0877689ab29a729e9dd0 | [
"MIT"
] | 1 | 2019-01-27T12:09:43.000Z | 2019-01-27T12:09:43.000Z | from .continuous import gym_navigation_2d
from .continuous import mujoco
from .continuous import box2d
from .discrete import classic
| 26.6 | 41 | 0.849624 | 18 | 133 | 6.166667 | 0.555556 | 0.378378 | 0.540541 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017094 | 0.120301 | 133 | 4 | 42 | 33.25 | 0.931624 | 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 |
ef53d9e62195dc302d1ca659ccfbb0641789e279 | 8,934 | py | Python | tenants/migrations/0001_initial.py | djangopbx/djangopbx | 87bcd96d69c6a5da076c94bd21ffd73602ea00ba | [
"MIT"
] | null | null | null | tenants/migrations/0001_initial.py | djangopbx/djangopbx | 87bcd96d69c6a5da076c94bd21ffd73602ea00ba | [
"MIT"
] | null | null | null | tenants/migrations/0001_initial.py | djangopbx/djangopbx | 87bcd96d69c6a5da076c94bd21ffd73602ea00ba | [
"MIT"
] | null | null | null | # Generated by Django 4.0.4 on 2022-05-08 06:58
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='DefaultSetting',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('app_uuid', models.UUIDField(blank=True, editable=False, null=True)),
('category', models.CharField(max_length=32, verbose_name='Category')),
('subcategory', models.CharField(max_length=32, verbose_name='Subcategory')),
('value_type', models.CharField(choices=[('text', 'text'), ('numeric', 'numeric'), ('array', 'array'), ('boolean', 'boolean'), ('code', 'code'), ('uuid', 'uuid'), ('name', 'name'), ('var', 'var'), ('dir', 'dir')], default='text', max_length=32, verbose_name='Type')),
('value', models.CharField(blank=True, max_length=254, null=True, verbose_name='Value')),
('sequence', models.DecimalField(decimal_places=0, default=10, max_digits=11, verbose_name='Order')),
('enabled', models.CharField(choices=[('true', 'True'), ('false', 'False')], default='true', max_length=8, verbose_name='Enabled')),
('description', models.CharField(blank=True, max_length=128, null=True, verbose_name='Description')),
('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Created')),
('updated', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated')),
('synchronised', models.DateTimeField(blank=True, null=True, verbose_name='Synchronised')),
('updated_by', models.CharField(max_length=64, verbose_name='Updated by')),
],
options={
'db_table': 'pbx_default_settings',
},
),
migrations.CreateModel(
name='Domain',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('name', models.CharField(db_index=True, help_text='Eg. tenant.djangopbx.com', max_length=128, unique=True, verbose_name='Name')),
('enabled', models.CharField(choices=[('true', 'True'), ('false', 'False')], default='true', max_length=8, verbose_name='Enabled')),
('description', models.CharField(blank=True, max_length=128, null=True, verbose_name='Description')),
('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Created')),
('updated', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated')),
('synchronised', models.DateTimeField(blank=True, null=True, verbose_name='Synchronised')),
('updated_by', models.CharField(max_length=64, verbose_name='Updated by')),
],
options={
'db_table': 'pbx_domains',
'permissions': (('can_select_domain', 'can_select_domain'),),
},
),
migrations.CreateModel(
name='Profile',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('user_uuid', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, unique=True)),
('username', models.CharField(db_index=True, max_length=150, unique=True, verbose_name='User ID')),
('email', models.CharField(max_length=254, null=True, verbose_name='Email')),
('status', models.CharField(blank=True, choices=[('', 'Not Set'), ('Available', 'Available'), ('Available (On Demand)', 'Available (On Demand)'), ('Logged Out', 'Logged Out'), ('On Break', 'On Break'), ('Do Not Disturb', 'Do Not Disturb')], default='', max_length=32, verbose_name='Status')),
('api_key', models.CharField(blank=True, max_length=254, null=True, verbose_name='API Key')),
('enabled', models.CharField(choices=[('true', 'True'), ('false', 'False')], default='true', max_length=8, verbose_name='Enabled')),
('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Created')),
('updated', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated')),
('synchronised', models.DateTimeField(blank=True, null=True, verbose_name='Synchronised')),
('updated_by', models.CharField(max_length=64, verbose_name='Updated by')),
('domain_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='tenants.domain', verbose_name='Domain')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')),
],
options={
'db_table': 'pbx_users',
},
),
migrations.CreateModel(
name='ProfileSetting',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('category', models.CharField(max_length=32, verbose_name='Category')),
('subcategory', models.CharField(max_length=32, verbose_name='Subcategory')),
('value_type', models.CharField(choices=[('text', 'text'), ('numeric', 'numeric'), ('array', 'array'), ('boolean', 'boolean'), ('code', 'code'), ('uuid', 'uuid'), ('name', 'name'), ('var', 'var'), ('dir', 'dir')], default='text', max_length=32, verbose_name='Type')),
('value', models.CharField(blank=True, max_length=254, null=True, verbose_name='Value')),
('sequence', models.DecimalField(decimal_places=0, default=10, max_digits=11, verbose_name='Order')),
('enabled', models.CharField(choices=[('true', 'True'), ('false', 'False')], default='true', max_length=8, verbose_name='Enabled')),
('description', models.CharField(blank=True, max_length=128, null=True, verbose_name='Description')),
('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Created')),
('updated', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated')),
('synchronised', models.DateTimeField(blank=True, null=True, verbose_name='Synchronised')),
('updated_by', models.CharField(max_length=64, verbose_name='Updated by')),
('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.profile', verbose_name='User')),
],
options={
'db_table': 'pbx_user_settings',
},
),
migrations.CreateModel(
name='DomainSetting',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('app_uuid', models.UUIDField(blank=True, editable=False, null=True)),
('category', models.CharField(max_length=32, verbose_name='Category')),
('subcategory', models.CharField(max_length=32, verbose_name='Subcategory')),
('value_type', models.CharField(choices=[('text', 'text'), ('numeric', 'numeric'), ('array', 'array'), ('boolean', 'boolean'), ('code', 'code'), ('uuid', 'uuid'), ('name', 'name'), ('var', 'var'), ('dir', 'dir')], default='text', max_length=32, verbose_name='Type')),
('value', models.CharField(blank=True, max_length=254, null=True, verbose_name='Value')),
('sequence', models.DecimalField(decimal_places=0, default=10, max_digits=11, verbose_name='Order')),
('enabled', models.CharField(choices=[('true', 'True'), ('false', 'False')], default='true', max_length=8, verbose_name='Enabled')),
('description', models.CharField(blank=True, max_length=128, null=True, verbose_name='Description')),
('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Created')),
('updated', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated')),
('synchronised', models.DateTimeField(blank=True, null=True, verbose_name='Synchronised')),
('updated_by', models.CharField(max_length=64, verbose_name='Updated by')),
('domain_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tenants.domain', verbose_name='Domain')),
],
options={
'db_table': 'pbx_domain_settings',
},
),
]
| 73.834711 | 308 | 0.60835 | 957 | 8,934 | 5.514107 | 0.130617 | 0.112564 | 0.073906 | 0.086413 | 0.804055 | 0.779231 | 0.763123 | 0.74512 | 0.73773 | 0.73773 | 0 | 0.01471 | 0.216253 | 8,934 | 120 | 309 | 74.45 | 0.738932 | 0.005037 | 0 | 0.663717 | 1 | 0 | 0.187802 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.035398 | 0 | 0.070796 | 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 |
ef699f8e0c8d6fb37b9b2ed513482420b9120544 | 132 | py | Python | vvlab/envs/power_allocation/__init__.py | LampV/Reinforcement-Learning | 0652b9e8c2de428d3508074c6fd640cc14f84a2c | [
"MIT"
] | 3 | 2019-12-26T11:46:21.000Z | 2020-09-02T10:59:46.000Z | vvlab/envs/power_allocation/__init__.py | LampV/Reinforcement-Learning | 0652b9e8c2de428d3508074c6fd640cc14f84a2c | [
"MIT"
] | 13 | 2021-04-05T13:10:25.000Z | 2022-03-12T00:51:15.000Z | vvlab/envs/power_allocation/__init__.py | LampV/Reinforcement-Learning | 0652b9e8c2de428d3508074c6fd640cc14f84a2c | [
"MIT"
] | 3 | 2020-09-28T01:26:37.000Z | 2020-10-14T06:15:53.000Z | from vvlab.envs.power_allocation.pa_env import PAEnv as PAEnv_v0
from vvlab.envs.power_allocation.pa_rb_env import PAEnv as PAEnv_v1 | 66 | 67 | 0.871212 | 25 | 132 | 4.32 | 0.52 | 0.166667 | 0.240741 | 0.333333 | 0.944444 | 0.555556 | 0 | 0 | 0 | 0 | 0 | 0.016529 | 0.083333 | 132 | 2 | 67 | 66 | 0.876033 | 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 | 1 | 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 |
3267a17aa99bea88f38c7d7027f74f311a38f6a1 | 89,374 | py | Python | cdr_plugin_folder_to_folder/utils/testing/Test_Data.py | hongson1981/cdr-plugin-folder-to-folder | 598a589059242341f76838bc0638895603785287 | [
"Apache-2.0"
] | null | null | null | cdr_plugin_folder_to_folder/utils/testing/Test_Data.py | hongson1981/cdr-plugin-folder-to-folder | 598a589059242341f76838bc0638895603785287 | [
"Apache-2.0"
] | null | null | null | cdr_plugin_folder_to_folder/utils/testing/Test_Data.py | hongson1981/cdr-plugin-folder-to-folder | 598a589059242341f76838bc0638895603785287 | [
"Apache-2.0"
] | 1 | 2021-07-03T13:15:14.000Z | 2021-07-03T13:15:14.000Z | from osbot_utils.utils.Files import path_combine, files_list, file_contents_as_bytes, file_create_bytes
from osbot_utils.utils.Misc import list_filter, str_to_bytes, random_text
import base64
import os
import traceback
class Test_Data:
__test__ = False
def __init__(self):
self.path_test_files = path_combine(__file__, '../../../../test_data/scenario-2/hd1')
def files(self):
files = files_list(self.path_test_files)
return list_filter(files, lambda x: x.find('.DS_Store') == -1) # todo: add better method to OSBot-utils
def json(self):
return self.jsons().pop()
def jsons(self):
return files_list(self.path_test_files,"*.json")
def image(self):
return self.images().pop()
def images(self):
return files_list(self.path_test_files,"*.jpg")
def pdfs(self):
return files_list(self.path_test_files, "*.jpg")
def create_test_pdf(self, text=None, file_key=None):
# see https://brendanzagaeski.appspot.com/0004.html for a description of the code bellow
text = text or random_text(prefix="Some random text in Arial : ")
font = "Arial" # "Times-Roman"
# todo: format the pdf text below better
small_pdf_bytes = str_to_bytes( '%PDF-1.1\n%\xc2\xa5\xc2\xb1\xc3\xab\n\n1 0 obj\n << /Type /Catalog\n /'
'Pages 2 0 R\n >>\nendobj\n\n2 0 obj\n << /Type /Pages\n /Kids [3 0 R'
']\n /Count 1\n /MediaBox [0 0 300 144]\n >>\nendobj\n\n3 0 obj\n '
'<< /Type /Page\n /Parent 2 0 R\n /Resources\n << /Font\n '
' << /F1\n << /Type /Font\n /Subtype '
f'/Type1\n /BaseFont /{font}\n >>\n '
' >>\n >>\n /Contents 4 0 R\n >>\nendobj\n\n4 0 obj\n << /L'
f'ength 55 >>\nstream\n BT\n /F1 18 Tf\n 0 0 Td\n ({text}) T'
'j\n ET\nendstream\nendobj\n\nxref\n0 5\n0000000000 65535 f \n0000000018 000'
'00 n \n0000000077 00000 n \n0000000178 00000 n \n0000000457 00000 n \ntraile'
'r\n << /Root 1 0 R\n /Size 5\n >>\nstartxref\n565\n%%EOF\n')
file_key = file_key or "test"
return file_create_bytes(extension=file_key + '.pdf',contents=small_pdf_bytes)
def create_test_zip(self,path='/tmp/',name='test.zip'):
zip_encoded = "UEsDBBQAAAAIABaAsFKuI2ae/fsAAJkOAQAdABwAR2V0X1N0YXJ0ZWRfV2l0aF9TbWFsbHBkZi5wZGZVVAkAA1P0oGBt9KBgdXgLAAEE6AMAAAToAwAApP0FXBxb8gCM4hDcCe5uM7i7u7u7uwfX4O7u7u4SHBJcgruG4G4vuXv37u5/d79v33vzg9PVfUq65FRXHWYGcgURMXogAzsC+c7u1BwCLJAIQGRvZIXAw8MoZmnjYuqkzSioLCwpycEqYmpsb2JKxChmY+hi+rcTXUYZUztzFwsiFiYOPj4EZxcnU0NbWA5uDV15PlFHOQFySkp5fQFyUwF+KW5yWg4qTlM+DV5ZJTZlfks9TXNBZl5dBgkRDTEGJTIbSRkBEgcpWlEFKnIArJEum6GVrZyWHQ0xL6W8opapop4mDR2vLr8wgxCtjqqNOaeJhQgNiaWwNjcNL7OBvQJQm1hZj5ofSC2pxWLi6mAAKwp0ImakowFo03AyGIpJKjFRGNELkzrzaNiwikkIaPPwEpOyqVG7ighp2Ek6MYjx2StpsYvYkMvKaOow8JvwydrBspErMtlrmskpiZGR0crL8dDqKqlK2QoDJHmsbGQY7DUsnbW4lTVVtRnZSXkomNmdjG0UpR1NpUxJ6VTF2JXMjYCwanLqYtJmfHYiWizyKs4AZWJnQ3E+cXFpVRtFGkV+FlYuYUkKFilKfSYrHlMXKUlhK3ZTdjsFWSNeeTZldlV5CR5YBXl2Jx1JBglXClOACYUoDwMltZmokhOjDS2NOh21o54IjaElK4+rq4wGA7s5Ix+ZhrSTsaYDwI5Ww0bfTpVGngrWRpuMTc6OVktfzhGg68xu4axroKEBtNPioOBkMdTx5YM1tTP5m9sQfkG/Hc/yjwAQsnRxVjB1Era3dbC3M7VzIeJgFLa3sXdSdjA0NiVi+oWo9D8FiYSppbmFCxEQwPr3eAEysXMwqlua/ALZWf45crR02HVtqJU0KcTFJQwlZQxVLShUmWWcSLgpHQVl7HUAKkzaTg4mZDyWdhxSago29FbSGrbmlBIMpFpKPKQy2rBWdPr0dgp8lFRyStJ0gvSMvJLMLBa67Mbk7C7ctE7UBsxS7OYSkrYKcjbmdA6yknYWYkyyRs7qurSiIooWjo4OJLBOrpY6+spk2rQa/Hom9JQ6CpKM+qzkqvyOXHaMJqoUaoJkDmxMrrrEOkbMosxMEqIMtAJAM2IqUll7Ww5ydXEgP6yDoaYouZysCCmdqYiwnIsjlYY8g4opM6eSKb8ShwOpJrk9CTeTrbKqjqEYnwO1lZUyqx2vJbuglBm3M6sWnbKaNiy1FFBMhUdPkdWR1VlRSQCgb2DFrKNixGRsQqGubS8jSG4MlHWUlxICcNm76iq5WCkaUFrZOZIZWjnJ2UtYOTEbwIpzcDsIEDuZszBTibNz87BROevrUrBIu7rqcQlwuBgwa9naysmwAyllRRQ12YHMAhTMlqKyDM7aAtam5jYiqizEsHKG/EzMQE4BESZtO1kbZlNLeWlHI1IxGmpVak11dX4GZhZZgAQrDY81k4GdsIKUEye1jam9hbiTlr2rNQmHtZIBrBWlqyItuaYdnRW1iYs5GbOABA0zL4W8LSnASlVbQIiEX4VJxNbJkI3UgoKdmpHVlpidWcGIhliKwVVOxlzOTgcAa+PKa8onIGBtbMfPZWZpqibgIM0kTq1OpipBy6+mYGLFTcqjK6JnRizMpkdGTgYko+QWUWSXE9EwpTSUF3NmErWG5TEnY3fSdRKnZxPWFpYyA9LrK5Nzs5DzG5C5MJCTynKo8bA7CGgxUthwG3E42VpK6BiJ0SrLi5qxGVmLKPBy2FrACvNZ0SrYs9lTqQH56WjMhZgACvLqkmYWjFKCciTmfABuRhkSGxojRxYXe0NbfSZqGw1VQT4OcikbTmdlQykyNTlYe3oheykrBmERVi0DMjNDeSMzCXU1Vi0xDgphEoA2iwVQ3JpXT17ZQc6ORpxM1YRUmE9XWkleS4FKx8JMmJfDgBVWlVRDBsjKpsWpZk7PTCWpRU1no2RhqslpSC9FbUeuQyYsIkdhJazArKDKqWZnZ2UpY6DDQqGtJKqjTSNLq0hNQgnryEfDqk5M5sJiIUvlDGQ3MqExoDZXspbXExax0KWwZbGhszV1UrBRBRgLOXOqEOtrknM6ACwBtAbC0i70pAJqgrACFoysJnbGDNbsRg6CFFzGYnIaXOI0Lq48xkbMfFTcltzW5orUurrSdPRqirwyepLaxtaU/JyUTBoKADITVgGgM6yNrr2iDoUOLZCEi5Fez4TGTNzYRFKKhpaWW1lIX0LNitSGjclcz8HGQINfTUqHVEKYlU1MSs2KT8Tegp2byUBVGJZCh12fTMBCiVyUytCCWIXYQF/bRkPQnppemVaKUldERJFRTU2Rm9KBXVFASM2WX4POzk5J1lpXBsiixq7tKK+rBqtLxuKkpyFmKWHgYGXEJ65HwydHAlC01JM1dJXhkKdXkidh0bI0M7Cxp6Hm1FPkEDewZCeREhNVpXHQl5ORMuIwhBU0JjVRI1fl0xYFGolZ6OrLcQrwUzOoWZlQ02iz2Zmw2PKIqyo4UjmKiVgBOaUsOWlFqZ1cLGh/x6QMi720oQUsHYuJBY2suLirvCWAy0WTmFOflNlE6j/lYrZ/5OI/EycTCwcTo7KrkYungymjhqwMo8pvQNbUxdDE0MXwH5mUh9/jV5K2NnUhMjI1t7TjJTnv7CUhsjThJVFnlQXIOgibWlhKeDmZKnvJqRh7WRtzmpDw88HyeHB52DrY/uJG5GFrY+fM5cFLYvjrTky5fsG/LzOSEP2B4mLNSyL4e4JIQ1aBSNjeyZSIjQFAbwwAMBGxczIA2VhY2AB0REwAJgDjr6wPZKIHsnEBWLiA7ER/vkj4YH+NPE4mZlxKImJ/ivt1xkti4eLiwMXI6O7uzuDOzGDvZM4I5OTkZAQwMTIx0f/CoHf2tHMx9KC3cyb9G5O/8xExdTZ2snRwsbS3I/p9bmhk7+rCS0ICS/RPrz/1snX4S5CdM8MfOjIY29syehg6MAIZAIz/hUhW9v+ZzNb2P1I6uyiZmv0/Uzr/4UglU2d7Vydj01/opP+Zkaiby/83jETdfj23/yMrE+O/+Di4Otn8YWgTY0ZTG1PbXyTOv3gB/6MuDib/RZNfE7+ImBn/cspvv/yyGZfwr4j8VQz8+uX7HRD0wF8/LCpAdi4ABxcQQAtg4gIAeBj/D+b/4fH3CP9fuPwL7v/lY29iaeb5P3H5B+Z/0sfeScXe3obvb4tA0u5X7Fma2xEBWRmARFSyhsaWdi72zhbU/6TWnwT/yktWlkvSztnF0M7YVFKEz9XV0oSLE8BpbMLJZkwPZGcH0HNwsrDTGxoZGdEDTZlZgGaspswmLBx/sP1X2n/jK+9k+WvhG9qI2Bu7/vboL5xfEwwmv0SYMLMZAtlMjelZDdmY6VmMWAzpOX6xpgcaG3OasXAaATnZ2P4u4j+w+TdR/0fELwnshhxsrCYcLPQcJkZm9CwAICs9J5sRO72ZiaEpB6chJxuA2ejvEv6fOCv9SoSWvxe0sI2hszOfg5O9vdnvCPw77f+Z//c7M3WydDM1EXOyt/0jJTgYOjmb/l4gvCR/XyH/HK6/Cf9Yq1yW/7DsHyr90okJwA4EGHIa0zOzcQLpf/nCkN7IhANIb2hixsHKAQQAmDl+We3fyP8Td5N/94kRC7spkxkrO/2vFMpJz8JqzErPYQo0oedkN2M3BrIys7IBWf/O3eQ/Wewf3O3///X8f2Xzn6Q5/asLTEzNDF1tXP7OxOm/Oojx3zz07+6TsHT+tW48/4/c345UNnX816t/n7Cx/B8d/ZcSvzIql6Hx73vkM7a3czN1cjE1+X37/3T9vxP+kmP468Fo6uTMZ/Y7yAwdHGwsjQ1/UzF60FvamfwtL7jY/8vMHxH8bwz+uxRnezMXd0MnU0HzX374f885/4novzM3tjC0Mzc14WP8O+HfL/x3EncLU7v/p/z5T1j/5iTGv3np//iU8d+d+vcI+fcg4DEx5jKzd7I1dOH7N6v+Y+qf8H/NcCk42Zu4Gps6/Wk+hV9Fh4ylkZOhk+dvC/666X9B+j/EKk6/BP0yiZihjbPp31D/fgn2nzX4pxLkb/UN458Fzq/aivGv4orvn8qzX+uDl8Tpd/H1b9Uf+z+qvz+eIL+Y/n4cUYlw/TY9EABkAbIDOP6wOiUAQEnN+Odzhuo/BYjOPyJEh5qa8dfT7f+Z198tQfWfzUXN+Kf+jH+Y5Ffh+edNc/5TyforjKhM7ehVlan/qlCJ2P7YNZB3dbGxtDN1JmL+41TB0PwXzPoH/Ef5IvwL1cbenFHN0tT9V1/iZGpm+iuTGJs6/2IrYulk+seyZJRhUuLj+4doIOAfsgXt7OxdnImAwD94Cjq5CNl7aP+eZ+VkZWBiZyPiYAEycHDqMgrZmJqa/LdJYXs7l9/FkDbTH3yImJj+dmD+24HlbwfWvx3Y/nZg/9uB4/fhFwcne4f/xl3cyd7VgYjtDy6/DGRiafjfMBV+LWM7lz8NpGBp+uvBYmdm/0vNv/v4t1n+StNUOszsbL9+2XUAAIDH78H29+Dwe2D4PZj8Hiz/grh+D0a/B5bfwx9kpr8Hpt+D2e+B9a8J+t8D4K/hDxTOvyZY/kI2/gv6Y4LjL6bAv+TS/0XL/pcg9r9ogX8xYP4LYvvHBPWv8HJ2+aNIszQ1+ReVRf5Siulf7xPwF/k/IJZ/lQX462b/gadFzSjnamtk6mRv9rdABTL+e1X0/5PRTf5S7w/NDP+Sy/aXuYz/shTrXyhsf5H9w+j/8J/hvxod+K9OpP/rmvFfA+dfKCx/nRr9hcf5l0g26j9WqqqkiMyvnPwr5gBETEAgH98fV//Yzfvr+p8RzPfH669u5Pfy/ccO4u8T5V8sfkf8r4XMKOrhIq7s8isr/ZoQ/zXB/MfELxBIxAz8E2QiYmb6E2QmYmb+E2QhYmb5E2QlYmb9k5/Yr9X7WwaTPoAIyP635KLyC+T4EwQSATn/RP2V7YyVTV20GX/nOUYVUw8XXUYNeSOrX4nm90a47S+F/nYzYrZAItY/dz5tmYhYWf4EmYlY2f4EWYhYOf7G9rfm9r8VIgIwqhgaOTOqM6pY/Iokor9RqThZ2v63Ff9HFvxt1n+kN6Z/25r/513Wv28QMLOxcP5jG0AiPEtd1x53DMX7sDZNHBV56Zq30Z9YIIWcFBQRawTsZQsPLENHc7JaIj1ph6qXT5W3UdrnMYsZfoy7k5l3fWFhoVrd7xRrwu7WrrWtXYtxIVNfbmHvdBDb1MUu6prGAqNwxTUx1orZ0/VJsHJf75iiFbtX+zBJ0ap3sNT94caU/zECC+c9CtZ2NxBxIcF64cprgPHFVijRID930naY4folJDrallT/YXg3Y9R8F9f4tdA886J9aCWD4unuuxeLzj2/rjWPnuzBMOv3qMWjHQsJ2jAQ7zjx2u0U4SOulvFVCkiGqpjxMIq+DacC3MPuKxhSKO9rbAUQwIQoSzVsi6Xr91Fn13CBR85KA5zC6ozM4dIq71WNYO7WaGmxx/k2tq2jtW3Xjz8hREqaxzspoKqEjMF60ilMw7rVEyfGnsewmZ9PQmx6zXu27YNtPQ4TI45Lr868E+lisKQfFXuc0bSNjnEjdVYpdobXiGzQIOWDLLS9LTPTPhI2FCFIbMUVFsG34IhLcaQmQZZcDAfq+dtz9lMgDHDQtmnnTI6DQjBSOtRKt+V8Ji39bk4xg/1xXFYiRnNyJZq2YKTaNR3SEU/GAOT687uB2uHkJKQJ7CdJxUqwgkaHyQEwWOiYpDibz19g40XTPvKDMRFcaymMfWYgwllhEeD2bCA+rjIYrMMkbyz/QIwRGA+LU/eleRnCfvSZIs7Edg5sCSRTTbRrogUnnKDNdMO/FYZe7OIrECXeFEpDZtdmL1EEMxgZhMhCjfjBJjmIdA0V57wdYdkcBHauR8BeGwMFhgr2h2swHJSJ+UtZMWa7v1+OaGHIPjErZgb4ONQetv+gSOOozEVgY33MzSIVpJrI6G5EOZHel5V+z5L5UrWq1iapgr74aafCEpwP2qS03B4v5gIOD1LwvOnTUsmG8iwpx2xREBDCM0F2MXsTeR/KNSyGBiQGYT+T25M3ShC2CdiBWdnabFvNhltbSy74oxttK3SLLI+V9lUMIaBYDjBt0+Pd7BuLJeBz7oRhCAmh5NucdBAuiq74arxUqUdWZoU660EQvSeBPMDPKt5EkM96KIBYJAhTNGeAt4mMTW4hqbITwU1iXvNCB6cUQHMWHuTLSBYNR4KBfaiKe9W5ExrVzWMzGdVhRM3Z4vm8RoLkLCHVJ2fj3GekNx5XcL7HMQ6AuYOHB7OSzqCzED6+/QLmSsKllUqVQ7T5GcLQrYm6I5ZCkBxuSyY4kwJdykMbCyZsvClrntwuHJEmzTCln5znCxXVbIOmXJ5qAB4w42MTEaMrpaA50XV8pI1lTRvEk8JLP8HNB8Ay7Diief1nzaSBvghKdwQaHOAhFdNJ/ItnCoO2+rL2Ih3msWyZi4dyyjVJm4riFBmYkiZ5OWNRyklwqwNGuqk9aPDFxzG7YsuG0WP3A/akxImoD15HoOQ6wt313yGboLSiZI2MwZA+gwPEcKPQCxsEmnG+kweGfZpxKLTA06al2hmTqoiQ7MKy8y8MQKF2gGgT5uY8IUJFCF1IZtHMqSSEAyOWSMwx5uizAM/MF9BWJWj5HtDPe8N5knI/4CQGeesmmMGeFlfuReVYV4i1cWhRNtfEVOphEa8cSWv5FVdR+5KwfCbgCX6FsyT+WJzikHwdKB01iUxQCI+2PKE1Otudt00tFQkUIqtiHWGJPUJg/IpePN00jfq5DYMzMIzeekaBZHqOx3NZ6pg4A0Q3OHRkUsThIqIeDN5I+pAm/aNaGQRjdWdV/ApMyLDgRD+kMTwZfioHpXEUPSkokfihybuD0mhb1NchBw8HA/SnGHvj8MqaZirwsA85Iob1cYqlDlhW3xB1sgk9pwwDmaEAQqmBaatkxjDM6uoOMq3F7OOoF6LU2v4RKtyMjk59Bkju7QIFCJQEmP7UpPjGdyowKSxUWgZ3A/CUcwS44BYGxfqOacOaN2N0JvcfY6d9PlKOF0kAip5GnOxJQUDwgMtMFwEE26U3PVoNC/O74UjfGpFNv5XI8OgWRlMyOnMcZF24fLBCmfcNxEw3ydh+gCQmhU5nmqqa2ASjMiRuTNzmakiFkIQtj0ktFncYiMi/U8XZ5tDPFV9abiXk4T/OPae0ZyAAGezwenhGkahlYPg8PUROxWChiYrDOgQkypfn2vnkyPvI8rp8O4Ed7N3R/XP+bPJC0qdN7+b164nT3eqQfoAGaFaipDaKfb4Ziv3g4Opt6u3ZpBWr7s3JmZun+7qtwQff8mNfNvaHCyTrOcnNyl6b+dpMuXjctiRcrnbw7PTESFUs2o881ATJm+u+td+WfFrVKTOfV29d3QfD7NXXY9Q1bBSMhDrYxwfRFTGEzTMrh0oyPA/StbDM5Z5vr+6NwKPEhA6OvLIQhwaPW86xclu5gQ3I3rBS2U9tPd1KvRuziTp0ESj+9rAPeC1A87ZZmqGsrH6U5mOz6W9qsr3RFpV2KRaH/Ozrdusz9jvORT/Nc2pb3a04SdMio3EEmHfqNHrWxkZqTs8X1mV7s7E5mzXwy20fb0yhsEeOb/0mvpE2L1fNv1nVV8a5WKkqWe6ZvM+yVlJSsZ3sqrbmx+4Ytmp6/+QOryMQ0+ZQudSJRNWlU/V5KOGLxzsIanPphNQ1KHvopIpkFJGiMpmI7Geqnh4whm5lZ7bYvHHrXp/P6tGhKb3LbRbj617cyLWujl78RoDWsqSl7QNPeUGdZRA/jtSaNtfB92VK0tN8KqY6RflwxOHS9dFoExOt7nbPgtV0c172VioLWGcSyuw0pOnJNvQF3bhZsTcSX30JycYSgjw3NgxsjgkBhcybnXLEt2se4S1bNWxo5m7r5mgh8qfPEn2B0vojAwNrzZVh2+wuJ/9wpIZjLatrr2cofuy8B5LoQxp+cim3aoX1Jx9nd21aSNOoMUevIrualswY1cJhJZBSOEFzZxvQw4mErOAK+qfXlsW3ANXYnz66Ao49gxZvME3nQ6LISOUE109lPYiG8uKqj6bP2FflcnZ2ZljvT3qc3hlKL+HRJFyM6G9uc7X5Keyr64JEOcM8Vg59AsdiFfvQ8NXYbm/L/Ka5PpGEJCanb9fG8EIioH7l6NMQdPq5u3CDnD5QP3Kpz0pvORy6uOym3vV9y+3nPWFujcK+KQY/6NkyLoC7rlQGeK4GRGf6XXu00rJwe1EjkNpXrp3fD8yfnln5eNYSbbzMJaD7zE9fiMfWQn2TzhhJ6YODa124XTdrFojBqjy9NevOlbyUs8cOuOGTH4mMDJtdfv9G0Oegf+GGRxZoxgPONbHCC6KAsHuq25qKsoOpi+z3LQ/47f6UMdPrdB35LH7F3UKLn65FZchYBYf7KNa3/kYsBd2nYupJw4slhtOZh4BwlI0nUqCHN+25sdjLX7JbmfDnYiERr7jL0xeaHvS8vs+OVsv51Js1tP6mmFth0HP+rmE3duzQJwY7fg/aNX3E6VBAJWONW4Jdx4EsXJsIU5yXT+0Sk/Rq94VVL7HPTprJu1ADF745Banf8Yib7aqTsSikcQfG4PDM4gUOIOChen17eqXW58x/hGDJgZnllb6ldKi4q/q09Pk8WrPJfyKs7+p5eb0aqanv5uy5YBv7RBLZPwXn+lDO0OuBvLHRXtb79vbVcXcu5ENAU6lfKaE+azOQyuZknV0s0/gkDrdE+efc0LBOokVmZxX5aW4o3HDioufdZ/ZjNnmkzImrRbx1hknPkEAJpZT6bEAhqfPmB+asS0GzPtMcj3Gc2Y8ATstKaJNJ5CX8DQaGgZjdfoqf0DqHEIbOX57No1WObzRyNv2Czel8HhuS9r9coeEQfRM8wWZ+cfNk6dMuVcYaSEEuRVu1tqMsDp+y1c55OXcj9od5oHzvpBZ3n0V4664PQxd9JK95844SHpa1tSQNcb1JFFE5jA+zFPeJLbT6NoEXIdg0j1S0QDIlE+W0MLy6K7r4g7V92jgsFIHyHV+vGpnTZ7cEqbxld4jHiIkrLte5+wfjLykGWM5XEXedGY892QnUNpDsrXxCI7KHn3/ki4WgUdpRAjiGFIefIJypogPobhLybw9opsTOEtSlqMIDMZXkp21PpeHMXNwQTGzyjfNxlOak6AuYXatR6G2M7IJNEcBVZnRd6N25EFfJiDotBQmT6u54OE2/1ctykYQNbx2JF4K0uOQ7KcT94haZIdqptJZHTgS7CLYepW6WIZtnRetYXRCZE93nopW+IJZzxBZvHjPHacOjb2pYEViY6ZHqgzADJBuPcp1V3sWXWKJbEnR/GWyOz5xM9sYSDTX5Tla5E7hRG87QLeuVOhtvUvjdEhNM7EfM5qQlN05SMBfKEJ2bZ6cDU54ZqGornAX8mbSoJU5DEbaL9TSEKxwDSL42KCdKflETNdsigz9WxXpSi6xnwGmomlf98k7dB5PQ9ql8/BNC6tDrvdadhZ/PLugn5tzsagGqUkS6algAtcRYPeKKgiYTrenHsnOFfcHVEgw4VVVXmPRCxiAJqjRHfzXpAX5GmqKKnxw7GHW3BwJ3MklO4EEViKpKoT9YwwnWv480naD2HUqaM2EE50wewa6gl3zVVpkfMlztCDFlgGKLnWngLrUqVBK0Ep347A02l4cYPmBDc0qbAEUqF9MW7Lq7TO+nHpzrpNIZWRKMoV3bozjLPNt2MwuXmsqmquaTKvoVM0N9jU/BU3vNQU6/VBZf0wyjkiViU/IncIIeaOQZnIMv8FVdv98otPFrhRMS8lyx0+YLyO7rQcdmaOVV6kbDDFxUaNjbM+aWLfRFC6hH27ufw/u1ssV7yyMntXooLDVxE4oI5uG7UyFppLvW+4PqVHPFgPPX5uHi1pREKpm0L+OdrjQAtTBlmKfCfkeHG3bE87OvgxvrHGGFnY4b78LujS+kfSCjuWlv/74r+cce2P97G8oC4PjnNnRNXTqGvBVlrVe5C84lvJcs/VRz1R8Ah78lGIjFC2bC6O0jLpKgulA9IwcGb+hPcEDre5WLws93lfie8+75+vSAEBns95A/X5i8N2V3e2Q5eXi6GpT74I4Xynge67Tc9eGnreRtWaPButeIV1MEq58n70o8mvuCyZRb0+S1p0nVM96U74PDmdNpXOjqXMza4xDOUrNJlfQQBTdOTdMX4u+G2dbWS1ztbIp9Z8NIPNMxTCcd5Tv4tjtodY2T5jwI4F66UgukmZLUFXDMuO77LHUlgYBpnEVd935bamEmH8mhNruXVWn90yVSY3fd2ecEVLV3rVMvmZdXMaTUhiL3jfU79jJE8YGPjNbddBtgtiFWzMa8yKVeGmcu6jG6kPW8s0U1esdba+12hbW3i0xkJ4ux35PBtH70yS+flCbNGYqVRgOpzHhEzvd+EC/GKtG4gONNZIshedqjot7aO/EOVpV5nL6kWKveLZML5C+rnxbDgUFA+6Eqd2UpLc3Gzh+MK+EoM/OqxV8mSbVmquw70XxmVbGcxbM21ysehs+FQVVl3eNbDMoft6yNh+Jli2be2U37PKkd+BPtW4gOyg25+QPOu6AURblcWh5NYDeMedBg1PBKlUAc8xlVyIANLNkLOMY2vglrsJ7idgU8TDXXvJSHCG5kQrolNLE7FHE+lbxhUTOwsq6CgW44I01ZCJ2GRmrVyxgoR4O0RH4wp9SqAhtvqeBb16Cp01TBHAEpC4bZyjL1JuieRmIzHZ5j5P0JF93MUrpPTMT0h7wy3yAxLOISQN/6hzO6mRnWzoScnxDci9KWSRsO7B32M+wsnpdcclUleJoV4f0cQOM4Wyg3sTlZ+qhfofBzBHq+LLJZ4kAddTDWFztfHyPYKmFw0KOlkHjkEqawPg0hBC0odWzpzYqRYaYyo+qQTafipwjyn4HTCoU9jRZ1eQP34WccpDbSApPJTdImhUsYQeFKpQ0N+XnMWodRYdCkVaHCyqjKtZicNOT6gd5fyLh6F+jyJS0m0/BdH5IWCVSsCAov7kILTEy+Q8YhYj5TYRZ1B7IkqeaKmFgbWgv5P25RAgXvUY0auibG4u/oOiMAzGjIsUVbg5nV4gHjn30Xr0bGfXl9PV88COsL68aIGdEI6OmOrAcLnBQFHnTNCvP1/PRiAxsypQdUqE4S7GECpzJ14l98U81dDqKyRD+VA8B9YJFkV1G1+Vrojl9RzhmB2epFPo9wZ5Firxf71l6+j7A+vJtvPL2+j5R2MhI173yr14RTvZm3ls0XtRf9YdNcESz5jdHBexNpdKWOZXQqk9ovpemBOl6R7xd7zfBTb3dHZdjoddvjELwKqYBcNCdYkdfnwxH5Kf18a0HR0iDP49d7hxpuXCyv1ckRkykuDBqqVexC5LRY09wcB8fZSWImDTCxXw0qvyi88mlWmrZYah9VLO7G8v12hes95nFdt69f15DCJn8V9KJoKfpUF8Fz2MP5a5LwiKv6bC9V0/mXlXiOlS1ougrZd74qcp52MrDOaGvpgwvLZLQepJhMVH9W9TlkYgHA3acpUoMxHEeQdJtzUMYMhwqsFvOABbMAtbDrJCgE5sS59mrWfh0b2HD7IdCdC0x2jGjygN1hCuw5Yu7TMhWSFM7lPY7tshZWU9mSlR9DkmMYynyQ30JnPoOsrCLvQD4IBvahaNZsfGZ1XkOto7jdrUiJmGEW9sdaaGQmnnYZiD0QbjVH+4iiUx0UEUMHYopDvSLsMOwPByfv9rAS/Kn5J71RXHB5+CZnb/DOaTPieUhwib4lkzzLVaYrForUUqT3EPpPj/V5MSFajw7Ms4Kez2E3xfgUwTiYDXrH/Okxl8/w7i4IQRfK+kHbECuuUGQiH73aifLBb5Yx8R2Yaz3Bt2YOOSOWc2Gg040/Vn/DtAoSsbE6i+I0hApSylDA6Gc7keeZPJ6kQ4ebJM6Tmw3UYctfNjzkysJGTWCpp0nQObHdhEy1nByhhUAaMOBTxw7WEgGojptLBtRYjsY9fxmMfh948PfbToa8HDCmfNqFSH/GBQ21n/x8Y3U2kCi6xphj1EitDQ2jPBzmZSGtWUAEQmLvA85HJmpGzNzeHF9VX85Yn/7BSeXB+MOqZ6lEb43y9oXrbsyQF/1A083nB3p8dZPUJ5RrUw2yL0xPwXTbcZCaA6q4Dd6jXUvfBv0tNveWgGxGQajKHLHVoeQy/eYxlDB2QO9ymxkY8Pi+ytK6LmQS7vibPWqWqp1nsdkMV+P4o8GU/BGhifxdqFmJSLbUvbAMsliQulbvDbHpFkKwtptqwapWJ22plSE0Q4W1ZtsF0u0Qj0/thz87iMi+8013ab5CYVRuamzQnBp44ruvlngCouYd57qo4zosciD3EDPCfmIAyuHGDlV+skxdd1kQJB4VeRJnscTulHhm4UQebA+sMeSYg5FGHqab3Y1dm02XdXFIZmQeun6tHrqe5r+qZgiDWh67XqaWY1IX777usjxkT2iKPBzyR8xRH2gW5gjQ0D/eXUYUXMnhsUe20+WZGsyE6j7CoYr0Iv4wOCOXc9iuy1Mb2UDNW/rxx9j19FGVrsjUdfTRrWenIwxG1VJoyQWJ10Xy06nkTddi5JGs44zojVgF1owx+hWJl4Nvq+yNEEe43ufMIwQu6s8EBD+xppS/5bDYL3InZ7pNvdSE9/a054HEclGD2FNtP4rtFnwl9lphixTixH02pKFNEr7d8kFpzaKfhiVNYni7zd/ju2Z0twqUUCmyECJ9ZwAt9xMQeMoVFLgSh0rgV4rr4pDg3edPDXzVxbsIo4P30grDxufmXXhbagQ8Rad/FucHIpmTCkkr2Nuzqy73pX2NH6O+FCCuvEz0pz82MZDuoVp+I+bQWGvwXOh4fw8L6kc7EjpyDicLWX8rKjBIICPEI4niydwR/QKTZl9kU6ZsxKOMI2ScE9LNeiC+7X1dwKZZMu01bpUAdlpu/XQ4dGxUEf4j7zD0Rs6f8QX5+bPZveec7rMRmuZWor+jTyXqIHES2SWR6XeovF39Rf9osoAT4E15VI23hVWHZMTNglUkGQIHQkXFzvhOgkJrImh8z3iSIOG8zE5GyHAVG4KXtoycnuKnUhF5L2trfWLP6N2HKlJHR82zLHnM+FIF0/4P1GNcw5GKaWm6G+jbGradQNiDB7IALEwx/pGkR7Jhn2A28s08lbmoFd3cPTs7F21WoPxe51iVAnCmEU1K1vAdU7i4efmjDivlsMhFFhvcayAtLMQ9dZ/KGtYLmsHJYM1H+9nBM7yIkhYHRNG40dXS8tXT+b7iDWsKEmwpgfdJRjxza4pQhTbNZ6HxtFUeFuzHBgjIxhZI0IYe1hcJwdIo5e7KAY1T5ptrIWiX2Y+IMDknLBgZzBekLPDoYOpm2ErZYQfTPQVVRIuJ5hFlxqpTgWkdFRHh0RmEL1AGZOqdsJbxhBMBo/QeWEjA248TIhCJB1HR5YnuGGy8XVaD1dXhjjLxdTVRYRwi0wfzYkYfkjzOUuvS1jCD5IiFHBRRT6/uopii3aH508M/YpKu4Fchfzy0Aek51iN3/RqPTa1cVoJekaw6I6ZNPa9Kpiwns0/WPl+lP53q0HlmD98hd4vaFouLjQDKmhG2Qwu2QjF6TBrnisHVCvnyNuL+nXQMZUCB456aYqNiQ2j9JcccDfruVfm0m3KGF40jXZAFBlnoqSl0/QLurhAUCuviU5J6sDIxlt42bWLwKbSL4bKZ/plHI6OQ5YS9L3jk0cSKkX+O64tYJTicTtn6DmzD+t4VtV6Twe2ETZ6fMvHSEV4DhefyTXVjKF2189fw0di6QiXoeEJqcDV1pSOeINb5sMbgL7kf2WnsoX/CVXdl6x2ZsaEVUL5cmkBgwzf5nm+d9ZfWMKEty5fWBNonQUQtJzfp4Oid13nCUYSlWnhzpUEKuHsY1fdxweMWDzgS22xJtPmoRRU2xoB0oXcwQGMKbapisw/3CUR2svvLlm9TFCdWRvKDZnVuTr5iZoaA9hXAYexRwmq4TupfvO5wcymebcBk8BC3IVt1gX5ucJUKcMkgywec4ZwF6iH60Ujx9msmjZ8efKwyWGgjbn7RidbEeHGEqUJLpEI2qC4t20wjz3eA156JvJRXLZeslIiIdhCzG69+hrz2SuDSn9qU37mKbACdvsebWLqua1B50j+jdX99O9yCJtRi5u6LDpjkBBAxJ9mWvD4mn0E7iUHPCn8qpgiOBqO1KkYG9vqvN+4icXdslFGgQyrGwkkX3Eqnw7wdkm3ii8Q1Rk/II2Fk64CwZ29S8nuRcb58WECvq2OIK5hKDCDDfPmE4C82cHmetR0LCwiEni/DKMCCeSZrGNy0XQiznI8fEqd6QWa/Owxt/SGu/fxc3wNXb+ZR5ZqfIyPv8a0Ku/ftGdBpzjoYF3Djlm+3zLCrCBnjwaDGZcOs1KeoGguklyjY9p8iiIoqHjANipfcGAhA9gUgQ3T30sfFm0mqn/D3EWcQqI7OT4jY8MuZUaX6W1E/zpenE5OoH4iYy3DYWrgucjm+1/qBwYNA+sKL/IeujPl/6sqY2Vj/uSuLUu/81ZVhTD7TcmE6aHtfA9S2RqGCX4PhqjAmYZHZLs47KxDHfmKDhia2Vx1/ufa9TK7RmnuMULe/9S6mVSdtmP1sRA/XjYQnFv1MWzPfYj9cKTrTgi74PBKwSmrKZAnM4Sdog/g8qg4TQnWp1WOELZJ/zeaAY8KmdDhi5Bn5Vb3xSeHkVL2XKptiqXguAbt29kznaZBW05eI6n5jPHTCa3Mc6vO3TNu2Lbw4TJhISoa7612PBdp5xCRckfnKA0GQShC6zCOa2mbaA9/QyIoLHgc54881Scwcp0kpb4TB+fzVzNbvX+inap9L8E5sWht1iTijRIA1CIBmR1bH4psmm7ix9dpZAZz1m+QWuOw5+mtx2DHrh/IEJp/xXMeNMcP6rFzlQx+I6aIh2HT0Pqkq8bIo4W8J7FVTZTIXFJaM+5eOCuue8fVySAjEdixLCj9DmdCv3y0eyNsPZSla0aLvLtila34a5O1peaXoPCs53lW1uembaCVlnrnMRhgpEFOF+opAEB8m0m6O3OvHbMb2fvvsAvcA16rHSUKqXaIFc/s80i//gouthi5iKhb78Hj+TLVLMz2yPRJYu1wbHPzO8fIlOntuALTULfmoNIJNZUG0R7hX4uu368PnqdIKDLlv5Ln0AcrHrSUOxD94FEEquhHLfe96z7/40epwy6HcV/YfAPww8l83lxKfbtNnTql3Wfehku0MGjCue1Kr5WBGzB+rPFIOHrYO6vI5MNQ2mPZIWK837y9fzhNfmEtL40pvitETRVOX0Y/qougcb4CKPScfc8T2mUFWB04euDVMaqfo9HIfewkasAJRRpupDQL431Ky6Rs9SbjREspbvUeyqr8rQ1cH6LIiLqgAS/zOGtPoGsHMgFAV+p90QJo7rdKRdW3SrC0s3PSJpHBt2CCsCZF9TLhCspFokmHjVn6IQLIvv6H1kkeqiJaf90ZEFN/qx8VKyu1eHUCE58sSc2jnzL7+iAiHtbCU9fMRtTsX+hkxZNnm35IN3XvA9HoSWi0jLhORAvZwNyJiwW0Q1XvE4SvWpcrBiiF+Fq7Ekhe6HTDPaoZ6KN1eUSbjjElfmWCVh1YQoO4YyqYKPjR1Dp795Sej6yTc7Um3jZqqbrIQagO9mK/giPEBhh6DTHWhoU3uGmVaQvElXhSkOnPikIrEmRUM1AgIF8pLgoaD6Q/nskRYGJ9AEVcALawT3qHAlLg0CU08ImHN2Fb7iBwCXLaes/s6NHjAT/hKukvpnXpyY+/lRkGVJnmIdLlCsKApH+EcFirUrSGCMZo9On3m7IKe1DwcoRNitmiWD2OKfdksVWZKQyX0VJaX6QqWfSuQ1wzWqOJsYIuUZVpUccsfk1S7/ThBtEaqFsJVho7q1WxytieYyoO9Zn1MNeLcXMRy5uqIGO6xDtApXEwPFGQ37FahRu3thE4sGSza5r4TCu297pSUSWyX88ltkhENTYWrtPaff2kybmDFjujwgFt6CIHrbEHJSm7Q1cRusnavopVFYf1GeMdSpIymygrVpuJbDiuCv6fKoyyFkVyDVIQRM95u8Jzm5ZgxsEOVPWQOOGQG0W3AFfHoI4PtqpNIk4JkopuQi5bzKNyVlrciGKXJeuZJGC1iRHnUks2cfPEi20VxkZOpzd9zJbz8BngiaWLoYEvEvXcN0yvOqoGFnU9zlaz9hDfdv+YbCiF+wGMG21HEgUFQuWKHTtsnk6SgDbQg3fO74uTwPHpOKiouV8FZY96CdTW5WQb6qEd8jhATEdtGwvBU2ai6VvjiFvwTtPUhukiNWK1HIeEzU0PXTsN1snCWVr6z61L2U0Np9BzCZSiXrY6twuInvyyCyx5O3mYtGoPo/bfhEK9NnLN+JNxpjYI295ticPYNbV4V/RhlRxDlxFJRkN0W1gav6xswARnTDvPA/XaE43nPie4zeHW8ErrY6fkBYXYMHcXs8U996xXpH+wu5FDdh2WI3JU53AvWOUt11DcWFCijFIt36UOzWJyVy3zlyVJHvXla70DmLlhHmaXMNvI7Z3egcW/hMxq2EObYreKbA8400Lq6mYafhtcpqrU3jNjEORD50mZ5aksIEFti4KT8esk7szZblk1t7SG+1h6XroYR0eHs0xg36T91luV7ooFIeF152Ef/uMiwTiMFEQz+YR9PXXWXwRvCMRU0zCSgTk5K7nFQCGHJlFVjeCGk+Q1g1sqV8h1McfUzGqyaCkk7NH14m3Ty3qjBAQ5mta2UDfzxIAeGCba/kVo3TtvA9Ksi4Y5Ctklgysfj+tGKgePcqws74sUZTGTd6dlie1EM+K0nT8HQ474KjkRegRKqQmODUKONCReZpeZAyIegpcBaVTwe0dOgc22j5fMcxfl+c/7tQC310vy7s59CGm6Ti61s0PyUHwSi9zSS0xB8G9pbQaOI5Js9guYb0VBrPoC/CYPfhcZzKlRx3Bx3xiFl0PUuNlBCuizO8jyD+2yo+/UhsvDoPlshLeS6fwxMfoxyHV4JnvPO3Y+Xjn3U+wm8GyZO/crApDZMBBn2NQpIruuc3fgYyJ8EHzC0pJxqJKO0N1PFeDuJkwzHe4m2GYdbtEaRb5AV7LVGZhq+35IMeW/Rik+8sDqw6oWM2K4QYttDlB1vLZLTyOdE3O6u00eXO32u0ZBgPxRPNBqtajjcoDpWcN29ZJ5eWW/wfbYH69RhoARLPd+8476yUrO9/4cFomK9hA7ThwolKhmABlpKqcUcvAozazdNoxB8nzlNRbEaOzn1gjaqoaWrKtxdmhe/Dkh1FbvsDYalGkSXOsHCAMLO27yKYxD3mP8Mzne2bD6V0lAiiidN8KxIiWm1mAqcphCAtc9PnWRKnU/GEV4U3gGVKahw5PzEhA1UJWZoNLpsUcSVjOpW3FL6Q6xNmj92cJxJ1RwR/BqzuCOzBM5x/QJl2DnIGIEUn0CUPyDV4mLh7EexPAqXgVTHzPo9Q2yLyUlf56USX2fLzOa0GXfLGrmD6sohqao1Aw6kQ2jCWgiB/py3z9o23xTvoBARIplpoQ5daMd9pTMo6eohhWQSAZapoxXYc2i0jZmxr7CFWUkH4NE/8fbdVs6m7y9fH15hYNHTsg+n7nNH9DkgxECbvMUEHlNmXhEYQ++RlJiRdWt7+kpMYBsHMImhayWFgQzotwwOycGvByOvSL38fnrXm4k2/ex7Ncz6JfPP96RKY7Vapf7eSEcmH8thpHuTh8H89UBfcdK7tqz3NuBcg5pA7GiGXttPbj8SJElG1g2+gx3Li+ePKD5jfseNE9CmeCpbkZNPCKBAuZGK+HHIOGlURCsiaGjk8oMktzjPN7Yl47b92m3xNDDVq2fh4bbVfvvlLFPlw+HjWasfvsyz79sh3SH/1O6Sn3fkYa+f7yVyB8XCEFGsjqGbjuJmlfj3cK1pZst5sv2EjNLyqM/1hE0lWIUfgmi58AhaRIfrIPJ9glC+Ohb6dYfBQvMQ6OGrxq29YwxFeOzRPVUpBpwD3Uc+aL49MT4vNJCIIkOcX2O8gkPeTp500OxIIvN46K2EoIi4vL/XocSrMjeCE+jYN6QaNnTq4Sdjo3xnlWltQKMjk8rZsmQfxyqgqgT9QQXjFXkYcLKG/wghc9n0U2a4LJIvtwdkGil3A7x5ip8gZsSeMJfAN7uXcJWb79lHKN3/56kaM2KixJkmZDYJXL2NfGxp7eoU2vqe26ti4A7OzoS1gOMXgJEbLc+PNmrGIPSgSeFjBeFA4wuGrUoFt3Rp53N02PYSG49VKGbwdlrw5HjzkHD09KE91rzQ7AsQqkZoZpR2o0Xz0IHUbceUAydbrywDEwpBrcKHOHmmBkoVopzw9jGBmrMvPN/yaYNSThjG6Yqq+OB1PlKtmJAUrqKuRkaTObb2ut/qapuPsLWkDKUfU3xyXDU4nHboM72CcrQKGk4wC9k3+0EQ2QG9/MXARRg9WkFT6+NGfGP1cWI9ySidiwk23zQZpLc+3OXPnTv/SBmn6X6Lhg9dshOYUVECe90RnAUoPDhWJddrvJNzeBCWLIqhHER1p0ZzyJAml77S306gmEgrfrj/nFFKyO+Z1jUkdBFUZ7vBVQggFa+jX4V5z+53NPpaDUNeiDRDhuQB9n4oz/rilt8cc76tmBX0Cg6bJ80V9w6naJqbXZk9dpDP45/k32QT8sZt7km0u/V+oBzTq2tVvdfpwYJUgH2qMMI7p356wUFVPRwzdPIGyzOnD5bxZi3Sry9hOy0aMvaRrJVd5B1lBkKVdvoHJi15Sw/xE43I+1HkRMzP+BUYFH/0M0Y6MwIdBunnVz8sRmNu3AGy8R7mBFlJl30HNKdv5JerJRZsCCYODkS2i/vro65fr5oXn+aXObsZUsm8EVBlbPONhEE+9YqkdfwqydNO2s1I0jsy9RngWMedbaw7KuyUPs8mUXDT66U0TB3lBUenMNgDi7+bUmDexF64TqUqG3wZzDnHWaLqlHv+LLGpR9Y1qcqqvdoIAg4ifQQe9x9aLZb/pdViAnL8y/sw99THYshYkbsP1fewy1HPJ7AcCBy3wKUECDvi/N9TPeo5ZtM1lW8mQYuwm+f3U1u+bGvkkNo5wvl0P1aHdWzspGiRzSsRq2gRHPXomJka06f7y0dJXTTMt4twLLRsgBVdDws8I7SLSWN0VKsu+rNz4eHLVq06FRR/CHvEwJXW30zV3tCp8a/fiuraX/6ggtO6bKH7tanahkB/Xaxius0Yz+vQlbpaTiQMcONHeXTi3bk4Dtc42diSiEBjBN5Tr7knkDANjk+6ApLIVkDRUoQzjP8wrtoy+3r0LcT8+CRKjTXyrU7IhvXFhE/UVop/fZKw5WAuOKK0G9F6APlWw8AzV8PFPf0FmTR3SVu1lqptbjZjluW7pO66RA9iYihHDdZM3FcE06O0WIu23T2OJg/z5cAq03az87r9rK/YoPGok4qG16ZXJIt7ZoknHusShvFu9VZF26Ij4X18ScQ8n50RS7oYe1/rvLXedHgHvm77uSHMSmk2hmFY/Tx9rZ+eF96b6W05qVNboXCcGvkCkgLpoJhXZADeJ5yjROLipi528wEZOqRlylVH0j28iji3Om2h9wRvYtS4Ra6c5zkUlbe6Y4bDPwRHOM46EBunJr0KaWnP+0o2zSfxdK+ARB253X4CaEBw6J//cQITkEGDCRCxeqs8nu7d+/LS7J2mf2n4UPtQ50OP3/Keg/Clt87wjQP3KdVGozcFYfd9MHR/12aZ/1vom7DNkbwNTCWZ1r723Pvp5j0/RUIUgq87X215ajXypzOydiE/eZZl5Plw96n3c2nkQjhvfTBUdFAigEmcmSoKLNUPV49rSDzhnjok/PpkNQwn5e9PzFs+KMfgvYwF633f9ji4Az+esi/vzF3tyvN33t73Hp66B0N85zKM86p9vo1fMvnWBYk1dhR3iAyGbfwEhfF8gD/T6rt5aDrQcuLeeo7+/VykOCcS+/H94/XytOVG0FetWc2E1Vc6dTP7J+5j0YmNsB8+eoMrb+w+wNSPjp57aiS7n6Z1CzUgs7chbUcLe311fTXf8wCTL2oHo4xmPNDKVxgFKCmbwgDZpdBHLt74D26VfAePKxihFjbPgVa7n+2uwOVdGQS+fYyxJo+kJPU4+HBHZK13vhXD7IZq5DQBlrM3GxYDkMxLiwERNhkFD4PzN+57xQN0uAqkiMrHentMf0JdacqaAsxfMKUwo4Man6GMVdscf8hw9DgLloAMIrmEkE2g4xNUFoIC9/X0gvA9PHYJ/kLOqfQlMnB/U9MJ/ccXUa8VJ1tlBD681k/zYq2FlZwZc/DUnJM+3CkGPVu8tsPQPHPkMTwVc9BXPjkASHvvwDCRoRu3HxJOo8EIEqkVWBw1NApMauwN8yMaZeZURtJdSIT4MzJMt2Dk6TaXHxCVT3fg0CdWdsDXNEWOz676eQrd+I0bTy++9NnfvEVUoPN/EkkjGsIEwwTikIjbqPHDf2XtbP7aYse+l4omLLSTl0K+WOD1o3HKrH9OR+klJZ0Y8gpSowXimDvY7hYaUzogNDq8cMDyx4fLEZ5MXB5Je4UI7GzbIawb5tfwrs/q8SUoOFSfNOIkcZ2xCUngdkvXmhJThYyDY9XPbusmvIs+VzPeKXOEYD3jn+Mudf6kjKF2y6wE0RZgNTugRfHcxyJBWToLGcxP0LPcY2Pk9hCpcUmPtaRtb+TP5t29fjNUcmHg5UcDoAvALtwJBQTv1TKy+EN6fXILygeF6XusBCl6xiL75O4iIgRNtDu1CLrp3VIYqFvrilyDLz31Bd+1p9exSq3OvKqpqoazwBDdR1VumoDL9SeKVbFOK0Fb/1X8Mkjb7MKYfLbLWLEMTM1c8T1k0ElIKRgvcdM4c6cqnxgWmLsp5ckkE/wSDMbJBCBVQ23NQ/Kii5mkortqgST0SYWLCMKzUUQU9WNL4F0Q4ik6Qx38OnRxaktQHkWeiC7Z2tLjD4FumgOcWhfgqJj+Axc9nKyqmEo/qGkE1uS2lbtSmUlKsAhqyBAqp2hAvnM0Ou35eA8QNipiUd7JpuAtXMRzcyEi3bpECX1EBWbOK2/gVhW9VeIsWZlC8kQqLSUI881NdC1eHTw77efWzfMRW5NS3MPqdwUoVO3YGcKz25NRjBqhpuwr7pRNRTML/IDBvmpqKPl0VNyfe95veukkbkV2jjcZJEU0Ay52BGIjRAQZoZ3s6HPyuXUYQaHVuRzo5UqeWVsbMlQtekJrXPeoShhT3aKegYcZrRr75Rbn5Cx1dwfbsId6Rg4Zdlle4W5H5EWfRtGyrN/G8H5Oa1yqTnl0ROi8KvQEARSt8Sfc0Yo80l7mz/GJxj9ikX23+lbkq5hzQw2sHyHjFUf4WrJZVeEnoUo4XIGaBnRWRtC5KqJDQSJUcko7EA2DjaBd8r315L40e0WiYk4AA6dk+5Bo2zyOYcpIJYMyZw0/Y7Zg1KEcP9rNyI0YYhnmjnj+WUdQ6rITZi7OneCmG06e+JqtogfMLXvz5oANqyziB4A9/TXTtEL+upk7Jl+M1ZWn/obtG4ToVFjjR8clC0+CDTRcy1MryZLqM5TzYBa+j6SKuiryUYmUMoL4uVvEivUNIQXZ8RrLMoK3YOZiFcMSXY5GRV4GRVwbek5w9yTgJ5DQgwQ04lAquXpEtHkWKj6wYcfQ+vk2jK99+kkkbgnb6zeBqvJf7HC02R0fAXKd2WluD2dRSIyifHOVa9pjtgpxqu3KadkWvvxfOTR3JweUdi8+6zvnMKf2IJRGMDQsatE6e9h/AowOUVJRVibLT08exewadrfy2vzY6m6e45w5A+LRi699i0yH6i1CK5q1e+lUoMB4oDLLBxRB9jqHMSGaRs5MGwCIKwLk0Duu032QCVSA7KaSvAZ93Nxywz/8SFYv+6W0TOdJnTeq95rdrPdimGjgnF/c9Rf9ID6CNJPhcf2Hkob1f9o9BjIB/rmk+aEuPWXSjLK+qe+4JOFTP3FuS5SOICKIRm09D4BXQvpQt3XuLKf63afzMQ10EFa0sP1sd4pBPfnU8cXs2QhOHL4ht/c5dum85fy+Dfol8tPP11HBqxxpXiV6y96e1QdKX8bto+bL0pAu/R3FlS/3Hbp7o5ayJaQHbW7YsDr7wpmt9JRA5RT8QqqHnbznU2JdFUrcxw+QtJ0To+KRjuXJMTmlA0hS665clSYT8k46Ufh5farT+8rZp5j7VKzlZnw3zkaDUyyMeMZFxbgGSY+tjiaamfAKNbEySdX8kRkJN8jPQbRG3CVqS2dfxWECe/3exnp8XmpXU5dqe71uv6S+f3o+c33HPexZ7tmk6c5xi/eaB7EsxieGg7cIS+p5v7i9y33lHlScsuX3y90payXF0rFOcEsiesUTW55urx4Ctb1NmkslsKT0BheTqUjnwh0mVtQZF+qYGk7lQtz0yP2YHik7XRxSqBbREETRM/sEGM5os2WtyEhlixFKQwpgl6u70sNYBJPHgOyOgvzEgYoH+92ZhORS5c6nwMTGwdCflGq+EE+vNSt21PsyfDVlbuYjPR9ompXejhygQnspmNpFG63mAr10ePILuoF9CO5KA7f751FK9iFo/o2WLT1mvEWEYE/OpbNqSNIEuPecQmicBbLPBG0WfXC9tF57Ft25BZT4zfsYvI8SpLVHjkXPNt6C28bTaxoXix9XrB4nBxobQ33sehXwWPfKipt1aaDLSKSd9b70ScQgc02JZ31f7ln66qv4maR6+8Q7WKNuxFcRdWou9fpporBs4jFpgmel4hD363WdX9B77dZ77lboq7NKsHqt6fuB+OTbc2Ps+yXDj9w3dVkCusjraxt7gx/9iR+CkJW8LbAIttgJY4uKtUgLC7rQ6adxOBC/43AVtFal45opvLY5241R+b9ko8qnlQqGTkH8zDHuPqeekL9tNNvT2RH+3p5lbDO07pTPXjTn7vc6xg/URSbhP3t3n109u60tlWHnNYEnw4ebIC6YLChkyR+r6t11IdvvrKakCokKcIIUkkMrOz6yw5dlAM9fzyvJPzJ98Bw4HS6gbKDIcJ1v9xRE810/gMBTfuZjN79brA/mDnbg/vT2HeO6O9bLGs63/qB/lisvA35+W+1EOG7PrYiNTkLBG1LUFerD1pEpZLgwVLg/1SDrFyJJLYzFlMGIzZ+oWC1zNatZH3q0RwjIKKyhwrNvR5iOk6jL7kW3HtBpGSiGSwc2JSwzCLS9vB8KvA8K0cVbEXBU6XpVdKKzAGAGey45R+LioLKjM1osD3BHjAYfG4hWgsazNbjxdI856DgN8R11ZXfrAxukBLhIDuqlXpptkHBY1MD5lkWlOEwg0Ec/u9TumnBJIHdmvq612Kl+82XBPbiovm/eHNeHpkKt0Dt/81GTDFYcd4FIPNtNigG7b8o/MIw38RKYDulcrI2/FpKAtf4RIzho/XONnfJiFqTbAZj6eQkKdRMpLa4nazdTyd9L/9RcRhJuRVIKwmXA1w4us4DhxyS8XpUsyiWGYh+kaTuSw5CyRUEephrFvAD6VbgCvpFbMOxH2JF4+crQguWbWQHa2M9CEVZBJqMWKC+Rg/m1NQGOyOQ1ZWpbXzzMtsIpPRpJaoCKddVXlwuDG2bxzuD7XXjJsf0/g8oEJ4HYbCHovOBnyyFFxiyfthR5Hozi1+UgRcWKWXwcLDvGWTDwFty1/NkgDylXho8xE3somWOGWEVg5/VCpzG/EfHbTE7uoC1Nf43fj47O/4joK35Ysv3529cnKfwKdAKWOsgF9bA5HWjRVJc9Nc6VLYoNmLVB6cEC9GO5Rbtl458md0fMY8PKksIq1YFfVbp9cL9yQ9dPUSrcwoY/mHztOpy8p14pCBWW+kJQne9kiDep1AxvhJIMYnuxYW3ILyzBrEHDQHcpmem1cHp3T1/LiqS/HHdJhOwAITDCoKOp61+eYJvf/3nnsNOBl1gu3MbKCM4T5wmLNvwoWVxW82i5EJPV0gxeNjik/treEJmsNaMWcaatVLgJEwoCnWdBUw5qL4KZ0iFg9CSHKx2xpuFjnn7xyseF1gvNxHzSDWkJhvnjaRkeOBgiH6up7rKvuCBD8AYWcUqVJW4ncxIhfYsFcOImLEsnoUAsFNLqCkNv96LZpWXeCpghHMkj7Tgny3Bhue/Fq4oS7GQJtP2nieVECc1PQjSxFV/uzMy2Z7cVGttIPDzqHgus0srDAGQYylPfH07kWIuoU5LvjnYnQ5k9SIU04ebAm3hAg6HOPhCDZ5JcLVBC1BY3qfEVONjrulN8dgOhaZPOv967Ce0SSCQWG4FgRPi5ZeBCuuRDbKY692SfdqbwVQ+trGlhURheYeKIgmIThfCDuNim6ySYaLmNOiu9xWa4THQextOaup6RYFHIZTzk675NLvyRndG5wbcfTx5sLPSBkZp5Q5bS514kCSA5HcuxCdmcL4ljcqLjJkm8HCExnI745tj9O80mPz+nCOYhZ3yPKeBLi6uPMSx6tNxGJNcZNdWgdUA0lvCMQTgbm17K1emAayclyK9FGLpz1l5Gd5Ek3OOgr2vM+zhQnm1yM+g4rRLEfpSAiaoSsgNjCBxlD0yZS2inEcEJkf5ZBWNj6c1cr504mQhG0zhqlK3xXUQ1RsXIhQ+CAVVThFxT2X6AF1TfFLdI2Rax8d4Fsj7B3YETVk6CQSIJxBElViCzFn2w0FCAsQb9SbBFVXDM32fVQPwkCLIaHZ/S55O/CHJzhbX0gt4XijmvO6CkCB2iHRTFVLiopKJhWz6RifiNfQbIptDxFxsqy3TueM2IkaArkmLAyUkePt5icYWJ7PJLaEyzynyO9w8unDyrtmiaN9hti41PC5vc48bDEJw0pCQC5ICMAvza6eQtvmj3cb7hiIFIpB8A+Miq6lgEGqsyCfNTKdaKN/zdtTFlrQs2zM+oP8F3xx39h9hCkbTqVSNIfrTgKyZ+NRGl3HKD/YHIM8MhSRmOS7QwSri/KVtIMESfsGlNHS+1bnxIooJPF3jsjd7vsn9YVL9AiEUXKJpLWSYCg30ldqcsfEP08xtIVvkVNLeHaglaQaQ6KhrO8+P0iN18DMIAKMMwOyl6skIWSoA+lCJsERK8nmvrp1HM2b2sdmBacQsr26HsfOYbuXULRSL4CGXnTJF9SILnR6QDSNY5mGAJGduKiM8qtS6Ro3jrHFHis6pNGfJ0OKXYBLhYkMU1ePrrQaEfs/OimVi4bJuskppjKS3y/UjzrV4/xD+ujifkoiQU14YgbX3T0VBAQZVlRJkpDGGNiaIBdSy2DjRQ3g5S9ptO2/AevJsKRQyyLb0vXt5OfQjIJneOtQBhyrY1l14J2OxNtMdKEvkpM9M8dLvNIIEhcWvy03NtfA054QEvJ/qlj+1A3rvhJ6/2Ds/xcRJUxuoeeWNbYVKL26TwRi+pJQhvx88l9xezDsEx6teGL1IiLTCcapJhn3malqWbrEBrEiQCjI46ffDr8CW1/YSTo1x/MvVJGZNmNt+aKyonZBtRPVgVQi9ylCdEM5g4P9GpbKBI5WhhG8xRKVE21dozIbtEx3i3aOhqF5SQ8Q76V+bjlkip6wWiHo+jft/p6kSLn8OJvQJfxNHY0XNz8I0N2nfnejA/qSTiNEIOXX+O8CbC7zNEOP8uzfj63pzwI86m9Nk/B1XWyBguaP8uZWs3F9WbUYMF+mbSDHk0ZvW+4Lrx+MRIO4r9PoyJnoE8ssc2nMzM2tiAymvYLtlQI1wEna5fuSKV8vBlOCVNbfv0Jpb3iiZ8tZ+ZEpcqcnoPmVGAS7RNNJQeYhU4wAYk5aefYQ2TEvSlDat9wGqFJZoDBxwWg0SWZSwzk5RffGD19C0myJpAfdPqXfOtJsrwWrpHIGx7cEschLSK4xdQlUzuP4C3QNmdz+1+0FrwoKuJ8/WT4Q5Bl1MvaN8p2E4u4P8g4zXHVI7UWs+IQ+IjRqyg/PMH05oSOMSRnK5R0LnwualFwfb0oOHXeGD/tKsuC4LTDGqPtowwEqvzltZLymbVGS/wPnYiLrhkaciNv/GmQivG4k54gA4c8sSiLD0kIcdwlXQmEDN77NTRZkyGD11J9ilJpmF8ZK3m5KPZqvXZUV0yTg6O9IdSBN0PHgmabIXlqqvtjKA5hKuxIOAgaNyo+/+h62D73z5JAGT5165jIoasFaXrXn3+u0Bqmve11feNSNNlDXA+OFtJ6zzxlqIgv02UeBPVr1VVukdVX2SYNb33mJk8kD5NGHem8g6eEdzFT7hNPUv4dK4SQIWw7dy1re9u0NnfN2lHriY61YpxitBFLmc8zCl3SGBsNrmPcx7YnkV9ivLRPhzmvdmxlpbu8rFgYy2fjUzRmpAeUKoKYDitPKtubp65yxj3tFoWjmv4SpOE9ClYsY5eYxWReNecQUfN77lzddMOtPGD2feW15uHtztwqLSBd4I71KdlJfg6+AoevTaPTzOQ4astrFbVTlMEF7Q+Rhmo3thukShGURFCOxwhk47hrrBINdbzxj64Y4sU/Fb4jKUUtlOekJFGZ18LCz95yYcFV3fXakimqHsXnrVPKZDf2+rkO/WqI6n2hFbELOVXPOJUrMRmczCmXC8jhSHm8DNiaT5+SaIVfwMQMx4n3pk4mgoKea840hYQ1nB1v3KxS1Hy39a56Hk+bDdH+i4GzHU7H7p0E54a9iuVpJcKGicphAShyE7ugh3S3GTvxlBvxLVV7yR9ywocQ+8ALqS1iqZC8XMf9Mh4KLVMM9whRPZupZ8uGVPqcsXyvuimpH81Capklra2gi1H1l+D1+T1ZpRN+n498kJpO8d6LU7z/UZ/h3WuGusmvHaaMufoS0LMaREWhnYM9Hh9EyPIaF/b1v4d3NbyiGh3rvDIlPK5rNPzsH7fMGk7//DwFRTuWWM90JeBbXjOzHD3Qyjb1ngUr78UkYYdJU5L9/yw6GRjWZXEY9zB+W4LBQks3NZ258/6M05A6RLMcPebi1/j5dvM2P0S+2aqkGDxFT3Ql7Cq7PYcYXqk76kC5EksqXGOhSNxCOWjMyETtAJogjFzbFlXTmSREt51gwGt2tTPLI1BTlWa8KovWKG+IOwT6Bbi35njnH1ZvFWFZlalrT4p12hsftK5uk7anfwcpW8U4XJnrYPcF5WwxK7SdeiHOJ7BFD0Qq8RkZupVkZMu69Pinr4WUUc0onpeTv/oOfqieJAtfAOS8WUnYAwiNtVSkMcsJxV7XqiJU3khSUGvYq7n8OAqLyeO9PLDB5TGUqj1ddcKdTbj/s2SwDjrK2JYDde4iUTGizallHmT+91RmNQp+HynPWEQzGTnddpt9/U9klbhY7dvCkOYmb4hadPE1Cksi4w2R8ySzAdSSPQCHemfhD1sbDgryIoEjRYn0w85hW1F5NSIFgfDxiKIENmIMccyvSyT20CNkuJZyfVOh3RNPmFPtiqkHYPTNDLUgVrICIN4UylICCmPkDRZmzgFFDIPg6KXjXLt6RR00vSlKMXOo+J8XDWfElaS66rFkvJHeA+VEuGTQNvRMS+PG6/3j9Ois5nnnSjdTSARuu/CTnEJ5QND3WozM24wheGFiTo1IFZkq22XI2jZi3qw5xF7zYw5XAgTkFFrWcRAZ6NIPf2xzVWsPlO/oepMPQx3Bb5xC2yAEBSLeMgzjY+fx3uQ5ZmVLSorrjcNwdb4srVjlQDg6IkHZ8b7YYwieCQY8MUSZnnLj7JCQYEYYRQZKh1vREYGuv8afYtGSsVqUDKwTGbJynxAVE9lVJMHKDnFtcY08TOTShEEYoSTaHzyW5esEd3GtwkHqC+DCDPfQ4E1uxY3UV1GxMeeuFJoqT84hFJkxwqf2+ixh6B8me85w9LEO/pwrTq9aYVT2DU+9A9KaX3VogrOIx9fjS+N7RhMsYDJoM8gz0ZDR6HojI0cJ1nkKaZZ2zIODtnDlt240xB9HantWbPTf7l9vN3N9Ot5vjx9935YMn7mPZw+ti8H8dsaByN/9Cq3KMwLh0oKh5mP3Vx7q/d5D5fLiObBhVTXrImaEArNeHWNzyAJz4DUNWkprRmoYQnmMQV5NSTLAAEiwygnk6MkT27Y5QO6c1tHGeTr4DCeDuhnn46uBMaG6bbi8CITJ0GXtqIidgiFbPD4RwcBaJIczFdRx1C2gwiHt/flMVqcoKazfkDBq64tHRDOKrCy5h4KwhAF5ze/XdaPUb5wA5bzX+Kkwlan4WjSHQ2N0YaJ6m6UsasIJIZ/quUj5eKY3E0XFnglRJCYB/zAj1uP/Cw0HC6zG1o3IMBR+ewenxh1UQfNilel06PeonautM4tFoLU0To/64Cqhs6bq+BVFe757GO1i6cRXAhpz+mAPEPGoWEK6mKvngo8R7s8iq5UEqdGT8AOJtNsM9FweG8EEbtiJz2qe88d2B0W6yHj8TYJZWvve/bZa9Ty5bXI3nVvQz8wUid8AWSiX8UbxGTVcLUieZ5lgqHUaegWvOd26sDElOB9/V4A5U7QLHelrZMRYTGidHJ5fJCDvNF3x0MizfF+sKW/bwDnrZj9vglGPl5XT1KNiDrv5diICF+a8321igA0TJCho2BKuKTBtEKkXIW3+mD0wzbJdJbnyVeUR70sZqN8YkLz7IbN/Vr03JniKecBVV3KUNt1zPmAJD4EousBLD2jc6gb7dyq+YXZwNPBBoDOMOHyj+fygUg9/wKBMLlrKIVTFjm1Z/Bvj4h+53Ytr1j4vs+wrxfrz00+92hm72+HjG83RquEb6/v6gcT40e02boQfkY+UeogSmw8AhhKr+PJXx90zrx0GsZCBXId5wOdIW76hZskU1KyaLamDtRyQZla6qsLqe6/vZ0t0T0Kqn+rP0p2N8y9sF5UlL6qHOTllRj6wjB2m3UYnDtyca//ts+e693Wrd4Sx+n4Vqgz5hGxAH/H8kBmjSVhgT1VSlKbB2TfRXT5kbGPBrafgOnNgC0eIUa42a8iYHJAfW9hpHr9Qj6O7/xjSqvlltNR3/+ckn6GUam29ybokHgqxxHskVLbJwZkFZH+Ewm438Jx5UcIQjjSFGGhS3BLlBXIcDdY4DUcsN9fKZmuI949LilQIIZBBd9ALM/XI1uEF3DqfbxHcKgRu8QH6TKe1ZRfl8hqJSQV+E0FRD55NAaJXiE+afmn137XMX2YOxRBI5GLR7jZJb0TswaDeNDm55bAflCySD3lj42JBZBfFWl6AsVjq477SrUDHH80zlam6S8uW4kXbAjbtqrFZOLYfhvDCMMBEMSAJcsrTvForhwz9GgfB+YcSTyW1OUJVEWfCzfLxrSPDqShskG9nQ+/TUDnjFk98bj/xC6MhFSij7SanDV+IGGGtIOHTFRCrhDmplaEfoatgmEr5pA0S0Xoxv3UlCMjGY2wGKDwhftKHdc1ZrvfRs6E7LYs+0G+RjZwgIz62QWCvSCNhJEuQotRBS/0KW7F/WGNPGPCEQOUiWDwfp1pRlW550m1nUbf0mjqxll1iwdte1Vu58uNsQXihHyuR7RuJCzSEvwXbuUzMCDVNE4WnQV3xapKrSZSBir+6QogRKzaTUV0dfEjAQwamu4ebWTgTAhQ2kAwyVVHFUYDTeTb4HwrVUlKXAwtuhDCQaNAxOtiFwxEE979IAsxqGL8RTMoMRQU/UdODSqfmDF6Za7epHE0qPQEAh/NczzzvOx7GMoyzF/KwiReJqzxspL2BF0mYbeK8eBkN0HdAq5wP9hM41UOsqXGQamWU7erzIoyzQpqlCwZ76aidyTtg3ZLLKGOTgjvAy9FNPhk2oNu5ayOY1WlyOj2mt9JO8cTyGAFl1UPwJTJiUjue5fj8mpTH48TFg8DicPBRPdbioHrAQvrWUa4e/RlTMybIsoTqTgtyvoRnUKh2yDxmQFLeOVlq124G+gkOrJ5J7OWm/FjWowNI9tS1TSeioLQIMxkdgpE1ttnyJMzAkTNHle07HiltJHyMiu+pTqIJY3KF1LfeoWAWw1cFQokNNb2J8q8lrboi/PndcjGLFX+38wm0mft+s/nKdCLCdG0sXGnZeynx4J/wFyVgsRyJthOp9TUcOG7hDpoRHagW9iPhH2S7EXCI0lO9Mx7IyPU7VmyTORfy81BN0rmQRyvbSHnlIOsgOlRs4Ou3CKhUN+cb8Bh9Yw6G3yCmfT3rNhD+9RPW6amwm1bZf/kwoIdSG2vfS0axZ7KWr+q7nLtR33Da5X80LPiFCTAGDWk8SgYKIQo8jMgStB7pUt9Ee+L0kdlXEuTVFEjIWKVuNQok9wEco6qfjF/HMW41z5lJ/kVwUoyfjQ5TTHs/gv2oxgGzw/8KAcHANRWWgtND09wzIgBqeG8UbmYlfpvrnEnmPPGRz+qjS4HFrJuNKSI3CBM8mPOpOrBLoU0+2pRBIX4bKxn7qNg3V0+0sfbkW4qXHVZjnTOdyNk1uaVRpB63T5OYURN52DeKsPVtGCOXKg4738ndjjmzl3Hmqjy5objoa4QwG4uTxdcMgIpxkloOrIKZTMzFGK4//joBtzmUghh3pknxI5bilKHmP8s1XEZewHy1RuhGGnxbeCUzjNBaKQGfHiF0AMyqKmTggoOFXlqK1jWbwALuu8eTltoRQDNxqlfZZsvrMxw6YcnQGH+CTmGVs9XqhdMH6Be9og2f55C8Lkui67zIDjB7vzxqDjPQ4cDrSa8Frz4iK6jDdZmcLfDkPSExyN45tNkoP08Ixz6UTQpEf/vzxOUyL6l/YfejP1/6s1YOf6lNxtUl44xaUdYW6I+AUtG5icpNn6AR/iod0Pn/R6NLXhsKvtpBdAFxCmjUPZCHZIHPLDq8e0z61uvHnpE0+dWvsVOP72PhHWRqUlewWY3W0+8zS8BGDnNFxF92s9nD+60NMk1H0q7hwfeUBQ//TBNz70cH5SCp/7eLIKHUgukYLedmdKEFq3+oVvwYDOjD2y+F1CUfKnR0A1lTiT8ur2GHv6FnN03kckaydsAfHjEKtGkapaHYlIPsFFnpel3muyRbuvNg5obbvyswKi/1ZaynT/9WrWsNuoq6mlnnBrzVdfYYEhmotNaMOc2IsHTEOobjWzN3TW4Yl82s9vZdQhGKirrZXvNHqWxUeI8pf4uOVpsXEcleiTp+wMVvSdL6jjONsp+v9J8/UwibjFEVnw3GxYe91Um04KXcWWlfJZpxtIwZPHOAWNm99dxitJUh9SUroSrsmWVuFWeB5OeqNCRgUD1KulLp5eqtsmN0p1iMxJp8XVm/YltQmbOq9jd9s4GDNr9wQ4UTVNvi6HDGd+Ukn36LNr5Fr+lEoa9NDorTBdJVYnapFp4SRYTAuz2IP81DDQvFux+/0N1GPcQAC+lr7T5OmC1zg4jbaMZ7f4ZUEPaejjMuPNgapkaC9sV40LlSYJTcjVKvNhZdhbCaPrFz6xUZ0Jy7lkIyqCVWhX+ctY/v42tYnKFrrKivMDMsC9d0S5IeatlL9yhEY1OBZTkCwhsB0pKuq8JhMz4djXxMKjIzBVCQj6BTqmmC1v0YPEF0tUkCLmDEbVm6gh1ZC2seLFud34MzVCFEZzWyUJx39s493o3EBO0JEdHioGskiham5plZmNJq5jQREgSFimXijCzsVV1ksYPFrpH4QUk0KCFtFgD21ssKT3ZBUNJZTRwNdRFlUXkR+J5XWUEe2cB9Czf5YSGePD9OOeheZJmuIx3lqIfK1IcnJ8w/oN/F9zVBCqxBn6aFh2dP4KyD0gBmQEKwjb/CnmEjZ7pD0KFMLxqNapZHFb0fj5RSzQqHnTzpxJmSnikO7DGBeS2+GFNOXAIin7jcw5sZktqfZ7YGdfdFHPDjxVeEM7m6BBLS4bQ3OgnFU8hjB80NMkh4sonsnmjcEtJyNfCywNiEmVkXIgPy/Ez130+14/ZWdyNOhNaFJr1zUGVeLG7fxUAx93NOkjEd9kUaOV/3zshJPR7f1gd4efnRjV9r9KwarfPd6sUenvoAyMFE8CzZXlF5YEL0aesifwqA5EYem9iMj5RDDgjkZOffsq7vjHHIk5o1e/XUz8guL/BeCXSnuTQq5JZ3/c0mmcqKH3udrrC9APVWGerp47WpKnjY68T8dScqNGFrpY1tES+NNZIFQv/zouphql14Vyk0q36aMcD+zilMyS4apB4lddtkFSnGvhed1uRbRdLBQoZ7atwK03S46FCHOBsqgTcxhorqM90of3RZOiRBsIcX3FrQ+o4Bh4wjpmgWqi/Hl0xOCi3WR2cYa7fSo+Pv0YEqWXvycD5DGYKxInUWebMCuvFhZ7UPb2zmyecxmAp0Mu5HnUYx7usqgrQ2kCTIwifE3D3ZzZrY/4u7PlKRmSW17eW8SkwjUUS4mN08EJwN68EfHrtB/+P0EZmW6iKfSGsSdACCjA0cY9J2+q8M04li0GwwnaSBQGBqb63X8YzGKbVdnYgmz3rgr96MW18Q17mIreLEtwNsesSzGw9FjhX59RBGEaXAkhDySALcsJa2jhb+dPO3DQGYNAZ8vE4nm4L9hAC9BAm6T6/OvC0QDUkGaS51M9AR0w9hkwdSM85NtQPQddXrGrjcNay40IFVffC3TZS0FASjl2zYFuNH92/9e9M2FfXnn+kFP1M1jcBle9Gpxycv7j+Q0i+DPfD1giPJZBwmXgti++ONgNzutbpFOw2CJoxC3HPisGNLApf3dr7JLjw4EoWHMDNXJETw8CU3LO698Vmve+jhXTIW1EXCkIcOn9PWdnXynrPG+h15nPFZL8fcm0QJhiStiRhRFz677vgECidIEcPE3xh/HMHzGYL15ieXO13aZ4/GWpGn2wqI/RHuLTiKrki6sW4fW1M3IaQJB+Bgui2xqWx8eI1IuuRnXnRV1qeBB/fJV5vKgNQKT0rHJBBZ1nGAwb7yc6xnBsUhkDaZAkHOqtzsSZyMYLkE5XJJF2vkWkAhe0P2h1Q3ZxcmdfAUsWnDGGr5UWV7T0edzVrg6gVnKZca+39sZURPJfO1+U5nMmHkVpN3L78byv6nP6VbNASShzIH24wyS2qVle+H9vq34hD9zopDxHAlRdQcc6dzdE5Duw9JJrToYdVSBqs8t54sPNQ3HH5OEo5CCW4T+hcZzyaRX/TQEDa4eMhWQntDxvQnshDkD+FIsIW3tpDGkYpF1+cJcNtDtHtxpPlTxyuhobHRmjY6Q/twPK3aBQYBl0cKgGuuNtECdVEkVm0l0fz0QYVO1ukibAD2tGJO5oDRBwnaVsDUEe9OmSMdfdPwZhDrT9Qr5sHhh3mTfW/vFy89b998hq0ndibWa/tRGtVA+nqEH8OL03EcFyciLTBEDSSlyB4HK5oFtPd2lx71CWlBV8KC1W7WGRB1kXiZN5hPq5bZdem33wib9j/frUsesn8XgX7TLjMdjgjgei/bOMnqzJVGcYoxzuKUtCQkV3UwbmpxdwwwS/FzD1YkjVwMbUfNtdMDUKf7QRfa0Qpi/1j0DgXMfayWoUYHKXhtFoWci0jwc1sOs+Gxr8vcNZX+UVNuTJD1pIE0XfLRckc3WeTR0NSSmtwJk/39uFic8WoCnbfHsQMzz986DptTXb/rG66XyJhxElgtSNmbeF7pptrcHfHl4Lht6pbkKvFQceDNIfVtFScW5GJgLjzlW/YKgbfD/QVYlKwaWqEn8f6hhpjp7g8d7usCcdjUeoPpbx3N7oCscPV31lrJYrU6d9rEdfezaGf7PEf9B8Z34PeXzLfd1rfwDPOe28IR6RSwKG14bH1owdsOZT5BhDBCj5gRy7eaY95RpQt+BBhuFJd4mlsEPheZhhse1Kugtsf+gm9j5qjN6+Zc3dseMvhkDH5fAidX0/Vr//asUL2CQEKTv648Cftc4KbgP4btz5Fz9uEEZsBWG7Ns8nIUvQRdvY0XbZnn7dLEP6GsmndxwxB37HjfTg0Ov+Y6JZv9KIZx9OpkMkiO1XrxcsCQShRVerpsgI1HTRIDxgd/AaY0LBJ2IcH3Xk1ezydUMu0AOTEnxFm3mvmATF8QVFiEpXKnedWfI00BfbuUa87y67PVAIvvA+BFxvJWzPccpvljVunsYcZknZCMQQy9PYUOV9xW7jHJNXHEiQx03MR0ETx+lK+H3HdfYvh59inEl+f6V66HvWG1pKu9JiHaF1OfMwu6plx9SeQocg6Sw9Xg2TxTPKUNKwshMXXv7WwkMkceuF/CP4QZazXiOFDCrnczy6AbV/lxrb0lRiwjBbWXIiVXgYjb5hM007gy3oGdHELUbF+k4z5UqFJJdxC6gHGlqDn8RJ5YbUUjxsa8OoTcgrOBiA/VdUnJJKIR+IggwnciigaPTc3k6je74Sb9RhqprtkFWZaiUR35fL46QPiirexdXw/agGBjeEaBUoU6gupgEPp34CTBILc6AyqgDYLQfScN8x20XgP53vntUO54LszEsLtq5P18P00PLdb/1JZ/kEh3K9fHGEnWB4Hzluqu6+UEM57eHCyx8D80f27L294tWe4tIzLYav+TcEwJ0souWkwtTqpYa/s21bZ7ADQ+YwvM6H8u/QGcWqTLslWahv4i1Psd9YszJtJiU78HLClHxpo5mbKTW2gcHetj4OfnaEV97NYQUfcaqExdVmhj3VSLRx0SZpe4Ua6clmP++wdS6b3BRlo6/eMKOuzVu2XEo1ueMKHhoXo2BgGjYyJU5pQpTuQJ44Dp0m9nc2Tly7I6TNP9K3xDih8LRWsN5gQZN0Z6kEngM8SXLMknMUNiSJ8FkTOupCZK2tfbXw54qi/u2gQklfdsiZGQ86RRzVz8vk3XrURhrwslJCwsxkDGtJL1L8WpvsO17rV7+8mzh0TN1F55cSP4N3JfDE4dnQX1JRxr4Z18gxWUXVB+qaC8WOSXHrjWhiSDON9WFY3uT3wzScaJrZGN8nNAyEnzOcwomRVd/ykKJIru2q4cqv8qkizNA9LxWfkOfB7NAxh+kpUjrHsdYHSiexBgymmKkZHVmcXdfBr0fn3gHV1ZeJUHeIq4exgg/lOrs9GCLYJqKvnENZUYjXR1HwMntXurjxTpXwMitHn4yvyVa7NtqfOz68vVw4f0yAc+3UUVfm5bUW9BVV6e3a0zfwOBE6fry2OVp/YIlr8L2nHlv0uQA90t0bf3nMW5jZ6pgrBVY6maN/yK/V6Q636JL3f7pqtsfR7OV9XSaFRZdEPld3o6zZoDWB56rox1CiqoucjVz6TsQ43gcOW2eC7CIE0iprbSn8emT6tMPKWwDowGSpnN/40nYyKMPT5OVaLVymWLC1MJ65nWYkrASKnFoGSdGVRwRTn7KGhuyrg8eUm3kdq9U3gqZ5+eA/MFJTjZoynMmuYrB+jGLR4CASCsVzEh+TVZUEWg4OCfkYjnuIDN0r2dgjA0itvW/gHS9JGKNkeHvinbYJl/6hANKYZc1FczmCgVzQC9I8RC2fhnUZQuNr24FXO5CZq4dTFQsY4Jk9K2CeGFXD6j5kqB84nGQhCilQzmKLMx6990qGczhEAVnABbP9iIHIm7PEx1AAYqfm5NTH5chLUTyoVq6Wvq/qgUCCHqFfW/6GL5Pjf3lcIZPvXv/BpT+myo/jw9w5MSYxcLu+u0oKSEGsFBA4Kz4edSFuU9aBn8Km8fFrMqL//ztu3RKYTopA06NzCmzORwbrLU5CEV4PaeRP3qQq1hrpkRojasQRFa57py5fiJg0zOObxo/ybNBMIyfoiGcsSTBGj7IFq0jtNcJUlTPQVqQ84tC1lwzzQEJaQuK6DSdxsMRtfOqVlgad7i/n5sMFQEw7B7pPLedcRtJ9wOTLz9Vh1PtEp6OO+UIFmHqZtT6VW1F9YRxR+u/AoZ2VbU9yxUECgZIEecxSywtbeN/MJKrzwGChDzRALAdZUL3BcwYdneiUhOr8I5yqSK2cg+ErbICiFU6v+8PF8/Lq/Kg2rv30eGRl8jtJ6gT3vjc8wpdc1f7Hg/nC1qs/7PNSJ6ns3Uuq+NGd3u46KjGZCGnJx9XiIFS7JHXM5WInjXN7/9koSsrR9Zdvn9hKf91mzhhVmgGF0uBPOTxxTzOaAvACqN+4aHYfpi8GdyiLOzElU0AdIQwIM6BQYlgW8xWPrMUXHqdnOIWid1qVYLIqK211o9V4M2zF7zza6728+awm4rTdkz9cOntb95v40gGAQn/uLr5wQCB+x8BJ5jG0HH2MCRZzxOCGoIPJSm7/VY+5MFYOp0Pgqk+FpgCySkTzBxpl1wOgAXphKuNPry5aBk7My+arrQo0Rnm14RhNqMREklo4yHJiNR1rKvNmukkaWboM2/pajDHnhQoIf9qYR8mPjRKCllXHWB1zBNWmk62vpB6wwZC4zULQ0cVKmjZykdVU+GnkWkJf95KIiM0HFoJyTkQXRDIifxE6AfEcWSoKrqkOWM7Goncj7xDDm5A2TXSUDx1JbPFSxXy+iowW1IMPqP5mTjgeOYNfoI7NPipD6IUlc1szDalfg63kAti34JbOBy7atMPaxDlmXX1DtXBZ63Q5IcnejPpeG83sBPspXDhinyYsrulihnPZXpihNexyB3L7HM8RUwskSqR0uN3/+Q8l+1FhcO/60DyOXpjvZaC4vKrj4zYb+YuoS0WmbzQHTGIyIAtTEi99Tsbct1XCQ407GVa6KgkDyxeHaQIUWV2ALv5GjPJc43HWLQX/sGB8QyVbj727UZKnHsQRhGZcrtScL2dXWPoviLTUdwJvRsgarKqHPr6mv1Ap56gAtMoIU+SAIwKJVy1MZseAfzYsi5+nwz2HTsP95k9JVA52BLqvohs0m3jq+pObN2UwOVqq1TMKcpQsGf+1hE98MQ4y9YO38BkEiwCOLZdjxGYdlOGsxBFpuVycnSjU9zH/r01cbxa9xJpbk+k56o3sDQN3XhPGb2R3qYKlfz0AxdqA5Q1+Gog6vKESBdrNVN7A1rIgkH2wQmP+DioLpWoJtLWef4gYBJSKbtRfR1TuDdrCnxM1p+I2p9NIY27o72ZYam/8qGNehJboTBvtQqbHpJEGCNvGn1Qm74c0PYGHbTmBmlXcoOxMtHv4X/Irk57Tjyint72kf1fZaFpsKWulRXIsEU92cxuvFnpzZHjpFKsKGmFLWzWOzEKaa/EsEMF3MBoPdrNL3Rk2WkKwDOWWtOa0rmAkrFzaRUzykTKs1hZrxCL0awYtrWFeqgBnSbBka/ZtqRLG+MAtcZqKCdRHYsFQfGxYXUSd0UKvAA1SMgfB2IBRylaKlyeQ8DCUOb+LYhJWt99vYFtWeSe/FF3kIPy9uxsOLDwwvL1OWt/buPvCkVvUSVvbCTpvINxw/++5J6en0H3Aa1B1LIYpzT8FowrPvD1VZ6QQq3VfcC30Zo7E+u50bqYYaq6rZPkFDg0pbmzyevUpIQ9f7Zh6urhdAfKahTu8WiGpujSldDW9GLybJV7Qge8j79RXhRXPCilna/+eit1D+EdsVuoTF3DaOTVbapmZk2eL5tAOWscouOMzsKqoEXPMC+WPTZzv1O6/rF58EK9SSWj+QiAA8bD51NzAV7GI90+g+glZexFWDOn4WcEfoDhA5QJy7tQz9x0mJo+8ln4bmxagwCYiL2AweZThAF8F++u87KEmWdWYVRynzRrIeI9EfZVxEHDe+E9a+u3oMyfZBwrf5LS7A/1SZTAD3mN/4Rr07gfkeVZfS/QlWWbs2SSfFxLhcI8jEY/nTGWRCaTQm6yH5w7yhfeSt7dX+VqnO0uJUuDm+em5SqCWFHPHkD8blDaQPlGGEOiTi265yL8TtLhHdmLbW1VCp3ySROS6XlhVwUYsX6TUzSs6ba8kefLOChe77bnt4o0bZnHu5x2BJH/uk3AwxoWNWBjM6ODSYCIq7kLsPpSioRrpt+M0rf/bWJJotzH7y6LTjNXIMLn/p/lgDUhtE+yBdTQ6lnV3kEIfnIlpZJePTT4oi1AxGcwE3QPXlDhsRZzkEQ1a5za1OdrX0JDmgJ7f1NRZ9joOTXewTCd1h7XPe0FwyQf/daZlBglcKfZxlJG44aYSki6cBoju/1P2RU2PtzdpbpqHo0Jt2fWtePPSPDAylN/YvCPhkh4RGIzT0Y2qmxo1lY3OJSmuDx2jAhAYIRraFuRHNA8e4cgZKOE3cr/RJug5Xhpgb+Z+ydY70vGL9Gw9W4hEOD5S/NncmZB4mXGs1BomEbMzXEJ2x4Jh6ovqMuU2E9VEnpS35gdk1UQQPZ/1sr4cH6QEbmQU13C/6RCHOWV/4Ynyj8cZ5Q5U7Hns1BlHu/j2BEHmP05JQPu4EebZXNi53MlZ+drdd1Rud90T5huqdweuH+TlfBOEzfd67V6BNJ0Tugfirg++k/JXxs4rv5Duxb9fMWuzVLof62txLGv9nwmt8/reXxsPtqx9Lsfp8XZ6vO6+pfl7PYWEXym+h399JYHP9lzNwhbCd5EExLt++7rtv4+oYDba9f2DM9fMd2/6kcLr08DxxAXvt9fT7OTnYUeCxQEU0+9CQITuFVFFwA49UjdPgsQVnE1pfTIwJAa9PSdc1PpY2vQfPJ7TE8XFx58tTEcOBgb8vtnS/rWgaXooUcr9zP43JCgzjgyauNYR86XhYErqCsFmXImMZaB9WBZU5ePJ8aCvMY5xEYiiHZobk20WDIwVx8YCejR055hfuluh6JJXZD/BbmbAnTNa03zPlrSKgnLAsv4mAPNkGkfC5cBRSEfd/DCKIUZ3TB0Uu7DRL/Dy/7ZAUkSruCE5Z+NWclloSWcjgkKtae/zj3WwX7E1fFyfp6XdynjyI3MyfhE7knBWirVQbRhdi0Z4foT4VbvsexJrlqzhl109vjlvvUbAD5MzAvT+8YPgfL/D6j1cFkxFIFZOi9V2DEvGdV72lPZupBG+582QeYU68bjNttYRjkKBvyUIQfykRROxFFGhf5ts7XikECXaY7SBVY/VS1sPk0+X5XL/jQT2XYRpaiPCkmCSvovBYD0uD5po9PczqujjaBrmldSGmMpWR97km2rciQEMyIOEkEJJH2drAQ59EoCh9W4Z8xTj9y13TsDCASxnXuuEhf2yHnLHg5w1jUaqm3RcAvEhtAhzLtJAt1slr7DQ7KSXwBJN6OnfAzkKbJMye6jVJQr8+y6eOXqmgrxBspDAv1cgMcxnaVkVx0kImiBLHZddd1WDrMsKqrLW5+Zj+W5HUTKkbe/y4sfpltMQIt4l+MEMQjuvKgemPyBN5H6FkM3KHdDUxOC7Mt/oOOPXJIMRAc4PB4pCZ93K7n+AzFxtg44BMr/HRLnFXDMxs6YnzOdNuJPSvNGu18kbTFHdCHaLKMEiMphTz+M7XwiGFBt/Nxloka/GQLS188cd+vJR95c2mHKymkfQYPwgXPWHhUyOOpwhl/V5K8ATJkRT4JNNtliIMWjO89jHVJ3l0tcwf94HmR7mXTZ9rGCe4q08cGBm4jUMnXp3M++x4jt6W/GlvBZ3/Go6G9eIo4WuS8uTnwPwwCoWo4tOfMbnfGTJbfGDOW3YgmoprGvzoeiQ/Ea0VDVvEgeMqky34MwM0UBMhQ96W5jwYgSJoDfYK3i+3oBTl8hrcathKK6VuTvecIWauMG9eCA2xu3IR85H4mma+Infqe7Gb0Qmbfu234sgNNjc/UMowLfZ+cAQLpp3Xwv7qPp2ttMaIErn8F4w/XT9xRC6eWma3nVmHLV7BNlvJn3Liw6rzNDrEWDFNSLtFhN3WTBENZQ/jpGIcoy2ER7mZdMZYp0E6PKMagFgtPjv8h46D83/6cDYrOwujHBHzv/yjnBRPFWV3zBE/+7GcuOS6L8YI2v51UHGsNobx+BCKMJIwoKhCEsuQgiKQ6KIiwRXJTIu2LmLyotkMNcbViIs+J7Pgt4CTI44mzKWYbCwO8Ww585K5c8Lze8579/Pz9c3u++xrkDzK4ormBQAcSPRi3pRU1BAmBrpR0QcQcFgiMBQQJs9qBnpuYuithGHpOq21Dy+ROXrQcZbdJDLjfYCL93D6pWMEEAFsDmiqpGanLG7Hmgr2I5k77CzP4mSKUEW000sIxxaWequc7kPvA86VQdhotYBGavNsoULApWWW+hJ2MgdpOYf7QnnyLYf+0Pfi8TLF3Zc19ErFcStQgWOKTkFqxpHvSOYdfJTSgddgIKMuC9w6T4i4SQhQc8VkCx1i3Vqqdn1r+wRpVCwqUeTUp5VJUEEAYYrapGOMtCKtwkRLXNC03ussjpIVI4/4INH8/n4hP8IZ7pCn2sxehZKNb3OJk+05gi9w9rb8h+q8sP4emLVfn1pbZulBomoh+q4OtDMnnkEAlz34PQ/ffB5KPKnZP7oY9vTc3t7yWRWvjahMsz/lIvYKnHdNjbisZV4ZOI4zpdeP+6efUNTWVLCd1Gtly9QMBvPj7+jjP1x7ephTTyR5FWPGjn4plalW3T5bpJmHcm3GVLZ+V0bzM12WZ+FfamszrgWtXYauY7gCuWqFA9mfBVFqQtgM2LihT06AZrpg3dzeeFmb+vB0r7zNN1eoVp0RmWiyb+BU2GPnO3WjCQaWB0axBUprgJQVwI0M5ocMNiDI8hl6jAh/zx+sDn1UkHMahLcMmj4P3yWAoI7ABuyLAfdH8M5+XwfkqKDY/g8X4g4E3h9qArQNUGWCwgygeCBriWBIBOE/w2kKIsbR7kE+ChtRoUaEKeXTlYHQBKjEYTIJ0U/DlkGfhIXm40/bHd1PKx5BuCB2QPhAygoi5Z3npQLA5gwJbKA7+3vqPsYEKG/heXyoCrTeomhD04NG6i+84HsAeIPxIekHUW6HXdCBIeMMiOOhEJOIkUlwKX1OIvYqwjgWg4pXNOF3gueM1BGkiBcfhUv67KQIj1GwbYGaETk+g9OEcSYaNqN7ZHjD4gWZLWQ+vQQB1Z+yJQpDKvEhEoZGiDc/EiCxLPnw2SHUIRog6yFFhvooAgoMThOhI1JDzgzvHqweBB/cHZQe7BzURA03Eb0iEY2blWRKCJgXXRFaEX+KcklnkfWSK4nHH33bg3Ai1pT+SYSUcB/HT65PsUnaW1BHVZMEkOISFbQsulEcphqhwqKeS1JXYVMViM47UKAtO5snPvE9wT6xPUHDiT4QgSs2nZ1v2m8iXjm3yJ0rsWA8wuug1BViLMA9Pj0inI2d6y3gNwR8tIuyECP+0qcxsvyVY+gh43ItyvrAmIJVOa05PToNn63T5i5N0rCDyThNOl12UvCA+ED0gBQzZH84oc6kSm0R5pTqFMo65atp5PKxDUJnaneYT4xPrvBOm+MOJ6wc5SH4N+pvugwDrgdSbU4/YX9+vId3zxDf++ChpAdZG3avvQFhP5xlTGCRY75hwGf0Fv5IRrjdeVn8QuNL+E70zvVeHJItGhUyaxQ95Bs5gTlFZ0tXSJ+csp4CTVer2dM0ULVTTVPNphGtvV4vVs1bzVx9Wt2qmVvva/Kl8UNr/KrLKl5TuyXcqteK2Xe2VV+DT/1ui982GGbkzFuHfiatk37q8WnyCXn1fy29Q8JrQ4xHtAoDDZvCe4tINwZqYLAFZw+b4dniJ+JFx3DjUeLpc37IcsrmykLkWHcs4YrMnsiCzpLnmmrjaCtqb2r74dp+LOWI0ZnSaefGe/o0KbuVct4ybrt21tOnRITB8uEO1q6Tea1wzXpNfL3WC5l3kCCZQJu35yaYN4hnglech9GrX69fz6q2Wi+168NG/obWueI5rlAHQEyDco0262r7uejJ5SHqmefO9ZL+Zn3r0+J9s36cfvJm2iY9ingS3QkyPprP4fkx4z3hZS9OH4wEjAUcB+qFbZ56HpOD9lZuUJugpWBloBzUKykHmQZhF/+D4GdpCcnRT8TsgzyOoW3qL55UxCxsTfQ3u9NYhv2GoXVBhn5IWKHqoecfensF6gTaDWz612FKYTQHYz6PSdA1kF29jo79ikHNeYt59plvMxFH2TP3RjxGNEZ3Qzwxt5ELI77ozzKoFJoUnARhg+TDriOyg847zrthu71yDlIK5D9k0yThpWzkeHJEJKQkV+JchK0ok6Xdpc0ThBNSyXPl8ktNSuFLvRNP0ivkeVOgSslLbWU6u6dd8922PbgkUkvsZXoTiUfLxh6EKYDMpM5k14yaBVUpVY3f137s/OD9Lu9s5PzkZLffcYjjLH8AvI64cjvknYidOJ/K1dnrtPhecA25CHkSSBpSNNA1kB3SGLmLZa/Fo4uuMq/q4hNuIPklwVm6OlWN/rUoTZOOlk9FiGqM8bvyVRCdLhtN5q8Q7FHnIk0dZZ8gpCnAAI+AHocx7b3S0xTR9PvuoxpsVXgi6KnyaPBI2izCW/XWQlJu9GmocfxmHInWr2q8liuP2FqKRbwZz7b4zqXZx1X4ljw7tUaaXRNNrbHcTCy3YFMTboGhnNdoa5tfGSvq53DycHnHaEd8x+Gt520YzjLCSihcdE60Nc45KznLawm2bQp7ro2jjaV9uhZmo4047bzWilfD1/bqRlsvz50r3bP5u/E7ftcH1xt3714Sv6F6uc5v+9nu6hQ1a6umi8XnHfU03gt3C0dWtyfhrKDWLVWe69VHbwUjteZ1h2F6nudY1qK/ipS3thqbdRF9h82W28HbldsldhHb5YWpn/YnvZ1A291tUJu8T1vPskOZ3xCgEO02ZdZt1ng4k57kQYpAtd/S2tLJ0uPSXzIsMhYyhTJrs/CywrPus02yZ3MEcmpy8XMjc5/yLPOW88XzWwooClIKoQrdCg+K1IpGijmKy0twSiJLXkvtSrfKlMoGy9nLyyvwKmIrwSpdK4+rdKqmq0Wq22roa/JrMWsj60DqXOtO6g3qFxukGwYaORprmsibsprRmiNaQFs8Wy5aLVq32jTbZtql2gc6uDuaOxk6S7uIuzK7Mbpje2B7gnvee716b/sc+n70m/fvDugPrH7R+DI/qDj4bUh6aHRYbPjLiOBI7yjvaNcY11j7OMd46wTbRMsk62TzV9avzd/YvrVMsU+1TXNOd8zwzPTM8s/2z4nMDc9Lzk8syC3MLKouLi/pLG0tmywffbf5frnitvK86r8GuRaxjryesoG3UbBJvVm7xbbVvS2yPbmjvLO6a7x7uue897IffIBwkHJIeFh+xHTUdSx2PH2ifbJ/6nD6/CP0DOUs6yfVz6ZzgfPJC42L/Uuny/erqGvs69IblpuBW4XbjTvbu+f7iAfsh7JHjseRJ/Wnw2f3F+iXtFfq14436be1d9v3dzB4kPvg6+d/ryuZ/6f3QzH9y1f+cPX11b/d32PBgyOmYaNDWNhAogn4g4KAa0CE/QcB/9NWOTuAlfVPGEjExARgZf+Xr3NV87HBNcf22+DmNqeU27le4myZar9+JHXc4ag35t4kjMlmk81sl5v9HnxQKJvRYiVmWLhKU78fm48Yq4pR8RCkamT0bO73NTktCT24QrDYSljhw2CoCDlZkZURDISKvz8Hz/njjhl5csae09Rzl/v58zNv76HnBjgYCELdBzoXfmbc6Oyu97HOo0eg3kQpYzcRiv6uOMhg0O5FeuQprusQLjWe/M7ty1NI6lTXI1AdzKAFtOqdt7OlYcXibcwdFI9w63qs8ajMrxoYtTvl+IO/83JAekx5WA4kH1vA+3lAXa62r9XZD/rIh3Dk3K6qy2XGI6QdPi536LD4UI1t8c3h5gY+JhfaIJXR1/Zs517uXAc07R3jWy5ISjnlkkDsc2oamFdJpXsDDLAgr1VwqoErxdBlou8lsf/DtO8w87G5AXzRuu7BVKdr211pcKq/d+63eOhJ1w5usUEoNAC4c12w8ZwdnsweaFoaV5fYhRdkrbXHOuQcpsDhDeZH55DMYB16u/h1eztBsTUo0jrpyHh6ouyEJN5U6kRTPED2EcyERX32rEk6gswBnJQijWRx+UICC3W2rib9KdgJPuWi1FCZSuj3Ac4XfvW4CWNR9686tJjQDvj4uuKlNco0O7CHzRjfKmm3wLgf4nqctWga+3W2PfK70h1TR5hEW+mkv1+d6eR7c++mRIp6V9SEop9vchzOA5w/tzNEheZ3jNvk8xwwCNerVMSgt3dp0rRLjwrj2vefjeBBELhHWSJGQejGI5i0jprJZa+omLC7UjWQkH4zgrpnc5Obwmz4rMIgpnBHIpUlUK8B78ys0YeoD6lCot13Iba+SsXOrzSPJ4AP8hS/w3bkz9MFCVXBan/cG3Ks33zBes3GUtF4sFJVbKZpnSLb2PFpp2sSeo9KsU3FO4kKLBMWJYc2YVO1BoVpoVKawpX3eGqOsfeJhrprQGezHXCx8vSUPYSlX9X1uNUoFfWywxyMveEj8Taw5s8hc4bioNhVQ4m85S/4WUN4S8mwE7ml6mnlEl8h4NinX2FceqfepKA1MjyBgW2Ge2DQGDHglCSi9pvdNVP14MSKrSw80JzRdTCp+OHBUM8GDTPkZ14jKys+to4qyUZ5zXywKuyKnJeR76dTgY15XGwYEahO7SRMbeFP3aX0+0hRoroofkpJuyila0asTelaq8pvChQMJJygqk/smBHwqTllcuCuLD+cl8u/+BL5fN0uQqR0XQvk0vpeATDzHivXIjmzVg1fbluQDn6AkdS816wacIuPmxXhuIO2zxrFsRXTDWo03D4KHLOcxaa//b52Wlka/RUqO4C9CrBEY08+RZF4iGpSfaV2/ljR7BzfhZIFu6O/fyrg5g6k/kk6Z2ZDjyMVWmBydwlQDDsWMGotq8nwuoTAxapQEJfMan7/Iff/Ke4fgK1pui5RdHs/27Zt27Zt27Zt27ZtG8+2bdve9/26/3O6/+7vnujo23FuRa3MqMpclSPGzDXnXFGjKh12ro5duus8bta5UB5ybH6N8enPd2u51QbSPBkCbBP7ArAE4yz7BdVa/e/7ay7MdasmlNBGxP4yfx0R8BrtAO3j6s5roesARH1A73WL5bgVLldqupgbzHqvbRO9BUbsGEMuQj9GQsXoL3BcdQsaYUWSKEWQSjOOhQ2N1e3Qcwru3CEoPORgUp8wYlcdYU+GM3JjoRmWDp1vcdM5f1wl1uzO9zbIv//1X8tNLaECC2MjDv4WZ4pj/g36XgEUaO8Wa0potNwSSyqCha0Gf1gpmC93XCCS4mmsHksrGFWU72CpBBWp8WxGXl4oOFZ7X1hQZA+J2+SYXJ6aw4QcEU0PxgSauSEp3mYjadDmnB1nup4f4qHpDSjy2XHv31naOMTiJo7JNGYY3fquxw9Nvg/pTVDCILm84cC2kBLTOdeBK/SnJf7ktaQU+sVd9pQs/uEXqRL3kBmymQ6mXKA9gTLZHZ7rHCuNR8z80+A8C0M10PBu7jaK0iom0lEnYx/8YazXt5fmRLr7tjB3p7hxipSoWsaVChPGxGM7n4rYsMqPvP+N2lJv4G6piU6OO8Trn8kObjXP71WP6cFkaSBK457NuNRcX2XtzlTjZMmSv1yoCUaD17JVhQhNcvCZaBtXc6intyMPFhs6RJRoi6okm217D+Oh9dljyH2Wztzj6mFPcf3aaerXvLh6azE72RspZv9qPBiiJJ5oeYdguRcAgO0HiXKGoVDn0ChaRY1NaUiluaMpOhFXIaRUHpu07CqTYnC8gx8iF5z7ruCn7066xbJ8SChtIvV7Vcx4hlqSERdh27yLAtOannw/UlBQ0kwI8/eZtRXdDPXKe+GEZIBozLqAV5qYrrVE4WQVfQbJC9k9Mn1XTABp5sMdWJUpilJfqSHJyzm4xb6uUiBpEngoV9wAXL4J2iGK2Fbt7diZk4uk+RG1jaypV3YHYx4vi9fgSFQmaoyUkux+LvZK8kgOfQsZe7DoaxKXtabhV8+dA3OHHFOWpXv+jPVoqWgjfCd74zGo2aSiSSD7ehH2gfdPJS8Z0Cu+PdxMRIspqypVxpCmoILCEkjlduV7SHF3cGpn4PNucKpRvH6REHjViq88l0rNsgL4utcVXgIRBAO5lqa3qpl4tAyIteSiV1X33jkunHqgd9EInlZ23msMzdMmcKFHeZHRODWYcUnfX4TLXKvEv7SnT7ceem1LG2RnmIKGVmpFM6zz66yoDo4fCr1tLMwb+8yYmFusA1mYLzBuHRMyTW1DOdjY0p1c3SeTl92bds8d6j0s1nAuBqJHDES8ClZtAHrWmXGFtTnzcheF2ajmSGDJQ3sZVjwLlcfBKzjnEv1VDftv3rkqsaNxOJNuruDgQGs/qsdnD4bHp8U8XNjQyjujkVn9NLz6vuHn89ARY71osDdewlNiOCta3zwuZrkqcsSdHTW0eXZOk41IdA/5B4ax7qBl5Jygdahh4E+fOCsvrQuLKc9yaOB/DYphjVjora+lgouqylV5Qmp9qA/qWGY0UuDNZvHM/DruZl7Samnp3ah0gfhqtn4P32UiLV8JvCPLMwuM4FJibQu44EG2PesQDh5Yxbz951AfdJtpdo2XHLSDBgwupBjNXGs3p6fDZdWO/36p8Gj2PiMT+A5XYlrHSuLWPFR6/op5tYyKOujsO5ld+axZ1aHV9cDVrXbp1tlctazaPTbGaGBhQbNSgyoF+TfLZInanAfxbxI3B8q/JagqVEkmFFLGaLZYhAgXqVJQ+hQ0Q1hCOIRrFgbjCUdgD2JdoQvql+12MHXpYm22RDAulDmdzvSYzfC8cjuFcixcjgS5pUepJSMPaQecVTTTo7w98dvKggqxqAjzM2lf1xfJMGI5RY4i9AD7JIjgvDy0sPhUHSAgl96LN7OQiqqGFj4nVI4W0zyT+NrGFzcc1stuOO6GLceNttpGlW52Zdrehr6dv8yQzGwkD0hxlK1xmaVbxdPipWg9YjNKMyKaYVBmZ4osQCHwrEN5/f14sW/38ZFJTGUOyZmxV4oQIHv4iry2mWp1S3V1+Km6sCWXPPHW8GSJjCMwIzja4jKao3+QPGFuyFouJYNHMCHJmjBoVoRllHLhUjxO41DxrRCdd0nORg9xkZKr1OSjEzNSE/C9WCKt7VN/HAi4MLfDUdNVKWlQNJFr/KI8J4dq7av88k2oQ2xZPXgB7xT0vR3Vg1RqBKCCOUNB15phzV5nmE/dDjs+yl6OS2Bbl41mlWZDlJNTaaCaPWlOG+Y2NHaykVK1ExUV8joAYf/QJ/gkEPkORsb9qTAD+6Sfah77WyA2ecCgfSWnHMHj6bWfuYStKr2K1fm0cvdcalMQEqBeXDujoXj+xErz1Fm5SWW5+kHJTROwcQH6Ewlk56SSUEVqSkVn+wxGGOCtJ5A7cgEpKhlZcOdfRbGrc+zk/nCdWj2or1PRV5HocvnPn82UOoFCQM9oLP7XI3NOn+q2A2pSC9gVbp6rdH6nsGeQXL6EfoWEfDvKPU4QBAW6SlpVZnAnr1Vjl9tdvOrJ+82HbIWsLkuNjHGLWW5n8tR2BSW7CWu2IrhCXnE3yeh+djZpiIHFyy3K58u9G0KTSVYiogtHx6/6oI2i8wLMQI7owmdtv9lQS+EI+E0hizybMdb5ZPbFbVUFGt6su9qK6iB1VvQjKngqs8KB7jH8Jg9Cr9FaOWIs6RYGvVs6rUesZSMxVtu/riZmxmimdjp+6B4Pihp25EtapNkQdHqoDyNRb3b2sQRLwQHiHIKtDt6v9Gl35DRhHZROSgFPfsqGyN1qxcz7gpY1+jAZy2ZwvqWriVYz9Ucanys1DZzUGKnaUnK/vXTVzRs16X8vAs9uw+AnDEsGi+JUg+kfIqfl1di3cCS3DFgsFSpE8SDlhDyxpOyyWs+kPZVZdW0UjcH1gnW/99hDhs5/lghIKVjVcBzfrD1Qy1oq13O/F0ZnzbzyTcxW9jr5TkAIo3Rnp6+UGdNWkiNekYoCchf07fiPtnoUVnSHLG+FCeyTeyP4uiwwzehzWDbwiuY8tpAgPbYK4mmUlbEhUdAKbETSWiN0waDGQKCQmujPqa2nCwt1lNMFLaINZy44CzK3Cxjl8Lsf2lzecVIK19SUF5QXO4C5uYYROGuxgWexOcFUyPdSFXTU8uBE/yah2zimhC1PB/rvqmhvUMYme6GqQdVtXsaJpsIEzgt6aq2FoDkkYUC0ykyUt3Q06O+Pb+LgZJJmpUWZ604aeLfDUiLRWGv7J3YcjhT8RF+/mOAlqvDEYXDmHPf+feLD0dITp/4nRbtSlttbhkQI6ZXyYXJAoTlZfOscblSaKeU5CUvGK0QZwCXhr2wMDU0uWSr2hliSFTqAPEu7/yEeNd3DTiFnmEOYzgOEBZI79IoSQAtCVUw5IM1z9AdDQfnV46cVidfJXmYuCbccpqnWEndwCLRMsYyMtFKmmhyPe8cchy9zUB5ma2EbUYlmiayyQVYT9NerjZvi0ar/RTtCcnA0kstzD7KepHCM6lOkjRuxwyfLO1Xy3xBMJU6mOZI7t6ZUD5O4KsG/dMpVZ7nm3h37Bb6hCiFChje9hr2xozlT2WO2R2iP6lj+wJbekv7mZ9mpI7vlgNh65ex9pMCX4JuzldJiTzJFagq4PkoqEsCJb3YBO2tlR1oTNRtkahbZuHXWz/opfpt40ueTAP+cstbX6wS3NuNh342ziHggN6e9Af9hlVs7bZR1mUsk3kNLLZaTC1kQVXhZJy7um4WDKs3pIzGaiJYH2vCIJbOon2t3lRhNc7jGtod8A0Bf3a1Q+Q0dpyI4PZhQT4YdLpFNiLofctyacYhkvhaSb6O3wByrJja+ygSl9JYbbe0Y4llkazF76WG0tSWgm7ONNuKU/3bgzgGcdKwWqe5B0yTECOJjwa8tExp9Xfdf40ORjM80ufmD8eqRYQgZ0JYrt2bLM+FtvGauvsD1NnoohIwqVgFoNShJYV77UotYAhbaDtvz4McyCfzbm9zDMge2Fi5iPeyW56q+ZNm2Lpsse+ctujGqCRwv1UV8XTA87jTmf/reC1+k1N/7kwwD9qZ7pIEf1R0E+6bPcKQVnwqnUWuGQKcON1ZCq3yPfXOFPlr+4O+NgJ+UKCRFkKZnA5pKVDYi4EZIBicYKpCtU2bLUO4DfQEySXZCLDNIZeT9bJyXRyTopGl25sMq3odThjJo+XbG7swiux1aFwcV8IYxwBGTCd5zAl+ud6IWWyR34RFphZsBrDBW7KgFuDz15QhgVOvVjby/hW/0YKU81gJ7Uyf0jvLWzN8GvGFyXOyq8QQw3jVJ5b4bzVDnJ9SVv7Rfm2XB3x3W8v52ulswdjpQht6aLCIVAmHWLljlz72mrN0tQppcxDsS4lNVIQ+hxGfdqJodrEdmntGc5TZe2c1vM6lXrvAFe3lRTxqlesf2g/cb9C61QzoOoNutdnPKQ3qNw3EjaGu3KOoAq5J7rLeR/sC48wvhif0kMLwGbpK9fFkEnM7n/w54d+S0O/Ap5t4HylkaUxnJChYtiIemTnbhdvfz5wQP8BvMvM41lwBXjNtTGytkhla8J2b/m3OnLkAXyAfCCl27Kj92gG80OWrvk/JNsO+C9m4TxlcP/BvyBA6YetXUO+xGJeBeZw/ZHf1d+S9IXFb6J93Nn9dC3oCeXfC42wBeSE24dfSSckCv5s0Lx+mc4TakfDL+X8AP+F4mX2EhDIwNdPrMe/SzNoFX/xsgnZocs/K+0kxoppft0S24Oxu+M965nnwadWDxzXSy4u9pIAs1J5ArIwT4AB5tsGsgHvBuk7lX/yqwt2/Su8xmHJxbSawcGOsu/oWXGzTrJqdRbxdOOB+JaTHUF5a31qe+xf7ZvTi2OVNfYYX8RX5s9dhu+5DUobKvJx39aB+0p12wH7CvgFWAXaBeyzmefl7gPGBXjDWZerHA24BT0M7oe9DojFj/Hw2u2XjebRKjIlyiV8JeItFKg+FAyqVJOYPYAStXLIaF8JyKt/Ee+NUZSBNKM4Q+Dt6boS/SyAo4/9UhdLgkuWcs71RFfhNcKoTNRB64g5wvvkfBGFovhfWhfFbhukJc4qQP7F68Eb9O6Iw3P+ohNIaxB/a5Ono4KtB5rrOH28FPCe/fihkuFS01/tHrcgTWc5867rr5TwmP9l5fypq0fT/AxjaYud81us81yjpGf75br80dxdGxtbdy7+q2mrmFuM2UVFTjZmFOdbbOjVpXkUBnm4DSuVgtXiCp7WiF6AzadT4lia30hImtYlYn81YKP/YQGswy0cIkwCyDaYnmCGCZk9q+0+7Z69oU2WELQ+/Nr5vH7NnT7lPu0+xT5a72AK6dvtzPFPVlPmol7St5Gd0WrUPUmQ9sv7oopECuPndqVIgZx54hPQKwfZkpda1wNd4jPf5eULd62DjFVxk1v9hfSg9ehoCRUV8ChzHAy8uqm5vF9FeY2aG2cIyvxScfhvCIbXVnacs67J7cXhZVbpGruz/veqe6XxExfrDHWRR6stZOWwe4xyqj6X/fmG/2tVhmJHoQrKUH2soO5K3GPolxMQp1yIzwjrMxjnGxUwTfALShOuQNTEbkjT0pXm1j2oLeLmkOkC4+FSZWP4YZ2RjoSsYxyxc8a2+Gv3fTV36B+KD41vYPOg1X7VKrkqK0T3oE+hRufql3wAd2pK8X3Y8o1s9Giv86pL+d1SvH70Zbi9IGcT6ZyJt55rDFtE0ya1zwRHgjagTJHEcjiz0Usz+yKWZ/i7DBpqlq6YI63ZGdwAnvaNyMZFyyvxysxSGtjmSAp2CRiImaADtWJsU1ovINhzJKWisK9OUlwGT32SBsfMZJYFET66ZnrajhvxK8lpTIfJxmRK1m9I0Zt/INazAQOxnk/nq8PF43EjOmPNooQy79dusp1t7OS1VLQDyYuIfyPAks0AzwPuaWyuG920S12Aa4JJtxdAznSa/Xrf/yjY1iWrz2zmY8Bk+/5J7+rXS4mZomcv1Behtb/6QwRJTymXJ/2hxVp2B4zVET7Zq4mErp8vgwo48zujKVE0myY6q7jPfzzwM1I7WLKGcG83jLp0pDRJNa/yrTx9F0oRlFgCBu2PfVKlvS7EHrjFWTy2a6nLw4IELa9zYDSm+Kq9DTgX1u8ctqhej3W3Tw/dItj4sT+o5ukr2dPvalUfRhatmN7WjR1vdVPvE2yumxcY7JM4Jb//AgW5/lDNt67TwVT+vk6K/9BTil/5zeHdgszfB+JvnLN9KzNoCzLpu7EZ3p06I1wVHV+6mzQ31abDyN1izbsd5yH72+5FPMmnco2xP3KWdzgWXNey8I5upM86mRlEfYVOGX4E4QmkvUNPoiiXXdMLstf7zCxqMrj/dbJV4c7qnzhNRip+YFcwY1vvjOIdttP/3XKJqJFt0P5tiz12WNXcnqgdSIGl83HS/b6Mbretr+cN5FYhPYcmo9awT3G8pt0fQm65SjTc/4e9aRr2cYw0tX9WEmyuGU+ln3MNrn1fZ9zOvY9yblM8HTzVskMiItkqwbDawYYKNg/GmEdCp/4Yiwo7/HFfCdhiJg7Ve6C/YgYHv8+s0bz+pR4+QE9+Qd4OFw7g+4eBy929BZ1V2EHAHWHjZ2gBn5b3ESm3ueqOvh2PYwlJg7XI1cb5Cf3P1KU+tzdklWBx1wloouCeuyKxPDKoRhn+vCtyJJmHEDtmzuI2/gj4w3/o1hNCWbqI0Y1juRY6022alJZ9rep+r87+WZVLxLPB1Tj2PGiKcaJ64k71UNMZ6WaG1Tj9pDg9rxyeHr2wDYVwGihxX8LD+K8pD1IWm6geIjmVAs26QP/WTW7PnVkNtlLQuP6dG4WBIOBWGLYvx9O7JwqTiPVzUvI1wPvIYMdFLi8hHLhKEU+DGFTgTCYtKMOo1L5qhor8L5kYgHK40dN5U0Kub7MIEI7UxuLN326FcaA1kbwiXOYNjPNNdhvrO7XmLGsPqxLx6DHt6rQB61IkaH2iQ+mmEpHcPkaIkTDpt40YGbk6924rtv6dIF1owXt/vYutfMtdaKBaD04XQHnGzpjlniHnUWhYajquWR9UN06fU3K0heU9u2ADtQX2DZ/lg2Q3blBE49Wi9YtuEE2h7zUz+recjmPu6aWeI8aVc+nmfN3zjqHpRcFtzgsH2Etwf1PKbEOoI0gZLnZ0LoIamVG4q30AmpO55Lohy06dwN9j9EpHCaPsfIV2xd26JVPkGTSKq1WxBy6j8WMSkJEFlBuQ4fqc3OkhdbW1BJ+dQ0PeBg066/JkfbqrmVWZlmOWMx9OmsLwL7VfcKCd+j8e18fci/1P18gX1It3Q7BX1hq9VEiUb0hdFqwowYMis6hPMi/M08ESy5T1AJ2SqjEgkTRzpN8L74jCEeWZ0T7GSMMS15vbhnt5pflqI1DqTE/3k7+t7vBFp7pLO/gnyzEf+/t/FfEjsu7oQzVQ/+2oTtxAqKH0dh73swkoMFjgeIqbhxbl9gHmCf3HMN8xZNLiPECibHsPPcJU+V0k/G5U1Tz+Avn1Kz/Lj03JAfrsUix+lZu24PGSUlIYnL/lphNTkrs199J8P86hKzqVqbnIgqmiS4Kf8tGi8Sgp5GkdZJ2YkkyYp4rAJn6Trpxao5VQm265tE3CdVTbiFWrFWoscj1PM0Wkmkp6q+nNrqrETC1V/ZhzSp7F+em75szIqdSZ2p62QUrigv9GVZzWMJqJKgeH2TwB3bUtM+LDskHuvVhqO/BszAjVGaOgtJaVJ+MUtaQjGkFvGJT4pPshtwkkzngBROqK3ynTFfw+1Lyy8Pu7ZpukxxHYvPZ8E5tjid25gWPbwPYMaPKnXGdCQetibNOlgVOw2Nqs35pvo9eVvtVnWsQayVbh0NL10Nz50bx0PeV+GnnyQ74sJ+caKqdDrYXbqNUrGmS1mkYj0yVmrU2SUZPxsoJSGVE+Kmrs3G6g+YoZ6n1b3PXI0VxzMGdjf1ztBeem9Z/3rfXZaG9f98i4+Z8X/paRg2hv/+np524lRkED1y6CuvSOp1Yfk8KU343Aaq9nTI+TTwmvvVHyPoeVrvz4j3EmAk+bfxDp+jYBEPSheuxrvtlwtJIitNHS3MjzCVYVtnOxd4J9U2S+3xXxW1DHzniVUL9Aoql0VwjdFBODeOaFfDKqHtXXOcYLtW0s0LLi0flFUWqDo4I99yIp7G8GOOqgqHEF3KR02XYcG8Vgort93YxdHjLxFv2VD0V2wj9OVV5nTJhJqnnEBqRzKz9ZEcbnyd3y651Gatol6qyyEjNFwR7kmzSCW5TZBmYIk5wGZwlFxhaM4A9jNozUpt/goy3IBWfGc0oGGBszGkOdjgCZBOJ0DOQOJyAANLB6BrATN47GFQ5yfi/Zl9/P3+//jE9wsMEgQEBQsBgUOEgShJ8blkFpLyBcknfVYsXnNjxBkKQ7Y73eKPGFLt3ea6ePS9B2zjNp6+lIe12Dp8NX7EZLiVLD9tmS1inTSe0L2h6AP0ag66/hu7/S+trcnBwcT6327NstKz/Cd1oXcKlPdfMdSx2YyM6RJhbsrG9t/frakYnZaCipKDms61SGHuCxo2hEFSxOBEceNVrRT8QEhE70LdCLFhLsRlZRUtSSFuySNS3GvDCc+pvtMd44aVG2/evgwOs5mtjsffn9lfACB/LmKgsH5/XxofMU/ka/xZEkV782Iezu4PMxGAtYBARaGyYXJt9Soc/prH5h1v56d0cQ72Fhp/8KJ0CSPC0hjcXqZtEHkvRv7vqX2DF4UbFqdFwO4g8l4Zdo6dzP2d6CsPYzaYuOgMS4Uxu4QemP5sVAQUyzCWKWyAba+kHoYFXpbOD21WhH7ftINldy/jtbob31wAghZA99OzcgmGUd470D9Q9rVictBRLz7trQjrCsZwIDOa9UJ7YP2o9QJH7+WOwwh7UX74djBIp4FMpIEBPM66gJWaqzfbQPwBjNCum/HOKx7VRQCrHKt3tFKuuaJy0x1BXa7LIPu5wqZgGKTj/qlzsJ398H9C1cX7QaSHR9qhFx3AcUek1ANX79G+0HhHT6sRrKZ49YfW0FFnRhvurSGjjCCsUbUmU5tUrGG0xlaacKzZNmdhG4io83KMy9Znq4NXj3C7cdW6OewGdo9rPMR2YvzGr70Z444hvAH1xpPcOXen3e68f3j4/vodnLoj9I3TPRoaIOIWlrypRyMXGDaqk6pGwRhWrdG8RAYdlLPTRApHtFPchH+ewE33TP+c8DvFe8R7lHMsZ5vylmcww9UEmM5bb3BpetWkrchBLRc2r28Y2oS0qnpVr67+/Qjr7NtR+1XHq4ZbDru892z1leYr0lu6PTv2DGGkkFuWt5is7Fahes79SHpQylFxW5aSkV9cgmbRo1GcoNSxUc5aMm2RManUsYzjzIfVutDAVE8esbxvfVMXVT/RStXIUNHkqXapea6Bqcl8xrGSs6pnqY6wlWq6br1uwWk93oS0JrMm67l0j7NSrdOQb7rkZc17kRMJMUCnjazph+sclK8Xwi7uYKcZYZ4mlN3dZ6Ee0lKPjbvDeHR0gDQm0s4mVEfOmjzQIMwaS1yXTJXMXohYpG1NwzHuGK7wzzE8XVeBHa6AfT2QCU+Cc7BUG6EYHbFAddAcTruD8YbanYh7UPodgBBmUdBqRgwSDk8nTxSOFEfSEi4dRwAXzn0TyEZZFc5op7lBKMMdpvBnh/EekLBkYZGTsZBpOcmsW5GAWgCzQNAsbBXX+mdk57ke55LXJeDnfEpZomdhHjG6OajnqQ+eb0CHyqpuZaOScCWpY6nsjYp/IIVFqjJQ6pJUzlaym8CX1QxblE2qfmpnc+vZQxLLSqhkX8CX7fbsMVdKGB00T6UacRlPEcnuwpdtqGRPelfz+soVJCL1gesfJcFyMs2pG0bXSi7J3mkymaotFft2I4hUXhHF/DGqRrjRvDaGPtVjNxukpPaOon9cmvQJbNTIVwJyB/UbxLtz1DVOxnqNuQRAKRPPQNmsmCW0qR2nP8F6jO4YxTYqbZh4G3wbXtO39v7u696xXSHsEXEkW25veBWdian+RfP7+3ncfeQ8kYHoJSEe8f1cfin0w+PUDEC+qZy6n+9j8iMrdy64ELjQUcKXhpqmW/DDuK4mNZuCuuBemixLl6GMqNNZ6cyx7mlhNeY7xjtG+1HivmA5hiiWbOQ/1OdufX8bhYXqhdKno92Wnqvk0FQ1Viuq+/4w2SyFBTmG+oOQv2HOP51/u6uwILGg0b3HnUd3PMEdMoqc+9fpjdfXH++gg3u2xfVJxu0E9Mt9+Qqdzn0kb0zuAc+iW6DzeTRHme3NZjXa8+fMj0flJ5yvYDoxWSN3MGonqHRQixmN98Bnn6wz3PYJln25RzHl7zkaz4iesN28GIgiqyxKg8p7e65qWzuMU9Zh6pHr/jGFLVpxmXR83pR1BlXdBCOABm1eRj9xOf/4JDqS04zMkyj7syWTSszD+tQOi9edpHSLZE/HhNfvsUM7GPL3mVejomzaxKAgC76mNHyDY9OffM05MemCzecUDUalG3jgM1+k89Ik49bw5BFCUW9C0ilspfozOiST7ugkCMPM8LS+8JHGlvopH8NkdUK/lAbHNq2QLIE2XnzEYb1jvu3cKVbCf+YzimMJ+h+bfJpuued5OE5BuzMpFUdy6CAE+hhLE+zhIR91wIp6sJVBTvEkLQMubyiyfa43wFohjpkwsTv03H4ld7B/Gj3X0P+WFwy+rAFyGZptxQnNxxKgRxbRS9sORbQH955P2XPYjgGng17vczj7Q7792Sb4sxvqq44Hpg98FpdLD9+jT88amGAeoN8ciJPVz24NOKQQJm4NcdiAIrzfBR/TS4+x2a/8FHS+FmHpjZYe4heasYZjqg/nHh5mwPoSzLEG5TXk/RQmxwCPqo+nHg4YH/xNgAE+IIkNRsEOErQPiBvsjA2jxYC5cog+PiwRH+RQj1c2pBsdNvTmNj6SER/WtP9nJhDoC7l3ENQeKGnPSzpUKR2ozAH0K5xqH7o2MCodFnYLiI0eyXbQZjq0Kx3YzT7uC2uYH3W0n0QbLucsKC1cxwA4dEjjC9t3cFk+vMIedrXfQxvKp55Vuv9VH25UEOSj3xEb+ucM8J0dvHc0JD0K1B3kkT6v8jjNHbpv8PANJrffDuNgVT1cxDEcOsHoSN1D4kdoJ6XtmMdDaifh0CQZm1TIhP14WOhdmDcJJRnD3JEpQ3pZhkX6hhRu0a5YzcNdeRmFb+qvjzHBBHGGNbABqRBiIx2wcCqdcGP9cDCxtD6YuGBCPj4I4DozMbWiNXTUCGR4ibLrsKv8JqkAlQhNfvly7UZgeIpmmibNcxNlwakMWHFzs7feb/vjDNftX46+pm4vP7LRekwH0cZ9ZjBMCtHMBFtjTA3usNMF41wR3IcF5MoyUU0ppWNp24Sm9pSNsyxHSrr8kObwm8KRwZLUSYieUNV5y840rpQDWpThbclHBJO7xUo4vqLA9zLK4DyVAm/lkPtZZT3e0sF3DpSB2SpxXwGNt1PKyLgqc94BMpXoxocoylQ9RQdvyZHHKcoAPYWIr8rGezplPl8Z2eRVlcTaZVudsrILTx6d2SUZ+RgFegyk/qAIe3DTIUFsaKl6+NQDevWww33eav9ndWCselTWA2F3gMu9TXYI1kPjtdDnu3r7leu1P2H2gM6GVM5GWNgDKXfMtYFG7bC5Q597ILVhSe2AM/u+7uBw/V1v6N1xvG8gfkB5hmQ7wVgGyITIRAN/x+k1YzsRoQMVl+RDwZKN8NCDBuhRhfSxQwfdoYMw2OFtR5DTIyrmgi3oocAHbAZz7Mag02My6iHFhiypA7bZsV72sNei3Pp5s6E+HXCx+03Zwx8HwqL26WkDyOwpuCOm9ii0Ye3+pPkiuQ1abIGa2bN1h3jtVWfj2x3ysseF7QFzQ+MdIN0h8Er4Fb6eAX/E8xb2zY09qWmSZV/6XuQ/NwewLpB28vuVzZ7jPYH6SGSFxNgg8LbG4JbWnRXW0xkbJh2Dz7vySW1ScF8rbIh0re/xYlNyd9KFQYlFFfM0p8HOCXhGw84fPgHHIq2YHvpu5SWd1dN34c3HhWy7LDQNtkG5/4E7FuyVeNuy5xSdhdjlkiU7I+4Rp5vPO/f5kCaNxO0cHsAehMgm/7LD7/ri7gm3Q4VVHywZBJ46N/EM0UWpfcPske0r1rtnx51N0R5Bas+0ak/1FepDwX0H65HoK+Obs6g9lLg6puBOKXPgYZvTck7dKXV6gv1O2Cl5fILwmSxyJ0Zb3HWH5sF3Gm4zvuAYeezIuEWe6QikcqfeHcwkmwy+j5dG5zpbHRRNu2Pcr1DAHlLNoDI8Dxs0fZ33zSBLfXDcr10f1HXy8JfGzsgWEwvZx02IKI663UfVHU9a/4uLOxDDWMEtMrsI5RyKdg/EosVSoWEZa6mkyyKyXFVhmWkp/1qOyrKaXtFXpFrppdKUWadawWLpMqe2UdXC6hykW7b5JLpdsErVtVHcV/d64eOZlV26+Uz00eUZ9pO7U4G33PVk2yOGtwz+fPiB8V34g5PAMNUek4483E9oHvK3Xmamu16K9s/QI7yopmpCtapGlnGOf72sf3Wk7J/aF2zRrb3rYSkrroJmPzQQYDZWYzcg0/VrkyYpH3YdW3IpZAzYBPYp3ZvD5AfNuEUru7a2uKx1W7q23Z+YDN6Ug77JoFJXu9ptcCSepuPVa4e3yJ5WKsOkVS7tK/LF2IdNi9fIEA5AKKcv1OF+EQ8K8qrBm8MlS7mYsbbGpRMq2ucNbFivjFvzljG35qWTO89jGh/QCm216Vg4fVaQphn4Arm6lAhcvYa/4DsvLztcZUNtjT3bK7QOIDdc+2cskMFWKCOAIcaDzeMUJjntjRu/5iWLBkwosmGLBOw9JQdc7FWGhf+EUc7udXiQZQDmIFyQVGYxfmR1AVZWf8a4YrbVFdA/qYR2/IClguQqCW1QyHshtvQWcJqFoS5C5vyJfSKuAnq/i+NUckW14vNqxen+yWm3jezUFLXazpghtQpn0YeDzM3oy8jLTWZump2ScmoYLzXAN7bWw5NgnncHWxUpTKbeK+yGwrOxtTe5z+3lWGcLaIhiEC7iyKj2erH4SyDYniogqEoGDER/yAdlRNor6Pc18ZfwBI1rMdoxAhHmjo/FsGqbsaWdQonEugpzLGQPvY++EfYjfFTUB9HKYPM8jefuBdh9j8a/TFf3PHisKg4PdDbbolKypdDI41oFE+lr/BfhFy3G/aSruaOZERZA5yOT8RV1feUdYWEwtIVrA9fYicBzJvaNYyJcUKBpohfV9Za4Ger6fczmyzNiK4MFy4yETQeLG4JER9SWQ0061ZZWmj0ctSdgHL4/4Wom7TJvpbNZcf4YUxdoEesZHBiOw6hwb8FNVtt24yVPHVCKI2LvH0k7oSBD9GNPDk/ORJokOTpuRY2Zvk6R/21af5Bk+lAQuwju2r5JzRSQMnqsEoPOi8cisgUB8qWGFxT52AXw1KFysGnNgSf1K/kQL2lWrmTTGgDUh60aumjkPG5DbHvx9jiBFpUXm8r0wrWEaPeZ3aUg+W3brMpROXjJnZ3NQRLT0qR9+QhoOggjOAb7enu0qNiyfolJHrvKVD3PNEe/c/H4kdp1njg1Th27yh228ixtE7cAFQqDlnUhtTrHzmb21FUxNV3unk+rI1FRIWkcdOSpWV6mumhsIqtJl9++mLDRcr6MPjnBaKOFbJbOBUGGbWBL7rR1wvpDXF1HTL2gR8aU07DKLE+qKYLqvsBnFsaaXFaWJoelzeSqcT+ueFF/shqNfoKb6Y5pZedmEi5SdkQq7JgEd0hbJM6cQ6pLxhTa547gmHU2lkj+B9tXp/ML/EvPTd7RUtMAsXOa+Fie9uSuz9susZkYE38xJgLVKHITcmum8yn7qhdC1kpH0FbS2lEhx2rtKxrSy0HT0jXYJn+Zp3GawVJT3dZWSdHS8TdcXUr4rh/e66Q+IGgUWmJyslyuHuYMzQDFxrG7i9pHu0AICApcv4t4DVCqNmvHb3OhunTQM2fnmepARsTbTsQ5n/DE1izEvW9Jb+dm+1D7KlJ2kF0NAVVUjwTC7GL7HVq3zVuqFXaVkpiz2HuEz6JuZY29ltL7dvpmhte0p249Z/3VaJTp0mdD95bT16unYdX1il1FClsokTOQeG6vkjABMWThC/+AoEV57ytfsDxcDx9IkV+8RIG/ZimR31wNpuBboUI5P1xSPD1VssRyJZuLiUuXy4rFUqTw0Ot05mqaY/f7xm0mI6CP1BzxQS7n/W/xsgWrRvYKw8XESVVJEjAwmVR73bvl74TjO8j0Te6AhYdCIurxCRZ/yfSJ313evRg5tNnQOJvuQRnaOqfihKRjuO/LngIboADXyyxBL6CqN66h8HgVr9AwfuEOmj6qmplqOskS01SVWBFj+Q11UfRQK/gXboIw+59MzZtAG9gvVhbyT7paJUM5Q0HKV18L4+c3ji4KBiMYya2fefapV2XET7iOxMg9PtSUFVm2X93IcD0I+6lYaeU9glHKOWZ+HeBGsvl31WhZxMQmGtFQavrxVQZzJOlsS37TP/PQBBv7Y+N/EtSAnTAHEhfxlMxIeaxj1gmJPCV9Q0E2SMEMI+/H6HNlVwpJX546KTSRHptK6tkb7XRrsaef7S1YM8iVVmnpggsVn8fnjtBKS5wWo3bHf+c3QZkT9eHqBnBFbySsc1zlnWZsxF343WppGs4PiktbaKODgKmUHEt9m5XLxUpHhE28C9XGnYa2wTUcLtbe3hooGEb5sHXKVdG+apeF0eHV+ovilIdHaIZv7ydEULW78G+CxVi8e2AGxWv0G275t8oqraE+71ivtJ4WAhUnS1gNzxUR3dvq67BRwl4oMiTHG2GbIf/KBx4cM2arUzQq2rhYW7eQigSH5O3UPIcMO2nD49ctn74KxoO8tC0XJQnCbYHfEQeqSvceoL5pIisMvQ7HwhAIN9BLFEYYc50lZnLbd3u712XX8ibT0aUIkVa+d/p09mmfJ8V97ak56lI3Gdq4eD+pyySSpkllG1clJ1IVoOPOQCP7M9rz32NcgEWDa+U6DSvU/nXiQdYDfw8si6Hph3EEFbazZogqRm7gbo+RV4DuWH9cr6DQsy3l030IJvJmb20M7Gs1haViAmZYeTDxUozNsfXFQXSxZJJj8L8GyBSWOsuiwfM4APSj64QWYANH0hVhA+eorU0b4VBWa1EJ3LVYk7Jvq95xGSCvsOIGgbeMf1o2RIAriEYPK94YJRvEJdS84Ac6IqCnIYigEEmpRoDmBFt11qp8rXikBkORz0jbZEsudyoIhr+QgPlb5jShR8fQqt6xgxSzWTMxHTA0lryOdFxeKDzg+UGWcqNIPhAqZtdh2DMx3zyRERv2yU1qR5NWdwx8RSEWOSX7ZO9atXn+GLuUbMkQbfdknJzrzLm4qI0m1J1VGqIPEg62D+C37+14Br9B66c1dwFhx8Zj7MyswR/DABJSniNH5l/rJDzHQ/knuqxzRvhECm66RgwpoRkgsBVxmtex2QOJjOocf7cbSDdlH8lOoQ4QXPs1eSjnGPryiGkgo5Gt+SFGdqJe5Ogwu6STd3d7c5MGLcq96Lw0tLFCmTRJ0sQF29AfOCq2jdeE1I51Fw/2IzCGeo1Z35yohumI5mJaVnv1k+qNT90w38rga7lMhu9rnq6W93MNxKXm/UyKLcuuV55PLhtI5z5QCTfZhsOEQK/e+UlAqo+Tbf8Zf3Mo/WzYxQN/p+WmIQMjKu3aNOQqXTrCTe+0ZykzY96wrMh+OPFs8xXwUdUYcw96/aUQNUtXnVVccfkC4Jq8pVgL6dSfwD6Q0ygaWQKrEPwsXjLMfJT1gn5UHTQmdvYppar3SPs3wIe/+Eb3jQjtbtSYO0+m7EMWZ/5tabO7EI5mUKge+2OLDFYVKuYuh6bVKdf2tPvGl+tUoqFRPx7XTnr4gYsdLkNYpUuWR5TsN1zWqGisnU3r6owBaESoxbnTtVxdm/TQkUGP/AjqvTuhV+tQI3EookJkkRoFIE98/mm4lnCfACq3tameZByEkIZrjxAwWQD3mdn+jrtI8JLB8Y8RsmzzAOQMefYbarVnEhTk5KePVgiSADtn2ZHZp8REsmx06LSUPJsJk/YHxwVZfGsJRXkGLx9NSJDU7siC6j5Idb+cUPROzc8xUn3hpcxfm1lZSCuYqFH/u8ArOK5g2gEcjMO7UceKVetefcYSqb99g1Lf9kd5oGKebdgQibdgbuu+onJ6f0BV3AI/IDxxKe6wahIO2lgUJ2N5I5sVvKNJ3XcuuCjkSkaRJtLJKN/fAqmDP80ahcCRlPYD5nDd1J8gRET+wFDXO37ZkyPvqedtWrRAGDLkYso+RtqHQ5FXl01NrL0p61GyZMMkikIIeiZzAt9QF4xJtBFbq03NaNo6IeUQbdo5WSUaBjRUFZgY5A08M1CnkuXn+09vqpYXCraMtbkNOP1caTBMgl1zqxkQfT9fxbBMjUSV+eWdt6bLaqjb2yJnfwLYAaDhWe/bEOqmuw5slhpeEtj4D2iryrlnZgljasMoLlaOX0pC+3o8NT7S4QM0CAvDVuc5zUVwvCQUuee/q5LgRB6sl3ppzliqYLQA2pLcKpVQ0w+A4eF0YgFFw6J/wyxoQY7Xvaaik2j1kNS5JPvvrUSjotS0Oe9LxfnVrRq28YtZYHXXj62YsDCwlr7VNKU9qqYyMMCShrHdOM9OPnS7i+GYdd0yb9NFMZ0/Rb8xeodvY4+5EcT/STbo3KW+z7pW72x5u/KXUnVZAZa7OAYFQTRvbvIAavuUc5s/fQumGnav2bbgeuyScglbtW30tC6S03mhLLmIMn00SpaIDL3btS0z7RzpdO86J1+Jig+SB+wWPjsFSETSCalTim+Q0XhDZS6MXFMVoB5+gTaqUq8Y/wYO09ualZlcb9ZOz/K8o+4midIt2BnjgAd/QJUmFvSZ0uc4n1X0cz8+U3CJYKyj1UshxXWN6Y2zfuLTB+0xRdshOryOGFLLDPqbVm311Dehm6Qs4oqK+IT114/A+Jt3C6e5tqLK5jedTrFPGHzOxf197SRsCaFZ/G8+0LMKOgk96hVE+w+D5rBHfde4TI4/C9RamP6sv07oJ9z5oQO6kzgI1GAPB2Xbux5nXGe5wFF+dhaevAKxAm1ywag8ym7gO7ring7iDzRiOYCkAlH9TAEjrPUPRK/eCINyiZp8CiboVOWs2oTdndvejsrRGFp82EaQKAW4oQVVd1Cg3Tp8lB2hRszpr/7TwUkXDbANJEb6NXOgwRTtgFNi7Pl31ppDztXYGMZVmsGqAvwp227Ad1bYfZ4+TH3bAKtBTWVNgUK9RT20dp/ZldMUNU6MqpjrI04KFI3XiVH03dGiViZvReyIjvThgW2pQ3NTjz9s+de1cfBi3orvyvo4xzve8zGmtooL6J7LDARgJjwQDAGEvrjgn31SguA731C1ZCAWbmBBARMwRegaF0mBDAKVqOulwlZORkWLFn8lHLBsChs/fCEaZvWjAujxZmg4LZLQsA2wQaH175XeT11bpURSl695vN1qp5f12ZbVy2HD7xKSpbTMQlfVkXdfkqAvtPhHge8aGf3TmjM05xRAhK+Ek8dwOTbQz4kmX1xAPzuskwebTRbd5mFxJ8nDCZrpU91IDn5vgtH0ojtW7CCqfTeK1gYykYehPaKN1ZFCdWZaDyODPK/W9Klxbjt/jjoGqsAYHRr46URHrE3NmPfqDruB+NSxjfaOXPd63dGO032DuYDRRdM7tfk09c+8dD9ho7u04NFndebetuDRn9K3kf3soo/W13U9MCMiIm1eha7r2q+smErpky7eX4RtnETC22Ljd6F4k5NqPVrQVFdvst+3oYiMojWn4R3SKZC66O8vdckek5P8NkwcIzJfmMvr+laGlYHeaQsrOGCdXC7Y20sfhKIieluYXSXqnOtte9TtqJ4gyhd54p4vX4Z3+ef72g7L5zlzl/mZTaNar9WIR7ISIuf7UnHuhpo1P7Bv24Dr6M2AbnyLnaSrb4krEmqvQH40dPhFVUyh2Jj7oqw378uzjUpfhJ42/rUxg+jHeeSZRMKhu/Op1HgOOV3ZqBVunILQ9IJ3lcOzqX3uEpa4v35LDPNbrIib818P3LOar0eGeplYzKR6InGal96EJb40XhoGtm9YMkLxo7ODpvi3YDgyQX3gZ3hH6VE/0itVyQ6+bEbqfLtecV5+ag/fiBiDWyOZRd/WK1dkOV8Y3GT6UGPtt96jPIEzoVPmTwtjXfxXcgnxGzF5xDhrQgF6dN/d2927f786FA37GnJrCx67vvymZ0qMUHCUwuPOHpWyvWi8dAx4l5tAhKSN6NMfkfGFmvsML6gTPspXmAWBzWrbTn9IvyvjoxKi4pESkGp4L1TIBjh2+IRzBXOFV9I5R7gMMQVcVOs8H/EMd27xq+Kn4iOqIVpVC2IhRBl78Q6VMtC+wcjcf7ke4B/wv7H261Rvnys/9Xm4YTGmDx8s6LN6kcyhGMBfEbVPvzFv8/D5RFWb2I59Lftzllq0pIW2gBbR3eAcwRoDecHfa6/SLBymLLRsMTdIMkZdc+Idxv17tWRyELWTA9vFzoJ8N0zuaZDWcTIk88zOgVdYN8Jb8lDrXZcl6+Fa+rydvfvXJ33LXR5w2o/mPB8gu2taD9ltritJllxTwq+/6/SbakprOG2Ceqlt1qMKe2Nouz3dcX5liWjR4L0gjZuNwKBJ6bITbg2GCDLgyqy1/0zQjsm+dbwEaNAvToTc1RchnnCkTpkuktNlgJ1Uv5Ie2iXdsaUUWXDZXCBfLqYMt4tHbwlDE4qCSQ2/SkU8Z1koqfYznUTGJNC6ih4W/UBZeENHnPqRhrDy9op/Sjp+ep5sDD/qEfOkx1Q3fysF7RKy5In8eOzoe4+daXO86C1tYL/H+KXoB4Ec1Vr8EHzU2HstPDvD7ZbKvDKFqpc6GUuJ3hG1/cZ06x19XtreiNv0xPP8+HN3Mn7tWs1e/nxf+Tb37mA/0hVZUWhiwQUf2ce+3hrj1uDVSnB3tJJ1VEwn2lzGul+41CANcvhJN6NCjDk6usXz9y76bWR4X1KNCMC6BK1Q7x587sY7tPqxOfpk7GpxilkdKix1cm1pa5KtdaZqsgXbKDCBRCDiFQdbGXahbSetyB0mpEzXfJ6H2jaI3dJYBmC3/VZ4+2XeRlXYxHZ2kg3sKCXypW6VucTlqlxiv8bBbyt1cJUhVqw2ktCVj5CyOoJPJEIl7cOKh9QJuo2HAcn3mHb5dvwIzzwBfUgUki7+jLT2cPGyA/Ugx99KetDO+6au/M3bN5MoyGHT9dz01VgYeplKDHDdwT6ZTrQ+zULgo4HcSajYoa6oxyY1xS0dpYyveHtUPpInP/UgT+46dayLgw4m2ME4wjhShtCYESc/oylwJSNZMgC+p+H4sl3NFPO13bPlPzqRr1O8CTZMhxKJtziWPj8imcQ2lqPaLfzpkrBxXsxlWdUb6pvUzRDyUUJQLgiSUgR8r87BZlJTvxG+ifZwS/wJgWxxsPtViQiqjT/BGzXNjQ8YQHcezdH4tCJONT5kwkFnQ+j7IMs+8sG+XTbge4xVEgqLv53vhekFnHrLNbusB/K2ynRD+eWL66FO7Op+fHsSkCAEI3YXq3CaNbytfjTZ8/O/FUMPyBGeWUCeQTUJMF5zao11JEuye92+OO8LwC3iltrWNecV/CeTQNsLn1ocPXbcMEaWDvxpTXX8iMt/tcc6GFzwNr4115rWaQneOUTbN6X6NCD6a2BThnEX1rVcaxu2sYF2MmDa72vU4LqFaHkoI89FtFLRA/NwSkRwYLcDsSO2F2QpttHG6Y32sit62x7rjdbBF8dewak9ycR76iM+LY9TX9uXhh6Ut79b8mN5EL6BeC1A65HAjWldKrM63czB2n0DZBi/cSNzH6HGoaCFDrlYgdbKoRWjoeQzXusR690ZslZotWN27afc366POGtVgYYY30MQ61kwuGNnuKRWiV53CT7t0iLR4x8DrjOdom/vjtuF9mK82hV2OtBc4VubYcUZ9krxLFiw+YuotVtsRLXv08lFQEb8plemi44Wa/TSTWu69n3WM/zmX2uymjWi7RMRI4cUtUum6i3dK8F/mhZecD0BLkY8xXQkH7fmR9UGbZmpdjdWIG/rNDZ1FLVLlDUFVaVuhmKkJgEnFpvkkw/ysdEqjAHF4Sj8QPD4a7qleH7sk9ewm8J8y+A05JXbe3kEe8tyFGSPZ33qU5c8DphLVRHBSoCWuOpzZMs+/gqj+nLnG6FNUVGdcnUtkAfnVNexMOClvOElNQ4DJ+7WZupnx251sfFIInNR3KQ20oZ5Tte1tmvrtOEVfspWwTR5JtW1XRS7yLCEp8trBGTtTPNi3+fcj5rYA1rtQgc9VHqaOAVljQOfyDYtZ81lxdG57uFL7lav61cVh/WkE84DLaiqtEgsBVlOHSp8BlakLcM83AJuMC1SY7Ttpbeq9ikdSHx2/ce4IQOHIJ0Mw8HsPsMbA146DNHbBbFR0FPEJOTpz4p4rNetgcmRBgZNxgfuK7qLCmgDjfarSde3yaeOsZe0lpJk9tXxOGxkuZupfSrjjR3OR56kjJpQnqZlpPLJL1LDb7t3CGZV+FoCpMecnIk8TUg8bMaNh39R/YRXJ4lcKfkP0kLuW7KsjXblr72v5xvfzPesRl8KTiJgxPB+hz0QKsUD01W+8sFxIHQS1Inbx83P7k2IWAGmL+TsAO8apBe7Hh6CEhiTAU43RF8A35AOPfjo0B93gMrsbKgmfQLpsOs7TO+/DcsNYCtDmuo4OUy73v7SAbG2tTp3UGu3o9+Yus4PkZuLTjJrNysLLLmBadnKuiFq+nhL7S6nnKNdTOVfQZ+10sExtT2qViZH1m4zEG0esd1ixRemFIczBEFatwrvdC+TpS0R+NGHv9t/tYwyVbUIBBJEipVXSjG5ISBVFw2hCpjD6fDRmxpgZBpN2GwQKvT4Eexyv2AZCM/ni8IE+QL2zO6Iyc/8zMYyJelQnw+Ypuwe8jx0TyamrR2lblfr8mgrEmAr4K4esTuqr9WYaXeV7mKB5Fi05P96T//6+/cRKXjhDbDxHjQ9+L9D1N/A3j3oG8J6PCa9NX0Ts74kGdci34pbgqN7whRr9ScY4A/dMmYT54RTz3J1gUXfecV5A4p6qIoB/1XbW6OlH013kGpCcthCAxGA/7/2tyDrXxHeP4H4/2W/yzMAmEDp5gejGR5C0MKkNwCpX2KPIfPcEcz1KTZa8qhBUh6Z42IdnhejNrfJN2fXzBrHfG1uZe+rdIn+SFmBuNCpSXI3w3xscjp2nKhwv/St0a1oDRLZzcq8z7y5xbKHwV25+8OLqT4KyVmv8eShjX/64uzAr1fcCZnmACdfVkvPqa+do4Vi7w1ss2T+nMF2VTV5ssBY8eDG7gex6M26rJQ/FmcNirJeeF2t6ZCk4oJuYhSx4v+2Nrduer6u+pyaUYCyYniqHhPm4rks3/Y4zSbXx+GZrBDIZF5Sy8jbTziGW0o/1DsxvS859WS5cINH+KMnDP2xtlVkv1tVXPSyqWKGoNo3yQEHB+djCKNp7QJksCUTi+nVCqlyhFGzc3LVHAm3Gm0oqKPU0qpiA3Oss2eier2ptVMBrJm2Occkvcjgqbr2WgPBxZcqMHk+NmMe0quQzp6CBUP2d2KRbGzZmC5XklNnraRG9OZjkPWGbvsGk6yzfZEl1w9NHwAMWlr032jkWP6XtI3srP+DttE2iB5e5NU7JO0v4QECOhmioKUuYhTvUjMev34iIUoQduP4rlsoVoliQv/YGhMvkVw7RVuJlRhS72cv7525bI0Vt95HVd069vtWJ76s9OLKoQ+rz2UtZqB8IFzb1LjOuaxP/CnpV/zI1JndyXnHeRw31CDbbr3d9jq3jw0sExJu7dDdEE7XvHApufQQmcSTIkydyhhp9uCJCdHltXuW1PRu7OxmP2nGCYPxRe/+lPzyFZXbCX7cEYV0b1rZnzWW3xU0isHYso+uB4HcsxPyRAF34J0/ZffDjH/o+qGOkbMpzfakM/qLu4Hqkl/1EyaYslPONTAcTTOZmvSppNnTnrQl+yMYX5JuyNjjOeGxxXH+wBbDBmczH2sHpk3aE7kUsbjXRG9IWJXRuFd1A98mK0BZ0KC2qNeMDC5WloWUqchByVXlouaq8tBsVXdqvKk/a5z/Ekcunh/csBWrkeeY4n4r6PWkraRvOFxAXIeu3BcZhfnSI5bY3VH1A0CidG/+GzP+Ly3JzEDPws7x37SObPT0/+k1NN6p/03r+BzpLlp588v36mhUxcrcstREHlUDP+sJ0hEBz5qAnxzP3KUbQwmBUIc/QBYpyU24k1Cc2VpJU3JPm+B12CKVVt329bqVRb2ykTN7ysZkdjKdw/V7+zv9DgzkT0YMENb/E6T5HtfpbIoUo00MGia6UTRU5ecLC8CVoKR59oQeojprBNAyu+Ad5TB/SHR81+wKoBvtXRobl85Ra38aYuzPuQiwk46La4p3qUFGh7JXo3W0y5oNZjn9bC0gRWPMBhUXnTHPWuwp1egFlL5IVCh4Xd8kA89PR7aeRXjNVFhFp98AYBBxVEe6TjQkCSqH7wUFABcbm4lpdAXs5w+xrPM4rzRYqBbGq8X/omUMBzpjqY/oDlAfYo0e462+fmB+N1bKrLkY5DSAgTTQj9seC6BSohV3811ART6k3wYj4ZUz0glp32MFO6UeacXmaViLstVTifpnlpiRaYJegLQ58KXZFwREiHrYiJt0D1E7FKMdGOqeMPWApTvkd1jsLbpnYqMBTh0ea3ZwXZg1QsasSZ07ayq18dgaRWtqpQnGGnzz70uT0NUfKv2xdYkXKqrjlna0ulkUuwGtBzd3rJ0Mt1Oejhy5wwbuXLqjKHfE2T2tN1jdfr8jsne6L2i+Mbo7qW7h9OA0cxJeRCPh8nTS1AgWw6I1UteonoN8cmSyEQ4FSttwroPcd2AnPCd/jjnuOe5p7oVsU1k2vCXpzLQV8SZz1mubmqIVMaziEEuFDW6biFZBrTKeBawL054y3Hy4Ob6FsEuiZwXP7NwivGW5c7QnLs8O3QLpSS0W1cxGSr1lzZ6qn3zO8lcVuGUxGVWmZTJKBRpVCkohG8WsZdTnkknFriVcF36c1qU25kbyqOUDq/um6FZizf8iduypfq6GqYmpyXy2sbL7l9ixwlaq7b+KHVHWIq3HrMd8Lj9krXX73vtPVr+sfXHywiGH6LeQtYTAz8CIBmCb8Lf/WlCUGrE6fADWGWLsDDt6h8tlxGUp4WNdnyAPFK5Bo44hrpVRh9QYWwxTBLFfG3qtC6SKZUeuQbim6uzzZ1844u0ks78jlL2oZBtuZZ8glo1wZ9gdab3L6o7LfYGTwS8L48xrQiMRGEaKI1YQ6lijaBCqYcO/H5A5aGqjmBy0tktleyKU/QxbnDnJKlaVeFhJWpW2zH210G7w26SjFpCYR7WUDFPogG+LqXna8cjjqY9YROfmn16IeDb4SvRV7ZLJPifHWRYiO1iWfEUoeS1HsD8rzlOKjlSAPHuglEkfNMewXytzWOZlJb06yQYMU1REKukcPI06yRplsRLIdll3tAq1eh884ThUKo1UTM9erO5DKDseuAFGAy0IqIFgToy2V/JfA9UhG+mK0FSSYSgUT3IuhNOTou/frNOOkv+EVJFVDw62QTLJVWmTkWeCdhL7/5MEf/HSnZ5GOx7mOsDkH4BQVBlyLa8X06BkiBbeVzT0p9tNM7Bi6aHjYWHFyNT9pKlNxWwUYxLLKf699Ko71Z398ftR89F7kpJLzaVsSQtN3tB77mQ92OUB3y42yZpixGmupe5nOdAW1jzT3vta1jjoln4maaxjn2WPquA5Lt6WKksV5VLjSEuq4dpkf+F64XCdpxtJWGFPxFGIJYj1T4Qg6aOy0D5QWsgv1oXgKUs8UYvVjej+Wj7OQGNDlSP/4eFvcfBPl3jVIzhnP2fOdbueTXtAln3lkzvm4E67PQR/I8gde9x2CqnjYqI72FV9jn0oTBt9fHf4YWpZlWDT61oQ6Ly+UfiL91NXNon3MIaskUg4pfU25zUn/RaJOijXTcYZXlvI1QNM+1yubOIQE7VzIFdYd0YGRIFpFr5W6b7F36TFE8h94kXske3XEDXmcU5zeGyZQfR4pKIBhj91rISUDkLyR+PcyLC2N2LnT5oubWmlKq+PQpfXq95DhWrFKprHa58o9g3YCH6nnOrkOqOIOjm4cNQEoaotwjcF2hPS4rkzsHHrdCLXMDznLjLnuXIGEaFJRDgCXpQF4yoyNdgUCAaZ2YQ7g9LwhJZhhDXRlWMeOlXi8a5x9da1wr7BXAVcuPu92TtcnFljzZ+ECscQbYpQQS1z8FsF3yuAnAI66HxqDsRAfebpYm0OqIM93Gp/ZnWoS32e4imbepzesMM74C+Q1XxspH0C7sCxO5DcwICWBl5WASbL8noi18GZN96bsQTzMXjokQZ00r5hinRptw9G7djNewBTITF3sJx8IF5hOfRwGH141mCCtT9gRWzQInjosXaD6M389JoDsrsQSA0k0YI4hA0o0oMr8CG3/MwfQ8zWUEz1wNOjtMmHXYPaX0TTA7h3EC+B4O7oJwZ26XE+9XTEhgDeoQH18J8DhFdwEuzoivbo1cP44iMI6NCv9/jGe+xrofP1gGNCqLIh2tmgnw6sVyPs7NF+IdzZwO/scLF72uSDs3tW2n/Gzj5PxKQDkNIhyRxAv6Kp9pFrA6HSAWG3IFcZoGz7baYDdunRbvZw39HCA6yjA6LaATvnQtL8t/WJQocstGH69jDJR5nZg6z2qWuDfNXBSQ+76sGNCIC+9TlgwwCeAoGy4Xb3CKeHCLkD39X51x+ouCP1DtvecHCHbjEO2NSjT4/+YBCOTUE8FH51fcnspLody3iIySYqMIqHTtpHRoA/NHhTUpEzzh0ZMGZUZllmcsvoloKVhpaKklZVVJzrRatBOCsfo/RO5b02QkuQJhFgSZgyavhbx0swUrNAECNBIEAbZEmIy0NIxW9LFhNChIeABaiX4A4rTvauw1puEpuX4KeIwF8bFoRHpigOKNJcW9RA99iZFmN7sY85nfzdctvle/29efj53JbmkZqdBz/r8MSdPeFgzjCLD+te4pdhTsnNFz2fkCpBoyty/ah1Pg5pDscttFscGizZKBbik52yAK05si1pFwtxqFt4y194R0GZqav881MSebSqjIynSPqTcjEUpsKMp8Dw1Rl5XDQ53afq8BXaeMfAW3uQkiJX3uutSHKXRZkgV0HMW5P4TpMyaKbM56vFOclFKVO1SmqO1CJaI9ElZzVfKoQzOmAsDQRHOhSUDhdVj45aBLVhT149OF+PaWVAExvkog536cDNHYK0/8kOkTs6UY+QtcexX51lT3k1FjIXM5WPtrmP79pP1Y4Ne0jJHli1j14bctgOS3tg+/bntX+sHY5XAM87tM9/tgErbM+TXCwYkhg9AJqoZFnFEF25AMx2qQBzaN822l8BHYIFHbRoHgROn1R6iNp8wDo9loMe+HNIGhugyR6/2ZCWeiyhHojKgKt1EDYbhuteYC3ESZ9tJoSHHe7lwPtuf8geAG0oag2Mbp/ojpE2oGmwZHYf1R2ubQB0C/b2EPaNn3M8rB2Kdt+3PRB8j7L3T96B1JNZp7TaGaWPpF+J1RObJkm2FQyPhJUFTk0Zbafsb77ffN851AccD431lca+EdY5x0ei7Z9PQVJWdV90G8j6ZprBxdYF1o0ZzjCn5LszXmwabJpU1znZDSEvC7zrMrQzsmz8apqQTwfKsnlAA1e+ojyorsvS1WA7NAeItMaosD95WKJh5+F3PWxn6DhlSM6JP4J5c3wmhXeLMrF74rIHxvt+GVfQd0+MuATY9YlVweCqixScMnYQat5ZOwW7c3YdoWKP6LhTr444cYeeHzw9VNwP1DlFfAsennFkD8QvjsBsD8i2B6aeebz5cOeEPsJ+hXHniD6ieU4cflFUZ7febDwkTsOvxhceSaeP3Lr42Y8MtccK3nBW3Lqk0XjjwQ0ZvmTWzgx8hNwssYfrlE4ieh8V9es6zVonEay6hFssemtWBGVTwwlTQWfx9FtBjAlPd0XdyWj3xrn9uLgzSiaKHhm6ZUXOAXgHIZUqMmpMS9bLtd2VAiwVoiwiLFViy4osYnbzrOWwLYp/lR6XHZ/bNRFeSk6WmWVWM1tUNLtadb0UtaqsK6U+G1qVNktskm07Jbx0PwtaNT4TWkU2K20WW624moU2dK9Br1Wug1/ACX1CeZPSkYeFSKJDIOhVPHPPS5Gk3SGkiydUSFcZOzqPOMFKbf27N2zDyx+x+bVPr0ez5JyFVCzhhAHkbGZuwaab1rdqVHi75WzJ5ZCBrwkdcms2xjSWn3HDVlcsLqstzptVNk23dw+UNAL0POh7FrXMHwfc5aq85e7WfFB2krUOnOvc0tcUQnFQ6hfPUaCahFBNwanDA7AayanrVk4Orzhn2ePqiihH1BSOZRo2bWx3CzjjbuVVIrcvU1Q2aIofPtWtDP800aa3BBAGg9dEv75RKnrvXV9B73Bc9cbOzCTL3hM578KE9Zbyv3UWEhbHi6Ojckxtx+C4BIjhwHpFFtiv4bgOnNck9hA9WI55bQUu3fwNo78DkofgAaY2iA1grw/EtgawjQtuoy8Bh5822YkHgg6Rr2S0gyPvv+zRn8NlHoO5DimPJ/aLug7gDShraMsd3U6kbit+i2c2r1+0ZjNbh5ov6Mo+PhPXV4PNdKHLfXUjWEGuWlBkcT9KSZDa2Jxvis7tYDBbm8xgimNta3lf1e28ohtcTAsYBsxXrij5Qy/VEgIvhhFeZOs0YE0+HQpFINJcEM6KDKbLJAzqHU7DzM3mPSfUKRBE08lUBuCEPT+OWjaScDgnV4onE9c0Uom+2QH1F63bZHXSwVcqyupmrsDpG2bJxWigwciwZCB/H1A/ZRe/ceCNIp/fOQQN5C4YClfmDsTQpEUrRzWsA7DvkO9zBG1Jxadgw082FXW3W3b9ifuoP72ONZL5SnTHoEh8fZwQK0K1eKk/FaORs90k1DoDY42RushfMnJqXCNZFMITkJOxcAIzj/S1pBZRLGIRO4bdZHirwePd5VHMGJpmOpJWHFNDWZmNmGeZpXZYAbfvRGeTWmng6KXTK80DsghJ0UgyialpC25LhbWGcxOzbfa6z3IWBkxyTSgN3+IDLIBRcRH8AKikOAjiIzhSLtF39E5c0asU7WOHsq1Ynj4GnpPGIn2PWihtxMI1PUpKB1bnQzCWCKbmJDTVpBQkiVFDRqosDsZMpXuppVm9QVbnpwbjBvpd/zEGdC2TjcsuyI9Pdg0/8FeDgh+4V2ZvjL9w7oyLA96I3NCWij+pgB6Uh3FqId0f72RQl8iOoK5wFnyKUMERuZ8uo37UqnNkIJY4mTsZ2ezUcKiiMMLNZEnl2nJni9VO2uc73WPJZKLKNTbD8EVPuOoX0nOKShR5ChfYTnfMSpFCtvwd0rwRkOgdlq4LtzwGvUMGdk8ClfrF39b/iwx9uT76CltNE14aEMUQENyq1K7emLnIcIEhpuZ+PrjhZqRDJLZiBqFouuIbKRMJzISstMvyMayN/WHRElI7BVXL1Vupr1Da6qPeU8nhp776az8oEVviXgGY8PPZzcRUBZn01Cy1dCPnPeKFWMrdT+kDQM1UNoVJJVsqnntciwAAbZcB6teNVh0m5BmWTpI/wZwcMchjQbDFGBtDVRxavKKR012e/b314yOPGAWVm9d5p9M0kYuQV1CERJRlZ9FckrkivF3cbfsi1QKBYZ9yC9u3T3mzdEHj97j7whCro/Ju63527X7tftho9s3Mejb62uErycGQy4E1oqchScb1cXG4a/2GVaqRWotSE6VCvBwIUJDaUIugBe4YRpgqJU01X/G+zWZXE0KVv4KKQLKE8BnQBuEpgBaUIMWF/XXG/coYx0KFYl47bsyt12nGrfdx+/ycTnk+aPtWDZdVtb/r1lTWbK/u00Qfm5nbE2O7tHDuIdUyziDbKNnLfIq9ATEJkdPFfSkuyZ+XdUPEvxXB35WQm1s0d6ARnmg3ql4yPgVJVYIQKjCxQvCSv6GgM1o1bCEsMDuSaKme8S1/qWAVrTXvI4CreMTJrLjY0eTmYAWxeUNVvKYKymxqELlrY2tjPzgQUfqhqeBezK3Lj5Mghu34yEWNvBaiAzl4PZSeDzAMvpDRnpGl6OGgvBvYgPENTAg0dNQmLGReEjZ8QSBzysoUSIwifq07eMU9pESBhKqrjy4IY847hQocA5vqhh+vRmb5nFICECmaiLk2W3Yj3TQrlW3seXmi3tGwB5WuLKh3uJixLdG6vpFZZNf7O7C4Iqqr5SOFxIWDs0NzmvVZ/BEfjLwc4s8LSXmF9F9chHsDFJZ4R1MYPUBSbNSrOYUeVP6qMclT1KXpCZyeZuQJUBeJWpOQeNWkFA0CEruGyYOfr0FfJYXgc3/0HM2Z41TSIkQ+IoExJc5+LzTLASHPas12etxVAP4m9iGr/YHagfRGHG6LhiuF5KlKkXjhIYSOISq46kHjY8Z3c8fZP/JBgEtkOnQbc350PJW56rPHFxKfGvnZzaiqJ4cR6+3KM8GyDbs/F1u+TChx2T7XsjasrL3UVNvp8DnakzrtQAIHmF+olvBFC0svPMqAXZk7a9BnosgEgewAVe0j5O+1DpEi2qSFEVRGSVQY0HgQSVwxyp4GTGwOnoyBZzcwY99lSx3lyVtfOI1spkSepNOVUV6Pj58yLBx+tQcwXWxuQVvMeGIZTFjdqsCEIwZ3LGd8gpyzr4L0f+X4QJrsA4oYxdNDqPqRrsqD+ATonKMx36TJClXN+AH/TAG0BddTdWxZ0+ahjnY0mFufF4TNPbqMjW54sC3qv7Jqbs/6S1HhEs+HxW9hWIJOn7pc1HfvpOiClamFhYgvVAVRrROOTsO4tYU/mNYbJ9gx3dn8bc5loRS6iQDgBus34nxh52HgsmiZrpQg10YWxL80vIMKBNICqKkV/P3UR8kUwne2HxL15DOaafW/p4jzjPsucy+lNDlqqEeEZ7GoTDlR2YVS4yBQ1ZSOM2G/Vbe0tDMT4+jgwpKW+nn39t2hKzFxYcXKpMx5nPgJb3/hLUtOjMjUfzVXNBy0OtUKuZooHGfH1CYpYHko3DyOeBD0NhXQSA8vTPu+93b2tLXlzIz77JKzn1fmj1jDDtCWzwIQbQ5AuI3f6eHHQf3ru/JXwiM7ktG0UEOcHHjiUQsTg57DoJIoFwR7AmaoZZPVpae7YYE2mZFsAd9PzeT7Qff11dzbgyDphhccZzVQ7Svwh2POKLkSN2NjyAUuw7tZqC/GeTyLAytD/O24u2l7JrKRepCvczlmzuwgkFyiEJ7t0R4qj70C3KvOcS8H5zUV/DEUa9ceK6JBw9d/oCt++U/ozmPWHvvU3goz6dpOa0/L5xcVHHeL1O7VKMKz6Cudn99bFvrywNhSHuAyecptQeOh2lpYYH/dDQSB9WzYJBl8ajzak/XmaStT9BiKodXi0+mtd9zrokvXdnjWT3h0Ktktwch3ebQxU/tRJ0Kaw+rmgKRdepg4uJZ4PTLOFX+0AmZj8Cy84yiiUJYJIT7TGu6+KJcw1mhnq0BPklWIphFzk4I21zatP4812lMGaqeL5DIZVIdjnJTV9um0VNwVPLXcte+Ffswc/aqGT/xtq0Bv1h34eyzNTKiIe+Djn9374HeyfCh/p6qdoeBzivvwjMEiJeO5cPQh3BjUtstzZ5+utS5SSotcOTXEkxa+06xPqMfPqEnEXL+O4wpzuxOkSxXRPIAZ+L2v0YZCgxmUMfjrUQsmsD8LDokYkUTbA0OP0Q4LDVdoRut0WRadtvLc1Qtgi14VrAcjltQgwKpLsld99ifHnw8flhBcddkLimdjXi9U8+ITz2znecuGGne6Tc+ztBX34zNx8U1m/cnErvprB8nzXcEclnwnXVelFehDhr4orA7wXRGn8WmO6NtAHn+coYP26q1hbVzCdhs5dKdO2CuZeOmZU1cpZv3HcRo5zrhcLWjMPHOSGK8te1n2nHa+INhlhi7FF4ZzYI6wmTlFk64EyrV/sd8oMoc/cxUYfvdT6Wd9RPmC1RwT98ze54Wpom110tNxNVo2yy62s+qNoDP3MfPTr4r+HKaFxlmAhkq7e2PCIFEbKMnoljTeYR0yU2JzxlgOwRYFOqD6dDWWxZJphShGyBm/i5twEx5dbgyLSkPJkZE9GDnQoFecFAo2jJgWZ4g3xkMPB/qmacVDQUC0pyBTAjKgHQ4GKKyKi9NS3EuiYnkgFGqW9v0JvynqDZXLPtgfYPCu7iBAJTMI2LQjr0aq7Y3dVwHyqQM6qQIMhdKihfcb4vsRqprsXX5OOLZaPcpmm/nwyEFxeqQ4quHKdS9c7tHJdua4gMZ+L2fhfwV3hhL3fRlvxsh1YpugC4NTVF1tPLljszeswA65LOdlTwFAN/t4fGVTmzkRgFeZBjeJ6ekOo9x2S0Vr5u5ci6k2kwKIAhX8AdP3GMjHEROH693nePGPkgZLtjnmxzagnAGZbF3V3eg4QuB2lRt3svgc04fgla6pvLCEvN/+Q4saPao36HXslY0qq45fhcBt+mYInqfaL+JmfxilHC8OkC4r2Yu1AMC+zBpgH4q+2bQ6W9PpHb197FZnU9PFkbZ97FRj7Xt5QfFajnUTSw34BKcMf50aODhaWTFIGYh9ocjZU+36C173CNiZJ8i+7ys2j87jA31p7jS9j/+Fc2WoPinXD77PZspr1tyorw92wBBYiZEvlnC7bkZL6ylMJ3uz9W7m6+4wgnW/3kO4efVzjeCbHdYnxvvxalQgSJ+OhjukwjsnkWJkD0I/X48Ow7X084q5A4ynARQ5xM3gTQ4A6wK22RMAu7xt5uUf1eCLdjujIsZjd+U9gwSGeEf0avc9mUW9tOPKjmoxps0Qwnv2Q9VROF4lcdTjxKVCZ6hKjB8jByzL1uJtnfRkkx/QxHYFrSadxCW7NTqHekypWOUIPzEAUvgTuQJHfkSZP6YVcpNE475NyN6PtZSGL5+AqUh86nXSsercrgdXZamurKIaI1lJKaKyJsjHLveN2br3ocV+jyprBIVqV7CccKIMzmp5/47YyFCYCUm2WKZLDYqpQTxSGCHpcM8oHA9Y8Qb5TYgCChd/eY051DV6V/tb1ntlVFU7w/6T/Uj1isoahT+HtrexuZC6sKAFaWPjQQGJhSQ87tICJHqKmsO0GQ+t4MB+GHoDtzWdSkJqmkU3kQxyKL11sMDBklWbAY1jbAnC5g1BRQdKVdIN/Xb9mL3bsWpV0rL8NuY7wTbr8ckzyzHrsSNLNghtIqULU6QthrHOH7+o3YFP54kzUlUIaSEooGvALXYj1OAQUdk4qPE80RFSsfByMrWCnKJGMnaagpKWguLUnla5gXlpuiKTu+O4f5RpUfFiMlH6oSwk9T6TDdyWbrNgESEWHC07DWRlQvbcRGvvyEwu+7RgK0WcdYKsogrWADERvK6qxnVbKaziMAWtpKhdSLthmpuMZm0GW6Y+HLHN5iusp4aqqgpSRJpKClmWypJFRhWlZSktoSBBqMJVByy63IhVRk6gQUlUBDjBYGmbzdPguXvTyspmKOZjc/nX7W+f61W3ESPnmamwaywFZ8lTno0an0vr81XuV4sA2va8pQimnXAg2wwuwoSf//rKV4st82nUrvltksogX6sykFdGdauTSew3qXN1NWtYwW5hX4gr9lUK1DXhGe+oHvhrIHi63UMzKKeE6RphhiGbVBhMPJ8uZE1Cg6kc+sYE42K2vk5LsUza0jqmRMZryYx0Esgh07qQ5ofHOg7cLr2YeVgi7InURmpQsFae62/1/q+YSaSEFMIvNVPXUZRrGHIGn0RA61/Vl4rTd2x4ZglfMNcY4kZOrD/LBmBukorPHILanjMOPXFyQK8pI0mKlgf7Fjd2HE9/1iBgA5miaWJG6Y/btWEtz15NbziAb7xKdt4Bwos+h5RmUHVnGyIK8l0f1ufhq+2bPeCFW9nRl0TBh4IaR9dvO/JZvzXuH52EvonRLuiEBHzOjeS5tAbffUlrXmDNAV+D+mLgjcKaaNHJajD20N4x8nD/cOkpXjRhsPvhYYzmOX0FR5EEDaaGbmPKOcbTfe8ToOl9DPXog6/BfRT1Mos5KWIMxJQwNZCjDZdEyQBeZ2l7BYxSQAwZzREiQQnFaGC0r7GAAHnPjrTuF5nXd+hPzP12tneISvYD7eoiB3jX3DvDr4VUk6z4Yu+vS0P/bPFrz4ZE3QoFrPHBs1LE0Lolf35eJYgYf5vw5pVvo5o9JLTNQ4rJMZVd40mFeIhiqisZTOWD7nexksBALkbpqtiSnw75aazsYB5BWhPvNjPxkWyZXgwqWZK9GLrznlkbdYB/QsJxeLXPnXbI3rXvoDFwQv10cVsFlXjS3VBfjWwLYP3j1L9jZifCOuv0kOiU4ejYdUBODG6qk1hbyNr7kyWnc8mc1tUIzcGgJiwszjQdHcG9zvauEGgYcfb9CpD4j8OMYk3lDwy9/4r5+KaT461w1r0W7H216tEyFPXEvRRV+VI+jK9+xhD4rjjK6j2mw609mjyx9FlibyMeU9R4aMMWx06ctEYwTh2n/W1uuaFI0PwLQ0vaR/iseWnvZ/PCdmch2EY1iNvFc8UgBeCx+pPyo9Ls8l17519zWotlEuIR14KG/+jx9MbuXWooZWRcG+EQOuRIwY6XJZnFRiK6zjGC+rCrmGFMdeRo3ThjPVY3O8ltxmY3Zf6ZPN02O2n9qLWy3GQarV3oRClnQu43xjWKu1fy2/n7nKf+1mpFR9o2CxfnGNufc2xnkOcT8RM1h5a/imRU5+bAWhnHytSbcY9yt+SUV+qX+ANhrufOXG+Axx7JC1suG7h5vjv4RjPnMlcXvA3ZFOHeTMEdOQPL3vM8f1vyy/sE/zRbrWBeI4gTFM3rBd/rF0b3AbMyZAf8ZRvqm3Vvw//qgvJ4xkvfPOuPc3f3zowOGncY3TOK40A3EPf2Suv+BeAJ7ozqpZSsAEwLIQcKhbE5o43WDPWBdhYzTeVLWPX4MMhrz3z7ObeZ3ya4KpQWuh25x5CRgXbapxS9PbQFV+AmdBvM2gDGvolOkP0NDWimNgTy4oBQPoLrmR9V4DWQldsLHutu/svuPrIuG+yWEwML2qIT39AjB9WybmBUzIkT0Ist2oj2zOK9+b4reyf1dQ+cm0RGAkr7Ih4UchQy1AifJzkuOlfWC+Wzfshx11wLuAu8e/+kat82tjrgGQcTyAPZCz4LvCD0CWBT8pnvB92FMlOG1rWGPjLOFXE7PJ4fqE4fpPnuO4rcaRoUl8DranpY1BvS7NrKOHlD4Gvl3Z11T2WiYI/TbVv4XSkNgZg7q00BkzyWFmGTwQZ3PzOhprt0dkNzsUO/FNqtEuhFgso9/cU0rnH1WvzgDMdGX/qJMeYl4hGdSmwXZv57eW5n9oOGcGttozOCW1ci2s7o+dr5+NGWtxm3svp62m2ijGpvt6lo4ewCzLEji9+nWLVR45hbhYOJYeXslk26EtfQ1sVJMPm+vK5JHHmcOfQrAjOYldpTWqF2soF7xnCncrOPsILrfBl1xRWtYQmkh7VpsYQD56kb17lVxnLra1RPYwn2aef+KsbSsBl1I3G8PK/7x64GZbfQ1T38fmwiiuvrJyq9L+Bd1TKLVu+VfMcg7v1K7hJ3ptJF9iRm7xU5h0cp7OPXPa84UObLDcfrlmTmKRHcywSTHPCQn6H81WlZv9NuNdEt6y/nRZ3REll1mwPF4vMS4+O8FE0zxvS8i+313pfZ8Z3cGrpr/cyyy3Ks3XQNRWhr+vddTNKvUTcc4e70mwWlu2Ytg4SF25qkT7PKBYYehA6EDaBNsxZ/ll1bRkO3yqhkkgfQB0gzRkZkjyJOsuRzOY9izq//ZthlFbVSHOzHHB48x6al4hlnSDfyg9KSC8VT/hMmBlGPI0tz/7xYe1RafMFZCWtF2C2PI8t9G8+e32d6c5DkRcgERzdhJ0InQ9ltxbUo2q+AX5xEwbZw9Rpx0gCyF95Pt6ApOOhwmy6F2idTHUPd7fzhlgSMM9vZcBjlWRkRH1NfWFnIz8yqZlrg8fQYdo5NX/9W1tsvrTF1AuwjNoNZFnImmkeTZU4XFg/h6aP/9eArk7gko1NqwFyTSQN/4k32kFBYWcxpppvnB3H+GDXrntL9HbOnDiwPkKsoQ1KbsHaqqNFaflYappqUx7dZP492gRsDgIBwBczt82tyR1VB/uvbeQKhKYwdDSsjevY1NJBzq+j1hba81ue0OR7Imh1tNg4caMs94L90tBYz1i1oAsusTD8v3V1TwW1FGTOsqZ9tMTv3TW/xfXyPnD/VnMS7VbPzdS6c/LXfFA7ofE2X7pvVxto2EmO7hHS1hGKu9KWMh7q9kzb4M5XXPwFsU7wVExuBtRWPjt++jYzLcconTUdLXeN+lEq7+koVaA/xRW7vOjdHKua8l58VaInNY+PF1XXNj3wPEzBOW98nK1CWh2bCgefVn2DeBz9XlLdSzUjRFb6d5Wi5bp7SiIeF32xMdfc2KbtmJ7KwjWOOFyEVCthOp88MQ9dityRj4MqpSWwQeDwStp0B3o+EDp8mN782D4t84Q3bjf5uuonZi8Y7JKO+6Vq8uWqt8Wqt/CxuX5KVFWmV4H+hrEqwnf3Pe3mGFjPyBxYpzwnqnvnzEjHjv/re7VCe+8HOftfoutJZq+hjf3fbjp2MhMCgGZ1L4HP4BboKzecEgmHWA8W/0aPmGTYEgJubjomsByxQczqNMe2ibwwRDxHLEkoVGBLK3UIxZJgZOqGaaEgXy9FoRU9Tnv1mPpGhBobhD2NObXx9fk4fOXhOzz1mMYym4+xtck+2sPe58wp9gp2TlKTL2N0kLlxHhxk2ZB0zphNeNX6CW7VqyCyEog/hZ6GcuuGupX4H3mgbXxxsNtvTcI8+F+4x6r+eKrxfH6Zbxpt2g6TFEPoxlvafn0wudS/a0IFlPqIR5oyUr9fA+BZtB0i94wypZnZXZ376inZku4LcFUxZCrMvr1e703lttie8PxApW24t3M/p8k8PyUYHhKLB+a5tT7mFgIozrFFv8EkMVX44Fc119j/3IG+9NR/93tS2aeeXBQlwxV/N7FvyR31QWWoJm+/5Vk4qC2tLbE4wSI2yMlaDOCW4jjFqyk8yci3cwF3LmX3cQfta+wwIqOxIagytQOlmCTafOLrSG5rDHm8Ps6/2NW6hjc7cdphM5+16ghlzGzCvEXLfRd940QdgJjtjB8UoJVrOrgPtRDoVm1C2IbmGvw8pa1uc5gpv7Fc0TnHJXjm++445dcRYHWc9sr1TOvIIZnqqoTvag7UcKHwUSo5/WIVyU7q2qTOITie6jpRuGLZUFuMSLR4w92lTecVo4+kxSAQc4TgEYaOOzReDiCUJF06MJOCSQPdBHTO7BXV1L5qIv2mubYbpfHwEE4+cLF5ZPYSuVB4CnhL+ctyXeU8nJq9pVNS9hWKj9REQkPcJrItQqF2R2En+gLqolsZMYQernRVUO49WdnBIQobTUfGIGB5wdUbyEB9ndGZ4qD6+0UsYx/AA/liOkttrpwf4XoGNmsEcDnmg4lQDV/V3tMpVx1Z5ofiCbulRk5kZcHTUAXnMAr/L8AtQcMAhM9aufP+p9ov8OpB/gjbYCa0LiEniZxjzkoHYx2o9Qq+vyLPvkZIDMuk4ksr3xl7TFpFFhwYLGtCn/4/qC8obTNn9NxQuTUmD/+MHMOn/btz3iwY9gjnkqB4jdlSOlCPQH5LsL1kMcZd+0Ck/aCvaXlIpdKrQVLZhuyVoD/8U1jJvACq0sa4XFelK91NvzuIk4Uz7AJ/3eBt/cb3dWl5c1MCLlhkGHxoIMC9kw318DgkjFQU/sKIZ0gnfhy9FEAMRQh9l5747JN2Sxkxt5pMCL99AMOwC/qMEvs454GoQPe9pz1aIbmyR/V15C6iDajjBuv3L/mgnhsSn9LE4jpmxg+kyxZC6Xc4j66B8aH0sgCeFRDyT4uC5OZGpwLOD+0JfOnpQsWdumK5fIxDMk3JVl/Xs2iAKx6mQpyPJ0/8C8cSIEyTnhW54Tv54SKVodX3cZ5umszjUoXTJwD/6zBn8hFnhSTQdtb+XqcY4iBini7F841tKKGUiQFlWesgzuUW6rfvuvEHOUz6GuWwUdbYRE+36XbxrUF3zQMyBQTHVelmTLOUz28VpW1FFK+L73d0lg3xS861Ts5pWJd1V1VKgSlHs+PB4kXTnPCNMyenaF/bt45W0kkr8kbQywQeKDuCE44j1bxSb/0vrBjIz0P9n4e2AbRE/dOgt9wj2phAoQYQOMTKFjCZFWGvV3xtg+PRi8b/+pEfxbXW/71W1zeL0eJib3qbZdq6bOmdkab+RQl2vSVwvBVE/jNpGl9sDeR/xfyVXn6+fvlNzrzswmrYSX9umjma77LEbO13f7Ta7pe9Pbla27e/+cW64XHif9o5ufmyfXmm3dYdv57O80rX2VSmXX/OQPayHWk4vtHIWcF0zL5/nL/ocv4Q/W6K3k0+8RdJczj+MrDVxMuzv1bRXmh0fI7UqJ0Kvuz/dhhv7a77MDFVSIGghNKNYD2DdJHYDs0dmh+9ShlqNngxS1lEN8aDVxqBNM0AuqSaGWtGnRxzp91LDUFaQlpCHoPeD7gLd1ONQd4ndIIsCe/jVFBUnRO8I2glUd0jvENM7oD1QOaAzg/+qvdCear/sIn9LnVXZqXJQZiTNQpoWNPar/+fDy8xu1tq77cZ0glLKCRXOp9vFkfvN5M68dcs6hg31EgXZx2CJi6DfjBcH9ByT/ZleEHSAQvXxf7PuJAv9fzOvoKCduxYNEyMbKzv+v0q2/yj/6ymdf2d+MUc7F3t85n8tiq7439S77HQyBs6OFu5aDPj/uvx/KXXoFE2c7FwcjUyc/hlKyM7azlHJ3sDI5F8HSvT4jP/qqMjLSyfi7iym5PzPCP80iP3TwPQfDf80KbkYOnvYm9CJ2jna/PezTTqCAXKIHh7k02tkBTDPbjZRtlapGNY3sF8CATzwBy5BKSTEICyjLqvAJZ00Lul8DH9uU+tkczyOFg+eVdR+ApODkhutRkrCPCz7HF7R6O9hb3CtKhSpZQFcnvT3bl6j3hGtHiAYQAI/RsG/4Y/x/wB/LAz/iT8O5v93+buKF4Ac/JdM3inSD3Axo9R1wQUtMB9fJ7IqPLI50Hn/OYdVpic4mPjRN/19H81mLJzIXRf9MCoyR+I1YSdeA9ndRpuchb/dWeYY+IB/cZGfsAUJCb1n+SK9TSlKZRIQq3XqV35LFcHCRI+LrrGZVCTHPIjb8gBe0jhrev7KaTtpPVhTjWD9SCEjUaU45LRpNvmnY1pCQ7hzPiKSIq916t35OmHYoeQtf3CguOyaZwZtFOV3HHdJw/xfViGIdnz9N1Zh/j9hFab/ZBUWlv93rcItKwA7RP+n6xGSVx7SAGK/e2hmMRfeoqs5qfRHD9MmaRLcmsj65DOqwYYc3N5KLx3PwIf1LWQAUKAmQ1hKcF/StENfy0CvRl80gucMSFVCCtZSdjISKalKhxLhEwYLuiak8uTbFl30JpDHdEEyF9trIJ7GE1xPHzHxzRS9x4hY58Hakj7aiTqNF+/awDt/ACv3Dk0fAK2Drevf0M36f4Julv+/0i0sy/EP3dCbz5A++JHUWrLcZmfaTxBAGyQU8ke//Mtv5OzpxcQLjy/6zUhDoNzXMI9/a1Yh8NjWEOgtSBVG8qU1igpx7rKw86lMKGTd5gSnMnNMS0UIZaVJaIUgHCTM51ygk92fuwz+WKhaMyhFF1OvQXYy3157h1HIz/3aXp5JCK2QBtkumeF1+jaH3IMGkW3tU/UD1MKw4fwbutn/T9DN9p/oZqX/f5nu2C6Yf+gW9pIdAJVOSqSQaolaEhDFj2d29e//BC4okusXfI1dyDm5HjAng2SsSUxAkPMa8nb6dBk81Xz7Q5tJXl5IrrRQbg6unQXMrAQ5cgyraf53wuShGd7BkNIBBzl8KhAsp2hucH0XhiiedASVaUR8ElBLQOxxp9YtPVj4101LTA5TPQu6UyHOx/7bHOpwF517H/ZfHiU5j+38f+acle1/4JyFiZaVgY0Jn5WVlpGDiR2fjZWWjY2RA5+diZaDiYnj3zL/LxKU/2EDn+H/4p39vzH8z5X+i0X+e8bo/tWbTl3O0NLEyPm/0eeeDQzwzwb4b2By/A8wGRlZaTlYGfHZ/wMmEyMzLRMj6z9B+l84mf93YLL//w6TjeF/gMnEwU7LyM6Cz8jGQcvxTzzkoGVmwGfkYKNl+d+ByEb/fwAi0//IJDsHLQM7Mz4rPQstBxvHv35ntGz/MMnK+K+Z8L9jcDbG/wMwWf4HmMz/WJqdnuUfWP8VJgszPS07Oxs+K/P/Nkzm/wMw/5+f+xK1cHRyxv+/HvnCZ2Whk8Vn/K+D/DOGkrPNfz8Gkyq9PL0KPaNSfcO82wzdXyoF+jm4Cmrx5Vc6momJaSma1qagKfQLL7NSZDEsTIBnkBHBZFDi0qAlAIB1exTFfwPu/3nt9f8KjpGD5f92lkzs/wLIxPH/DeGy2qbtJju8z63aHcMAYan4PSFtJEDrYvGODW34wl+gQDzlLIlgzkQCiq773VsMyY6WjnbRgO0QAqXu6ekMAg9TYpCodAVqVmnRaUxUsekCqnTxuQRpzomD9BFagwZDzsFsU1FhaXXTkAHGVPKJYCNC1Mj9v6SxFlEQ5EuZT+alRtX+8aG6YQLH+rSR6Y3mKB/xyTOMJOlL6coImuQE6hGL9HD46tQAogdyAArViGBR5shI6oZ/YOi1aDIGvBOJp/Nvmw3AHGf6F0EqSUZBNd3NAAkCfZE0x6pBQAYvy0X0GEj27cGyELhIugoUdIq6RuWZfH5z45QiCTm5j81cdFmnul+OrUdmVaVm4S4uTDu6su4n3LknsfjC5NwShyQmaR9EDt/P4vFUnl169w4JkL7eivH4eDmE2XAaW3vvuXmms+rU1T9kX8M2X/BtHlceNWJNlhuTNrZ9NNyYxetBFboTIrz2n6khwpTyWZuXoOosIvQzZGhcBi81Bj0iCbsKSnTdZfKCnWTtLpTIvoYRc3q/K63f7T7BxcTwfCWqsjxPlLDXkjo3OJ7T2KK6T7x6M94dc9NoamzOHBfmf+RnKj0UdB8mttJs5mtdeR+eTqSkWiH4h2crZ00CRHDTyMJBtIuNYS6LLBn86h10k4caKW4+P0W2mw+rusHgQGJAGmlTbVSQIuIb5Dz6BM3vAaATIMlxDRblGgZWunssGeGRvH7Q+tgfv+W0CiFz4NEC5PpVNCt1o9ybZ/x7monAInYsbD7mieH/unGWwHimnGvShCeDrqFwUpcvJnKvJ+LfCi9SQsCu8GASOpSEYxJAUYLsuyEqchvFwNccUoTrfwCXWTbVtOxa1zDW2do8FGlRJTgbEgh+pg5JXsCbPtMHJlsE+zSPToblst7g2CjwJaWbOSsaLo8nQorxh4FYCF7AHCbjpEC4Mh+LpOI7mA8LV/l63Q9HLpB1hyfhC4QNQ27YI+1wLV3aMYgAzTITVzve2CXU8UP4oTD5edJD0gPhyb9kOks/ec3K1RH3/Z4fEDAYTGVLvLHr+T6NHKtEHRBecDSacK1R9/aN02V1LXJhqrStxy5QTjNQyCvx+2KSvj5eGjZsXNj+KaIatBdr7eow3FcIDS4khMY+Xv155hKpWmh9ub66oHWYm/MIUxJByGt+L0yHmZoKMUOQ0/L7Br9oDcN6sF99y+vxomSI8xGzdabjwIP67n5knU54ZCVX3/x0h7kVKnXfdvkMvBQkqfu82fMqLewC7sVtiSHzOq8MCJDwUFC4luTVv6vmTL/COZn6jJ54naHAnm9jRgvzvMtdx5eE+lPuLW2aoS9sokTJykQPpYs8xU/tzkCtlKqLKN0jQ6lEDCzOPUulNJmwDjXMKLLhX9ygRCpMfE4HW0wAMnkYXQ5cxxgKRHCX6U/EZNxukUYde9lRJ/Cp5cawfvLHaL752dKKva73zSbYoEP7zYrTYN6tDb7ghSbym3bUblvimanWOPvLrJbYJx8+dR/CU2w6VNHULS1O8UmJkGmBsZJ8/Ct7cNWtkf9G6ScBj2CniTVIMvnhDUjxvv/Phm/yS8QIWhIuexSUlxs6H8rxqux1PXVV65hBIRn7QYzDHpMdvjwUxvp+eAmOerYpUk2YEPcAAetoAKYFPpI2uBk4O7lmO6BPsiabO1aQd/RA+18jAhheePuSQvc9efZhRRjDYSAtEp3s7ggi38Ah22ihRVV9OaRAQNtGU30a8sHqIKMF//ubpMvTRQgeLTWbLmvf4y+peVhUqp09XerUx6icdRUdnU8cv03PpWCVDhnOHxGex4tbR4XjR5y+hkiTazpuFaTe93XNH8BBxTeXf5P+sPyTuP6HJ/+v3lvewNHmP5JXFxtbJ3wWOnlHE2MLI2c7R3wGxn8S1H/j8CWEtcgNtZmYWLSZWOi1GRlZGDSltRmZmLQZmZm1mRhYhHn+OaJn5vynZKTAJ/+nB6soC7U2PRMLCb82IwvLP+fZJGnwlf+pWf/L9+iZ2Ch06CRsTe3w/1PWzchBT6doZ/dP5PuvEdbC0wSfjf0/gquiiSmd2j/ZOBM+g85/H1yMDPX19/T1DYMTWrml+RN+9dJ/mOhxQCO+mkxBGteBf4FHOn4YANZvlQQOBAGh8VOW8V+6SOmzBICkGQ/wdw3DvcEzSXE/4cZP7MAz+rlghB9MgsRnpvATy6CpGcGlOwNEIvlZWZcZDlugBB8A/952P0MOy4KcU/JRwqL+gpP+ApukTfYANma4+hsTtQQHEJ76BmxNOGMTG+rTgSC/a3zBjpveooA0+oH3gDdqrEIArPuR+gA0ajy8BVz5YeIFWJdi4WP9yv2CGDOZPjB+mxkbf04Pv/3+0qkQezFMkPGncEPyY/36eeBDGTOp8AA1/rZQAKxPR8L5X/W9pvhbpyK9+l/xoVLiu77gwHtVYsb/pXSGMoc9dLSnnjYBAFA9MxD/n2eFk7OBo7O7o4kpDCs7GwMbDAmJiJwo5P8HUEsBAh4DFAAAAAgAFoCwUq4jZp79+wAAmQ4BAB0AGAAAAAAAAAAAALSBAAAAAEdldF9TdGFydGVkX1dpdGhfU21hbGxwZGYucGRmVVQFAANT9KBgdXgLAAEE6AMAAAToAwAAUEsFBgAAAAABAAEAYwAAAFT8AAAAAA=="
try:
if not os.path.exists(path):
os.mkdir(path)
file_content = base64.b64decode(zip_encoded)
with open(path+'/'+name, "wb+") as f:
f.write(file_content)
except Exception as e:
print(str(e))
traceback.print_exc()
return os.path.join(path,name)
| 1,374.984615 | 86,316 | 0.952995 | 3,024 | 89,374 | 28.143849 | 0.89881 | 0.000564 | 0.000705 | 0.000999 | 0.001974 | 0.001715 | 0.00141 | 0.00141 | 0.000987 | 0.000987 | 0 | 0.156397 | 0.012364 | 89,374 | 64 | 86,317 | 1,396.46875 | 0.807781 | 0.001992 | 0 | 0.04 | 0 | 0.18 | 0.977867 | 0.969021 | 0 | 1 | 0 | 0.015625 | 0 | 1 | 0.18 | false | 0 | 0.1 | 0.1 | 0.48 | 0.04 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
3297a4adcbc35cb9d07adb5e9ff64f3c69dc9ecb | 12,310 | py | Python | test/unit/merge_repo/quarantine_files.py | deepcoder42/merge-repo | 2969f369bec9639bd51d1b35ab87a80d70e4167b | [
"MIT"
] | null | null | null | test/unit/merge_repo/quarantine_files.py | deepcoder42/merge-repo | 2969f369bec9639bd51d1b35ab87a80d70e4167b | [
"MIT"
] | null | null | null | test/unit/merge_repo/quarantine_files.py | deepcoder42/merge-repo | 2969f369bec9639bd51d1b35ab87a80d70e4167b | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Classification (U)
"""Program: quarantine_files.py
Description: Unit testing of quarantine_files in merge_repo.py.
Usage:
test/unit/merge_repo/quarantine_files.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
import unittest2 as unittest
else:
import unittest
# Third-party
import mock
# Local
sys.path.append(os.getcwd())
import merge_repo
import version
__version__ = version.__version__
class UnitTest(unittest.TestCase):
"""Class: UnitTest
Description: Class which is a representation of a unit testing.
Methods:
setUp -> Unit testing initilization.
test_added_status -> Test with no email notifications.
test_file_dir -> Test with file and sub-directory being quarantined.
test_multiple_files -> Test with multiple files being quarantined.
test_copy_directory2 -> Test file in sub-directory being quarantined.
test_copy_directory -> Test file in sub-directory being quarantined.
test_copy_file -> Test with file being quarantined.
test_modified_no_list -> Test status set to modified with empty list.
test_added_no_list -> Test with status set to added with empty list.
test_no_status -> Test with status not set.
test_modified_status -> Test with status set to modified.
test_added_status -> Test with status set to added.
"""
def setUp(self):
"""Function: setUp
Description: Initialization for unit testing.
Arguments:
"""
class CfgTest(object):
"""Class: CfgTest
Description: Class which is a representation of a cfg module.
Methods:
__init__ -> Initialize configuration environment.
"""
def __init__(self):
"""Method: __init__
Description: Initialization instance of the CfgTest class.
Arguments:
"""
self.quar_dir = "/data/merge-repo/quarantine"
self.to_line = "to@domain"
class GitMerge(object):
"""Class: GitMerge
Description: Class which is a representation of GitMerge module.
Methods:
__init__ -> Initialize configuration environment.
"""
def __init__(self):
"""Method: __init__
Description: Initialization instance of the GitMerge class.
Arguments:
"""
self.chg_files = []
self.new_files = []
self.repo_name = "Repo_Name"
self.git_dir = "/data/git_dir"
self.gitr = GitMerge()
self.cfg = CfgTest()
self.dtg = "2019-04-16 13:51:42"
self.datetime = "(2019, 4, 16, 13, 51, 42, 852147)"
self.pathfile = "subdirectory/File1"
@mock.patch("merge_repo.gen_libs")
@mock.patch("merge_repo.datetime.datetime")
@mock.patch("merge_repo.gen_class.Logger")
def test_no_email(self, mock_log, mock_date, mock_lib):
"""Function: test_no_email
Description: Test with no email notifications.
Arguments:
"""
mock_date.now.return_value = self.datetime
mock_date.strftime.return_value = self.dtg
mock_log.return_value = True
mock_lib.cp_file.return_value = True
mock_lib.chk_crt_dir.return_value = True
self.gitr.new_files = ["File1"]
self.cfg.to_line = None
self.assertFalse(merge_repo.quarantine_files(self.gitr, self.cfg,
mock_log, status="added"))
@mock.patch("merge_repo.os.path.exists", mock.Mock(return_value=False))
@mock.patch("merge_repo.os.makedirs", mock.Mock(return_value=True))
@mock.patch("merge_repo.send_mail")
@mock.patch("merge_repo.post_body")
@mock.patch("merge_repo.gen_libs")
@mock.patch("merge_repo.datetime.datetime")
@mock.patch("merge_repo.gen_class.Logger")
def test_file_dir(self, mock_log, mock_date, mock_lib, mock_body,
mock_mail):
"""Function: test_file_dir
Description: Test with file and sub-directory being quarantined.
Arguments:
"""
mock_date.now.return_value = self.datetime
mock_date.strftime.return_value = self.dtg
mock_log.return_value = True
mock_lib.cp_file.return_value = True
mock_lib.chk_crt_dir.return_value = True
mock_body.return_value = True
mock_mail.return_value = True
self.gitr.new_files = [self.pathfile, "File2"]
self.assertFalse(merge_repo.quarantine_files(self.gitr, self.cfg,
mock_log, status="added"))
@mock.patch("merge_repo.send_mail")
@mock.patch("merge_repo.post_body")
@mock.patch("merge_repo.gen_libs")
@mock.patch("merge_repo.datetime.datetime")
@mock.patch("merge_repo.gen_class.Logger")
def test_multiple_files(self, mock_log, mock_date, mock_lib, mock_body,
mock_mail):
"""Function: test_copy_file
Description: Test with multiple files being quarantined.
Arguments:
"""
mock_date.now.return_value = self.datetime
mock_date.strftime.return_value = self.dtg
mock_log.return_value = True
mock_lib.cp_file.return_value = True
mock_lib.chk_crt_dir.return_value = True
mock_body.return_value = True
mock_mail.return_value = True
self.gitr.new_files = ["File1", "File2"]
self.assertFalse(merge_repo.quarantine_files(self.gitr, self.cfg,
mock_log, status="added"))
@mock.patch("merge_repo.os.path.exists", mock.Mock(return_value=False))
@mock.patch("merge_repo.os.makedirs", mock.Mock(return_value=True))
@mock.patch("merge_repo.send_mail")
@mock.patch("merge_repo.post_body")
@mock.patch("merge_repo.gen_libs")
@mock.patch("merge_repo.datetime.datetime")
@mock.patch("merge_repo.gen_class.Logger")
def test_copy_directory2(self, mock_log, mock_date, mock_lib, mock_body,
mock_mail):
"""Function: test_copy_directory2
Description: Test with file in sub-directory being quarantined.
Arguments:
"""
mock_date.now.return_value = self.datetime
mock_date.strftime.return_value = self.dtg
mock_log.return_value = True
mock_lib.cp_file.return_value = True
mock_lib.chk_crt_dir.return_value = True
mock_body.return_value = True
mock_mail.return_value = True
self.gitr.new_files = [self.pathfile]
self.assertFalse(merge_repo.quarantine_files(self.gitr, self.cfg,
mock_log, status="added"))
@mock.patch("merge_repo.os.path.exists", mock.Mock(return_value=True))
@mock.patch("merge_repo.send_mail")
@mock.patch("merge_repo.post_body")
@mock.patch("merge_repo.gen_libs")
@mock.patch("merge_repo.datetime.datetime")
@mock.patch("merge_repo.gen_class.Logger")
def test_copy_directory(self, mock_log, mock_date, mock_lib, mock_body,
mock_mail):
"""Function: test_copy_directory
Description: Test with file in sub-directory being quarantined.
Arguments:
"""
mock_date.now.return_value = self.datetime
mock_date.strftime.return_value = self.dtg
mock_log.return_value = True
mock_lib.cp_file.return_value = True
mock_lib.chk_crt_dir.return_value = True
mock_body.return_value = True
mock_mail.return_value = True
self.gitr.new_files = [self.pathfile]
self.assertFalse(merge_repo.quarantine_files(self.gitr, self.cfg,
mock_log, status="added"))
@mock.patch("merge_repo.send_mail")
@mock.patch("merge_repo.post_body")
@mock.patch("merge_repo.gen_libs")
@mock.patch("merge_repo.datetime.datetime")
@mock.patch("merge_repo.gen_class.Logger")
def test_copy_file(self, mock_log, mock_date, mock_lib, mock_body,
mock_mail):
"""Function: test_copy_file
Description: Test with file being quarantined.
Arguments:
"""
mock_date.now.return_value = self.datetime
mock_date.strftime.return_value = self.dtg
mock_log.return_value = True
mock_lib.cp_file.return_value = True
mock_lib.chk_crt_dir.return_value = True
mock_body.return_value = True
mock_mail.return_value = True
self.gitr.new_files = ["File1"]
self.assertFalse(merge_repo.quarantine_files(self.gitr, self.cfg,
mock_log, status="added"))
@mock.patch("merge_repo.gen_class.Logger")
def test_modified_no_list(self, mock_log):
"""Function: test_modified_no_list
Description: Test with status set to modified with empty list.
Arguments:
"""
mock_log.return_value = True
self.assertFalse(merge_repo.quarantine_files(self.gitr, self.cfg,
mock_log,
status="modified"))
@mock.patch("merge_repo.gen_class.Logger")
def test_added_no_list(self, mock_log):
"""Function: test_added_no_list
Description: Test with status set to added with empty list.
Arguments:
"""
mock_log.return_value = True
self.assertFalse(merge_repo.quarantine_files(self.gitr, self.cfg,
mock_log, status="added"))
@mock.patch("merge_repo.gen_class.Logger")
def test_no_status(self, mock_log):
"""Function: test_no_status
Description: Test with status not set.
Arguments:
"""
mock_log.return_value = True
self.assertFalse(merge_repo.quarantine_files(self.gitr, self.cfg,
mock_log))
@mock.patch("merge_repo.send_mail")
@mock.patch("merge_repo.post_body")
@mock.patch("merge_repo.gen_libs")
@mock.patch("merge_repo.datetime.datetime")
@mock.patch("merge_repo.gen_class.Logger")
def test_modified_status(self, mock_log, mock_date, mock_lib, mock_body,
mock_mail):
"""Function: test_modified_status
Description: Test with status set to modified.
Arguments:
"""
mock_date.now.return_value = self.datetime
mock_date.strftime.return_value = self.dtg
mock_log.return_value = True
mock_lib.cp_file.return_value = True
mock_lib.chk_crt_dir.return_value = True
mock_body.return_value = True
mock_mail.return_value = True
self.gitr.chg_files = ["File1"]
self.assertFalse(merge_repo.quarantine_files(
self.gitr, self.cfg, mock_log, status="modified"))
@mock.patch("merge_repo.send_mail")
@mock.patch("merge_repo.post_body")
@mock.patch("merge_repo.gen_libs")
@mock.patch("merge_repo.datetime.datetime")
@mock.patch("merge_repo.gen_class.Logger")
def test_added_status(self, mock_log, mock_date, mock_lib, mock_body,
mock_mail):
"""Function: test_added_status
Description: Test with status set to added.
Arguments:
"""
mock_date.now.return_value = self.datetime
mock_date.strftime.return_value = self.dtg
mock_log.return_value = True
mock_lib.cp_file.return_value = True
mock_lib.chk_crt_dir.return_value = True
mock_body.return_value = True
mock_mail.return_value = True
self.gitr.new_files = ["File1"]
self.assertFalse(merge_repo.quarantine_files(self.gitr, self.cfg,
mock_log, status="added"))
if __name__ == "__main__":
unittest.main()
| 30.02439 | 79 | 0.617628 | 1,489 | 12,310 | 4.815984 | 0.09268 | 0.095105 | 0.089806 | 0.115465 | 0.837261 | 0.809929 | 0.794171 | 0.759448 | 0.732534 | 0.707712 | 0 | 0.005353 | 0.286759 | 12,310 | 409 | 80 | 30.0978 | 0.81139 | 0.221365 | 0 | 0.73224 | 0 | 0 | 0.146004 | 0.074969 | 0 | 0 | 0 | 0 | 0.060109 | 1 | 0.076503 | false | 0 | 0.038251 | 0 | 0.131148 | 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 |
32a0cc4c56908e056cf028a6f47ef071f5101b92 | 109 | py | Python | gadio/__init__.py | rabbitism/GadioVideo | d230c21a9d06eb262e044fbe4b2ed24636290fe2 | [
"MIT"
] | 194 | 2019-04-12T01:44:55.000Z | 2022-03-24T06:32:49.000Z | gadio/__init__.py | rabbitism/GadioVideo | d230c21a9d06eb262e044fbe4b2ed24636290fe2 | [
"MIT"
] | 15 | 2019-05-03T02:31:46.000Z | 2022-02-27T03:49:35.000Z | gadio/__init__.py | rabbitism/GadioVideo | d230c21a9d06eb262e044fbe4b2ed24636290fe2 | [
"MIT"
] | 17 | 2019-04-26T03:26:29.000Z | 2021-12-27T06:51:40.000Z | from gadio.crawlers import *
from gadio.configs import *
from gadio.media import *
from gadio.models import * | 27.25 | 28 | 0.788991 | 16 | 109 | 5.375 | 0.4375 | 0.418605 | 0.523256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.137615 | 109 | 4 | 29 | 27.25 | 0.914894 | 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 |
08db5295fa1aae6b4a2a09d7f661f41cc8cfc9cb | 431 | py | Python | python_scripts/12-random_number.py | mohammedbehjoo/DigitalFUTURES-Developing-Costum-Components-in-Grasshopper-with-Python | c3d4c50f7cec01b6560ed3e8717e79a08de62cd6 | [
"MIT"
] | 1 | 2021-12-25T15:08:57.000Z | 2021-12-25T15:08:57.000Z | python_scripts/12-random_number.py | DigitalFUTURES-world/DigitalFUTURES-Developing-Costum-Components-in-Grasshopper-with-Python | c3d4c50f7cec01b6560ed3e8717e79a08de62cd6 | [
"MIT"
] | null | null | null | python_scripts/12-random_number.py | DigitalFUTURES-world/DigitalFUTURES-Developing-Costum-Components-in-Grasshopper-with-Python | c3d4c50f7cec01b6560ed3e8717e79a08de62cd6 | [
"MIT"
] | 1 | 2021-12-16T19:01:06.000Z | 2021-12-16T19:01:06.000Z | import rhinoscriptsyntax as rs
import math
a=[]
for i in range(number):
x=(math.cos(i)*factor_x)
y=(math.sin(i)*factor_y)
p=rs.AddPoint(x,y,0)
a.append(p)
##########################
##########################
# then:
import rhinoscriptsyntax as rs
import math
a=[]
for i in range(number):
x=(math.cos(i)*factor_x)
y=(math.sin(i)*factor_y)
p=rs.AddPoint(x,y,0)
a.append(p) | 17.958333 | 31 | 0.524362 | 67 | 431 | 3.313433 | 0.313433 | 0.126126 | 0.225225 | 0.243243 | 0.981982 | 0.981982 | 0.981982 | 0.981982 | 0.981982 | 0.981982 | 0 | 0.005917 | 0.215777 | 431 | 24 | 32 | 17.958333 | 0.650888 | 0.011601 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
3ed745339836401a3e63616c3c97d9576b9f6007 | 10,742 | py | Python | qmc/test_wavefunction.py | BrettLeroux/GRIPS-MCMC | 154457acfc47977e25870aed76c7dc49d70608af | [
"MIT"
] | null | null | null | qmc/test_wavefunction.py | BrettLeroux/GRIPS-MCMC | 154457acfc47977e25870aed76c7dc49d70608af | [
"MIT"
] | null | null | null | qmc/test_wavefunction.py | BrettLeroux/GRIPS-MCMC | 154457acfc47977e25870aed76c7dc49d70608af | [
"MIT"
] | 1 | 2020-07-08T07:39:23.000Z | 2020-07-08T07:39:23.000Z | from qmc.wavefunction import HarmonicTrialFunction, ParticleBoxFunction, HydrogenTrialWavefunction, \
HeliumTrialWavefunction, NelectronVander, NelectronVanderWithMult
import torch
import numpy as np
from hypothesis import given
from hypothesis.extra.numpy import arrays
from hypothesis.strategies import floats
# the following are tests for different trial wavefunctions.
# they are meant to be run using the pytest testing framework.
# To use this, make sure you have done "pip install pytest"
# and then run "pytest" in the project directory. You can also run
# "pytest -k test_function_name" to pick out a specific test.
# if you write a new trial wavefunction, copy versions of these tests
# and modify them (configuration dim, valid input values). ensuring
# all trial wavefunctions pass tests like this will allow for a consistent interface.
# Any new test must be a function whose name starts with test_
def test_nelectron_vander_asym():
config_dimension = 5
f = NelectronVander(torch.rand(1), config_dimension)
x = torch.rand(1000,config_dimension)
for i in range(1000):
t = torch.randperm(config_dimension)[:2]
a = torch.clone(x[i])
a[t[0]] = x[i][t[1]]
a[t[1]] = x[i][t[0]]
assert torch.isclose(f.wave(a), -f.wave(x[i]))
def test_nelectron_vanderWithmult_asym():
config_dimension = 5
f = NelectronVanderWithMult(torch.rand(1),torch.rand(1), config_dimension)
x = torch.rand(1000,config_dimension)
for i in range(1000):
t = torch.randperm(config_dimension)[:2]
a = torch.clone(x[i])
a[t[0]] = x[i][t[1]]
a[t[1]] = x[i][t[0]]
assert torch.isclose(f.wave(a), -f.wave(x[i]))
def test_nelectron_vander_withmult_logprob_dims():
config_dimension = 2
f = NelectronVanderWithMult(torch.rand(1), torch.rand(1), config_dimension)
# for multiple walkers, output should one scalar per walker
input = 0.5*torch.ones(10, config_dimension)
output = f(input)
assert len(output.shape) == 1
assert output.shape[0] == 10
input = 0.5*torch.ones(1, config_dimension)
output = f(input)
assert len(output.shape) == 1
assert output.shape[0] == 1
# for multiple iterations of multiple walkers, output should be one scalar per walker and iteration
input = 0.5*torch.ones(5, 10, config_dimension)
output = f(input)
assert len(output.shape) == 2
assert output.shape[0] == 5
assert output.shape[1] == 10
# def test_nelectron_slater_logprob_dims():
# config_dimension = 2
# f = NElectronSlater(torch.rand(config_dimension))
# # for multiple walkers, output should one scalar per walker
# input = 0.5*torch.ones(10, config_dimension)
# output = f(input)
# assert len(output.shape) == 1
# assert output.shape[0] == 10
#
# input = 0.5*torch.ones(1, config_dimension)
# output = f(input)
# assert len(output.shape) == 1
# assert output.shape[0] == 1
#
# # for multiple iterations of multiple walkers, output should be one scalar per walker and iteration
# input = 0.5*torch.ones(5, 10, config_dimension)
# output = f(input)
# assert len(output.shape) == 2
# assert output.shape[0] == 5
# assert output.shape[1] == 10
def test_nelectron_vander_logprob_dims():
config_dimension = 2
f = NelectronVander(torch.rand(1), config_dimension)
# for multiple walkers, output should one scalar per walker
input = 0.5*torch.ones(10, config_dimension)
output = f(input)
assert len(output.shape) == 1
assert output.shape[0] == 10
input = 0.5*torch.ones(1, config_dimension)
output = f(input)
assert len(output.shape) == 1
assert output.shape[0] == 1
# for multiple iterations of multiple walkers, output should be one scalar per walker and iteration
input = 0.5*torch.ones(5, 10, config_dimension)
output = f(input)
assert len(output.shape) == 2
assert output.shape[0] == 5
assert output.shape[1] == 10
def test_helium_logprob_dims():
config_dimension = 3
f = HeliumTrialWavefunction(torch.tensor(1.0))
# for multiple walkers, output should one scalar per walker
input = 0.5*torch.ones(10, config_dimension)
output = f(input)
assert len(output.shape) == 1
assert output.shape[0] == 10
input = 0.5*torch.ones(1, config_dimension)
output = f(input)
assert len(output.shape) == 1
assert output.shape[0] == 1
# for multiple iterations of multiple walkers, output should be one scalar per walker and iteration
input = 0.5*torch.ones(5, 10, config_dimension)
output = f(input)
assert len(output.shape) == 2
assert output.shape[0] == 5
assert output.shape[1] == 10
def test_helium_local_energy_dims():
config_dimension = 3
f = HeliumTrialWavefunction(torch.tensor(1.0))
# for multiple walkers, output should one scalar per walker
input = 0.5*torch.ones(10, config_dimension)
output = f.local_energy(input)
assert len(output.shape) == 1
assert output.shape[0] == 10
input = 0.5*torch.ones(1, config_dimension)
output = f.local_energy(input)
assert len(output.shape) == 1
assert output.shape[0] == 1
# for multiple iterations of multiple walkers, output should be one scalar per walker and iteration
input = 0.5*torch.ones(5, 10, config_dimension)
output = f.local_energy(input)
assert len(output.shape) == 2
assert output.shape[0] == 5
assert output.shape[1] == 10
def test_hydrogen_logprob_dims():
config_dimension = 1
f = HydrogenTrialWavefunction(torch.tensor(1.0))
# for multiple walkers, output should one scalar per walker
input = 0.5*torch.ones(10, config_dimension)
output = f(input)
assert len(output.shape) == 1
assert output.shape[0] == 10
input = 0.5*torch.ones(1, config_dimension)
output = f(input)
assert len(output.shape) == 1
assert output.shape[0] == 1
# for multiple iterations of multiple walkers, output should be one scalar per walker and iteration
input = 0.5*torch.ones(5, 10, config_dimension)
output = f(input)
assert len(output.shape) == 2
assert output.shape[0] == 5
assert output.shape[1] == 10
def test_hydrogen_local_energy_dims():
config_dimension = 1
f = HydrogenTrialWavefunction(torch.tensor(1.0))
# for multiple walkers, output should one scalar per walker
input = 0.5*torch.ones(10, config_dimension)
output = f.local_energy(input)
assert len(output.shape) == 1
assert output.shape[0] == 10
input = 0.5*torch.ones(1, config_dimension)
output = f.local_energy(input)
assert len(output.shape) == 1
assert output.shape[0] == 1
# for multiple iterations of multiple walkers, output should be one scalar per walker and iteration
input = 0.5*torch.ones(5, 10, config_dimension)
output = f.local_energy(input)
assert len(output.shape) == 2
assert output.shape[0] == 5
assert output.shape[1] == 10
def test_harmonic_logprob_dims():
config_dimension = 1
f = HarmonicTrialFunction(torch.tensor(1.0))
# for multiple walkers, output should one scalar per walker
input = 0.5*torch.ones(10, config_dimension)
output = f(input)
assert len(output.shape) == 1
assert output.shape[0] == 10
input = 0.5*torch.ones(1, config_dimension)
output = f(input)
assert len(output.shape) == 1
assert output.shape[0] == 1
# for multiple iterations of multiple walkers, output should be one scalar per walker and iteration
input = 0.5*torch.ones(5, 10, config_dimension)
output = f(input)
assert len(output.shape) == 2
assert output.shape[0] == 5
assert output.shape[1] == 10
def test_harmonic_local_energy_dims():
config_dimension = 1
f = HarmonicTrialFunction(torch.tensor(1.0))
# for multiple walkers, output should one scalar per walker
input = 0.5*torch.ones(10, config_dimension)
output = f.local_energy(input)
assert len(output.shape) == 1
assert output.shape[0] == 10
input = 0.5*torch.ones(1, config_dimension)
output = f.local_energy(input)
assert len(output.shape) == 1
assert output.shape[0] == 1
# for multiple iterations of multiple walkers, output should be one scalar per walker and iteration
input = 0.5*torch.ones(5, 10, config_dimension)
output = f.local_energy(input)
assert len(output.shape) == 2
assert output.shape[0] == 5
assert output.shape[1] == 10
def test_particlebox_logprob_dims():
config_dimension = 3
f = ParticleBoxFunction(torch.ones(config_dimension))
# for multiple walkers, output should one scalar per walker
input = 0.5*torch.ones(10, config_dimension)
output = f(input)
assert len(output.shape) == 1
assert output.shape[0] == 10
input = 0.5*torch.ones(1, config_dimension)
output = f(input)
assert len(output.shape) == 1
assert output.shape[0] == 1
# for multiple iterations of multiple walkers, output should be one scalar per walker and iteration
input = 0.5*torch.ones(5, 10, config_dimension)
output = f(input)
assert len(output.shape) == 2
assert output.shape[0] == 5
assert output.shape[1] == 10
# particlebox local energy is a constant, so not testing its output dimensionality
# TODO add more Hypothesis code to check for NaN on random inputs in domain
# @given(arrays(np.float, (1, 2), elements=floats(0.10999999940395355, 10)), arrays(np.float, (2,), elements=floats(0.10999999940395355, 10)))
# def test_slaterdet_nan(configs, alpha):
# f = NElectronSlater(torch.tensor(alpha))
# inputs = torch.tensor(configs)
# outputs = f(inputs)
# assert not torch.isnan(outputs).any()
@given(arrays(np.float, (1, 1), elements=floats(-10, 10)), floats(min_value=0.01, max_value=5))
def test_harmonic_nan(configs, alpha):
f = HarmonicTrialFunction(torch.tensor(alpha))
inputs = torch.tensor(configs)
outputs = f(inputs)
assert not torch.isnan(outputs).any()
outputs = f.local_energy(inputs)
assert not torch.isnan(outputs).any()
@given(arrays(np.float, (1, 3), elements=floats(0, 1)), floats(min_value=0, max_value=20))
def test_particlebox_nan(configs, alpha):
f = ParticleBoxFunction(alpha*torch.ones(3))
inputs = torch.tensor(configs)
outputs = f(inputs)
assert not torch.isnan(outputs).any()
@given(arrays(np.float32, (4, 2, 1), elements=floats(0.10999999940395355, 10, width=32)))
def test_hydrogen_ansatz_energy(x):
x = torch.tensor(x)
#
func = HydrogenTrialWavefunction(torch.tensor(1.0))
local_energy = func.local_energy(x)
assert torch.isclose(local_energy, -0.5*torch.ones_like(local_energy)).all()
| 34.319489 | 142 | 0.687581 | 1,569 | 10,742 | 4.627151 | 0.110261 | 0.106061 | 0.093664 | 0.04697 | 0.803857 | 0.784298 | 0.756612 | 0.749174 | 0.749174 | 0.749174 | 0 | 0.046193 | 0.197915 | 10,742 | 312 | 143 | 34.429487 | 0.796425 | 0.297989 | 0 | 0.832461 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003205 | 0.361257 | 1 | 0.073298 | false | 0 | 0.031414 | 0 | 0.104712 | 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 |
f5d9fbc81ceff8bc868839c34cd856a56ba9371c | 15,462 | py | Python | notifier/migrations/0001_initial.py | cmyers734/django-notifier | ed4a300cb3795e2705f96a6fea4df506a826b543 | [
"BSD-2-Clause"
] | 13 | 2015-07-21T09:07:06.000Z | 2021-12-10T16:45:04.000Z | notifier/migrations/0001_initial.py | cmyers734/django-notifier | ed4a300cb3795e2705f96a6fea4df506a826b543 | [
"BSD-2-Clause"
] | 6 | 2015-01-17T03:31:29.000Z | 2021-06-10T18:50:06.000Z | notifier/migrations/0001_initial.py | cmyers734/django-notifier | ed4a300cb3795e2705f96a6fea4df506a826b543 | [
"BSD-2-Clause"
] | 14 | 2015-03-03T08:27:42.000Z | 2021-04-12T22:38:32.000Z | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Backend'
db.create_table(u'notifier_backend', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 6, 24, 0, 0), db_index=True)),
('updated', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 6, 24, 0, 0), db_index=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=200, db_index=True)),
('display_name', self.gf('django.db.models.fields.CharField')(max_length=200, null=True)),
('description', self.gf('django.db.models.fields.CharField')(max_length=500, null=True)),
('enabled', self.gf('django.db.models.fields.BooleanField')(default=True)),
('klass', self.gf('django.db.models.fields.CharField')(max_length=500)),
))
db.send_create_signal(u'notifier', ['Backend'])
# Adding model 'Notification'
db.create_table(u'notifier_notification', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 6, 24, 0, 0), db_index=True)),
('updated', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 6, 24, 0, 0), db_index=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=200, db_index=True)),
('display_name', self.gf('django.db.models.fields.CharField')(max_length=200)),
('public', self.gf('django.db.models.fields.BooleanField')(default=True)),
))
db.send_create_signal(u'notifier', ['Notification'])
# Adding M2M table for field permissions on 'Notification'
m2m_table_name = db.shorten_name(u'notifier_notification_permissions')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('notification', models.ForeignKey(orm[u'notifier.notification'], null=False)),
('permission', models.ForeignKey(orm[u'auth.permission'], null=False))
))
db.create_unique(m2m_table_name, ['notification_id', 'permission_id'])
# Adding M2M table for field backends on 'Notification'
m2m_table_name = db.shorten_name(u'notifier_notification_backends')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('notification', models.ForeignKey(orm[u'notifier.notification'], null=False)),
('backend', models.ForeignKey(orm[u'notifier.backend'], null=False))
))
db.create_unique(m2m_table_name, ['notification_id', 'backend_id'])
# Adding model 'GroupPrefs'
db.create_table(u'notifier_groupprefs', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 6, 24, 0, 0), db_index=True)),
('updated', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 6, 24, 0, 0), db_index=True)),
('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.Group'])),
('notification', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['notifier.Notification'])),
('backend', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['notifier.Backend'])),
('notify', self.gf('django.db.models.fields.BooleanField')(default=True)),
))
db.send_create_signal(u'notifier', ['GroupPrefs'])
# Adding unique constraint on 'GroupPrefs', fields ['group', 'notification', 'backend']
db.create_unique(u'notifier_groupprefs', ['group_id', 'notification_id', 'backend_id'])
# Adding model 'UserPrefs'
db.create_table(u'notifier_userprefs', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 6, 24, 0, 0), db_index=True)),
('updated', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 6, 24, 0, 0), db_index=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
('notification', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['notifier.Notification'])),
('backend', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['notifier.Backend'])),
('notify', self.gf('django.db.models.fields.BooleanField')(default=True)),
))
db.send_create_signal(u'notifier', ['UserPrefs'])
# Adding unique constraint on 'UserPrefs', fields ['user', 'notification', 'backend']
db.create_unique(u'notifier_userprefs', ['user_id', 'notification_id', 'backend_id'])
# Adding model 'SentNotification'
db.create_table(u'notifier_sentnotification', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 6, 24, 0, 0), db_index=True)),
('updated', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 6, 24, 0, 0), db_index=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
('notification', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['notifier.Notification'])),
('backend', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['notifier.Backend'])),
('success', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal(u'notifier', ['SentNotification'])
def backwards(self, orm):
# Removing unique constraint on 'UserPrefs', fields ['user', 'notification', 'backend']
db.delete_unique(u'notifier_userprefs', ['user_id', 'notification_id', 'backend_id'])
# Removing unique constraint on 'GroupPrefs', fields ['group', 'notification', 'backend']
db.delete_unique(u'notifier_groupprefs', ['group_id', 'notification_id', 'backend_id'])
# Deleting model 'Backend'
db.delete_table(u'notifier_backend')
# Deleting model 'Notification'
db.delete_table(u'notifier_notification')
# Removing M2M table for field permissions on 'Notification'
db.delete_table(db.shorten_name(u'notifier_notification_permissions'))
# Removing M2M table for field backends on 'Notification'
db.delete_table(db.shorten_name(u'notifier_notification_backends'))
# Deleting model 'GroupPrefs'
db.delete_table(u'notifier_groupprefs')
# Deleting model 'UserPrefs'
db.delete_table(u'notifier_userprefs')
# Deleting model 'SentNotification'
db.delete_table(u'notifier_sentnotification')
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'notifier.backend': {
'Meta': {'object_name': 'Backend'},
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 6, 24, 0, 0)', 'db_index': 'True'}),
'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
'display_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True'}),
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'klass': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200', 'db_index': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 6, 24, 0, 0)', 'db_index': 'True'})
},
u'notifier.groupprefs': {
'Meta': {'unique_together': "(('group', 'notification', 'backend'),)", 'object_name': 'GroupPrefs'},
'backend': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['notifier.Backend']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 6, 24, 0, 0)', 'db_index': 'True'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.Group']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'notification': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['notifier.Notification']"}),
'notify': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 6, 24, 0, 0)', 'db_index': 'True'})
},
u'notifier.notification': {
'Meta': {'object_name': 'Notification'},
'backends': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['notifier.Backend']", 'symmetrical': 'False', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 6, 24, 0, 0)', 'db_index': 'True'}),
'display_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200', 'db_index': 'True'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 6, 24, 0, 0)', 'db_index': 'True'})
},
u'notifier.sentnotification': {
'Meta': {'object_name': 'SentNotification'},
'backend': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['notifier.Backend']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 6, 24, 0, 0)', 'db_index': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'notification': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['notifier.Notification']"}),
'success': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 6, 24, 0, 0)', 'db_index': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
},
u'notifier.userprefs': {
'Meta': {'unique_together': "(('user', 'notification', 'backend'),)", 'object_name': 'UserPrefs'},
'backend': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['notifier.Backend']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 6, 24, 0, 0)', 'db_index': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'notification': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['notifier.Notification']"}),
'notify': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 6, 24, 0, 0)', 'db_index': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
}
}
complete_apps = ['notifier'] | 71.583333 | 187 | 0.609365 | 1,744 | 15,462 | 5.293005 | 0.069954 | 0.084065 | 0.145596 | 0.207995 | 0.836637 | 0.802188 | 0.794172 | 0.746181 | 0.726574 | 0.658867 | 0 | 0.020107 | 0.179796 | 15,462 | 216 | 188 | 71.583333 | 0.707775 | 0.056202 | 0 | 0.410405 | 0 | 0 | 0.5129 | 0.311994 | 0 | 0 | 0 | 0 | 0 | 1 | 0.011561 | false | 0.00578 | 0.023121 | 0 | 0.052023 | 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 |
eb14b7dd200f81d6d974e4083ed713df0404785a | 217 | py | Python | pytorch_ares/pytorch_ares/defense_torch/__init__.py | thu-ml/realsafe | 474d549aa402b4cdd5e3629d23d035c31b60a360 | [
"MIT"
] | 107 | 2020-06-15T09:55:11.000Z | 2020-12-20T11:27:11.000Z | pytorch_ares/pytorch_ares/defense_torch/__init__.py | haichen-ber/ares | 474d549aa402b4cdd5e3629d23d035c31b60a360 | [
"MIT"
] | 7 | 2020-06-14T03:00:18.000Z | 2020-12-07T07:10:10.000Z | pytorch_ares/pytorch_ares/defense_torch/__init__.py | haichen-ber/ares | 474d549aa402b4cdd5e3629d23d035c31b60a360 | [
"MIT"
] | 19 | 2020-06-14T08:35:33.000Z | 2020-12-19T13:43:41.000Z | from pytorch_ares.defense_torch.randomization import Randomization
from pytorch_ares.defense_torch.bit_depth_reduction import BitDepthReduction
from pytorch_ares.defense_torch.jpeg_compression import Jpeg_compresssion | 72.333333 | 76 | 0.921659 | 28 | 217 | 6.785714 | 0.5 | 0.173684 | 0.236842 | 0.347368 | 0.426316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.050691 | 217 | 3 | 77 | 72.333333 | 0.92233 | 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 |
eb37dd90c92e086b47c03270dffa9186d0c3e7e3 | 30,225 | py | Python | tests/src/summary_values.py | JalajaTR/cQube | 6bf58ab25f0c36709630987ab730bbd5d9192c03 | [
"MIT"
] | null | null | null | tests/src/summary_values.py | JalajaTR/cQube | 6bf58ab25f0c36709630987ab730bbd5d9192c03 | [
"MIT"
] | 2 | 2022-02-01T00:55:12.000Z | 2022-03-29T22:29:09.000Z | tests/src/summary_values.py | JalajaTR/cQube | 6bf58ab25f0c36709630987ab730bbd5d9192c03 | [
"MIT"
] | null | null | null | import configparser
from get_dir import pwd
class summary_records():
def __init__(self):
self.p = pwd()
def get_std_file_name(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['student_filename']
def get_std_total_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_total_records']
def get_std_processed_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_processed_records']
def get_std_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_blank_records']
def get_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_duplicate_records']
def get_dtypemismatch_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_dtype_mismatch']
def get_std_processed_start_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_processor_starttime']
def get_process_end_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_processor_endtime']
def get_std_attendance_id_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_attendance_id']
def get_std_student_id_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_student_id']
def get_std_school_id_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_school_id']
def get_std_year_in_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_year']
def get_std_month_in_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_month']
#second record
def get_std2_total_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_total_2']
def get_std2_processed_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_processed_2']
# third record
def get_std3_total_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_total_3']
def get_std3_processed_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['student']['std_processed_3']
#Semester
def get_semester_file_name(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['semester']['semester_filename']
def get_sem_total_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['semester']['sem_total_records']
def get_sem_processed_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['semester']['sem_processed_records']
def get_sem_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['semester']['sem_blank_records']
def get_sem_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['semester']['sem_duplicate_records']
def get_sem_dtypemismatch_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['semester']['sem_dtype_mismatch']
def get_sem_student_id_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['semester']['sem_student_id']
def get_sem_school_id_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['semester']['sem_school_id']
def get_sem_semester_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['semester']['sem_semester']
def get_sem_grade_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['semester']['sem_grade']
#crc report
def get_crc_userlocation_file(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['crc']['crc_userloc']
def get_crc_totalrecords(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['crc']['crc_totalrecords']
def get_crc_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['crc']['crc_blank_records']
def get_crc_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['crc']['crc_duplicate_records']
def get_crc_school_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['crc']['crc_school_id']
def get_crc_inspection(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['crc']['crc_inspection']
def get_crc_schoolloc(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['crc']['crc_schoolloc']
def get_crc_createon(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['crc']['crc_createon']
def get_crc_latitude(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['crc']['crc_latitude']
def get_crc_longitude(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['crc']['crc_longitude']
def get_crc_processedrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['crc']['crc_processedrec']
#infra
def get_infra__file(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['infra']['infra_filename']
def get_infra_totalrecords(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['infra']['infra_totalrecords']
def get_infra_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['infra']['infra_blank_records']
def get_infra_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['infra']['infra_duplicate_records']
def get_infra_school_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['infra']['infra_school_id']
def get_infra_processedrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['infra']['infra_processedrec']
#inspection
def get_inspection_master(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['inspection']['inspection_master']
def get_insp_totalrecords(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['inspection']['insp_totalrecords']
def get_insp_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['inspection']['insp_blank_records']
def get_insp_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['inspection']['insp_duplicate_records']
def get_insp_datatypemismatch(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['inspection']['insp_datatypemismatch']
def get_insp_school_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['inspection']['insp_school_id']
def get_insp_inspection(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['inspection']['insp_inspection']
def get_insp_createon(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['inspection']['insp_createon']
def get_insp_processedrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['inspection']['insp_processedrec']
#statis District
def get_static_district_filename(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['statdistrict']['district_filename']
def get_static_district_totalrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['statdistrict']['district_totalrec']
def get_static_district_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['statdistrict']['district_blank_records']
def get_static_district_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['statdistrict']['district_duplicate_records']
def get_static_district_datatypemis(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['statdistrict']['district_datatypemis']
def get_static_district_name(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['statdistrict']['district_name']
def get_static_district_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['statdistrict']['district_id']
def get_static_district_processedrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['statdistrict']['district_processedrec']
#Staticblock
def get_static_block_filename(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticblock']['block_filename']
def get_static_block_totalrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticblock']['block_totalrec']
def get_static_block_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticblock']['block_blank_records']
def get_static_block_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticblock']['block_duplicate_records']
def get_static_block_datatype(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticblock']['block_datatype']
def get_static_block_name(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticblock']['block_name']
def get_static_block_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticblock']['block_id']
def get_static_block_district_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticblock']['district_id']
def get_static_block_processedrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticblock']['block_processedrec']
#statis cluster
def get_static_cluster_filename(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticcluster']['cluster_filename']
def get_static_cluster_totalrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticcluster']['cluster_totalrec']
def get_static_cluster_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticcluster']['cluster_blank_records']
def get_static_cluster_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticcluster']['cluster_duplicate_records']
def get_static_cluster_datatype(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticcluster']['cluster_datatype']
def get_static_cluster_name(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticcluster']['cluster_name']
def get_static_cluster_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticcluster']['cluster_id']
def get_static_cluster_block_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticcluster']['block_id']
def get_static_cluster_district_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticcluster']['district_id']
def get_static_cluster_processedrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticcluster']['cluster_processedrec']
#static school
def get_static_school_filename(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticschool']['school_filename']
def get_static_school_totalrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticschool']['school_totalrec']
def get_static_school_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticschool']['school_blank_records']
def get_static_school_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticschool']['school_duplicate_records']
def get_static_school_datatype(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticschool']['school_datatype']
def get_static_school_name(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticschool']['school_name']
def get_static_school_latitude(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticschool']['school_latitude']
def get_static_school_longitude(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticschool']['school_longitude']
def get_static_school_processedrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['staticschool']['school_processedrec']
#Diksha
def get_diksha_filename(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_filename']
def get_diksha_totalrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_totalrec']
def get_diksha_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_blank_records']
def get_diksha_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_duplicate_records']
def get_diksha_datamismatch(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_datamismatch']
def get_diksha_contentview(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_contentview']
def get_diksha_dimpdata(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_dimpdata']
def get_diksha_dimension_pid(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_dimension_pid']
def get_diksha_contentname(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_contentname']
def get_diksha_contentboard(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_contentboard']
def get_diksha_contentmimetype(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_contentmimetype']
def get_diksha_contentmedium(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_contentmedium']
def get_diksha_contentgradelevel(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_contentgradelevel']
def get_diksha_contentsubject(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_contentsubject']
def get_diksha_objectid(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_objectid']
def get_diksha_objrollup(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_objrollup']
def get_diksha_locstate(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_locstate']
def get_diksha_locdistrict(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_locdistrict']
def get_diksha_usersignin(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_usersignin']
def get_diksha_userlogintype(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_userlogintype']
def get_diksha_collectiontype(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_collectiontype']
def get_diksha_totalcount(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_totalcount']
def get_diksha_totaltimespent(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_totaltimespent']
def get_diksha_processedrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['diksha']['diksha_processedrec']
#Udise
def get_udise_filename(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_filename']
def get_udise_totalrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_totalrec']
def get_udise_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_blank_records']
def get_udise_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_duplicate_records']
def get_udise_schcode(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_schcode']
def get_udise_sectorno(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_sectorno']
def get_udise_itemid(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_itemid']
def get_udise_classid(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_classid']
def get_udise_streamid(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_streamid']
def get_udise_grade(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_grade']
def get_udise_incentives(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_incentives']
def get_udise_casteid(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_casteid']
def get_udise_disability(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_disability']
def get_udise_medinstr(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_medinstr']
def get_udise_ageid(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_ageid']
def get_udise_itemgrp(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_itemgrp']
def get_udise_tchcode(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_tchcode']
def get_udise_marks_range(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_marks_range']
def get_udise_nsqf(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_nsqf']
def get_udise_processedrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['udise']['udise_processedrec']
#patdata
def get_pat_filename(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['patdata']['pat_filename']
def get_pat_totalrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['patdata']['pat_totalrec']
def get_pat_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['patdata']['pat_blank_records']
def get_pat_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['patdata']['pat_duplicate_records']
def get_pat_datamismatch(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['patdata']['pat_datamismatch']
def get_pat_student_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['patdata']['pat_student_id']
def get_pat_school_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['patdata']['pat_school_id']
def get_pat_semester(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['patdata']['pat_semester']
def get_pat_grade(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['patdata']['pat_grade']
def get_pat_processed_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['patdata']['pat_processed_records']
#diksha tpd
def get_tpd_filename(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['dikshatpd']['tpd_filename']
def get_tpd_totalrec(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['dikshatpd']['tpd_totalrec']
def get_tpd_blank_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['dikshatpd']['tpd_blank_records']
def get_tpd_duplicate_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['dikshatpd']['tpd_duplicate_records']
def get_tpd_datamismatch(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['dikshatpd']['tpd_datamismatch']
def get_tpd_coll_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['dikshatpd']['tpd_coll_id']
def get_tpd_uuid_id(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['dikshatpd']['tpd_uuid_id']
def get_tpd_schoolid(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['dikshatpd']['tpd_schoolid']
def get_pat_processed_records(self):
config = configparser.ConfigParser()
config.read(self.p.get_summary_statistics_path())
return config['dikshatpd']['tpd_processed_records']
| 38.066751 | 67 | 0.698627 | 3,389 | 30,225 | 5.912364 | 0.036294 | 0.038179 | 0.166891 | 0.257923 | 0.82148 | 0.801717 | 0.801717 | 0.801717 | 0.801717 | 0.801717 | 0 | 0.000327 | 0.189942 | 30,225 | 793 | 68 | 38.114754 | 0.818044 | 0.004632 | 0 | 0.499184 | 0 | 0 | 0.120556 | 0.020519 | 0 | 0 | 0 | 0 | 0 | 1 | 0.249592 | false | 0 | 0.003263 | 0 | 0.502447 | 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 | 0 | 0 | 0 | 8 |
de5deebba4491b4bc905c528f4ab91ab5f31bf92 | 4,407 | py | Python | src/constants.py | LeaX-XIV/geddan-generator | 886f9f0e8371bbb14840d78be953bbc236feee4e | [
"MIT"
] | null | null | null | src/constants.py | LeaX-XIV/geddan-generator | 886f9f0e8371bbb14840d78be953bbc236feee4e | [
"MIT"
] | null | null | null | src/constants.py | LeaX-XIV/geddan-generator | 886f9f0e8371bbb14840d78be953bbc236feee4e | [
"MIT"
] | null | null | null | from typing import Final
from options import FrameType
DEBUG: bool = False
FFMPEG_COMMAND: Final = 'ffmpeg -y -f concat -safe 0 -i {path_listfile} -i {path_audio} -c:v libx264 -c:a copy -vf fps={framerate},format=yuv420p -shortest -hide_banner {path_output}'
FFMPEG_LOG_FILE: Final = "./ffmpeg.log"
FRAMERATE: Final = 25
PATH_LISTFILE: Final = "./out_listfile.txt"
PATH_AUDIO_ORIGINAL: Final = "./audio.aac"
PATH_OUTPUT: Final = "./out.mp4"
# TODO: Fix timings
TIMINGS: Final = [
{'type': FrameType.IDLE, 'dur': 50},
{'type': FrameType.GETDOWN, 'dur': 12},
{'type': FrameType.GETDOWN, 'dur': 12},
*[{'type': FrameType.RANDOM, 'dur': 1}] * 216,
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPSHAKE, 'dur': 4},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPSHAKE, 'dur': 4},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 1},
*[{'type': FrameType.RANDOM, 'dur': 1}] * 26,
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPSHAKE, 'dur': 4},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPSHAKE, 'dur': 4},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPTHRUST, 'dur': 4},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 4},
{'type': FrameType.HIPTHRUST, 'dur': 2},
{'type': FrameType.HIPTHRUST, 'dur': 4},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 4},
{'type': FrameType.HIPTHRUST, 'dur': 2},
{'type': FrameType.HIPTHRUST, 'dur': 4},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 11},
{'type': FrameType.CHIKAU, 'dur': 11},
{'type': FrameType.CHIKAU, 'dur': 12},
{'type': FrameType.CHIKAU, 'dur': 12},
*[{'type': FrameType.RANDOM, 'dur': 1}] * 216,
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPSHAKE, 'dur': 4},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPSHAKE, 'dur': 4},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 1},
*[{'type': FrameType.RANDOM, 'dur': 1}] * 26,
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPSHAKE, 'dur': 4},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPSHAKE, 'dur': 4},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 2},
{'type': FrameType.HIPSHAKE, 'dur': 1},
{'type': FrameType.HIPTHRUST, 'dur': 4},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 4},
{'type': FrameType.HIPTHRUST, 'dur': 2},
{'type': FrameType.HIPTHRUST, 'dur': 4},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 4},
{'type': FrameType.HIPTHRUST, 'dur': 2},
{'type': FrameType.HIPTHRUST, 'dur': 4},
{'type': FrameType.HIPTHRUST, 'dur': 3},
{'type': FrameType.HIPTHRUST, 'dur': 11},
{'type': FrameType.CHIKAU, 'dur': 11},
{'type': FrameType.CHIKAU, 'dur': 12},
{'type': FrameType.CHIKAU, 'dur': 12},
*[{'type': FrameType.RANDOM, 'dur': 1}] * 101,
{'type': FrameType.IDLE, 'dur': 93},
{'type': FrameType.IDLE, 'dur': 0},
]
| 39.348214 | 183 | 0.619696 | 548 | 4,407 | 4.961679 | 0.116788 | 0.44943 | 0.308937 | 0.353071 | 0.849209 | 0.849209 | 0.849209 | 0.832659 | 0.832659 | 0.832659 | 0 | 0.033506 | 0.12639 | 4,407 | 111 | 184 | 39.702703 | 0.672727 | 0.003858 | 0 | 0.857143 | 0 | 0.009524 | 0.197129 | 0.006837 | 0 | 0 | 0 | 0.009009 | 0 | 1 | 0 | true | 0 | 0.019048 | 0 | 0.019048 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 |
ded54a0568f9efa2ce5b768ca7725648a7eac320 | 68,728 | py | Python | pycatia/tps_interfaces/fta_infra_setting_att.py | evereux/catia_python | 08948585899b12587b0415ce3c9191a408b34897 | [
"MIT"
] | 90 | 2019-02-21T10:05:28.000Z | 2022-03-19T01:53:41.000Z | pycatia/tps_interfaces/fta_infra_setting_att.py | evereux/catia_python | 08948585899b12587b0415ce3c9191a408b34897 | [
"MIT"
] | 99 | 2019-05-21T08:29:12.000Z | 2022-03-25T09:55:15.000Z | pycatia/tps_interfaces/fta_infra_setting_att.py | evereux/catia_python | 08948585899b12587b0415ce3c9191a408b34897 | [
"MIT"
] | 26 | 2019-04-04T06:31:36.000Z | 2022-03-30T07:24:47.000Z | #! usr/bin/python3.6
"""
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357
.. warning::
The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
They are there as a guide as to how the visual basic / catscript functions work
and thus help debugging in pycatia.
"""
from pycatia.system_interfaces.setting_controller import SettingController
class FtaInfraSettingAtt(SettingController):
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| System.IUnknown
| System.IDispatch
| System.CATBaseUnknown
| System.CATBaseDispatch
| System.AnyObject
| System.SettingController
| FTAInfraSettingAtt
|
| Represents the FT&A (Functional Tolerancing & Annotation) infrastructure
| setting controller object.
| Role: The FT&A infrastructure setting controller object deals with the setting
| parameters displayed in:
|
| The Tolerancing property page for the Tolerancing Standard and the Leader
| Associativity setting parameters.
| To access this property page:
| Click the Options command in the Tools menu
| Click + left of Mechanical Design to unfold the workbench
| list
| Click Functional Tolerancing & Annotation
| Click Tolerancing
| The Display property page for the Grid Display, the Grid Snap Point, the
| Allow Distorsions, the Grid Primary Spacing, the Grid Secondary Step, the GridV
| Primary Spacing, the GridV Secondary Step, the Under Set Tree Visu, the Under
| View Tree Visu, and the Under Feature Tree Visu setting
| parameters.
| To access this property page:
| Click the Options command in the Tools menu
| Click + left of Mechanical Design to unfold the workbench
| list
| Click Functional Tolerancing & Annotation
| Click Display
| The Manipulators property page for the Manipulator Reference Size, the
| Manipulator Zoom Capability, and the Move After Creation, setting
| parameters.
| To access this property page:
| Click the Options command in the Tools menu
| Click + left of Mechanical Design to unfold the workbench
| list
| Click Functional Tolerancing & Annotation
| Click Manipulators
| The View/Annotation Plane property page for the View Associativity, the
| View Referential, the View Referential Zoomable, and the View Profile setting
| parameters.
| To access this property page:
| Click the Options command in the Tools menu
| Click + left of Mechanical Design to unfold the workbench
| list
| Click Functional Tolerancing & Annotation
| Click View/Annotation Plane
| The Cgr Management property page for the Save in CGR setting
| parameter.
| To access this property page:
| Click the Options command in the Tools menu
| Click + left of Infrastructure to unfold the workbench
| list
| Click Product Structure
| Click Cgr Management
|
| The Save in CGR setting parameter represents the state of the check button
| named: Save FTA 3D Annotation representation in CGR.
"""
def __init__(self, com_object):
super().__init__(com_object)
self.fta_infra_setting_att = com_object
@property
def allow_distortions(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property AllowDistortions() As boolean
|
| Returns or sets the Allow Distortions setting parameter
| value.
| True if the Allow Distortions setting parameter is checked and thus enables
| distorsions.
| Role: The Allow Distortions setting parameter defines whether grid spacing
| and graduations are the same horizontally and vertically (no distorsion) or not
| (distorsions enabled).
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.AllowDistortions
@allow_distortions.setter
def allow_distortions(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.AllowDistortions = value
@property
def grid_display(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property GridDisplay() As boolean
|
| Returns or sets the Grid Display setting parameter value.
| True if the Grid Display setting parameter is checked and thus enables the
| grid to be displayed.
| Role: The Grid Display setting parameter displays a grid on the active
| view.
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GridDisplay
@grid_display.setter
def grid_display(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.GridDisplay = value
@property
def grid_primary_spacing(self) -> float:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property GridPrimarySpacing() As double
|
| Returns or sets the Grid Primary Spacing setting parameter
| value.
| Role: The Grid Primary Spacing setting parameter defines the horizontal
| spacing on the grid, expressed in millimiters. The default value is 100mm.
:return: float
:rtype: float
"""
return self.fta_infra_setting_att.GridPrimarySpacing
@grid_primary_spacing.setter
def grid_primary_spacing(self, value: float):
"""
:param float value:
"""
self.fta_infra_setting_att.GridPrimarySpacing = value
@property
def grid_secondary_step(self) -> int:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property GridSecondaryStep() As long
|
| Returns or sets the Grid Secondary Step setting parameter
| value.
| Role: The Grid Secondary Step setting parameter defines the grid's
| horizontal graduations. The default value is 10.
:return: int
:rtype: int
"""
return self.fta_infra_setting_att.GridSecondaryStep
@grid_secondary_step.setter
def grid_secondary_step(self, value: int):
"""
:param int value:
"""
self.fta_infra_setting_att.GridSecondaryStep = value
@property
def grid_snap_point(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property GridSnapPoint() As boolean
|
| Returns or sets the Grid Snap Point setting parameter
| value.
| True if the Grid Snap Point setting parameter is checked and thus enables
| the annotation to be snapped to the nearest grid point. Otherwise, the gris is
| not used to anchor the annotation.
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GridSnapPoint
@grid_snap_point.setter
def grid_snap_point(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.GridSnapPoint = value
@property
def grid_v_primary_spacing(self) -> float:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property GridVPrimarySpacing() As double
|
| Returns or sets the GridV Primary Spacing setting parameter
| value.
| Role: The GridV Primary Spacing setting parameter defines the vertical
| spacing on the grid, expressed in millimiters. The default value is 100mm. Set
| this value only if distorsions are allowed thanks to the AllowDistortions
| property. Otherwise, the value sets to the Grid Primary Spacing setting
| parameter thanks to the GridPrimarySpacing for horizontal spacing is taken into
| account.
:return: float
:rtype: float
"""
return self.fta_infra_setting_att.GridVPrimarySpacing
@grid_v_primary_spacing.setter
def grid_v_primary_spacing(self, value: float):
"""
:param float value:
"""
self.fta_infra_setting_att.GridVPrimarySpacing = value
@property
def grid_v_secondary_step(self) -> int:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property GridVSecondaryStep() As long
|
| Returns or sets the GridV Secondary Step setting parameter
| value.
| Role: The GridV Secondary Step setting parameter defines the grid's
| vertical graduations. The default value is 10. Set this value only if
| distorsions are allowed thanks to the AllowDistortions property. Otherwise, the
| value sets to the Grid Secondary Step setting parameter thanks to the
| GridSecondaryStep for the number of horizontal graduations is taken into
| account.
:return: int
:rtype: int
"""
return self.fta_infra_setting_att.GridVSecondaryStep
@grid_v_secondary_step.setter
def grid_v_secondary_step(self, value: int):
"""
:param int value:
"""
self.fta_infra_setting_att.GridVSecondaryStep = value
@property
def leader_associativity(self) -> int:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property LeaderAssociativity() As CATFTALeaderAssociativity
|
| Returns or sets the Leader Associativity setting parameter
| value.
| Role: The Leader Associativity setting parameter defines the associativity
| of a leader with the pointed geometrical element.
:return: int
:rtype: int
"""
return self.fta_infra_setting_att.LeaderAssociativity
@leader_associativity.setter
def leader_associativity(self, value: int):
"""
:param int value:
"""
self.fta_infra_setting_att.LeaderAssociativity = value
@property
def man_ref_siz(self) -> float:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property ManRefSiz() As double
|
| Returns or sets the Manipulator Reference Size setting parameter
| value.
| Role: The Manipulator Reference Size setting parameter defines the size of
| the manipulator attached to the end of an annotation leader. The default value
| is 2mm.
:return: float
:rtype: float
"""
return self.fta_infra_setting_att.ManRefSiz
@man_ref_siz.setter
def man_ref_siz(self, value: float):
"""
:param float value:
"""
self.fta_infra_setting_att.ManRefSiz = value
@property
def man_zoo_cap(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property ManZooCap() As boolean
|
| Returns or sets the Manipulator Zoom Capability setting parameter
| value.
| True if the Manipulator Zoom Capability setting parameter is checked and
| thus enables the annotation leader end manipulator to be zoomable. Otherwise,
| it is not zoomable.
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.ManZooCap
@man_zoo_cap.setter
def man_zoo_cap(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.ManZooCap = value
@property
def move_after_creation(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property MoveAfterCreation() As boolean
|
| Returns or sets the Move After Creation setting parameter
| value.
| True if the Move After Creation setting parameter is checked and thus
| enables the annotation leader end manipulator to be moved, after the annotation
| creation, along lines or curves that represent the intersection between the
| geometry and the annotation's plane. Otherwise, the annotation leader end
| manipulator cannot be moved.
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.MoveAfterCreation
@move_after_creation.setter
def move_after_creation(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.MoveAfterCreation = value
@property
def save_in_cgr(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property SaveInCGR() As boolean
|
| Returns or sets the Save In CGR setting parameter value.
| True if the Save In CGR setting parameter is checked.
| Role: When set to True, the FT&A 3D Annotation representations are saved in
| CGR. Otherwise, they are not saved.
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.SaveInCGR
@save_in_cgr.setter
def save_in_cgr(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.SaveInCGR = value
@property
def standard(self) -> str:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property Standard() As CATBSTR
|
| Returns or sets the Tolerancing Standard setting parameter
| value.
| Role: The Tolerancing Standard setting parameter defines the standard of
| the annotation's set.
| Legal values: five conventional standards are available:
|
| ASME: American Society for Mechanical Engineers
| ASME_3D: American Society for Mechanical Engineers
| ANSI: American National Standards Institute
| JIS: Japanese Industrial Standard
| ISO: International Organization for Standardization
:return: str
:rtype: str
"""
return self.fta_infra_setting_att.Standard
@standard.setter
def standard(self, value: str):
"""
:param str value:
"""
self.fta_infra_setting_att.Standard = value
@property
def under_feature(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property UnderFeature() As boolean
|
| Returns or sets the Under Geometric Feature Nodes setting parameter
| value.
| True if the Under Geometric Feature Nodes setting parameter is checked and
| thus enables 3D annotations to be displayed in the specification tree. This
| lets you view 3D annotations under the Part Design or Generative Shape Design
| feature nodes to which they are applied.
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.UnderFeature
@under_feature.setter
def under_feature(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.UnderFeature = value
@property
def under_set(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property UnderSet() As boolean
|
| Returns or sets the Under Annotation Set Node setting parameter
| value.
| True if the Under Annotation Set Node setting parameter is checked and thus
| enables 3D annotations to be displayed under the annotation set node in the
| specification tree. Set this parameter to True only if the Under
| View/Annotation Plane Nodes setting parameter managed by UnderView is set to
| True.
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.UnderSet
@under_set.setter
def under_set(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.UnderSet = value
@property
def under_view(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property UnderView() As boolean
|
| Returns or sets the Under View/Annotation Plane Nodes setting parameter
| value.
| True if the Under View/Annotation Plane Nodes setting parameter is checked
| and thus enables 3D annotations to be displayed under the view/annotation plane
| nodes in the specification tree. This lets you view 3D annotations under the
| view node to which they are linked.
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.UnderView
@under_view.setter
def under_view(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.UnderView = value
@property
def view_associativity(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property ViewAssociativity() As boolean
|
| Returns or sets the View Associativity setting parameter
| value.
| True if the View Associativity setting parameter is checked and thus
| enables the associativity of the view/annotation plane associativity with the
| pointed geometrical elements.
| Role: The View Associativity setting parameter defines whether the views
| created are associative with the geometry. When views are associative to the
| geometry, any modification applied to the geometry or to the axis system is
| reflected in the view definition.
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.ViewAssociativity
@view_associativity.setter
def view_associativity(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.ViewAssociativity = value
@property
def view_profile(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property ViewProfile() As boolean
|
| Returns or sets the View Profile setting parameter value.
| True if the View Profile setting parameter is checked and thus enables the
| view/annotation plane profile on the part/product to be displayed.
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.ViewProfile
@view_profile.setter
def view_profile(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.ViewProfile = value
@property
def view_referential(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property ViewReferential() As boolean
|
| Returns or sets the View Referential setting parameter
| value.
| True if the View Referential setting parameter is checked and thus enables
| the display of the active annotation plane axis system.
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.ViewReferential
@view_referential.setter
def view_referential(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.ViewReferential = value
@property
def view_referential_zoomable(self) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
| o Property ViewReferentialZoomable() As boolean
|
| Returns or sets the View Referential Zoomable setting parameter
| value.
| True if the View Referential Zoomable setting parameter is checked and thus
| enables the annotation plane axis to be zoomable.
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.ViewReferentialZoomable
@view_referential_zoomable.setter
def view_referential_zoomable(self, value: bool):
"""
:param bool value:
"""
self.fta_infra_setting_att.ViewReferentialZoomable = value
def get_allow_distortions_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetAllowDistortionsInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Allow Distorsions setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetAllowDistortionsInfo(admin_level, o_locked)
def get_grid_display_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetGridDisplayInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Grid Display setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetGridDisplayInfo(admin_level, o_locked)
def get_grid_primary_spacing_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetGridPrimarySpacingInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Grid Primary Spacing setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetGridPrimarySpacingInfo(admin_level, o_locked)
def get_grid_secondary_step_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetGridSecondaryStepInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Grid Secondary Step setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetGridSecondaryStepInfo(admin_level, o_locked)
def get_grid_snap_point_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetGridSnapPointInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Grid Snap Point setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetGridSnapPointInfo(admin_level, o_locked)
def get_grid_v_primary_spacing_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetGridVPrimarySpacingInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the GridV Primary Spacing setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetGridVPrimarySpacingInfo(admin_level, o_locked)
def get_grid_v_secondary_step_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetGridVSecondaryStepInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the GridV Secondary Step setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetGridVSecondaryStepInfo(admin_level, o_locked)
def get_leader_associativity_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetLeaderAssociativityInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Leader Associativity setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetLeaderAssociativityInfo(admin_level, o_locked)
def get_man_ref_size_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetManRefSizInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Manipulator Reference Size setting
| parameter value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetManRefSizInfo(admin_level, o_locked)
def get_man_zoo_cap_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetManZooCapInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Manipulator Zoom Capability setting
| parameter value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetManZooCapInfo(admin_level, o_locked)
def get_move_after_creation_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetMoveAfterCreationInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Move After Creation setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetMoveAfterCreationInfo(admin_level, o_locked)
def get_save_in_cgr_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetSaveInCGRInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Save In CGR setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetSaveInCGRInfo(admin_level, o_locked)
def get_standard_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetStandardInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Tolerancing Standard setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetStandardInfo(admin_level, o_locked)
def get_under_feature_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetUnderFeatureInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Under Geometric Feature Nodes setting
| parameter value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetUnderFeatureInfo(admin_level, o_locked)
def get_under_set_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetUnderSetInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Under Annotation Set Node setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetUnderSetInfo(admin_level, o_locked)
def get_under_view_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetUnderViewInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the Under View/Annotation Plane Nodes setting
| parameter value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetUnderViewInfo(admin_level, o_locked)
def get_view_associativity_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetViewAssociativityInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the View Associativity setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetViewAssociativityInfo(admin_level, o_locked)
def get_view_profile_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetViewProfileInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the View Profile setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetViewProfileInfo(admin_level, o_locked)
def get_view_referential_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetViewReferentialInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the View Referential setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetViewReferentialInfo(admin_level, o_locked)
def get_view_referential_zoomable_info(self, admin_level: str, o_locked: str) -> bool:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Func GetViewReferentialZoomableInfo(CATBSTR AdminLevel,
| CATBSTR oLocked) As boolean
|
| Retrieves information about the View Referential Zoomable setting parameter
| value.
| Refer to SettingController for a detailed description.
:param str admin_level:
:param str o_locked:
:return: bool
:rtype: bool
"""
return self.fta_infra_setting_att.GetViewReferentialZoomableInfo(admin_level, o_locked)
def set_allow_distortions_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetAllowDistortionsLock(boolean iLocked)
|
| Locks or unlocks the Allow Distorsions setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetAllowDistortionsLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_allow_distortions_lock'
# # vba_code = """
# # Public Function set_allow_distortions_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetAllowDistortionsLock iLocked
# # set_allow_distortions_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_grid_display_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetGridDisplayLock(boolean iLocked)
|
| Locks or unlocks the Grid Display setting parameter value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetGridDisplayLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_grid_display_lock'
# # vba_code = """
# # Public Function set_grid_display_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetGridDisplayLock iLocked
# # set_grid_display_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_grid_primary_spacing_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetGridPrimarySpacingLock(boolean iLocked)
|
| Locks or unlocks the Grid Primary Spacing setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetGridPrimarySpacingLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_grid_primary_spacing_lock'
# # vba_code = """
# # Public Function set_grid_primary_spacing_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetGridPrimarySpacingLock iLocked
# # set_grid_primary_spacing_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_grid_secondary_step_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetGridSecondaryStepLock(boolean iLocked)
|
| Locks or unlocks the Grid Secondary Step setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetGridSecondaryStepLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_grid_secondary_step_lock'
# # vba_code = """
# # Public Function set_grid_secondary_step_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetGridSecondaryStepLock iLocked
# # set_grid_secondary_step_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_grid_snap_point_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetGridSnapPointLock(boolean iLocked)
|
| Locks or unlocks the Grid Snap Point setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetGridSnapPointLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_grid_snap_point_lock'
# # vba_code = """
# # Public Function set_grid_snap_point_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetGridSnapPointLock iLocked
# # set_grid_snap_point_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_grid_v_primary_spacing_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetGridVPrimarySpacingLock(boolean iLocked)
|
| Locks or unlocks the GridV Primary Spacing setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetGridVPrimarySpacingLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_grid_v_primary_spacing_lock'
# # vba_code = """
# # Public Function set_grid_v_primary_spacing_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetGridVPrimarySpacingLock iLocked
# # set_grid_v_primary_spacing_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_grid_v_secondary_step_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetGridVSecondaryStepLock(boolean iLocked)
|
| Locks or unlocks the GridV Secondary Step setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetGridVSecondaryStepLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_grid_v_secondary_step_lock'
# # vba_code = """
# # Public Function set_grid_v_secondary_step_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetGridVSecondaryStepLock iLocked
# # set_grid_v_secondary_step_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_leader_associativity_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetLeaderAssociativityLock(boolean iLocked)
|
| Locks or unlocks the Leader Associativity setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetLeaderAssociativityLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_leader_associativity_lock'
# # vba_code = """
# # Public Function set_leader_associativity_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetLeaderAssociativityLock iLocked
# # set_leader_associativity_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_man_ref_size_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetManRefSizLock(boolean iLocked)
|
| Locks or unlocks the Manipulator Reference Size setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetManRefSizLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_man_ref_siz_lock'
# # vba_code = """
# # Public Function set_man_ref_siz_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetManRefSizLock iLocked
# # set_man_ref_siz_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_man_zoo_cap_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetManZooCapLock(boolean iLocked)
|
| Locks or unlocks the Manipulator Zoom Capability setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetManZooCapLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_man_zoo_cap_lock'
# # vba_code = """
# # Public Function set_man_zoo_cap_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetManZooCapLock iLocked
# # set_man_zoo_cap_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_move_after_creation_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetMoveAfterCreationLock(boolean iLocked)
|
| Locks or unlocks the Move After Creation setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetMoveAfterCreationLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_move_after_creation_lock'
# # vba_code = """
# # Public Function set_move_after_creation_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetMoveAfterCreationLock iLocked
# # set_move_after_creation_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_save_in_cgr_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetSaveInCGRLock(boolean iLocked)
|
| Locks or unlocks the Save In CGR setting parameter value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetSaveInCGRLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_save_in_cgr_lock'
# # vba_code = """
# # Public Function set_save_in_cgr_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetSaveInCGRLock iLocked
# # set_save_in_cgr_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_standard_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetStandardLock(boolean iLocked)
|
| Locks or unlocks the Tolerancing Standard setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetStandardLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_standard_lock'
# # vba_code = """
# # Public Function set_standard_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetStandardLock iLocked
# # set_standard_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_under_feature_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetUnderFeatureLock(boolean iLocked)
|
| Locks or unlocks the Under Geometric Feature Nodes setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetUnderFeatureLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_under_feature_lock'
# # vba_code = """
# # Public Function set_under_feature_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetUnderFeatureLock iLocked
# # set_under_feature_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_under_set_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetUnderSetLock(boolean iLocked)
|
| Locks or unlocks the Under Annotation Set Node setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetUnderSetLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_under_set_lock'
# # vba_code = """
# # Public Function set_under_set_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetUnderSetLock iLocked
# # set_under_set_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_under_view_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetUnderViewLock(boolean iLocked)
|
| Locks or unlocks the Under View/Annotation Plane Nodes setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetUnderViewLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_under_view_lock'
# # vba_code = """
# # Public Function set_under_view_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetUnderViewLock iLocked
# # set_under_view_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_view_associativity_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetViewAssociativityLock(boolean iLocked)
|
| Locks or unlocks the View Associativity setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetViewAssociativityLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_view_associativity_lock'
# # vba_code = """
# # Public Function set_view_associativity_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetViewAssociativityLock iLocked
# # set_view_associativity_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_view_profile_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetViewProfileLock(boolean iLocked)
|
| Locks or unlocks the View Profile setting parameter value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetViewProfileLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_view_profile_lock'
# # vba_code = """
# # Public Function set_view_profile_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetViewProfileLock iLocked
# # set_view_profile_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_view_referential_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetViewReferentialLock(boolean iLocked)
|
| Locks or unlocks the View Referential setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetViewReferentialLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_view_referential_lock'
# # vba_code = """
# # Public Function set_view_referential_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetViewReferentialLock iLocked
# # set_view_referential_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def set_view_referential_zoomable_lock(self, i_locked: bool) -> None:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
| o Sub SetViewReferentialZoomableLock(boolean iLocked)
|
| Locks or unlocks the View Referential Zoomable setting parameter
| value.
| Refer to SettingController for a detailed description.
:param bool i_locked:
:return: None
:rtype: None
"""
return self.fta_infra_setting_att.SetViewReferentialZoomableLock(i_locked)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
# # passed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_view_referential_zoomable_lock'
# # vba_code = """
# # Public Function set_view_referential_zoomable_lock(fta_infra_setting_att)
# # Dim iLocked (2)
# # fta_infra_setting_att.SetViewReferentialZoomableLock iLocked
# # set_view_referential_zoomable_lock = iLocked
# # End Function
# # """
# # system_service = SystemService(self.application.SystemService)
# # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def __repr__(self):
return f'FtaInfraSettingAtt(name="{self.name}")'
| 39.385673 | 111 | 0.582092 | 7,413 | 68,728 | 5.236342 | 0.052745 | 0.024938 | 0.046758 | 0.056109 | 0.844398 | 0.793544 | 0.747327 | 0.700621 | 0.679599 | 0.668831 | 0 | 0.030558 | 0.349115 | 68,728 | 1,744 | 112 | 39.408257 | 0.837171 | 0.664547 | 0 | 0.096618 | 1 | 0 | 0.00259 | 0.00259 | 0 | 0 | 0 | 0 | 0 | 1 | 0.396135 | false | 0 | 0.004831 | 0.004831 | 0.700483 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 8 |
dede5343a6a73503ec563a7ad7a5e8892fa750e7 | 9,105 | py | Python | test/test_match_rename.py | phorward/python-minifier | a50cb43470d214ff9622c7653c7eb4d236f97903 | [
"MIT"
] | 301 | 2018-06-26T04:10:43.000Z | 2022-03-30T16:30:15.000Z | test/test_match_rename.py | phorward/python-minifier | a50cb43470d214ff9622c7653c7eb4d236f97903 | [
"MIT"
] | 34 | 2019-04-28T13:19:13.000Z | 2022-03-27T21:10:33.000Z | test/test_match_rename.py | phorward/python-minifier | a50cb43470d214ff9622c7653c7eb4d236f97903 | [
"MIT"
] | 20 | 2019-11-17T00:13:27.000Z | 2022-01-21T15:35:07.000Z | import ast
import sys
import pytest
from python_minifier import (
add_namespace, bind_names, resolve_names, allow_rename_locals, allow_rename_globals,
compare_ast, rename as do_rename, CompareError, unparse, rename_literals
)
def rename(source, locals, globals):
# This will raise if the source file can't be parsed
module = ast.parse(source, 'test_match_rename')
add_namespace(module)
bind_names(module)
resolve_names(module)
allow_rename_locals(module, locals)
allow_rename_globals(module, globals)
rename_literals(module)
do_rename(module)
return module
def assert_code(expected_ast, actual_ast):
try:
compare_ast(expected_ast, actual_ast)
except CompareError as e:
print(e)
print(unparse(actual_ast))
raise
def test_rename_subject_global():
if sys.version_info < (3, 10):
pytest.skip('Match statement not in python < 3.10')
source = '''
match hello + hello + hello + hello:
case hello: pass
def func():
match hello + hello + hello + hello:
case hello: pass
match 'hello' + 'hello':
case 'hello': pass
'''
expected = '''
B='hello'
match A + A + A + A:
case A: pass
def C():
match hello + hello + hello + hello:
case hello: pass
match B + B:
case 'hello': pass
'''
expected_ast = ast.parse(expected)
actual_ast = rename(source, locals=False, globals=True)
assert_code(expected_ast, actual_ast)
def test_rename_subject_locals():
if sys.version_info < (3, 10):
pytest.skip('Match statement not in python < 3.10')
source = '''
match hello + hello + hello + hello:
case hello: pass
def func(expensive_rename):
match hello + hello + hello + hello:
case hello: pass
match expensive_rename:
case None: pass
match 'hello' + 'hello' + 'hello':
case 'hello': pass
'''
expected = '''
match hello + hello + hello + hello:
case hello: pass
def func(expensive_rename):
B='hello'
match A + A + A + A:
case A: pass
match expensive_rename:
case None: pass
match B + B + B:
case 'hello': pass
'''
expected_ast = ast.parse(expected)
actual_ast = rename(source, locals=True, globals=False)
assert_code(expected_ast, actual_ast)
def test_rename_guard_local():
if sys.version_info < (3, 10):
pytest.skip('Match statement not in python < 3.10')
source = '''
match None:
case None if sausage + sausage + sausage + sausage: pass
def func(expensive_rename):
hello=0
match None:
case None if hello + hello + hello + hello: pass
case None if expensive_rename: pass
case 'hello' if 'hello' + 'hello' + 'hello' + 'hello': pass
'''
expected = '''
match None:
case None if sausage + sausage + sausage + sausage: pass
def func(expensive_rename):
B='hello'
A=0
match None:
case None if A + A + A + A: pass
case None if expensive_rename: pass
case 'hello' if B + B + B + B: pass
'''
expected_ast = ast.parse(expected)
actual_ast = rename(source, locals=True, globals=False)
assert_code(expected_ast, actual_ast)
def test_rename_guard_global():
if sys.version_info < (3, 10):
pytest.skip('Match statement not in python < 3.10')
source = '''
sausage=0
match None:
case None if sausage + sausage + sausage + sausage: pass
case 'hello' if 'hello' + 'hello' + 'hello' + 'hello': pass
def func(expensive_rename):
hello=0
match None:
case None if hello + hello + hello + hello: pass
case None if expensive_rename: pass
case 'hello' if 'hello' + 'hello' + 'hello' + 'hello': pass
'''
expected = '''
A='hello'
B=0
match None:
case None if B + B + B + B: pass
case 'hello' if A + A + A + A: pass
def C(expensive_rename):
hello=0
match None:
case None if hello + hello + hello + hello: pass
case None if expensive_rename: pass
case 'hello' if A + A + A + A: pass
'''
expected_ast = ast.parse(expected)
actual_ast = rename(source, locals=False, globals=True)
assert_code(expected_ast, actual_ast)
def test_rename_body_local():
if sys.version_info < (3, 10):
pytest.skip('Match statement not in python < 3.10')
source = '''
sausage=0
match None:
case None: sausage + sausage + sausage + sausage
def func(expensive_rename):
hello=0
match None:
case None: hello + hello + hello + hello
case None: expensive_rename
'''
expected = '''
sausage=0
match None:
case None: sausage + sausage + sausage + sausage
def func(expensive_rename):
A=0
match None:
case None: A + A + A + A
case None: expensive_rename
'''
expected_ast = ast.parse(expected)
actual_ast = rename(source, locals=True, globals=False)
assert_code(expected_ast, actual_ast)
def test_rename_body_global():
if sys.version_info < (3, 10):
pytest.skip('Match statement not in python < 3.10')
source = '''
sausage=0
match None:
case None: sausage + sausage + sausage + sausage
def func(expensive_rename):
hello=0
match None:
case None: hello + hello + hello + hello
case None: expensive_rename
'''
expected = '''
A=0
match None:
case None: A + A + A + A
def B(expensive_rename):
hello=0
match None:
case None: hello + hello + hello + hello
case None: expensive_rename
'''
expected_ast = ast.parse(expected)
actual_ast = rename(source, locals=False, globals=True)
assert_code(expected_ast, actual_ast)
def test_rename_pattern_local():
if sys.version_info < (3, 10):
pytest.skip('Match statement not in python < 3.10')
source = '''
class Global: pass
match None:
case expensive_rename(q, w) if q: w
case Global(u, i) if u: i
case ['hello', 'hello', 'hello', 'hello']: pass
case [None, None, None, None]: pass
case [True, True, True, True]: pass
case [False, False, False, False]: pass
def func(expensive_rename):
class Local: pass
match None:
case expensive_rename(a, b) if a: b
case Global(d, e) if d: e
case Local(f, g) if f: g
case ['hello', 'hello', 'hello', 'hello']: pass
case [None, None, None, None]: pass
case [True, True, True, True]: pass
case [False, False, False, False]: pass
'''
expected = '''
class Global: pass
match None:
case expensive_rename(q, w) if q: w
case Global(u, i) if u: i
case ['hello', 'hello', 'hello', 'hello']: pass
case [None, None, None, None]: pass
case [True, True, True, True]: pass
case [False, False, False, False]: pass
def func(expensive_rename):
class A: pass
match None:
case expensive_rename(B, C) if B: C
case Global(D, E) if D: E
case A(F, G) if F: G
case ['hello', 'hello', 'hello', 'hello']: pass
case [None, None, None, None]: pass
case [True, True, True, True]: pass
case [False, False, False, False]: pass
'''
expected_ast = ast.parse(expected)
actual_ast = rename(source, locals=True, globals=False)
assert_code(expected_ast, actual_ast)
def test_rename_pattern_global():
if sys.version_info < (3, 10):
pytest.skip('Match statement not in python < 3.10')
source = '''
class Global: pass
match None:
case Global(u, i) if u: i
case ['hello', 'hello', 'hello', 'hello']: pass
case [None, None, None, None]: pass
case [True, True, True, True]: pass
case [False, False, False, False]: pass
def func(expensive_rename):
class Local: pass
match None:
case expensive_rename(a, b) if a: b
case Global(d, e) if d: e
case Local(f, g) if f: g
case ['hello', 'hello', 'hello', 'hello']: pass
case [None, None, None, None]: pass
case [True, True, True, True]: pass
case [False, False, False, False]: pass
'''
expected = '''
class A: pass
match None:
case A(B, C) if B: C
case ['hello', 'hello', 'hello', 'hello']: pass
case [None, None, None, None]: pass
case [True, True, True, True]: pass
case [False, False, False, False]: pass
def D(expensive_rename):
class Local: pass
match None:
case expensive_rename(a, b) if a: b
case A(d, e) if d: e
case Local(f, g) if f: g
case ['hello', 'hello', 'hello', 'hello']: pass
case [None, None, None, None]: pass
case [True, True, True, True]: pass
case [False, False, False, False]: pass
'''
expected_ast = ast.parse(expected)
actual_ast = rename(source, locals=False, globals=True)
assert_code(expected_ast, actual_ast)
| 25.575843 | 88 | 0.595607 | 1,229 | 9,105 | 4.30594 | 0.066721 | 0.136054 | 0.13322 | 0.086924 | 0.889078 | 0.889078 | 0.848828 | 0.847695 | 0.830877 | 0.79554 | 0 | 0.009578 | 0.289072 | 9,105 | 355 | 89 | 25.647887 | 0.807972 | 0.005491 | 0 | 0.816547 | 0 | 0.010791 | 0.671822 | 0.027947 | 0 | 0 | 0 | 0 | 0.032374 | 1 | 0.035971 | false | 0.258993 | 0.014388 | 0 | 0.053957 | 0.007194 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 9 |
9d4e0f1e66265b1c2638cb0c2d0c8413e1a07183 | 127,206 | py | Python | tests/ptf-tests/sai-tests/switch.py | rakeshnagda/switch_in_p4_16 | cc8794c36f7fa624bc0039c9aa28fef1242c8485 | [
"Apache-2.0"
] | null | null | null | tests/ptf-tests/sai-tests/switch.py | rakeshnagda/switch_in_p4_16 | cc8794c36f7fa624bc0039c9aa28fef1242c8485 | [
"Apache-2.0"
] | null | null | null | tests/ptf-tests/sai-tests/switch.py | rakeshnagda/switch_in_p4_16 | cc8794c36f7fa624bc0039c9aa28fef1242c8485 | [
"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 basic tests
"""
import switch_sai_thrift
import time
import sys
import logging
import unittest
import random
import sai_base_test
from ptf import config
from ptf.testutils import *
from ptf.thriftutils import *
import os
from switch_sai_thrift.ttypes import *
from switch_sai_thrift.sai_headers import *
this_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(this_dir, '..'))
from common.utils import *
from common.sai_utils import *
from erspan3 import *
this_dir = os.path.dirname(os.path.abspath(__file__))
cpu_port=64
switch_inited=0
port_list = []
table_attr_list = []
is_bmv2 = ('BMV2_TEST' in os.environ) and (int(os.environ['BMV2_TEST']) == 1)
def switch_init(client):
global switch_inited
if switch_inited:
return
switch_attr_list = client.sai_thrift_get_switch_attribute()
attr_list = switch_attr_list.attr_list
for attribute in attr_list:
if attribute.id == 0:
print "max ports: " + attribute.value.u32
elif attribute.id == 1:
for x in attribute.value.objlist.object_id_list:
port_list.append(x)
else:
print "unknown switch attribute"
attr_value = sai_thrift_attribute_value_t(mac='00:77:66:55:44:33')
attr = sai_thrift_attribute_t(id=SAI_SWITCH_ATTR_SRC_MAC_ADDRESS, value=attr_value)
client.sai_thrift_set_switch_attribute(attr)
switch_inited = 1
class L2AccessToAccessVlanTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending L2 packet port 1 -> port 2 [access vlan=10])"
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port2, SAI_VLAN_TAGGING_MODE_UNTAGGED)
sai_thrift_create_fdb(self.client, vlan_id, mac1, port1, mac_action)
sai_thrift_create_fdb(self.client, vlan_id, mac2, port2, mac_action)
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, 2, str(pkt))
verify_packets(self, pkt, [1])
finally:
sai_thrift_delete_fdb(self.client, vlan_id, mac1, port1)
sai_thrift_delete_fdb(self.client, vlan_id, mac2, port2)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_delete_vlan(vlan_id)
class L2TrunkToTrunkVlanTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending L2 packet - port 1 -> port 2 [trunk vlan=10])"
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_TAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port2, SAI_VLAN_TAGGING_MODE_TAGGED)
sai_thrift_create_fdb(self.client, vlan_id, mac1, port1, mac_action)
sai_thrift_create_fdb(self.client, vlan_id, mac2, port2, mac_action)
pkt = simple_tcp_packet(eth_dst='00:11:11:11:11:11',
eth_src='00:22:22:22:22:22',
dl_vlan_enable=True,
vlan_vid=10,
ip_dst='10.0.0.1',
ip_id=102,
ip_ttl=64)
exp_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=102,
dl_vlan_enable=True,
vlan_vid=10,
ip_ttl=64)
try:
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [1])
finally:
sai_thrift_delete_fdb(self.client, vlan_id, mac1, port1)
sai_thrift_delete_fdb(self.client, vlan_id, mac2, port2)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_delete_vlan(vlan_id)
class L2AccessToTrunkVlanTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending L2 packet - port 1 -> port 2 [trunk vlan=10])"
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_TAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port2, SAI_VLAN_TAGGING_MODE_UNTAGGED)
sai_thrift_create_fdb(self.client, vlan_id, mac1, port1, mac_action)
sai_thrift_create_fdb(self.client, vlan_id, mac2, port2, mac_action)
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=102,
ip_ttl=64)
exp_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',
dl_vlan_enable=True,
vlan_vid=10,
ip_id=102,
ip_ttl=64,
pktlen=104)
try:
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [1])
finally:
sai_thrift_delete_fdb(self.client, vlan_id, mac1, port1)
sai_thrift_delete_fdb(self.client, vlan_id, mac2, port2)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_delete_vlan(vlan_id)
class L2TrunkToAccessVlanTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending L2 packet - port 1 -> port 2 [trunk vlan=10])"
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port2, SAI_VLAN_TAGGING_MODE_TAGGED)
sai_thrift_create_fdb(self.client, vlan_id, mac1, port1, mac_action)
sai_thrift_create_fdb(self.client, vlan_id, mac2, port2, mac_action)
pkt = simple_tcp_packet(eth_dst='00:11:11:11:11:11',
eth_src='00:22:22:22:22:22',
dl_vlan_enable=True,
vlan_vid=10,
ip_dst='10.0.0.1',
ip_id=102,
ip_ttl=64)
exp_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=102,
ip_ttl=64,
pktlen=96)
try:
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [1])
finally:
sai_thrift_delete_fdb(self.client, vlan_id, mac1, port1)
sai_thrift_delete_fdb(self.client, vlan_id, mac2, port2)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_delete_vlan(vlan_id)
class L2StpTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending L2 packet - port 1 -> port 2 [trunk vlan=10])"
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
vlan_list = [vlan_id]
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port2, SAI_VLAN_TAGGING_MODE_UNTAGGED)
stp_id = sai_thrift_create_stp(self.client, vlan_list)
stp_port_id1 = sai_thrift_create_stp_port(self.client, stp_id, port1, SAI_PORT_STP_STATE_FORWARDING)
stp_port_id2 = sai_thrift_create_stp_port(self.client, stp_id, port2, SAI_PORT_STP_STATE_FORWARDING)
sai_thrift_create_fdb(self.client, vlan_id, mac1, port1, mac_action)
sai_thrift_create_fdb(self.client, vlan_id, mac2, port2, mac_action)
try:
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=113,
ip_ttl=64)
exp_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=113,
ip_ttl=64)
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [1])
stp_port_id2 = sai_thrift_create_stp_port(self.client, stp_id, port2, SAI_PORT_STP_STATE_FORWARDING)
stp_port_id2 = sai_thrift_create_stp_port(self.client, stp_id, port2, SAI_PORT_STP_STATE_BLOCKING)
print "Sending packet port 1 (blocked) -> port 2 (192.168.0.1 -> 10.0.0.1 [id = 101])"
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=113,
ip_ttl=64)
exp_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=113,
ip_ttl=64)
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [])
finally:
sai_thrift_delete_fdb(self.client, vlan_id, mac1, port1)
sai_thrift_delete_fdb(self.client, vlan_id, mac2, port2)
self.client.sai_thrift_remove_stp_port(stp_port_id1)
self.client.sai_thrift_remove_stp_port(stp_port_id2)
self.client.sai_thrift_remove_stp(stp_id)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_delete_vlan(vlan_id)
class L3IPv4HostTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 2 -> port 1 (192.168.0.1 -> 10.10.10.1 [id = 101])"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
v4_enabled = 1
v6_enabled = 1
mac_valid = 0
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr1 = '10.10.10.1'
ip_mask1 = '255.255.255.255'
dmac1 = '00:11:22:33:44:55'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
# send the test packet(s)
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=64)
exp_pkt = simple_tcp_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=63)
try:
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [1])
finally:
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_virtual_router(vr_id)
class L3IPv4LpmTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 1 -> port 2 (192.168.0.1 -> 10.10.10.1 [id = 101])"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr1 = '10.10.10.1'
ip_mask1 = '255.255.255.0'
dmac1 = '00:11:22:33:44:55'
nhop_ip1 = '20.20.20.1'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, nhop_ip1, rif_id1)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, nhop_ip1, dmac1)
# send the test packet(s)
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=64)
exp_pkt = simple_tcp_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=63)
try:
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [1])
finally:
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, nhop_ip1, dmac1)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_virtual_router(vr_id)
class L3IPv6HostTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 1 -> port 2 (2000::1 -> 3000::1)"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV6
ip_addr1 = '1234:5678:9abc:def0:4422:1133:5577:99aa'
ip_mask1 = 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff'
dmac1 = '00:11:22:33:44:55'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
# send the test packet(s)
pkt = simple_tcpv6_packet( eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ipv6_dst='1234:5678:9abc:def0:4422:1133:5577:99aa',
ipv6_src='2000::1',
ipv6_hlim=64)
exp_pkt = simple_tcpv6_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ipv6_dst='1234:5678:9abc:def0:4422:1133:5577:99aa',
ipv6_src='2000::1',
ipv6_hlim=63)
try:
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [1])
finally:
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_virtual_router(vr_id)
class L3IPv6LpmTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "IPv6 Lpm Test"
print "Sending packet port 2 -> port 1 (2000::1 -> 1234:5678:9abc:def0:4422:1133:5577:9900, routing with 1234:5678:9abc:def0:4422:1133:5577:9900/120 route"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV6
ip_addr1 = '0034:5678:9abc:def0:4422:1133:5577:9900'
ip_mask1 = 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ff00'
dmac1 = '00:11:22:33:44:55'
nhop_ip1 = '3000::1'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, nhop_ip1, rif_id1)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, nhop_ip1, dmac1)
# send the test packet(s)
pkt = simple_tcpv6_packet( eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ipv6_dst='0034:5678:9abc:def0:4422:1133:5577:99aa',
ipv6_src='2000::1',
ipv6_hlim=64)
exp_pkt = simple_tcpv6_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ipv6_dst='0034:5678:9abc:def0:4422:1133:5577:99aa',
ipv6_src='2000::1',
ipv6_hlim=63)
try:
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [1])
finally:
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, nhop_ip1, dmac1)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_virtual_router(vr_id)
class L3IPv4EcmpHostTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 1 -> port 2 (192.168.0.1 -> 10.10.10.1 [id = 101])"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac)
rif_id3 = sai_thrift_create_router_interface(self.client, vr_id, 1, port3, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr1 = '10.10.10.1'
ip_mask1 = '255.255.255.255'
dmac1 = '00:11:22:33:44:55'
dmac2 = '00:11:22:33:44:56'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
nhop2 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id2)
nhop_group1 = sai_thrift_create_next_hop_group(self.client)
nhop_member1 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop1)
nhop_member2 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop2)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop_group1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id2, ip_addr1, dmac2)
# send the test packet(s)
try:
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=106,
ip_ttl=64)
exp_pkt1 = simple_tcp_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=106,
#ip_tos=3,
ip_ttl=63)
exp_pkt2 = simple_tcp_packet(
eth_dst='00:11:22:33:44:56',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=106,
#ip_tos=3,
ip_ttl=63)
send_packet(self, 3, str(pkt))
verify_any_packet_any_port(self, [exp_pkt1, exp_pkt2], [1, 2])
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ip_dst='10.10.10.1',
ip_src='192.168.100.3',
ip_id=106,
ip_ttl=64)
exp_pkt1 = simple_tcp_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='192.168.100.3',
ip_id=106,
#ip_tos=3,
ip_ttl=63)
exp_pkt2 = simple_tcp_packet(
eth_dst='00:11:22:33:44:56',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='192.168.100.3',
ip_id=106,
#ip_tos=3,
ip_ttl=63)
send_packet(self, 3, str(pkt))
verify_any_packet_any_port(self, [exp_pkt1, exp_pkt2], [1, 2])
finally:
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id2, ip_addr1, dmac2)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop_group1)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member1)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member2)
self.client.sai_thrift_remove_next_hop_group(nhop_group1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_next_hop(nhop2)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_router_interface(rif_id3)
self.client.sai_thrift_remove_virtual_router(vr_id)
class L3IPv6EcmpHostTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 1 -> port 2 (192.168.0.1 -> 10.10.10.1 [id = 101])"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac)
rif_id3 = sai_thrift_create_router_interface(self.client, vr_id, 1, port3, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV6
ip_addr1 = '5000:1:1:0:0:0:0:1'
ip_mask1 = 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff'
dmac1 = '00:11:22:33:44:55'
dmac2 = '00:11:22:33:44:56'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
nhop2 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id2)
nhop_group1 = sai_thrift_create_next_hop_group(self.client)
nhop_member1 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop1)
nhop_member2 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop2)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop_group1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id2, ip_addr1, dmac2)
# send the test packet(s)
try:
pkt = simple_tcpv6_packet(
eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ipv6_dst='5000:1:1:0:0:0:0:1',
ipv6_src='2000:1:1:0:0:0:0:1',
tcp_sport=0x1234,
ipv6_hlim=64)
exp_pkt1 = simple_tcpv6_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ipv6_dst='5000:1:1:0:0:0:0:1',
ipv6_src='2000:1:1:0:0:0:0:1',
tcp_sport=0x1234,
ipv6_hlim=63)
exp_pkt2 = simple_tcpv6_packet(
eth_dst='00:11:22:33:44:56',
eth_src='00:77:66:55:44:33',
ipv6_dst='5000:1:1:0:0:0:0:1',
ipv6_src='2000:1:1:0:0:0:0:1',
tcp_sport=0x1234,
ipv6_hlim=63)
send_packet(self, 3, str(pkt))
verify_any_packet_any_port(self, [exp_pkt1, exp_pkt2], [1, 2])
pkt = simple_tcpv6_packet(
eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:45',
ipv6_dst='5000:1:1:0:0:0:0:1',
ipv6_src='2000:1:1:0:0:0:0:1',
tcp_sport=0x1248,
ipv6_hlim=64)
exp_pkt1 = simple_tcpv6_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ipv6_dst='5000:1:1:0:0:0:0:1',
ipv6_src='2000:1:1:0:0:0:0:1',
tcp_sport=0x1248,
ipv6_hlim=63)
exp_pkt2 = simple_tcpv6_packet(
eth_dst='00:11:22:33:44:56',
eth_src='00:77:66:55:44:33',
ipv6_dst='5000:1:1:0:0:0:0:1',
ipv6_src='2000:1:1:0:0:0:0:1',
tcp_sport=0x1248,
ipv6_hlim=63)
send_packet(self, 3, str(pkt))
verify_any_packet_any_port(self, [exp_pkt1, exp_pkt2], [1, 2])
finally:
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id2, ip_addr1, dmac2)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop_group1)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member1)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member2)
self.client.sai_thrift_remove_next_hop_group(nhop_group1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_next_hop(nhop2)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_router_interface(rif_id3)
self.client.sai_thrift_remove_virtual_router(vr_id)
class L3IPv4EcmpLpmTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 1 -> port 2 (192.168.0.1 -> 10.10.10.1 [id = 101])"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
port4 = port_list[4]
port5 = port_list[5]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac)
rif_id3 = sai_thrift_create_router_interface(self.client, vr_id, 1, port3, 0, v4_enabled, v6_enabled, mac)
rif_id4 = sai_thrift_create_router_interface(self.client, vr_id, 1, port4, 0, v4_enabled, v6_enabled, mac)
rif_id5 = sai_thrift_create_router_interface(self.client, vr_id, 1, port5, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr1 = '10.10.0.0'
ip_mask1 = '255.255.0.0'
nhop_ip1 = '11.11.11.11'
nhop_ip2 = '22.22.22.22'
nhop_ip3 = '33.33.33.33'
nhop_ip4 = '44.44.44.44'
dmac1 = '00:11:22:33:44:55'
dmac2 = '00:11:22:33:44:56'
dmac3 = '00:11:22:33:44:57'
dmac4 = '00:11:22:33:44:58'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, nhop_ip1, rif_id1)
nhop2 = sai_thrift_create_nhop(self.client, addr_family, nhop_ip2, rif_id2)
nhop3 = sai_thrift_create_nhop(self.client, addr_family, nhop_ip3, rif_id3)
nhop4 = sai_thrift_create_nhop(self.client, addr_family, nhop_ip4, rif_id4)
nhop_group1 = sai_thrift_create_next_hop_group(self.client)
nhop_member1 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop1)
nhop_member2 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop2)
nhop_member3 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop3)
nhop_member4 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop4)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop_group1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, nhop_ip1, dmac1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id2, nhop_ip2, dmac2)
sai_thrift_create_neighbor(self.client, addr_family, rif_id3, nhop_ip3, dmac3)
sai_thrift_create_neighbor(self.client, addr_family, rif_id4, nhop_ip4, dmac4)
# send the test packet(s)
try:
count = [0, 0, 0, 0]
dst_ip = int(socket.inet_aton('10.10.10.1').encode('hex'),16)
max_itrs = 200
for i in range(0, max_itrs):
dst_ip_addr = socket.inet_ntoa(hex(dst_ip)[2:].zfill(8).decode('hex'))
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=106,
ip_ttl=64)
exp_pkt1 = simple_tcp_packet(eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=106,
ip_ttl=63)
exp_pkt2 = simple_tcp_packet(eth_dst='00:11:22:33:44:56',
eth_src='00:77:66:55:44:33',
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=106,
ip_ttl=63)
exp_pkt3 = simple_tcp_packet(eth_dst='00:11:22:33:44:57',
eth_src='00:77:66:55:44:33',
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=106,
ip_ttl=63)
exp_pkt4 = simple_tcp_packet(eth_dst='00:11:22:33:44:58',
eth_src='00:77:66:55:44:33',
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=106,
ip_ttl=63)
send_packet(self, 5, str(pkt))
rcv_idx = verify_any_packet_any_port(self,
[exp_pkt1, exp_pkt2, exp_pkt3, exp_pkt4],
[1, 2, 3, 4])
count[rcv_idx] += 1
dst_ip += 1
for i in range(0, 4):
self.assertTrue((count[i] >= ((max_itrs / 4) * 0.8)),
"Not all paths are equally balanced")
finally:
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, nhop_ip1, dmac1)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id2, nhop_ip2, dmac2)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id3, nhop_ip3, dmac3)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id4, nhop_ip4, dmac4)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop_group1)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member1)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member2)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member3)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member4)
self.client.sai_thrift_remove_next_hop_group(nhop_group1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_next_hop(nhop2)
self.client.sai_thrift_remove_next_hop(nhop3)
self.client.sai_thrift_remove_next_hop(nhop4)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_router_interface(rif_id3)
self.client.sai_thrift_remove_router_interface(rif_id4)
self.client.sai_thrift_remove_router_interface(rif_id5)
self.client.sai_thrift_remove_virtual_router(vr_id)
class L3IPv6EcmpLpmTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 1 -> port 2 (192.168.0.1 -> 10.10.10.1 [id = 101])"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
port4 = port_list[4]
port5 = port_list[5]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac)
rif_id3 = sai_thrift_create_router_interface(self.client, vr_id, 1, port3, 0, v4_enabled, v6_enabled, mac)
rif_id4 = sai_thrift_create_router_interface(self.client, vr_id, 1, port4, 0, v4_enabled, v6_enabled, mac)
rif_id5 = sai_thrift_create_router_interface(self.client, vr_id, 1, port5, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV6
ip_addr1 = '6000:1:1:0:0:0:0:0'
ip_mask1 = 'ffff:ffff:ffff:ffff:0:0:0:0'
nhop_ip1 = '2000:1:1:0:0:0:0:1'
nhop_ip2 = '3000:1:1:0:0:0:0:1'
nhop_ip3 = '4000:1:1:0:0:0:0:1'
nhop_ip4 = '5000:1:1:0:0:0:0:1'
dmac1 = '00:11:22:33:44:55'
dmac2 = '00:11:22:33:44:56'
dmac3 = '00:11:22:33:44:57'
dmac4 = '00:11:22:33:44:58'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, nhop_ip1, rif_id1)
nhop2 = sai_thrift_create_nhop(self.client, addr_family, nhop_ip2, rif_id2)
nhop3 = sai_thrift_create_nhop(self.client, addr_family, nhop_ip3, rif_id3)
nhop4 = sai_thrift_create_nhop(self.client, addr_family, nhop_ip4, rif_id4)
nhop_group1 = sai_thrift_create_next_hop_group(self.client)
nhop_member1 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop1)
nhop_member2 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop2)
nhop_member3 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop3)
nhop_member4 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop4)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop_group1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, nhop_ip1, dmac1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id2, nhop_ip2, dmac2)
sai_thrift_create_neighbor(self.client, addr_family, rif_id3, nhop_ip3, dmac3)
sai_thrift_create_neighbor(self.client, addr_family, rif_id4, nhop_ip4, dmac4)
# send the test packet(s)
try:
count = [0, 0, 0, 0]
dst_ip = socket.inet_pton(socket.AF_INET6, '6000:1:1:0:0:0:0:1')
dst_ip_arr = list(dst_ip)
max_itrs = 200
sport = 0x1234
dport = 0x50
for i in range(0, max_itrs):
dst_ip_addr = socket.inet_ntop(socket.AF_INET6, dst_ip)
#HACK: sport is a hack for hashing since the ecmp hash does not
#include ipv6 sa and da.
pkt = simple_tcpv6_packet(
eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ipv6_dst=dst_ip_addr,
ipv6_src='1001:1:1:0:0:0:0:2',
tcp_sport=sport,
tcp_dport=dport,
ipv6_hlim=64)
exp_pkt1 = simple_tcpv6_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ipv6_dst=dst_ip_addr,
ipv6_src='1001:1:1:0:0:0:0:2',
tcp_sport=sport,
tcp_dport=dport,
ipv6_hlim=63)
exp_pkt2 = simple_tcpv6_packet(
eth_dst='00:11:22:33:44:56',
eth_src='00:77:66:55:44:33',
ipv6_dst=dst_ip_addr,
ipv6_src='1001:1:1:0:0:0:0:2',
tcp_sport=sport,
tcp_dport=dport,
ipv6_hlim=63)
exp_pkt3 = simple_tcpv6_packet(
eth_dst='00:11:22:33:44:57',
eth_src='00:77:66:55:44:33',
ipv6_dst=dst_ip_addr,
ipv6_src='1001:1:1:0:0:0:0:2',
tcp_sport=sport,
tcp_dport=dport,
ipv6_hlim=63)
exp_pkt4 = simple_tcpv6_packet(
eth_dst='00:11:22:33:44:58',
eth_src='00:77:66:55:44:33',
ipv6_dst=dst_ip_addr,
ipv6_src='1001:1:1:0:0:0:0:2',
tcp_sport=sport,
tcp_dport=dport,
ipv6_hlim=63)
send_packet(self, 5, str(pkt))
rcv_idx = verify_any_packet_any_port(self,
[exp_pkt1, exp_pkt2, exp_pkt3, exp_pkt4],
[1, 2, 3, 4])
count[rcv_idx] += 1
dst_ip_arr[15] = chr(ord(dst_ip_arr[15]) + 1)
dst_ip = ''.join(dst_ip_arr)
sport += 15
dport += 20
print "Count = %s" % str(count)
for i in range(0, 4):
self.assertTrue((count[i] >= ((max_itrs / 4) * 0.50)),
"Not all paths are equally balanced")
finally:
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, nhop_ip1, dmac1)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id2, nhop_ip2, dmac2)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id3, nhop_ip3, dmac3)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id4, nhop_ip4, dmac4)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop_group1)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member1)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member2)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member3)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member4)
self.client.sai_thrift_remove_next_hop_group(nhop_group1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_next_hop(nhop2)
self.client.sai_thrift_remove_next_hop(nhop3)
self.client.sai_thrift_remove_next_hop(nhop4)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_router_interface(rif_id3)
self.client.sai_thrift_remove_router_interface(rif_id4)
self.client.sai_thrift_remove_router_interface(rif_id5)
self.client.sai_thrift_remove_virtual_router(vr_id)
class L2FloodTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print 'Flood test on ports 1, 2 and 3'
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
self.client.sai_thrift_create_vlan(vlan_id)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port2, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member3 = sai_thrift_create_vlan_member(self.client, vlan_id, port3, SAI_VLAN_TAGGING_MODE_UNTAGGED)
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=107,
ip_ttl=64)
exp_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=107,
ip_ttl=64)
try:
send_packet(self, 1, str(pkt))
verify_packets(self, exp_pkt, [2, 3])
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [1, 3])
send_packet(self, 3, str(pkt))
verify_packets(self, exp_pkt, [1, 2])
finally:
sai_thrift_flush_fdb_by_vlan(self.client, vlan_id)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_remove_vlan_member(vlan_member3)
self.client.sai_thrift_delete_vlan(vlan_id)
class L2LagTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
port4 = port_list[4]
port5 = port_list[5]
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
lag_id1 = self.client.sai_thrift_create_lag([])
lag_member1 = sai_thrift_create_lag_member(self.client, lag_id1, port1)
lag_member2 = sai_thrift_create_lag_member(self.client, lag_id1, port2)
lag_member3 = sai_thrift_create_lag_member(self.client, lag_id1, port3)
lag_member4 = sai_thrift_create_lag_member(self.client, lag_id1, port4)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, lag_id1, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port5, SAI_VLAN_TAGGING_MODE_UNTAGGED)
sai_thrift_create_fdb(self.client, vlan_id, mac1, lag_id1, mac_action)
sai_thrift_create_fdb(self.client, vlan_id, mac2, port5, mac_action)
try:
count = [0, 0, 0, 0]
dst_ip = int(socket.inet_aton('10.10.10.1').encode('hex'),16)
max_itrs = 200
for i in range(0, max_itrs):
dst_ip_addr = socket.inet_ntoa(hex(dst_ip)[2:].zfill(8).decode('hex'))
pkt = simple_tcp_packet(eth_dst='00:11:11:11:11:11',
eth_src='00:22:22:22:22:22',
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=109,
ip_ttl=64)
exp_pkt = simple_tcp_packet(eth_dst='00:11:11:11:11:11',
eth_src='00:22:22:22:22:22',
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=109,
ip_ttl=64)
send_packet(self, 5, str(pkt))
rcv_idx = verify_any_packet_any_port(self, [exp_pkt], [1, 2, 3, 4])
count[rcv_idx] += 1
dst_ip += 1
print count
for i in range(0, 4):
self.assertTrue((count[i] >= ((max_itrs / 4) * 0.8)),
"Not all paths are equally balanced")
pkt = simple_tcp_packet(eth_src='00:11:11:11:11:11',
eth_dst='00:22:22:22:22:22',
ip_dst='10.0.0.1',
ip_id=109,
ip_ttl=64)
exp_pkt = simple_tcp_packet(eth_src='00:11:11:11:11:11',
eth_dst='00:22:22:22:22:22',
ip_dst='10.0.0.1',
ip_id=109,
ip_ttl=64)
print "Sending packet port 1 (lag member) -> port 1"
send_packet(self, 1, str(pkt))
verify_packets(self, exp_pkt, [5])
print "Sending packet port 2 (lag member) -> port 1"
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [5])
print "Sending packet port 3 (lag member) -> port 1"
send_packet(self, 3, str(pkt))
verify_packets(self, exp_pkt, [5])
print "Sending packet port 4 (lag member) -> port 1"
send_packet(self, 4, str(pkt))
verify_packets(self, exp_pkt, [5])
finally:
sai_thrift_delete_fdb(self.client, vlan_id, mac1, lag_id1)
sai_thrift_delete_fdb(self.client, vlan_id, mac2, port5)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
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_member(lag_member4)
self.client.sai_thrift_remove_lag(lag_id1)
self.client.sai_thrift_delete_vlan(vlan_id)
class L2LagMemberTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
port4 = port_list[4]
port5 = port_list[5]
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
lag_id1 = self.client.sai_thrift_create_lag([])
lag_member1 = sai_thrift_create_lag_member(self.client, lag_id1, port1)
lag_member2 = sai_thrift_create_lag_member(self.client, lag_id1, port2)
lag_member3 = sai_thrift_create_lag_member(self.client, lag_id1, port3)
lag_member4 = sai_thrift_create_lag_member(self.client, lag_id1, port4)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port2, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member3 = sai_thrift_create_vlan_member(self.client, vlan_id, port3, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member4 = sai_thrift_create_vlan_member(self.client, vlan_id, port4, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member5 = sai_thrift_create_vlan_member(self.client, vlan_id, port5, SAI_VLAN_TAGGING_MODE_UNTAGGED)
sai_thrift_create_fdb(self.client, vlan_id, mac1, lag_id1, mac_action)
sai_thrift_create_fdb(self.client, vlan_id, mac2, port5, mac_action)
try:
count = [0, 0, 0, 0]
dst_ip = int(socket.inet_aton('10.10.10.1').encode('hex'),16)
max_itrs = 200
for i in range(0, max_itrs):
dst_ip_addr = socket.inet_ntoa(hex(dst_ip)[2:].zfill(8).decode('hex'))
pkt = simple_tcp_packet(eth_dst='00:11:11:11:11:11',
eth_src='00:22:22:22:22:22',
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=109,
ip_ttl=64)
exp_pkt = simple_tcp_packet(eth_dst='00:11:11:11:11:11',
eth_src='00:22:22:22:22:22',
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=109,
ip_ttl=64)
send_packet(self, 5, str(pkt))
rcv_idx = verify_any_packet_any_port(self, [exp_pkt], [1, 2, 3, 4])
count[rcv_idx] += 1
dst_ip += 1
print count
for i in range(0, 4):
self.assertTrue((count[i] >= ((max_itrs / 4) * 0.8)),
"Not all paths are equally balanced")
pkt = simple_tcp_packet(eth_src='00:11:11:11:11:11',
eth_dst='00:22:22:22:22:22',
ip_dst='10.0.0.1',
ip_id=109,
ip_ttl=64)
exp_pkt = simple_tcp_packet(eth_src='00:11:11:11:11:11',
eth_dst='00:22:22:22:22:22',
ip_dst='10.0.0.1',
ip_id=109,
ip_ttl=64)
print "Sending packet port 1 (lag member) -> port 1"
send_packet(self, 1, str(pkt))
verify_packets(self, exp_pkt, [5])
print "Sending packet port 2 (lag member) -> port 1"
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [5])
print "Sending packet port 3 (lag member) -> port 1"
send_packet(self, 3, str(pkt))
verify_packets(self, exp_pkt, [5])
print "Sending packet port 4 (lag member) -> port 1"
send_packet(self, 4, str(pkt))
verify_packets(self, exp_pkt, [5])
finally:
sai_thrift_delete_fdb(self.client, vlan_id, mac1, lag_id1)
sai_thrift_delete_fdb(self.client, vlan_id, mac2, port5)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_remove_vlan_member(vlan_member3)
self.client.sai_thrift_remove_vlan_member(vlan_member4)
self.client.sai_thrift_remove_vlan_member(vlan_member5)
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_member(lag_member4)
self.client.sai_thrift_remove_lag(lag_id1)
self.client.sai_thrift_delete_vlan(vlan_id)
class L3IPv4LagTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
lag_id1 = self.client.sai_thrift_create_lag([])
lag_member1 = sai_thrift_create_lag_member(self.client, lag_id1, port1)
lag_member2 = sai_thrift_create_lag_member(self.client, lag_id1, port2)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, lag_id1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port3, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr1 = '10.10.10.1'
ip_mask1 = '255.255.255.255'
dmac1 = '00:11:22:33:44:55'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
# send the test packet(s)
try:
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=110,
ip_ttl=64)
exp_pkt = simple_tcp_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=110,
ip_ttl=63)
send_packet(self, 3, str(pkt))
verify_packets_any(self, exp_pkt, [1, 2])
finally:
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_lag_member(lag_member1)
self.client.sai_thrift_remove_lag_member(lag_member2)
self.client.sai_thrift_remove_lag(lag_id1)
self.client.sai_thrift_remove_virtual_router(vr_id)
class L3IPv6LagTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
lag_id1 = self.client.sai_thrift_create_lag([])
lag_member1 = sai_thrift_create_lag_member(self.client, lag_id1, port1)
lag_member2 = sai_thrift_create_lag_member(self.client, lag_id1, port2)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, lag_id1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port3, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV6
ip_addr1 = '4001::1'
ip_mask1 = 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff'
dmac1 = '00:11:22:33:44:55'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
# send the test packet(s)
try:
pkt = simple_tcpv6_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ipv6_dst='4001::1',
ipv6_src='5001::1',
ipv6_hlim=64)
exp_pkt = simple_tcpv6_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ipv6_dst='4001::1',
ipv6_src='5001::1',
ipv6_hlim=63)
send_packet(self, 3, str(pkt))
verify_packets_any(self, exp_pkt, [1, 2])
finally:
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_lag_member(lag_member1)
self.client.sai_thrift_remove_lag_member(lag_member2)
self.client.sai_thrift_remove_lag(lag_id1)
self.client.sai_thrift_remove_virtual_router(vr_id)
class L3EcmpLagTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
port4 = port_list[4]
port5 = port_list[5]
port6 = port_list[6]
port7 = port_list[7]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
lag_id1 = self.client.sai_thrift_create_lag([])
lag_member11 = sai_thrift_create_lag_member(self.client, lag_id1, port1)
lag_member12 = sai_thrift_create_lag_member(self.client, lag_id1, port2)
lag_member13 = sai_thrift_create_lag_member(self.client, lag_id1, port3)
lag_id2 = self.client.sai_thrift_create_lag([])
lag_member21 = sai_thrift_create_lag_member(self.client, lag_id2, port4)
lag_member22 = sai_thrift_create_lag_member(self.client, lag_id2, port5)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, lag_id1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, lag_id2, 0, v4_enabled, v6_enabled, mac)
rif_id3 = sai_thrift_create_router_interface(self.client, vr_id, 1, port6, 0, v4_enabled, v6_enabled, mac)
rif_id4 = sai_thrift_create_router_interface(self.client, vr_id, 1, port7, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr1 = '10.10.0.0'
ip_mask1 = '255.255.0.0'
dmac1 = '00:11:22:33:44:55'
dmac2 = '00:11:22:33:44:56'
dmac3 = '00:11:22:33:44:57'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
nhop2 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id2)
nhop3 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id3)
nhop_group1 = sai_thrift_create_next_hop_group(self.client)
nhop_member1 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop1)
nhop_member2 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop2)
nhop_member3 = sai_thrift_create_next_hop_group_member(self.client, nhop_group1, nhop3)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop_group1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id2, ip_addr1, dmac2)
sai_thrift_create_neighbor(self.client, addr_family, rif_id3, ip_addr1, dmac3)
try:
count = [0, 0, 0, 0, 0, 0]
dst_ip = int(socket.inet_aton('10.10.10.1').encode('hex'), 16)
src_mac_start = '00:22:22:22:23:'
max_itrs = 500
for i in range(0, max_itrs):
dst_ip_addr = socket.inet_ntoa(hex(dst_ip)[2:].zfill(8).decode('hex'))
src_mac = src_mac_start + str(i%99).zfill(2)
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src=src_mac,
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=106,
ip_ttl=64)
exp_pkt1 = simple_tcp_packet(eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=106,
ip_ttl=63)
exp_pkt2 = simple_tcp_packet(eth_dst='00:11:22:33:44:56',
eth_src='00:77:66:55:44:33',
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=106,
ip_ttl=63)
exp_pkt3 = simple_tcp_packet(eth_dst='00:11:22:33:44:57',
eth_src='00:77:66:55:44:33',
ip_dst=dst_ip_addr,
ip_src='192.168.8.1',
ip_id=106,
ip_ttl=63)
send_packet(self, 7, str(pkt))
rcv_idx = verify_any_packet_any_port(self,
[exp_pkt1, exp_pkt2, exp_pkt3],
[1, 2, 3, 4, 5, 6])
count[rcv_idx] += 1
dst_ip += 1
print count
ecmp_count = [count[0]+count[1]+count[2], count[3]+count[4],
count[5]]
for i in range(0, 3):
self.assertTrue((ecmp_count[i] >= ((max_itrs / 3) * 0.75)),
"Ecmp paths are not equally balanced")
for i in range(0, 3):
self.assertTrue((count[i] >= ((max_itrs / 9) * 0.75)),
"Lag path1 is not equally balanced")
for i in range(3, 5):
self.assertTrue((count[i] >= ((max_itrs / 6) * 0.75)),
"Lag path2 is not equally balanced")
finally:
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop_group1)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member1)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member2)
self.client.sai_thrift_remove_next_hop_group_member(nhop_member3)
self.client.sai_thrift_remove_next_hop_group(nhop_group1)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
self.client.sai_thrift_remove_next_hop(nhop1)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id2, ip_addr1, dmac2)
self.client.sai_thrift_remove_next_hop(nhop2)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id3, ip_addr1, dmac3)
self.client.sai_thrift_remove_next_hop(nhop3)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_router_interface(rif_id3)
self.client.sai_thrift_remove_router_interface(rif_id4)
self.client.sai_thrift_remove_lag_member(lag_member11)
self.client.sai_thrift_remove_lag_member(lag_member12)
self.client.sai_thrift_remove_lag_member(lag_member13)
self.client.sai_thrift_remove_lag(lag_id1)
self.client.sai_thrift_remove_lag_member(lag_member21)
self.client.sai_thrift_remove_lag_member(lag_member22)
self.client.sai_thrift_remove_lag(lag_id2)
self.client.sai_thrift_remove_virtual_router(vr_id)
class IPAclTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 1 -> port 2 (192.168.0.1 -> 10.10.10.1 [id = 101])"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr1 = '10.10.10.1'
ip_mask1 = '255.255.255.255'
dmac1 = '00:11:22:33:44:55'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
# send the test packet(s)
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=64)
exp_pkt = simple_tcp_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=63)
if True:
# setup ACL to block based on Source IP
action_list = [SAI_ACL_ENTRY_ATTR_ACTION_PACKET_ACTION]
packet_action = SAI_PACKET_ACTION_DROP
in_ports = [port1, port2]
ip_src = "192.168.0.1"
ip_src_mask = "255.255.255.0"
acl_table_id = sai_thrift_create_acl_table(
client = self.client,
ip_src = True,
in_ports = True)
acl_entry_id = sai_thrift_create_acl_entry(
client = self.client,
acl_table_id = acl_table_id,
action_list = action_list,
ip_src = ip_src,
ip_src_mask = ip_src_mask,
in_ports = in_ports)
# send the same packet
failed = 0
send_packet(self, 2, str(pkt))
# ensure packet is dropped
# check for absence of packet here!
try:
verify_packets(self, exp_pkt, [1])
print 'FAILED - did not expect packet'
failed = 1
except:
print 'Success'
finally:
if failed == 1:
self.assertFalse()
# delete ACL
self.client.sai_thrift_remove_acl_entry(acl_entry_id)
self.client.sai_thrift_remove_acl_table(acl_table_id)
# cleanup
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_virtual_router(vr_id)
class IPIngressAclRangeTcamTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 1 -> port 2 (192.168.0.1 -> 10.10.10.1 [id = 101])"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr1 = '10.10.10.1'
ip_mask1 = '255.255.255.255'
dmac1 = '00:11:22:33:44:55'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
# send the test packet(s)
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=64)
exp_pkt = simple_tcp_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=63)
if True:
u32range = sai_thrift_range_t(min=1000, max=2000)
acl_range_id = sai_thrift_create_acl_range(self.client, SAI_ACL_RANGE_TYPE_L4_SRC_PORT_RANGE, u32range)
range_list = [acl_range_id]
# setup ACL to block based on Source IP
action_list = [SAI_ACL_ENTRY_ATTR_ACTION_PACKET_ACTION]
packet_action = SAI_PACKET_ACTION_DROP
in_ports = [port1, port2]
ip_src = "192.168.0.1"
ip_src_mask = "255.255.255.0"
acl_table_id = sai_thrift_create_acl_table(
client = self.client,
ip_src = True,
in_ports = True)
acl_entry_id = sai_thrift_create_acl_entry(
client = self.client,
acl_table_id = acl_table_id,
action_list = action_list,
range_list = range_list,
ip_src = ip_src,
ip_src_mask = ip_src_mask,
in_ports = in_ports)
# send the same packet
failed = 0
send_packet(self, 2, str(pkt))
# ensure packet is dropped
# check for absence of packet here!
try:
verify_packets(self, exp_pkt, [1])
print 'FAILED - did not expect packet'
failed = 1
except:
print 'Success'
finally:
if failed == 1:
self.assertFalse()
# delete ACL
self.client.sai_thrift_remove_acl_entry(acl_entry_id)
self.client.sai_thrift_remove_acl_table(acl_table_id)
self.client.sai_thrift_delete_acl_range(acl_range_id)
# cleanup
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_virtual_router(vr_id)
class IPEgressAclTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 1 -> port 2 (192.168.0.1 -> 10.10.10.1 [id = 101])"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr1 = '10.10.10.1'
ip_mask1 = '255.255.255.255'
dmac1 = '00:11:22:33:44:55'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
# send the test packet(s)
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=64)
exp_pkt = simple_tcp_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=63)
if True:
# setup ACL to block based on Source IP
action_list = [SAI_ACL_ENTRY_ATTR_ACTION_PACKET_ACTION]
packet_action = SAI_PACKET_ACTION_DROP
in_ports = [port1, port2]
ip_src = "192.168.0.1"
ip_src_mask = "255.255.255.0"
acl_table_id = sai_thrift_create_acl_table(
client = self.client,
acl_stage = SAI_ACL_STAGE_EGRESS,
ip_src = True,
in_ports = True)
acl_entry_id = sai_thrift_create_acl_entry(
client = self.client,
acl_table_id = acl_table_id,
action_list = action_list,
ip_src = ip_src,
ip_src_mask = ip_src_mask,
in_ports = in_ports)
# send the same packet
failed = 0
send_packet(self, 2, str(pkt))
# ensure packet is dropped
# check for absence of packet here!
try:
verify_packets(self, exp_pkt, [1])
print 'FAILED - did not expect packet'
failed = 1
except:
print 'Success'
finally:
if failed == 1:
self.assertFalse()
# delete ACL
self.client.sai_thrift_remove_acl_entry(acl_entry_id)
self.client.sai_thrift_remove_acl_table(acl_table_id)
# cleanup
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_virtual_router(vr_id)
class L3VIIPv4HostTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 1 -> port 2 (192.168.0.1 -> 10.10.10.1 [id = 101])"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
v4_enabled = 1
v6_enabled = 1
vlan_id = 10
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
mac1 = ''
mac2 = ''
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 0, 0, vlan_id, v4_enabled, v6_enabled, mac1)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac2)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr1 = '10.10.10.1'
ip_mask1 = '255.255.255.255'
dmac1 = '00:0a:00:00:00:01'
sai_thrift_create_fdb(self.client, vlan_id, dmac1, port1, mac_action)
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
ip_addr2 = '11.11.11.1'
ip_mask2 = '255.255.255.255'
dmac2 = '00:0b:00:00:00:01'
nhop2 = sai_thrift_create_nhop(self.client, addr_family, ip_addr2, rif_id2)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr2, ip_mask2, nhop2)
sai_thrift_create_neighbor(self.client, addr_family, rif_id2, ip_addr2, dmac2)
try:
# send the test packet(s)
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:0a:00:00:00:01',
ip_dst='11.11.11.1',
ip_src='10.10.10.1',
ip_id=105,
ip_ttl=64)
exp_pkt = simple_tcp_packet(
eth_dst='00:0b:00:00:00:01',
eth_src='00:77:66:55:44:33',
ip_dst='11.11.11.1',
ip_src='10.10.10.1',
ip_id=105,
ip_ttl=63)
send_packet(self, 1, str(pkt))
verify_packets(self, exp_pkt, [2])
# send the test packet(s)
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:0b:00:00:00:01',
ip_dst='10.10.10.1',
ip_src='11.11.11.1',
ip_id=105,
ip_ttl=64)
exp_pkt = simple_tcp_packet(
eth_dst='00:0a:00:00:00:01',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='11.11.11.1',
ip_id=105,
ip_ttl=63)
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [1])
finally:
sai_thrift_delete_fdb(self.client, vlan_id, dmac1, port1)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_remove_neighbor(self.client, addr_family, rif_id2, ip_addr2, dmac2)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr2, ip_mask2, nhop2)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_next_hop(nhop2)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_delete_vlan(vlan_id)
self.client.sai_thrift_remove_virtual_router(vr_id)
class L3IPv4MacRewriteTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 1 -> port 2 (192.168.0.1 -> 10.10.10.1 [id = 101])"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
v4_enabled = 1
v6_enabled = 1
mac1 = '00:0a:00:00:00:01'
mac2 = '00:0b:00:00:00:01'
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac1)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac2)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr1 = '10.10.10.1'
ip_mask1 = '255.255.255.255'
dmac1 = '00:11:22:33:44:55'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
# send the test packet(s)
pkt = simple_tcp_packet(eth_dst='00:0b:00:00:00:01',
eth_src='00:22:22:22:22:22',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=64)
exp_pkt = simple_tcp_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:0a:00:00:00:01',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=63)
try:
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [1])
finally:
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_virtual_router(vr_id)
class IngressLocalMirrorTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
v4_enabled = 1
v6_enabled = 1
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port2, SAI_VLAN_TAGGING_MODE_TAGGED)
sai_thrift_create_fdb(self.client, vlan_id, mac1, port1, mac_action)
sai_thrift_create_fdb(self.client, vlan_id, mac2, port2, mac_action)
action_list = [SAI_ACL_ENTRY_ATTR_ACTION_MIRROR_INGRESS]
in_ports = [port1, port2]
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_src = "192.168.0.1"
ip_src_mask = "255.255.255.255"
mirror_type = SAI_MIRROR_TYPE_LOCAL
ingress_mirror_id = sai_thrift_create_mirror_session(self.client, mirror_type, port3,
0, 0, 0,
None, None,
0, None, None,
0, 0, 0, 0)
acl_table_id = sai_thrift_create_acl_table(
client = self.client,
ip_src = True,
in_ports = True)
acl_entry_id = sai_thrift_create_acl_entry(
client = self.client,
acl_table_id = acl_table_id,
action_list = action_list,
ip_src = ip_src,
ip_src_mask = ip_src_mask,
in_ports = in_ports,
ingress_mirror_id = ingress_mirror_id)
try:
pkt = simple_tcp_packet(eth_dst=mac2,
eth_src=mac1,
ip_dst='10.0.0.1',
ip_src='192.168.0.1',
ip_id=102,
ip_ttl=64)
exp_pkt = simple_tcp_packet(eth_dst=mac2,
eth_src=mac1,
ip_dst='10.0.0.1',
ip_src='192.168.0.1',
dl_vlan_enable=True,
vlan_vid=10,
ip_id=102,
ip_ttl=64,
pktlen=104)
print "Sending packet port 1 -> port 2 and port 3 (local mirror)"
send_packet(self, 1, str(pkt))
verify_each_packet_on_each_port(self, [exp_pkt, pkt], [2, 3])
time.sleep(1)
pkt = simple_tcp_packet(eth_dst=mac1,
eth_src=mac2,
ip_dst='10.0.0.1',
ip_src='192.168.0.1',
vlan_vid=10,
dl_vlan_enable=True,
ip_id=102,
ip_ttl=64,
pktlen=104)
exp_pkt = simple_tcp_packet(eth_dst=mac1,
eth_src=mac2,
ip_dst='10.0.0.1',
ip_src='192.168.0.1',
ip_id=102,
ip_ttl=64,
pktlen=100)
print "Sending packet port 2 -> port 1 and port 3 (local mirror)"
send_packet(self, 2, str(pkt))
verify_each_packet_on_each_port(self, [exp_pkt, pkt], [1, 3])
finally:
self.client.sai_thrift_remove_acl_entry(acl_entry_id)
self.client.sai_thrift_remove_acl_table(acl_table_id)
self.client.sai_thrift_remove_mirror_session(ingress_mirror_id)
sai_thrift_delete_fdb(self.client, vlan_id, mac1, port1)
sai_thrift_delete_fdb(self.client, vlan_id, mac2, port2)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_delete_vlan(vlan_id)
class IngressERSpanMirrorTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
v4_enabled = 1
v6_enabled = 1
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port2, SAI_VLAN_TAGGING_MODE_TAGGED)
sai_thrift_create_fdb(self.client, vlan_id, mac1, port1, mac_action)
sai_thrift_create_fdb(self.client, vlan_id, mac2, port2, mac_action)
action_list = [SAI_ACL_ENTRY_ATTR_ACTION_MIRROR_INGRESS]
in_ports = [port1, port2]
ip_src = "192.168.0.1"
ip_src_mask = "255.255.255.255"
mirror_type = SAI_MIRROR_TYPE_ENHANCED_REMOTE
addr_family = SAI_IP_ADDR_FAMILY_IPV4
tunnel_src_ip = "1.1.1.1"
tunnel_dst_ip = "1.1.1.2"
tunnel_src_mac = "00:77:66:55:44:33"
tunnel_dst_mac = "00:33:33:33:33:33"
encap_type = SAI_ERSPAN_ENCAPSULATION_TYPE_MIRROR_L3_GRE_TUNNEL
protocol = 47
ip_dst = None
ip_dst_mask = None
ip_proto = None
in_port = None
out_port = None
out_ports = []
egress_mirror_id = None
ingress_mirror_id = sai_thrift_create_mirror_session(self.client, mirror_type, port3,
0, 0, 0,
tunnel_src_mac, tunnel_dst_mac,
addr_family, tunnel_src_ip, tunnel_dst_ip,
encap_type, protocol, 0, 0)
acl_table_id = sai_thrift_create_acl_table(
client = self.client,
ip_src = True,
in_ports = True)
acl_entry_id = sai_thrift_create_acl_entry(
client = self.client,
acl_table_id = acl_table_id,
action_list = action_list,
ip_src = ip_src,
ip_src_mask = ip_src_mask,
in_ports = in_ports,
ingress_mirror_id = ingress_mirror_id)
try:
pkt = simple_tcp_packet(eth_dst=mac2,
eth_src=mac1,
ip_dst='10.0.0.1',
ip_src='192.168.0.1',
ip_id=102,
ip_ttl=64)
exp_pkt = simple_tcp_packet(eth_dst=mac2,
eth_src=mac1,
ip_dst='10.0.0.1',
ip_src='192.168.0.1',
dl_vlan_enable=True,
vlan_vid=10,
ip_id=102,
ip_ttl=64,
pktlen=104)
exp_mirrored_pkt = ipv4_erspan_pkt(eth_dst=tunnel_dst_mac,
eth_src=tunnel_src_mac,
ip_src=tunnel_src_ip,
ip_dst=tunnel_dst_ip,
ip_id=0,
ip_ttl=64,
version=2,
mirror_id=(ingress_mirror_id & 0x3FFFFFFF),
inner_frame=pkt);
print "Sending packet port 1 -> port 2 and port 3 (erspan mirror)"
send_packet(self, 1, str(pkt))
verify_erspan3_packet(self, exp_mirrored_pkt, 3)
verify_packets(self, exp_pkt, [2])
verify_no_other_packets(self)
time.sleep(1)
finally:
self.client.sai_thrift_remove_acl_entry(acl_entry_id)
self.client.sai_thrift_remove_acl_table(acl_table_id)
self.client.sai_thrift_remove_mirror_session(ingress_mirror_id)
sai_thrift_delete_fdb(self.client, vlan_id, mac1, port1)
sai_thrift_delete_fdb(self.client, vlan_id, mac2, port2)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_delete_vlan(vlan_id)
class EgressLocalMirrorTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
v4_enabled = 1
v6_enabled = 1
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port2, SAI_VLAN_TAGGING_MODE_TAGGED)
sai_thrift_create_fdb(self.client, vlan_id, mac1, port1, mac_action)
sai_thrift_create_fdb(self.client, vlan_id, mac2, port2, mac_action)
action_list = [SAI_ACL_ENTRY_ATTR_ACTION_MIRROR_EGRESS]
addr_family = SAI_IP_ADDR_FAMILY_IPV4
mirror_type = SAI_MIRROR_TYPE_LOCAL
out_port = port2
egress_mirror_id = sai_thrift_create_mirror_session(self.client, mirror_type, port3,
0, 0, 0,
None, None,
0, None, None,
0, 0, 0, 0)
acl_table_id = sai_thrift_create_acl_table(
client = self.client,
acl_stage = SAI_ACL_STAGE_EGRESS,
out_port = True)
acl_entry_id = sai_thrift_create_acl_entry(
client = self.client,
acl_table_id = acl_table_id,
action_list = action_list,
out_port = out_port,
egress_mirror_id = egress_mirror_id)
try:
pkt = simple_tcp_packet(eth_dst=mac2,
eth_src=mac1,
ip_dst='10.0.0.1',
ip_src='192.168.0.1',
ip_id=102,
ip_ttl=64)
exp_pkt = simple_tcp_packet(eth_dst=mac2,
eth_src=mac1,
ip_dst='10.0.0.1',
ip_src='192.168.0.1',
dl_vlan_enable=True,
vlan_vid=10,
ip_id=102,
ip_ttl=64,
pktlen=104)
print "Sending packet port 1 -> port 2 and port 3 (local mirror)"
send_packet(self, 1, str(pkt))
verify_each_packet_on_each_port(self, [exp_pkt, exp_pkt], [2, 3])
time.sleep(1)
finally:
self.client.sai_thrift_remove_acl_entry(acl_entry_id)
self.client.sai_thrift_remove_acl_table(acl_table_id)
self.client.sai_thrift_remove_mirror_session(egress_mirror_id)
sai_thrift_delete_fdb(self.client, vlan_id, mac1, port1)
sai_thrift_delete_fdb(self.client, vlan_id, mac2, port2)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_delete_vlan(vlan_id)
class EgressERSpanMirrorTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
port3 = port_list[3]
v4_enabled = 1
v6_enabled = 1
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port2, SAI_VLAN_TAGGING_MODE_UNTAGGED)
sai_thrift_create_fdb(self.client, vlan_id, mac1, port1, mac_action)
sai_thrift_create_fdb(self.client, vlan_id, mac2, port2, mac_action)
action_list = [SAI_ACL_ENTRY_ATTR_ACTION_MIRROR_EGRESS]
mirror_type = SAI_MIRROR_TYPE_ENHANCED_REMOTE
addr_family = SAI_IP_ADDR_FAMILY_IPV4
tunnel_src_ip = "1.1.1.1"
tunnel_dst_ip = "1.1.1.2"
tunnel_src_mac = "00:77:66:55:44:33"
tunnel_dst_mac = "00:33:33:33:33:33"
encap_type = SAI_ERSPAN_ENCAPSULATION_TYPE_MIRROR_L3_GRE_TUNNEL
protocol = 47
out_port = port2
egress_mirror_id = sai_thrift_create_mirror_session(self.client, mirror_type, port3,
0, 0, 0,
tunnel_src_mac, tunnel_dst_mac,
addr_family, tunnel_src_ip, tunnel_dst_ip,
encap_type, protocol, 0, 0)
acl_table_id = sai_thrift_create_acl_table(
client = self.client,
acl_stage=SAI_ACL_STAGE_EGRESS,
out_port = True)
acl_entry_id = sai_thrift_create_acl_entry(
client = self.client,
acl_table_id = acl_table_id,
action_list = action_list,
out_port = out_port,
egress_mirror_id = egress_mirror_id)
try:
pkt = simple_tcp_packet(eth_dst=mac2,
eth_src=mac1,
ip_dst='10.0.0.1',
ip_src='192.168.0.1',
ip_id=102,
ip_ttl=64)
exp_pkt = simple_tcp_packet(eth_dst=mac2,
eth_src=mac1,
ip_dst='10.0.0.1',
ip_src='192.168.0.1',
ip_id=102,
ip_ttl=64)
exp_mirrored_pkt = ipv4_erspan_pkt(eth_dst=tunnel_dst_mac,
eth_src=tunnel_src_mac,
ip_src=tunnel_src_ip,
ip_dst=tunnel_dst_ip,
ip_id=0,
ip_ttl=64,
version=2,
mirror_id=(egress_mirror_id & 0x3FFFFFFF),
inner_frame=pkt);
print "Sending packet port 1 -> port 2 and port 3 (erspan mirror)"
send_packet(self, 1, str(pkt))
verify_erspan3_packet(self, exp_mirrored_pkt, 3)
verify_packets(self, exp_pkt, [2])
verify_no_other_packets(self)
time.sleep(1)
finally:
self.client.sai_thrift_remove_acl_entry(acl_entry_id)
self.client.sai_thrift_remove_acl_table(acl_table_id)
self.client.sai_thrift_remove_mirror_session(egress_mirror_id)
sai_thrift_delete_fdb(self.client, vlan_id, mac1, port1)
sai_thrift_delete_fdb(self.client, vlan_id, mac2, port2)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_delete_vlan(vlan_id)
class L2VlanStatsTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending L2 packet port 1 -> port 2 [access vlan=10])"
switch_init(self.client)
vlan_id = 10
port1 = port_list[1]
port2 = port_list[2]
mac1 = '00:11:11:11:11:11'
mac2 = '00:22:22:22:22:22'
mac_action = SAI_PACKET_ACTION_FORWARD
self.client.sai_thrift_create_vlan(vlan_id)
vlan_member1 = sai_thrift_create_vlan_member(self.client, vlan_id, port1, SAI_VLAN_TAGGING_MODE_UNTAGGED)
vlan_member2 = sai_thrift_create_vlan_member(self.client, vlan_id, port2, SAI_VLAN_TAGGING_MODE_UNTAGGED)
sai_thrift_create_fdb(self.client, vlan_id, mac1, port1, mac_action)
sai_thrift_create_fdb(self.client, vlan_id, mac2, port2, mac_action)
counter1_ids, counter1 = sai_thrift_get_vlan_stats(self.client, vlan_id)
try:
num_bytes = 0
num_packets = 200
random.seed(314159)
for i in range(0, num_packets):
pktlen = random.randint(100, 250)
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,
pktlen=pktlen)
send_packet(self, 2, str(pkt))
verify_packets(self, pkt, [1])
num_bytes += pktlen
counter2_ids, counter2 = sai_thrift_get_vlan_stats(self.client, vlan_id)
for i in range(0, len(counter2)):
counter2[i] = counter2[i] - counter1[i]
sai_thrift_print_vlan_stats(counter2_ids, counter2)
self.assertEqual(counter2[SAI_VLAN_STAT_IN_OCTETS], num_bytes)
self.assertEqual(counter2[SAI_VLAN_STAT_IN_UCAST_PKTS], num_packets)
#self.assertEqual(counter2[6], num_bytes)
self.assertEqual(counter2[SAI_VLAN_STAT_OUT_UCAST_PKTS], num_packets)
finally:
sai_thrift_delete_fdb(self.client, vlan_id, mac1, port1)
sai_thrift_delete_fdb(self.client, vlan_id, mac2, port2)
self.client.sai_thrift_remove_vlan_member(vlan_member1)
self.client.sai_thrift_remove_vlan_member(vlan_member2)
self.client.sai_thrift_delete_vlan(vlan_id)
class IPAclStatsTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
print "Sending packet port 1 -> port 2 (192.168.0.1 -> 10.10.10.1 [id = 101])"
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
v4_enabled = 1
v6_enabled = 1
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr1 = '10.10.0.0'
ip_mask1 = '255.255.0.0'
dmac1 = '00:11:22:33:44:55'
nhop1 = sai_thrift_create_nhop(self.client, addr_family, ip_addr1, rif_id1)
sai_thrift_create_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
sai_thrift_create_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
# send the test packet(s)
pkt = simple_tcp_packet(eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=64)
exp_pkt = simple_tcp_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=63)
# setup ACL to block based on Source IP
action_list = [SAI_ACL_ENTRY_ATTR_ACTION_COUNTER, SAI_ACL_ENTRY_ATTR_ACTION_PACKET_ACTION]
packet_action1 = SAI_PACKET_ACTION_FORWARD
packet_action2 = SAI_PACKET_ACTION_DROP
in_ports = [port1, port2]
ip_dst1 = "10.10.10.1"
ip_dst1_mask = "255.255.255.255"
ip_dst2 = "10.10.10.2"
ip_dst2_mask = "255.255.255.255"
acl_table_id = sai_thrift_create_acl_table(
client = self.client,
ip_dst = True,
in_ports = True)
acl_counter_id = sai_thrift_create_acl_counter(
client = self.client,
acl_table_id = acl_table_id)
acl_entry1_id = sai_thrift_create_acl_entry(
client = self.client,
acl_table_id = acl_table_id,
action_list = action_list,
ip_dst = ip_dst1,
ip_dst_mask = ip_dst1_mask,
in_ports = in_ports,
packet_action = packet_action1,
acl_counter_id = acl_counter_id)
acl_entry2_id = sai_thrift_create_acl_entry(
client = self.client,
acl_table_id = acl_table_id,
action_list = action_list,
ip_dst = ip_dst2,
ip_dst_mask = ip_dst2_mask,
in_ports = in_ports,
packet_action = packet_action2,
acl_counter_id = acl_counter_id)
try:
counter_values1 = sai_thrift_get_acl_counter_attribute(
client = self.client,
acl_counter_id = acl_counter_id)
num_bytes = 0
num_packets = 0
random.seed(314159)
for i in range(0, 10):
pktlen = random.randint(100, 250)
pkt = simple_tcp_packet(
eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=64,
pktlen=pktlen)
exp_pkt = simple_tcp_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.1',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=63,
pktlen=pktlen)
send_packet(self, 2, str(pkt))
verify_packets(self, exp_pkt, [1])
num_bytes += pktlen
num_packets += 1
for i in range(0, 10):
pktlen = random.randint(100, 250)
pkt = simple_tcp_packet(
eth_dst='00:77:66:55:44:33',
eth_src='00:22:22:22:22:22',
ip_dst='10.10.10.2',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=64,
pktlen=pktlen)
exp_pkt = simple_tcp_packet(
eth_dst='00:11:22:33:44:55',
eth_src='00:77:66:55:44:33',
ip_dst='10.10.10.2',
ip_src='192.168.0.1',
ip_id=105,
ip_ttl=63,
pktlen=pktlen)
send_packet(self, 2, str(pkt))
verify_no_other_packets(self)
num_bytes += pktlen
num_packets += 1
time.sleep(65)
counter_values2 = sai_thrift_get_acl_counter_attribute(
client = self.client,
acl_counter_id = acl_counter_id)
counter_values2[0].u64 = counter_values2[0].u64 - counter_values1[0].u64
counter_values2[1].u64 = counter_values2[1].u64 - counter_values1[1].u64
print "ACL stats:"
print "packets: ", counter_values2[0].u64
print "bytes: ", counter_values2[1].u64
self.assertEqual(counter_values2[0].u64, num_packets)
self.assertEqual(counter_values2[1].u64, num_bytes)
finally:
# delete ACL
self.client.sai_thrift_remove_acl_counter(acl_counter_id)
self.client.sai_thrift_remove_acl_entry(acl_entry1_id)
self.client.sai_thrift_remove_acl_entry(acl_entry2_id)
self.client.sai_thrift_remove_acl_table(acl_table_id)
# cleanup
sai_thrift_remove_neighbor(self.client, addr_family, rif_id1, ip_addr1, dmac1)
sai_thrift_remove_route(self.client, vr_id, addr_family, ip_addr1, ip_mask1, nhop1)
self.client.sai_thrift_remove_next_hop(nhop1)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_virtual_router(vr_id)
class NexthopGetSetTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
switch_init(self.client)
port1 = port_list[1]
port2 = port_list[2]
v4_enabled = 1
v6_enabled = 1
v6_disabled = 0
mac_valid = 0
mac = ''
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
addr_family = SAI_IP_ADDR_FAMILY_IPV4
ip_addr = '10.10.10.1'
ip_mask = '255.255.255.255'
nhop = sai_thrift_create_nhop(self.client, addr_family, ip_addr, rif_id)
# check get returns correct value
rif_attribute = sai_thrift_attribute_t(id=SAI_NEXT_HOP_ATTR_ROUTER_INTERFACE_ID)
resp = self.client.sai_thrift_get_next_hop_attribute(nhop, 1, [rif_attribute])
assert(resp.status == 0)
assert(resp.attributes[0].value.oid == rif_id)
# create a new vr_id, rif_id pair for set
rif_id2 = sai_thrift_create_router_interface(self.client, vr_id, 1, port2, 0, v4_enabled, v6_disabled, mac)
rif_attribute2 = sai_thrift_attribute_t(id=SAI_NEXT_HOP_ATTR_ROUTER_INTERFACE_ID,
value=sai_thrift_attribute_value_t(oid=rif_id2))
status = self.client.sai_thrift_set_next_hop_attribute(nhop, [rif_attribute2])
assert(status == 0)
# get the new value to check if it's right
resp = self.client.sai_thrift_get_next_hop_attribute(nhop, 1, [rif_attribute])
assert(resp.status == 0)
assert(resp.attributes[0].value.oid == rif_id2)
# TODO: ip get/set
self.client.sai_thrift_remove_next_hop(nhop)
self.client.sai_thrift_remove_router_interface(rif_id)
self.client.sai_thrift_remove_router_interface(rif_id2)
self.client.sai_thrift_remove_virtual_router(vr_id)
class InterfaceGetSetTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
switch_init(self.client)
port1 = port_list[1]
v4_enabled = 1
v6_enabled = 1
v6_disabled = 0
mac_valid = 0
mac = '00:11:22:33:44:55'
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
port_rif_id = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
# test gets -- these fields are read only
# vr_id
vr_id_attribute = sai_thrift_attribute_t(id=SAI_ROUTER_INTERFACE_ATTR_VIRTUAL_ROUTER_ID)
resp = self.client.sai_thrift_get_router_interface_attribute(port_rif_id, 1, [vr_id_attribute])
assert(resp.status == 0)
assert(resp.attributes[0].value.oid == vr_id)
# port_id
port_id_attribute = sai_thrift_attribute_t(id=SAI_ROUTER_INTERFACE_ATTR_PORT_ID)
resp = self.client.sai_thrift_get_router_interface_attribute(port_rif_id, 1, [port_id_attribute])
assert(resp.status == 0)
assert(resp.attributes[0].value.oid == port1)
# need to create a new interface of type vlan to test vlan id get
# first delete the old interface
self.client.sai_thrift_remove_router_interface(port_rif_id)
vlan_id = 10
self.client.sai_thrift_create_vlan(vlan_id)
vlan_rif_id = sai_thrift_create_router_interface(self.client, vr_id, 0, 0, vlan_id, v4_enabled, v6_enabled, mac)
vlan_id_attribute = sai_thrift_attribute_t(id=SAI_ROUTER_INTERFACE_ATTR_VLAN_ID)
resp = self.client.sai_thrift_get_router_interface_attribute(vlan_rif_id, 1, [vlan_id_attribute])
assert(resp.status == 0)
assert(resp.attributes[0].value.u16 == vlan_id)
# TODO: mac get/set
self.client.sai_thrift_remove_router_interface(vlan_rif_id)
self.client.sai_thrift_remove_virtual_router(vr_id)
class PortGetSetTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
pass
class HostIfTest(sai_base_test.ThriftInterfaceDataPlane):
def runTest(self):
print
switch_init(self.client)
port1 = port_list[1]
v4_enabled = 1
v6_enabled = 1
mac_valid = 0
mac = ''
l2_qid = 1
l2_policer = 2
l3_qid = 3
l3_policer = 4
vr_id = sai_thrift_create_virtual_router(self.client, v4_enabled, v6_enabled)
rif_id1 = sai_thrift_create_router_interface(self.client, vr_id, 1, port1, 0, v4_enabled, v6_enabled, mac)
l2_trap_group = sai_thrift_create_hostif_trap_group(self.client, l2_qid, l2_policer)
l3_trap_group = sai_thrift_create_hostif_trap_group(self.client, l3_qid, l3_policer)
try:
trap_id1 = sai_thrift_create_hostif_trap(
self.client,
SAI_HOSTIF_TRAP_TYPE_ARP_REQUEST,
SAI_PACKET_ACTION_TRAP,
1000, SAI_HOSTIF_TRAP_CHANNEL_CB,
l2_trap_group)
trap_id2 = sai_thrift_create_hostif_trap(
self.client,
SAI_HOSTIF_TRAP_TYPE_ARP_RESPONSE,
SAI_PACKET_ACTION_TRAP,
1001,
SAI_HOSTIF_TRAP_CHANNEL_CB,
l2_trap_group)
trap_id3 = sai_thrift_create_hostif_trap(
self.client,
SAI_HOSTIF_TRAP_TYPE_STP,
SAI_PACKET_ACTION_TRAP,
1002,
SAI_HOSTIF_TRAP_CHANNEL_CB,
l2_trap_group)
trap_id4 = sai_thrift_create_hostif_trap(
self.client,
SAI_HOSTIF_TRAP_TYPE_OSPF,
SAI_PACKET_ACTION_LOG,
1003,
SAI_HOSTIF_TRAP_CHANNEL_CB,
l3_trap_group)
trap_id5 = sai_thrift_create_hostif_trap(
self.client,
SAI_HOSTIF_TRAP_TYPE_PIM,
SAI_PACKET_ACTION_LOG,
1004,
SAI_HOSTIF_TRAP_CHANNEL_CB,
l3_trap_group)
trap_id6 = sai_thrift_create_hostif_trap(
self.client,
SAI_HOSTIF_TRAP_TYPE_IGMP_TYPE_V2_REPORT,
SAI_PACKET_ACTION_LOG,
1004,
SAI_HOSTIF_TRAP_CHANNEL_CB,
l3_trap_group)
pkt = simple_arp_packet(arp_op=1, pktlen=100)
exp_pkt = simple_cpu_packet(ingress_port=1,
ingress_ifindex=2,
reason_code=0x201,
ingress_bd=2,
inner_pkt = pkt)
print 'Sending ARP request broadcast'
send_packet(self, 1, str(pkt))
verify_packets(self, exp_pkt, [cpu_port])
pkt = simple_arp_packet(arp_op=2, eth_dst='00:77:66:55:44:33', pktlen=100)
exp_pkt = simple_cpu_packet(ingress_port=1,
ingress_ifindex=2,
reason_code=0x202,
ingress_bd=2,
inner_pkt = pkt)
print 'Sending ARP response'
send_packet(self, 1, str(pkt))
verify_packets(self, exp_pkt, [cpu_port])
pkt = simple_ip_packet(ip_proto=89, ip_dst='224.0.0.5')
exp_pkt = simple_cpu_packet(ingress_port=1,
ingress_ifindex=2,
reason_code=0x204,
ingress_bd=2,
inner_pkt = pkt)
print 'Sending OSPF packet destined to 224.0.0.5'
send_packet(self, 1, str(pkt))
verify_packets(self, exp_pkt, [cpu_port])
pkt = simple_ip_packet(ip_proto=89, ip_dst='224.0.0.6')
exp_pkt = simple_cpu_packet(ingress_port=1,
ingress_ifindex=2,
reason_code=0x204,
ingress_bd=2,
inner_pkt = pkt)
print 'Sending OSPF packet destined to 224.0.0.6'
send_packet(self, 1, str(pkt))
verify_packets(self, exp_pkt, [cpu_port])
pkt = simple_ip_packet(ip_proto=2)
exp_pkt = simple_cpu_packet(ingress_port=1,
ingress_ifindex=2,
reason_code=0x108,
ingress_bd=2,
inner_pkt = pkt)
print 'Sending IGMP v2 report'
send_packet(self, 1, str(pkt))
verify_packets(self, exp_pkt, [cpu_port])
pkt = simple_ip_packet(ip_proto=103)
exp_pkt = simple_cpu_packet(ingress_port=1,
ingress_ifindex=2,
reason_code=0x205,
ingress_bd=2,
inner_pkt = pkt)
print 'Sending PIM packet'
send_packet(self, 1, str(pkt))
verify_packets(self, exp_pkt, [cpu_port])
pkt = simple_eth_packet(eth_dst='01:80:C2:00:00:00', pktlen=100)
exp_pkt = simple_cpu_packet(ingress_port=1,
ingress_ifindex=2,
reason_code=0x100,
ingress_bd=2,
inner_pkt = pkt)
print 'Sending STP packet'
send_packet(self, 1, str(pkt))
verify_packets(self, exp_pkt, [cpu_port])
print 'Deleting hostif reason codes Arp Request/Resp, OSPF, PIM, IGMP and STP'
self.client.sai_thrift_remove_hostif_trap(trap_id1)
self.client.sai_thrift_remove_hostif_trap(trap_id2)
self.client.sai_thrift_remove_hostif_trap(trap_id3)
self.client.sai_thrift_remove_hostif_trap(trap_id4)
self.client.sai_thrift_remove_hostif_trap(trap_id5)
self.client.sai_thrift_remove_hostif_trap(trap_id6)
print 'Sending ARP request broadcast'
pkt = simple_arp_packet(arp_op=1, pktlen=100)
send_packet(self, 1, str(pkt))
print 'Sending OSPF packet destined to 224.0.0.5'
pkt = simple_ip_packet(ip_proto=89, ip_dst='224.0.0.5')
send_packet(self, 1, str(pkt))
print 'Sending OSPF packet destined to 224.0.0.6'
pkt = simple_ip_packet(ip_proto=89, ip_dst='224.0.0.6')
send_packet(self, 1, str(pkt))
print 'Sending IGMP v2 report'
pkt = simple_ip_packet(ip_proto=2)
send_packet(self, 1, str(pkt))
print 'Sending PIM packet'
pkt = simple_ip_packet(ip_proto=103)
send_packet(self, 1, str(pkt))
print 'Sending STP packet'
pkt = simple_eth_packet(eth_dst='01:80:C2:00:00:00', pktlen=100)
send_packet(self, 1, str(pkt))
verify_no_other_packets(self, timeout=1)
finally:
self.client.sai_thrift_remove_hostif_trap_group(l2_trap_group)
self.client.sai_thrift_remove_hostif_trap_group(l3_trap_group)
self.client.sai_thrift_remove_router_interface(rif_id1)
self.client.sai_thrift_remove_virtual_router(vr_id)
| 45.577212 | 163 | 0.558024 | 16,614 | 127,206 | 3.9114 | 0.032382 | 0.096793 | 0.067863 | 0.072218 | 0.931291 | 0.925505 | 0.916856 | 0.9067 | 0.883802 | 0.867121 | 0 | 0.093072 | 0.353765 | 127,206 | 2,790 | 164 | 45.593548 | 0.697439 | 0.014944 | 0 | 0.859558 | 0 | 0.006068 | 0.075514 | 0.003994 | 0 | 0 | 0.000807 | 0.000358 | 0.01127 | 0 | null | null | 0.000433 | 0.006935 | null | null | 0.039879 | 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 |
9d5946524787b27b3a375696009780439be5d09b | 7,155 | py | Python | pokemongo_bot/test/step_walker_test.py | timgates42/PokemonGo-Bot | 5e80f20760f32478a84a8f0ced7ca24cdf41fe03 | [
"MIT"
] | 5,362 | 2016-07-21T02:38:46.000Z | 2022-03-23T13:34:51.000Z | pokemongo_bot/test/step_walker_test.py | timgates42/PokemonGo-Bot | 5e80f20760f32478a84a8f0ced7ca24cdf41fe03 | [
"MIT"
] | 5,897 | 2016-07-21T05:05:49.000Z | 2022-03-17T09:21:35.000Z | pokemongo_bot/test/step_walker_test.py | timgates42/PokemonGo-Bot | 5e80f20760f32478a84a8f0ced7ca24cdf41fe03 | [
"MIT"
] | 3,379 | 2016-07-21T02:38:48.000Z | 2022-03-30T02:46:57.000Z | import unittest
from geographiclib.geodesic import Geodesic
from mock import MagicMock, patch, mock
from pokemongo_bot.walkers.step_walker import StepWalker
NORMALIZED_LAT_LNG_DISTANCE = (6.3948578954430175e-06, 6.35204828670955e-06)
class TestStepWalker(unittest.TestCase):
def setUp(self):
self.patcherSleep = patch('pokemongo_bot.walkers.step_walker.sleep')
self.patcherSleep.start()
self.bot = MagicMock()
self.bot.position = [0, 0, 0]
self.bot.api = MagicMock()
# let us get back the position set by the StepWalker
def api_set_position(lat, lng, alt):
self.bot.position = [lat, lng, alt]
self.bot.api.set_position = api_set_position
def tearDown(self):
self.bot.position = [0, 0, 0]
self.patcherSleep.stop()
def test_normalized_distance(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
self.bot.config.walk_max = 1
self.bot.config.walk_min = 1
sw = StepWalker(self.bot, 0.1, 0.1, precision=0.0)
self.assertGreater(sw.dest_lat, 0)
self.assertGreater(sw.dest_lng, 0)
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return sw.step()
stayInPlace = run_step()
self.assertFalse(stayInPlace)
self.assertAlmostEqual(self.bot.position[0], NORMALIZED_LAT_LNG_DISTANCE[0], places=6)
self.assertAlmostEqual(self.bot.position[1], NORMALIZED_LAT_LNG_DISTANCE[1], places=6)
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_normalized_distance_times_2(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
self.bot.config.walk_max = 2
self.bot.config.walk_min = 2
sw = StepWalker(self.bot, 0.1, 0.1, precision=0.0)
self.assertTrue(sw.dest_lat > 0)
self.assertTrue(sw.dest_lng > 0)
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return sw.step()
stayInPlace = run_step()
self.assertFalse(stayInPlace)
self.assertAlmostEqual(self.bot.position[0], NORMALIZED_LAT_LNG_DISTANCE[0] * 2, places=6)
self.assertAlmostEqual(self.bot.position[1], NORMALIZED_LAT_LNG_DISTANCE[1] * 2, places=6)
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_small_distance_same_spot(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
self.bot.config.walk_max = 1
self.bot.config.walk_min = 1
sw = StepWalker(self.bot, 0, 0, precision=0.0)
self.assertEqual(sw.dest_lat, 0, 'dest_lat should be 0')
self.assertEqual(sw.dest_lng, 0, 'dest_lng should be 0')
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return sw.step()
moveInprecision = run_step()
self.assertTrue(moveInprecision, 'step should return True')
distance = Geodesic.WGS84.Inverse(0.0, 0.0, self.bot.position[0], self.bot.position[1])["s12"]
self.assertTrue(0.0 <= distance <= (sw.precision + sw.epsilon))
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_small_distance_small_step(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
self.bot.config.walk_max = 1
self.bot.config.walk_min = 1
# distance from origin 0,0 to 1e-6, 1e-6 is 0.157253373328 meters
total_distance = Geodesic.WGS84.Inverse(0.0, 0.0, 1e-6, 1e-6)["s12"]
# we take a precision bigger then the total value...
sw = StepWalker(self.bot, 1e-6, 1e-6, precision=0.2)
self.assertEqual(sw.dest_lat, 1e-6)
self.assertEqual(sw.dest_lng, 1e-6)
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return sw.step()
moveInprecistion = run_step()
self.assertTrue(moveInprecistion, 'step should return True')
distance = Geodesic.WGS84.Inverse(0.0, 0.0, self.bot.position[0], self.bot.position[1])["s12"]
self.assertTrue(0.0 <= abs(total_distance - distance) <= (sw.precision + sw.epsilon))
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_big_distances(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
self.bot.config.walk_max = 1
self.bot.config.walk_min = 1
sw = StepWalker(self.bot, 10, 10, precision=0.0)
self.assertEqual(sw.dest_lat, 10)
self.assertEqual(sw.dest_lng, 10)
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return sw.step()
finishedWalking = run_step()
self.assertFalse(finishedWalking, 'step should return False')
self.assertAlmostEqual(self.bot.position[0], NORMALIZED_LAT_LNG_DISTANCE[0], places=6)
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_stay_put(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
self.bot.config.walk_max = 4
self.bot.config.walk_min = 2
sw = StepWalker(self.bot, 10, 10, precision=0.0)
self.assertEqual(sw.dest_lat, 10)
self.assertEqual(sw.dest_lng, 10)
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return sw.step(speed=0)
finishedWalking = run_step()
self.assertFalse(finishedWalking, 'step should return False')
distance = Geodesic.WGS84.Inverse(0.0, 0.0, self.bot.position[0], self.bot.position[1])["s12"]
self.assertTrue(0.0 <= distance <= (sw.precision + sw.epsilon))
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_teleport(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
self.bot.config.walk_max = 4
self.bot.config.walk_min = 2
sw = StepWalker(self.bot, 10, 10, precision=0.0)
self.assertEqual(sw.dest_lat, 10)
self.assertEqual(sw.dest_lng, 10)
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return sw.step(speed=float("inf"))
finishedWalking = run_step()
self.assertTrue(finishedWalking, 'step should return True')
total_distance = Geodesic.WGS84.Inverse(0.0, 0.0, 10, 10)["s12"]
distance = Geodesic.WGS84.Inverse(0.0, 0.0, self.bot.position[0], self.bot.position[1])["s12"]
self.assertTrue(0.0 <= abs(total_distance - distance) <= (sw.precision + sw.epsilon))
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
| 35.420792 | 102 | 0.643047 | 1,010 | 7,155 | 4.386139 | 0.10297 | 0.107449 | 0.123251 | 0.161174 | 0.806546 | 0.759594 | 0.748758 | 0.738826 | 0.730926 | 0.714221 | 0 | 0.044853 | 0.239693 | 7,155 | 201 | 103 | 35.597015 | 0.769485 | 0.023061 | 0 | 0.682759 | 0 | 0 | 0.04509 | 0.005583 | 0 | 0 | 0 | 0 | 0.206897 | 1 | 0.117241 | false | 0 | 0.027586 | 0 | 0.2 | 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 |
19e79b719d40b535f1ca14a65cb041a8621a4d92 | 709 | py | Python | unittest_reinvent/scoring_tests/scoring_components/__init__.py | fujirock/Reinvent | 9c57636f9d32b4ce5b75670f43906a70d5daf886 | [
"MIT"
] | 4 | 2021-05-11T05:34:01.000Z | 2022-03-30T10:04:21.000Z | unittest_reinvent/scoring_tests/scoring_components/__init__.py | prasannavd/Reinvent | ca02ebee8d8ed83223c55f4a1dd1b3fbc2359616 | [
"MIT"
] | null | null | null | unittest_reinvent/scoring_tests/scoring_components/__init__.py | prasannavd/Reinvent | ca02ebee8d8ed83223c55f4a1dd1b3fbc2359616 | [
"MIT"
] | 2 | 2021-06-01T11:56:10.000Z | 2021-10-05T04:33:56.000Z | from unittest_reinvent.scoring_tests.scoring_components.fixtures import ScoringTest
from unittest_reinvent.scoring_tests.scoring_components.test_selectivity_component import *
from unittest_reinvent.scoring_tests.scoring_components.test_custom_alerts import *
from unittest_reinvent.scoring_tests.scoring_components.test_jaccard_distance import *
from unittest_reinvent.scoring_tests.scoring_components.test_matching_substructure import *
from unittest_reinvent.scoring_tests.scoring_components.test_predictive_property_component import *
from unittest_reinvent.scoring_tests.scoring_components.test_qed_score import *
from unittest_reinvent.scoring_tests.scoring_components.test_tanimoto_similarity import *
| 78.777778 | 99 | 0.911142 | 88 | 709 | 6.897727 | 0.272727 | 0.158155 | 0.263591 | 0.355848 | 0.78089 | 0.78089 | 0.78089 | 0.700165 | 0.61285 | 0.224053 | 0 | 0 | 0.045134 | 709 | 8 | 100 | 88.625 | 0.896603 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 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 | 9 |
c208f653cb9bb3b9f00015a4ada3500cbf49145d | 176 | py | Python | bobstack/siptransport/tcpSIPTwistedServerProtocolFactory.py | bobjects/BobStack | c177b286075044832f44baf9ace201780c8b4320 | [
"Apache-2.0"
] | null | null | null | bobstack/siptransport/tcpSIPTwistedServerProtocolFactory.py | bobjects/BobStack | c177b286075044832f44baf9ace201780c8b4320 | [
"Apache-2.0"
] | null | null | null | bobstack/siptransport/tcpSIPTwistedServerProtocolFactory.py | bobjects/BobStack | c177b286075044832f44baf9ace201780c8b4320 | [
"Apache-2.0"
] | null | null | null | from twisted.internet import protocol
from tcpSIPTwistedServerProtocol import TCPSIPTwistedServerProtcol
class TCPSIPTwistedServerProtocolFactory(protocol.Factory):
pass
| 25.142857 | 66 | 0.875 | 14 | 176 | 11 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.096591 | 176 | 6 | 67 | 29.333333 | 0.968553 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.25 | 0.5 | 0 | 0.75 | 0 | 1 | 0 | 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 | 1 | 1 | 0 | 1 | 0 | 0 | 7 |
dfb1c7497293dfb9161ceced04cfd6a83b487579 | 98 | py | Python | src/utils/__init__.py | beratakuzum/spam-detector-api | 2c2dd809363f931e5e6e21b53f8335c59219036c | [
"MIT"
] | 3 | 2020-12-20T18:26:32.000Z | 2021-11-15T19:40:00.000Z | src/utils/__init__.py | beratakuzum/spam-detector-api | 2c2dd809363f931e5e6e21b53f8335c59219036c | [
"MIT"
] | null | null | null | src/utils/__init__.py | beratakuzum/spam-detector-api | 2c2dd809363f931e5e6e21b53f8335c59219036c | [
"MIT"
] | null | null | null | from src.utils.errors import init_error_handler
def init_utils(app):
init_error_handler(app) | 19.6 | 47 | 0.806122 | 16 | 98 | 4.625 | 0.625 | 0.243243 | 0.432432 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.122449 | 98 | 5 | 48 | 19.6 | 0.860465 | 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 | 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 | 0 | 1 | 0 | 0 | 7 |
2623110ff1fb84a126fd2511dae8902be1c1ae92 | 8,552 | py | Python | utils/client.py | bigzz/graphite | bed48cdbfb2d31db0f99fca466ea43385724fc30 | [
"MIT"
] | 2 | 2022-02-11T16:46:50.000Z | 2022-03-09T23:28:06.000Z | utils/client.py | bigzz/graphite | bed48cdbfb2d31db0f99fca466ea43385724fc30 | [
"MIT"
] | null | null | null | utils/client.py | bigzz/graphite | bed48cdbfb2d31db0f99fca466ea43385724fc30 | [
"MIT"
] | 2 | 2022-02-11T16:49:07.000Z | 2022-03-09T23:28:12.000Z | import sys
import serial
import time
def send_command(ser, cmd):
ser.write(cmd)
ser.flush()
time.sleep(0.01)
def draw_cube(ser):
send_command(ser, b'\x18\x00\x03\x33')
send_command(ser, b'\x19\x00\x00\x00')
send_command(ser, b'\x00\x00\x40\x00')
send_command(ser, b'\x00\x01\x00\x4e')
send_command(ser, b'\x01\x00\xc0\x00')
send_command(ser, b'\x01\x01\x00\x15')
send_command(ser, b'\x02\x00\x96\xa8')
send_command(ser, b'\x02\x01\x00\x00')
send_command(ser, b'\x03\x00\x40\x00')
send_command(ser, b'\x03\x01\x00\x1d')
send_command(ser, b'\x04\x00\xc0\x00')
send_command(ser, b'\x04\x01\x00\x28')
send_command(ser, b'\x05\x00\x78\x78')
send_command(ser, b'\x05\x01\x00\x00')
send_command(ser, b'\x06\x00\x40\x00')
send_command(ser, b'\x06\x01\x00\x13')
send_command(ser, b'\x07\x00\x80\x00')
send_command(ser, b'\x07\x01\x00\x5d')
send_command(ser, b'\x08\x00\x98\xc3')
send_command(ser, b'\x08\x01\x00\x00')
send_command(ser, b'\x12\x00\x00\x00')
send_command(ser, b'\x12\x01\x00\x00')
send_command(ser, b'\x13\x00\x96\xa8')
send_command(ser, b'\x13\x01\x00\x00')
send_command(ser, b'\x14\x00\x00\x00')
send_command(ser, b'\x14\x01\x00\x00')
send_command(ser, b'\x15\x00\x00\x00')
send_command(ser, b'\x15\x01\x00\x00')
send_command(ser, b'\x16\x00\x98\xc3')
send_command(ser, b'\x16\x01\x00\x00')
send_command(ser, b'\x17\x00\x00\x00')
send_command(ser, b'\x17\x01\x00\x00')
send_command(ser, b'\x1a\x00\x00\x01')
send_command(ser, b'\x00\x00\xc0\x00')
send_command(ser, b'\x00\x01\x00\x5e')
send_command(ser, b'\x01\x00\x00\x00')
send_command(ser, b'\x01\x01\x00\x35')
send_command(ser, b'\x02\x00\x67\x34')
send_command(ser, b'\x02\x01\x00\x00')
send_command(ser, b'\x03\x00\x40\x00')
send_command(ser, b'\x03\x01\x00\x52')
send_command(ser, b'\x04\x00\x00\x00')
send_command(ser, b'\x04\x01\x00\x56')
send_command(ser, b'\x05\x00\xcc\xcc')
send_command(ser, b'\x05\x01\x00\x00')
send_command(ser, b'\x06\x00\x00\x00')
send_command(ser, b'\x06\x01\x00\x65')
send_command(ser, b'\x07\x00\x40\x00')
send_command(ser, b'\x07\x01\x00\x63')
send_command(ser, b'\x08\x00\x7e\x07')
send_command(ser, b'\x08\x01\x00\x00')
send_command(ser, b'\x12\x00\x00\x00')
send_command(ser, b'\x12\x01\x00\x00')
send_command(ser, b'\x13\x00\x67\x34')
send_command(ser, b'\x13\x01\x00\x00')
send_command(ser, b'\x14\x00\xcc\xcc')
send_command(ser, b'\x14\x01\x00\x00')
send_command(ser, b'\x15\x00\x00\x00')
send_command(ser, b'\x15\x01\x00\x00')
send_command(ser, b'\x16\x00\x7e\x07')
send_command(ser, b'\x16\x01\x00\x00')
send_command(ser, b'\x17\x00\x7e\x07')
send_command(ser, b'\x17\x01\x00\x00')
send_command(ser, b'\x1a\x00\x00\x01')
send_command(ser, b'\x00\x00\x40\x00')
send_command(ser, b'\x00\x01\x00\x52')
send_command(ser, b'\x01\x00\x00\x00')
send_command(ser, b'\x01\x01\x00\x56')
send_command(ser, b'\x02\x00\xcc\xcc')
send_command(ser, b'\x02\x01\x00\x00')
send_command(ser, b'\x03\x00\xc0\x00')
send_command(ser, b'\x03\x01\x00\x36')
send_command(ser, b'\x04\x00\x40\x00')
send_command(ser, b'\x04\x01\x00\x66')
send_command(ser, b'\x05\x00\x68\x5b')
send_command(ser, b'\x05\x01\x00\x00')
send_command(ser, b'\x06\x00\x00\x00')
send_command(ser, b'\x06\x01\x00\x65')
send_command(ser, b'\x07\x00\x40\x00')
send_command(ser, b'\x07\x01\x00\x63')
send_command(ser, b'\x08\x00\x7e\x07')
send_command(ser, b'\x08\x01\x00\x00')
send_command(ser, b'\x12\x00\x00\x00')
send_command(ser, b'\x12\x01\x00\x00')
send_command(ser, b'\x13\x00\xcc\xcc')
send_command(ser, b'\x13\x01\x00\x00')
send_command(ser, b'\x14\x00\x68\x5b')
send_command(ser, b'\x14\x01\x00\x00')
send_command(ser, b'\x15\x00\x00\x00')
send_command(ser, b'\x15\x01\x00\x00')
send_command(ser, b'\x16\x00\x7e\x07')
send_command(ser, b'\x16\x01\x00\x00')
send_command(ser, b'\x17\x00\x7e\x07')
send_command(ser, b'\x17\x01\x00\x00')
send_command(ser, b'\x1a\x00\x00\x01')
send_command(ser, b'\x00\x00\xc0\x00')
send_command(ser, b'\x00\x01\x00\x5e')
send_command(ser, b'\x01\x00\x00\x00')
send_command(ser, b'\x01\x01\x00\x35')
send_command(ser, b'\x02\x00\x67\x34')
send_command(ser, b'\x02\x01\x00\x00')
send_command(ser, b'\x03\x00\x40\x00')
send_command(ser, b'\x03\x01\x00\x4e')
send_command(ser, b'\x04\x00\xc0\x00')
send_command(ser, b'\x04\x01\x00\x15')
send_command(ser, b'\x05\x00\x96\xa8')
send_command(ser, b'\x05\x01\x00\x00')
send_command(ser, b'\x06\x00\x40\x00')
send_command(ser, b'\x06\x01\x00\x52')
send_command(ser, b'\x07\x00\x00\x00')
send_command(ser, b'\x07\x01\x00\x56')
send_command(ser, b'\x08\x00\xcc\xcc')
send_command(ser, b'\x08\x01\x00\x00')
send_command(ser, b'\x12\x00\x00\x00')
send_command(ser, b'\x12\x01\x00\x00')
send_command(ser, b'\x13\x00\x67\x34')
send_command(ser, b'\x13\x01\x00\x00')
send_command(ser, b'\x14\x00\x00\x00')
send_command(ser, b'\x14\x01\x00\x00')
send_command(ser, b'\x15\x00\x00\x00')
send_command(ser, b'\x15\x01\x00\x00')
send_command(ser, b'\x16\x00\xcc\xcc')
send_command(ser, b'\x16\x01\x00\x00')
send_command(ser, b'\x17\x00\x00\x00')
send_command(ser, b'\x17\x01\x00\x00')
send_command(ser, b'\x1a\x00\x00\x01')
send_command(ser, b'\x00\x00\x40\x00')
send_command(ser, b'\x00\x01\x00\x52')
send_command(ser, b'\x01\x00\x00\x00')
send_command(ser, b'\x01\x01\x00\x56')
send_command(ser, b'\x02\x00\xcc\xcc')
send_command(ser, b'\x02\x01\x00\x00')
send_command(ser, b'\x03\x00\x40\x00')
send_command(ser, b'\x03\x01\x00\x13')
send_command(ser, b'\x04\x00\x80\x00')
send_command(ser, b'\x04\x01\x00\x5d')
send_command(ser, b'\x05\x00\x98\xc3')
send_command(ser, b'\x05\x01\x00\x00')
send_command(ser, b'\x06\x00\xc0\x00')
send_command(ser, b'\x06\x01\x00\x36')
send_command(ser, b'\x07\x00\x40\x00')
send_command(ser, b'\x07\x01\x00\x66')
send_command(ser, b'\x08\x00\x68\x5b')
send_command(ser, b'\x08\x01\x00\x00')
send_command(ser, b'\x12\x00\x00\x00')
send_command(ser, b'\x12\x01\x00\x00')
send_command(ser, b'\x13\x00\xcc\xcc')
send_command(ser, b'\x13\x01\x00\x00')
send_command(ser, b'\x14\x00\x00\x00')
send_command(ser, b'\x14\x01\x00\x00')
send_command(ser, b'\x15\x00\x00\x00')
send_command(ser, b'\x15\x01\x00\x00')
send_command(ser, b'\x16\x00\x68\x5b')
send_command(ser, b'\x16\x01\x00\x00')
send_command(ser, b'\x17\x00\x00\x00')
send_command(ser, b'\x17\x01\x00\x00')
send_command(ser, b'\x1a\x00\x00\x01')
send_command(ser, b'\x00\x00\x40\x00')
send_command(ser, b'\x00\x01\x00\x4e')
send_command(ser, b'\x01\x00\xc0\x00')
send_command(ser, b'\x01\x01\x00\x15')
send_command(ser, b'\x02\x00\x96\xa8')
send_command(ser, b'\x02\x01\x00\x00')
send_command(ser, b'\x03\x00\x40\x00')
send_command(ser, b'\x03\x01\x00\x13')
send_command(ser, b'\x04\x00\x80\x00')
send_command(ser, b'\x04\x01\x00\x5d')
send_command(ser, b'\x05\x00\x98\xc3')
send_command(ser, b'\x05\x01\x00\x00')
send_command(ser, b'\x06\x00\x40\x00')
send_command(ser, b'\x06\x01\x00\x52')
send_command(ser, b'\x07\x00\x00\x00')
send_command(ser, b'\x07\x01\x00\x56')
send_command(ser, b'\x08\x00\xcc\xcc')
send_command(ser, b'\x08\x01\x00\x00')
send_command(ser, b'\x12\x00\x00\x00')
send_command(ser, b'\x12\x01\x00\x00')
send_command(ser, b'\x13\x00\x96\xa8')
send_command(ser, b'\x13\x01\x00\x00')
send_command(ser, b'\x14\x00\x98\xc3')
send_command(ser, b'\x14\x01\x00\x00')
send_command(ser, b'\x15\x00\x00\x00')
send_command(ser, b'\x15\x01\x00\x00')
send_command(ser, b'\x16\x00\xcc\xcc')
send_command(ser, b'\x16\x01\x00\x00')
send_command(ser, b'\x17\x00\xcc\xcc')
send_command(ser, b'\x17\x01\x00\x00')
send_command(ser, b'\x1a\x00\x00\x01')
send_command(ser, b'\x1b\x00\x00\x00')
def main(argv):
if (len(argv) == 0):
print("Usage: client.py <serial device>")
exit(0)
else:
ser = serial.Serial(argv[0], baudrate=115200)
draw_cube(ser)
ser.close()
exit(0)
if __name__ == "__main__":
main(sys.argv[1:])
| 39.410138 | 53 | 0.647685 | 1,573 | 8,552 | 3.394151 | 0.050223 | 0.391459 | 0.498221 | 0.530998 | 0.942873 | 0.942873 | 0.934445 | 0.884997 | 0.859712 | 0.859712 | 0 | 0.196878 | 0.145931 | 8,552 | 216 | 54 | 39.592593 | 0.534091 | 0 | 0 | 0.764423 | 0 | 0 | 0.358279 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.014423 | false | 0 | 0.014423 | 0 | 0.028846 | 0.004808 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
266539b7be192015426a840da64d82381d618365 | 11,802 | py | Python | boosup/boosup/kucun/migrations/0001_initial.py | developertqw2017/migrationDjango | f7256ec2af51da1179d2f957e1aa896191b7b514 | [
"MIT"
] | null | null | null | boosup/boosup/kucun/migrations/0001_initial.py | developertqw2017/migrationDjango | f7256ec2af51da1179d2f957e1aa896191b7b514 | [
"MIT"
] | 16 | 2020-02-11T23:19:19.000Z | 2022-03-11T23:33:40.000Z | boosup/boosup/kucun/migrations/0001_initial.py | developertqw2017/migrationDjango | f7256ec2af51da1179d2f957e1aa896191b7b514 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Backup',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('goods_name', models.CharField(max_length=15)),
('kadi_count', models.IntegerField()),
('is_lastet', models.BooleanField(default=True)),
('save_datetime', models.DateTimeField(auto_now_add=True)),
],
),
migrations.CreateModel(
name='ChangeCountRecord',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('old_count', models.IntegerField()),
('real_count', models.IntegerField()),
('date', models.DateTimeField(auto_now_add=True)),
],
),
migrations.CreateModel(
name='Goods',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('goods_name', models.CharField(max_length=15)),
('average_price', models.FloatField()),
('last_price', models.FloatField()),
('update_date', models.DateField(auto_now_add=True)),
('recent_sell', models.DateField(null=True, blank=True)),
('is_delete', models.BooleanField(default=False)),
('add_people', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete = models.CASCADE)),
],
),
migrations.CreateModel(
name='GoodsAddRecord',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('number', models.IntegerField()),
('price', models.FloatField()),
('remark', models.TextField(null=True, blank=True)),
('date', models.DateTimeField(auto_now_add=True)),
('goods', models.ForeignKey(to='kucun.Goods', on_delete = models.CASCADE)),
],
),
migrations.CreateModel(
name='GoodsRecord',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('change_num', models.IntegerField()),
('date', models.DateTimeField(auto_now=True)),
('goods', models.ForeignKey(to='kucun.Goods', on_delete = models.CASCADE)),
],
),
migrations.CreateModel(
name='GoodsReturnRecord',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('date', models.DateTimeField(auto_now_add=True)),
],
),
migrations.CreateModel(
name='GoodsSellRecord',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('sell_num', models.IntegerField()),
('average_price', models.FloatField()),
('sell_price', models.FloatField()),
('is_arrears', models.BooleanField()),
('customer', models.CharField(default='无', max_length=10)),
('phonenumber', models.CharField(default='无', max_length=15)),
('address', models.CharField(default='无', max_length=50)),
('remark', models.TextField(null=True, blank=True)),
('is_delete', models.BooleanField(default=False)),
('date', models.DateTimeField(auto_now_add=True)),
('goods', models.ForeignKey(to='kucun.Goods', on_delete = models.CASCADE)),
],
),
migrations.CreateModel(
name='GoodsShop',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('remain', models.IntegerField()),
('last_update_date', models.DateTimeField(auto_now=True)),
('goods', models.ForeignKey(to='kucun.Goods', on_delete = models.CASCADE)),
('last_updater', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete = models.CASCADE)),
],
),
migrations.CreateModel(
name='InboundChannel',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('name', models.CharField(max_length=15)),
('phonenumber', models.CharField(max_length=15)),
],
),
migrations.CreateModel(
name='LineItem',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('unit_price', models.FloatField()),
('quantity', models.IntegerField()),
('product', models.ForeignKey(to='kucun.GoodsShop', on_delete = models.CASCADE)),
],
),
migrations.CreateModel(
name='Order',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('name', models.CharField(max_length=20)),
('is_arrears', models.BooleanField()),
('customer', models.CharField(default='无', max_length=10)),
('phonenumber', models.CharField(default='无', max_length=15)),
('address', models.CharField(default='无', max_length=50)),
('remark', models.TextField(null=True, blank=True)),
('all_price', models.FloatField(default=0)),
('all_profit', models.FloatField(default=0)),
('is_delete', models.BooleanField(default=False)),
('date', models.DateTimeField(auto_now_add=True)),
('updater', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete = models.CASCADE)),
],
),
migrations.CreateModel(
name='OtherCost',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('purpose', models.CharField(max_length=10)),
('price', models.FloatField()),
('is_delete', models.BooleanField(default=False)),
('date', models.DateTimeField(auto_now_add=True)),
('updater', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete = models.CASCADE)),
],
),
migrations.CreateModel(
name='RefundRecord',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('date', models.DateTimeField(auto_now_add=True)),
('sell_record', models.ForeignKey(to='kucun.GoodsSellRecord', on_delete = models.CASCADE)),
('updater', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete = models.CASCADE)),
],
),
migrations.CreateModel(
name='Shop',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('name', models.CharField(max_length=10)),
('principal', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete = models.CASCADE)),
],
),
migrations.CreateModel(
name='TransferRecord',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('count', models.IntegerField()),
('remark', models.TextField()),
('date', models.DateTimeField(auto_now_add=True)),
('goods', models.ForeignKey(to='kucun.Goods', on_delete = models.CASCADE)),
],
),
migrations.CreateModel(
name='TransferShop',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('name', models.CharField(max_length=20)),
('phonenumber', models.CharField(max_length=15)),
],
),
migrations.AddField(
model_name='transferrecord',
name='transfer_shop',
field=models.ForeignKey(to='kucun.TransferShop', on_delete = models.CASCADE),
),
migrations.AddField(
model_name='transferrecord',
name='updater',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete = models.CASCADE),
),
migrations.AddField(
model_name='goodsshop',
name='shop',
field=models.ForeignKey(to='kucun.Shop', on_delete = models.CASCADE),
),
migrations.AddField(
model_name='goodssellrecord',
name='order',
field=models.ForeignKey(null=True, blank=True, to='kucun.Order', on_delete = models.CASCADE),
),
migrations.AddField(
model_name='goodssellrecord',
name='shop',
field=models.ForeignKey(to='kucun.Shop', on_delete = models.CASCADE),
),
migrations.AddField(
model_name='goodssellrecord',
name='updater',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete = models.CASCADE),
),
migrations.AddField(
model_name='goodsreturnrecord',
name='goods_sell_record',
field=models.ForeignKey(to='kucun.GoodsSellRecord', on_delete = models.CASCADE),
),
migrations.AddField(
model_name='goodsreturnrecord',
name='updater',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete = models.CASCADE),
),
migrations.AddField(
model_name='goodsrecord',
name='shop',
field=models.ForeignKey(to='kucun.Shop', on_delete = models.CASCADE),
),
migrations.AddField(
model_name='goodsrecord',
name='updater',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete = models.CASCADE),
),
migrations.AddField(
model_name='goodsaddrecord',
name='inbound_channel',
field=models.ForeignKey(to='kucun.InboundChannel', on_delete = models.CASCADE),
),
migrations.AddField(
model_name='goodsaddrecord',
name='shop',
field=models.ForeignKey(to='kucun.Shop', on_delete = models.CASCADE),
),
migrations.AddField(
model_name='goodsaddrecord',
name='updater',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete = models.CASCADE),
),
migrations.AddField(
model_name='changecountrecord',
name='goods',
field=models.ForeignKey(to='kucun.Goods', on_delete = models.CASCADE),
),
migrations.AddField(
model_name='changecountrecord',
name='updater',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete = models.CASCADE),
),
]
| 45.922179 | 114 | 0.56321 | 1,086 | 11,802 | 5.94291 | 0.107735 | 0.059498 | 0.060738 | 0.091106 | 0.813294 | 0.803068 | 0.790208 | 0.75767 | 0.749613 | 0.725597 | 0 | 0.003983 | 0.298 | 11,802 | 256 | 115 | 46.101563 | 0.775015 | 0.001779 | 0 | 0.74 | 0 | 0 | 0.112573 | 0.003566 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.012 | 0 | 0.024 | 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 |
cd006c39a3e8d896a586e8c902606f52864fa4bf | 4,860 | py | Python | tests/functional/test_vm_removed.py | atsgen/tf-vcenter-manager | 2cfa07f038b86b3087842c34abb96b15da0b36fb | [
"Apache-2.0"
] | 1 | 2022-03-13T06:31:40.000Z | 2022-03-13T06:31:40.000Z | tests/functional/test_vm_removed.py | atsgen/tf-vcenter-manager | 2cfa07f038b86b3087842c34abb96b15da0b36fb | [
"Apache-2.0"
] | null | null | null | tests/functional/test_vm_removed.py | atsgen/tf-vcenter-manager | 2cfa07f038b86b3087842c34abb96b15da0b36fb | [
"Apache-2.0"
] | 1 | 2020-08-25T12:46:12.000Z | 2020-08-25T12:46:12.000Z | from tests.utils import reserve_vlan_ids
def test_full_remove_vm(controller, database, vcenter_api_client, vnc_api_client, vrouter_api_client,
vm_created_update, vm_removed_update, vn_model_1, vlan_id_pool):
# Virtual Networks are already created for us and after synchronization,
# their models are stored in our database
database.save(vn_model_1)
# In this scenario vCenter should return no relocation
vcenter_api_client.is_vm_removed.return_value = True
# Some vlan ids should be already reserved
vcenter_api_client.get_vlan_id.return_value = None
reserve_vlan_ids(vlan_id_pool, [0, 1, 2, 3])
# A new update containing VmCreatedEvent arrives and is being handled by the controller
controller.handle_update(vm_created_update)
# After VmCreatedEvent has been handled
# proper VM model should exists
vm_model = database.get_vm_model_by_uuid('vmware-vm-uuid-1')
assert vm_model is not None
# And associated VMI model
vmi_models = vm_model.vmi_models
assert len(vmi_models) == 1
vmi_model = vmi_models[0]
assert vmi_model is not None
# And proper VLAN ID should be acquired
assert not vlan_id_pool.is_available(4)
# The VM is not present on any other ESXi
vcenter_api_client.can_remove_vm.return_value = True
# Then VmRemovedEvent is being handled
controller.handle_update(vm_removed_update)
# Check that VM Model has been removed from Database:
assert database.get_vm_model_by_uuid(vm_model.uuid) is None
# Check that VM has been removed from VNC
vnc_api_client.delete_vm.assert_called_once_with(vm_model.uuid)
# Check that VMI Model which was associated with removed VM has been removed
# from Database
vmi_models = database.get_vmi_models_by_vm_uuid(vm_model.uuid)
assert vmi_models == []
# from VNC
vnc_api_client.delete_vmi.assert_called_with(vmi_model.uuid)
# Check that VMI's vRouter Port has been deleted:
vrouter_api_client.delete_port.assert_called_once_with(vmi_model.uuid)
vrouter_api_client.add_port.assert_called_once()
# Check that VLAN ID has been released
vcenter_api_client.restore_vlan_id.assert_called_once_with(vmi_model.vcenter_port)
assert vlan_id_pool.is_available(4)
def test_vm_removed_local_remove(controller, database, vcenter_api_client, vnc_api_client, vrouter_api_client,
vm_created_update, vm_removed_update, vn_model_1, vlan_id_pool):
"""
Same situation as in test_full_remove_vm, but between VmCreatedEvent and VmDeletedEvent VM
changed its ESXi host. It happens during vMotion. So we have to remove that VM and its associated objects
from database and vRouter. But cannot remove them from VNC and vCenter
"""
# Virtual Networks are already created for us and after synchronization,
# their models are stored in our database
database.save(vn_model_1)
# In this scenario vCenter should return info about relocation
vcenter_api_client.is_vm_removed.return_value = False
# Some vlan ids should be already reserved
vcenter_api_client.get_vlan_id.return_value = None
reserve_vlan_ids(vlan_id_pool, [0, 1, 2, 3])
# A new update containing VmCreatedEvent arrives and is being handled by the controller
controller.handle_update(vm_created_update)
# After VmCreatedEvent has been handled
# proper VM model should exists
vm_model = database.get_vm_model_by_uuid('vmware-vm-uuid-1')
assert vm_model is not None
# And associated VMI model
vmi_models = vm_model.vmi_models
assert len(vmi_models) == 1
vmi_model = vmi_models[0]
assert vmi_model is not None
# And proper VLAN ID should be acquired
assert not vlan_id_pool.is_available(4)
# The VM is present on some other ESXi
vcenter_api_client.can_remove_vm.return_value = False
# Then VmRemovedEvent is being handled
controller.handle_update(vm_removed_update)
# Check that VM Model has been removed from Database:
assert database.get_vm_model_by_uuid(vm_model.uuid) is None
# Cannot remove VM from VNC
vnc_api_client.delete_vm.assert_not_called()
# Check that VMI Model which was associated with removed VM has been removed
# from Database
vmi_models = database.get_vmi_models_by_vm_uuid(vm_model.uuid)
assert vmi_models == []
# Cannot remove VMI from VNC
vnc_api_client.delete_vmi.assert_not_called()
# Check that VMI's vRouter Port has been deleted:
vrouter_api_client.delete_port.assert_called_once_with(vmi_model.uuid)
vrouter_api_client.add_port.assert_called_once
# Cannot remove VLAN ID from vCenter
vcenter_api_client.restore_vlan_id.assert_not_called()
# Check that VLAN ID has been restored to local pool
assert vlan_id_pool.is_available(4)
| 39.512195 | 110 | 0.757407 | 752 | 4,860 | 4.602394 | 0.172872 | 0.057209 | 0.046229 | 0.026004 | 0.858422 | 0.845998 | 0.821728 | 0.785322 | 0.746605 | 0.718867 | 0 | 0.005601 | 0.19177 | 4,860 | 122 | 111 | 39.836066 | 0.875509 | 0.385597 | 0 | 0.705882 | 0 | 0 | 0.010936 | 0 | 0 | 0 | 0 | 0 | 0.470588 | 1 | 0.039216 | false | 0 | 0.019608 | 0 | 0.058824 | 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 |
26d550a578c03af48ddaac957ece7b29675dfb82 | 192 | py | Python | nssrc/com/citrix/netscaler/nitro/resource/config/ca/__init__.py | benfinke/ns_python | d651d7aa01d7dc63c1cd435c7b3314d7f5b26659 | [
"Apache-2.0"
] | 2 | 2020-08-24T18:04:22.000Z | 2020-08-24T18:04:47.000Z | nssrc/com/citrix/netscaler/nitro/resource/config/ca/__init__.py | benfinke/ns_python | d651d7aa01d7dc63c1cd435c7b3314d7f5b26659 | [
"Apache-2.0"
] | 1 | 2017-01-20T22:56:58.000Z | 2017-01-20T22:56:58.000Z | nssrc/com/citrix/netscaler/nitro/resource/config/ca/__init__.py | benfinke/ns_python | d651d7aa01d7dc63c1cd435c7b3314d7f5b26659 | [
"Apache-2.0"
] | 6 | 2015-04-21T13:14:08.000Z | 2020-12-03T07:27:52.000Z | __all__ = ['caaction', 'caglobal_binding', 'caglobal_capolicy_binding', 'capolicy', 'capolicy_binding', 'capolicy_caglobal_binding', 'capolicy_csvserver_binding', 'capolicy_lbvserver_binding'] | 192 | 192 | 0.817708 | 19 | 192 | 7.526316 | 0.368421 | 0.41958 | 0.321678 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.046875 | 192 | 1 | 192 | 192 | 0.781421 | 0 | 0 | 0 | 0 | 0 | 0.777202 | 0.528497 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
f872c42d9db26656e29276dd1d9727dd342d36f9 | 14,901 | py | Python | cogs/Automod.py | LookAtYourSKill/discord-bot | 0ce89c627c260fb6cfed3b74cd1d4bed53dea1d0 | [
"MIT"
] | null | null | null | cogs/Automod.py | LookAtYourSKill/discord-bot | 0ce89c627c260fb6cfed3b74cd1d4bed53dea1d0 | [
"MIT"
] | null | null | null | cogs/Automod.py | LookAtYourSKill/discord-bot | 0ce89c627c260fb6cfed3b74cd1d4bed53dea1d0 | [
"MIT"
] | null | null | null | import json
import disnake as discord
from disnake.ext import commands
class automod(commands.Cog):
"""
`Automod which make you life easier`
"""
def __init__(self, bot):
self.bot = bot
@commands.command(name='blacklist_add', aliases=['blacklistadd', 'bladd'])
@commands.has_permissions(manage_messages=True)
async def blacklist_add(self, ctx, text):
"""
Add a word to the blacklist!
- **?bladd [`word`]**
"""
with open('utils/json/active_check.json', 'r') as f:
data = json.load(f)
if data[str(ctx.guild.id)]["Automod"] == 'false':
embed = discord.Embed(
description=f'Diese **Extension (Automod) ist momentan deaktiviert!** Wende dich bitte an **den Owner vom Bot** (LookAtYourSkill#8691)',
color=discord.Color.red())
await ctx.send(embed=embed)
else:
with open("utils/json/blacklist.json", "r") as f:
data = json.load(f)
if text in data[str(ctx.guild.id)]["blacklist"]:
embed = discord.Embed(title='<:close:864599591692009513> **ERROR**',
description=f'`Das Wort ({text})` ist **bereits in der Blacklist!**',
color=discord.Color.red())
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
return
else:
data[str(ctx.guild.id)]["blacklist"].append(text)
with open("utils/json/blacklist.json", "w") as file:
json.dump(data, file, indent=4)
embed = discord.Embed(color=discord.Color.green())
embed.add_field(name='<:open:869959941321011260> **Blacklist Add**',
value=f'Hinzugefügtes Wort:\n'
f'`{text}`',
inline=False)
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
@commands.command(name='blacklist_remove', aliases=['blacklistremove', 'blrm'])
@commands.has_permissions(manage_messages=True)
async def blacklist_remove(self, ctx, text):
"""
Remove a word to the blacklist!
- **?blrm [`word`]**
"""
with open('utils/json/active_check.json', 'r') as f:
data = json.load(f)
if data[str(ctx.guild.id)]["Automod"] == 'false':
embed = discord.Embed(
description=f'Diese **Extension (Automod) ist momentan deaktiviert!** Wende dich bitte an **den Owner vom Bot** (LookAtYourSkill#8691)',
color=discord.Color.red())
await ctx.send(embed=embed)
else:
with open("utils/json/blacklist.json", "r") as f:
data = json.load(f)
if text not in data[str(ctx.guild.id)]["blacklist"]:
embed = discord.Embed(title='<:close:864599591692009513> **ERROR**',
description=f'`Das Wort ({text})` ist **nicht in der Blacklist!**',
color=discord.Color.red())
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
return
else:
data[str(ctx.guild.id)]["blacklist"].remove(text)
with open("utils/json/blacklist.json", "w") as file:
json.dump(data, file, indent=4)
embed = discord.Embed(color=discord.Color.green())
embed.add_field(name='<:open:869959941321011260> **Blacklist Remove**',
value=f'**Entferntes Wort:**\n'
f'`{text}`',
inline=False)
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
@commands.command(name='blacklist_show', aliases=['blacklistshow', 'blshow'])
@commands.has_permissions(manage_messages=True)
async def blacklist_show(self, ctx):
"""
Display the whole blacklist!
- **?blshow**
"""
with open('utils/json/active_check.json', 'r') as f:
data = json.load(f)
if data[str(ctx.guild.id)]["Automod"] == 'false':
embed = discord.Embed(
description=f'Diese **Extension (Automod) ist momentan deaktiviert!** Wende dich bitte an **den Owner vom Bot** (LookAtYourSkill#8691)',
color=discord.Color.red())
await ctx.send(embed=embed)
else:
with open('utils/json/blacklist.json', 'r') as f:
data = json.load(f)
if not data[str(ctx.guild.id)]["blacklist"]:
embed = discord.Embed(color=discord.Color.red())
embed.add_field(name='<:close:864599591692009513> **ERROR**',
value='`Die Blacklist ist leer!`',
inline=False)
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
else:
embed = discord.Embed(color=discord.Color.green())
embed.add_field(name='**Blacklist Words**',
value=f'`{data[str(ctx.guild.id)]["blacklist"]}`',
inline=False)
await ctx.send(embed=embed, delete_after=5)
await ctx.author.send(embed=embed)
await ctx.message.delete()
@commands.command(name='blacklist_clear', aliases=['blacklistclear', 'blclear'])
@commands.has_permissions(manage_messages=True)
async def blacklist_clear(self, ctx):
"""
Remove all words out of the blacklist!
- **?blclear**
"""
with open('utils/json/active_check.json', 'r') as f:
data = json.load(f)
if data[str(ctx.guild.id)]["Automod"] == 'false':
embed = discord.Embed(
description=f'Diese **Extension (Automod) ist momentan deaktiviert!** Wende dich bitte an **den Owner vom Bot** (LookAtYourSkill#8691)',
color=discord.Color.red())
await ctx.send(embed=embed)
else:
with open('utils/json/blacklist.json', 'r') as f:
data = json.load(f)
if not data[str(ctx.guild.id)]["blacklist"]:
embed = discord.Embed(color=discord.Color.red())
embed.add_field(name='<:close:864599591692009513> **ERROR**',
value='`Die Blacklist ist bereits leer!`',
inline=False)
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
else:
data[str(ctx.guild.id)]["blacklist"].clear()
with open("utils/json/blacklist.json", "r+") as file:
json.dump(file, data, indent=4)
embed = discord.Embed(color=discord.Color.green())
embed.add_field(name='<:open:869959941321011260> **Deleted All Blacklisted Words**',
value=f'Deleted Words: `{data}`',
inline=False)
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
@commands.command(name='channel_blacklist_add', aliases=['channelblacklistadd', 'chbladd'])
@commands.has_permissions(manage_channels=True)
async def channel_blacklist_add(self, ctx, id: int):
with open('utils/json/active_check.json', 'r') as f:
data = json.load(f)
if data[str(ctx.guild.id)]["Automod"] == 'false':
embed = discord.Embed(
description=f'Diese **Extension (Automod) ist momentan deaktiviert!** Wende dich bitte an **den Owner vom Bot** (LookAtYourSkill#8691)',
color=discord.Color.red())
await ctx.send(embed=embed)
else:
with open("utils/json/blacklist.json", "r") as f:
data = json.load(f)
if id in data[str(ctx.guild.id)]["channel_blacklist"]:
embed = discord.Embed(title='<:close:864599591692009513> **ERROR**',
description=f'`Das Wort ({id})` ist **bereits in der Blacklist!**',
color=discord.Color.red())
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
return
else:
data[str(ctx.guild.id)]["channel_blacklist"].append(id)
with open("utils/json/blacklist.json", "w") as file:
json.dump(data, file, indent=4)
embed = discord.Embed(color=discord.Color.green())
embed.add_field(name='<:open:869959941321011260> **Channel Blacklist Add**',
value=f'Hinzugefügter Channel:\n'
f'`{id}`',
inline=False)
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
@commands.command(name='channel_blacklist_remove', aliases=['channelblacklistremove', 'chblrm'])
@commands.has_permissions(manage_channels=True)
async def channel_blacklist_remove(self, ctx, id: int):
with open('utils/json/active_check.json', 'r') as f:
data = json.load(f)
if data[str(ctx.guild.id)]["Automod"] == 'false':
embed = discord.Embed(
description=f'Diese **Extension (Automod) ist momentan deaktiviert!** Wende dich bitte an **den Owner vom Bot** (LookAtYourSkill#8691)',
color=discord.Color.red())
await ctx.send(embed=embed)
else:
with open("utils/json/blacklist.json", "r") as f:
data = json.load(f)
if id not in data[str(ctx.guild.id)]["channel_blacklist"]:
embed = discord.Embed(title='<:close:864599591692009513> **ERROR**',
description=f'`Der Channel` `({id})` ist **nicht in der Channel Blacklist!**',
color=discord.Color.red())
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
return
else:
data[str(ctx.guild.id)]["channel_blacklist"].remove(id)
with open("utils/json/blacklist.json", "w") as file:
json.dump(data, file, indent=4)
embed = discord.Embed(color=discord.Color.green())
embed.add_field(name='<:open:869959941321011260> **Channel Blacklist Remove**',
value=f'**Entfernte Channel-ID:**\n'
f'`{id}`',
inline=False)
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
@commands.command(name='channel_blacklist_show', aliases=['channelblacklistshow', 'chblshow'])
@commands.has_permissions(manage_channels=True)
async def channel_blacklist_show(self, ctx):
with open('utils/json/active_check.json', 'r') as f:
data = json.load(f)
if data[str(ctx.guild.id)]["Automod"] == 'false':
embed = discord.Embed(
description=f'Diese **Extension (Automod) ist momentan deaktiviert!** Wende dich bitte an **den Owner vom Bot** (LookAtYourSkill#8691)',
color=discord.Color.red())
await ctx.send(embed=embed)
else:
with open('utils/json/blacklist.json', 'r') as f:
data = json.load(f)
if not data[str(ctx.guild.id)]["channel_blacklist"]:
embed = discord.Embed(color=discord.Color.red())
embed.add_field(name='<:close:864599591692009513> **ERROR**',
value='`Die Channel Blacklist ist leer!`',
inline=False)
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
else:
embed = discord.Embed(color=discord.Color.green())
embed.add_field(name='Channel Blacklist',
value=f'`{data[str(ctx.guild.id)]["channel_blacklist"]}`',
inline=False)
await ctx.send(embed=embed, delete_after=5)
await ctx.author.send(embed=embed)
await ctx.message.delete()
@commands.command(name='channel_blacklist_clear', aliases=['channelblacklistclear', 'chblclear'])
@commands.has_permissions(manage_channels=True)
async def channel_blacklist_clear(self, ctx):
with open('utils/json/active_check.json', 'r') as f:
data = json.load(f)
if data[str(ctx.guild.id)]["Automod"] == 'false':
embed = discord.Embed(
description=f'Diese **Extension (Automod) ist momentan deaktiviert!** Wende dich bitte an **den Owner vom Bot** (LookAtYourSkill#8691)',
color=discord.Color.red())
await ctx.send(embed=embed)
else:
with open('utils/json/blacklist.json', 'r') as f:
data = json.load(f)
if not data[str(ctx.guild.id)]["channel_blacklist"]:
embed = discord.Embed(color=discord.Color.red())
embed.add_field(name='<:close:864599591692009513> **ERROR**',
value='`Die Channel Backlist ist bereits leer!`',
inline=False)
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
else:
data[str(ctx.guild.id)]["channel_blacklist"].remove(data)
with open("utils/json/blacklist.json", "r+") as file:
json.dump(file, data, indent=4)
embed = discord.Embed(color=discord.Color.green())
embed.add_field(name='<:open:869959941321011260> **Deleted All Blacklisted Words**',
value=f'Deleted Words: `{data}`',
inline=False)
await ctx.send(embed=embed, delete_after=5)
await ctx.message.delete()
def setup(bot):
bot.add_cog(automod(bot))
| 50.341216 | 152 | 0.519831 | 1,564 | 14,901 | 4.89578 | 0.088875 | 0.043881 | 0.047538 | 0.047016 | 0.890427 | 0.885464 | 0.885464 | 0.876584 | 0.875408 | 0.839885 | 0 | 0.031625 | 0.350648 | 14,901 | 295 | 153 | 50.511864 | 0.759715 | 0.002416 | 0 | 0.782258 | 0 | 0.032258 | 0.235885 | 0.092468 | 0 | 0 | 0 | 0 | 0 | 1 | 0.008065 | false | 0 | 0.012097 | 0 | 0.040323 | 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 |
3e8dfc2ae136b891ba106fd2603c61cfaedbfaa5 | 6,475 | py | Python | checks/load_feeds_test.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | checks/load_feeds_test.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | checks/load_feeds_test.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | import httpretty
from httpretty import httprettified
import unittest
from checks import html_head, page_content
from checks import load_feeds
from checks.config import Config
from datetime import datetime
from pprint import pprint
@httprettified
class TestFeed(unittest.TestCase):
def test_feed_rss2(self):
"""
Checks RSS 2.0
"""
feed = """<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>Liftoff News</title>
<link>http://liftoff.msfc.nasa.gov/</link>
<description>Liftoff to Space Exploration.</description>
<pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>
<item>
<title>Star City</title>
<link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>
<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
<guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>
</item>
<item>
<description>Sky watchers in Europe, Asia, and parts of Alaska and Canada will experience a <a href="http://science.nasa.gov/headlines/y2003/30may_solareclipse.htm">partial eclipse of the Sun</a> on Saturday, May 31st.</description>
<pubDate>Fri, 30 May 2003 11:06:42 GMT</pubDate>
<guid>http://liftoff.msfc.nasa.gov/2003/05/30.html#item572</guid>
</item>
</channel>
</rss>
"""
feed_url = 'http://example.com/feed.xml'
httpretty.register_uri(httpretty.GET, feed_url,
body=feed,
adding_headers={
"Content-type": "application/rss+xml",
})
# mocking a previous result from some page
results = {
'html_head': {
'http://example.com/': {
'link_rss_atom': ['http://example.com/feed.xml']
}
}
}
config = Config(urls=['http://example.com/'])
checker = load_feeds.Checker(config=config, previous_results=results)
result = checker.run()
pprint(result)
self.assertEqual(result, {
'http://example.com/feed.xml': {
'exception': None,
'title': 'Liftoff News',
'latest_entry': datetime(2003, 6, 3, 9, 39, 21),
'first_entry': datetime(2003, 5, 30, 11, 6, 42),
'average_interval': 340359,
'num_entries': 2,
}
})
def test_empty_feed_rss2(self):
"""
Checks RSS 2.0
"""
feed = """<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>Empty Feed</title>
<link>http://example.com/</link>
<pubDate></pubDate>
</channel>
</rss>
"""
feed_url = 'http://example.com/feed.xml'
httpretty.register_uri(httpretty.GET, feed_url,
body=feed,
adding_headers={
"Content-type": "application/rss+xml",
})
# mocking a previous result from some page
results = {
'html_head': {
'http://example.com/': {
'link_rss_atom': ['http://example.com/feed.xml']
}
}
}
config = Config(urls=['http://example.com/'])
checker = load_feeds.Checker(config=config, previous_results=results)
result = checker.run()
pprint(result)
self.assertEqual(result, {
'http://example.com/feed.xml': {
'exception': None,
'title': 'Empty Feed',
'latest_entry': None,
'first_entry': None,
'average_interval': None,
'num_entries': 0,
}
})
def test_feed_rss2_without_dates(self):
"""
Checks RSS 2.0
"""
feed = """<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>Liftoff News</title>
<link>http://liftoff.msfc.nasa.gov/</link>
<description>Liftoff to Space Exploration.</description>
<item>
<title>Star City</title>
<link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>
<guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>
</item>
<item>
<description>Sky watchers in Europe, Asia, and parts of Alaska and Canada will experience a <a href="http://science.nasa.gov/headlines/y2003/30may_solareclipse.htm">partial eclipse of the Sun</a> on Saturday, May 31st.</description>
<guid>http://liftoff.msfc.nasa.gov/2003/05/30.html#item572</guid>
</item>
</channel>
</rss>
"""
feed_url = 'http://example.com/feed.xml'
httpretty.register_uri(httpretty.GET, feed_url,
body=feed,
adding_headers={
"Content-type": "application/rss+xml",
})
# mocking a previous result from some page
results = {
'html_head': {
'http://example.com/': {
'link_rss_atom': ['http://example.com/feed.xml']
}
}
}
config = Config(urls=['http://example.com/'])
checker = load_feeds.Checker(config=config, previous_results=results)
result = checker.run()
pprint(result)
self.assertEqual(result, {
'http://example.com/feed.xml': {
'exception': None,
'title': 'Liftoff News',
'latest_entry': None,
'first_entry': None,
'average_interval': None,
'num_entries': 2,
}
})
if __name__ == '__main__':
unittest.main()
| 35.382514 | 268 | 0.473977 | 633 | 6,475 | 4.751975 | 0.219589 | 0.058511 | 0.074468 | 0.053856 | 0.822473 | 0.822473 | 0.822473 | 0.822473 | 0.822473 | 0.815824 | 0 | 0.040453 | 0.400618 | 6,475 | 182 | 269 | 35.576923 | 0.734604 | 0.025946 | 0 | 0.736111 | 0 | 0.055556 | 0.527025 | 0.00834 | 0 | 0 | 0 | 0 | 0.020833 | 1 | 0.020833 | false | 0 | 0.055556 | 0 | 0.083333 | 0.027778 | 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 |
e4404f3dfe583ba8463579f9e010124feaef7a0e | 26,769 | py | Python | email_templates/postmark_formatted_email2.py | wantsomechocolate/3Muses | f195bb4d8f71be09467981e0aea7726951bf1c9a | [
"BSD-3-Clause"
] | null | null | null | email_templates/postmark_formatted_email2.py | wantsomechocolate/3Muses | f195bb4d8f71be09467981e0aea7726951bf1c9a | [
"BSD-3-Clause"
] | 26 | 2015-01-02T13:35:48.000Z | 2015-06-10T14:39:07.000Z | email_templates/postmark_formatted_email2.py | wantsomechocolate/3Muses | f195bb4d8f71be09467981e0aea7726951bf1c9a | [
"BSD-3-Clause"
] | null | null | null | ## Imports
from postmark import PMMail
import os, ast
## Get the API Key
try:
POSTMARK_API_KEY=os.environ['POSTMARK_API_KEY']
except KeyError:
with open('/home/wantsomechocolate/Code/API Info/api_keys.txt','r') as fh:
text=fh.read()
api_keys=ast.literal_eval(text)
POSTMARK_API_KEY=api_keys['postmark']['test']['POSTMARK_API_KEY']
## Make the html
#html_email="<div background-color=pink>Is pink here again?</div>"
html_email="""
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ThreeMusesGlass</title>
</head>
<body bgcolor="#f6f6f6" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; margin: 0; padding: 0;">
<!-- body -->
<table class="body-wrap" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 100%; margin: 0; padding: 20px;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;"><td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;"></td>
<td class="container" bgcolor="#FFFFFF" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; display: block !important; max-width: 600px !important; clear: both !important; margin: 0 auto; padding: 20px; border: 1px solid #f0f0f0;">
<!-- content -->
<div class="content" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; max-width: 600px; display: block; margin: 0 auto; padding: 0;">
<table style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 100%; margin: 0; padding: 0;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;"><td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">
<h2 style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 28px; line-height: 1.2; color: #000; font-weight: 200; margin: 40px 0 10px; padding: 0;">Thank you for shopping with ThreeMusesGlass</h2>
<h5 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Below are the details of your order:</h5>
<h3 class="header_text" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 22px; line-height: 1.2; color: #000; font-weight: 200; margin: 40px 0 10px; padding: 0;">
<img class="header_icon" src="https://s3.amazonaws.com/threemusesglass/icons/ProductIcon.png" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; max-width: 100%; width: 30px; height: 30px; margin: 0; padding: 0;" />
Product Details
</h3>
<table class="summary_table" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 100%; border-top-style: solid; margin: 0; padding: 0;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; background-color: #F7A3F7; margin: 0; padding: 0;" bgcolor="#F7A3F7"><th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Product</h4>
</th>
<th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Total Weight (oz)</h4>
</th>
<th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Total Cost ($)</h4>
</th>
</tr><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; background-color: #FAE3FA; margin: 0; padding: 0;" bgcolor="#FAE3FA"><td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">Product Name</p>
</td>
<td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">3</p>
</td>
<td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">$25.00</p>
</td>
</tr><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; background-color: #FAD4FA; margin: 0; padding: 0;" bgcolor="#FAD4FA"><td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">Total</p>
</td>
<td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">3</p>
</td>
<td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">$25.00</p>
</td>
</tr></table><h3 class="header_text" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 22px; line-height: 1.2; color: #000; font-weight: 200; margin: 40px 0 10px; padding: 0;">
<img class="header_icon" src="https://s3.amazonaws.com/threemusesglass/icons/AddressIcon.png" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; max-width: 100%; width: 30px; height: 30px; margin: 0; padding: 0;" />
Address Details
</h3>
<table class="summary_table" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 100%; border-top-style: solid; margin: 0; padding: 0;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; background-color: #F7A3F7; margin: 0; padding: 0;" bgcolor="#F7A3F7"><th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Street Address Info</h4>
</th>
<th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Local Address Info</h4>
</th>
<th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Country</h4>
</th>
</tr><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; background-color: #FAE3FA; margin: 0; padding: 0;" bgcolor="#FAE3FA"><td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">123 Street Apt F12</p>
</td>
<td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">Croton Falls, NY 09813</p>
</td>
<td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">United States</p>
</td>
</tr></table><h3 class="header_text" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 22px; line-height: 1.2; color: #000; font-weight: 200; margin: 40px 0 10px; padding: 0;">
<img class="header_icon" src="https://s3.amazonaws.com/threemusesglass/icons/ShippingIcon.png" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; max-width: 100%; width: 30px; height: 30px; margin: 0; padding: 0;" />
Shipping Details
</h3>
<table class="summary_table" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 100%; border-top-style: solid; margin: 0; padding: 0;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; background-color: #F7A3F7; margin: 0; padding: 0;" bgcolor="#F7A3F7"><th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Carrier-Rate</h4>
</th>
<th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Shipping Weight (Oz)</h4>
</th>
<th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Estimated Shipping Cost</h4>
</th>
</tr><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; background-color: #FAE3FA; margin: 0; padding: 0;" bgcolor="#FAE3FA"><td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">USPS - First</p>
</td>
<td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">3</p>
</td>
<td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">1.93</p>
</td>
</tr></table><h3 class="header_text" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 22px; line-height: 1.2; color: #000; font-weight: 200; margin: 40px 0 10px; padding: 0;">
<img class="header_icon" src="https://s3.amazonaws.com/threemusesglass/icons/PaymentIcon.png" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; max-width: 100%; width: 30px; height: 30px; margin: 0; padding: 0;" />
Payment Details
</h3>
<table class="summary_table" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 100%; border-top-style: solid; margin: 0; padding: 0;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; background-color: #F7A3F7; margin: 0; padding: 0;" bgcolor="#F7A3F7"><th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Name</h4>
</th>
<th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Brand-Last4 (Oz)</h4>
</th>
<th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Expiration (MM/YYYY)</h4>
</th>
</tr><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; background-color: #FAE3FA; margin: 0; padding: 0;" bgcolor="#FAE3FA"><td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">Mr. John Doe</p>
</td>
<td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">Visa - 4242</p>
</td>
<td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">12 / 2020</p>
</td>
</tr></table><h3 class="header_text" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 22px; line-height: 1.2; color: #000; font-weight: 200; margin: 40px 0 10px; padding: 0;">
<img class="header_icon" src="https://s3.amazonaws.com/threemusesglass/icons/SummaryIcon.png" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; max-width: 100%; width: 30px; height: 30px; margin: 0; padding: 0;" />
Summary
</h3>
<table class="summary_table" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 100%; border-top-style: solid; margin: 0; padding: 0;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; background-color: #F7A3F7; margin: 0; padding: 0;" bgcolor="#F7A3F7"><th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Shipping Cost</h4>
</th>
<th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Product Cost</h4>
</th>
<th class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 33%; margin: 0; padding: 10px 0;">
<h4 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Total Cost</h4>
</th>
</tr><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; background-color: #FAE3FA; margin: 0; padding: 0;" bgcolor="#FAE3FA"><td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">1.93</p>
</td>
<td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">40</p>
</td>
<td class="padding" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; text-align: center; width: 33%; margin: 0; padding: 10px 0 0px;" align="center">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">41.93</p>
</td>
</tr></table><p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;"> </p>
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">Thanks, have a lovely day. Come back soon!</p>
</td>
</tr></table></div>
<!-- /content -->
</td>
<td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;"></td>
</tr></table><!-- /body --><!-- footer --><table class="footer-wrap" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 100%; clear: both !important; margin: 0; padding: 0;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;"><td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;"></td>
<td class="container" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; display: block !important; max-width: 600px !important; clear: both !important; margin: 0 auto; padding: 0;">
<!-- content -->
<div class="content" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; max-width: 600px; display: block; margin: 0 auto; padding: 0;">
<table style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; width: 100%; margin: 0; padding: 0;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;"><td align="center" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 1.6; color: #666; font-weight: normal; margin: 0 0 10px; padding: 0;">You have recieved this email because a purchase was made at ThreeMusesGlass with this email address. If you think this email was sent in error: <a href="#" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; color: #999; margin: 0; padding: 0;"><unsubscribe style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;">Click Here</unsubscribe></a>.
</p>
</td>
</tr></table></div>
<!-- /content -->
</td>
<td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; margin: 0; padding: 0;"></td>
</tr></table><!-- /footer --></body>
</html>
"""
## Send the message
message = PMMail(api_key=POSTMARK_API_KEY,
subject="Testing Formatted Emails",
sender="James@3musesglass.com",
#to='wantsomechocolate@gmail.com',
#to='jmcglynn@codegreensolutions.com',
to='rmcglynn01@gmail.com',
html_body=html_email,
tag="Test")
message.send()
| 121.677273 | 687 | 0.657029 | 3,937 | 26,769 | 4.458725 | 0.064008 | 0.061012 | 0.101686 | 0.162698 | 0.91341 | 0.909707 | 0.907713 | 0.903099 | 0.903099 | 0.901048 | 0 | 0.073537 | 0.141993 | 26,769 | 219 | 688 | 122.232877 | 0.690744 | 0.00706 | 0 | 0.618357 | 0 | 0.458937 | 0.984568 | 0.025933 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.028986 | 0 | 0.028986 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
e48faed7adef35081efc930394f1a6b9be9c450f | 158 | py | Python | pyinterpolate/io_ops/__init__.py | NarayanAdithya/pyinterpolate | 3a8166ad0ca884f29be1afe789eff4ccfc891f71 | [
"BSD-3-Clause"
] | 61 | 2018-08-15T17:16:12.000Z | 2021-09-06T09:25:49.000Z | pyinterpolate/io_ops/__init__.py | NarayanAdithya/pyinterpolate | 3a8166ad0ca884f29be1afe789eff4ccfc891f71 | [
"BSD-3-Clause"
] | 70 | 2018-06-16T19:12:49.000Z | 2021-09-16T16:28:48.000Z | pyinterpolate/io_ops/__init__.py | NarayanAdithya/pyinterpolate | 3a8166ad0ca884f29be1afe789eff4ccfc891f71 | [
"BSD-3-Clause"
] | 7 | 2019-10-16T05:48:12.000Z | 2021-07-06T14:09:29.000Z | from .get_points_within_area import get_points_within_area
from .prepare_areal_shapefile import prepare_areal_shapefile
from .read_data import read_point_data | 52.666667 | 60 | 0.911392 | 25 | 158 | 5.24 | 0.48 | 0.137405 | 0.229008 | 0.290076 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.06962 | 158 | 3 | 61 | 52.666667 | 0.891156 | 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 |
e49da288efe277ac11763e7424dbf44f8e33460d | 61,495 | py | Python | UI/resource_rc.py | Logmytech/youtube-dl-QT | 1497297719a95c4f70fbfa32e0fa4e38cdd475dc | [
"MIT"
] | 1 | 2018-03-17T17:27:36.000Z | 2018-03-17T17:27:36.000Z | UI/resource_rc.py | Logmytech/youtube-dl-QT | 1497297719a95c4f70fbfa32e0fa4e38cdd475dc | [
"MIT"
] | null | null | null | UI/resource_rc.py | Logmytech/youtube-dl-QT | 1497297719a95c4f70fbfa32e0fa4e38cdd475dc | [
"MIT"
] | 2 | 2020-03-27T00:30:39.000Z | 2020-04-25T03:22:24.000Z | # -*- coding: utf-8 -*-
# Resource object code
#
# Created: اتوار فروری 16 22:13:34 2014
# by: The Resource Compiler for PyQt (Qt v4.8.4)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = "\
\x00\x00\x39\x7b\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x01\x25\x00\x00\x00\x50\x08\x06\x00\x00\x00\x5f\xff\x63\xb1\
\x00\x00\x00\x85\x7a\x54\x58\x74\x52\x61\x77\x20\x70\x72\x6f\x66\
\x69\x6c\x65\x20\x74\x79\x70\x65\x20\x65\x78\x69\x66\x00\x00\x78\
\xda\x55\x8e\xdb\x09\xc4\x40\x08\x45\xff\xad\x22\x25\xf8\x76\x2c\
\x67\x09\x09\x6c\x07\x5b\x7e\x94\x99\x65\xc8\xf9\xd0\xcb\x45\x0e\
\xc2\xf5\xfb\xde\x70\x34\x84\x0c\x6a\x31\x3c\xdd\xb1\xd0\xd4\xe4\
\x4f\x85\x81\x13\x41\x24\x46\xea\x5d\x73\xb2\xb6\x50\x25\xde\x35\
\x08\xcf\xe0\x39\x02\x75\x1f\xea\xea\xff\x98\xf8\xf0\x3b\x34\xc2\
\xcd\x4f\x3f\xb9\xec\x7c\x09\x89\xf6\x2c\x51\x5b\xb1\xdf\xc8\x2d\
\x61\x5b\x49\xde\xbd\xbd\xdd\x08\x0f\x40\xdf\x2c\x1a\x5a\x90\xb9\
\x44\x00\x00\x09\xea\x69\x54\x58\x74\x58\x4d\x4c\x3a\x63\x6f\x6d\
\x2e\x61\x64\x6f\x62\x65\x2e\x78\x6d\x70\x00\x00\x00\x00\x00\x3c\
\x3f\x78\x70\x61\x63\x6b\x65\x74\x20\x62\x65\x67\x69\x6e\x3d\x22\
\xef\xbb\xbf\x22\x20\x69\x64\x3d\x22\x57\x35\x4d\x30\x4d\x70\x43\
\x65\x68\x69\x48\x7a\x72\x65\x53\x7a\x4e\x54\x63\x7a\x6b\x63\x39\
\x64\x22\x3f\x3e\x0a\x3c\x78\x3a\x78\x6d\x70\x6d\x65\x74\x61\x20\
\x78\x6d\x6c\x6e\x73\x3a\x78\x3d\x22\x61\x64\x6f\x62\x65\x3a\x6e\
\x73\x3a\x6d\x65\x74\x61\x2f\x22\x20\x78\x3a\x78\x6d\x70\x74\x6b\
\x3d\x22\x58\x4d\x50\x20\x43\x6f\x72\x65\x20\x34\x2e\x34\x2e\x30\
\x2d\x45\x78\x69\x76\x32\x22\x3e\x0a\x20\x3c\x72\x64\x66\x3a\x52\
\x44\x46\x20\x78\x6d\x6c\x6e\x73\x3a\x72\x64\x66\x3d\x22\x68\x74\
\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\
\x31\x39\x39\x39\x2f\x30\x32\x2f\x32\x32\x2d\x72\x64\x66\x2d\x73\
\x79\x6e\x74\x61\x78\x2d\x6e\x73\x23\x22\x3e\x0a\x20\x20\x3c\x72\
\x64\x66\x3a\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6f\x6e\x20\x72\
\x64\x66\x3a\x61\x62\x6f\x75\x74\x3d\x22\x22\x0a\x20\x20\x20\x20\
\x78\x6d\x6c\x6e\x73\x3a\x65\x78\x69\x66\x3d\x22\x68\x74\x74\x70\
\x3a\x2f\x2f\x6e\x73\x2e\x61\x64\x6f\x62\x65\x2e\x63\x6f\x6d\x2f\
\x65\x78\x69\x66\x2f\x31\x2e\x30\x2f\x22\x0a\x20\x20\x20\x20\x78\
\x6d\x6c\x6e\x73\x3a\x74\x69\x66\x66\x3d\x22\x68\x74\x74\x70\x3a\
\x2f\x2f\x6e\x73\x2e\x61\x64\x6f\x62\x65\x2e\x63\x6f\x6d\x2f\x74\
\x69\x66\x66\x2f\x31\x2e\x30\x2f\x22\x0a\x20\x20\x20\x65\x78\x69\
\x66\x3a\x50\x69\x78\x65\x6c\x58\x44\x69\x6d\x65\x6e\x73\x69\x6f\
\x6e\x3d\x22\x32\x39\x33\x22\x0a\x20\x20\x20\x65\x78\x69\x66\x3a\
\x50\x69\x78\x65\x6c\x59\x44\x69\x6d\x65\x6e\x73\x69\x6f\x6e\x3d\
\x22\x38\x30\x22\x0a\x20\x20\x20\x74\x69\x66\x66\x3a\x49\x6d\x61\
\x67\x65\x57\x69\x64\x74\x68\x3d\x22\x31\x22\x0a\x20\x20\x20\x74\
\x69\x66\x66\x3a\x49\x6d\x61\x67\x65\x48\x65\x69\x67\x68\x74\x3d\
\x22\x38\x30\x22\x2f\x3e\x0a\x20\x3c\x2f\x72\x64\x66\x3a\x52\x44\
\x46\x3e\x0a\x3c\x2f\x78\x3a\x78\x6d\x70\x6d\x65\x74\x61\x3e\x0a\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\
\x3c\x3f\x78\x70\x61\x63\x6b\x65\x74\x20\x65\x6e\x64\x3d\x22\x77\
\x22\x3f\x3e\x02\xd8\x46\x8d\x00\x00\x00\x04\x73\x42\x49\x54\x08\
\x08\x08\x08\x7c\x08\x64\x88\x00\x00\x20\x00\x49\x44\x41\x54\x78\
\xda\xed\x7d\x7b\x90\x64\x57\x79\xdf\xef\x3b\xb7\xbb\xa7\xe7\xfd\
\xd2\xae\x76\x57\xda\xd5\x3e\x14\x69\x31\x2b\xa8\x02\x51\xa1\x10\
\x12\xc8\x8a\x25\x1e\x32\x98\x50\x50\x48\x80\xcb\xf0\x07\xb1\x49\
\x05\xff\x13\x92\x32\x10\x57\x99\xb2\x29\xbb\x12\x48\x5c\xae\x08\
\xb0\x4d\x15\x09\x38\x12\x65\xca\x59\x12\x1c\x03\x82\x4a\x21\xb4\
\x94\xd1\x83\x80\x76\xb5\x5a\x81\x66\xd1\x63\x67\x56\x3b\xfb\x98\
\xd9\x79\x75\x4f\xf7\x3d\xe7\xcb\x1f\xe7\x71\xcf\xbd\xd3\x7d\x1f\
\x3d\xdd\xb3\xb3\x72\x9f\xaa\xd6\x6a\xba\xef\xfb\x9e\xef\x77\x7e\
\xdf\xef\x7c\xe7\xfb\x88\x99\x91\xd2\xec\x8f\x84\x7e\xeb\xb7\x7e\
\xeb\xb7\x2d\x68\xa2\xff\x08\xfa\xad\xdf\xfa\xed\x6a\x02\xa5\x3e\
\x43\xea\xb7\x7e\xeb\xb7\x3e\x53\xea\xb7\x7e\xeb\xb7\x3e\x28\xf5\
\x5b\xbf\xf5\x5b\xbf\x5d\x55\xa0\xc4\xfd\x47\xd5\x6f\xfd\xd6\x6f\
\x5b\xd1\x4a\xed\x7e\x58\xb9\xfd\x0e\x4e\x28\x4a\x9c\x0a\x59\x9b\
\x52\x9f\xda\x1c\xc0\xff\x9a\x08\x20\x02\x83\x00\x01\x10\x13\x38\
\x20\x30\x04\x88\x00\x26\x01\x08\x02\x13\x01\x42\x80\xc8\xfc\xbf\
\xf9\x1b\xe6\x6f\x16\x02\x20\x61\xbe\xb7\xfb\xe9\x8f\xfe\x7f\x00\
\x24\xc0\x44\xfa\x18\x42\x98\x7d\x28\xf6\x71\xdf\x09\x61\xae\xc9\
\xfc\x06\x7d\x5d\x00\x45\xd7\x00\xfd\x2f\x09\xc0\x3d\x54\x77\x2c\
\x7b\xaf\x14\x7f\x04\x64\x9f\xb8\xf9\x1f\x06\x40\xe6\x5f\xfb\x37\
\x00\xb2\xb3\xa7\xcc\xfa\x63\x7f\x63\x05\x62\x00\xca\x7e\xc7\x20\
\x56\xfa\x37\xa5\x00\xa5\x40\xcc\x60\x66\x90\xf9\xb0\xdd\x46\x29\
\xbd\x9f\xb2\xfb\x30\x48\x29\xfd\xbb\x62\x00\x4a\xff\x6b\xb6\x23\
\x66\xc0\x6e\xc7\x0c\x56\x0a\xa4\xa2\xbf\xc1\xfa\x58\x30\xdb\xb9\
\xef\xdc\x07\xee\x3c\xdd\xed\x57\x5d\xe8\x83\x9b\xdf\xf7\xe2\xc8\
\x23\x8f\x5c\xd3\x87\x9a\x2e\x80\x52\xa1\xf7\xb3\xe9\x8e\x43\xd9\
\x5f\x5b\x63\x24\x63\xc0\x60\x40\x01\x10\xba\x43\x10\x18\xac\x34\
\xde\xb0\x52\x0e\x88\x00\x06\xb3\x02\x41\x00\xa4\x8d\x98\x61\x37\
\x24\x7d\x0a\x66\x30\x4b\x7d\x4a\x45\x60\x11\x6d\xaf\x0d\x4a\x01\
\x44\x20\x21\xc0\x60\x00\x81\x03\x03\x56\x4a\x83\x8f\x8a\x00\x90\
\x94\xbe\x56\x16\x64\xc0\x86\x40\x20\x40\xe9\x2b\x8d\xee\x01\x06\
\xb4\xa0\x8f\xe1\x07\x60\x30\xe9\x73\x93\x77\xdb\xac\xff\x63\xf6\
\x74\x7f\xbb\xdd\x94\x32\xb8\xc5\xe6\x9e\x18\x04\x0b\x1c\x70\xa0\
\x00\x05\x07\x0c\xf6\x5f\x36\xe0\x42\x8a\x63\xe0\x13\x81\x1d\x0c\
\x78\x69\x70\x8a\xc0\x24\x02\x24\xb0\xd2\x97\x9c\x38\xb6\xbe\x66\
\x06\xc3\x7e\xa7\xaf\x9f\xdc\xb5\x73\x8f\xfa\x55\x11\x40\xa1\x4d\
\xf7\x5f\x9a\x9c\x44\xf9\x3d\xef\x81\xb8\xe1\x06\xf0\xe2\x22\x1a\
\x7f\xfd\xd7\xe0\xe5\xe5\x3e\xca\x74\x0d\x94\xb6\x62\x80\x29\x74\
\x50\x06\xb3\x01\x1f\x6b\xcc\x64\x46\x58\x04\xfa\x5b\xe1\x1b\xb0\
\x35\x08\xcb\x50\x22\x10\x23\x00\xac\xcc\xf6\x50\x80\x22\xed\xc9\
\x0a\x63\x7c\x0a\x60\xa1\x00\x16\x00\x14\x04\x04\x5c\x3c\x17\x11\
\x48\x48\xb0\x32\x8c\x4b\x30\xc0\x02\x24\x58\xb3\x36\x25\x35\x2b\
\x82\x30\xa0\x62\x58\x14\x1b\xb6\x04\x36\x78\x64\x00\x8e\x04\x88\
\xd8\x81\x14\x91\xb6\x71\x72\x98\xe4\x20\x48\x1b\xb1\x43\xa7\xe8\
\x5e\xa1\x8c\xd1\x73\xb4\x9d\x65\x4c\xa4\x2c\x40\x21\x62\x4a\x96\
\x0d\xf9\xa0\xe1\xc0\xc7\xb0\x1c\x44\x00\x65\x59\x13\x3c\x66\xa5\
\xff\x56\x71\x86\xc4\x06\xfc\x1c\xbf\xb3\x2c\x0c\xde\xf3\x83\x03\
\x34\x06\x3c\x76\xc7\x5b\x04\x3e\x3d\x42\x3e\x06\x68\x60\x00\xe2\
\xe6\x9b\x11\xdc\x74\x13\xf8\xfc\x79\xa0\x52\xe9\x23\x4c\xaf\x40\
\xa9\xf6\x99\xcf\xc4\xfe\x1e\xfc\xe3\x3f\xee\xf1\x68\xd6\xfa\xa0\
\x44\x86\x15\x59\x9b\x54\xac\x5d\x36\x30\x88\x35\x13\x61\x01\x67\
\xd1\xa4\x94\x76\xb3\xec\xc8\x8c\xc0\x19\x07\x91\x31\x38\x88\x68\
\x7b\x56\x1a\x3c\x04\x81\x94\xd0\x0c\x4b\x08\x40\x38\x0a\xa6\xb7\
\x97\x86\xa1\x09\x05\x52\x04\x40\x82\x2d\x7c\x08\x32\x5e\x9c\xd2\
\xf7\xc1\xd6\x18\x44\xf4\x1d\x91\x66\x30\x16\x01\xc9\x5c\x1f\x01\
\x50\x1a\xb8\x22\x38\x52\xe6\x89\x90\x63\x17\xe4\x79\x73\xd6\xa0\
\xf5\x33\x40\x8c\xd9\x38\x96\xc7\xd0\xe7\x33\x2c\x86\x65\xc4\x5a\
\x22\x46\x64\xc1\xca\x80\x19\x7c\xc0\x52\x9e\xdb\xa5\xcc\x25\x25\
\x5d\x30\x73\x7e\x65\x5d\x44\x8e\xd8\x24\x2b\x07\x9e\x80\x0f\x80\
\x3e\x20\x51\x41\xe9\xb2\xe8\x68\xd8\x25\xd7\x2c\xf6\xa7\x47\x6d\
\x09\x60\x25\x81\x66\x13\x5c\xaf\x83\x1b\x0d\xfd\x2c\xfa\xed\x0a\
\x30\xa5\xad\x6c\xae\x43\x70\xa4\xd3\xb3\x05\xab\xc8\xc3\x83\x52\
\x20\x41\x91\x61\x5a\xa3\x26\x8b\x5a\x46\x73\xb1\xe3\xb9\x62\x87\
\x39\x64\x29\x0a\xd8\xb8\x65\x06\x01\x84\x71\xe1\xc8\xb8\x86\x6c\
\x18\x96\xd5\x86\x14\x34\x5b\x52\xec\xbe\x23\xc3\xe6\x58\x6a\xb6\
\x66\x91\x84\x9c\x7e\x44\xe6\xfa\xe3\x62\x12\x7b\xe0\xcb\x46\x85\
\xb2\x77\x48\x20\xe3\x96\xf9\xf7\x86\xb8\x2b\x66\x40\x85\xd9\xd7\
\x93\xa2\xbf\x05\x34\xd3\xd1\x6e\x9e\x32\xae\xb0\x65\x40\x2a\x62\
\x44\x8a\x5b\xe8\x3f\xd6\x95\x53\x71\x30\xb1\xec\x09\xd6\x45\x8e\
\x5f\xa3\x3d\x37\x29\x8e\xc9\x63\xc4\xe8\x00\x90\x90\xad\x41\xe6\
\xed\x4c\x99\xfb\x50\xca\x9f\x89\xdf\x56\x56\xd1\x7c\xe8\x21\xd0\
\xd8\x18\xb8\x56\x03\xd7\x6a\x50\x43\x43\xd3\xa7\x7e\xfc\xc3\xfe\
\x44\x51\x8b\x76\xf8\x4d\x6f\xa1\xe2\xa0\x94\xf6\xc2\x92\x0b\x50\
\xda\x6e\xdb\xa9\x7f\xd7\x4e\xfc\xd6\x46\xcf\xc6\xd5\x00\x09\x6d\
\x0c\x14\x31\x0c\xcb\x9c\x94\xfb\x2b\xa1\x4b\x19\x61\x99\x19\x20\
\xa1\x0c\x51\x12\xc6\x34\x0c\xd8\x08\xc3\x1a\x48\x18\x80\x30\xa2\
\xba\x1d\xf9\x59\x68\xf0\x20\x02\x91\xd5\x9f\xa4\x01\x43\xbd\xad\
\x33\x60\x21\xc0\x52\x82\x48\x38\xc0\x01\x08\x42\x68\x97\x94\x89\
\xbd\xc7\x68\x98\x96\x75\xbf\x3c\x4d\xc9\x20\xae\x06\x35\x44\x6c\
\x88\x0c\xc9\x01\x54\x8c\x31\x91\xd1\x72\x1c\xfb\xf1\x80\x85\x3d\
\xc1\x99\xac\x18\xae\x2c\x78\x19\x91\xdc\xd3\x94\xc8\x8a\xe7\x4a\
\x03\x0c\xb7\xd0\x98\xc8\x00\xbc\x03\x48\x78\x6e\x1d\x22\x62\x44\
\xe6\x7f\x08\x1c\x13\xed\x7b\x44\xb0\xd3\x37\xa6\x6e\x0d\x94\x00\
\xaf\xad\x41\x9e\x38\x11\xff\x7d\x68\xa8\x8f\x3e\x5d\x65\x4a\x94\
\xf7\x37\x6b\x3d\x9b\xed\x29\xb1\xe9\xb6\x14\x8c\xb2\x8c\xc1\x8c\
\xca\x4e\x80\x89\x58\x84\xfb\x37\xf2\xfd\x9c\x41\x68\x7b\x53\x86\
\x15\x09\xcf\x95\xf0\xc6\x6c\x27\x81\xd8\xed\x01\x22\xa5\x75\x21\
\x26\xa3\x47\x09\x23\xdf\x6a\xb7\x0f\x02\x80\x32\x82\x3a\x49\xe7\
\xaa\xb1\x94\xda\x0d\xb4\x6e\x0c\x19\x94\x91\x86\x51\xc5\xbd\x00\
\x63\xbc\x64\xe8\x04\xc5\xf4\x16\x8d\x69\xca\x5d\x24\xb3\x15\xa1\
\x10\x09\xd8\xd6\xe8\xad\x4b\xc6\xd8\x28\x3c\x2b\x65\x00\x0b\x0e\
\xa0\x2c\xbb\x22\x95\x60\x57\x8e\x4d\x19\x6d\x0e\xde\x0c\x5a\xe4\
\x7d\x9a\x67\xee\x0b\xda\x1c\x5d\xb3\xb9\x0e\x22\xb6\x1e\xa9\x03\
\xa9\x6d\x46\xc3\x3b\x06\x42\x9a\x9c\x44\xf9\xbd\xef\x85\xd8\xbf\
\x5f\x0b\xdd\x5f\xfe\x32\x20\x65\x1f\x65\x7a\xe1\xbe\xc5\x34\xa4\
\xcd\x00\x4f\xd6\x7b\x4f\xfb\x9d\x5a\x4d\x98\xb0\x9b\x41\x63\x8a\
\x98\x85\x9d\x95\xb2\x10\xe3\x66\xd8\xe0\x8b\xb0\xd6\xed\x50\x06\
\x48\xd8\x88\xd6\x26\x84\xc0\x1a\x8e\x50\x66\xd6\x2d\x02\x29\xe7\
\x76\xb9\x6b\x31\xe0\xa3\x04\x48\x28\x0d\x14\x44\x91\x28\x4d\x42\
\xeb\x5b\x16\x1c\xad\xdb\x60\x8f\x25\xe0\x42\x02\x9c\x8e\x4d\x76\
\x76\x8a\xb4\x81\x13\x79\xae\x10\x1c\xe8\x90\xe7\x16\x39\xd0\x75\
\x2c\x47\x6b\x49\x7a\x62\xd1\x13\xa2\x59\x3a\xdd\xc7\x4d\xef\x5b\
\x06\xa8\x3c\x36\xa5\xbc\xd9\x3b\xa5\xc1\x37\x0a\x33\x48\xcc\xbc\
\x79\xda\x96\x7b\xf6\x96\x75\xf9\x93\x15\xca\x5c\x13\x7b\xe1\x0c\
\xdb\xa2\x6d\x5e\x1c\xa5\x81\x01\x04\x37\xdd\x04\x71\xd3\x4d\xe0\
\xf9\x79\x60\x60\x00\x58\x5b\xeb\xa3\xcc\xd6\x69\x4a\x1d\x8c\x2c\
\x59\x9b\x53\x81\xe3\xd9\x8e\x4f\xc6\x10\xec\xd4\x9b\xd1\x68\xdc\
\x88\x6e\xe3\x43\xed\xd4\xbd\x10\x9e\xd0\xad\x59\x8a\x62\x06\x09\
\x09\x70\xa0\x5d\x29\xeb\x72\x10\x81\x0d\x93\x22\x3b\xfb\x67\xf6\
\xd7\xda\x91\x72\x0c\x0c\x4e\xdc\xb6\x94\x47\x38\x61\x1e\x24\xa3\
\x98\x29\x77\xdd\x66\x17\x22\x03\x1a\x64\x69\x50\x5c\x36\x43\xa4\
\xc9\x38\x01\x5c\xb1\x13\x65\xc8\x73\xa5\x1c\x8b\xf4\xc0\x4a\xb3\
\x27\xe5\x66\xbc\xa2\x59\x39\x15\x9b\x79\x73\x20\xa1\x22\x56\x14\
\x85\x13\x78\xee\x1e\x22\x46\x15\x13\xd5\x93\xfa\x93\x15\xb5\x81\
\xb8\x18\x6e\x19\xdd\x2b\xd0\x98\x58\x4a\x2d\x72\xaf\xae\x82\xd7\
\xd7\xfb\x2c\x69\xeb\x41\x89\x3a\x07\xa7\x6e\x48\x4e\x80\x17\xe7\
\x42\xbe\xbf\xe5\x34\x23\xa7\x11\xb1\x9e\x96\xd7\x20\x64\x42\x0a\
\x14\x1b\x60\x12\x91\x2b\xa8\x94\x73\xb3\x1c\x40\xfa\x71\x4a\x64\
\x62\xa0\xc8\xcc\xa6\x05\x51\x48\x11\x19\xb0\x61\x65\x34\x21\x96\
\x2e\x70\x12\x82\x9c\x9b\xa9\xb7\xf7\x80\xcc\x89\xe5\xca\x5c\xb3\
\xa7\x81\x99\xf8\x2b\xf2\xc0\xc6\xfd\xa6\x78\x83\x4e\x66\x63\x80\
\x98\x23\x35\xcd\x81\x8f\x0b\xaa\x8c\x82\x18\x1d\xa8\x6d\x88\x29\
\x72\x22\x55\xfc\x3b\x77\x5e\xef\x58\x48\x0a\xec\x48\xcc\xde\x25\
\xdc\x34\xa5\x52\xa6\xff\xb7\x34\x5a\xb2\xfb\xae\xdf\xca\x0a\x9a\
\x0f\x3e\x08\x8c\x8f\x03\x6b\x6b\xe0\x5a\x4d\xb3\xee\x7e\xdb\x2a\
\x50\xea\x12\xed\xdd\x04\xb6\x45\xbb\x58\x03\x15\xde\x2c\x55\x04\
\x58\x9e\xe4\xe4\xb1\x29\x03\x02\xcc\x00\x64\x34\x2b\xa7\x94\x0b\
\x68\x74\x46\xe8\xcf\x9c\x91\x00\x0b\xa3\x2f\x49\x03\x38\xd0\x91\
\xe1\x64\x62\x96\x60\x05\x70\xab\x77\x49\x68\x01\x9c\xf5\x81\xc8\
\xb1\x26\xeb\xa6\x19\xe1\xdd\x5c\x33\x79\x8c\xca\x7d\x87\x44\x18\
\x80\x1f\xd5\xed\x31\x25\x56\xf1\x19\xb7\x0d\xe0\xe2\xdc\x3d\x03\
\x5e\x6c\x99\x95\x82\x0d\x34\x8d\x07\x46\x5a\x9d\x49\xc5\xa2\xc6\
\x9d\xbb\xa8\xe2\x7a\x12\xbc\x30\x85\x08\x89\x3c\x76\x95\x18\x43\
\xba\xed\x42\x5d\x19\x6c\x33\xbd\xb0\x56\x83\x7c\xe6\x99\xbe\xd0\
\x7d\x65\x41\x89\x37\x2e\x8f\xe8\x19\xb6\x6d\xec\x69\xe4\xb9\x71\
\x6c\x15\x55\xd6\x02\xb4\x73\x6f\x62\xdc\x43\x69\x77\xcc\x05\x52\
\x6a\x46\xc0\x24\xcc\x2c\x92\x89\xc8\xf6\x3c\x44\x12\x76\x36\x4e\
\x33\x2d\x37\xfb\xc5\xda\x3d\x63\x65\x67\xd2\x14\x58\x1a\x4d\x09\
\x88\x22\xb9\x0d\x30\x59\x2d\xc5\x89\xd7\x64\x23\xba\xe3\x2a\x97\
\x15\xac\xed\x1f\x14\x63\x42\x8e\x86\x78\x61\x50\x9e\xb0\xef\xcd\
\x6c\x45\xe2\xb6\xbe\x1e\x0d\x1e\x1e\x40\x39\xb1\x1a\x51\x30\xa3\
\xc7\x6c\x88\x95\xd1\x94\x3c\x77\x90\x93\xec\x47\xb9\x63\x3a\xb1\
\x3e\xe6\x0e\x7a\x0c\x8f\x13\xaf\xb2\x53\x64\xc9\x03\x38\x57\x88\
\x6c\xd1\xe4\x24\xca\xef\x7f\x7f\x14\xd1\xfd\xa5\x2f\x01\x61\xd8\
\x47\x99\x5e\x80\x52\xfb\xe0\xc9\x2e\x01\x52\xae\x91\x2d\x5d\x21\
\x77\x51\xdc\x10\x4e\xec\xb5\x02\xb8\x8b\x89\x21\x72\xae\x98\xf3\
\x50\xc8\xb0\x1e\xbb\x76\xcd\x06\x48\x32\x1c\xf3\x89\x66\xdf\x8c\
\x3d\x49\xf6\xc4\x69\x8e\x96\x99\x08\x0b\x28\x36\x72\x5b\x18\x26\
\x24\x22\xab\xa5\x98\x9a\xed\x74\x24\x78\xb2\x92\x15\xb7\x99\x29\
\x3a\xa7\x3f\x9b\xe8\x19\xbd\x9d\xf2\x27\x07\xbf\x9c\x08\x6e\x84\
\x01\x96\xc8\x4d\xe3\x84\x0e\xc4\xf0\x98\x91\x9d\x95\x4b\xe8\x52\
\x16\xa0\x92\x51\xe0\xda\x25\x96\x9e\x3b\xed\x69\x49\x9e\x6b\x17\
\xd3\x96\x72\x75\x02\x6a\xdd\x31\xa8\x17\x7d\xab\x4b\xa0\x54\xad\
\x22\x38\x74\x08\xe2\xe6\x9b\xb5\xd0\x5d\xa9\xf4\x41\xe9\xca\xb8\
\x6f\x5b\xc1\x92\x72\x74\x3c\x1b\x53\x4d\x6c\x66\xe2\x6c\xec\x90\
\x72\xd1\xd6\x6e\x4d\x5c\xd2\x30\x1c\xf3\xd0\x11\xe0\xc4\x06\xa4\
\x94\x8e\xc2\x76\x02\xb9\xf1\x01\x49\x08\xa7\x2d\xd9\xb8\x6b\x5f\
\x1c\xb7\x33\x6c\x5a\x3c\x8f\x94\x5d\x8e\xfb\x91\x06\xa3\x7c\x5f\
\x26\x8a\x09\xb8\xf4\xbe\xf7\xf5\xe4\x51\x4f\x7f\xf5\xbf\x61\xe9\
\xee\xdf\x40\x73\xcf\x9e\xb6\xdb\xec\xf8\xd2\x97\x36\x2e\x41\x21\
\xb8\xa5\x26\xe7\x7e\xff\xf7\xdb\xee\x5b\x79\xfe\x79\x4c\x7e\xe3\
\x1b\x20\x23\x8c\xaf\xef\xda\x85\xe6\xfe\xfd\x08\x27\x26\x20\x27\
\x27\x01\x00\xeb\x07\x0e\xb4\xdd\xbf\x7c\xf6\x2c\x44\xbd\x8e\xca\
\xe9\xd3\x28\x2d\x2e\xa2\x7a\xf2\x64\xae\x2e\x72\xf1\x43\x1f\x4a\
\x3d\x6e\x9e\x36\xf0\xab\x5f\x61\xea\xeb\x5f\xef\xb8\x6b\x72\x18\
\xea\xa0\xc9\xe5\x65\xf0\xda\x5a\x47\x42\x77\x79\xa0\x8a\x81\xc1\
\x21\x90\x08\x50\x1e\xa8\x02\x60\x94\x4a\x15\x04\xe5\x72\x6c\xbb\
\xe6\x7a\x1d\x4a\x49\xc8\x66\x13\x61\xb3\x89\xf5\xda\x2a\x9a\xeb\
\x75\xaf\x4f\x15\x6f\x53\xbb\xf7\x62\x60\xb0\xbd\xbb\x39\x37\x73\
\x2a\xfe\x6c\x88\xb6\x3f\x28\xfd\xee\xf3\xcf\xe3\xdb\x8b\x8b\x6d\
\x7f\xbf\x77\x62\x02\x5f\xdc\xbf\x3f\xf5\xa5\x3f\x30\x3f\x8f\xcf\
\xcd\xcd\xb5\x3d\xc6\x07\xa7\xa7\xf1\xa7\x7b\xf7\x6e\xdc\xdf\x78\
\x45\x4b\x32\xc4\xff\xbe\xb0\x88\xe3\x6b\x6b\x78\xb1\xd1\xc0\x8f\
\x96\x96\x30\x5e\x2a\xe1\x96\xa1\x21\xec\xab\x56\x71\xcb\xc8\x08\
\xee\xbf\x76\x97\xb7\xbf\x9d\x42\x37\x34\xc5\x82\x8d\xd2\x22\xf9\
\x07\x7f\xf6\xff\x70\xec\xd2\xa5\xb6\xd7\x33\x73\xef\xbd\xf1\x80\
\x4e\x27\x6c\x6a\x86\x71\xe8\x7f\x1e\x6d\xbb\xef\x9b\x76\x5e\x8b\
\xff\xfe\x96\x3b\xbc\x58\x2a\x1d\xb3\x09\xea\xdd\xd0\x2e\x55\xb6\
\xa1\x48\xa9\x74\x04\x96\x99\xce\xd7\x8b\x89\x55\x06\xd3\x89\xc6\
\x07\x56\xda\xad\x53\xcc\x58\xbe\xf3\x4e\x34\x0a\x80\x45\x73\xf7\
\xee\x18\x70\x89\x77\xbe\x13\x43\xc7\x8e\x61\xe8\xa7\x3f\x85\xa8\
\xd7\xdb\x45\xb1\x75\x47\x8a\x62\x86\xf4\x44\x7d\x6b\x74\xb9\xcf\
\xb5\xb2\x82\xc6\x83\x0f\x82\x46\x46\x80\x5a\x4d\x03\x53\x10\x14\
\xba\x86\xd1\xa9\x1d\xa9\xc0\xe0\x83\x97\x76\x5b\xdc\x50\x82\xb0\
\xd9\xc4\xea\xd2\x02\xd6\x2e\x2f\x9a\xc9\x8e\xee\x82\x87\xf2\xbc\
\x0c\xea\x21\x38\x75\x15\x94\x6e\x1f\x1d\x4d\x05\xa5\x1f\x2d\x2f\
\x67\xbe\xf4\x1f\x65\xac\xaa\x7e\xfb\xf8\xb8\x3b\x86\xff\x30\x08\
\xc0\x17\xcf\x9d\xc3\x7f\x3d\x77\x0e\x97\x13\x23\xd4\xe5\x30\xc4\
\xa3\x4b\x4b\xc0\xd2\x12\x30\x3f\x8f\x3f\x7d\xf1\x45\xfc\xfb\x7d\
\xfb\x70\xff\xb5\xd7\x9a\xa9\x7a\x61\xa6\xbf\x29\x9a\x74\x83\x0e\
\x1b\xa0\xcc\x17\x65\xce\x45\x46\x8b\xf2\xe2\x89\xb2\xc1\x85\x11\
\xca\x10\x82\xa2\x19\x1a\x45\xd4\xd3\xf8\x1d\x29\x43\x64\x14\x8b\
\x80\x54\x12\xca\xb8\x70\x02\x5a\x5f\x12\x84\xb8\xeb\xd7\xde\xb2\
\xd1\x34\x69\x51\x82\x6e\x18\x42\xb5\x8a\x95\xbb\xee\xc2\xea\x6d\
\xb7\x61\xfc\x9b\xdf\xc4\xc0\xe9\xd3\x1b\xde\x7b\xd7\x40\x09\x40\
\x68\xfa\x96\x20\x9b\x80\x22\x3f\x30\x71\xad\x06\x3e\x75\x6a\x93\
\x42\x77\xe7\xef\xbe\x54\x2e\x63\x7c\x7a\x27\x46\x27\xa6\xb1\x30\
\x7f\x16\xb5\xd5\xe5\x82\xe0\x91\x7e\xee\x50\x4a\x90\x99\x41\x16\
\x2e\xb4\xa6\xfb\xc3\x43\x07\xc1\x93\xed\x9d\xf4\xfb\xa7\xa7\xf1\
\xb9\xb9\xb9\x0d\xa0\xe0\xc0\x41\x4a\xfc\x6c\x6d\x0d\xb7\x0c\x0e\
\x42\x10\x41\x78\xae\x0c\xe5\x00\xa5\xbd\x95\x0a\xde\x38\x32\xa2\
\x41\xc9\xec\x4f\x00\x96\x95\xc2\x7d\x33\x33\x38\x9e\x33\x50\xed\
\x72\x18\xe2\x53\xa7\x4f\xe3\xa9\x95\x15\x7c\xee\xd0\x21\x40\x99\
\xf5\x60\x4e\xe4\xb6\xeb\xd3\x28\xb3\x8b\xc8\x50\x9a\xfd\xf4\x12\
\x13\x21\xf5\x8b\x22\x27\x06\xa5\x8f\xcc\x4a\x2a\xb3\xf0\x97\x20\
\x28\x9e\xce\xa4\x17\xad\x19\x6a\x06\x93\xba\x8d\x94\x10\xcc\x08\
\xcc\xfd\x2b\xa3\xa3\x89\x1c\x1d\x57\x01\x08\x59\x41\x28\x23\xf0\
\x77\x09\x60\xb9\x5a\xc5\xe2\x87\x3e\x84\xe1\x6f\x7f\x1b\x43\x3f\
\x7d\x12\xc2\xe4\xab\xda\xbc\x29\x27\xaf\x9d\xcd\x64\xab\x76\xa5\
\x85\x75\xc9\xf3\x0a\xdd\x1f\xf8\x80\x8e\xe8\x5e\x58\x40\xe3\x81\
\x07\xae\x88\xa6\x24\x82\x00\xd3\xbb\xaf\xc7\xd2\xa5\xf3\xb8\x7c\
\x61\x1e\xe4\x4d\xde\x6c\x06\x44\xc2\x30\xd4\x76\x67\x00\x49\x78\
\xe1\x0e\xdd\x04\xa7\x0e\x82\x28\xd2\x4f\xfe\xce\x89\x89\xd4\xdf\
\x2d\x5b\x0a\x15\x43\x82\xa1\x6c\xdc\x50\x0e\x96\x74\xcf\xf8\x38\
\x9a\xcc\x08\xcd\x47\xb2\xc2\xa2\x94\xb8\xef\xb9\xe7\x72\x03\x92\
\xdf\x1e\x9a\x9f\xc7\x1f\xcc\xcc\x40\x49\x05\xc9\xac\xe9\xa9\x99\
\x75\x8a\xaf\x60\x4f\x37\xe0\x30\x0c\x21\x95\x04\x4b\x05\xa5\x18\
\x90\x0a\xac\xf4\x27\x0b\x94\x9a\x4d\xbd\xaf\x92\x0a\xca\x25\x52\
\xeb\xdd\xea\xf2\x46\x0e\xa6\xb4\x2e\x25\x9a\x4a\xa1\xa9\x24\x94\
\x94\x3a\x28\x90\xa3\xf5\x71\x99\xf7\x14\x2a\x84\xac\x20\x6d\x14\
\x7b\x17\xdb\xda\x5d\x77\xa1\x31\x31\x09\x09\xc4\xfa\x4e\x37\x52\
\x9f\x30\x33\x1a\x4a\xb9\x3e\x26\x99\xa1\x90\x7f\x35\x0c\x55\xab\
\x08\x0e\x1e\x44\xf0\xaa\x57\x21\xb8\xf1\x46\x1d\xd1\xdd\x91\x3e\
\xda\x9d\x36\x36\xb5\x03\x13\x3b\x77\x43\x9a\xf7\xa7\x0c\xd3\x6d\
\xf5\xfe\xdd\xcc\x6b\x5a\xdf\x69\x36\x11\x86\xa1\xe9\xef\xa6\xbf\
\xf6\x02\x54\xbb\x7d\xc0\x37\x8f\x8c\xa4\xfe\x7e\x6c\x79\x19\x0d\
\x66\x84\x60\x48\x93\x05\xc3\x3e\xa4\xa7\x6a\xb5\xd4\x7d\xdf\x3d\
\x31\x81\x86\x52\x68\x98\x0e\x23\x41\xf8\xe0\xcc\x0c\x8e\x67\xec\
\x97\xd6\xbe\x31\x3f\x8f\x2f\x9e\x79\x49\x1b\x10\x33\xa4\x49\x88\
\xc6\x8a\xc1\x39\xb0\xa1\x11\x86\x68\x9a\x17\xa5\x94\x31\x60\xbb\
\x74\x23\xe3\x00\x8a\x19\x0d\x29\xdd\xfe\x2c\x25\x38\x94\x91\x4b\
\xd8\x83\x16\x3a\x80\x49\xd9\x46\x29\x34\x95\x82\x94\x6c\xd7\xf2\
\x9a\xd4\x27\x2a\x07\x53\x62\x34\x58\xa1\xa9\xf4\x71\xba\xae\xfb\
\x0c\x0e\x62\xf5\xae\xbb\x10\x2a\x33\x90\xe4\x71\x29\x0b\x30\xa5\
\x26\x33\x9a\x49\x40\xca\x79\x7c\x6e\x36\x75\x34\xf7\xc2\x02\x78\
\x65\x05\x68\x36\x0b\x83\x62\xb7\xdb\xe8\xc4\x14\x86\xc7\x26\xf4\
\x7b\x57\x11\x4b\xee\xe4\x5c\xa1\xe9\xeb\xaa\x87\x80\xd4\x75\x4d\
\x09\x00\xde\x31\x31\x81\xf1\x33\x67\xda\xba\x70\xff\xb8\xba\x8a\
\x8b\x61\x88\xa9\x52\x49\x6b\x36\x2c\x20\x8c\x9b\xf0\x68\x0a\x53\
\x3a\x5c\xad\xe2\xda\x72\x19\x4d\x66\x94\x0c\x5f\xfb\xca\xf9\xf3\
\x38\xb1\x09\x40\xb2\xed\xaf\xce\x9e\xc5\xdd\x53\x53\xd8\x3f\x38\
\x88\x80\x08\x08\x18\x02\xc2\xe5\x20\xca\xf4\xb3\x85\x00\x41\xe8\
\xac\x4a\x25\xa5\x17\xda\x8a\x28\x23\x52\xaa\xb0\xaa\x42\x13\x3a\
\xa0\x10\x20\xd0\xc7\x52\x3d\x74\xdf\xa4\x44\x25\x83\xef\x4a\x29\
\x01\x22\x04\x80\x4e\x07\xcc\x7e\x3a\x95\x2c\xa6\x04\x84\x66\xcd\
\x9c\xc8\xe1\xfe\x36\x3f\xfd\xe9\x88\x69\x0c\x0e\x42\x1c\x39\x02\
\x71\xcf\x3d\xc0\xe0\x60\xfb\x67\xfe\xea\x57\xa3\xf1\xf0\xc3\x28\
\x2f\x2e\xea\x3c\xa0\x39\x5c\x07\x9e\x99\xc9\xde\x66\x76\xd6\x19\
\x6b\x60\x5c\x4f\xce\xa5\x0d\x7a\x42\xf7\xdf\xfc\x8d\x16\xba\xeb\
\x75\x1d\xd1\x1d\x04\x5d\x7d\x7f\x33\xcf\x3e\x8d\x30\x0c\x51\x2a\
\x95\x30\x3c\x3c\x86\x1d\xbb\x76\x23\x28\xa5\x9b\xf1\xe4\xce\xdd\
\x58\x5a\xbc\x04\x96\x12\x01\x33\x10\x04\x4e\x2a\x28\xa6\x47\x4a\
\xa3\x39\x2a\x04\xec\x2d\x35\xba\x12\x42\x77\x6a\x92\xb7\x36\x62\
\xf4\x43\x29\x33\x56\x3f\x5e\x59\xc1\xdb\xc6\xc7\x21\x40\x10\x64\
\x42\x7b\x98\x53\xdd\xb7\x5f\x1f\x1b\x43\x68\xc4\x53\x02\x70\xb6\
\xd9\xc4\x7f\x7a\xf9\xe5\xcc\x6b\x7f\xc3\xf0\x30\x4e\xd5\xeb\x58\
\x4e\x99\x9e\x5d\x92\x12\x7f\x35\x37\x87\xcf\x1e\x38\x60\xd2\xd9\
\x32\xd8\xc6\x2e\x21\x9b\x55\x94\xc0\x90\x80\x16\x76\xa5\x36\x64\
\x3f\x1e\x2a\x0d\x94\xc2\xa6\x44\x59\x30\x54\x20\xa0\x48\x99\xb4\
\x4d\x84\xe1\x7f\xf8\x0e\x98\xb5\x2b\xd1\x54\x4a\xbb\x13\x66\xa4\
\x1b\x7c\xcf\x7b\xda\x77\x9c\x73\xe7\xb0\xfe\xe8\xa3\x1b\xe2\x9a\
\x84\x0d\xe4\x34\xa9\x46\x28\x83\xc1\x11\x33\x14\x91\x1e\x11\x7d\
\xed\x26\xc7\xec\x9b\x62\xa5\xf7\xcd\xd3\xd1\x3d\xcd\x86\x6a\x35\
\xf0\xe3\x8f\x43\xcd\xcd\xa1\xf4\xf1\x8f\xa7\x33\xd4\x83\x07\x41\
\x4f\x3e\x19\x5b\x10\x90\xea\x92\x7e\xe5\x2b\x1b\xf4\x0f\x6a\xe1\
\x36\x38\x5d\xaf\xb0\xb1\xb1\x5e\xf7\xf6\xcb\x5f\x6e\x52\xe8\x4e\
\x6f\x17\xce\x9d\x73\xd7\x75\x91\xe6\x31\x77\xe6\x79\xec\xbf\xf1\
\x30\xa6\xae\xd9\xd1\x76\x9f\x20\x08\x30\xb5\x73\x37\x2e\x9c\x3d\
\xe3\xee\x5f\x09\xa1\x27\x31\x0a\xdc\xa3\x94\x3a\xb0\x4f\x08\x2d\
\x53\x70\x8f\x26\x64\xba\xc4\x94\x22\xf1\x9b\x00\xdc\x37\x3d\x9d\
\x0a\x4a\x27\x6b\x35\xfc\xc6\xd8\x18\x94\x37\x1a\x3d\x55\x4f\x67\
\x3c\x6f\x1d\x1d\xd5\x7e\xb1\x79\x88\x5f\xb9\x70\x21\x75\xfb\xc3\
\xd5\x2a\xfe\x7c\xdf\x3e\x8c\x04\x02\x4b\x52\xe1\x8b\xf3\xf3\xf8\
\x5f\x29\x33\x83\xdf\xbc\x70\x01\x1f\xd9\x75\x2d\x0e\x0c\x0e\x45\
\x9d\x56\x72\xae\x17\x25\x58\x40\x41\x19\x71\xd4\xc6\x2f\x65\x9b\
\x8a\x35\x60\xa9\x18\x81\x65\x22\x26\x56\xaa\x34\x7b\x06\x4a\x49\
\x28\xc9\x08\x59\x6a\xa0\x54\x0c\x95\x61\xea\x5c\xaf\x23\x7c\xfe\
\xf9\x28\x00\xd2\xbc\x13\x69\x84\xeb\x3c\x33\x7b\xec\x32\x70\x9a\
\x37\x6a\x22\xd7\x89\x72\xa6\xad\xb5\x51\xec\x79\x25\x14\x0b\x9a\
\xd6\x48\xe6\xe6\xa0\x1e\x79\x04\xe2\x8e\x3b\xda\x0f\x06\x93\x93\
\x6e\xa2\xa3\x94\xf7\x3c\x88\x27\xc6\x49\x66\xe6\x26\xa2\xd8\x75\
\x14\x1b\xff\x09\x34\x35\x85\xca\x7d\xf7\x41\x1c\x38\x00\x5e\x58\
\xc0\xfa\x5f\xfc\x45\xd7\x85\x6e\x37\xa0\x98\x3e\xaa\xa4\xc2\xe9\
\x67\x4f\xa2\x5a\x7d\x1d\x86\x46\x46\xdb\xee\x37\x31\xbd\x03\xe7\
\xe7\xce\x40\x9a\x19\x34\xcb\x82\x8b\x88\xd4\xdc\x22\xff\x55\x2f\
\x80\xa9\x3b\x9a\x12\xc7\x6f\xea\x96\xa1\x21\xec\x4d\xc9\x4f\xfc\
\x83\xa5\x25\x28\x63\x28\xd6\x6f\x7f\x74\x79\xa5\xed\xf6\x77\x8e\
\x8e\x62\xb7\x09\x1e\x23\x00\xb3\x8d\x06\xbe\x99\x02\x7a\xa3\x41\
\x80\x3f\xdf\xbb\x17\xc3\x42\x40\x31\x30\x22\x04\x3e\xb9\x6b\x17\
\xf6\x54\xca\xa9\xb7\xf1\x9d\x4b\x0b\x08\x95\x84\x94\xd2\xf8\xcc\
\x39\x8c\x90\x15\x14\x6b\x7f\xdd\xad\xc6\x97\xd2\x24\xd1\xcf\x16\
\x85\xa1\xa4\xce\x02\xa9\x58\xa7\x53\x85\x82\xcd\x93\x4d\x4c\x10\
\x60\x04\x4c\x08\x98\x51\x62\x46\x39\x07\xfd\xb0\x29\x73\x03\x00\
\x25\x82\xde\x17\x40\xc9\x73\x7d\x33\xc4\xae\xf8\xda\xb9\x44\xc2\
\xb7\x4c\xff\xad\x90\x29\x6b\x76\x22\x8c\xcb\x54\x22\x42\x99\x08\
\xc1\xe9\xd3\xe9\xa7\xd9\xb3\xc7\xe8\x8a\x40\xb6\xd2\x65\x3a\xbb\
\x01\x9d\xc0\x9c\xcb\x7e\x4a\x42\xe8\x0f\x11\x4a\xf6\x37\x63\xf8\
\x45\x98\x04\x55\xab\x10\x07\x0f\x42\x1c\x3e\x0c\x71\xf0\x60\x67\
\x42\x77\xd6\x39\x4c\x70\xae\x10\x84\x52\x10\x20\x08\x04\x82\x20\
\xc0\xf3\xbf\x7c\x36\x5b\xf8\x9e\x9c\x86\x94\xa6\x7f\x73\xef\x98\
\xce\xf6\x00\x25\x2f\x89\x9f\x1d\x61\xde\x3e\x3e\xde\x76\xf3\xb9\
\x66\x13\x2f\x35\x1a\x50\x46\xa8\x54\x40\xaa\x58\x7d\xeb\xf0\x70\
\xac\x03\xff\x20\x63\x96\xee\xc3\x53\x53\x18\x0e\x02\x78\xd9\xb1\
\x11\x00\xf8\xf0\x74\x7a\xa5\x9b\x87\x17\x16\x20\x95\x16\xbb\x95\
\xd4\x33\x62\xb9\x46\x2e\xb7\xda\x5e\xc5\x4a\x0a\x65\x32\x2d\xbf\
\xbc\x90\x2d\x6b\x24\xa3\xd2\x46\xa4\x94\x9e\x9a\x67\x65\x8c\x15\
\xa8\x50\xf6\xab\x20\x66\x04\x4a\x21\x60\x20\x50\x8c\x0a\x11\xca\
\xd0\x06\x1f\xe4\x79\xe9\xae\x32\x89\x97\x10\x4e\x25\x17\xd9\x76\
\xcf\xc8\xac\xdb\x54\x26\x42\xc5\x7e\x32\x40\xc9\x78\xca\x1a\x98\
\x72\x18\x17\x79\xfd\x27\xf0\xce\x35\x20\x44\x74\x4e\x22\x94\x85\
\x40\x99\xe2\xcf\x2a\x37\x93\x68\x34\xc0\x97\x2f\x83\x2f\x5c\x00\
\x5f\xbe\x0c\x34\x1a\xbd\x31\x5a\x41\x08\x84\x06\xa3\x72\xa9\x8c\
\x72\xb9\x04\x25\x43\x5c\x3a\x7f\x2e\x75\xbf\xa1\xd1\x31\x84\x52\
\x42\x4a\xa5\x67\x55\x53\x66\xe3\xae\x64\xeb\x52\x92\xb7\x8d\x2f\
\xff\x1d\x13\x13\xf8\xcb\xf3\xe7\xdb\x6e\xf7\xd8\xea\x2a\xf6\x57\
\x2a\x66\x99\x16\xe3\x58\x1b\xa0\x19\x0d\x02\xdc\x39\x3a\xea\x28\
\xab\x00\xf0\xf0\xd2\x52\xba\xab\x37\x36\x16\x03\x24\x3b\x42\xde\
\x3d\x36\x86\x3f\x3b\x7b\xb6\xed\x7e\xa7\x6a\x35\xbc\x50\xaf\x63\
\x7f\xb5\x0a\x11\x04\x89\x34\x22\x6d\x3a\x88\x9f\xda\xc4\xe5\x07\
\xb7\x4b\x52\x72\xba\x4a\x26\xdd\x6e\x54\x63\xcd\x94\x91\x33\x10\
\x50\x21\xd2\xac\x92\x08\x0a\x84\xac\xae\xae\x83\x1d\x05\x02\x68\
\x0d\x2e\x80\x76\xdd\x04\xe9\x95\x81\xeb\x59\xd0\xc2\x51\x96\x03\
\xf2\x33\xcf\x51\x91\xc4\x6c\x05\x16\x9d\x59\x06\x63\xc1\xc0\x80\
\xc0\x7a\xc6\xd1\xd9\x30\xa5\x20\x87\xab\x68\xc1\x2f\x00\x1c\xe8\
\x58\x86\xe6\xbb\x6a\xc2\x5c\x4f\x60\xfa\x4d\x2b\x37\x2f\x8f\xd0\
\xcd\xf5\x3a\xb8\x5e\xef\xba\xd0\x6d\x97\x36\x09\x11\x20\x08\x02\
\x94\x82\x00\x42\xe8\x6a\x3b\xb5\x95\x15\x60\xc7\xb5\xed\x3d\x88\
\xf1\x09\x80\x08\x52\x4a\x08\x61\xe2\xfc\x0a\xc4\x61\x5d\x5d\x4c\
\x69\x03\x30\x31\x5e\x93\xe1\xc2\x3d\xbe\xba\xaa\x1d\x15\x66\x1c\
\xaf\xd5\xda\xce\xd6\xdd\x39\x3a\x8a\xd1\x20\x70\x00\x73\xb6\xd1\
\xc0\xc9\x14\x56\x75\x73\xb5\x8a\xdd\xe5\x72\xc4\x90\x3c\x97\x60\
\xba\x54\xc2\x3f\x37\xac\xab\x5d\x7b\x7a\x6d\x55\x53\x5b\xa5\x34\
\x53\xca\xe3\x82\xc1\x4b\x8e\xe6\xb1\x8b\xac\x98\x1e\x9d\x17\x8e\
\xa3\x02\x91\xa6\x24\x12\xa9\x28\x9d\x48\x09\x8c\x80\x19\x65\x00\
\x15\x64\x33\x25\x30\x9b\x42\x2b\x8c\x80\xb5\x01\x56\x60\x3e\xe6\
\x59\x64\x2e\xb2\x8f\x25\x70\x8b\x27\x72\x63\x55\x64\x78\xca\x3f\
\x88\xf9\xef\x2a\x20\x82\x48\x99\x7d\x03\x00\xf5\xdc\x73\xce\x6d\
\x53\x39\x99\x52\x12\xfc\x92\xcc\xa8\x9c\x00\xc6\xa2\x42\x30\xd7\
\xeb\x50\x33\x33\x90\x3f\xff\x39\xd4\xb3\xcf\x02\xeb\xeb\x3d\x70\
\xdf\x34\x53\xd2\x6c\x49\x03\x53\x10\x04\x28\x97\xcb\xa8\xad\x2e\
\x65\xee\x3f\x50\x1d\xd2\x71\x71\x8a\x5d\x5c\xdc\x76\x63\x4b\xa2\
\xfb\x80\x04\x90\x59\x72\xf1\x81\xe9\xe9\x74\x50\x32\x22\x77\x5a\
\xe0\xe3\x1b\x86\x87\x63\xd4\xfb\xb1\x8c\x20\xc9\x9b\xab\xd5\x98\
\x2b\x19\xc4\xdc\x02\xe0\xb6\x8c\x38\xaa\x53\x6b\x35\xed\x12\x28\
\x95\xeb\x45\x11\xc7\x57\xd8\x27\x6b\xa1\xe5\x71\x93\xdc\xb6\x16\
\x98\x8c\x3b\xe7\xc0\xc5\x8c\xf0\x01\x80\x12\x72\x5e\x13\x14\x04\
\x69\x40\x0b\x18\x06\xdc\x80\x72\x1e\xb8\xf0\x2b\xda\x26\x92\xc4\
\x51\x0f\xa2\x53\x1c\xa3\xf5\x5c\x6d\x75\xe8\x50\xfa\x25\x1a\x4d\
\x91\x3b\x38\x8f\xd5\x92\x84\x01\xa0\x92\x07\x44\x91\xdb\x46\x31\
\xa6\x94\xeb\xf8\x53\x53\x18\xf8\xc4\x27\x30\xf8\x85\x2f\xa0\xfa\
\x87\x7f\x08\x1a\x1b\xeb\x99\xe1\x6a\xb6\x44\x0e\x94\xec\x67\x6d\
\x25\x5d\xda\x18\x1c\x1e\xd6\x13\x26\xca\x73\xdf\x5e\x91\x9a\x52\
\x9b\x97\xff\xce\x14\x5d\x69\x59\x4a\x3c\x53\xaf\x43\x31\xe3\x44\
\xbd\xde\x72\x9b\x3d\xe5\x32\xee\x1c\x1d\x8d\xd1\xef\xd9\x0c\x3f\
\xdd\x17\xc4\x7d\x96\x54\x26\x42\x49\x04\x98\xcc\x88\xe9\x38\xb5\
\xb6\x06\x25\xa5\x09\xcc\xcb\x41\x0b\x3c\xf0\x89\x8a\x34\x46\x95\
\x3e\x32\x9f\x95\x5f\xe2\x1a\x51\x81\x47\x32\xf9\xb2\xc9\x18\xa9\
\x50\xca\x01\x4b\x36\xd0\x19\xb6\x64\xd6\xae\x95\x48\x2f\x9d\x28\
\x1b\x57\x2e\x17\x28\xc5\x32\x47\xb2\x29\x4f\xd7\xfd\xa2\x91\xb4\
\x61\x40\xd3\x60\xb0\xfe\xba\xd7\xa5\x02\x92\xf2\xaa\x86\x70\x81\
\x73\xb9\x0f\xc5\x05\x76\x1f\xa8\x84\xc9\x32\x4a\x5c\xb0\xb2\x5c\
\xb5\x0a\x71\xc3\x0d\x10\x37\xdd\x04\x71\xc3\x0d\x3d\x11\xba\xad\
\x2d\x90\xa9\xa2\xe3\x74\x32\x21\x50\x0a\x02\x34\x33\x66\xb1\x2b\
\x95\xaa\x0b\x2d\x51\x36\x98\xf2\x6a\xd4\x94\x8a\xc6\x29\xd9\x9e\
\xb2\x6f\x60\x00\x47\x06\x07\xdb\x06\x38\x3e\xb6\xba\x8a\x23\x83\
\x83\x6d\xdd\xb1\x5f\x37\x23\x8d\x3f\x8a\x3e\xd3\x06\xc0\x7c\xa6\
\xe4\x58\x52\x62\x54\x14\x44\xb8\x21\xa3\xa3\xcc\x36\x9b\x50\xd0\
\x80\xa4\x38\xc8\xb5\x00\x55\xbb\x6e\x14\x15\x1f\x50\x46\x14\xca\
\x13\x04\xe9\x92\xa5\x91\x4b\xad\xc2\x2e\x27\x93\x72\xb2\x54\xe0\
\x6f\x9b\x39\xd2\x18\xf7\x4f\xe9\x9c\xd8\x14\x08\x04\xa4\xbf\x77\
\xa5\xca\x73\x5d\x98\xfe\xd7\x95\x02\x07\x6d\x49\xf5\x91\xb5\xdb\
\x6e\x43\xe3\xe0\xc1\xb6\xbf\x87\x8f\x3c\x52\xd8\x51\xdc\x00\x7e\
\x26\xb4\x55\xa4\xb9\xb3\x94\xf3\x31\xd9\x45\xdc\xeb\xeb\xe0\xc5\
\x45\xf0\xfc\x3c\x78\x71\xb1\x27\x42\xf7\x06\x77\xd2\xd5\x17\xd4\
\xff\x66\xb9\xb2\x03\xd5\xaa\x0e\xad\x51\x51\xac\x11\xf7\x20\x00\
\xb2\xe7\xa0\xd4\x91\x0b\x67\x84\xb4\xb7\x4f\x4c\xb4\x05\xa5\x53\
\xb5\x1a\x14\xd0\x1e\x94\x0c\x4b\xf2\xb5\x80\x33\x39\x5e\xb4\x2f\
\x70\x07\x9e\x1b\x47\x00\x26\x32\x98\xd2\x5c\xa3\xe1\xdc\x17\xa6\
\x1c\x4c\xc9\xa4\xcb\x25\x5b\x9e\xd7\xb9\x62\x39\x0a\x2c\xba\x25\
\x76\x9e\x0e\xe5\x5c\x06\xe5\x61\x43\x54\x50\x33\x17\xb5\x55\xae\
\x9e\xb7\xae\x49\x67\x03\x39\x89\x4c\x86\xcd\x3c\x4c\xc9\x08\xdd\
\x82\xe3\xf9\xca\x7b\xd8\x78\x70\x10\xb5\xdb\x6f\x47\xfd\xb6\xdb\
\xda\xdf\xda\x89\x13\x90\x8f\x3d\x56\x58\x84\x16\x77\xdc\xa1\x8d\
\x16\x40\x83\x08\xd2\x13\xba\xdd\x60\xfb\xcc\x33\x08\x16\x16\x3a\
\x2a\x1f\x07\x00\xbc\xba\x8a\xc6\xd7\xbf\x0e\x1a\x1e\xd6\x00\x55\
\xab\x01\xa5\xad\x49\x59\x66\x2f\x23\x5c\xcf\x5e\xe1\xc0\x66\x7d\
\xa7\x4d\x7d\x9c\x15\x4c\xfb\x8a\x00\x25\x9f\x2a\xdf\x37\x35\x85\
\xff\xd8\x66\xc6\xeb\x54\xbd\x8e\x9f\xac\xb4\x8e\x4f\x3a\x5c\xad\
\xc6\xf4\x21\x0b\x32\x2f\x65\x80\xd2\x61\x8f\x29\x09\xff\x5f\xb3\
\xff\x6b\x32\x04\x54\x40\xaf\x7b\x93\x81\x8e\xeb\xc9\xc2\x15\x1b\
\xa4\xa8\x0b\x11\x48\x80\x4b\x2e\xdd\x6c\xae\x61\x96\x25\xa0\xcc\
\x92\x16\x3f\x12\xdc\xcb\xcb\x64\x27\xbf\x72\x7b\xff\x36\xaf\x38\
\x10\x65\xd2\x84\x97\x9e\x36\xe3\x38\xe4\xea\xe3\x91\x1b\x49\xfd\
\x80\xbd\x6e\xb6\xe0\xa3\x1f\xd5\xc1\x9d\x00\x56\xb3\x74\xa4\xb9\
\x39\x34\x8f\x1e\x8d\xd2\x67\x20\x1e\x85\x9d\x7a\x9e\x7b\xee\xd1\
\x8f\x06\x68\x3b\x7b\x59\x3a\x7b\x16\x62\x61\x21\xad\xfa\x60\x36\
\x30\xd4\x6a\x3a\x02\xbe\x5e\xdf\x72\xf6\x11\x25\x18\x6c\xdf\xc6\
\x26\x26\x5d\x5f\x8a\xe9\x49\xdb\xc8\x85\x2b\xf5\xfa\x21\x4d\x94\
\x4a\x78\xfb\xf8\x38\xfe\xe1\xf2\xe5\x8d\xac\xa4\xd9\x6c\xeb\x8e\
\x59\xd7\x2d\x36\xad\x9f\xe3\x9c\xa3\x41\xe0\xb1\x0d\x38\x40\x2a\
\x32\xaa\x2e\x85\x12\x93\x44\x60\x12\xd9\x40\x60\x8c\xde\x55\xa2\
\x15\xb6\x2a\x89\xc8\xb7\xb2\xdc\xe8\x37\x6c\x34\x28\xb2\xee\x95\
\x52\x2e\x24\xc0\x2f\x1c\x90\x2f\x78\xd1\xcb\xb5\x4d\x5e\x3a\xdc\
\xbc\x46\xc2\xec\x52\xaf\xbb\xa2\x04\x3d\x32\x30\x61\x80\x28\x93\
\xbc\x7d\xef\x7b\x90\x3f\xfc\x61\x2c\x05\x87\xf0\x67\xc9\xba\x70\
\x2d\x36\xa0\x97\x3c\x7d\xab\x10\x30\x0d\x0f\xeb\xd4\x25\x36\xa2\
\xfb\x0b\x5f\xd8\xb6\xe9\x70\xd9\xa4\x54\x56\x4a\x81\x4d\xd8\x02\
\x5f\x4d\xa0\x54\x24\x4e\xc9\x1f\x35\x6c\x35\xb6\xdb\x46\x47\x5b\
\x82\x12\x00\x1c\x5d\x58\x68\xeb\xba\xc5\xa6\x71\x01\xfc\x64\x75\
\xb5\x18\x53\xf3\x97\x2e\x14\x68\xcf\xd6\x6b\x78\x63\x79\x24\xdf\
\x34\xa9\x57\x4b\xcd\x56\x09\xb1\xda\x52\xae\xb3\x2a\xb3\xad\xf2\
\x72\x76\xdb\x6a\xe1\x8c\xa8\x98\x00\xe0\x8a\x53\xe6\x77\x29\xb5\
\xa5\xb1\xe0\xb8\x71\x71\xf6\x4d\x45\x85\x00\xe8\xca\x56\x3d\xaa\
\xd5\x40\x5f\xfd\x2a\xe4\xec\x6c\x54\x5e\x0f\xd1\x6c\x64\xe0\xc5\
\x35\x6d\xb6\x49\x93\xb6\xc4\x8a\xdf\xad\xf2\x7d\xa5\xf6\xb9\x6a\
\x15\x62\xdf\x3e\x88\x1b\x6f\x04\x9f\x3b\xa7\x85\xee\x2d\x02\x25\
\xd7\xc7\xf3\x2c\x4e\x36\x80\xc4\x5e\x4d\xc1\x57\x74\x48\x40\x2b\
\x17\xee\x1d\x19\xd1\xdd\xad\x00\xc9\xce\xa2\xf9\x14\x9d\x0a\x9c\
\xb3\xd5\xba\x26\xe4\x04\xa8\xa8\x4a\x50\xee\xd5\x5b\x46\xec\x36\
\x3a\x0e\xa2\xd2\x44\x59\x8c\x24\x2a\xb3\x9d\x88\x73\x72\xb3\x77\
\xb6\x42\xad\x32\x60\xa1\x72\x68\x0b\x51\x41\x00\x5d\x96\x49\xc5\
\x6b\xbe\x21\x5f\xa4\xf9\xa6\x86\xcf\x6e\xf5\xf1\xc1\x41\xf0\xef\
\xfd\x1e\xc4\x07\x3e\x00\x9a\x9a\x72\x6e\xb8\x3f\x95\x2f\x0a\xaf\
\x53\x6b\xdd\x9a\xcc\x2e\x25\x8a\x5b\x02\x55\xa0\x0f\x70\xad\x06\
\x35\x3f\x0f\xf5\xe2\x8b\x50\xe7\xce\x99\x38\xa5\xed\xb9\x94\x63\
\xbb\x46\x73\xf7\xdc\x7d\xb3\x20\x30\x99\xe2\xc2\xb5\x6a\xb7\x0e\
\x0f\x39\xd4\x17\x1d\x06\xb2\x39\x03\xf5\x3a\x2c\x15\xe8\x22\x51\
\xad\xc5\x2c\xfd\xc5\x54\xef\x20\x44\x95\x6b\x85\x05\xa7\x7c\xa3\
\x96\x9d\x25\xd3\xc2\xb4\x19\xed\x14\x99\xaa\x26\xd0\x05\x0d\x8a\
\xae\xf0\x30\x91\xba\x64\x8b\x25\xc0\x56\xfc\x2d\xd8\x09\x3b\xb5\
\xf6\x2e\xb3\x2b\x3a\x72\x04\xa5\x23\x47\xa0\xbe\xf5\x2d\x04\x4f\
\x3c\xe1\xc2\x3d\xf2\xba\xf5\x79\x5a\x68\x40\x5b\x79\x7a\x21\x91\
\xc8\x11\x9b\x6e\x86\x82\xb5\x35\x34\x1f\x7c\x10\x34\x34\xa4\x85\
\xee\x7a\x7d\xcb\x84\x6e\xa0\xe8\xc2\x5a\xbc\x82\xd7\xbe\x71\x96\
\x60\x1a\x2d\x3b\xc9\xd3\xf4\xb2\x92\x84\x9e\x64\xe8\x34\x15\xb0\
\x07\xda\x2a\x27\x99\xa3\xf8\x24\x57\x5e\xc8\xaf\xa7\x96\x79\xad\
\x1e\xab\x62\xbd\x30\xd7\x45\x79\x9b\xf5\x74\x2e\x90\x91\xb3\x33\
\x3f\x02\x26\xf6\xc9\xaf\x44\xc2\x3a\xbf\x11\x2b\xee\x69\xfe\xef\
\x2d\xe9\xb0\xef\x7e\x37\xe8\xf6\xdb\x63\x3a\x63\xb7\x96\x49\x84\
\x89\x04\x6f\xaa\x60\xa8\x28\xf9\xf9\xd9\xaf\xd0\x34\x7b\xd6\x19\
\xd7\x13\x71\x4c\xcc\xdb\xcf\x7d\x2b\xa5\x82\x8d\xb9\xc3\xd4\x38\
\x25\xca\x7e\x42\xd6\x85\xfb\x74\x10\x60\x29\xa3\xec\x4c\x72\x59\
\x89\x03\xa4\x0e\x28\x3a\x75\x28\x87\x8c\x9a\xc5\xbc\xf9\x6a\x26\
\x72\x54\xbb\xdb\x6a\x4a\x22\x1f\x22\x92\x5d\x1e\xc7\x0c\x0a\x6c\
\xc0\x25\xbb\xd2\x50\x94\xb8\x17\x70\x1e\x39\xc8\x8b\x2b\x32\x2c\
\xc9\x96\x14\x87\x73\xe8\xae\x84\x1f\xd6\x46\x32\xfa\xd4\xa7\xa2\
\xb8\xb2\x43\x87\x20\x6e\xb9\x05\xe2\x0d\x6f\x48\x97\xcc\xee\xbe\
\x1b\x7c\xf6\x2c\xf0\xab\x5f\x15\x38\xcf\x1f\xc0\xa6\xdd\x4b\xf6\
\x25\x5f\xd8\xb6\x89\xe9\x3a\x8a\xdd\x19\x1a\x42\xf9\x7d\xef\xd3\
\x42\xf7\xa5\x4b\x58\xff\xfc\xe7\x0b\x67\x9f\xdc\xb4\x41\x97\xd2\
\x33\x61\xd4\x5d\xf8\xcd\xf6\x1d\x9c\x44\xaf\xe9\xb7\xff\xb2\xd3\
\x32\x07\xd8\xf6\xfa\xa1\xc8\x75\x23\x3f\xc2\x16\xc0\x9b\x47\x47\
\x7b\x3e\x92\x00\xd1\x52\x95\xbc\x6e\x52\xbc\x94\xb5\x8a\xd5\x4c\
\xcb\xa4\xd1\x5e\xc1\x47\xa7\x25\xa9\xf8\x0c\x9a\xcb\x3a\x90\x33\
\x4a\xdc\x66\x2b\xa0\xc8\x07\x75\x65\xb5\x29\x27\x83\xdb\x74\x47\
\xe8\xa0\xcf\xab\x99\x19\x84\x47\x8f\x22\x7c\xe0\x01\x20\x23\xa3\
\x68\xe3\x5d\xef\x8a\x94\xb8\x5c\xf7\x43\xed\x19\x75\x91\x3b\x4d\
\xf3\x0c\xaa\x55\x88\xeb\xaf\x87\x38\x74\x08\x62\xef\x5e\x5d\x8c\
\x72\xab\x0d\x3a\xf7\x02\x60\xba\x0a\x41\xa9\xcb\x94\x32\x0f\xa8\
\xc4\x96\x95\x78\x2c\xc9\x32\x26\xda\xc4\xa3\xb6\xdf\x5f\x96\x3d\
\xc8\x7f\xed\x19\xbf\xb6\x2e\xcf\x85\xcb\xba\xd6\xc4\xc2\x57\x97\
\xc0\xdd\x96\xd9\x76\x00\x63\xdd\xb7\xfc\x60\xe9\x58\x91\x5f\xa1\
\x76\xab\x46\x48\x2a\xbe\xb9\x8b\x39\x9a\x9b\x83\x7c\xe8\xa1\xf4\
\xdb\x9b\x9c\xc4\xfa\xaf\xfd\x1a\x94\xc9\x14\x90\xfb\x1c\x5e\x06\
\x00\xe1\x2d\x2f\x71\x1f\xc4\x27\x56\xa8\xc0\x7d\xf1\xda\x1a\xd4\
\x4b\x2f\x41\xfd\xe2\x17\x50\x2f\xbe\xd8\x93\x05\xb9\x59\x2d\x28\
\xa7\x03\xe1\x6a\x9b\xb5\x71\xf4\xca\x8c\xe8\x4e\x97\x03\x09\xba\
\xd2\xc9\xbf\x79\xe1\x85\xb6\xdb\xf8\xeb\xd6\x7c\x40\xa2\x02\x33\
\x2c\x8f\xaf\xae\xe2\x8d\x29\x8b\x6e\x9f\xca\x58\xd0\x3b\xba\x99\
\x54\x13\x1c\x77\xe7\xb2\x12\xc2\xb2\x65\x35\x10\x51\x0a\x09\x17\
\x78\x49\x31\x61\x9e\x81\x5c\xa9\x54\xb4\xa6\xc4\x80\x20\x0f\x88\
\xcc\x91\x68\xfb\x8d\x8e\x7e\x92\x37\x9f\x15\xf3\xe9\xd3\xc0\x89\
\x13\xc0\x91\x23\xed\x35\xa0\x83\x07\x11\x3e\xfd\x34\x4a\x39\xa0\
\x36\x79\x9e\xc0\x0b\xc0\x84\xe7\xd2\x05\x09\xd0\x2a\xb2\x20\x97\
\xd7\xd6\xd0\xfc\xdb\xbf\xd5\x29\x70\x6d\xea\x92\x2d\x14\xba\x99\
\x39\xd3\x7d\x93\x89\x10\x05\x1d\x6f\xb9\xbd\xfa\x45\x17\xe3\x94\
\x28\xd3\x85\xa3\x5c\xc2\x2f\xc5\x22\xb2\x85\x17\x1c\x47\xd0\x31\
\x4f\xc7\x32\x92\xbc\x15\x87\xcc\xa8\xdd\xb4\xe9\x45\x94\x76\x8d\
\x58\xf6\x6a\xce\x48\x8c\x8f\x84\x6e\x4a\x5c\xab\x05\x2a\x72\x4f\
\x27\x67\xf0\x24\xe8\x8a\x88\xad\x5c\xb0\x90\x83\xff\x9e\xfd\x94\
\x21\x00\x10\x9e\x3e\x0d\x99\x02\x4a\x6a\x72\x12\x4d\x5b\x9d\xa3\
\xc0\x79\xca\xfe\x02\xdc\xc4\xb3\xb6\x83\x60\x60\x53\xf4\x16\xc9\
\x3c\x19\x04\xc0\xc0\x80\x9e\x7d\x03\xbc\xa8\xfc\xad\x6b\x03\x43\
\xc3\x99\x4c\x89\x40\x51\x6d\xc2\x7f\xaa\xee\x5b\x2b\xff\xbd\x7d\
\xe7\x69\x0f\x48\x00\xb0\x2f\xc3\x4f\x7f\xd6\x8b\x10\x6f\xe5\xac\
\x64\x95\x63\xda\x63\x8e\x5f\x64\x84\x6c\x09\xce\x39\x76\x1e\x31\
\x22\x34\x27\x00\x2a\x06\x2e\xca\xaf\xa8\xa2\xba\xe2\x7d\x55\x72\
\x09\xc4\x9d\x9d\x88\x6d\xc9\xf5\x62\xd3\x56\x0e\x94\xca\x44\xa8\
\x08\x81\x8a\x10\x28\xb7\x09\xac\x75\xed\xd0\x21\x5d\x43\x30\xaf\
\x46\xe6\x81\x91\xcd\x1c\x51\x16\x22\xfa\xf8\x69\x4c\x4c\x01\xc7\
\x42\x7d\x60\x68\x08\xe5\xdf\xfa\x2d\x54\x3e\xf6\x31\x54\x3e\xfc\
\x61\x50\x8f\xb2\x04\xb4\x25\x0f\x23\xd9\x9a\xeb\xe5\xc5\x85\x18\
\x50\x6f\x47\x60\xda\x52\x28\x2f\x32\xa5\xef\x74\x24\x97\x4a\x42\
\x7f\xb2\x40\x69\xc9\xe4\xd6\xe6\x36\x46\xb6\x98\x11\x61\xbb\xc7\
\x24\x88\xb3\xed\x8d\x19\xf9\x97\x36\xd3\xfc\xb5\x7d\x51\xea\x12\
\x2f\xbb\x23\x7b\xd7\xce\x1c\x07\xad\x5e\xbe\xa7\x43\x87\x5a\xbe\
\x2d\x06\xb0\x7e\xe0\x40\xb1\x97\x9d\x43\x57\x6b\x95\xe4\xcd\x82\
\x43\x56\xb3\x81\x8e\x59\x62\xb7\x1f\x50\x1b\x50\x14\x09\x5e\xf2\
\xc0\xb0\xe4\xeb\x4a\x14\x55\x2c\xce\xdd\x6f\x07\x06\xb4\xd0\xbd\
\x7f\x3f\xc4\xf5\xd7\xf7\x2c\x75\x49\x3b\xd7\x6d\x60\x30\x9d\x25\
\x5d\x3c\x3f\xef\x81\x11\x62\x8c\x69\x3b\x81\xd3\xd6\x32\x25\xa2\
\xdc\x1d\x87\xda\xf8\xf3\xb7\x64\x2c\xa8\x7d\x62\x75\x15\x48\xd4\
\x12\xb1\x8b\x2c\x38\x07\x53\x8a\x25\x89\xcb\xd1\x21\x1f\x6f\xb3\
\xf4\x25\x4f\xc5\xdf\x4e\x00\xbb\x1b\x2d\xc8\x62\x20\x53\x53\xed\
\x75\x9c\xc9\xc9\x74\xe3\x98\x9d\x75\x0f\x9e\x72\xde\x58\xab\x24\
\x6f\x01\x11\x38\xe5\x3a\x00\x93\x57\x09\xf9\x0b\x07\x44\xe7\xd1\
\xa9\x81\x2d\x00\x95\x12\x62\x77\xee\x0c\x04\xbc\x51\x53\x52\x33\
\x33\x50\xc7\x8f\x43\xfd\xe2\x17\x7a\x51\xee\x56\x19\xb2\x08\x50\
\xcd\x60\x4a\xab\xcb\x4b\x36\x59\x44\x04\x4c\x89\xe0\xe2\xab\x46\
\x53\xba\x12\x2d\x09\x4c\xf6\x81\xbd\x79\x74\x14\xe3\x41\xd0\x76\
\x16\xed\x59\x53\xe3\x6d\xaa\x64\x72\x34\xb2\x02\x48\xe7\x45\x5a\
\x52\x2a\xb5\xe0\xe5\x68\x10\xe0\xd6\xa1\xa1\xe8\xdc\x44\xb8\x3e\
\x83\x99\xcd\xa5\xc4\xa1\xbc\x98\x23\xa3\xc1\x95\x00\xa8\x2c\x14\
\x73\x1d\xc1\x00\x00\x0e\x9f\x49\x44\x41\x54\x50\x12\x37\xde\x08\
\x3c\xf1\x44\x4b\x17\x38\xdc\xbd\x3b\x75\x5f\x35\x37\x87\x80\x8a\
\xb1\xe2\xe4\x3b\xb7\x6e\xbb\xda\xb3\x27\x1d\x94\x16\x16\x74\x6e\
\xa0\x1c\xa3\x6b\x47\xf9\x94\xf2\x5c\xbc\x9f\x4f\x69\x6d\x0d\xcd\
\xbf\xfb\x3b\x5d\x48\xd3\xa6\x2e\x29\x97\xb7\xc4\x5e\x46\x26\xa7\
\x21\x44\xfa\x24\xcd\xf9\x97\xe7\x22\xa6\x84\x44\xec\xdf\xd5\x36\
\xfb\xd6\x51\x92\xb7\x1e\x31\x2a\x82\x4e\x69\xfb\x7f\x52\x96\xac\
\x1c\x5d\x5c\xc4\x47\xae\xb9\x46\x47\xaa\x92\x70\x81\x70\xdf\x4e\
\xa9\xfb\x06\xe8\x18\x29\x97\x30\xcb\x74\xf4\xbd\x19\xa0\xf4\xf8\
\xea\x2a\xfe\xa5\x61\x0f\x49\x03\x7e\xaa\x40\xea\xde\xad\x64\x4c\
\xe5\xb3\x67\x41\xf5\x3a\xb8\x0d\x28\x8a\x23\x47\xa0\xf6\xec\x01\
\x9f\x3d\x1b\x63\x9b\xcd\xdd\xbb\xb1\x96\x92\x11\x52\xcd\xce\xea\
\xf8\xa2\xa2\xab\xeb\x93\xec\x83\xf4\xb9\x6a\x29\xe7\x02\x74\x9e\
\xee\x6d\x31\x7a\xda\xff\x0d\x02\x60\x74\x14\x34\x3e\x0e\xac\xad\
\x81\x52\x0a\x67\x74\xb3\x55\x87\x86\x31\x3a\x39\x9d\xba\xcd\xfc\
\xd9\x39\x84\x61\x08\x11\x68\x95\x96\x84\xce\x5c\x89\x6d\xa8\x2b\
\x6d\x4b\x4d\x29\xab\x65\x2d\x59\xf9\xda\xc5\x8b\x58\x92\x32\x8a\
\x3d\x34\x9f\x07\xce\xa5\x97\xa0\x71\x55\x53\x3c\x76\x76\x64\x70\
\x10\x63\x29\x61\x02\xff\x77\x79\x19\xcf\xd4\xeb\x31\x40\xb2\x79\
\xc7\xff\xc7\xc5\x8b\xa9\x80\x64\xd3\xac\x00\x9b\x11\xd6\x3b\x6b\
\x03\x27\x4f\xa6\x77\x8c\x8f\x7c\x04\xea\xd0\x21\x97\x2e\xa5\x71\
\xe0\x00\x16\xdf\xfb\xde\x74\x90\x38\x71\xa2\x70\x9a\x98\x0d\x88\
\x44\x80\x9c\x9c\xc4\xf2\xbd\xf7\x66\x6e\x6d\x41\x69\x73\x2a\x5b\
\x17\x35\xba\xa1\x21\x94\xdf\xfd\x6e\x54\x3e\xfa\x51\x94\xef\xbf\
\x1f\x28\x12\x84\xdb\x61\x1b\x9d\x98\xc2\xf4\xee\xbd\x99\xdb\xcd\
\xbd\xf4\x82\xab\x84\x42\x44\x10\x42\x40\x08\x4f\x53\xda\x46\xa0\
\xb4\x85\xee\x1b\x6f\xda\xec\x2c\x8b\x7a\xc7\xc4\x04\xf6\x9e\x3d\
\xdb\x36\xe1\xdb\xb2\x94\xf8\xd7\x2f\xbc\x80\x2f\xef\xdf\x8f\x1d\
\x44\x58\x54\x0a\x9f\x7f\xf9\xe5\x54\x77\xca\x0f\xdc\xf4\x93\xc2\
\xd9\x48\xf4\x6f\xa4\x14\xbf\xfc\xc4\x8b\x2f\xe2\xcf\xae\xbf\x1e\
\xb7\x8f\x8e\x02\xcc\x78\x74\x65\x05\x9f\x39\x73\x26\xf5\x5e\xde\
\x6a\x00\x50\xe7\x2b\xd2\x99\x3a\xb3\x75\xb7\xee\x3d\xc3\x81\x93\
\x27\x51\x4f\x63\x22\x83\x83\xe0\xdf\xf9\x1d\xd4\x00\xe4\x9d\xe4\
\x97\xc7\x8f\xc7\x41\xbd\xe0\x08\x2c\x0f\x1e\x42\x78\xe3\x8d\x58\
\x7f\xfd\xeb\xdb\xb2\x38\x1f\x90\xd4\xec\x6c\x6e\xf7\xcb\x4f\x26\
\x57\x23\x42\x3d\xa1\x5f\x3a\x23\xff\xc1\x0f\x50\x36\x49\x09\x0b\
\x5d\x3d\xb3\x16\xba\xf7\xec\x81\xd8\xbf\x5f\x5f\x7f\xa5\xd2\xf5\
\x94\xb8\xbb\xae\xdb\xab\x6b\xbe\x89\x00\xe3\xd3\xd7\xa0\x3a\x98\
\x5d\x16\xfc\xa5\x5f\xcd\x60\xbd\x5e\xd3\xd9\x60\x4d\xcd\x38\x61\
\x81\x29\x47\x62\x38\x37\x90\xbe\xfa\xb5\x0e\xc4\xe2\x80\x16\xf7\
\xd7\x97\x2e\x9e\x47\x73\xbd\xee\x5c\xc5\x6d\x0c\x4a\x5d\xc2\x62\
\x93\xef\xe6\x63\x3b\x77\xe2\x3f\xa4\x18\xfe\xa9\x7a\x1d\x6f\x39\
\x75\x0a\x6f\x1c\x19\xc1\xc9\x5a\x2d\x73\xcd\xdd\x6f\x4e\x4c\xc4\
\x34\x2c\xe1\x45\x92\xbf\x7d\x62\x22\x15\x94\x96\xa5\xc4\xc7\x53\
\x82\x42\xdb\xb1\x32\xdf\x9d\xf7\x33\x3b\xb6\x1f\xb9\xba\xf5\x0c\
\x81\xca\xe9\x19\x94\x4e\x9f\x46\x98\x92\x0b\xbb\x10\xa0\x3c\xfe\
\x38\x60\x52\xc9\x26\xc3\x39\x52\x5d\xc9\x3f\xf9\x13\xad\x55\x99\
\x4f\xae\xcb\xaf\xd5\xd0\x30\x19\x28\xf3\xba\x1f\x7e\x32\xb9\xb4\
\x9e\x30\x54\xad\x22\x30\x81\xac\x85\x32\x50\x12\x81\x57\x57\x21\
\x4f\x9e\x04\x2f\x2d\xe9\x62\x94\xb5\x1a\xba\x3d\x5b\xba\x77\xff\
\xa1\x42\xdb\xaf\xae\x2c\x3b\x96\x24\x48\xe8\x62\x03\x42\xd7\x8d\
\x2b\xca\x92\xc6\x26\x26\x73\xfa\x5f\x17\xa1\x6c\xcc\x9d\x57\x57\
\x2e\x2f\x40\x75\x27\x78\x92\xb1\x65\xbe\x87\x0d\x26\xbc\x7f\x6a\
\x0a\x7f\x39\x3f\x9f\x99\x1e\xf7\x1f\x57\x56\x32\x8f\xb9\xa7\x5c\
\xc6\x07\xcd\x4c\x8f\x2f\xb4\xda\x50\x84\xdb\x46\x46\xf0\xa6\x91\
\x11\xfc\x38\xc7\xb1\xf2\xb4\x77\x4d\x4c\xe0\xba\x4a\xa5\xa5\x01\
\xd3\x96\x3c\x43\x80\x98\x30\x78\xec\x18\x96\xbb\x01\x4a\xb5\x1a\
\xc2\x1f\xfe\x30\xc6\x90\x44\x0f\xef\x25\xfc\xee\x77\x81\x4b\x97\
\x62\x69\x71\xbb\xe5\x88\xd9\x52\xe0\x64\x8c\x4a\xd8\x22\xa3\x79\
\x6a\x40\xac\xd5\x10\x7e\xeb\x5b\x5a\xe8\x6e\x34\x74\x44\xf7\x16\
\x09\xdd\xed\x00\xe9\xd4\xf1\x9f\xb9\x77\xae\x4b\x32\x69\x96\xa5\
\x6b\xc7\x89\x9e\x84\x03\x28\x53\x81\xd7\x3f\x76\x91\x73\x74\xa9\
\x6c\x37\xf7\xdc\x5d\x6f\xe5\x82\xfc\xf9\xbe\x7d\x5d\x39\xde\x67\
\xaf\xbb\xce\x1d\xd7\x96\x25\xf2\xd7\xdc\x09\x00\xff\x6a\xe7\xce\
\xee\x68\x00\x41\x80\xfb\x2d\x00\x22\x1e\x45\x4c\x5b\x09\x4c\x00\
\x2a\xa7\x4f\xa3\xfa\xfd\xef\x6f\xfa\x58\xcd\xa3\x47\xc1\x97\x2e\
\xc5\x23\xf1\x41\xb9\x72\x67\x17\x06\xa4\xa3\x47\x21\x1f\x7b\xcc\
\x3b\x4f\x77\x85\x51\x69\x12\xbd\x85\x36\x7d\x89\x49\x0d\x9c\x2b\
\xe4\xa0\x5c\x02\xed\xdc\x09\xb1\x77\x2f\x68\xd7\x2e\x2d\x7c\x5f\
\xa1\xb6\xb4\xb8\x80\x53\xc7\x7f\x86\xb0\xd9\x74\x2c\x49\x08\x5d\
\x4d\x57\x03\x93\xe8\xc8\xc5\xce\xf5\x0c\xa5\x44\x68\x3e\x9d\x14\
\xbc\x14\xdd\xeb\xe2\xbd\xf3\x36\x5a\x01\x92\x00\x70\xcb\xd0\x10\
\xfe\xc8\x00\x4a\xa7\xed\xdf\xed\xda\x85\x9b\x06\x06\xa2\x4e\x2e\
\xa2\x78\x15\xf2\x32\x15\xbc\x79\x64\x04\xff\x76\xd7\xae\x4d\x5f\
\xff\x27\x77\xed\x72\x01\x9a\x69\x91\xeb\xbd\x46\x77\x7b\x6f\xd5\
\x63\xc7\x50\x7e\xf4\xd1\xcd\x81\xc4\xf1\xe3\x31\x90\xd0\xcf\x0f\
\x5d\x65\x4b\x3c\x3b\x8b\xe6\x03\x0f\x20\x34\x80\x14\x15\x1b\x8d\
\x52\xdb\x74\xa3\x35\xbd\x9c\x4a\x85\xb2\x4f\x32\xb4\xd0\x7d\xef\
\xbd\xa8\xfc\xf6\x6f\xa3\xfc\xfe\xf7\x6f\x89\xd0\xbd\x01\x10\xc2\
\x10\x67\x5e\x38\x8d\x53\x27\x7e\x86\x30\x0c\x75\x14\xbb\x07\x44\
\x25\x53\xb4\x52\x98\x72\xdf\xbd\x60\x4a\x61\x18\x22\x0c\x43\x48\
\x29\x75\x8d\x39\xa5\x0a\xf5\xe0\x1e\x69\x4a\xbd\xf5\xe7\xfc\x28\
\xe0\xfb\xa6\xa6\xa0\x98\xf1\x47\x76\x79\x43\x41\x40\xfa\x4d\x33\
\x93\xe7\x97\x64\x0a\x5a\x8c\xc2\x44\x84\x8f\xed\xdc\x89\x05\x29\
\xf1\x95\x0e\xa7\x7a\x3f\xb9\x6b\x17\xde\x3a\x32\xa2\xa9\xb4\x6f\
\xc0\x88\x47\xae\xa7\xa3\x3b\x6f\xfa\xb5\xf8\xf9\xd3\x05\x80\xc1\
\xef\x7f\x1f\x98\x9d\x45\xf3\xee\xbb\x81\xc9\x7c\xba\x81\x9a\x99\
\x41\xf8\xdd\xef\x42\x9d\x39\x13\x5f\x33\xd6\x22\x22\x7a\x53\x3d\
\xe9\xc4\x09\xf0\x73\xcf\x21\x7c\xfc\x71\x7d\xf9\x44\x2d\x53\xe2\
\x76\x2b\x13\x76\xd3\x8c\xe8\x25\xbf\x9f\x25\xf4\xa5\x76\x9d\x92\
\x06\x06\x40\xd7\x5e\x0b\xda\xb7\x0f\xa2\x52\xd1\x11\xdd\x3d\xa8\
\xfd\xd6\xaa\xad\xd7\xeb\xb8\x70\xee\x2c\xe6\x5f\x9e\x45\xb3\xd9\
\x74\xcb\x1e\x05\x19\x40\x0a\x02\x94\x4a\x25\x0d\x48\x46\xe0\xee\
\x55\x28\x40\x28\x43\x34\x9a\x4d\x94\x82\x48\xb7\x12\x76\x39\x55\
\x8e\x73\xf6\x28\x4e\x89\x7a\x8e\x6d\xd6\x10\x14\x74\x79\xf0\xc3\
\xd5\x2a\xfe\xf3\xb9\x73\x78\x2c\x47\x71\x81\x37\x0c\x0f\xe3\x77\
\x77\xec\xc0\x4d\x2d\x4a\x7c\xfb\x79\x9f\x63\x86\x65\x04\xf6\x4f\
\xee\xda\x85\xc3\xd5\x2a\xfe\xcb\xb9\x73\x99\xd5\x7a\x6d\xbb\xd5\
\x9e\xcf\x63\x64\x49\x03\x0e\x90\x73\x2a\x9d\x69\x73\x68\xee\x79\
\xdc\xbe\xa0\x5f\x39\x79\x12\x78\xfa\x69\x34\x5f\xfd\x6a\xa8\xdd\
\xbb\x81\xeb\xae\x73\xe2\xb0\x0f\x44\x3c\x3b\xab\x67\xbe\x66\x66\
\x22\xad\x02\xad\xf3\x66\x0b\x33\xcb\x47\xf5\x3a\xa4\x2d\x82\xb8\
\x67\x8f\xd6\x5c\x5a\x80\x1c\xc1\x94\xe3\x5e\x58\x00\x5f\xba\x04\
\x3e\x7e\x3c\x16\x6a\xe1\x83\x44\x90\x28\xb7\xdd\x2d\xf3\x52\x86\
\x21\xd9\x99\x3a\x0b\x48\xb9\xba\xeb\xca\x0a\xe4\xcf\x7f\x0e\x3e\
\x7f\x1e\xbc\xb4\x04\x14\x28\x74\x61\xdb\xda\xca\x92\x76\x19\x99\
\x51\x2a\x57\x50\x69\xb1\x54\x65\xbd\x5e\x43\xbd\x5e\xc7\x7a\xbd\
\x86\xc6\x7a\x1d\x4b\x8b\x0b\x2e\x25\x89\x65\x75\x42\x58\x97\xcd\
\xb0\xa3\x92\x66\x48\xa5\x20\xd0\xae\x5b\x8f\x58\x12\x00\x53\xe8\
\x52\xe9\xda\x7a\x52\x41\x08\x11\x13\xbc\xaf\x10\x53\xea\x22\x25\
\x4a\xf9\xda\x32\x0d\x66\xc6\x6b\x86\x86\xf0\xe5\xfd\xfb\x71\xbc\
\x56\xc3\xf7\x2e\x5f\xc6\xb3\xf5\x3a\x66\x1b\x0d\xcc\x35\x9b\xd8\
\x53\x2e\x63\x4f\xa5\x82\x9b\xab\x55\xdc\x39\x3a\x1a\x4b\xe2\x66\
\x01\x22\x56\x53\xde\x63\x4b\xfe\xec\x8b\x35\xe0\x77\x8c\x8f\xe3\
\x5f\x8c\x8d\xe1\x3b\x97\x2f\xe3\xe9\x5a\x0d\xa7\xea\x75\xb3\xbc\
\x25\x0e\x44\x37\x57\xab\xb8\x75\x68\x08\xb7\x0e\x0f\xc7\xce\xd7\
\xce\x80\x29\xe7\x33\xd9\xf9\xd9\xcf\x6a\x37\x43\x29\xac\x33\xa3\
\xa1\x14\x24\x2b\xc8\x44\x94\x72\x6b\x80\x33\x85\x26\xcd\xda\x27\
\xc1\x8c\x00\x00\xdb\x8c\x8b\x27\x4e\x20\x3c\x71\x02\xd2\xb8\x31\
\x69\x19\x98\xc8\x68\x47\xd4\x6a\x0d\x99\xf9\x7d\xf0\xa7\x3f\x45\
\xe5\xc9\x27\x11\x9a\xeb\x5c\x37\x0b\x68\xa5\x3d\xb6\x4b\xd9\x12\
\xcd\x42\x52\x1b\x66\x0c\xf3\xfc\xf5\xb9\x80\x12\xf4\xf9\x04\x11\
\xc6\xbe\xf6\x35\x57\x22\xa9\xa1\x14\x1a\xe6\xfa\x95\xf9\x24\x07\
\x34\xb4\x3b\x8f\x31\xd4\x0d\x75\x13\xd2\xa8\x92\x4d\xca\xb0\xb6\
\x86\xe6\xdf\xff\xbd\x5e\x88\xdb\x68\x80\xd7\xd7\x0b\x0b\xdd\xab\
\x4b\x8b\x58\x5a\xb8\x88\x66\xb3\x89\x46\xb3\x89\x66\xb3\xe9\x34\
\x1a\xf6\x53\x21\x9b\x65\x22\xc9\x7b\xd2\x33\x6c\x64\x84\xed\xc0\
\xb9\x6b\x41\x10\xa0\x6c\x80\x49\x18\x3d\x29\xd9\xce\xcf\xbe\xa0\
\xb5\xa0\x30\x74\xe7\x0e\x43\x09\xa9\x12\xe7\xb6\xa3\x11\x36\x46\
\x13\x90\xd1\xaf\xf4\x79\xfc\xc5\xe5\x57\xdc\x7d\x6b\xff\x16\x9f\
\x7f\xed\x6b\x5b\x18\x94\x99\xf1\xb0\x0f\x3b\xa7\xe0\x6b\x69\x61\
\x60\x0d\x0a\x7a\x6d\xdc\xe1\x6a\x15\xd2\x54\x82\x55\x2d\x9c\x1e\
\x4a\x00\x92\xbf\x6a\xbc\xd4\xa6\x50\x81\x3b\x97\x67\xc0\xf7\x8c\
\x8d\xe1\xae\xb1\x31\xad\x3d\xe4\x32\x60\xa4\x1a\xb0\x28\x98\x87\
\x5c\xc4\xee\x5f\xb8\x54\x25\xad\x12\x95\x51\x0b\xa4\xf7\x5d\x93\
\xc0\x5e\x3b\xe9\x1a\x76\x64\x58\xa8\xaf\xa9\xf8\x8c\x05\x26\xb6\
\xca\x5f\x48\xeb\x83\xac\x65\x2f\x8c\x44\xc5\x62\x53\x7f\xce\x06\
\x65\xba\x5a\x74\x7e\xa8\x8b\xf7\xdc\x45\x92\x21\x25\xce\x17\x24\
\xd8\x2c\xfb\xcf\xc5\xeb\x4f\x79\xba\x69\xab\xc0\x4f\xda\xf0\xd8\
\x5a\xf4\x6b\x8a\x84\x6e\x71\xfd\xf5\xa0\xc9\x49\x60\x6d\x4d\x87\
\x05\x74\xd8\xac\x8b\x15\x88\x00\x4a\x31\x02\x01\xa8\x44\xc5\x66\
\xff\xce\x62\x6b\xd9\x48\xeb\x47\x22\xd0\x2c\x49\xf8\x5a\x92\xc7\
\x90\xda\x95\x00\x8f\x32\xbe\x0a\x07\x2c\x8a\x54\xce\x7e\x49\xb1\
\xf5\x75\x2d\x91\x6b\xeb\x40\x29\xf9\xb2\x28\xf5\xe5\x8b\x04\xa0\
\xb4\x35\xa8\x36\x29\x81\x1c\xb0\x78\x46\xe5\xff\x16\x42\x40\x82\
\x5b\x17\x71\xf4\xa6\x92\x93\x2b\xc5\x83\x04\x73\xf1\xa7\x83\x37\
\x18\xb0\x49\x3d\x92\x69\xc0\x9e\xbb\xd9\xce\x80\x8b\xe8\x2f\xf1\
\x15\xef\x51\x2a\x39\x65\x8e\x11\x63\x7a\x29\x14\xdd\x07\x67\x37\
\xf2\x89\xa8\x20\x8b\xb4\xf7\xd5\xa2\x0a\x8a\x10\xf1\xa4\x68\xc9\
\x45\xad\x6e\x66\xc7\xa3\xed\xf6\x7d\xdb\xef\x92\x03\x46\xb2\x24\
\x16\x25\x00\x29\x12\xd1\x13\xda\x15\xa2\xec\xe3\xfe\x40\x65\x8f\
\xa9\xf2\xba\xb4\x1e\xf0\xb5\xcf\x3e\x99\xf2\x9e\x86\x86\x51\x7e\
\xdb\xdb\x20\x0e\x1d\x02\x5f\xba\x04\xf9\xcc\x33\x1d\x65\x9f\x74\
\xf7\x2c\x02\x88\x80\x51\xe2\x00\x4a\x10\x94\x12\x2d\x9f\x96\x0f\
\x48\xc2\xc4\x21\x05\x42\xcf\xb6\x59\x3d\x49\x10\x41\x98\xdc\xf7\
\x59\x7d\xc2\x05\x56\x06\x02\x25\x40\xbb\x61\x9c\x7f\xb8\xd4\x01\
\x9a\x81\x01\xb5\xe2\x59\x08\x8a\xc5\x29\xe5\xa0\xb0\x59\x2f\x3f\
\xd3\xa0\x4c\x87\xca\x32\xa8\x76\x46\x05\x4f\xc0\x95\x44\x9a\xbe\
\x1b\x76\x13\x67\x2d\xac\x69\x66\x0b\x83\x8a\xcd\x84\x51\x8a\x01\
\x7b\x2c\x20\xd5\x80\x29\x87\x01\x17\x54\xe2\x1c\xc8\x79\xd7\xa5\
\x10\x4f\x03\x12\xbb\x97\x94\xe7\x28\x28\x9e\x10\xce\x5e\xab\x8c\
\x4d\x8b\x53\x4b\x6d\xc7\x85\x4f\x24\x40\x42\x78\xa3\xa4\xcf\x5a\
\xe0\x31\x26\xe5\x5d\x53\x2c\xc8\x0e\x1b\xb3\x45\x08\x6c\xcc\x50\
\x19\x3b\x8f\x4e\xb6\x09\xf6\x00\xc9\x3e\x1f\x55\xe0\x99\x12\x03\
\x81\x28\x9a\x7d\xd2\xb8\xc4\x95\x0a\x68\xc7\x0e\xd0\x9e\x3d\x40\
\x10\x68\xd7\xad\x20\x28\x91\x61\x49\xec\x19\xa7\xb0\xfd\xd8\xd6\
\x16\xf4\x07\x78\x2f\xaa\x5a\xbb\x6c\xc2\x5b\x46\x22\x22\x51\xdb\
\x0b\x01\x48\x03\x24\x32\xdb\x0a\x21\x50\x2e\x95\x20\x49\x41\xb0\
\xda\xe8\xbe\xa5\x09\xfe\xe4\x81\xa2\x17\x35\xde\x1b\x4d\x29\x15\
\x74\xa8\x3b\x06\xd5\x0a\x1c\x32\x80\xc9\x37\x2a\x37\xd5\xae\x18\
\x12\xba\xe3\x2b\xe6\x0d\xee\x9b\x20\x91\x6a\x50\x94\xd7\x80\x4d\
\x27\xde\xac\x01\x17\x06\x24\xef\x1a\xac\xce\xc2\x09\x57\x51\xb4\
\x02\xd9\x16\xcf\x8f\xbd\xfb\x22\x22\xf7\xcc\x84\x01\x58\x6e\x21\
\xf6\x92\x07\xd0\xa2\xc5\xbd\x50\xab\x77\x64\xb6\xf7\x5d\x38\x07\
\xe0\x89\x20\xbb\xe4\x20\xe0\xbb\xbf\x22\x01\x58\x3e\xf8\xf9\xcf\
\x24\x48\x9e\x23\xcf\xb3\x15\xde\x44\x84\x77\xce\x6c\xc3\x60\x2d\
\x74\x3f\xf9\x24\xd4\xec\x2c\x78\x79\x19\xc8\x58\x90\xdd\xea\xbd\
\xc2\x7f\x1f\x86\xd9\x28\x16\x0e\x90\xb8\x85\xb4\xe3\xbb\x63\x04\
\x38\x11\x3b\x09\x46\x48\xb9\x17\xf7\xbb\xd0\x03\x35\x4a\x25\x28\
\xa5\x20\x84\x72\x15\x75\xf3\xdf\x47\xe4\x7e\x8a\x14\x0d\xab\x77\
\xee\x5b\xc1\xd9\xff\xd6\x06\x05\x44\x09\x5f\xf3\x1b\x54\xb2\xd3\
\xfb\x23\xac\x12\x5a\x84\x85\x37\x22\x73\x8b\xce\x9e\x65\x50\x99\
\x06\x1c\x74\xd7\x80\xf3\x8e\x0b\x3e\x38\x5a\x52\xcf\x6d\x84\xf9\
\x3c\x79\xac\x7c\xf7\x94\xec\xfd\xa0\xb5\x26\x07\xb4\x4e\x2d\xd3\
\x4e\xa8\xf6\x9f\x17\x21\x9e\x4d\x81\xa9\xbd\x73\x44\x09\x90\xa2\
\x16\x60\x44\x09\x6b\x10\xde\xe0\x24\xda\x9c\x23\xad\x03\xc7\xca\
\x2d\x15\x62\xb0\x04\xae\xd5\xd0\xfc\xce\x77\x40\x95\x0a\xb8\xd9\
\xec\x48\xe8\x76\xf7\x24\x84\x5e\xee\x62\xee\xa3\x5d\xf0\x21\x25\
\x96\x26\x39\x26\x94\x28\x59\x9f\x97\xa5\xb8\x73\xdb\x67\x60\x52\
\xfa\x16\x02\x76\x0f\x20\x85\x10\xb8\x30\x7b\x66\xc3\x75\x8c\xa6\
\x84\x9e\x6c\x1e\x94\x28\x3f\x30\xb5\x37\x28\xea\xd8\xa0\x90\x10\
\x5f\x85\xc9\x05\xee\xea\x77\x59\xb0\xf0\x69\x76\x4b\x83\xca\x07\
\x10\x1b\x0d\x58\x25\x0c\x98\x1d\xc0\xa6\x1b\x30\x6d\x2a\x7a\x3b\
\x5a\x02\xa1\x9f\x23\xb7\xb9\xce\x22\xe7\xf1\xf7\x61\x0f\xbc\xb9\
\x8d\xf1\x02\xd9\x49\xc2\x7c\x20\xb7\x80\x87\xac\x69\x76\x8e\x0b\
\xdf\x49\xf6\x94\x1a\xc9\x65\x80\x29\x39\x95\xcf\x39\xe8\x3f\xb5\
\x79\x67\xc8\xf3\xfc\x98\x41\x95\x8a\x2e\xaf\x34\x3d\xad\x59\xd3\
\x63\x8f\x15\x7f\xaf\xde\xbd\x32\xbc\x92\x49\x59\xa0\xe0\x83\x77\
\x62\x82\xa6\xe8\xb9\xc1\xec\x80\xc9\x3f\x6f\x1e\x60\xa2\xf8\x94\
\x60\x4b\x60\x1c\x99\x98\xc4\xf2\xc2\x02\x6d\x0a\x94\x32\xe3\x94\
\x72\x17\xcc\xa2\x9e\x19\x14\xbc\x91\x9a\x3d\x66\xc4\xb1\x73\x50\
\x21\x83\x4a\xbb\x95\xc8\x1b\x11\x09\x03\xa6\x54\x63\x6f\x7b\xbe\
\x24\xb0\xa7\xc5\x68\xb5\xeb\x04\x1d\x78\xdd\x6d\xaf\xd5\x5e\x02\
\x65\x3f\x21\xca\xf1\xbe\x63\x33\x46\x54\xec\x82\x8b\x26\x8c\xeb\
\x66\xec\x0d\xa1\x40\xe7\x1b\x1c\x44\xf9\xee\xbb\xb5\xd0\x7d\xf1\
\x22\xe4\x53\x4f\x75\x26\x74\x13\xb5\x04\xdb\xa2\xfb\x76\x74\xbf\
\xc9\x70\x89\x2e\x3c\x4b\xff\x9a\x86\x46\x47\x31\x38\x32\x52\x5a\
\x59\x5c\xe8\xf1\xec\x5b\x2e\xa6\x44\xdd\x31\xa8\x1c\xe7\x8a\x19\
\x56\xa6\x50\xde\x41\xf4\x39\x65\x19\x70\x07\x9d\x9c\x8a\x5b\x03\
\x75\xfe\x32\xba\x6b\x90\x39\xcf\x4b\xe8\xe0\xd2\x8a\xca\x03\xb8\
\x72\x8d\x2a\x15\xd0\xc4\x04\x68\xc7\x0e\x5d\xf0\xa1\x54\xda\x54\
\xed\xb7\x2b\x95\x7c\xad\x57\xe7\x9d\xd8\xb1\x13\xe5\x81\x81\xa1\
\x57\xdd\xf6\x56\xf9\xc8\x37\xbe\xd6\x63\x50\xa2\x2d\xd9\xa5\xa3\
\x1d\x8b\xc1\x44\xe7\x06\x4d\x9b\x2a\x67\xd4\xcd\x65\x39\xbd\x8f\
\xa6\xef\x1a\xaa\xf6\xfa\x51\x6c\x71\xe3\xe5\x65\x84\x3f\xf9\x09\
\xc4\x0b\x2f\x74\x24\x74\xbf\x92\xdb\xe4\x8e\x9d\x28\x0d\x0c\xec\
\x3c\x7f\xe6\xa5\x5a\x1a\x20\x75\x0f\x94\x5e\x31\x6d\x33\x4b\x38\
\xa8\x3b\x06\xbd\x19\xa3\xdc\xb0\xef\x26\x0e\x46\xdb\xe4\x15\x5c\
\x45\x00\xc5\xb5\x1a\xc2\x87\x1f\x06\x0d\x0c\x68\xa1\xbb\xd1\xb8\
\xa2\xa9\x4b\xb6\x4b\x1b\x9b\x9a\x42\x69\x60\xe0\x9f\x9d\x3f\xf3\
\x52\xae\x45\xa3\xff\xc4\x40\xa9\x9d\x91\x76\x79\x78\xa6\xad\xde\
\x37\xa1\x0c\x5f\x71\xd6\xb4\x9d\xdf\x75\x37\x8f\x1f\x7f\xc6\x34\
\x30\x80\xe0\xc8\x11\x90\x15\xba\x8f\x1d\x83\x58\x5b\xbb\x78\xf8\
\x4d\x6f\xb9\xa6\x3f\xe0\x03\x87\x73\x6e\xd7\xc5\x0a\xb9\x57\x33\
\x13\xa2\xee\xf4\xf7\x2b\x66\xbc\x3d\x06\x1f\xba\x9a\xc0\x62\xab\
\x00\x99\x36\x6e\x30\x38\x88\xd2\x5d\x77\x45\x42\xf7\x13\x4f\xf4\
\x5d\xb8\x0e\x5a\x69\x73\x2f\x6b\xb3\xd6\x79\x95\x0a\x08\xd4\x5b\
\x3b\xb8\x1a\xbd\xd7\xed\x03\x16\x5b\x7d\xb9\x1e\x53\xaa\x54\x40\
\x23\x23\xa0\x89\x09\x2d\x70\x97\xfa\xea\xc8\xd6\x82\x52\xbf\xf5\
\x5b\xbf\xc5\x71\x72\x79\x19\xe1\xa3\x8f\x82\x7e\xf9\x4b\x60\x65\
\xa5\xcf\x92\x3a\x1d\x07\x98\x3b\x4a\x1a\x76\x15\xcf\x91\xf4\x5b\
\xbf\xf5\xac\x0d\x00\x18\x03\x50\x05\xb0\x0e\x60\x01\x40\xb3\xff\
\x58\xfa\xa0\xd4\x6f\xfd\xd6\x6f\x57\x71\x13\xfd\x47\xd0\x6f\xfd\
\xd6\x6f\x7d\x50\xea\xb7\x7e\xeb\xb7\x7e\xeb\x83\x52\xbf\xf5\x5b\
\xbf\x5d\x0d\xed\xff\x03\xac\x99\x97\xd5\x5f\x24\x1a\x40\x00\x00\
\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
"
qt_resource_name = "\
\x00\x08\
\x05\xe2\x59\x27\
\x00\x6c\
\x00\x6f\x00\x67\x00\x6f\x00\x2e\x00\x70\x00\x6e\x00\x67\
"
qt_resource_struct = "\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
"
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()
| 64.325314 | 96 | 0.727295 | 14,845 | 61,495 | 3.011586 | 0.020276 | 0.271233 | 0.401212 | 0.527703 | 0.163062 | 0.159036 | 0.157693 | 0.155076 | 0.153869 | 0.152661 | 0 | 0.342598 | 0.016522 | 61,495 | 955 | 97 | 64.39267 | 0.396617 | 0.003008 | 0 | 0.124468 | 0 | 0.981915 | 0 | 0 | 0 | 1 | 0.000131 | 0 | 0 | 1 | 0.002128 | false | 0 | 0.001064 | 0 | 0.003191 | 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 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
901b68d64d62be544aa71222e25b9656c5ebebfb | 223 | py | Python | carbondesign/apps.py | dozymoe/django-carbondesign | 34aed0cfdccfa90fcb5bf2bbd347229815f1417b | [
"MIT"
] | null | null | null | carbondesign/apps.py | dozymoe/django-carbondesign | 34aed0cfdccfa90fcb5bf2bbd347229815f1417b | [
"MIT"
] | null | null | null | carbondesign/apps.py | dozymoe/django-carbondesign | 34aed0cfdccfa90fcb5bf2bbd347229815f1417b | [
"MIT"
] | null | null | null | """Django application configuration for carbondesign.
"""
from django.apps import AppConfig
class CarbonDesignConfig(AppConfig):
"""Django application configuration for carbondesign.
"""
name = 'carbondesign'
| 22.3 | 57 | 0.748879 | 20 | 223 | 8.35 | 0.6 | 0.203593 | 0.359281 | 0.39521 | 0.538922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.156951 | 223 | 9 | 58 | 24.777778 | 0.888298 | 0.475336 | 0 | 0 | 0 | 0 | 0.114286 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
3958105c393483983c62dde4638d2d9523a7f5f4 | 376,991 | py | Python | ibm_whcs_sdk/insights_for_medical_literature/tests/unit/test_insights_for_medical_literature_v1.py | paul-felt/whcs-python-sdk | 4b668a9f2d60b89c133adee644d1b5ff25b41228 | [
"Apache-2.0"
] | 5 | 2020-04-09T14:50:01.000Z | 2022-01-10T23:27:33.000Z | ibm_whcs_sdk/insights_for_medical_literature/tests/unit/test_insights_for_medical_literature_v1.py | paul-felt/whcs-python-sdk | 4b668a9f2d60b89c133adee644d1b5ff25b41228 | [
"Apache-2.0"
] | 21 | 2020-04-08T10:43:57.000Z | 2021-12-03T21:48:29.000Z | ibm_whcs_sdk/insights_for_medical_literature/tests/unit/test_insights_for_medical_literature_v1.py | paul-felt/whcs-python-sdk | 4b668a9f2d60b89c133adee644d1b5ff25b41228 | [
"Apache-2.0"
] | 6 | 2020-04-08T18:28:03.000Z | 2021-04-05T16:37:45.000Z | # -*- coding: utf-8 -*-
# (C) Copyright IBM Corp. 2020.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from ibm_cloud_sdk_core.authenticators.no_auth_authenticator import NoAuthAuthenticator
import inspect
import json
import pytest
import requests
import responses
from ibm_whcs_sdk.insights_for_medical_literature import *
version = 'testString'
service = InsightsForMedicalLiteratureServiceV1(
authenticator=NoAuthAuthenticator(),
version=version
)
base_url = 'https://us-south.wh-iml.cloud.ibm.com/wh-iml/api'
service.set_service_url(base_url)
##############################################################################
# Start of Service: Documents
##############################################################################
# region
#-----------------------------------------------------------------------------
# Test Class for get_documents
#-----------------------------------------------------------------------------
class TestGetDocuments():
#--------------------------------------------------------
# get_documents()
#--------------------------------------------------------
@responses.activate
def test_get_documents_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents'
mock_response = '{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
# Invoke method
response = service.get_documents(
corpus,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
#--------------------------------------------------------
# test_get_documents_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_documents_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents'
mock_response = '{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_documents(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for add_corpus_document
#-----------------------------------------------------------------------------
class TestAddCorpusDocument():
#--------------------------------------------------------
# add_corpus_document()
#--------------------------------------------------------
@responses.activate
def test_add_corpus_document_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents'
responses.add(responses.POST,
url,
status=200)
# Set up parameter values
corpus = 'testString'
document = {}
acd_url = 'testString'
api_key = 'testString'
flow_id = 'testString'
access_token = 'testString'
other_annotators = [{ 'foo': 'bar' }]
# Invoke method
response = service.add_corpus_document(
corpus,
document=document,
acd_url=acd_url,
api_key=api_key,
flow_id=flow_id,
access_token=access_token,
other_annotators=other_annotators,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate body params
req_body = json.loads(str(responses.calls[0].request.body, 'utf-8'))
assert req_body['document'] == {}
assert req_body['acdUrl'] == 'testString'
assert req_body['apiKey'] == 'testString'
assert req_body['flowId'] == 'testString'
assert req_body['accessToken'] == 'testString'
assert req_body['otherAnnotators'] == [{ 'foo': 'bar' }]
#--------------------------------------------------------
# test_add_corpus_document_value_error()
#--------------------------------------------------------
@responses.activate
def test_add_corpus_document_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents'
responses.add(responses.POST,
url,
status=200)
# Set up parameter values
corpus = 'testString'
document = {}
acd_url = 'testString'
api_key = 'testString'
flow_id = 'testString'
access_token = 'testString'
other_annotators = [{ 'foo': 'bar' }]
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.add_corpus_document(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for get_document_info
#-----------------------------------------------------------------------------
class TestGetDocumentInfo():
#--------------------------------------------------------
# get_document_info()
#--------------------------------------------------------
@responses.activate
def test_get_document_info_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString'
mock_response = '{}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
verbose = True
# Invoke method
response = service.get_document_info(
corpus,
document_id,
verbose=verbose,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'verbose={}'.format('true' if verbose else 'false') in query_string
#--------------------------------------------------------
# test_get_document_info_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_document_info_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString'
mock_response = '{}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
# Invoke method
response = service.get_document_info(
corpus,
document_id,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
#--------------------------------------------------------
# test_get_document_info_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_document_info_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString'
mock_response = '{}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
"document_id": document_id,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_document_info(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for get_document_annotations
#-----------------------------------------------------------------------------
class TestGetDocumentAnnotations():
#--------------------------------------------------------
# get_document_annotations()
#--------------------------------------------------------
@responses.activate
def test_get_document_annotations_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString/annotations'
responses.add(responses.GET,
url,
status=200)
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
document_section = 'testString'
cuis = ['testString']
include_text = True
# Invoke method
response = service.get_document_annotations(
corpus,
document_id,
document_section,
cuis=cuis,
include_text=include_text,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'document_section={}'.format(document_section) in query_string
assert 'cuis={}'.format(','.join(cuis)) in query_string
assert 'include_text={}'.format('true' if include_text else 'false') in query_string
#--------------------------------------------------------
# test_get_document_annotations_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_document_annotations_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString/annotations'
responses.add(responses.GET,
url,
status=200)
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
document_section = 'testString'
# Invoke method
response = service.get_document_annotations(
corpus,
document_id,
document_section,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'document_section={}'.format(document_section) in query_string
#--------------------------------------------------------
# test_get_document_annotations_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_document_annotations_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString/annotations'
responses.add(responses.GET,
url,
status=200)
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
document_section = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
"document_id": document_id,
"document_section": document_section,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_document_annotations(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for get_document_categories
#-----------------------------------------------------------------------------
class TestGetDocumentCategories():
#--------------------------------------------------------
# get_document_categories()
#--------------------------------------------------------
@responses.activate
def test_get_document_categories_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString/categories'
mock_response = '{"modelLicense": "model_license", "highlightedTitle": {}, "highlightedAbstract": {}, "highlightedBody": {}, "highlightedSections": {"mapKey": {}}, "passages": {"mapKey": {"mapKey": {"id": "id", "negated": false, "sentences": [{"documentSection": "document_section", "text": {}, "begin": 5, "end": 3, "timestamp": 9}]}}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
highlight_tag_begin = 'testString'
highlight_tag_end = 'testString'
types = ['testString']
category = 'disorders'
only_negated_concepts = True
fields = 'testString'
limit = 38
# Invoke method
response = service.get_document_categories(
corpus,
document_id,
highlight_tag_begin=highlight_tag_begin,
highlight_tag_end=highlight_tag_end,
types=types,
category=category,
only_negated_concepts=only_negated_concepts,
fields=fields,
limit=limit,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'highlight_tag_begin={}'.format(highlight_tag_begin) in query_string
assert 'highlight_tag_end={}'.format(highlight_tag_end) in query_string
assert 'types={}'.format(','.join(types)) in query_string
assert 'category={}'.format(category) in query_string
assert 'only_negated_concepts={}'.format('true' if only_negated_concepts else 'false') in query_string
assert '_fields={}'.format(fields) in query_string
assert '_limit={}'.format(limit) in query_string
#--------------------------------------------------------
# test_get_document_categories_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_document_categories_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString/categories'
mock_response = '{"modelLicense": "model_license", "highlightedTitle": {}, "highlightedAbstract": {}, "highlightedBody": {}, "highlightedSections": {"mapKey": {}}, "passages": {"mapKey": {"mapKey": {"id": "id", "negated": false, "sentences": [{"documentSection": "document_section", "text": {}, "begin": 5, "end": 3, "timestamp": 9}]}}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
# Invoke method
response = service.get_document_categories(
corpus,
document_id,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
#--------------------------------------------------------
# test_get_document_categories_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_document_categories_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString/categories'
mock_response = '{"modelLicense": "model_license", "highlightedTitle": {}, "highlightedAbstract": {}, "highlightedBody": {}, "highlightedSections": {"mapKey": {}}, "passages": {"mapKey": {"mapKey": {"id": "id", "negated": false, "sentences": [{"documentSection": "document_section", "text": {}, "begin": 5, "end": 3, "timestamp": 9}]}}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
"document_id": document_id,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_document_categories(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for get_document_multiple_categories
#-----------------------------------------------------------------------------
class TestGetDocumentMultipleCategories():
#--------------------------------------------------------
# get_document_multiple_categories()
#--------------------------------------------------------
@responses.activate
def test_get_document_multiple_categories_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString/categories'
mock_response = '{"modelLicense": "model_license", "highlightedTitle": {}, "highlightedAbstract": {}, "highlightedBody": {}, "highlightedSections": {"mapKey": {}}, "passages": {"mapKey": {"mapKey": {"id": "id", "negated": false, "sentences": [{"documentSection": "document_section", "text": {}, "begin": 5, "end": 3, "timestamp": 9}]}}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}'
responses.add(responses.POST,
url,
body=mock_response,
content_type='application/json',
status=200)
# Construct a dict representation of a StringBuilder model
string_builder_model = {}
# Construct a dict representation of a AnnotationModel model
annotation_model_model = {}
annotation_model_model['uniqueId'] = 38
annotation_model_model['stickyIds'] = [38]
annotation_model_model['ontology'] = 'testString'
annotation_model_model['section'] = 'testString'
annotation_model_model['preferredName'] = 'testString'
annotation_model_model['cui'] = 'testString'
annotation_model_model['attributeId'] = 'testString'
annotation_model_model['qualifiers'] = ['testString']
annotation_model_model['type'] = 'testString'
annotation_model_model['negated'] = True
annotation_model_model['hypothetical'] = True
annotation_model_model['unit'] = 'testString'
annotation_model_model['minValue'] = 'testString'
annotation_model_model['maxValue'] = 'testString'
annotation_model_model['operator'] = 'testString'
annotation_model_model['nluSourceType'] = 'testString'
annotation_model_model['nluRelation'] = 'testString'
annotation_model_model['nluTargetType'] = 'testString'
annotation_model_model['nluEntityIndex'] = 'testString'
annotation_model_model['nluMentionIndex'] = 'testString'
annotation_model_model['nluRelationId'] = 'testString'
annotation_model_model['nluSide'] = 'testString'
annotation_model_model['begin'] = 38
annotation_model_model['end'] = 38
annotation_model_model['score'] = 36.0
annotation_model_model['timestamp'] = 26
annotation_model_model['features'] = {}
annotation_model_model['hits'] = 38
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
model_license = 'testString'
highlight_tag_begin = 'testString'
highlight_tag_end = 'testString'
fields = 'testString'
limit = 38
categories = []
# Invoke method
response = service.get_doc_multiple_categories(
corpus,
document_id,
categories,
highlight_tag_begin=highlight_tag_begin,
highlight_tag_end=highlight_tag_end,
fields=fields,
limit=limit,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'highlight_tag_begin={}'.format(highlight_tag_begin) in query_string
assert 'highlight_tag_end={}'.format(highlight_tag_end) in query_string
assert '_fields={}'.format(fields) in query_string
assert '_limit={}'.format(limit) in query_string
#--------------------------------------------------------
# test_get_document_multiple_categories_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_document_multiple_categories_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString/categories'
mock_response = '{"modelLicense": "model_license", "highlightedTitle": {}, "highlightedAbstract": {}, "highlightedBody": {}, "highlightedSections": {"mapKey": {}}, "passages": {"mapKey": {"mapKey": {"id": "id", "negated": false, "sentences": [{"documentSection": "document_section", "text": {}, "begin": 5, "end": 3, "timestamp": 9}]}}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}'
responses.add(responses.POST,
url,
body=mock_response,
content_type='application/json',
status=200)
# Construct a dict representation of a StringBuilder model
string_builder_model = {}
# Construct a dict representation of a AnnotationModel model
annotation_model_model = {}
annotation_model_model['uniqueId'] = 38
annotation_model_model['stickyIds'] = [38]
annotation_model_model['ontology'] = 'testString'
annotation_model_model['section'] = 'testString'
annotation_model_model['preferredName'] = 'testString'
annotation_model_model['cui'] = 'testString'
annotation_model_model['attributeId'] = 'testString'
annotation_model_model['qualifiers'] = ['testString']
annotation_model_model['type'] = 'testString'
annotation_model_model['negated'] = True
annotation_model_model['hypothetical'] = True
annotation_model_model['unit'] = 'testString'
annotation_model_model['minValue'] = 'testString'
annotation_model_model['maxValue'] = 'testString'
annotation_model_model['operator'] = 'testString'
annotation_model_model['nluSourceType'] = 'testString'
annotation_model_model['nluRelation'] = 'testString'
annotation_model_model['nluTargetType'] = 'testString'
annotation_model_model['nluEntityIndex'] = 'testString'
annotation_model_model['nluMentionIndex'] = 'testString'
annotation_model_model['nluRelationId'] = 'testString'
annotation_model_model['nluSide'] = 'testString'
annotation_model_model['begin'] = 38
annotation_model_model['end'] = 38
annotation_model_model['score'] = 36.0
annotation_model_model['timestamp'] = 26
annotation_model_model['features'] = {}
annotation_model_model['hits'] = 38
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
model_license = 'testString'
highlighted_title = string_builder_model
highlighted_abstract = string_builder_model
highlighted_body = string_builder_model
highlighted_sections = {}
passages = {}
annotations = {}
categories = []
# Invoke method
response = service.get_doc_multiple_categories(
corpus,
document_id,
categories,
headers={},
fields={'modelLicense, passages, annotations, highlightedTitle, highlightedAbstract, highlightedBody, highlightedSections'}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
#--------------------------------------------------------
# test_get_document_multiple_categories_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_document_multiple_categories_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString/categories'
mock_response = '{"modelLicense": "model_license", "highlightedTitle": {}, "highlightedAbstract": {}, "highlightedBody": {}, "highlightedSections": {"mapKey": {}}, "passages": {"mapKey": {"mapKey": {"id": "id", "negated": false, "sentences": [{"documentSection": "document_section", "text": {}, "begin": 5, "end": 3, "timestamp": 9}]}}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}'
responses.add(responses.POST,
url,
body=mock_response,
content_type='application/json',
status=200)
# Construct a dict representation of a StringBuilder model
string_builder_model = {}
# Construct a dict representation of a AnnotationModel model
annotation_model_model = {}
annotation_model_model['uniqueId'] = 38
annotation_model_model['stickyIds'] = [38]
annotation_model_model['ontology'] = 'testString'
annotation_model_model['section'] = 'testString'
annotation_model_model['preferredName'] = 'testString'
annotation_model_model['cui'] = 'testString'
annotation_model_model['attributeId'] = 'testString'
annotation_model_model['qualifiers'] = ['testString']
annotation_model_model['type'] = 'testString'
annotation_model_model['negated'] = True
annotation_model_model['hypothetical'] = True
annotation_model_model['unit'] = 'testString'
annotation_model_model['minValue'] = 'testString'
annotation_model_model['maxValue'] = 'testString'
annotation_model_model['operator'] = 'testString'
annotation_model_model['nluSourceType'] = 'testString'
annotation_model_model['nluRelation'] = 'testString'
annotation_model_model['nluTargetType'] = 'testString'
annotation_model_model['nluEntityIndex'] = 'testString'
annotation_model_model['nluMentionIndex'] = 'testString'
annotation_model_model['nluRelationId'] = 'testString'
annotation_model_model['nluSide'] = 'testString'
annotation_model_model['begin'] = 38
annotation_model_model['end'] = 38
annotation_model_model['score'] = 36.0
annotation_model_model['timestamp'] = 26
annotation_model_model['features'] = {}
annotation_model_model['hits'] = 38
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
model_license = 'testString'
highlighted_title = string_builder_model
highlighted_abstract = string_builder_model
highlighted_body = string_builder_model
highlighted_sections = {}
passages = {}
annotations = {}
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
"document_id": document_id,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_doc_multiple_categories(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for get_search_matches
#-----------------------------------------------------------------------------
class TestGetSearchMatches():
#--------------------------------------------------------
# get_search_matches()
#--------------------------------------------------------
@responses.activate
def test_get_search_matches_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString/search_matches'
mock_response = '{"externalId": "external_id", "documentId": "document_id", "parentDocumentId": "parent_document_id", "publicationName": "publication_name", "publicationDate": "publication_date", "publicationURL": "publication_url", "authors": ["authors"], "title": "title", "medlineLicense": "medline_license", "hrefPubMed": "href_pub_med", "hrefPmc": "href_pmc", "hrefDoi": "href_doi", "pdfUrl": "pdf_url", "referenceUrl": "reference_url", "highlightedTitle": {}, "highlightedAbstract": {}, "highlightedBody": {}, "highlightedSections": {"mapKey": {}}, "passages": {"mapKey": {"mapKey": {"negated": false, "score": 5, "sentences": [{"documentSection": "document_section", "text": {}, "begin": 5, "end": 3, "timestamp": 9}], "id": "id"}}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
min_score = 36.0
cuis = ['testString']
text = ['testString']
types = ['testString']
attributes = ['testString']
values = ['testString']
nlu_relations = ['testString']
limit = 38
search_tag_begin = 'testString'
search_tag_end = 'testString'
related_tag_begin = 'testString'
related_tag_end = 'testString'
fields = 'testString'
# Invoke method
response = service.get_search_matches(
corpus,
document_id,
min_score,
cuis=cuis,
text=text,
types=types,
attributes=attributes,
values=values,
nlu_relations=nlu_relations,
limit=limit,
search_tag_begin=search_tag_begin,
search_tag_end=search_tag_end,
related_tag_begin=related_tag_begin,
related_tag_end=related_tag_end,
fields=fields,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'min_score={}'.format(min_score) in query_string
assert 'cuis={}'.format(','.join(cuis)) in query_string
assert 'text={}'.format(','.join(text)) in query_string
assert 'types={}'.format(','.join(types)) in query_string
assert 'attributes={}'.format(','.join(attributes)) in query_string
assert 'values={}'.format(','.join(values)) in query_string
assert 'nlu_relations={}'.format(','.join(nlu_relations)) in query_string
assert '_limit={}'.format(limit) in query_string
assert 'search_tag_begin={}'.format(search_tag_begin) in query_string
assert 'search_tag_end={}'.format(search_tag_end) in query_string
assert 'related_tag_begin={}'.format(related_tag_begin) in query_string
assert 'related_tag_end={}'.format(related_tag_end) in query_string
assert '_fields={}'.format(fields) in query_string
#--------------------------------------------------------
# test_get_search_matches_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_search_matches_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString/search_matches'
mock_response = '{"externalId": "external_id", "documentId": "document_id", "parentDocumentId": "parent_document_id", "publicationName": "publication_name", "publicationDate": "publication_date", "publicationURL": "publication_url", "authors": ["authors"], "title": "title", "medlineLicense": "medline_license", "hrefPubMed": "href_pub_med", "hrefPmc": "href_pmc", "hrefDoi": "href_doi", "pdfUrl": "pdf_url", "referenceUrl": "reference_url", "highlightedTitle": {}, "highlightedAbstract": {}, "highlightedBody": {}, "highlightedSections": {"mapKey": {}}, "passages": {"mapKey": {"mapKey": {"negated": false, "score": 5, "sentences": [{"documentSection": "document_section", "text": {}, "begin": 5, "end": 3, "timestamp": 9}], "id": "id"}}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
min_score = 36.0
# Invoke method
response = service.get_search_matches(
corpus,
document_id,
min_score,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'min_score={}'.format(min_score) in query_string
#--------------------------------------------------------
# test_get_search_matches_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_search_matches_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/documents/testString/search_matches'
mock_response = '{"externalId": "external_id", "documentId": "document_id", "parentDocumentId": "parent_document_id", "publicationName": "publication_name", "publicationDate": "publication_date", "publicationURL": "publication_url", "authors": ["authors"], "title": "title", "medlineLicense": "medline_license", "hrefPubMed": "href_pub_med", "hrefPmc": "href_pmc", "hrefDoi": "href_doi", "pdfUrl": "pdf_url", "referenceUrl": "reference_url", "highlightedTitle": {}, "highlightedAbstract": {}, "highlightedBody": {}, "highlightedSections": {"mapKey": {}}, "passages": {"mapKey": {"mapKey": {"negated": false, "score": 5, "sentences": [{"documentSection": "document_section", "text": {}, "begin": 5, "end": 3, "timestamp": 9}], "id": "id"}}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
document_id = 'testString'
min_score = 36.0
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
"document_id": document_id,
"min_score": min_score,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_search_matches(**req_copy)
# endregion
##############################################################################
# End of Service: Documents
##############################################################################
##############################################################################
# Start of Service: Corpora
##############################################################################
# region
#-----------------------------------------------------------------------------
# Test Class for get_corpora_config
#-----------------------------------------------------------------------------
class TestGetCorporaConfig():
#--------------------------------------------------------
# get_corpora_config()
#--------------------------------------------------------
@responses.activate
def test_get_corpora_config_all_params(self):
# Set up mock
url = base_url + '/v1/corpora'
mock_response = '{"corpora": [{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
verbose = True
# Invoke method
response = service.get_corpora_config(
verbose=verbose,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'verbose={}'.format('true' if verbose else 'false') in query_string
#--------------------------------------------------------
# test_get_corpora_config_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_corpora_config_required_params(self):
# Set up mock
url = base_url + '/v1/corpora'
mock_response = '{"corpora": [{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Invoke method
response = service.get_corpora_config()
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
#--------------------------------------------------------
# test_get_corpora_config_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_corpora_config_value_error(self):
# Set up mock
url = base_url + '/v1/corpora'
mock_response = '{"corpora": [{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_corpora_config(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for set_corpus_schema
#-----------------------------------------------------------------------------
class TestSetCorpusSchema():
#--------------------------------------------------------
# set_corpus_schema()
#--------------------------------------------------------
@responses.activate
def test_set_corpus_schema_all_params(self):
# Set up mock
url = base_url + '/v1/corpora'
mock_response = '{"corpora": [{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}]}'
responses.add(responses.POST,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
enrichment_targets = [{ 'foo': 'bar' }]
metadata_fields = [{ 'foo': 'bar' }]
corpus_name = 'testString'
references = {}
# Invoke method
response = service.set_corpus_schema(
enrichment_targets=enrichment_targets,
metadata_fields=metadata_fields,
corpus_name=corpus_name,
references=references,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate body params
req_body = json.loads(str(responses.calls[0].request.body, 'utf-8'))
assert req_body['enrichmentTargets'] == [{ 'foo': 'bar' }]
assert req_body['metadataFields'] == [{ 'foo': 'bar' }]
assert req_body['corpusName'] == 'testString'
assert req_body['references'] == {}
#--------------------------------------------------------
# test_set_corpus_schema_value_error()
#--------------------------------------------------------
@responses.activate
def test_set_corpus_schema_value_error(self):
# Set up mock
url = base_url + '/v1/corpora'
mock_response = '{"corpora": [{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}]}'
responses.add(responses.POST,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
enrichment_targets = [{ 'foo': 'bar' }]
metadata_fields = [{ 'foo': 'bar' }]
corpus_name = 'testString'
references = {}
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.set_corpus_schema(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for delete_corpus_schema
#-----------------------------------------------------------------------------
class TestDeleteCorpusSchema():
#--------------------------------------------------------
# delete_corpus_schema()
#--------------------------------------------------------
@responses.activate
def test_delete_corpus_schema_all_params(self):
# Set up mock
url = base_url + '/v1/corpora'
mock_response = '{"corpora": [{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}]}'
responses.add(responses.DELETE,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
instance = 'testString'
# Invoke method
response = service.delete_corpus_schema(
instance,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'instance={}'.format(instance) in query_string
#--------------------------------------------------------
# test_delete_corpus_schema_value_error()
#--------------------------------------------------------
@responses.activate
def test_delete_corpus_schema_value_error(self):
# Set up mock
url = base_url + '/v1/corpora'
mock_response = '{"corpora": [{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}]}'
responses.add(responses.DELETE,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
instance = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"instance": instance,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.delete_corpus_schema(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for set_corpus_config
#-----------------------------------------------------------------------------
class TestSetCorpusConfig():
#--------------------------------------------------------
# set_corpus_config()
#--------------------------------------------------------
@responses.activate
def test_set_corpus_config_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/configure'
mock_response = '{"corpora": [{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}]}'
responses.add(responses.POST,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
user_name = 'testString'
password = 'testString'
corpus_uri = 'testString'
# Invoke method
response = service.set_corpus_config(
user_name=user_name,
password=password,
corpus_uri=corpus_uri,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate body params
req_body = json.loads(str(responses.calls[0].request.body, 'utf-8'))
assert req_body['userName'] == 'testString'
assert req_body['password'] == 'testString'
assert req_body['corpusURI'] == 'testString'
#--------------------------------------------------------
# test_set_corpus_config_value_error()
#--------------------------------------------------------
@responses.activate
def test_set_corpus_config_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/configure'
mock_response = '{"corpora": [{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}]}'
responses.add(responses.POST,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
user_name = 'testString'
password = 'testString'
corpus_uri = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.set_corpus_config(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for monitor_corpus
#-----------------------------------------------------------------------------
class TestMonitorCorpus():
#--------------------------------------------------------
# monitor_corpus()
#--------------------------------------------------------
@responses.activate
def test_monitor_corpus_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/monitor'
responses.add(responses.PUT,
url,
status=200)
# Set up parameter values
apikey = 'testString'
# Invoke method
response = service.monitor_corpus(
apikey,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'apikey={}'.format(apikey) in query_string
#--------------------------------------------------------
# test_monitor_corpus_value_error()
#--------------------------------------------------------
@responses.activate
def test_monitor_corpus_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/monitor'
responses.add(responses.PUT,
url,
status=200)
# Set up parameter values
apikey = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"apikey": apikey,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.monitor_corpus(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for enable_corpus_search_tracking
#-----------------------------------------------------------------------------
class TestEnableCorpusSearchTracking():
#--------------------------------------------------------
# enable_corpus_search_tracking()
#--------------------------------------------------------
@responses.activate
def test_enable_corpus_search_tracking_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/tracking'
responses.add(responses.PUT,
url,
status=200)
# Set up parameter values
enable_tracking = True
# Invoke method
response = service.enable_corpus_search_tracking(
enable_tracking=enable_tracking,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'enable_tracking={}'.format('true' if enable_tracking else 'false') in query_string
#--------------------------------------------------------
# test_enable_corpus_search_tracking_required_params()
#--------------------------------------------------------
@responses.activate
def test_enable_corpus_search_tracking_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/tracking'
responses.add(responses.PUT,
url,
status=200)
# Invoke method
response = service.enable_corpus_search_tracking()
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
#--------------------------------------------------------
# test_enable_corpus_search_tracking_value_error()
#--------------------------------------------------------
@responses.activate
def test_enable_corpus_search_tracking_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/tracking'
responses.add(responses.PUT,
url,
status=200)
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.enable_corpus_search_tracking(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for get_corpus_config
#-----------------------------------------------------------------------------
class TestGetCorpusConfig():
#--------------------------------------------------------
# get_corpus_config()
#--------------------------------------------------------
@responses.activate
def test_get_corpus_config_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString'
mock_response = '{"corpora": [{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
verbose = True
# Invoke method
response = service.get_corpus_config(
corpus,
verbose=verbose,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'verbose={}'.format('true' if verbose else 'false') in query_string
#--------------------------------------------------------
# test_get_corpus_config_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_corpus_config_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString'
mock_response = '{"corpora": [{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
# Invoke method
response = service.get_corpus_config(
corpus,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
#--------------------------------------------------------
# test_get_corpus_config_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_corpus_config_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString'
mock_response = '{"corpora": [{"corpusName": "corpus_name", "ontologies": ["ontologies"], "descriptiveName": "descriptive_name", "bvt": false, "elasticsearchIndex": "elasticsearch_index"}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_corpus_config(**req_copy)
# endregion
##############################################################################
# End of Service: Corpora
##############################################################################
##############################################################################
# Start of Service: Status
##############################################################################
# region
#-----------------------------------------------------------------------------
# Test Class for get_health_check_status
#-----------------------------------------------------------------------------
class TestGetHealthCheckStatus():
#--------------------------------------------------------
# get_health_check_status()
#--------------------------------------------------------
@responses.activate
def test_get_health_check_status_all_params(self):
# Set up mock
url = base_url + '/v1/status/health_check'
mock_response = '{"version": "version", "upTime": "up_time", "serviceState": "OK", "stateDetails": "state_details", "hostName": "host_name", "requestCount": 13, "maxMemoryMb": 13, "commitedMemoryMb": 18, "inUseMemoryMb": 16, "availableProcessors": 20, "concurrentRequests": 19, "maxConcurrentRequests": 23, "totalRejectedRequests": 23, "totalBlockedRequests": 22}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
accept = 'application/json'
format = 'json'
# Invoke method
response = service.get_health_check_status(
accept=accept,
format=format,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'format={}'.format(format) in query_string
#--------------------------------------------------------
# test_get_health_check_status_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_health_check_status_required_params(self):
# Set up mock
url = base_url + '/v1/status/health_check'
mock_response = '{"version": "version", "upTime": "up_time", "serviceState": "OK", "stateDetails": "state_details", "hostName": "host_name", "requestCount": 13, "maxMemoryMb": 13, "commitedMemoryMb": 18, "inUseMemoryMb": 16, "availableProcessors": 20, "concurrentRequests": 19, "maxConcurrentRequests": 23, "totalRejectedRequests": 23, "totalBlockedRequests": 22}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Invoke method
response = service.get_health_check_status()
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# endregion
##############################################################################
# End of Service: Status
##############################################################################
##############################################################################
# Start of Service: Search
##############################################################################
# region
#-----------------------------------------------------------------------------
# Test Class for search
#-----------------------------------------------------------------------------
class TestSearch():
#--------------------------------------------------------
# search()
#--------------------------------------------------------
@responses.activate
def test_search_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/search'
mock_response = '{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation"}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [], "attributeValues": [], "relations": [], "mesh": [], "text": []}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text"}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [], "searchTermToPassages": {"mapKey": []}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": []}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": []}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": []}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "annotations": {"mapKey": null}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [], "types": ["types"], "attributes": [], "values": [], "ranges": {"mapKey": null}, "typeahead": [], "aggregations": {"mapKey": []}, "dateHistograms": {"mapKey": []}, "qualifiers": [], "expandedQuery": {"anyKey": "anyValue"}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": null}, "documents": [], "subQueries": []}]}]}]}]}]}]}]}]}]}'
responses.add(responses.POST,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
body = {}
returns = {'documents'}
verbose = True
# Invoke method
# response = service.search(
# corpus,
# returns,
# verbose=verbose,
# headers={}
# )
# Check for correct operation
# assert len(responses.calls) == 1
# assert response.status_code == 200
# Validate query params
# query_string = responses.calls[0].request.url.split('?',1)[1]
# query_string = requests.utils.unquote(query_string)
# assert 'verbose={}'.format('true' if verbose else 'false') in query_string
# Validate body params
# req_body = json.loads(str(responses.calls[0].request.body, 'utf-8'))
# assert req_body == body
#--------------------------------------------------------
# test_search_required_params()
#--------------------------------------------------------
@responses.activate
def test_search_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/search'
mock_response = '{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation"}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [], "attributeValues": [], "relations": [], "mesh": [], "text": []}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text"}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [], "searchTermToPassages": {"mapKey": []}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": []}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": []}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": []}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "annotations": {"mapKey": null}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [], "types": ["types"], "attributes": [], "values": [], "ranges": {"mapKey": null}, "typeahead": [], "aggregations": {"mapKey": []}, "dateHistograms": {"mapKey": []}, "qualifiers": [], "expandedQuery": {"anyKey": "anyValue"}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": null}, "documents": [], "subQueries": []}]}]}]}]}]}]}]}]}]}'
responses.add(responses.POST,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
body = 'testString'
returns = {'documents'}
# Invoke method
# response = service.search(
# corpus,
# returns,
# headers={}
# )
# Check for correct operation
# assert len(responses.calls) == 1
# assert response.status_code == 200
# Validate body params
# req_body = json.loads(str(responses.calls[0].request.body, 'utf-8'))
# assert req_body == body
#--------------------------------------------------------
# test_search_value_error()
#--------------------------------------------------------
@responses.activate
def test_search_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/search'
mock_response = '{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation", "source": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}, "target": {"section": "section", "begin": 5, "end": 3, "coveredText": "covered_text", "source": "source", "type": "type"}}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "attributeValues": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "relations": [{"relationId": "relation_id", "relation": "relation"}], "mesh": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}], "text": [{"uniqueId": 9, "stickyIds": [10], "section": "section", "type": "type", "begin": 5, "end": 3, "coveredText": "covered_text", "cui": "cui", "preferredName": "preferred_name", "source": "source", "negated": false, "hypothetical": true, "timestamp": 9, "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "features": {"mapKey": "inner"}, "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "hits": 4}]}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "text": {}, "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text", "data": {"concepts": [], "attributeValues": [], "relations": [], "mesh": [], "text": []}}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [{"documentSection": "document_section", "timestamp": 9, "preferredName": "preferred_name"}], "searchTermToPassages": {"mapKey": [{"documentSection": "document_section", "timestamp": 9, "preferredName": "preferred_name"}]}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "parents": {"count": 5, "hits": 4}, "children": {"count": 5, "hits": 4}, "siblings": {"count": 5, "hits": 4}, "related": {"count": 5, "hits": 4}, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": [{"messageType": "expanded_request", "url": "url", "request": {"anyKey": "anyValue"}, "headers": ["headers"], "status": 6, "response": {"anyKey": "anyValue"}}]}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": [{"boolOperand": "bool_operand"}]}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": [{"text": "text"}]}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "links": {"hrefSearchMatches": "href_search_matches", "hrefCategories": "href_categories"}, "passages": {"allPassages": [], "searchTermToPassages": {"mapKey": []}}, "annotations": {"mapKey": {"uniqueId": 9, "stickyIds": [10], "ontology": "ontology", "section": "section", "preferredName": "preferred_name", "cui": "cui", "attributeId": "attribute_id", "qualifiers": ["qualifiers"], "type": "type", "negated": false, "hypothetical": true, "unit": "unit", "minValue": "min_value", "maxValue": "max_value", "operator": "operator", "nluSourceType": "nlu_source_type", "nluRelation": "nlu_relation", "nluTargetType": "nlu_target_type", "nluEntityIndex": "nlu_entity_index", "nluMentionIndex": "nlu_mention_index", "nluRelationId": "nlu_relation_id", "nluSide": "nlu_side", "begin": 5, "end": 3, "score": 5, "timestamp": 9, "features": {"mapKey": "inner"}, "hits": 4}}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "types": ["types"], "attributes": [{"attributeId": "attribute_id", "displayName": "display_name", "count": 5}], "values": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "ranges": {"mapKey": {"operator": "operator", "min": "min", "max": "max", "count": 5}}, "typeahead": [{"ontology": "ontology", "cui": "cui", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "count": 5, "hitCount": 9, "score": 5, "documentIds": ["document_ids"], "dataType": "data_type", "unit": "unit", "operator": "operator", "minValue": "min_value", "maxValue": "max_value", "vocab": "vocab", "properties": ["properties"]}], "aggregations": {"mapKey": [{"name": "name", "documentCount": 14}]}, "dateHistograms": {"mapKey": [{"date": "date", "hits": 4}]}, "qualifiers": [{"id": "id", "name": "name"}], "backend": {"messages": []}, "expandedQuery": {"anyKey": "anyValue"}, "parsedBoolExpression": {"boolExpression": "bool_expression", "boolOperands": []}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": {"unstructured": []}}, "metadata": {"corpus": "corpus", "corpusDescription": "corpus_description", "fields": {"mapKey": ["inner"]}}, "documents": [{"documentId": "document_id", "title": "title", "metadata": {"mapKey": ["inner"]}, "sectionName": "section_name", "sectionId": "section_id", "corpus": "corpus", "annotations": {"mapKey": null}}], "subQueries": [{"href": "href", "pageNumber": 11, "get_limit": 9, "totalDocumentCount": 20, "concepts": [], "types": ["types"], "attributes": [], "values": [], "ranges": {"mapKey": null}, "typeahead": [], "aggregations": {"mapKey": []}, "dateHistograms": {"mapKey": []}, "qualifiers": [], "expandedQuery": {"anyKey": "anyValue"}, "conceptsExist": {"mapKey": 5}, "cursorId": "cursor_id", "vocabs": ["vocabs"], "annotations": {"mapKey": null}, "documents": [], "subQueries": []}]}]}]}]}]}]}]}]}]}'
responses.add(responses.POST,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
body = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
"body": body,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.search(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for get_fields
#-----------------------------------------------------------------------------
class TestGetFields():
#--------------------------------------------------------
# get_fields()
#--------------------------------------------------------
@responses.activate
def test_get_fields_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/search/metadata'
mock_response = '{"fields": {"mapKey": {"supports": ["supports"]}}, "sectionFieldNames": ["section_field_names"], "attrSectionFieldNames": ["attr_section_field_names"], "qualifierSectionFieldNames": ["qualifier_section_field_names"], "meshSectionFieldNames": ["mesh_section_field_names"], "fieldIndexMap": {"mapKey": "inner"}}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
# Invoke method
response = service.get_fields(
corpus,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
#--------------------------------------------------------
# test_get_fields_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_fields_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/search/metadata'
mock_response = '{"fields": {"mapKey": {"supports": ["supports"]}}, "sectionFieldNames": ["section_field_names"], "attrSectionFieldNames": ["attr_section_field_names"], "qualifierSectionFieldNames": ["qualifier_section_field_names"], "meshSectionFieldNames": ["mesh_section_field_names"], "fieldIndexMap": {"mapKey": "inner"}}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_fields(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for typeahead
#-----------------------------------------------------------------------------
class TestTypeahead():
#--------------------------------------------------------
# typeahead()
#--------------------------------------------------------
@responses.activate
def test_typeahead_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/search/typeahead'
mock_response = '{"concepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"]}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
query = 'testString'
ontologies = ['concepts']
types = ['testString']
category = 'disorders'
verbose = True
limit = 38
max_hit_count = 38
no_duplicates = True
# Invoke method
response = service.typeahead(
corpus,
query,
ontologies=ontologies,
types=types,
category=category,
verbose=verbose,
limit=limit,
max_hit_count=max_hit_count,
no_duplicates=no_duplicates,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'query={}'.format(query) in query_string
assert 'ontologies={}'.format(','.join(ontologies)) in query_string
assert 'types={}'.format(','.join(types)) in query_string
assert 'category={}'.format(category) in query_string
assert 'verbose={}'.format('true' if verbose else 'false') in query_string
assert '_limit={}'.format(limit) in query_string
assert 'max_hit_count={}'.format(max_hit_count) in query_string
assert 'no_duplicates={}'.format('true' if no_duplicates else 'false') in query_string
#--------------------------------------------------------
# test_typeahead_required_params()
#--------------------------------------------------------
@responses.activate
def test_typeahead_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/search/typeahead'
mock_response = '{"concepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"]}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
query = 'testString'
# Invoke method
response = service.typeahead(
corpus,
query,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'query={}'.format(query) in query_string
#--------------------------------------------------------
# test_typeahead_value_error()
#--------------------------------------------------------
@responses.activate
def test_typeahead_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/search/typeahead'
mock_response = '{"concepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"]}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
query = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
"query": query,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.typeahead(**req_copy)
# endregion
##############################################################################
# End of Service: Search
##############################################################################
##############################################################################
# Start of Service: Concepts
##############################################################################
# region
#-----------------------------------------------------------------------------
# Test Class for get_concepts
#-----------------------------------------------------------------------------
class TestGetConcepts():
#--------------------------------------------------------
# get_concepts()
#--------------------------------------------------------
@responses.activate
def test_get_concepts_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts'
mock_response = '{"concepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"]}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
cuis = ['testString']
preferred_names = ['testString']
surface_forms = ['testString']
attributes = ['testString']
verbose = True
sort = 'hitCount'
limit = 38
# Invoke method
response = service.get_concepts(
corpus,
cuis=cuis,
preferred_names=preferred_names,
surface_forms=surface_forms,
attributes=attributes,
verbose=verbose,
sort=sort,
limit=limit,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'cuis={}'.format(','.join(cuis)) in query_string
assert 'preferred_names={}'.format(','.join(preferred_names)) in query_string
assert 'surface_forms={}'.format(','.join(surface_forms)) in query_string
assert 'attributes={}'.format(','.join(attributes)) in query_string
assert 'verbose={}'.format('true' if verbose else 'false') in query_string
assert '_sort={}'.format(sort) in query_string
assert '_limit={}'.format(limit) in query_string
#--------------------------------------------------------
# test_get_concepts_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_concepts_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts'
mock_response = '{"concepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"]}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
# Invoke method
response = service.get_concepts(
corpus,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
#--------------------------------------------------------
# test_get_concepts_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_concepts_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts'
mock_response = '{"concepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"]}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_concepts(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for add_artifact
#-----------------------------------------------------------------------------
class TestAddArtifact():
#--------------------------------------------------------
# add_artifact()
#--------------------------------------------------------
@responses.activate
def test_add_artifact_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/definitions'
responses.add(responses.POST,
url,
status=200)
# Construct a dict representation of a DictonaryEntry model
dictonary_entry_model = {}
dictonary_entry_model['children'] = ['testString']
dictonary_entry_model['cui'] = 'testString'
dictonary_entry_model['definition'] = ['testString']
dictonary_entry_model['parents'] = ['testString']
dictonary_entry_model['preferredName'] = 'testString'
dictonary_entry_model['semtypes'] = ['testString']
dictonary_entry_model['siblings'] = ['testString']
dictonary_entry_model['surfaceForms'] = ['testString']
dictonary_entry_model['variants'] = ['testString']
dictonary_entry_model['vocab'] = 'testString'
dictonary_entry_model['related'] = ['testString']
dictonary_entry_model['source'] = 'testString'
dictonary_entry_model['source_version'] = 'testString'
# Construct a dict representation of a PossbileValues model
possbile_values_model = {}
possbile_values_model['displayValue'] = 'testString'
possbile_values_model['value'] = 'testString'
# Construct a dict representation of a AttributeEntry model
attribute_entry_model = {}
attribute_entry_model['attr_name'] = 'testString'
attribute_entry_model['data_type'] = 'testString'
attribute_entry_model['default_value'] = 'testString'
attribute_entry_model['description'] = 'testString'
attribute_entry_model['display_name'] = 'testString'
attribute_entry_model['doc_id'] = 'testString'
attribute_entry_model['field_values'] = ['testString']
attribute_entry_model['maximum_value'] = 'testString'
attribute_entry_model['minimum_value'] = 'testString'
attribute_entry_model['multi_value'] = True
attribute_entry_model['units'] = 'testString'
attribute_entry_model['valueType'] = 'testString'
attribute_entry_model['possible_values'] = [possbile_values_model]
# Set up parameter values
corpus = 'testString'
dictionary_entry = dictonary_entry_model
attribute_entry = attribute_entry_model
# Invoke method
response = service.add_artifact(
corpus,
dictionary_entry=dictionary_entry,
attribute_entry=attribute_entry,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate body params
req_body = json.loads(str(responses.calls[0].request.body, 'utf-8'))
assert req_body['dictionaryEntry'] == dictonary_entry_model
assert req_body['attributeEntry'] == attribute_entry_model
#--------------------------------------------------------
# test_add_artifact_value_error()
#--------------------------------------------------------
@responses.activate
def test_add_artifact_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/definitions'
responses.add(responses.POST,
url,
status=200)
# Construct a dict representation of a DictonaryEntry model
dictonary_entry_model = {}
dictonary_entry_model['children'] = ['testString']
dictonary_entry_model['cui'] = 'testString'
dictonary_entry_model['definition'] = ['testString']
dictonary_entry_model['parents'] = ['testString']
dictonary_entry_model['preferredName'] = 'testString'
dictonary_entry_model['semtypes'] = ['testString']
dictonary_entry_model['siblings'] = ['testString']
dictonary_entry_model['surfaceForms'] = ['testString']
dictonary_entry_model['variants'] = ['testString']
dictonary_entry_model['vocab'] = 'testString'
dictonary_entry_model['related'] = ['testString']
dictonary_entry_model['source'] = 'testString'
dictonary_entry_model['source_version'] = 'testString'
# Construct a dict representation of a PossbileValues model
possbile_values_model = {}
possbile_values_model['displayValue'] = 'testString'
possbile_values_model['value'] = 'testString'
# Construct a dict representation of a AttributeEntry model
attribute_entry_model = {}
attribute_entry_model['attr_name'] = 'testString'
attribute_entry_model['data_type'] = 'testString'
attribute_entry_model['default_value'] = 'testString'
attribute_entry_model['description'] = 'testString'
attribute_entry_model['display_name'] = 'testString'
attribute_entry_model['doc_id'] = 'testString'
attribute_entry_model['field_values'] = ['testString']
attribute_entry_model['maximum_value'] = 'testString'
attribute_entry_model['minimum_value'] = 'testString'
attribute_entry_model['multi_value'] = True
attribute_entry_model['units'] = 'testString'
attribute_entry_model['valueType'] = 'testString'
attribute_entry_model['possible_values'] = [possbile_values_model]
# Set up parameter values
corpus = 'testString'
dictionary_entry = dictonary_entry_model
attribute_entry = attribute_entry_model
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.add_artifact(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for get_cui_info
#-----------------------------------------------------------------------------
class TestGetCuiInfo():
#--------------------------------------------------------
# get_cui_info()
#--------------------------------------------------------
@responses.activate
def test_get_cui_info_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/testString'
mock_response = '{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "semanticTypes": ["semantic_types"], "surfaceForms": ["surface_forms"], "definition": "definition", "hasParents": false, "hasChildren": true, "hasSiblings": true}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
name_or_id = 'testString'
ontology = 'testString'
fields = 'testString'
tree_layout = True
# Invoke method
response = service.get_cui_info(
corpus,
name_or_id,
ontology=ontology,
fields=fields,
tree_layout=tree_layout,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'ontology={}'.format(ontology) in query_string
assert '_fields={}'.format(fields) in query_string
assert 'tree_layout={}'.format('true' if tree_layout else 'false') in query_string
#--------------------------------------------------------
# test_get_cui_info_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_cui_info_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/testString'
mock_response = '{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "semanticTypes": ["semantic_types"], "surfaceForms": ["surface_forms"], "definition": "definition", "hasParents": false, "hasChildren": true, "hasSiblings": true}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
name_or_id = 'testString'
# Invoke method
response = service.get_cui_info(
corpus,
name_or_id,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
#--------------------------------------------------------
# test_get_cui_info_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_cui_info_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/testString'
mock_response = '{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "semanticTypes": ["semantic_types"], "surfaceForms": ["surface_forms"], "definition": "definition", "hasParents": false, "hasChildren": true, "hasSiblings": true}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
name_or_id = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
"name_or_id": name_or_id,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_cui_info(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for get_hit_count
#-----------------------------------------------------------------------------
class TestGetHitCount():
#--------------------------------------------------------
# get_hit_count()
#--------------------------------------------------------
@responses.activate
def test_get_hit_count_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/testString/hit_count'
mock_response = '{"hitCount": 9}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
name_or_id = 'testString'
ontology = 'testString'
# Invoke method
response = service.get_hit_count(
corpus,
name_or_id,
ontology=ontology,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'ontology={}'.format(ontology) in query_string
#--------------------------------------------------------
# test_get_hit_count_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_hit_count_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/testString/hit_count'
mock_response = '{"hitCount": 9}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
name_or_id = 'testString'
# Invoke method
response = service.get_hit_count(
corpus,
name_or_id,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
#--------------------------------------------------------
# test_get_hit_count_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_hit_count_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/testString/hit_count'
mock_response = '{"hitCount": 9}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
name_or_id = 'testString'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
"name_or_id": name_or_id,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_hit_count(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for get_related_concepts
#-----------------------------------------------------------------------------
class TestGetRelatedConcepts():
#--------------------------------------------------------
# get_related_concepts()
#--------------------------------------------------------
@responses.activate
def test_get_related_concepts_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/testString/related_concepts'
mock_response = '{"concepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": []}]}]}]}]}]}]}]}]}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
name_or_id = 'testString'
relationship = 'children'
ontology = 'testString'
relationship_attributes = ['testString']
sources = ['testString']
recursive = True
tree_layout = True
max_depth = 38
# Invoke method
response = service.get_related_concepts(
corpus,
name_or_id,
relationship,
ontology=ontology,
relationship_attributes=relationship_attributes,
sources=sources,
recursive=recursive,
tree_layout=tree_layout,
max_depth=max_depth,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'relationship={}'.format(relationship) in query_string
assert 'ontology={}'.format(ontology) in query_string
assert 'relationship_attributes={}'.format(','.join(relationship_attributes)) in query_string
assert 'sources={}'.format(','.join(sources)) in query_string
assert 'recursive={}'.format('true' if recursive else 'false') in query_string
assert 'tree_layout={}'.format('true' if tree_layout else 'false') in query_string
assert 'max_depth={}'.format(max_depth) in query_string
#--------------------------------------------------------
# test_get_related_concepts_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_related_concepts_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/testString/related_concepts'
mock_response = '{"concepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": []}]}]}]}]}]}]}]}]}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
name_or_id = 'testString'
relationship = 'children'
# Invoke method
response = service.get_related_concepts(
corpus,
name_or_id,
relationship,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'relationship={}'.format(relationship) in query_string
#--------------------------------------------------------
# test_get_related_concepts_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_related_concepts_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/testString/related_concepts'
mock_response = '{"concepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"], "nextConcepts": []}]}]}]}]}]}]}]}]}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
name_or_id = 'testString'
relationship = 'children'
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
"name_or_id": name_or_id,
"relationship": relationship,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_related_concepts(**req_copy)
#-----------------------------------------------------------------------------
# Test Class for get_similar_concepts
#-----------------------------------------------------------------------------
class TestGetSimilarConcepts():
#--------------------------------------------------------
# get_similar_concepts()
#--------------------------------------------------------
@responses.activate
def test_get_similar_concepts_all_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/testString/similar_concepts'
mock_response = '{"concepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"]}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
name_or_id = 'testString'
return_ontologies = ['testString']
ontology = 'testString'
limit = 38
# Invoke method
response = service.get_similar_concepts(
corpus,
name_or_id,
return_ontologies,
ontology=ontology,
limit=limit,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'return_ontologies={}'.format(','.join(return_ontologies)) in query_string
assert 'ontology={}'.format(ontology) in query_string
assert '_limit={}'.format(limit) in query_string
#--------------------------------------------------------
# test_get_similar_concepts_required_params()
#--------------------------------------------------------
@responses.activate
def test_get_similar_concepts_required_params(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/testString/similar_concepts'
mock_response = '{"concepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"]}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
name_or_id = 'testString'
return_ontologies = ['testString']
# Invoke method
response = service.get_similar_concepts(
corpus,
name_or_id,
return_ontologies,
headers={}
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
# Validate query params
query_string = responses.calls[0].request.url.split('?',1)[1]
query_string = requests.utils.unquote(query_string)
assert 'return_ontologies={}'.format(','.join(return_ontologies)) in query_string
#--------------------------------------------------------
# test_get_similar_concepts_value_error()
#--------------------------------------------------------
@responses.activate
def test_get_similar_concepts_value_error(self):
# Set up mock
url = base_url + '/v1/corpora/testString/concepts/testString/similar_concepts'
mock_response = '{"concepts": [{"cui": "cui", "ontology": "ontology", "preferredName": "preferred_name", "alternativeName": "alternative_name", "semanticType": "semantic_type", "rank": 4, "hitCount": 9, "score": 5, "surfaceForms": ["surface_forms"]}]}'
responses.add(responses.GET,
url,
body=mock_response,
content_type='application/json',
status=200)
# Set up parameter values
corpus = 'testString'
name_or_id = 'testString'
return_ontologies = ['testString']
# Pass in all but one required param and check for a ValueError
req_param_dict = {
"corpus": corpus,
"name_or_id": name_or_id,
"return_ontologies": return_ontologies,
}
for param in req_param_dict.keys():
req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
with pytest.raises(ValueError):
service.get_similar_concepts(**req_copy)
# endregion
##############################################################################
# End of Service: Concepts
##############################################################################
##############################################################################
# Start of Model Tests
##############################################################################
# region
#-----------------------------------------------------------------------------
# Test Class for AttributeEntry
#-----------------------------------------------------------------------------
class TestAttributeEntry():
#--------------------------------------------------------
# Test serialization/deserialization for AttributeEntry
#--------------------------------------------------------
def test_attribute_entry_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
possbile_values_model = {} # PossbileValues
possbile_values_model['displayValue'] = 'testString'
possbile_values_model['value'] = 'testString'
# Construct a json representation of a AttributeEntry model
attribute_entry_model_json = {}
attribute_entry_model_json['attr_name'] = 'testString'
attribute_entry_model_json['data_type'] = 'testString'
attribute_entry_model_json['default_value'] = 'testString'
attribute_entry_model_json['description'] = 'testString'
attribute_entry_model_json['display_name'] = 'testString'
attribute_entry_model_json['doc_id'] = 'testString'
attribute_entry_model_json['field_values'] = ['testString']
attribute_entry_model_json['maximum_value'] = 'testString'
attribute_entry_model_json['minimum_value'] = 'testString'
attribute_entry_model_json['multi_value'] = True
attribute_entry_model_json['units'] = 'testString'
attribute_entry_model_json['valueType'] = 'testString'
attribute_entry_model_json['possible_values'] = [possbile_values_model]
# Construct a model instance of AttributeEntry by calling from_dict on the json representation
attribute_entry_model = AttributeEntry.from_dict(attribute_entry_model_json)
assert attribute_entry_model != False
# Construct a model instance of AttributeEntry by calling from_dict on the json representation
attribute_entry_model_dict = AttributeEntry.from_dict(attribute_entry_model_json).__dict__
attribute_entry_model2 = AttributeEntry(**attribute_entry_model_dict)
# Verify the model instances are equivalent
assert attribute_entry_model == attribute_entry_model2
# Convert model instance back to dict and verify no loss of data
attribute_entry_model_json2 = attribute_entry_model.to_dict()
assert attribute_entry_model_json2 == attribute_entry_model_json
#-----------------------------------------------------------------------------
# Test Class for BoolOperand
#-----------------------------------------------------------------------------
class TestBoolOperand():
#--------------------------------------------------------
# Test serialization/deserialization for BoolOperand
#--------------------------------------------------------
def test_bool_operand_serialization(self):
# Construct a json representation of a BoolOperand model
bool_operand_model_json = {}
bool_operand_model_json['boolOperand'] = 'testString'
# Construct a model instance of BoolOperand by calling from_dict on the json representation
bool_operand_model = BoolOperand.from_dict(bool_operand_model_json)
assert bool_operand_model != False
# Construct a model instance of BoolOperand by calling from_dict on the json representation
bool_operand_model_dict = BoolOperand.from_dict(bool_operand_model_json).__dict__
bool_operand_model2 = BoolOperand(**bool_operand_model_dict)
# Verify the model instances are equivalent
assert bool_operand_model == bool_operand_model2
# Convert model instance back to dict and verify no loss of data
bool_operand_model_json2 = bool_operand_model.to_dict()
assert bool_operand_model_json2 == bool_operand_model_json
#-----------------------------------------------------------------------------
# Test Class for DictonaryEntry
#-----------------------------------------------------------------------------
class TestDictionaryEntry():
#--------------------------------------------------------
# Test serialization/deserialization for DictonaryEntry
#--------------------------------------------------------
def test_dictionary_entry_serialization(self):
# Construct a json representation of a DictonaryEntry model
dictonary_entry_model_json = {}
dictonary_entry_model_json['children'] = ['testString']
dictonary_entry_model_json['cui'] = 'testString'
dictonary_entry_model_json['definition'] = ['testString']
dictonary_entry_model_json['parents'] = ['testString']
dictonary_entry_model_json['preferredName'] = 'testString'
dictonary_entry_model_json['semtypes'] = ['testString']
dictonary_entry_model_json['siblings'] = ['testString']
dictonary_entry_model_json['surfaceForms'] = ['testString']
dictonary_entry_model_json['variants'] = ['testString']
dictonary_entry_model_json['vocab'] = 'testString'
dictonary_entry_model_json['related'] = ['testString']
dictonary_entry_model_json['source'] = 'testString'
dictonary_entry_model_json['source_version'] = 'testString'
# Construct a model instance of DictonaryEntry by calling from_dict on the json representation
dictonary_entry_model = DictionaryEntry.from_dict(dictonary_entry_model_json)
assert dictonary_entry_model != False
# Construct a model instance of DictonaryEntry by calling from_dict on the json representation
dictonary_entry_model_dict = DictionaryEntry.from_dict(dictonary_entry_model_json).__dict__
dictonary_entry_model2 = DictionaryEntry(**dictonary_entry_model_dict)
# Verify the model instances are equivalent
assert dictonary_entry_model == dictonary_entry_model2
# Convert model instance back to dict and verify no loss of data
dictonary_entry_model_json2 = dictonary_entry_model.to_dict()
assert dictonary_entry_model_json2 == dictonary_entry_model_json
#-----------------------------------------------------------------------------
# Test Class for GetDocumentInfoResponse
#-----------------------------------------------------------------------------
class TestGetDocumentInfoResponse():
#--------------------------------------------------------
# Test serialization/deserialization for GetDocumentInfoResponse
#--------------------------------------------------------
def test_get_document_info_response_serialization(self):
# Construct a json representation of a GetDocumentInfoResponse model
get_document_info_response_model_json = {}
get_document_info_response_model_json['foo'] = { 'foo': 'bar' }
# Construct a model instance of GetDocumentInfoResponse by calling from_dict on the json representation
get_document_info_response_model = GetDocumentInfoResponse.from_dict(get_document_info_response_model_json)
assert get_document_info_response_model != False
# Construct a model instance of GetDocumentInfoResponse by calling from_dict on the json representation
get_document_info_response_model_dict = GetDocumentInfoResponse.from_dict(get_document_info_response_model_json).__dict__
get_document_info_response_model2 = GetDocumentInfoResponse(**get_document_info_response_model_dict)
# Verify the model instances are equivalent
assert get_document_info_response_model == get_document_info_response_model2
# Convert model instance back to dict and verify no loss of data
get_document_info_response_model_json2 = get_document_info_response_model.to_dict()
assert get_document_info_response_model_json2 == get_document_info_response_model_json
#-----------------------------------------------------------------------------
# Test Class for Message
#-----------------------------------------------------------------------------
class TestMessage():
#--------------------------------------------------------
# Test serialization/deserialization for Message
#--------------------------------------------------------
def test_message_serialization(self):
# Construct a json representation of a Message model
message_model_json = {}
message_model_json['messageType'] = 'expanded_request'
message_model_json['url'] = 'testString'
message_model_json['request'] = { 'foo': 'bar' }
message_model_json['headers'] = ['testString']
message_model_json['status'] = 38
message_model_json['response'] = { 'foo': 'bar' }
# Construct a model instance of Message by calling from_dict on the json representation
message_model = Message.from_dict(message_model_json)
assert message_model != False
# Construct a model instance of Message by calling from_dict on the json representation
message_model_dict = Message.from_dict(message_model_json).__dict__
message_model2 = Message(**message_model_dict)
# Verify the model instances are equivalent
assert message_model == message_model2
# Convert model instance back to dict and verify no loss of data
message_model_json2 = message_model.to_dict()
assert message_model_json2 == message_model_json
#-----------------------------------------------------------------------------
# Test Class for MetadataFields
#-----------------------------------------------------------------------------
class TestMetadataModel():
#--------------------------------------------------------
# Test serialization/deserialization for MetadataFields
#--------------------------------------------------------
def test_metadata_model_serialization(self):
# Construct a json representation of a MetadataFields model
metadata_fields_model_json = {}
metadata_fields_model_json['corpus'] = 'testString'
metadata_fields_model_json['corpusDescription'] = 'testString'
metadata_fields_model_json['fields'] = {}
# Construct a model instance of MetadataFields by calling from_dict on the json representation
metadata_fields_model = MetadataModel.from_dict(metadata_fields_model_json)
assert metadata_fields_model != False
# Construct a model instance of MetadataFields by calling from_dict on the json representation
metadata_fields_model_dict = MetadataModel.from_dict(metadata_fields_model_json).__dict__
metadata_fields_model2 = MetadataModel(**metadata_fields_model_dict)
# Verify the model instances are equivalent
assert metadata_fields_model == metadata_fields_model2
# Convert model instance back to dict and verify no loss of data
metadata_fields_model_json2 = metadata_fields_model.to_dict()
assert metadata_fields_model_json2 == metadata_fields_model_json
#-----------------------------------------------------------------------------
# Test Class for PassagesModel
#-----------------------------------------------------------------------------
class TestPassagesModel():
#--------------------------------------------------------
# Test serialization/deserialization for PassagesModel
#--------------------------------------------------------
def test_passages_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
string_builder_model = {} # StringBuilder
passage_model = {} # Passage
passage_model['documentSection'] = 'testString'
passage_model['text'] = string_builder_model
passage_model['timestamp'] = 26
passage_model['preferredName'] = 'testString'
# Construct a json representation of a PassagesModel model
passages_model_model_json = {}
passages_model_model_json['allPassages'] = [passage_model]
passages_model_model_json['searchTermToPassages'] = {}
# Construct a model instance of PassagesModel by calling from_dict on the json representation
passages_model_model = PassagesModel.from_dict(passages_model_model_json)
assert passages_model_model != False
# Construct a model instance of PassagesModel by calling from_dict on the json representation
passages_model_model_dict = PassagesModel.from_dict(passages_model_model_json).__dict__
passages_model_model2 = PassagesModel(**passages_model_model_dict)
# Verify the model instances are equivalent
assert passages_model_model == passages_model_model2
# Convert model instance back to dict and verify no loss of data
passages_model_model_json2 = passages_model_model.to_dict()
assert passages_model_model_json2 == passages_model_model_json
#-----------------------------------------------------------------------------
# Test Class for PossbileValues
#-----------------------------------------------------------------------------
class TestPossibleValues():
#--------------------------------------------------------
# Test serialization/deserialization for PossbileValues
#--------------------------------------------------------
def test_possbile_values_serialization(self):
# Construct a json representation of a PossbileValues model
possbile_values_model_json = {}
possbile_values_model_json['displayValue'] = 'testString'
possbile_values_model_json['value'] = 'testString'
# Construct a model instance of PossbileValues by calling from_dict on the json representation
possbile_values_model = PossibleValues.from_dict(possbile_values_model_json)
assert possbile_values_model != False
# Construct a model instance of PossbileValues by calling from_dict on the json representation
possbile_values_model_dict = PossibleValues.from_dict(possbile_values_model_json).__dict__
possbile_values_model2 = PossibleValues(**possbile_values_model_dict)
# Verify the model instances are equivalent
assert possbile_values_model == possbile_values_model2
# Convert model instance back to dict and verify no loss of data
possbile_values_model_json2 = possbile_values_model.to_dict()
assert possbile_values_model_json2 == possbile_values_model_json
#-----------------------------------------------------------------------------
# Test Class for RankedDocLinks
#-----------------------------------------------------------------------------
class TestRankedDocLinks():
#--------------------------------------------------------
# Test serialization/deserialization for RankedDocLinks
#--------------------------------------------------------
def test_ranked_doc_links_serialization(self):
# Construct a json representation of a RankedDocLinks model
ranked_doc_links_model_json = {}
ranked_doc_links_model_json['hrefSearchMatches'] = 'testString'
ranked_doc_links_model_json['hrefCategories'] = 'testString'
# Construct a model instance of RankedDocLinks by calling from_dict on the json representation
ranked_doc_links_model = RankedDocLinks.from_dict(ranked_doc_links_model_json)
assert ranked_doc_links_model != False
# Construct a model instance of RankedDocLinks by calling from_dict on the json representation
ranked_doc_links_model_dict = RankedDocLinks.from_dict(ranked_doc_links_model_json).__dict__
ranked_doc_links_model2 = RankedDocLinks(**ranked_doc_links_model_dict)
# Verify the model instances are equivalent
assert ranked_doc_links_model == ranked_doc_links_model2
# Convert model instance back to dict and verify no loss of data
ranked_doc_links_model_json2 = ranked_doc_links_model.to_dict()
assert ranked_doc_links_model_json2 == ranked_doc_links_model_json
#-----------------------------------------------------------------------------
# Test Class for StringBuilder
#-----------------------------------------------------------------------------
class TestStringBuilder():
#--------------------------------------------------------
# Test serialization/deserialization for StringBuilder
#--------------------------------------------------------
def test_string_builder_serialization(self):
# Construct a json representation of a StringBuilder model
string_builder_model_json = {}
# Construct a model instance of StringBuilder by calling from_dict on the json representation
string_builder_model = StringBuilder.from_dict(string_builder_model_json)
assert string_builder_model != False
# Construct a model instance of StringBuilder by calling from_dict on the json representation
string_builder_model_dict = StringBuilder.from_dict(string_builder_model_json).__dict__
string_builder_model2 = StringBuilder(**string_builder_model_dict)
# Verify the model instances are equivalent
assert string_builder_model == string_builder_model2
# Convert model instance back to dict and verify no loss of data
string_builder_model_json2 = string_builder_model.to_dict()
assert string_builder_model_json2 == string_builder_model_json
#-----------------------------------------------------------------------------
# Test Class for AggregationModel
#-----------------------------------------------------------------------------
class TestAggregationModel():
#--------------------------------------------------------
# Test serialization/deserialization for AggregationModel
#--------------------------------------------------------
def test_aggregation_model_serialization(self):
# Construct a json representation of a AggregationModel model
aggregation_model_model_json = {}
aggregation_model_model_json['name'] = 'testString'
aggregation_model_model_json['documentCount'] = 38
# Construct a model instance of AggregationModel by calling from_dict on the json representation
aggregation_model_model = AggregationModel.from_dict(aggregation_model_model_json)
assert aggregation_model_model != False
# Construct a model instance of AggregationModel by calling from_dict on the json representation
aggregation_model_model_dict = AggregationModel.from_dict(aggregation_model_model_json).__dict__
aggregation_model_model2 = AggregationModel(**aggregation_model_model_dict)
# Verify the model instances are equivalent
assert aggregation_model_model == aggregation_model_model2
# Convert model instance back to dict and verify no loss of data
aggregation_model_model_json2 = aggregation_model_model.to_dict()
assert aggregation_model_model_json2 == aggregation_model_model_json
#-----------------------------------------------------------------------------
# Test Class for AnnotationModel
#-----------------------------------------------------------------------------
class TestAnnotationModel():
#--------------------------------------------------------
# Test serialization/deserialization for AnnotationModel
#--------------------------------------------------------
def test_annotation_model_serialization(self):
# Construct a json representation of a AnnotationModel model
annotation_model_model_json = {}
annotation_model_model_json['uniqueId'] = 38
annotation_model_model_json['stickyIds'] = [38]
annotation_model_model_json['ontology'] = 'testString'
annotation_model_model_json['section'] = 'testString'
annotation_model_model_json['preferredName'] = 'testString'
annotation_model_model_json['cui'] = 'testString'
annotation_model_model_json['attributeId'] = 'testString'
annotation_model_model_json['qualifiers'] = ['testString']
annotation_model_model_json['type'] = 'testString'
annotation_model_model_json['negated'] = True
annotation_model_model_json['hypothetical'] = True
annotation_model_model_json['unit'] = 'testString'
annotation_model_model_json['minValue'] = 'testString'
annotation_model_model_json['maxValue'] = 'testString'
annotation_model_model_json['operator'] = 'testString'
annotation_model_model_json['nluSourceType'] = 'testString'
annotation_model_model_json['nluRelation'] = 'testString'
annotation_model_model_json['nluTargetType'] = 'testString'
annotation_model_model_json['nluEntityIndex'] = 'testString'
annotation_model_model_json['nluMentionIndex'] = 'testString'
annotation_model_model_json['nluRelationId'] = 'testString'
annotation_model_model_json['nluSide'] = 'testString'
annotation_model_model_json['begin'] = 38
annotation_model_model_json['end'] = 38
annotation_model_model_json['score'] = 36.0
annotation_model_model_json['timestamp'] = 26
annotation_model_model_json['features'] = {}
annotation_model_model_json['hits'] = 38
# Construct a model instance of AnnotationModel by calling from_dict on the json representation
annotation_model_model = AnnotationModel.from_dict(annotation_model_model_json)
assert annotation_model_model != False
# Construct a model instance of AnnotationModel by calling from_dict on the json representation
annotation_model_model_dict = AnnotationModel.from_dict(annotation_model_model_json).__dict__
annotation_model_model2 = AnnotationModel(**annotation_model_model_dict)
# Verify the model instances are equivalent
assert annotation_model_model == annotation_model_model2
# Convert model instance back to dict and verify no loss of data
annotation_model_model_json2 = annotation_model_model.to_dict()
assert annotation_model_model_json2 == annotation_model_model_json
#-----------------------------------------------------------------------------
# Test Class for ArtifactModel
#-----------------------------------------------------------------------------
class TestArtifactModel():
#--------------------------------------------------------
# Test serialization/deserialization for ArtifactModel
#--------------------------------------------------------
def test_artifact_model_serialization(self):
# Construct a json representation of a ArtifactModel model
artifact_model_model_json = {}
artifact_model_model_json['cui'] = 'testString'
artifact_model_model_json['ontology'] = 'testString'
artifact_model_model_json['preferredName'] = 'testString'
artifact_model_model_json['alternativeName'] = 'testString'
artifact_model_model_json['semanticType'] = 'testString'
artifact_model_model_json['rank'] = 38
artifact_model_model_json['hitCount'] = 38
artifact_model_model_json['score'] = 36.0
artifact_model_model_json['surfaceForms'] = ['testString']
# Construct a model instance of ArtifactModel by calling from_dict on the json representation
artifact_model_model = ArtifactModel.from_dict(artifact_model_model_json)
assert artifact_model_model != False
# Construct a model instance of ArtifactModel by calling from_dict on the json representation
artifact_model_model_dict = ArtifactModel.from_dict(artifact_model_model_json).__dict__
artifact_model_model2 = ArtifactModel(**artifact_model_model_dict)
# Verify the model instances are equivalent
assert artifact_model_model == artifact_model_model2
# Convert model instance back to dict and verify no loss of data
artifact_model_model_json2 = artifact_model_model.to_dict()
#assert artifact_model_model_json2 == artifact_model_model_json
#-----------------------------------------------------------------------------
# Test Class for Attribute
#-----------------------------------------------------------------------------
class TestAttribute():
#--------------------------------------------------------
# Test serialization/deserialization for Attribute
#--------------------------------------------------------
def test_attribute_serialization(self):
# Construct a json representation of a Attribute model
attribute_model_json = {}
attribute_model_json['attributeId'] = 'testString'
attribute_model_json['displayName'] = 'testString'
attribute_model_json['count'] = 38
# Construct a model instance of Attribute by calling from_dict on the json representation
attribute_model = Attribute.from_dict(attribute_model_json)
assert attribute_model != False
# Construct a model instance of Attribute by calling from_dict on the json representation
attribute_model_dict = Attribute.from_dict(attribute_model_json).__dict__
attribute_model2 = Attribute(**attribute_model_dict)
# Verify the model instances are equivalent
assert attribute_model == attribute_model2
# Convert model instance back to dict and verify no loss of data
attribute_model_json2 = attribute_model.to_dict()
assert attribute_model_json2 == attribute_model_json
#-----------------------------------------------------------------------------
# Test Class for Backend
#-----------------------------------------------------------------------------
class TestBackend():
#--------------------------------------------------------
# Test serialization/deserialization for Backend
#--------------------------------------------------------
def test_backend_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
message_model = {} # Message
message_model['messageType'] = 'expanded_request'
message_model['url'] = 'testString'
message_model['request'] = { 'foo': 'bar' }
message_model['headers'] = ['testString']
message_model['status'] = 38
message_model['response'] = { 'foo': 'bar' }
# Construct a json representation of a Backend model
backend_model_json = {}
backend_model_json['messages'] = [message_model]
# Construct a model instance of Backend by calling from_dict on the json representation
backend_model = Backend.from_dict(backend_model_json)
assert backend_model != False
# Construct a model instance of Backend by calling from_dict on the json representation
backend_model_dict = Backend.from_dict(backend_model_json).__dict__
backend_model2 = Backend(**backend_model_dict)
# Verify the model instances are equivalent
assert backend_model == backend_model2
# Convert model instance back to dict and verify no loss of data
backend_model_json2 = backend_model.to_dict()
assert backend_model_json2 == backend_model_json
#-----------------------------------------------------------------------------
# Test Class for BooleanOperands
#-----------------------------------------------------------------------------
class TestBooleanOperands():
#--------------------------------------------------------
# Test serialization/deserialization for BooleanOperands
#--------------------------------------------------------
def test_boolean_operands_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
bool_operand_model = {} # BoolOperand
bool_operand_model['boolOperand'] = 'testString'
# Construct a json representation of a BooleanOperands model
boolean_operands_model_json = {}
boolean_operands_model_json['boolExpression'] = 'testString'
boolean_operands_model_json['boolOperands'] = [bool_operand_model]
# Construct a model instance of BooleanOperands by calling from_dict on the json representation
boolean_operands_model = BooleanOperands.from_dict(boolean_operands_model_json)
assert boolean_operands_model != False
# Construct a model instance of BooleanOperands by calling from_dict on the json representation
boolean_operands_model_dict = BooleanOperands.from_dict(boolean_operands_model_json).__dict__
boolean_operands_model2 = BooleanOperands(**boolean_operands_model_dict)
# Verify the model instances are equivalent
assert boolean_operands_model == boolean_operands_model2
# Convert model instance back to dict and verify no loss of data
boolean_operands_model_json2 = boolean_operands_model.to_dict()
assert boolean_operands_model_json2 == boolean_operands_model_json
#-----------------------------------------------------------------------------
# Test Class for CategoriesModel
#-----------------------------------------------------------------------------
class TestCategoriesModel():
#--------------------------------------------------------
# Test serialization/deserialization for CategoriesModel
#--------------------------------------------------------
def test_categories_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
annotation_model_model = {} # AnnotationModel
annotation_model_model['uniqueId'] = 38
annotation_model_model['stickyIds'] = [38]
annotation_model_model['ontology'] = 'testString'
annotation_model_model['section'] = 'testString'
annotation_model_model['preferredName'] = 'testString'
annotation_model_model['cui'] = 'testString'
annotation_model_model['attributeId'] = 'testString'
annotation_model_model['qualifiers'] = ['testString']
annotation_model_model['type'] = 'testString'
annotation_model_model['negated'] = True
annotation_model_model['hypothetical'] = True
annotation_model_model['unit'] = 'testString'
annotation_model_model['minValue'] = 'testString'
annotation_model_model['maxValue'] = 'testString'
annotation_model_model['operator'] = 'testString'
annotation_model_model['nluSourceType'] = 'testString'
annotation_model_model['nluRelation'] = 'testString'
annotation_model_model['nluTargetType'] = 'testString'
annotation_model_model['nluEntityIndex'] = 'testString'
annotation_model_model['nluMentionIndex'] = 'testString'
annotation_model_model['nluRelationId'] = 'testString'
annotation_model_model['nluSide'] = 'testString'
annotation_model_model['begin'] = 38
annotation_model_model['end'] = 38
annotation_model_model['score'] = 36.0
annotation_model_model['timestamp'] = 26
annotation_model_model['features'] = {}
annotation_model_model['hits'] = 38
string_builder_model = {} # StringBuilder
# Construct a json representation of a CategoriesModel model
categories_model_model_json = {}
categories_model_model_json['modelLicense'] = 'testString'
categories_model_model_json['highlightedTitle'] = string_builder_model
categories_model_model_json['highlightedAbstract'] = string_builder_model
categories_model_model_json['highlightedBody'] = string_builder_model
categories_model_model_json['highlightedSections'] = {}
categories_model_model_json['passages'] = {}
categories_model_model_json['annotations'] = {}
# Construct a model instance of CategoriesModel by calling from_dict on the json representation
categories_model_model = CategoriesModel.from_dict(categories_model_model_json)
assert categories_model_model != False
# Construct a model instance of CategoriesModel by calling from_dict on the json representation
categories_model_model_dict = CategoriesModel.from_dict(categories_model_model_json).__dict__
categories_model_model2 = CategoriesModel(**categories_model_model_dict)
# Verify the model instances are equivalent
assert categories_model_model == categories_model_model2
# Convert model instance back to dict and verify no loss of data
categories_model_model_json2 = categories_model_model.to_dict()
assert categories_model_model_json2 == categories_model_model_json
#-----------------------------------------------------------------------------
# Test Class for CommonDataModel
#-----------------------------------------------------------------------------
class TestCommonDataModel():
#--------------------------------------------------------
# Test serialization/deserialization for CommonDataModel
#--------------------------------------------------------
def test_common_data_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
text_span_model = {} # TextSpan
text_span_model['section'] = 'testString'
text_span_model['begin'] = 38
text_span_model['end'] = 38
text_span_model['coveredText'] = 'testString'
text_span_model['source'] = 'testString'
text_span_model['type'] = 'testString'
concept_model_model = {} # ConceptModel
concept_model_model['uniqueId'] = 38
concept_model_model['stickyIds'] = [38]
concept_model_model['section'] = 'testString'
concept_model_model['type'] = 'testString'
concept_model_model['begin'] = 38
concept_model_model['end'] = 38
concept_model_model['coveredText'] = 'testString'
concept_model_model['cui'] = 'testString'
concept_model_model['preferredName'] = 'testString'
concept_model_model['source'] = 'testString'
concept_model_model['negated'] = True
concept_model_model['hypothetical'] = True
concept_model_model['timestamp'] = 26
concept_model_model['attributeId'] = 'testString'
concept_model_model['qualifiers'] = ['testString']
concept_model_model['unit'] = 'testString'
concept_model_model['minValue'] = 'testString'
concept_model_model['maxValue'] = 'testString'
concept_model_model['operator'] = 'testString'
concept_model_model['features'] = {}
concept_model_model['nluEntityIndex'] = 'testString'
concept_model_model['nluMentionIndex'] = 'testString'
concept_model_model['nluRelationId'] = 'testString'
concept_model_model['nluSide'] = 'testString'
concept_model_model['nluSourceType'] = 'testString'
concept_model_model['nluRelation'] = 'testString'
concept_model_model['nluTargetType'] = 'testString'
concept_model_model['hits'] = 38
relation_model_model = {} # RelationModel
relation_model_model['relationId'] = 'testString'
relation_model_model['relation'] = 'testString'
relation_model_model['source'] = text_span_model
relation_model_model['target'] = text_span_model
data_model_model = {} # DataModel
data_model_model['concepts'] = [concept_model_model]
data_model_model['attributeValues'] = [concept_model_model]
data_model_model['relations'] = [relation_model_model]
data_model_model['mesh'] = [concept_model_model]
data_model_model['text'] = [concept_model_model]
unstructured_model_model = {} # UnstructuredModel
unstructured_model_model['text'] = 'testString'
unstructured_model_model['data'] = data_model_model
# Construct a json representation of a CommonDataModel model
common_data_model_model_json = {}
common_data_model_model_json['unstructured'] = [unstructured_model_model]
# Construct a model instance of CommonDataModel by calling from_dict on the json representation
common_data_model_model = CommonDataModel.from_dict(common_data_model_model_json)
assert common_data_model_model != False
# Construct a model instance of CommonDataModel by calling from_dict on the json representation
common_data_model_model_dict = CommonDataModel.from_dict(common_data_model_model_json).__dict__
common_data_model_model2 = CommonDataModel(**common_data_model_model_dict)
# Verify the model instances are equivalent
assert common_data_model_model == common_data_model_model2
# Convert model instance back to dict and verify no loss of data
common_data_model_model_json2 = common_data_model_model.to_dict()
assert common_data_model_model_json2 == common_data_model_model_json
#-----------------------------------------------------------------------------
# Test Class for Concept
#-----------------------------------------------------------------------------
class TestConcept():
#--------------------------------------------------------
# Test serialization/deserialization for Concept
#--------------------------------------------------------
def test_concept_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
count_model = {} # Count
count_model['count'] = 38
count_model['hits'] = 38
# Construct a json representation of a Concept model
concept_model_json = {}
concept_model_json['ontology'] = 'testString'
concept_model_json['cui'] = 'testString'
concept_model_json['preferredName'] = 'testString'
concept_model_json['alternativeName'] = 'testString'
concept_model_json['semanticType'] = 'testString'
concept_model_json['count'] = 38
concept_model_json['hitCount'] = 38
concept_model_json['score'] = 36.0
concept_model_json['parents'] = count_model
concept_model_json['children'] = count_model
concept_model_json['siblings'] = count_model
concept_model_json['related'] = count_model
concept_model_json['documentIds'] = ['testString']
concept_model_json['dataType'] = 'testString'
concept_model_json['unit'] = 'testString'
concept_model_json['operator'] = 'testString'
concept_model_json['minValue'] = 'testString'
concept_model_json['maxValue'] = 'testString'
concept_model_json['vocab'] = 'testString'
concept_model_json['properties'] = ['testString']
# Construct a model instance of Concept by calling from_dict on the json representation
concept_model = Concept.from_dict(concept_model_json)
assert concept_model != False
# Construct a model instance of Concept by calling from_dict on the json representation
concept_model_dict = Concept.from_dict(concept_model_json).__dict__
concept_model2 = Concept(**concept_model_dict)
# Verify the model instances are equivalent
assert concept_model == concept_model2
# Convert model instance back to dict and verify no loss of data
concept_model_json2 = concept_model.to_dict()
assert concept_model_json2 == concept_model_json
#-----------------------------------------------------------------------------
# Test Class for ConceptInfoModel
#-----------------------------------------------------------------------------
class TestConceptInfoModel():
#--------------------------------------------------------
# Test serialization/deserialization for ConceptInfoModel
#--------------------------------------------------------
def test_concept_info_model_serialization(self):
# Construct a json representation of a ConceptInfoModel model
concept_info_model_model_json = {}
concept_info_model_model_json['cui'] = 'testString'
concept_info_model_model_json['ontology'] = 'testString'
concept_info_model_model_json['preferredName'] = 'testString'
concept_info_model_model_json['semanticTypes'] = ['testString']
concept_info_model_model_json['surfaceForms'] = ['testString']
concept_info_model_model_json['definition'] = 'testString'
concept_info_model_model_json['hasParents'] = True
concept_info_model_model_json['hasChildren'] = True
concept_info_model_model_json['hasSiblings'] = True
# Construct a model instance of ConceptInfoModel by calling from_dict on the json representation
concept_info_model_model = ConceptInfoModel.from_dict(concept_info_model_model_json)
assert concept_info_model_model != False
# Construct a model instance of ConceptInfoModel by calling from_dict on the json representation
concept_info_model_model_dict = ConceptInfoModel.from_dict(concept_info_model_model_json).__dict__
concept_info_model_model2 = ConceptInfoModel(**concept_info_model_model_dict)
# Verify the model instances are equivalent
assert concept_info_model_model == concept_info_model_model2
# Convert model instance back to dict and verify no loss of data
concept_info_model_model_json2 = concept_info_model_model.to_dict()
assert concept_info_model_model_json2 == concept_info_model_model_json
#-----------------------------------------------------------------------------
# Test Class for ConceptListModel
#-----------------------------------------------------------------------------
class TestConceptListModel():
#--------------------------------------------------------
# Test serialization/deserialization for ConceptListModel
#--------------------------------------------------------
def test_concept_list_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
artifact_model_model = {} # ArtifactModel
artifact_model_model['cui'] = 'testString'
artifact_model_model['ontology'] = 'testString'
artifact_model_model['preferredName'] = 'testString'
artifact_model_model['alternativeName'] = 'testString'
artifact_model_model['semanticType'] = 'testString'
artifact_model_model['rank'] = 38
artifact_model_model['hitCount'] = 38
artifact_model_model['score'] = 36.0
artifact_model_model['surfaceForms'] = ['testString']
# Construct a json representation of a ConceptListModel model
concept_list_model_model_json = {}
concept_list_model_model_json['concepts'] = [artifact_model_model]
# Construct a model instance of ConceptListModel by calling from_dict on the json representation
concept_list_model_model = ConceptListModel.from_dict(concept_list_model_model_json)
assert concept_list_model_model != False
# Construct a model instance of ConceptListModel by calling from_dict on the json representation
concept_list_model_model_dict = ConceptListModel.from_dict(concept_list_model_model_json).__dict__
concept_list_model_model2 = ConceptListModel(**concept_list_model_model_dict)
# Verify the model instances are equivalent
assert concept_list_model_model == concept_list_model_model2
# Convert model instance back to dict and verify no loss of data
concept_list_model_model_json2 = concept_list_model_model.to_dict()
#assert concept_list_model_model_json2 == concept_list_model_model_json
#-----------------------------------------------------------------------------
# Test Class for ConceptModel
#-----------------------------------------------------------------------------
class TestConceptModel():
#--------------------------------------------------------
# Test serialization/deserialization for ConceptModel
#--------------------------------------------------------
def test_concept_model_serialization(self):
# Construct a json representation of a ConceptModel model
concept_model_model_json = {}
concept_model_model_json['uniqueId'] = 38
concept_model_model_json['stickyIds'] = [38]
concept_model_model_json['section'] = 'testString'
concept_model_model_json['type'] = 'testString'
concept_model_model_json['begin'] = 38
concept_model_model_json['end'] = 38
concept_model_model_json['coveredText'] = 'testString'
concept_model_model_json['cui'] = 'testString'
concept_model_model_json['preferredName'] = 'testString'
concept_model_model_json['source'] = 'testString'
concept_model_model_json['negated'] = True
concept_model_model_json['hypothetical'] = True
concept_model_model_json['timestamp'] = 26
concept_model_model_json['attributeId'] = 'testString'
concept_model_model_json['qualifiers'] = ['testString']
concept_model_model_json['unit'] = 'testString'
concept_model_model_json['minValue'] = 'testString'
concept_model_model_json['maxValue'] = 'testString'
concept_model_model_json['operator'] = 'testString'
concept_model_model_json['features'] = {}
concept_model_model_json['nluEntityIndex'] = 'testString'
concept_model_model_json['nluMentionIndex'] = 'testString'
concept_model_model_json['nluRelationId'] = 'testString'
concept_model_model_json['nluSide'] = 'testString'
concept_model_model_json['nluSourceType'] = 'testString'
concept_model_model_json['nluRelation'] = 'testString'
concept_model_model_json['nluTargetType'] = 'testString'
concept_model_model_json['hits'] = 38
# Construct a model instance of ConceptModel by calling from_dict on the json representation
concept_model_model = ConceptModel.from_dict(concept_model_model_json)
assert concept_model_model != False
# Construct a model instance of ConceptModel by calling from_dict on the json representation
concept_model_model_dict = ConceptModel.from_dict(concept_model_model_json).__dict__
concept_model_model2 = ConceptModel(**concept_model_model_dict)
# Verify the model instances are equivalent
assert concept_model_model == concept_model_model2
# Convert model instance back to dict and verify no loss of data
concept_model_model_json2 = concept_model_model.to_dict()
assert concept_model_model_json2 == concept_model_model_json
#-----------------------------------------------------------------------------
# Test Class for CorporaConfig
#-----------------------------------------------------------------------------
class TestCorporaConfig():
#--------------------------------------------------------
# Test serialization/deserialization for CorporaConfig
#--------------------------------------------------------
def test_corpora_config_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
corpus_model_model = {} # CorpusModel
corpus_model_model['corpusName'] = 'testString'
corpus_model_model['ontologies'] = ['testString']
corpus_model_model['descriptiveName'] = 'testString'
corpus_model_model['bvt'] = True
corpus_model_model['elasticsearchIndex'] = 'testString'
# Construct a json representation of a CorporaConfig model
corpora_config_model_json = {}
corpora_config_model_json['corpora'] = [corpus_model_model]
# Construct a model instance of CorporaConfig by calling from_dict on the json representation
corpora_config_model = CorporaConfigModel.from_dict(corpora_config_model_json)
assert corpora_config_model != False
# Construct a model instance of CorporaConfig by calling from_dict on the json representation
corpora_config_model_dict = CorporaConfigModel.from_dict(corpora_config_model_json).__dict__
corpora_config_model2 = CorporaConfigModel(**corpora_config_model_dict)
# Verify the model instances are equivalent
assert corpora_config_model == corpora_config_model2
# Convert model instance back to dict and verify no loss of data
corpora_config_model_json2 = corpora_config_model.to_dict()
assert corpora_config_model_json2 == corpora_config_model_json
#-----------------------------------------------------------------------------
# Test Class for CorpusModel
#-----------------------------------------------------------------------------
class TestCorpusModel():
#--------------------------------------------------------
# Test serialization/deserialization for CorpusModel
#--------------------------------------------------------
def test_corpus_model_serialization(self):
# Construct a json representation of a CorpusModel model
corpus_model_model_json = {}
corpus_model_model_json['corpusName'] = 'testString'
corpus_model_model_json['ontologies'] = ['testString']
corpus_model_model_json['descriptiveName'] = 'testString'
corpus_model_model_json['bvt'] = True
corpus_model_model_json['elasticsearchIndex'] = 'testString'
# Construct a model instance of CorpusModel by calling from_dict on the json representation
corpus_model_model = CorpusModel.from_dict(corpus_model_model_json)
assert corpus_model_model != False
# Construct a model instance of CorpusModel by calling from_dict on the json representation
corpus_model_model_dict = CorpusModel.from_dict(corpus_model_model_json).__dict__
corpus_model_model2 = CorpusModel(**corpus_model_model_dict)
# Verify the model instances are equivalent
assert corpus_model_model == corpus_model_model2
# Convert model instance back to dict and verify no loss of data
corpus_model_model_json2 = corpus_model_model.to_dict()
assert corpus_model_model_json2 == corpus_model_model_json
#-----------------------------------------------------------------------------
# Test Class for Count
#-----------------------------------------------------------------------------
class TestCount():
#--------------------------------------------------------
# Test serialization/deserialization for Count
#--------------------------------------------------------
def test_count_serialization(self):
# Construct a json representation of a Count model
count_model_json = {}
count_model_json['count'] = 38
count_model_json['hits'] = 38
# Construct a model instance of Count by calling from_dict on the json representation
count_model = Count.from_dict(count_model_json)
assert count_model != False
# Construct a model instance of Count by calling from_dict on the json representation
count_model_dict = Count.from_dict(count_model_json).__dict__
count_model2 = Count(**count_model_dict)
# Verify the model instances are equivalent
assert count_model == count_model2
# Convert model instance back to dict and verify no loss of data
count_model_json2 = count_model.to_dict()
assert count_model_json2 == count_model_json
#-----------------------------------------------------------------------------
# Test Class for DataModel
#-----------------------------------------------------------------------------
class TestDataModel():
#--------------------------------------------------------
# Test serialization/deserialization for DataModel
#--------------------------------------------------------
def test_data_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
text_span_model = {} # TextSpan
text_span_model['section'] = 'testString'
text_span_model['begin'] = 38
text_span_model['end'] = 38
text_span_model['coveredText'] = 'testString'
text_span_model['source'] = 'testString'
text_span_model['type'] = 'testString'
concept_model_model = {} # ConceptModel
concept_model_model['uniqueId'] = 38
concept_model_model['stickyIds'] = [38]
concept_model_model['section'] = 'testString'
concept_model_model['type'] = 'testString'
concept_model_model['begin'] = 38
concept_model_model['end'] = 38
concept_model_model['coveredText'] = 'testString'
concept_model_model['cui'] = 'testString'
concept_model_model['preferredName'] = 'testString'
concept_model_model['source'] = 'testString'
concept_model_model['negated'] = True
concept_model_model['hypothetical'] = True
concept_model_model['timestamp'] = 26
concept_model_model['attributeId'] = 'testString'
concept_model_model['qualifiers'] = ['testString']
concept_model_model['unit'] = 'testString'
concept_model_model['minValue'] = 'testString'
concept_model_model['maxValue'] = 'testString'
concept_model_model['operator'] = 'testString'
concept_model_model['features'] = {}
concept_model_model['nluEntityIndex'] = 'testString'
concept_model_model['nluMentionIndex'] = 'testString'
concept_model_model['nluRelationId'] = 'testString'
concept_model_model['nluSide'] = 'testString'
concept_model_model['nluSourceType'] = 'testString'
concept_model_model['nluRelation'] = 'testString'
concept_model_model['nluTargetType'] = 'testString'
concept_model_model['hits'] = 38
relation_model_model = {} # RelationModel
relation_model_model['relationId'] = 'testString'
relation_model_model['relation'] = 'testString'
relation_model_model['source'] = text_span_model
relation_model_model['target'] = text_span_model
# Construct a json representation of a DataModel model
data_model_model_json = {}
data_model_model_json['concepts'] = [concept_model_model]
data_model_model_json['attributeValues'] = [concept_model_model]
data_model_model_json['relations'] = [relation_model_model]
data_model_model_json['mesh'] = [concept_model_model]
data_model_model_json['text'] = [concept_model_model]
# Construct a model instance of DataModel by calling from_dict on the json representation
data_model_model = DataModel.from_dict(data_model_model_json)
assert data_model_model != False
# Construct a model instance of DataModel by calling from_dict on the json representation
data_model_model_dict = DataModel.from_dict(data_model_model_json).__dict__
data_model_model2 = DataModel(**data_model_model_dict)
# Verify the model instances are equivalent
assert data_model_model == data_model_model2
# Convert model instance back to dict and verify no loss of data
data_model_model_json2 = data_model_model.to_dict()
assert data_model_model_json2 == data_model_model_json
#-----------------------------------------------------------------------------
# Test Class for EntryModel
#-----------------------------------------------------------------------------
class TestEntryModel():
#--------------------------------------------------------
# Test serialization/deserialization for EntryModel
#--------------------------------------------------------
def test_entry_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
string_builder_model = {} # StringBuilder
sentence_model_model = {} # SentenceModel
sentence_model_model['documentSection'] = 'testString'
sentence_model_model['text'] = string_builder_model
sentence_model_model['begin'] = 38
sentence_model_model['end'] = 38
sentence_model_model['timestamp'] = 26
# Construct a json representation of a EntryModel model
entry_model_model_json = {}
entry_model_model_json['id'] = 'testString'
entry_model_model_json['negated'] = True
entry_model_model_json['sentences'] = [sentence_model_model]
# Construct a model instance of EntryModel by calling from_dict on the json representation
entry_model_model = EntryModel.from_dict(entry_model_model_json)
assert entry_model_model != False
# Construct a model instance of EntryModel by calling from_dict on the json representation
entry_model_model_dict = EntryModel.from_dict(entry_model_model_json).__dict__
entry_model_model2 = EntryModel(**entry_model_model_dict)
# Verify the model instances are equivalent
assert entry_model_model == entry_model_model2
# Convert model instance back to dict and verify no loss of data
entry_model_model_json2 = entry_model_model.to_dict()
assert entry_model_model_json2 == entry_model_model_json
#-----------------------------------------------------------------------------
# Test Class for FieldOptions
#-----------------------------------------------------------------------------
class TestFieldOptions():
#--------------------------------------------------------
# Test serialization/deserialization for FieldOptions
#--------------------------------------------------------
def test_field_options_serialization(self):
# Construct a json representation of a FieldOptions model
field_options_model_json = {}
field_options_model_json['supports'] = ['testString']
# Construct a model instance of FieldOptions by calling from_dict on the json representation
field_options_model = FieldOptions.from_dict(field_options_model_json)
assert field_options_model != False
# Construct a model instance of FieldOptions by calling from_dict on the json representation
field_options_model_dict = FieldOptions.from_dict(field_options_model_json).__dict__
field_options_model2 = FieldOptions(**field_options_model_dict)
# Verify the model instances are equivalent
assert field_options_model == field_options_model2
# Convert model instance back to dict and verify no loss of data
field_options_model_json2 = field_options_model.to_dict()
# assert field_options_model_json2 == field_options_model_json
#-----------------------------------------------------------------------------
# Test Class for HistogramData
#-----------------------------------------------------------------------------
class TestHistogramData():
#--------------------------------------------------------
# Test serialization/deserialization for HistogramData
#--------------------------------------------------------
def test_histogram_data_serialization(self):
# Construct a json representation of a HistogramData model
histogram_data_model_json = {}
histogram_data_model_json['date'] = 'testString'
histogram_data_model_json['hits'] = 38
# Construct a model instance of HistogramData by calling from_dict on the json representation
histogram_data_model = HistogramData.from_dict(histogram_data_model_json)
assert histogram_data_model != False
# Construct a model instance of HistogramData by calling from_dict on the json representation
histogram_data_model_dict = HistogramData.from_dict(histogram_data_model_json).__dict__
histogram_data_model2 = HistogramData(**histogram_data_model_dict)
# Verify the model instances are equivalent
assert histogram_data_model == histogram_data_model2
# Convert model instance back to dict and verify no loss of data
histogram_data_model_json2 = histogram_data_model.to_dict()
assert histogram_data_model_json2 == histogram_data_model_json
#-----------------------------------------------------------------------------
# Test Class for HitCount
#-----------------------------------------------------------------------------
class TestHitCount():
#--------------------------------------------------------
# Test serialization/deserialization for HitCount
#--------------------------------------------------------
def test_hit_count_serialization(self):
# Construct a json representation of a HitCount model
hit_count_model_json = {}
hit_count_model_json['hitCount'] = 38
# Construct a model instance of HitCount by calling from_dict on the json representation
hit_count_model = HitCount.from_dict(hit_count_model_json)
assert hit_count_model != False
# Construct a model instance of HitCount by calling from_dict on the json representation
hit_count_model_dict = HitCount.from_dict(hit_count_model_json).__dict__
hit_count_model2 = HitCount(**hit_count_model_dict)
# Verify the model instances are equivalent
assert hit_count_model == hit_count_model2
# Convert model instance back to dict and verify no loss of data
hit_count_model_json2 = hit_count_model.to_dict()
assert hit_count_model_json2 == hit_count_model_json
#-----------------------------------------------------------------------------
# Test Class for MetadataModel
#-----------------------------------------------------------------------------
class TestMetadataModel():
#--------------------------------------------------------
# Test serialization/deserialization for MetadataModel
#--------------------------------------------------------
def test_metadata_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
field_options_model = {} # FieldOptions
field_options_model['supports'] = ['testString']
# Construct a json representation of a MetadataModel model
metadata_model_model_json = {}
metadata_model_model_json['fields'] = {}
metadata_model_model_json['sectionFieldNames'] = ['testString']
metadata_model_model_json['attrSectionFieldNames'] = ['testString']
metadata_model_model_json['qualifierSectionFieldNames'] = ['testString']
metadata_model_model_json['meshSectionFieldNames'] = ['testString']
metadata_model_model_json['fieldIndexMap'] = {}
# Construct a model instance of MetadataModel by calling from_dict on the json representation
metadata_model_model = MetadataFields.from_dict(metadata_model_model_json)
assert metadata_model_model != False
# Construct a model instance of MetadataModel by calling from_dict on the json representation
metadata_model_model_dict = MetadataFields.from_dict(metadata_model_model_json).__dict__
metadata_model_model2 = MetadataFields(**metadata_model_model_dict)
# Verify the model instances are equivalent
assert metadata_model_model == metadata_model_model2
# Convert model instance back to dict and verify no loss of data
metadata_model_model_json2 = metadata_model_model.to_dict()
# assert metadata_model_model_json2 == metadata_model_model_json
#-----------------------------------------------------------------------------
# Test Class for Passage
#-----------------------------------------------------------------------------
class TestPassage():
#--------------------------------------------------------
# Test serialization/deserialization for Passage
#--------------------------------------------------------
def test_passage_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
string_builder_model = {} # StringBuilder
# Construct a json representation of a Passage model
passage_model_json = {}
passage_model_json['documentSection'] = 'testString'
passage_model_json['text'] = string_builder_model
passage_model_json['timestamp'] = 26
passage_model_json['preferredName'] = 'testString'
# Construct a model instance of Passage by calling from_dict on the json representation
passage_model = Passage.from_dict(passage_model_json)
assert passage_model != False
# Construct a model instance of Passage by calling from_dict on the json representation
passage_model_dict = Passage.from_dict(passage_model_json).__dict__
passage_model2 = Passage(**passage_model_dict)
# Verify the model instances are equivalent
assert passage_model == passage_model2
# Convert model instance back to dict and verify no loss of data
passage_model_json2 = passage_model.to_dict()
assert passage_model_json2 == passage_model_json
#-----------------------------------------------------------------------------
# Test Class for Qualifer
#-----------------------------------------------------------------------------
class TestQualifer():
#--------------------------------------------------------
# Test serialization/deserialization for Qualifer
#--------------------------------------------------------
def test_qualifer_serialization(self):
# Construct a json representation of a Qualifer model
qualifer_model_json = {}
qualifer_model_json['id'] = 'testString'
qualifer_model_json['name'] = 'testString'
# Construct a model instance of Qualifer by calling from_dict on the json representation
qualifer_model = Qualifier.from_dict(qualifer_model_json)
assert qualifer_model != False
# Construct a model instance of Qualifer by calling from_dict on the json representation
qualifer_model_dict = Qualifier.from_dict(qualifer_model_json).__dict__
qualifer_model2 = Qualifier(**qualifer_model_dict)
# Verify the model instances are equivalent
assert qualifer_model == qualifer_model2
# Convert model instance back to dict and verify no loss of data
qualifer_model_json2 = qualifer_model.to_dict()
assert qualifer_model_json2 == qualifer_model_json
#-----------------------------------------------------------------------------
# Test Class for RangeModel
#-----------------------------------------------------------------------------
class TestRangeModel():
#--------------------------------------------------------
# Test serialization/deserialization for RangeModel
#--------------------------------------------------------
def test_range_model_serialization(self):
# Construct a json representation of a RangeModel model
range_model_model_json = {}
range_model_model_json['operator'] = 'testString'
range_model_model_json['min'] = 'testString'
range_model_model_json['max'] = 'testString'
range_model_model_json['count'] = 38
# Construct a model instance of RangeModel by calling from_dict on the json representation
range_model_model = RangeModel.from_dict(range_model_model_json)
assert range_model_model != False
# Construct a model instance of RangeModel by calling from_dict on the json representation
range_model_model_dict = RangeModel.from_dict(range_model_model_json).__dict__
range_model_model2 = RangeModel(**range_model_model_dict)
# Verify the model instances are equivalent
assert range_model_model == range_model_model2
# Convert model instance back to dict and verify no loss of data
range_model_model_json2 = range_model_model.to_dict()
assert range_model_model_json2 == range_model_model_json
#-----------------------------------------------------------------------------
# Test Class for RankedDocument
#-----------------------------------------------------------------------------
class TestRankedDocument():
#--------------------------------------------------------
# Test serialization/deserialization for RankedDocument
#--------------------------------------------------------
def test_ranked_document_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
string_builder_model = {} # StringBuilder
passage_model = {} # Passage
passage_model['documentSection'] = 'testString'
passage_model['text'] = string_builder_model
passage_model['timestamp'] = 26
passage_model['preferredName'] = 'testString'
annotation_model_model = {} # AnnotationModel
annotation_model_model['uniqueId'] = 38
annotation_model_model['stickyIds'] = [38]
annotation_model_model['ontology'] = 'testString'
annotation_model_model['section'] = 'testString'
annotation_model_model['preferredName'] = 'testString'
annotation_model_model['cui'] = 'testString'
annotation_model_model['attributeId'] = 'testString'
annotation_model_model['qualifiers'] = ['testString']
annotation_model_model['type'] = 'testString'
annotation_model_model['negated'] = True
annotation_model_model['hypothetical'] = True
annotation_model_model['unit'] = 'testString'
annotation_model_model['minValue'] = 'testString'
annotation_model_model['maxValue'] = 'testString'
annotation_model_model['operator'] = 'testString'
annotation_model_model['nluSourceType'] = 'testString'
annotation_model_model['nluRelation'] = 'testString'
annotation_model_model['nluTargetType'] = 'testString'
annotation_model_model['nluEntityIndex'] = 'testString'
annotation_model_model['nluMentionIndex'] = 'testString'
annotation_model_model['nluRelationId'] = 'testString'
annotation_model_model['nluSide'] = 'testString'
annotation_model_model['begin'] = 38
annotation_model_model['end'] = 38
annotation_model_model['score'] = 36.0
annotation_model_model['timestamp'] = 26
annotation_model_model['features'] = {}
annotation_model_model['hits'] = 38
passages_model_model = {} # PassagesModel
passages_model_model['allPassages'] = [passage_model]
passages_model_model['searchTermToPassages'] = {}
ranked_doc_links_model = {} # RankedDocLinks
ranked_doc_links_model['hrefSearchMatches'] = 'testString'
ranked_doc_links_model['hrefCategories'] = 'testString'
# Construct a json representation of a RankedDocument model
ranked_document_model_json = {}
ranked_document_model_json['documentId'] = 'testString'
ranked_document_model_json['title'] = 'testString'
ranked_document_model_json['metadata'] = {}
ranked_document_model_json['sectionName'] = 'testString'
ranked_document_model_json['sectionId'] = 'testString'
ranked_document_model_json['corpus'] = 'testString'
ranked_document_model_json['links'] = ranked_doc_links_model
ranked_document_model_json['passages'] = passages_model_model
ranked_document_model_json['annotations'] = {}
# Construct a model instance of RankedDocument by calling from_dict on the json representation
ranked_document_model = RankedDocument.from_dict(ranked_document_model_json)
assert ranked_document_model != False
# Construct a model instance of RankedDocument by calling from_dict on the json representation
ranked_document_model_dict = RankedDocument.from_dict(ranked_document_model_json).__dict__
ranked_document_model2 = RankedDocument(**ranked_document_model_dict)
# Verify the model instances are equivalent
assert ranked_document_model == ranked_document_model2
# Convert model instance back to dict and verify no loss of data
ranked_document_model_json2 = ranked_document_model.to_dict()
assert ranked_document_model_json2 == ranked_document_model_json
#-----------------------------------------------------------------------------
# Test Class for RelatedConceptModel
#-----------------------------------------------------------------------------
class TestRelatedConceptModel():
#--------------------------------------------------------
# Test serialization/deserialization for RelatedConceptModel
#--------------------------------------------------------
def test_related_concept_model_serialization(self):
# Construct a json representation of a RelatedConceptModel model
related_concept_model_model_json = {}
related_concept_model_model_json['cui'] = 'testString'
related_concept_model_model_json['ontology'] = 'testString'
related_concept_model_model_json['preferredName'] = 'testString'
related_concept_model_model_json['alternativeName'] = 'testString'
related_concept_model_model_json['semanticType'] = 'testString'
related_concept_model_model_json['rank'] = 38
related_concept_model_model_json['hitCount'] = 38
related_concept_model_model_json['score'] = 36.0
related_concept_model_model_json['surfaceForms'] = ['testString']
# Construct a model instance of RelatedConceptModel by calling from_dict on the json representation
related_concept_model_model = RelatedConceptModel.from_dict(related_concept_model_model_json)
assert related_concept_model_model != False
# Construct a model instance of RelatedConceptModel by calling from_dict on the json representation
related_concept_model_model_dict = RelatedConceptModel.from_dict(related_concept_model_model_json).__dict__
related_concept_model_model2 = RelatedConceptModel(**related_concept_model_model_dict)
# Verify the model instances are equivalent
assert related_concept_model_model == related_concept_model_model2
# Convert model instance back to dict and verify no loss of data
related_concept_model_model_json2 = related_concept_model_model.to_dict()
assert related_concept_model_model_json2 == related_concept_model_model_json
#-----------------------------------------------------------------------------
# Test Class for RelatedConceptsModel
#-----------------------------------------------------------------------------
class TestRelatedConceptsModel():
#--------------------------------------------------------
# Test serialization/deserialization for RelatedConceptsModel
#--------------------------------------------------------
def test_related_concepts_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
related_concept_model_model = {} # RelatedConceptModel
related_concept_model_model['cui'] = 'testString'
related_concept_model_model['ontology'] = 'testString'
related_concept_model_model['preferredName'] = 'testString'
related_concept_model_model['alternativeName'] = 'testString'
related_concept_model_model['semanticType'] = 'testString'
related_concept_model_model['rank'] = 38
related_concept_model_model['hitCount'] = 38
related_concept_model_model['score'] = 36.0
related_concept_model_model['surfaceForms'] = ['testString']
# Construct a json representation of a RelatedConceptsModel model
related_concepts_model_model_json = {}
related_concepts_model_model_json['concepts'] = [related_concept_model_model]
# Construct a model instance of RelatedConceptsModel by calling from_dict on the json representation
related_concepts_model_model = RelatedConceptsModel.from_dict(related_concepts_model_model_json)
assert related_concepts_model_model != False
# Construct a model instance of RelatedConceptsModel by calling from_dict on the json representation
related_concepts_model_model_dict = RelatedConceptsModel.from_dict(related_concepts_model_model_json).__dict__
related_concepts_model_model2 = RelatedConceptsModel(**related_concepts_model_model_dict)
# Verify the model instances are equivalent
assert related_concepts_model_model == related_concepts_model_model2
# Convert model instance back to dict and verify no loss of data
related_concepts_model_model_json2 = related_concepts_model_model.to_dict()
assert related_concepts_model_model_json2 == related_concepts_model_model_json
#-----------------------------------------------------------------------------
# Test Class for RelationModel
#-----------------------------------------------------------------------------
class TestRelationModel():
#--------------------------------------------------------
# Test serialization/deserialization for RelationModel
#--------------------------------------------------------
def test_relation_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
text_span_model = {} # TextSpan
text_span_model['section'] = 'testString'
text_span_model['begin'] = 38
text_span_model['end'] = 38
text_span_model['coveredText'] = 'testString'
text_span_model['source'] = 'testString'
text_span_model['type'] = 'testString'
# Construct a json representation of a RelationModel model
relation_model_model_json = {}
relation_model_model_json['relationId'] = 'testString'
relation_model_model_json['relation'] = 'testString'
relation_model_model_json['source'] = text_span_model
relation_model_model_json['target'] = text_span_model
# Construct a model instance of RelationModel by calling from_dict on the json representation
relation_model_model = RelationModel.from_dict(relation_model_model_json)
assert relation_model_model != False
# Construct a model instance of RelationModel by calling from_dict on the json representation
relation_model_model_dict = RelationModel.from_dict(relation_model_model_json).__dict__
relation_model_model2 = RelationModel(**relation_model_model_dict)
# Verify the model instances are equivalent
assert relation_model_model == relation_model_model2
# Convert model instance back to dict and verify no loss of data
relation_model_model_json2 = relation_model_model.to_dict()
assert relation_model_model_json2 == relation_model_model_json
#-----------------------------------------------------------------------------
# Test Class for SearchMatchesModel
#-----------------------------------------------------------------------------
class TestSearchMatchesModel():
#--------------------------------------------------------
# Test serialization/deserialization for SearchMatchesModel
#--------------------------------------------------------
def test_search_matches_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
annotation_model_model = {} # AnnotationModel
annotation_model_model['uniqueId'] = 38
annotation_model_model['stickyIds'] = [38]
annotation_model_model['ontology'] = 'testString'
annotation_model_model['section'] = 'testString'
annotation_model_model['preferredName'] = 'testString'
annotation_model_model['cui'] = 'testString'
annotation_model_model['attributeId'] = 'testString'
annotation_model_model['qualifiers'] = ['testString']
annotation_model_model['type'] = 'testString'
annotation_model_model['negated'] = True
annotation_model_model['hypothetical'] = True
annotation_model_model['unit'] = 'testString'
annotation_model_model['minValue'] = 'testString'
annotation_model_model['maxValue'] = 'testString'
annotation_model_model['operator'] = 'testString'
annotation_model_model['nluSourceType'] = 'testString'
annotation_model_model['nluRelation'] = 'testString'
annotation_model_model['nluTargetType'] = 'testString'
annotation_model_model['nluEntityIndex'] = 'testString'
annotation_model_model['nluMentionIndex'] = 'testString'
annotation_model_model['nluRelationId'] = 'testString'
annotation_model_model['nluSide'] = 'testString'
annotation_model_model['begin'] = 38
annotation_model_model['end'] = 38
annotation_model_model['score'] = 36.0
annotation_model_model['timestamp'] = 26
annotation_model_model['features'] = {}
annotation_model_model['hits'] = 38
string_builder_model = {} # StringBuilder
# Construct a json representation of a SearchMatchesModel model
search_matches_model_model_json = {}
search_matches_model_model_json['externalId'] = 'testString'
search_matches_model_model_json['documentId'] = 'testString'
search_matches_model_model_json['parentDocumentId'] = 'testString'
search_matches_model_model_json['publicationName'] = 'testString'
search_matches_model_model_json['publicationDate'] = 'testString'
search_matches_model_model_json['publicationURL'] = 'testString'
search_matches_model_model_json['authors'] = ['testString']
search_matches_model_model_json['title'] = 'testString'
search_matches_model_model_json['medlineLicense'] = 'testString'
search_matches_model_model_json['hrefPubMed'] = 'testString'
search_matches_model_model_json['hrefPmc'] = 'testString'
search_matches_model_model_json['hrefDoi'] = 'testString'
search_matches_model_model_json['pdfUrl'] = 'testString'
search_matches_model_model_json['referenceUrl'] = 'testString'
search_matches_model_model_json['highlightedTitle'] = string_builder_model
search_matches_model_model_json['highlightedAbstract'] = string_builder_model
search_matches_model_model_json['highlightedBody'] = string_builder_model
search_matches_model_model_json['highlightedSections'] = {}
search_matches_model_model_json['passages'] = {}
search_matches_model_model_json['annotations'] = {}
# Construct a model instance of SearchMatchesModel by calling from_dict on the json representation
search_matches_model_model = SearchMatchesModel.from_dict(search_matches_model_model_json)
assert search_matches_model_model != False
# Construct a model instance of SearchMatchesModel by calling from_dict on the json representation
search_matches_model_model_dict = SearchMatchesModel.from_dict(search_matches_model_model_json).__dict__
search_matches_model_model2 = SearchMatchesModel(**search_matches_model_model_dict)
# Verify the model instances are equivalent
assert search_matches_model_model == search_matches_model_model2
# Convert model instance back to dict and verify no loss of data
search_matches_model_model_json2 = search_matches_model_model.to_dict()
assert search_matches_model_model_json2 == search_matches_model_model_json
#-----------------------------------------------------------------------------
# Test Class for SearchModel
#-----------------------------------------------------------------------------
class TestSearchModel():
#--------------------------------------------------------
# Test serialization/deserialization for SearchModel
#--------------------------------------------------------
def test_search_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
text_span_model = {} # TextSpan
text_span_model['section'] = 'testString'
text_span_model['begin'] = 38
text_span_model['end'] = 38
text_span_model['coveredText'] = 'testString'
text_span_model['source'] = 'testString'
text_span_model['type'] = 'testString'
concept_model_model = {} # ConceptModel
concept_model_model['uniqueId'] = 38
concept_model_model['stickyIds'] = [38]
concept_model_model['section'] = 'testString'
concept_model_model['type'] = 'testString'
concept_model_model['begin'] = 38
concept_model_model['end'] = 38
concept_model_model['coveredText'] = 'testString'
concept_model_model['cui'] = 'testString'
concept_model_model['preferredName'] = 'testString'
concept_model_model['source'] = 'testString'
concept_model_model['negated'] = True
concept_model_model['hypothetical'] = True
concept_model_model['timestamp'] = 26
concept_model_model['attributeId'] = 'testString'
concept_model_model['qualifiers'] = ['testString']
concept_model_model['unit'] = 'testString'
concept_model_model['minValue'] = 'testString'
concept_model_model['maxValue'] = 'testString'
concept_model_model['operator'] = 'testString'
concept_model_model['features'] = {}
concept_model_model['nluEntityIndex'] = 'testString'
concept_model_model['nluMentionIndex'] = 'testString'
concept_model_model['nluRelationId'] = 'testString'
concept_model_model['nluSide'] = 'testString'
concept_model_model['nluSourceType'] = 'testString'
concept_model_model['nluRelation'] = 'testString'
concept_model_model['nluTargetType'] = 'testString'
concept_model_model['hits'] = 38
relation_model_model = {} # RelationModel
relation_model_model['relationId'] = 'testString'
relation_model_model['relation'] = 'testString'
relation_model_model['source'] = text_span_model
relation_model_model['target'] = text_span_model
string_builder_model = {} # StringBuilder
data_model_model = {} # DataModel
data_model_model['concepts'] = [concept_model_model]
data_model_model['attributeValues'] = [concept_model_model]
data_model_model['relations'] = [relation_model_model]
data_model_model['mesh'] = [concept_model_model]
data_model_model['text'] = [concept_model_model]
passage_model = {} # Passage
passage_model['documentSection'] = 'testString'
passage_model['text'] = string_builder_model
passage_model['timestamp'] = 26
passage_model['preferredName'] = 'testString'
annotation_model_model = {} # AnnotationModel
annotation_model_model['uniqueId'] = 38
annotation_model_model['stickyIds'] = [38]
annotation_model_model['ontology'] = 'testString'
annotation_model_model['section'] = 'testString'
annotation_model_model['preferredName'] = 'testString'
annotation_model_model['cui'] = 'testString'
annotation_model_model['attributeId'] = 'testString'
annotation_model_model['qualifiers'] = ['testString']
annotation_model_model['type'] = 'testString'
annotation_model_model['negated'] = True
annotation_model_model['hypothetical'] = True
annotation_model_model['unit'] = 'testString'
annotation_model_model['minValue'] = 'testString'
annotation_model_model['maxValue'] = 'testString'
annotation_model_model['operator'] = 'testString'
annotation_model_model['nluSourceType'] = 'testString'
annotation_model_model['nluRelation'] = 'testString'
annotation_model_model['nluTargetType'] = 'testString'
annotation_model_model['nluEntityIndex'] = 'testString'
annotation_model_model['nluMentionIndex'] = 'testString'
annotation_model_model['nluRelationId'] = 'testString'
annotation_model_model['nluSide'] = 'testString'
annotation_model_model['begin'] = 38
annotation_model_model['end'] = 38
annotation_model_model['score'] = 36.0
annotation_model_model['timestamp'] = 26
annotation_model_model['features'] = {}
annotation_model_model['hits'] = 38
bool_operand_model = {} # BoolOperand
bool_operand_model['boolOperand'] = 'testString'
count_model = {} # Count
count_model['count'] = 38
count_model['hits'] = 38
message_model = {} # Message
message_model['messageType'] = 'expanded_request'
message_model['url'] = 'testString'
message_model['request'] = { 'foo': 'bar' }
message_model['headers'] = ['testString']
message_model['status'] = 38
message_model['response'] = { 'foo': 'bar' }
passages_model_model = {} # PassagesModel
passages_model_model['allPassages'] = [passage_model]
passages_model_model['searchTermToPassages'] = {}
ranked_doc_links_model = {} # RankedDocLinks
ranked_doc_links_model['hrefSearchMatches'] = 'testString'
ranked_doc_links_model['hrefCategories'] = 'testString'
unstructured_model_model = {} # UnstructuredModel
unstructured_model_model['text'] = 'testString'
unstructured_model_model['data'] = data_model_model
attribute_model = {} # Attribute
attribute_model['attributeId'] = 'testString'
attribute_model['displayName'] = 'testString'
attribute_model['count'] = 38
backend_model = {} # Backend
backend_model['messages'] = [message_model]
boolean_operands_model = {} # BooleanOperands
boolean_operands_model['boolExpression'] = 'testString'
boolean_operands_model['boolOperands'] = [bool_operand_model]
common_data_model_model = {} # CommonDataModel
common_data_model_model['unstructured'] = [unstructured_model_model]
concept_model = {} # Concept
concept_model['ontology'] = 'testString'
concept_model['cui'] = 'testString'
concept_model['preferredName'] = 'testString'
concept_model['alternativeName'] = 'testString'
concept_model['semanticType'] = 'testString'
concept_model['count'] = 38
concept_model['hitCount'] = 38
concept_model['score'] = 36.0
concept_model['parents'] = count_model
concept_model['children'] = count_model
concept_model['siblings'] = count_model
concept_model['related'] = count_model
concept_model['documentIds'] = ['testString']
concept_model['dataType'] = 'testString'
concept_model['unit'] = 'testString'
concept_model['operator'] = 'testString'
concept_model['minValue'] = 'testString'
concept_model['maxValue'] = 'testString'
concept_model['vocab'] = 'testString'
concept_model['properties'] = ['testString']
metadata_fields_model = {} # MetadataFields
metadata_fields_model['corpus'] = 'testString'
metadata_fields_model['corpusDescription'] = 'testString'
metadata_fields_model['fields'] = {}
qualifer_model = {} # Qualifer
qualifer_model['id'] = 'testString'
qualifer_model['name'] = 'testString'
range_model_model = {} # RangeModel
range_model_model['operator'] = 'testString'
range_model_model['min'] = 'testString'
range_model_model['max'] = 'testString'
range_model_model['count'] = 38
ranked_document_model = {} # RankedDocument
ranked_document_model['documentId'] = 'testString'
ranked_document_model['title'] = 'testString'
ranked_document_model['metadata'] = {}
ranked_document_model['sectionName'] = 'testString'
ranked_document_model['sectionId'] = 'testString'
ranked_document_model['corpus'] = 'testString'
ranked_document_model['links'] = ranked_doc_links_model
ranked_document_model['passages'] = passages_model_model
ranked_document_model['annotations'] = {}
# Construct a json representation of a SearchModel model
search_model_model_json = {}
search_model_model_json['href'] = 'testString'
search_model_model_json['pageNumber'] = 38
search_model_model_json['get_limit'] = 38
search_model_model_json['totalDocumentCount'] = 38
search_model_model_json['concepts'] = [concept_model]
search_model_model_json['types'] = ['testString']
search_model_model_json['attributes'] = [attribute_model]
search_model_model_json['values'] = [concept_model]
search_model_model_json['ranges'] = {}
search_model_model_json['typeahead'] = [concept_model]
search_model_model_json['aggregations'] = {}
search_model_model_json['dateHistograms'] = {}
search_model_model_json['qualifiers'] = [qualifer_model]
search_model_model_json['backend'] = backend_model
search_model_model_json['expandedQuery'] = { 'foo': 'bar' }
search_model_model_json['parsedBoolExpression'] = boolean_operands_model
search_model_model_json['conceptsExist'] = {}
search_model_model_json['cursorId'] = 'testString'
search_model_model_json['vocabs'] = ['testString']
search_model_model_json['annotations'] = {}
search_model_model_json['metadata'] = metadata_fields_model
search_model_model_json['documents'] = [ranked_document_model]
# Construct a model instance of SearchModel by calling from_dict on the json representation
search_model_model = SearchModel.from_dict(search_model_model_json)
assert search_model_model != False
# Construct a model instance of SearchModel by calling from_dict on the json representation
search_model_model_dict = SearchModel.from_dict(search_model_model_json).__dict__
search_model_model2 = SearchModel(**search_model_model_dict)
# Verify the model instances are equivalent
assert search_model_model == search_model_model2
# Convert model instance back to dict and verify no loss of data
search_model_model_json2 = search_model_model.to_dict()
assert search_model_model_json2 == search_model_model_json
#-----------------------------------------------------------------------------
# Test Class for SentenceModel
#-----------------------------------------------------------------------------
class TestSentenceModel():
#--------------------------------------------------------
# Test serialization/deserialization for SentenceModel
#--------------------------------------------------------
def test_sentence_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
string_builder_model = {} # StringBuilder
# Construct a json representation of a SentenceModel model
sentence_model_model_json = {}
sentence_model_model_json['documentSection'] = 'testString'
sentence_model_model_json['text'] = string_builder_model
sentence_model_model_json['begin'] = 38
sentence_model_model_json['end'] = 38
sentence_model_model_json['timestamp'] = 26
# Construct a model instance of SentenceModel by calling from_dict on the json representation
sentence_model_model = SentenceModel.from_dict(sentence_model_model_json)
assert sentence_model_model != False
# Construct a model instance of SentenceModel by calling from_dict on the json representation
sentence_model_model_dict = SentenceModel.from_dict(sentence_model_model_json).__dict__
sentence_model_model2 = SentenceModel(**sentence_model_model_dict)
# Verify the model instances are equivalent
assert sentence_model_model == sentence_model_model2
# Convert model instance back to dict and verify no loss of data
sentence_model_model_json2 = sentence_model_model.to_dict()
assert sentence_model_model_json2 == sentence_model_model_json
#-----------------------------------------------------------------------------
# Test Class for ServiceStatus
#-----------------------------------------------------------------------------
class TestServiceStatus():
#--------------------------------------------------------
# Test serialization/deserialization for ServiceStatus
#--------------------------------------------------------
def test_service_status_serialization(self):
# Construct a json representation of a ServiceStatus model
service_status_model_json = {}
service_status_model_json['serviceState'] = 'OK'
service_status_model_json['stateDetails'] = 'testString'
# Construct a model instance of ServiceStatus by calling from_dict on the json representation
service_status_model = ServiceStatus.from_dict(service_status_model_json)
assert service_status_model != False
# Construct a model instance of ServiceStatus by calling from_dict on the json representation
service_status_model_dict = ServiceStatus.from_dict(service_status_model_json).__dict__
service_status_model2 = ServiceStatus(**service_status_model_dict)
# Verify the model instances are equivalent
assert service_status_model == service_status_model2
# Convert model instance back to dict and verify no loss of data
service_status_model_json2 = service_status_model.to_dict()
assert service_status_model_json2 == service_status_model_json
#-----------------------------------------------------------------------------
# Test Class for TextSpan
#-----------------------------------------------------------------------------
class TestTextSpan():
#--------------------------------------------------------
# Test serialization/deserialization for TextSpan
#--------------------------------------------------------
def test_text_span_serialization(self):
# Construct a json representation of a TextSpan model
text_span_model_json = {}
text_span_model_json['section'] = 'testString'
text_span_model_json['begin'] = 38
text_span_model_json['end'] = 38
text_span_model_json['coveredText'] = 'testString'
text_span_model_json['source'] = 'testString'
text_span_model_json['type'] = 'testString'
# Construct a model instance of TextSpan by calling from_dict on the json representation
text_span_model = TextSpan.from_dict(text_span_model_json)
assert text_span_model != False
# Construct a model instance of TextSpan by calling from_dict on the json representation
text_span_model_dict = TextSpan.from_dict(text_span_model_json).__dict__
text_span_model2 = TextSpan(**text_span_model_dict)
# Verify the model instances are equivalent
assert text_span_model == text_span_model2
# Convert model instance back to dict and verify no loss of data
text_span_model_json2 = text_span_model.to_dict()
assert text_span_model_json2 == text_span_model_json
#-----------------------------------------------------------------------------
# Test Class for UnstructuredModel
#-----------------------------------------------------------------------------
class TestUnstructuredModel():
#--------------------------------------------------------
# Test serialization/deserialization for UnstructuredModel
#--------------------------------------------------------
def test_unstructured_model_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
text_span_model = {} # TextSpan
text_span_model['section'] = 'testString'
text_span_model['begin'] = 38
text_span_model['end'] = 38
text_span_model['coveredText'] = 'testString'
text_span_model['source'] = 'testString'
text_span_model['type'] = 'testString'
concept_model_model = {} # ConceptModel
concept_model_model['uniqueId'] = 38
concept_model_model['stickyIds'] = [38]
concept_model_model['section'] = 'testString'
concept_model_model['type'] = 'testString'
concept_model_model['begin'] = 38
concept_model_model['end'] = 38
concept_model_model['coveredText'] = 'testString'
concept_model_model['cui'] = 'testString'
concept_model_model['preferredName'] = 'testString'
concept_model_model['source'] = 'testString'
concept_model_model['negated'] = True
concept_model_model['hypothetical'] = True
concept_model_model['timestamp'] = 26
concept_model_model['attributeId'] = 'testString'
concept_model_model['qualifiers'] = ['testString']
concept_model_model['unit'] = 'testString'
concept_model_model['minValue'] = 'testString'
concept_model_model['maxValue'] = 'testString'
concept_model_model['operator'] = 'testString'
concept_model_model['features'] = {}
concept_model_model['nluEntityIndex'] = 'testString'
concept_model_model['nluMentionIndex'] = 'testString'
concept_model_model['nluRelationId'] = 'testString'
concept_model_model['nluSide'] = 'testString'
concept_model_model['nluSourceType'] = 'testString'
concept_model_model['nluRelation'] = 'testString'
concept_model_model['nluTargetType'] = 'testString'
concept_model_model['hits'] = 38
relation_model_model = {} # RelationModel
relation_model_model['relationId'] = 'testString'
relation_model_model['relation'] = 'testString'
relation_model_model['source'] = text_span_model
relation_model_model['target'] = text_span_model
data_model_model = {} # DataModel
data_model_model['concepts'] = [concept_model_model]
data_model_model['attributeValues'] = [concept_model_model]
data_model_model['relations'] = [relation_model_model]
data_model_model['mesh'] = [concept_model_model]
data_model_model['text'] = [concept_model_model]
# Construct a json representation of a UnstructuredModel model
unstructured_model_model_json = {}
unstructured_model_model_json['text'] = 'testString'
unstructured_model_model_json['data'] = data_model_model
# Construct a model instance of UnstructuredModel by calling from_dict on the json representation
unstructured_model_model = UnstructuredModel.from_dict(unstructured_model_model_json)
assert unstructured_model_model != False
# Construct a model instance of UnstructuredModel by calling from_dict on the json representation
unstructured_model_model_dict = UnstructuredModel.from_dict(unstructured_model_model_json).__dict__
unstructured_model_model2 = UnstructuredModel(**unstructured_model_model_dict)
# Verify the model instances are equivalent
assert unstructured_model_model == unstructured_model_model2
# Convert model instance back to dict and verify no loss of data
unstructured_model_model_json2 = unstructured_model_model.to_dict()
assert unstructured_model_model_json2 == unstructured_model_model_json
# endregion
##############################################################################
# End of Model Tests
##############################################################################
| 82.348405 | 52,615 | 0.614107 | 36,972 | 376,991 | 6.015688 | 0.016174 | 0.038847 | 0.012949 | 0.014244 | 0.92102 | 0.882223 | 0.858065 | 0.822847 | 0.806144 | 0.794395 | 0 | 0.010125 | 0.158269 | 376,991 | 4,577 | 52,616 | 82.366397 | 0.690771 | 0.145844 | 0 | 0.595721 | 0 | 0.016968 | 0.626571 | 0.025076 | 0 | 0 | 0 | 0 | 0.105865 | 1 | 0.039469 | false | 0.025821 | 0.002582 | 0 | 0.067134 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
397a2e656dda057ab0a8af89eac7dc5e8aad0374 | 2,432 | py | Python | backend-service/bot_proxy_server/proxy_service/bot_server_http_calls/schedule.py | sravankumarmatta/Classroom-Bot | 2081600c553c003ada4c0dadd2d4715e11c073d2 | [
"MIT"
] | 1 | 2020-10-06T06:23:04.000Z | 2020-10-06T06:23:04.000Z | backend-service/bot_proxy_server/proxy_service/bot_server_http_calls/schedule.py | sravankumarmatta/Classroom-Bot | 2081600c553c003ada4c0dadd2d4715e11c073d2 | [
"MIT"
] | 38 | 2020-10-01T00:13:35.000Z | 2020-10-27T03:33:09.000Z | backend-service/bot_proxy_server/proxy_service/bot_server_http_calls/schedule.py | sravankumarmatta/Classroom-Bot | 2081600c553c003ada4c0dadd2d4715e11c073d2 | [
"MIT"
] | 8 | 2020-10-20T07:00:11.000Z | 2021-09-28T00:23:45.000Z | import requests
import os
def save_tutor_link_user_email_id(team_id, tutor_link, slack_user_id):
schedule_url = os.getenv("BOT_SERVER_SCHEDULE_URL", None)
if schedule_url:
print("Sending")
print(schedule_url, tutor_link, slack_user_id, team_id)
req = requests.post(schedule_url,
data={'tutor_link': tutor_link,
'workspace_id': team_id,
'slack_user_id': slack_user_id})
res = req.text
if res == 'true':
return "You are registered in your classroom space. " \
"Now you can access and use all supported /my command operations."
else:
return "Something went wrong from our end. We will fix it soon. Sorry for inconvenience."
return "Our system is wrongly configured. We will fix it soon. Sorry for inconvenience."
def save_lecture_link_user_email_id(team_id, lecture_link, slack_user_id):
schedule_url = os.getenv("BOT_SERVER_SCHEDULE_URL", None)
if schedule_url:
print("Sending")
print(schedule_url, lecture_link, slack_user_id, team_id)
req = requests.post(schedule_url,
data={'lecture_link': lecture_link,
'workspace_id': team_id,
'slack_user_id': slack_user_id})
res = req.text
if res == 'true':
return "You are registered in your classroom space. " \
"Now you can access and use all supported /my command operations."
else:
return "Something went wrong from our end. We will fix it soon. Sorry for inconvenience."
return "Our system is wrongly configured. We will fix it soon. Sorry for inconvenience."
def get_tutor_link_for_user(slack_id):
schedule_url = os.getenv("BOT_SERVER_SCHEDULE_URL", None)
if schedule_url:
req = requests.get(schedule_url, params={
"slack_user_id": slack_id,
"type": "tutor"
})
res = req.json()
return res["data"]
def get_lecture_link_for_user(slack_id):
schedule_url = os.getenv("BOT_SERVER_SCHEDULE_URL", None)
if schedule_url:
req = requests.get(schedule_url, params={
"slack_user_id": slack_id,
"type": "lecture"
})
res = req.json()
return res["data"]
| 32.426667 | 101 | 0.602796 | 308 | 2,432 | 4.487013 | 0.227273 | 0.143271 | 0.079595 | 0.043415 | 0.920405 | 0.903039 | 0.839363 | 0.839363 | 0.839363 | 0.839363 | 0 | 0 | 0.3125 | 2,432 | 74 | 102 | 32.864865 | 0.826555 | 0 | 0 | 0.769231 | 0 | 0 | 0.318257 | 0.037829 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0 | 0.038462 | 0 | 0.269231 | 0.076923 | 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 |
397abe46d29a6112829120123de5d8a8d05290ab | 3,345 | py | Python | torpido/wavelet/wavelets/db11.py | AP-Atul/Torpido | a646b4d6de7f2e2c96de4c64ce3113f53e3931c2 | [
"Unlicense"
] | 21 | 2020-12-23T07:13:10.000Z | 2022-01-12T10:32:22.000Z | wavelet/wavelets/db11.py | AP-Atul/wavelets-ext | 00ced22462c369584ebd32f9b5f357f092de0142 | [
"MIT"
] | 2 | 2020-12-30T10:45:42.000Z | 2021-09-25T09:52:00.000Z | wavelet/wavelets/db11.py | AP-Atul/wavelets-ext | 00ced22462c369584ebd32f9b5f357f092de0142 | [
"MIT"
] | 1 | 2021-02-06T21:39:41.000Z | 2021-02-06T21:39:41.000Z | """ Daubechies 11 wavelet """
class Daubechies11:
"""
Properties
----------
asymmetric, orthogonal, bi-orthogonal
All values are from http://wavelets.pybytes.com/wavelet/db11/
"""
__name__ = "Daubechies Wavelet 11"
__motherWaveletLength__ = 22 # length of the mother wavelet
__transformWaveletLength__ = 2 # minimum wavelength of input signal
# decomposition filter
# low-pass
decompositionLowFilter = [
4.494274277236352e-06,
- 3.463498418698379e-05,
5.443907469936638e-05,
0.00024915252355281426,
- 0.0008930232506662366,
- 0.00030859285881515924,
0.004928417656058778,
- 0.0033408588730145018,
- 0.015364820906201324,
0.02084090436018004,
0.03133509021904531,
- 0.06643878569502022,
- 0.04647995511667613,
0.14981201246638268,
0.06604358819669089,
- 0.27423084681792875,
- 0.16227524502747828,
0.41196436894789695,
0.6856867749161785,
0.44989976435603013,
0.1440670211506196,
0.01869429776147044
]
# high-pass
decompositionHighFilter = [
-0.01869429776147044,
0.1440670211506196,
- 0.44989976435603013,
0.6856867749161785,
- 0.41196436894789695,
- 0.16227524502747828,
0.27423084681792875,
0.06604358819669089,
- 0.14981201246638268,
- 0.04647995511667613,
0.06643878569502022,
0.03133509021904531,
- 0.02084090436018004,
- 0.015364820906201324,
0.0033408588730145018,
0.004928417656058778,
0.00030859285881515924,
- 0.0008930232506662366,
- 0.00024915252355281426,
5.443907469936638e-05,
3.463498418698379e-05,
4.494274277236352e-06
]
# reconstruction filters
# low pass
reconstructionLowFilter = [
0.01869429776147044,
0.1440670211506196,
0.44989976435603013,
0.6856867749161785,
0.41196436894789695,
- 0.16227524502747828,
- 0.27423084681792875,
0.06604358819669089,
0.14981201246638268,
- 0.04647995511667613,
- 0.06643878569502022,
0.03133509021904531,
0.02084090436018004,
- 0.015364820906201324,
- 0.0033408588730145018,
0.004928417656058778,
- 0.00030859285881515924,
- 0.0008930232506662366,
0.00024915252355281426,
5.443907469936638e-05,
- 3.463498418698379e-05,
4.494274277236352e-06
]
# high-pass
reconstructionHighFilter = [
4.494274277236352e-06,
3.463498418698379e-05,
5.443907469936638e-05,
- 0.00024915252355281426,
- 0.0008930232506662366,
0.00030859285881515924,
0.004928417656058778,
0.0033408588730145018,
- 0.015364820906201324,
- 0.02084090436018004,
0.03133509021904531,
0.06643878569502022,
- 0.04647995511667613,
- 0.14981201246638268,
0.06604358819669089,
0.27423084681792875,
- 0.16227524502747828,
- 0.41196436894789695,
0.6856867749161785,
- 0.44989976435603013,
0.1440670211506196,
- 0.01869429776147044
]
| 27.644628 | 72 | 0.615247 | 242 | 3,345 | 8.454545 | 0.289256 | 0.033236 | 0.037146 | 0.01955 | 0.799609 | 0.799609 | 0.799609 | 0.799609 | 0.799609 | 0.799609 | 0 | 0.698121 | 0.299851 | 3,345 | 120 | 73 | 27.875 | 0.175491 | 0.087294 | 0 | 0.84 | 0 | 0 | 0.006972 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0.08 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 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 | 8 |
3988169d0018ddd8c112ee7dad191c217923fd76 | 110 | py | Python | simuvex/simuvex/engines/vex/statements/mbe.py | Ruide/angr-dev | 964dc80c758e25c698c2cbcc454ef5954c5fa0a0 | [
"BSD-2-Clause"
] | 86 | 2015-08-06T23:25:07.000Z | 2022-02-17T14:58:22.000Z | simuvex/simuvex/engines/vex/statements/mbe.py | Ruide/angr-dev | 964dc80c758e25c698c2cbcc454ef5954c5fa0a0 | [
"BSD-2-Clause"
] | 132 | 2015-09-10T19:06:59.000Z | 2018-10-04T20:36:45.000Z | simuvex/simuvex/engines/vex/statements/mbe.py | Ruide/angr-dev | 964dc80c758e25c698c2cbcc454ef5954c5fa0a0 | [
"BSD-2-Clause"
] | 80 | 2015-08-07T10:30:20.000Z | 2020-03-21T14:45:28.000Z | print '... Importing simuvex/engines/vex/statements/mbe.py ...'
from angr.engines.vex.statements.mbe import *
| 36.666667 | 63 | 0.754545 | 15 | 110 | 5.533333 | 0.733333 | 0.240964 | 0.481928 | 0.554217 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.081818 | 110 | 2 | 64 | 55 | 0.821782 | 0 | 0 | 0 | 0 | 0 | 0.5 | 0.336364 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 1 | null | null | 0.5 | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 8 |
39d8db0ac89a1cb44c071a7493fa91076bb40659 | 34 | py | Python | cac/pruning/__init__.py | FujitsuLaboratories/CAC | d12df8e47f61eaf7d7b0ed355e2d1aa296453f86 | [
"Apache-2.0"
] | 8 | 2021-09-30T07:24:43.000Z | 2022-02-21T07:30:46.000Z | cac/pruning/__init__.py | FujitsuLaboratories/CAC | d12df8e47f61eaf7d7b0ed355e2d1aa296453f86 | [
"Apache-2.0"
] | null | null | null | cac/pruning/__init__.py | FujitsuLaboratories/CAC | d12df8e47f61eaf7d7b0ed355e2d1aa296453f86 | [
"Apache-2.0"
] | null | null | null | from .auto_prune import auto_prune | 34 | 34 | 0.882353 | 6 | 34 | 4.666667 | 0.666667 | 0.642857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.088235 | 34 | 1 | 34 | 34 | 0.903226 | 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 |
f2d2d0903cd604336cf5be99615fdeb566946027 | 4,417 | py | Python | znbpost/migrations/0002_auto_20190501_1741.py | alexisbellido/znbpost | 1e825cf0575a36af50211c690e7a92b64f0841cf | [
"BSD-3-Clause"
] | null | null | null | znbpost/migrations/0002_auto_20190501_1741.py | alexisbellido/znbpost | 1e825cf0575a36af50211c690e7a92b64f0841cf | [
"BSD-3-Clause"
] | 8 | 2019-12-04T22:22:25.000Z | 2022-02-10T08:07:02.000Z | znbpost/migrations/0002_auto_20190501_1741.py | alexisbellido/znbpost | 1e825cf0575a36af50211c690e7a92b64f0841cf | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2 on 2019-05-01 21:41
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('znbpost', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Article',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=200)),
('subtitle', models.CharField(blank=True, max_length=200, null=True)),
('summary', models.TextField()),
('body', models.TextField()),
('summary_html', models.TextField(blank=True, editable=False)),
('body_html', models.TextField(blank=True, editable=False)),
('image', models.ImageField(blank=True, height_field='height_field', null=True, upload_to='img/%Y/%m/', width_field='width_field')),
('height_field', models.IntegerField(blank=True, default=0, null=True)),
('width_field', models.IntegerField(blank=True, default=0, null=True)),
('image_credit', models.CharField(blank=True, max_length=200, null=True)),
('image_credit_html', models.TextField(blank=True, editable=False)),
('slug', models.SlugField(max_length=128, unique=True)),
('status', models.IntegerField(choices=[(1, 'Live'), (2, 'Draft'), (3, 'Hidden')], default=2)),
('enable_comments', models.BooleanField(default=False)),
('created', models.DateTimeField(blank=True)),
('modified', models.DateTimeField()),
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Page',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=200)),
('subtitle', models.CharField(blank=True, max_length=200, null=True)),
('summary', models.TextField()),
('body', models.TextField()),
('summary_html', models.TextField(blank=True, editable=False)),
('body_html', models.TextField(blank=True, editable=False)),
('image', models.ImageField(blank=True, height_field='height_field', null=True, upload_to='img/%Y/%m/', width_field='width_field')),
('height_field', models.IntegerField(blank=True, default=0, null=True)),
('width_field', models.IntegerField(blank=True, default=0, null=True)),
('image_credit', models.CharField(blank=True, max_length=200, null=True)),
('image_credit_html', models.TextField(blank=True, editable=False)),
('slug', models.SlugField(max_length=128, unique=True)),
('status', models.IntegerField(choices=[(1, 'Live'), (2, 'Draft'), (3, 'Hidden')], default=2)),
('enable_comments', models.BooleanField(default=False)),
('created', models.DateTimeField(blank=True)),
('modified', models.DateTimeField()),
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CategoryToArticle',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='znbpost.Article')),
('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='znbpost.Category')),
],
),
migrations.AddField(
model_name='article',
name='categories',
field=models.ManyToManyField(blank=True, through='znbpost.CategoryToArticle', to='znbpost.Category'),
),
]
| 53.865854 | 148 | 0.586144 | 444 | 4,417 | 5.704955 | 0.225225 | 0.067509 | 0.028425 | 0.05685 | 0.818397 | 0.818397 | 0.818397 | 0.818397 | 0.818397 | 0.818397 | 0 | 0.016509 | 0.259452 | 4,417 | 81 | 149 | 54.530864 | 0.757872 | 0.009735 | 0 | 0.72 | 1 | 0 | 0.130604 | 0.005718 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.04 | 0 | 0.08 | 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 |
843e291b6cbbf555527c94b0a29fa5d5d7ff6eb8 | 39,751 | py | Python | author_manage/tests/test_views.py | VForWaTer/vforwater-portal | 225177e6f0796e909084e93c076840d0271d567f | [
"MIT"
] | 1 | 2020-05-15T14:51:10.000Z | 2020-05-15T14:51:10.000Z | author_manage/tests/test_views.py | VForWaTer/vforwater-portal | 225177e6f0796e909084e93c076840d0271d567f | [
"MIT"
] | 7 | 2019-07-12T17:12:00.000Z | 2021-12-14T08:12:26.000Z | author_manage/tests/test_views.py | VForWaTer/vforwater-portal | 225177e6f0796e909084e93c076840d0271d567f | [
"MIT"
] | 1 | 2021-04-28T21:58:24.000Z | 2021-04-28T21:58:24.000Z | import unittest
from django.test import Client
from django.test import TestCase
from unittest import skip
from django.contrib.auth.models import User
from author_manage.models import *
from test.support import resource
def setUpUsers():
"""
@return:
@rtype:
"""
test_admin = User.objects.create(username='admin')
test_admin.set_password('123456')
test_admin.is_staff = True
test_admin.is_admin = True
test_admin.save()
test_user = User.objects.create(username='boncho')
test_user.set_password('123456')
test_user.save()
test_user2 = User.objects.create(username='evlogi')
test_user2.set_password('123456')
test_user2.save()
return {'test_admin':test_admin,'test_user':test_user,'test_user2':test_user2}
def setUpResourceAndRequests(users):
"""
@param users:
@type users:
@return:
@rtype:
"""
res = Resource.objects.create(name='res',type='text',description='desc',link='res.txt')
res.readers.add(users['test_user'].id)
res.owners.add(users['test_user'].id)
res.readers.add(users['test_admin'].id)
res.owners.add(users['test_admin'].id)
res.save()
res2 = Resource.objects.create(name='res2',type='text',description='desc',link='res2.txt')
res2.readers.add(users['test_user'].id)
res2.owners.add(users['test_user'].id)
res2.readers.add(users['test_admin'].id)
res2.owners.add(users['test_admin'].id)
res2.save()
res3 = Resource.objects.create(name='res3',type='text',description='desc',link='res3.txt')
res3.readers.add(users['test_user2'].id)
res3.owners.add(users['test_user2'].id)
res3.save();
res4 = Resource.objects.create(name='res4',type='text',description='desc',link='res4.txt')
res4.readers.add(users['test_user2'].id)
res4.owners.add(users['test_user2'].id)
res4.readers.add(users['test_admin'].id)
res4.owners.add(users['test_admin'].id)
res4.save();
access_req = AccessRequest.objects.create(sender=users['test_user2'],resource=res)
access_req.save()
access_req2 = AccessRequest.objects.create(sender=users['test_user2'],resource=res2)
access_req2.save()
deletion_req = DeletionRequest.objects.create(sender=users['test_user'],resource=res)
deletion_req.save()
deletion_req2 = DeletionRequest.objects.create(sender=users['test_user'],resource=res2)
deletion_req2.save()
deletion_req3 = DeletionRequest.objects.create(sender=users['test_user2'],resource=res3)
deletion_req3.save()
def deleteUsers():
"""
@return:
@rtype:
"""
User.objects.all().delete()
def deleteResourcesAndRequests():
"""
@return:
@rtype:
"""
AccessRequest.objects.all().delete()
DeletionRequest.objects.all().delete()
Resource.objects.all().delete()
class TestHomeView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
setUpUsers()
def setUp(self):
""""""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.get('/')
self.assertEqual(response.status_code, 302)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/')
self.assertEqual(str(response.context['user']),'boncho')
self.assertEqual(response.status_code, 200)
class TestResourceManager(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
setUpUsers()
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.get('/resource-manager/')
self.assertEqual(response.status_code, 302)
def test_logged_in_no_admin(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/resource-manager/')
self.assertEqual(response.status_code, 302)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='admin', password='123456')
response = self.client.get('/resource-manager/')
self.assertEqual(str(response.context['user']),'admin')
self.assertEqual(response.status_code, 200)
class TestUserManager(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
setUpUsers()
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.get('/user-manager/')
self.assertEqual(response.status_code, 302)
def test_logged_in_no_admin(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/user-manager/')
self.assertEqual(response.status_code, 302)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='admin', password='123456')
response = self.client.get('/user-manager/')
self.assertEqual(str(response.context['user']),'admin')
self.assertEqual(response.status_code, 200)
class TestProfileView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.get('/profile/')
self.assertEqual(response.status_code, 302)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/profile/')
self.assertEqual(str(response.context['user']),'boncho')
self.assertEqual(response.status_code, 200)
def test_pagination_user(self):
"""
@return:
@rtype:
"""
#User has to see only the two access requests for him
self.client.login(username='boncho', password='123456')
response = self.client.get('/profile/')
self.assertTrue('is_paginated' in response.context)
self.assertTrue(response.context['is_paginated'] == False)
self.assertEqual(len(response.context['requests_list']), 2)
def test_pagination_admin_page_1(self):
"""
@return:
@rtype:
"""
#Admin has to see the two access and the three deletion requests for him
#Only 4 of them are shown on page 1
self.client.login(username='admin', password='123456')
response = self.client.get('/profile/')
self.assertTrue('is_paginated' in response.context)
self.assertTrue(response.context['is_paginated'] == True)
self.assertEqual(len(response.context['requests_list']), 4)
def test_pagination_admin_page_2(self):
"""
@return:
@rtype:
"""
#Admin has to see the two access and the three deletion requests for him
#The last deletion request is shown on page 2
self.client.login(username='admin', password='123456')
response = self.client.get('/profile/?page=2')
self.assertTrue('is_paginated' in response.context)
self.assertTrue(response.context['is_paginated'] == True)
self.assertEqual(len(response.context['requests_list']), 1)
class TestMyResourcesView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.get('/profile/my-resources/')
self.assertEqual(response.status_code, 302)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/profile/my-resources/')
self.assertEqual(str(response.context['user']),'boncho')
self.assertEqual(response.status_code, 200)
def test_resources_shown(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/profile/my-resources/')
self.assertTrue('resource_list' in response.context)
self.assertEqual(len(response.context['resource_list']), 2)
class TestSendDeletionRequestView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.post('/send-deletion-request/1')
self.assertEqual(response.status_code, 302)
def test_not_existing_resource(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/send-deletion-request/50')
self.assertEqual(response.status_code, 404)
def test_not_owner(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/send-deletion-request/4')
self.assertEqual(response.status_code, 403)
def test_staff_user(self):
"""
@return:
@rtype:
"""
self.client.login(username='admin', password='123456')
response = self.client.post('/send-deletion-request/4')
self.assertEqual(response.status_code, 302)
def test_deletion_request_exists(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/send-deletion-request/3')
self.assertEqual(response.status_code, 302)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/send-deletion-request/4', {'descr':''})
self.assertEqual(response.status_code, 302)
class TestCancelDeletionRequestView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
""""""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.post('/cancel-deletion-request/1')
self.assertEqual(response.status_code, 302)
def test_not_existing_resource(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/cancel-deletion-request/50')
self.assertEqual(response.status_code, 404)
def test_not_owner(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/cancel-deletion-request/1')
self.assertEqual(response.status_code, 403)
def test_staff_user(self):
"""
@return:
@rtype:
"""
self.client.login(username='admin', password='123456')
response = self.client.post('/cancel-deletion-request/1')
self.assertEqual(response.status_code, 302)
def test_deletion_request_doesnt_exist(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/cancel-deletion-request/4')
self.assertEqual(response.status_code, 404)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/cancel-deletion-request/1')
self.assertEqual(response.status_code, 302)
class TestApproveAccessRequestView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
response = self.client.post('/approve-access-request/1')
self.assertEqual(response.status_code, 302)
def test_not_existing_request(self):
self.client.login(username='boncho', password='123456')
response = self.client.post('/approve-access-request/50')
self.assertEqual(response.status_code, 404)
def test_not_owner(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/approve-access-request/1')
self.assertEqual(response.status_code, 403)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/approve-access-request/1', {'descr':''})
self.assertEqual(response.status_code, 302)
class TestDenyAccessRequestView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.post('/deny-access-request/1')
self.assertEqual(response.status_code, 302)
def test_not_existing_request(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/deny-access-request/50')
self.assertEqual(response.status_code, 404)
def test_not_owner(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/deny-access-request/1')
self.assertEqual(response.status_code, 403)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/deny-access-request/1', {'descr':''})
self.assertEqual(response.status_code, 302)
class TestSendAccessRequestView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.post('/send-access-request/4')
self.assertEqual(response.status_code, 302)
def test_not_existing_resource(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/send-access-request/50')
self.assertEqual(response.status_code, 404)
def test_reader(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/send-access-request/4')
self.assertEqual(response.status_code, 302)
def test_staff_user(self):
"""
@return:
@rtype:
"""
self.client.login(username='admin', password='123456')
response = self.client.post('/send-access-request/3')
self.assertEqual(response.status_code, 302)
def test_access_request_exists(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/send-access-request/1')
self.assertEqual(response.status_code, 302)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/send-access-request/4', {'descr':''})
self.assertEqual(response.status_code, 302)
class TestCancelAccessRequestView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.post('/cancel-access-request/1')
self.assertEqual(response.status_code, 302)
def test_not_existing_resource(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/cancel-access-request/50')
self.assertEqual(response.status_code, 404)
def test_reader(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/cancel-access-request/4')
self.assertEqual(response.status_code, 404)
def test_staff_user(self):
"""
@return:
@rtype:
"""
self.client.login(username='admin', password='123456')
response = self.client.post('/cancel-access-request/3')
self.assertEqual(response.status_code, 404)
def test_access_request_doesnt_exist(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/cancel-access-request/4')
self.assertEqual(response.status_code, 404)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/cancel-access-request/1')
self.assertEqual(response.status_code, 302)
class TestDeleteResourceView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.post('/delete-resource/1')
self.assertEqual(response.status_code, 302)
def test_not_existing_resource(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/delete-resource/50')
self.assertEqual(response.status_code, 404)
def test_not_staff_user(self):
""""""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/delete-resource/1')
self.assertEqual(response.status_code, 403)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='admin', password='123456')
response = self.client.post('/delete-resource/1', {'descr':''})
self.assertEqual(response.status_code, 302)
class TestEditNameView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.get('/profile/edit-name/')
self.assertEqual(response.status_code, 302)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/profile/edit-name/', {'firstName':'', 'lastName': ''})
self.assertEqual(response.status_code, 302)
class TestResourcesOverview(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.get('/resources-overview/')
self.assertEqual(response.status_code, 302)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/resources-overview/')
self.assertEqual(str(response.context['user']),'boncho')
self.assertEqual(response.status_code, 200)
def test_pagination_user(self):
"""
@return:
@rtype:
"""
#User has to see only the four resources
self.client.login(username='boncho', password='123456')
response = self.client.get('/resources-overview/')
self.assertTrue('is_paginated' in response.context)
self.assertTrue(response.context['is_paginated'] == False)
self.assertEqual(len(response.context['resources_list']), 4)
class TestResourcesOverviewSearch(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.get('/resources-overview/search?q=2')
self.assertEqual(response.status_code, 302)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/resources-overview/search?q=2')
self.assertEqual(response.status_code, 200)
def test_no_query(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/resources-overview/search')
self.assertEqual(response.status_code, 302)
def test_valid_query(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/resources-overview/search?q=2')
self.assertTrue('is_paginated' in response.context)
self.assertTrue(response.context['is_paginated'] == False)
self.assertEqual(len(response.context['resources_list']), 1)
class TestPermissionEditingView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.get('/profile/my-resources/1-edit-users-permissions')
self.assertEqual(response.status_code, 301)
def test_not_existing_resource_get(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/profile/my-resources/50-edit-users-permissions/')
self.assertEqual(response.status_code, 404)
def test_not_existing_resource_post(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/profile/my-resources/50-edit-users-permissions/')
self.assertEqual(response.status_code, 404)
def test_not_authorized_user(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.get('/profile/my-resources/1-edit-users-permissions/')
self.assertEqual(response.status_code, 403)
def test_normal_get(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/profile/my-resources/1-edit-users-permissions/')
self.assertEqual(response.status_code, 200)
def test_normal_post(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/profile/my-resources/1-edit-users-permissions/')
self.assertEqual(response.status_code, 302)
def test_pagination_users(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/profile/my-resources/1-edit-users-permissions/')
self.assertTrue('user_list' in response.context)
self.assertEqual(len(response.context['user_list']), 2)
class TestPermissionEditingViewSearch(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.get('/profile/my-resources/1-edit-users-permissions/search?q=evl')
self.assertEqual(response.status_code, 302)
def test_not_existing_resource_get(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/profile/my-resources/50-edit-users-permissions/search?q=evl')
self.assertEqual(response.status_code, 404)
def test_not_existing_resource_post(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/profile/my-resources/50-edit-users-permissions/search?q=evl')
self.assertEqual(response.status_code, 404)
def test_not_authorized_user(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.get('/profile/my-resources/1-edit-users-permissions/search?q=evl')
self.assertEqual(response.status_code, 403)
def test_no_query(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/profile/my-resources/1-edit-users-permissions/search')
self.assertEqual(response.status_code, 302)
def test_normal_get(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/profile/my-resources/1-edit-users-permissions/search?q=evl')
self.assertEqual(response.status_code, 200)
def test_valid_query(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/profile/my-resources/1-edit-users-permissions/search?q=evl')
self.assertTrue('user_list' in response.context)
self.assertEqual(len(response.context['user_list']), 1)
def test_normal_post(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/profile/my-resources/1-edit-users-permissions/')
self.assertEqual(response.status_code, 302)
class TestAddNewResourceView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
setUpUsers()
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.get('/profile/my-resources/add-new-resource/')
self.assertEqual(response.status_code, 302)
def test_normal_get(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/profile/my-resources/add-new-resource/')
self.assertEqual(response.status_code, 200)
def test_no_resource_form(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/profile/my-resources/add-new-resource/',{'name':'a','type':'a','description':'a','link':''})
self.assertEqual(response.status_code, 302)
class TestOpenResourceView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.get('/resources/1')
self.assertEqual(response.status_code, 302)
def test_not_existing_resource(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/resources/50')
self.assertEqual(response.status_code, 404)
def test_not_reader(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.get('/resources/4')
self.assertEqual(response.status_code, 403)
@skip
def test_normal(self):
"""
@return:
@rtype:
"""
#It will work normally only if there is file res.txt in the resources folder of the web project
self.client.login(username='boncho', password='123456')
response = self.client.get('/resources/1')
self.assertEqual(response.status_code, 200)
class TestApproveDeletionRequestView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.post('/approve-deletion-request/1')
self.assertEqual(response.status_code, 302)
def test_not_existing_request(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/approve-deletion-request/50')
self.assertEqual(response.status_code, 404)
def test_not_admin(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/approve-deletion-request/1')
self.assertEqual(response.status_code, 403)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='admin', password='123456')
response = self.client.post('/approve-deletion-request/1', {'descr':''})
self.assertEqual(response.status_code, 302)
class TestDenyDeletionRequestView(TestCase):
"""
"""
@classmethod
def setUpClass(cls):
"""
@return:
@rtype:
"""
super().setUpClass()
users = setUpUsers()
setUpResourceAndRequests(users)
def setUp(self):
"""
@return:
@rtype:
"""
self.client = Client()
@classmethod
def tearDownClass(cls):
"""
@return:
@rtype:
"""
deleteResourcesAndRequests()
deleteUsers()
super().tearDownClass()
def test_not_logged_in(self):
"""
@return:
@rtype:
"""
response = self.client.post('/deny-deletion-request/1')
self.assertEqual(response.status_code, 302)
def test_not_existing_request(self):
"""
@return:
@rtype:
"""
self.client.login(username='boncho', password='123456')
response = self.client.post('/deny-deletion-request/50')
self.assertEqual(response.status_code, 404)
def test_not_admin(self):
"""
@return:
@rtype:
"""
self.client.login(username='evlogi', password='123456')
response = self.client.post('/deny-deletion-request/1')
self.assertEqual(response.status_code, 403)
def test_normal(self):
"""
@return:
@rtype:
"""
self.client.login(username='admin', password='123456')
response = self.client.post('/deny-deletion-request/1', {'descr':''})
self.assertEqual(response.status_code, 302)
| 22.753864 | 130 | 0.558904 | 3,735 | 39,751 | 5.847925 | 0.048728 | 0.083326 | 0.073482 | 0.110201 | 0.910677 | 0.901062 | 0.87991 | 0.871211 | 0.857568 | 0.845802 | 0 | 0.029503 | 0.297401 | 39,751 | 1,746 | 131 | 22.766896 | 0.752551 | 0.075872 | 0 | 0.800582 | 0 | 0 | 0.125529 | 0.065151 | 0 | 0 | 0 | 0 | 0.160116 | 1 | 0.229985 | false | 0.106259 | 0.010189 | 0 | 0.272198 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 9 |
844c7a982ba95bb565c85c8f9f9851f82db5ac5a | 2,759 | py | Python | fuzzy_system/local_minimum_avoidance_controller.py | mohameddhameem/fuzzy-robot | f5fee20edca4395a161d6a4973c19349d5082078 | [
"MIT"
] | null | null | null | fuzzy_system/local_minimum_avoidance_controller.py | mohameddhameem/fuzzy-robot | f5fee20edca4395a161d6a4973c19349d5082078 | [
"MIT"
] | null | null | null | fuzzy_system/local_minimum_avoidance_controller.py | mohameddhameem/fuzzy-robot | f5fee20edca4395a161d6a4973c19349d5082078 | [
"MIT"
] | null | null | null | import skfuzzy.control as ctrl
from fuzzy_system.moo_fuzzy_controller import MooFuzzyController
class LocalMinimumAvoidanceController(MooFuzzyController):
def inputs(self, dl, df, dr, a, p, ed):
return {
"input_dl": dl,
"input_df": df,
"input_dr": dr,
"input_a": a,
"input_ed": ed
}
def build_rules(self):
return [
ctrl.Rule(self.input_dl['N'] & self.input_df['N'] & self.input_dr['N'] & self.input_a['Z'],
self.output_u['S']),
ctrl.Rule(self.input_dl['N'] & self.input_df['N'] & self.input_dr['N'] & self.input_a['Z'],
self.output_w['PO']),
ctrl.Rule(self.input_dl['F'] & self.input_df['N'] & self.input_dr['N'] & self.input_a['P'],
self.output_u['M']),
ctrl.Rule(self.input_dl['F'] & self.input_df['N'] & self.input_dr['N'] & self.input_a['P'],
self.output_w['PO']),
ctrl.Rule(self.input_dl['F'] & self.input_df['N'] & self.input_dr['N'] & self.input_a['LP'],
self.output_u['S']),
ctrl.Rule(self.input_dl['F'] & self.input_df['N'] & self.input_dr['N'] & self.input_a['LP'],
self.output_w['LPO']),
ctrl.Rule(
self.input_dl['F'] & self.input_df['F'] & self.input_dr['N'] & self.input_ed['PT'] & self.input_a['P'],
self.output_u['M']),
ctrl.Rule(
self.input_dl['F'] & self.input_df['F'] & self.input_dr['N'] & self.input_ed['PT'] & self.input_a['P'],
self.output_w['ZO']),
ctrl.Rule(
self.input_dl['F'] & self.input_df['F'] & self.input_dr['N'] & self.input_ed['PT'] & self.input_a['LP'],
self.output_u['M']),
ctrl.Rule(
self.input_dl['F'] & self.input_df['F'] & self.input_dr['N'] & self.input_ed['PT'] & self.input_a['LP'],
self.output_w['ZO']),
ctrl.Rule(
self.input_dl['F'] & self.input_df['F'] & self.input_dr['F'] & self.input_ed['PT'] & self.input_a['P'],
self.output_u['M']),
ctrl.Rule(
self.input_dl['F'] & self.input_df['F'] & self.input_dr['F'] & self.input_ed['PT'] & self.input_a['P'],
self.output_w['ZO']),
ctrl.Rule(
self.input_dl['F'] & self.input_df['F'] & self.input_dr['F'] & self.input_ed['PT'] & self.input_a['LP'],
self.output_u['M']),
ctrl.Rule(
self.input_dl['F'] & self.input_df['F'] & self.input_dr['F'] & self.input_ed['PT'] & self.input_a['LP'],
self.output_w['LNO']),
]
| 49.267857 | 120 | 0.498731 | 386 | 2,759 | 3.339378 | 0.106218 | 0.446858 | 0.186191 | 0.184639 | 0.815361 | 0.815361 | 0.815361 | 0.814585 | 0.814585 | 0.811482 | 0 | 0 | 0.301921 | 2,759 | 55 | 121 | 50.163636 | 0.669263 | 0 | 0 | 0.68 | 0 | 0 | 0.050743 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04 | false | 0 | 0.04 | 0.04 | 0.14 | 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 |
fffa2bc053d057e00cadb11d95a519750793b303 | 130 | py | Python | pydtk/preprocesses/__init__.py | dataware-tools/pydtk | 1da61fb8ca90de6c39a371a9b2b65f4473932991 | [
"Apache-2.0"
] | 11 | 2020-10-09T01:29:18.000Z | 2022-01-21T13:21:40.000Z | pydtk/preprocesses/__init__.py | dataware-tools/pydtk | 1da61fb8ca90de6c39a371a9b2b65f4473932991 | [
"Apache-2.0"
] | 64 | 2020-10-20T04:55:22.000Z | 2022-01-24T15:52:32.000Z | pydtk/preprocesses/__init__.py | dataware-tools/pydtk | 1da61fb8ca90de6c39a371a9b2b65f4473932991 | [
"Apache-2.0"
] | 1 | 2021-07-30T04:52:38.000Z | 2021-07-30T04:52:38.000Z | from .downsampling import Downsample # NOQA
from .passthrough import PassThrough # NOQA
from .passthrough import AddBias # NOQA | 43.333333 | 44 | 0.8 | 15 | 130 | 6.933333 | 0.466667 | 0.153846 | 0.365385 | 0.480769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 130 | 3 | 45 | 43.333333 | 0.945455 | 0.107692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.666667 | 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 | 1 | 1 | 0 | 1 | 0 | 0 | 8 |
0813ac3f0bed7ab79a8fec88d9ebe7f4d05f67e4 | 278 | py | Python | observables/__init__.py | North-Guard/observable_primitives | 4ab8ad6f67b79490209815051d7731393413d3dd | [
"MIT"
] | 1 | 2018-01-11T14:01:05.000Z | 2018-01-11T14:01:05.000Z | observables/__init__.py | North-Guard/observable_primitives | 4ab8ad6f67b79490209815051d7731393413d3dd | [
"MIT"
] | null | null | null | observables/__init__.py | North-Guard/observable_primitives | 4ab8ad6f67b79490209815051d7731393413d3dd | [
"MIT"
] | null | null | null | from observable_primitives.observables.bool import ObservableBool
from observable_primitives.observables.complex import ObservableComplex
from observable_primitives.observables.float import ObservableFloat
from observable_primitives.observables.integer import ObservableInteger
| 55.6 | 71 | 0.913669 | 28 | 278 | 8.928571 | 0.464286 | 0.224 | 0.384 | 0.56 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.057554 | 278 | 4 | 72 | 69.5 | 0.954198 | 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 |
f2534ce180a75f0752b3ecc6ddf13aa2a6a056a2 | 65 | py | Python | principal.py | gabrielMoralles/Travisteste | f4b871cd537ef8e8f10d6f53d21ae36f56074470 | [
"Apache-2.0"
] | null | null | null | principal.py | gabrielMoralles/Travisteste | f4b871cd537ef8e8f10d6f53d21ae36f56074470 | [
"Apache-2.0"
] | null | null | null | principal.py | gabrielMoralles/Travisteste | f4b871cd537ef8e8f10d6f53d21ae36f56074470 | [
"Apache-2.0"
] | null | null | null | def soma(x,y):
return x+y
def mult(x,y):
return x*y
| 8.125 | 16 | 0.523077 | 14 | 65 | 2.428571 | 0.428571 | 0.235294 | 0.470588 | 0.529412 | 0.588235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.323077 | 65 | 7 | 17 | 9.285714 | 0.772727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 0.5 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 8 |
f280f3ce991912e6b3ad6f712888c8643f4dabce | 12,879 | py | Python | src/the_tale/the_tale/game/actions/tests/test_context_battle.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 85 | 2017-11-21T12:22:02.000Z | 2022-03-27T23:07:17.000Z | src/the_tale/the_tale/game/actions/tests/test_context_battle.py | devapromix/the-tale | 2a10efd3270734f8cf482b4cfbc5353ef8f0494c | [
"BSD-3-Clause"
] | 545 | 2017-11-04T14:15:04.000Z | 2022-03-27T14:19:27.000Z | src/the_tale/the_tale/game/actions/tests/test_context_battle.py | devapromix/the-tale | 2a10efd3270734f8cf482b4cfbc5353ef8f0494c | [
"BSD-3-Clause"
] | 45 | 2017-11-11T12:36:30.000Z | 2022-02-25T06:10:44.000Z |
import smart_imports
smart_imports.all()
class BattleContextTest(utils_testcase.TestCase):
def setUp(self):
super(BattleContextTest, self).setUp()
self.context = contexts.BattleContext()
def check_empty_values(self):
self.assertEqual(self.context.ability_magic_mushroom, [])
self.assertEqual(self.context.ability_sidestep, [])
self.assertEqual(self.context.stun_length, 0)
self.assertEqual(self.context.crit_chance, 0)
self.assertEqual(self.context.berserk_damage_modifier, 1.0)
self.assertEqual(self.context.ninja, 0)
self.assertEqual(self.context.damage_queue_fire, [])
self.assertEqual(self.context.damage_queue_poison, [])
self.assertEqual(self.context.initiative_queue, [])
self.assertEqual(self.context.incoming_magic_damage_modifier, 1.0)
self.assertEqual(self.context.incoming_physic_damage_modifier, 1.0)
self.assertEqual(self.context.outcoming_magic_damage_modifier, 1.0)
self.assertEqual(self.context.outcoming_physic_damage_modifier, 1.0)
self.assertEqual(self.context.pvp_advantage, 0)
self.assertFalse(self.context.pvp_advantage_used)
self.assertEqual(self.context.pvp_advantage_strike_damage, power.Damage(0, 0))
def test_create(self):
self.check_empty_values()
@mock.patch('the_tale.game.balance.constants.DAMAGE_DELTA', 0)
def test_damage(self):
damage = power.Damage(100, 50)
damage.multiply(0.5, 2)
self.assertEqual(damage, power.Damage(50, 100))
damage = power.Damage(100.5, 50.5)
damage.randomize()
self.assertEqual(damage.total, 151)
def test_damage_queue_fire(self):
self.assertEqual(self.context.fire_damage, None)
self.context.use_damage_queue_fire([power.Damage(0, 0)])
self.assertEqual(self.context.fire_damage, None)
self.context.use_damage_queue_fire([power.Damage(5, 5), power.Damage(5, 5), power.Damage(5, 5)])
self.assertEqual(self.context.damage_queue_fire, [power.Damage(0, 0), power.Damage(5, 5), power.Damage(5, 5), power.Damage(5, 5)])
self.context.on_own_turn()
self.assertEqual(self.context.damage_queue_fire, [power.Damage(5, 5), power.Damage(5, 5), power.Damage(5, 5)])
self.assertEqual(self.context.fire_damage, power.Damage(5, 5))
self.context.use_damage_queue_fire([power.Damage(10, 10), power.Damage(5, 5)])
self.assertEqual(self.context.damage_queue_fire, [power.Damage(5, 5), power.Damage(15, 15), power.Damage(10, 10)])
self.context.on_own_turn()
self.assertEqual(self.context.fire_damage, power.Damage(15, 15))
self.context.on_own_turn()
self.assertEqual(self.context.damage_queue_fire, [power.Damage(10, 10)])
self.assertEqual(self.context.fire_damage, power.Damage(10, 10))
self.context.use_damage_queue_fire([power.Damage(1, 1), power.Damage(1, 1), power.Damage(1, 1), power.Damage(1, 1)])
self.assertEqual(self.context.damage_queue_fire, [power.Damage(10, 10), power.Damage(1, 1), power.Damage(1, 1), power.Damage(1, 1), power.Damage(1, 1)])
self.assertEqual(self.context.fire_damage, power.Damage(10, 10))
self.context.on_own_turn()
self.assertEqual(self.context.fire_damage, power.Damage(1, 1))
self.assertEqual(self.context.serialize(), contexts.BattleContext.deserialize(self.context.serialize()).serialize())
def test_damage_queue_poison(self):
self.assertEqual(self.context.poison_damage, None)
self.context.use_damage_queue_poison([power.Damage(0, 0)])
self.assertEqual(self.context.poison_damage, None)
self.context.use_damage_queue_poison([power.Damage(5, 5), power.Damage(5, 5), power.Damage(5, 5)])
self.assertEqual(self.context.damage_queue_poison, [power.Damage(0, 0), power.Damage(5, 5), power.Damage(5, 5), power.Damage(5, 5)])
self.context.on_own_turn()
self.assertEqual(self.context.damage_queue_poison, [power.Damage(5, 5), power.Damage(5, 5), power.Damage(5, 5)])
self.assertEqual(self.context.poison_damage, power.Damage(5, 5))
self.context.use_damage_queue_poison([power.Damage(10, 10), power.Damage(5, 5), power.Damage(5, 5)])
self.context.on_own_turn()
self.assertEqual(self.context.damage_queue_poison, [power.Damage(15, 15), power.Damage(10, 10), power.Damage(5, 5)])
self.assertEqual(self.context.poison_damage, power.Damage(15, 15))
self.context.on_own_turn()
self.assertEqual(self.context.damage_queue_poison, [power.Damage(10, 10), power.Damage(5, 5)])
self.assertEqual(self.context.poison_damage, power.Damage(10, 10))
self.context.use_damage_queue_poison([power.Damage(1, 1), power.Damage(1, 1), power.Damage(1, 1), power.Damage(1, 1)])
self.assertEqual(self.context.damage_queue_poison, [power.Damage(10, 10), power.Damage(6, 6), power.Damage(1, 1), power.Damage(1, 1), power.Damage(1, 1)])
self.context.on_own_turn()
self.assertEqual(self.context.damage_queue_poison, [power.Damage(6, 6), power.Damage(1, 1), power.Damage(1, 1), power.Damage(1, 1)])
self.assertEqual(self.context.poison_damage, power.Damage(6, 6))
self.assertEqual(self.context.serialize(), contexts.BattleContext.deserialize(self.context.serialize()).serialize())
def test_initiative_queue(self):
self.assertEqual(self.context.initiative, 1.0)
self.context.use_initiative([90, 90, 90, 90])
self.context.on_own_turn()
self.assertEqual(self.context.initiative_queue, [90, 90, 90])
self.assertEqual(self.context.initiative, 90)
self.context.use_initiative([11, 9])
self.context.on_own_turn()
self.assertEqual(self.context.initiative_queue, [810, 90])
self.assertEqual(self.context.initiative, 810)
self.context.on_own_turn()
self.assertEqual(self.context.initiative_queue, [90])
self.assertEqual(self.context.initiative, 90)
self.context.use_initiative([10, 10, 10, 10])
self.assertEqual(self.context.initiative_queue, [900, 10, 10, 10])
self.context.on_own_turn()
self.assertEqual(self.context.initiative, 10)
@mock.patch('the_tale.game.balance.constants.DAMAGE_DELTA', 0)
def test_ability_magic_mushroom(self):
self.context.use_ability_magic_mushroom([2.0, 1.0, 0.5])
self.assertEqual(self.context.ability_magic_mushroom, [None, 2.0, 1.0, 0.5])
self.context.on_own_turn()
self.assertEqual(self.context.ability_magic_mushroom, [2.0, 1.0, 0.5])
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(10, 5)), power.Damage(20, 10))
self.context.on_own_turn()
self.assertEqual(self.context.ability_magic_mushroom, [1.0, 0.5])
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(10, 5)), power.Damage(10, 5))
self.context.on_own_turn()
self.assertEqual(self.context.ability_magic_mushroom, [0.5])
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(10, 5)).total, 8)
self.context.on_own_turn()
self.assertEqual(self.context.ability_magic_mushroom, [])
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(10, 5)), power.Damage(10, 5))
def test_ability_sidestep(self):
self.context.use_ability_sidestep([1.0, 0.5, 0.0])
self.assertEqual(self.context.ability_sidestep, [None, 1.0, 0.5, 0])
self.context.on_own_turn()
self.assertEqual(self.context.ability_sidestep, [1.0, 0.5, 0])
self.assertTrue(self.context.should_miss_attack())
self.context.on_own_turn()
self.assertEqual(self.context.ability_sidestep, [0.5, 0])
self.assertTrue(self.context.should_miss_attack() in [True, False])
self.context.on_own_turn()
self.assertEqual(self.context.ability_sidestep, [0])
self.assertTrue(not self.context.should_miss_attack())
self.context.on_own_turn()
self.assertEqual(self.context.ability_sidestep, [])
self.assertTrue(not self.context.should_miss_attack())
def test_stun(self):
self.context.use_stun(3)
self.assertEqual(self.context.stun_length, 4)
# longes stun must be used
self.context.use_stun(1)
self.assertEqual(self.context.stun_length, 4)
for i in range(3):
self.context.on_own_turn()
self.assertEqual(self.context.stun_length, 3 - i)
self.assertTrue(self.context.is_stunned)
self.context.on_own_turn()
self.assertEqual(self.context.stun_length, 0)
self.assertTrue(not self.context.is_stunned)
@mock.patch('the_tale.game.balance.constants.DAMAGE_DELTA', 0)
def test_modify_outcoming_damage(self):
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(10, 11)).total, 21)
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(10.4, 11.4)).total, 22)
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(10.5, 11.5)).total, 22)
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(10.8, 11.8)).total, 23)
# advantage_modifier
self.context.use_pvp_advantage(0.75)
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(20, 10)),
power.Damage(20 * (1 + c.DAMAGE_PVP_ADVANTAGE_MODIFIER * 0.75), 10 * (1 + c.DAMAGE_PVP_ADVANTAGE_MODIFIER * 0.75)))
self.assertFalse(self.context.pvp_advantage_used)
self.context.use_pvp_advantage(-0.75)
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(20, 10)), power.Damage(20, 10))
self.assertFalse(self.context.pvp_advantage_used)
self.assertEqual(self.context.serialize(), contexts.BattleContext.deserialize(self.context.serialize()).serialize())
@mock.patch('the_tale.game.balance.constants.DAMAGE_DELTA', 0)
def test_modify_outcoming_damage_advantage_strike(self):
self.context.use_pvp_advantage(1.0)
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(20, 10)), power.Damage(0, 0)) # pvp_advantage_strike_damage not set
self.context.use_pvp_advantage_stike_damage(power.Damage(333, 666))
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(20, 10)), power.Damage(333, 666))
self.assertTrue(self.context.pvp_advantage_used)
@mock.patch('the_tale.game.balance.constants.DAMAGE_DELTA', 0)
def test_critical_hit(self):
old_damage = self.context.modify_outcoming_damage(power.Damage(100, 1000))
self.context.use_crit_chance(100)
new_damage = self.context.modify_outcoming_damage(power.Damage(100, 1000))
self.assertTrue(old_damage.physic < new_damage.physic)
self.assertTrue(old_damage.magic < new_damage.magic)
@mock.patch('the_tale.game.balance.constants.DAMAGE_DELTA', 0)
def test_berserk(self):
old_damage = self.context.modify_outcoming_damage(power.Damage(100, 10))
self.context.use_berserk(1.0)
self.assertEqual(old_damage, self.context.modify_outcoming_damage(power.Damage(100, 10)))
self.context.use_berserk(1.5)
new_damage = self.context.modify_outcoming_damage(power.Damage(100, 10))
self.assertTrue(old_damage.physic < new_damage.physic)
self.assertTrue(old_damage.magic < new_damage.magic)
def test_ninja(self):
self.context.use_ninja(1.0)
for i in range(100):
self.assertTrue(self.context.should_miss_attack())
@mock.patch('the_tale.game.balance.constants.DAMAGE_DELTA', 0)
def test_outcoming_damage_modifier(self):
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(100, 1000)), power.Damage(100, 1000))
self.context.use_outcoming_damage_modifier(5, 0.25)
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(100, 1000)), power.Damage(500, 250))
self.context.use_outcoming_damage_modifier(2, 10)
self.assertEqual(self.context.modify_outcoming_damage(power.Damage(100, 1000)), power.Damage(1000, 2500))
def test_incoming_damage_modifier(self):
self.assertEqual(self.context.modify_incoming_damage(power.Damage(100, 1000)), power.Damage(100, 1000))
self.context.use_incoming_damage_modifier(5, 0.25)
self.assertEqual(self.context.modify_incoming_damage(power.Damage(100, 1000)), power.Damage(500, 250))
self.context.use_incoming_damage_modifier(2, 10)
self.assertEqual(self.context.modify_incoming_damage(power.Damage(100, 1000)), power.Damage(1000, 2500))
def test_on_own_turn_with_empty_values(self):
self.context.on_own_turn()
self.check_empty_values()
| 51.516 | 162 | 0.704325 | 1,784 | 12,879 | 4.891256 | 0.066704 | 0.192872 | 0.180724 | 0.247307 | 0.885973 | 0.852624 | 0.820651 | 0.789594 | 0.751089 | 0.722209 | 0 | 0.051759 | 0.161426 | 12,879 | 249 | 163 | 51.722892 | 0.756204 | 0.006134 | 0 | 0.329897 | 0 | 0 | 0.024072 | 0.024072 | 0 | 0 | 0 | 0 | 0.520619 | 1 | 0.092784 | false | 0 | 0.010309 | 0 | 0.108247 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
f2c4da193e7d7321d1a667fcfaa7473b14842d43 | 21,014 | py | Python | nilearn_sandbox/mass_univariate/tests/test_rpbi.py | alexsavio/nilearn_sandbox | f140f7e2f5a38ef47d8fe5a4e0025e1ed746eb84 | [
"BSD-3-Clause"
] | 1 | 2016-07-22T12:33:14.000Z | 2016-07-22T12:33:14.000Z | nilearn_sandbox/mass_univariate/tests/test_rpbi.py | alexsavio/nilearn_sandbox | f140f7e2f5a38ef47d8fe5a4e0025e1ed746eb84 | [
"BSD-3-Clause"
] | 7 | 2015-07-24T16:25:41.000Z | 2016-08-05T21:40:34.000Z | nilearn_sandbox/mass_univariate/tests/test_rpbi.py | alexsavio/nilearn_sandbox | f140f7e2f5a38ef47d8fe5a4e0025e1ed746eb84 | [
"BSD-3-Clause"
] | 9 | 2015-07-21T16:33:40.000Z | 2020-04-28T16:04:55.000Z | """
Tests for functions used in Randomized Parcellation Based Inference.
"""
# Author: Virgile Fritsch, <virgile.fritsch@inria.fr>, Feb. 2014
import numpy as np
from numpy.testing import (assert_equal, assert_array_equal,
assert_array_almost_equal, assert_raises)
from sklearn.utils import check_random_state
from nilearn_sandbox.mass_univariate.rpbi import (
GrowableSparseArray, _ward_fit_transform, _build_parcellations,
_compute_counting_statistic_from_parcel_level_scores, rpbi_core,
randomized_parcellation_based_inference)
### Tests for the GrowableSparseArray class ###################################
def test_gsarray_append_data():
"""This function tests GrowableSparseArray creation and filling.
"""
# Simplest example
gs_array = GrowableSparseArray(n_rows=1)
gs_array.append(0, np.ones(5))
assert_array_equal(gs_array.get_data()['row'], np.zeros(5))
assert_array_equal(gs_array.get_data()['col'], np.arange(5))
assert_array_equal(gs_array.get_data()['data'], np.ones(5))
# Append with no structure extension needed
gs_array = GrowableSparseArray(n_rows=1, max_elts=10)
gs_array.append(0, np.ones(5))
assert_array_equal(gs_array.get_data()['row'], np.zeros(5))
assert_array_equal(gs_array.get_data()['col'], np.arange(5))
assert_array_equal(gs_array.get_data()['data'], np.ones(5))
# Void array
gs_array = GrowableSparseArray(n_rows=1)
gs_array.append(0, np.zeros(5))
assert_array_equal(gs_array.get_data()['row'], [])
assert_array_equal(gs_array.get_data()['col'], [])
assert_array_equal(gs_array.get_data()['data'], [])
# Toy example
gs_array = GrowableSparseArray(n_rows=10)
for i in range(10):
data = np.arange(10) - i
data[data < 8] = 0
gs_array.append(i, data)
assert_array_equal(gs_array.get_data()['row'], np.array([0., 0., 1.]))
assert_array_equal(gs_array.get_data()['col'], [8, 9, 9])
assert_array_equal(gs_array.get_data()['data'], [8., 9., 8.])
def test_gsarray_merge():
"""This function tests GrowableSparseArray merging.
Because of the specific usage of GrowableSparseArrays, only a reduced
number of manipulations has been implemented.
"""
# Basic merge
gs_array = GrowableSparseArray(n_rows=1)
gs_array.append(0, np.ones(5))
gs_array2 = GrowableSparseArray(n_rows=1)
gs_array2.merge(gs_array)
assert_array_equal(gs_array.get_data()['row'],
gs_array2.get_data()['row'])
assert_array_equal(gs_array.get_data()['col'],
gs_array2.get_data()['col'])
assert_array_equal(gs_array.get_data()['data'],
gs_array2.get_data()['data'])
# Merge list
gs_array = GrowableSparseArray(n_rows=2)
gs_array.append(0, np.ones(5))
gs_array2 = GrowableSparseArray(n_rows=2)
gs_array2.append(1, 2 * np.ones(5))
gs_array3 = GrowableSparseArray(n_rows=2)
gs_array3.merge([gs_array, gs_array2])
assert_array_equal(gs_array3.get_data()['row'],
np.array([0.] * 5 + [1.] * 5))
assert_array_equal(gs_array3.get_data()['col'], np.tile(np.arange(5), 2))
assert_array_equal(gs_array3.get_data()['data'],
np.array([1.] * 5 + [2.] * 5))
# failure case
assert_raises(TypeError, gs_array3.merge, [gs_array, gs_array2, "foo"])
# Test failure case (merging arrays with different n_rows)
gs_array_wrong = GrowableSparseArray(n_rows=2)
gs_array_wrong.append(0, np.ones(5))
gs_array_wrong.append(1, np.ones(5))
gs_array = GrowableSparseArray(n_rows=1)
assert_raises(ValueError, gs_array.merge, gs_array_wrong)
# Test failure case (merge a numpy array)
gs_array = GrowableSparseArray(n_rows=1)
assert_raises(TypeError, gs_array.merge, np.ones(5))
### Test the parcellations building framework #################################
from sklearn.feature_extraction import image
def test_ward_fit_transform():
"""Test parcellation building and associated signal extraction.
"""
# Generate toy data
# define data structure
shape = (5, 5, 5)
mask = np.ones(shape, dtype=bool)
connectivity = image.grid_to_graph(n_x=5, n_y=5, n_z=5, mask=mask)
# data generation
data1 = np.ones(shape)
data1[1:3, 1:3, 1:3] = 2.
data2 = np.ones(shape)
data2[3:, 3:, 3:] = 4.
data = np.ones((4, np.prod(shape))) # 4 ravelized images
data[0] = np.ravel(data1)
data[1] = np.ravel(data2)
# One image used for train, transform all
parcelled_data, labels = _ward_fit_transform(data, [0], connectivity, 2, 0)
# check parcelled_data
assert_equal(parcelled_data.shape, (4, 2))
assert_array_equal(
np.sort(np.unique(parcelled_data[0])), # order is hard to predict
[1, 2])
assert_array_equal(parcelled_data[2], [1, 1])
assert_array_equal(parcelled_data[3], [1, 1])
# check labels
assert_equal(len(labels.shape), 1)
assert_array_equal(np.unique(labels), [0, 1])
# Two images used for train, transform all, add offset to labels
parcelled_data, labels = _ward_fit_transform(data, [0, 1],
connectivity, 3, 10)
# check parcelled_data
assert_equal(parcelled_data.shape, (4, 3))
assert_array_equal(
np.sort(np.unique(parcelled_data[0])), # order is hard to predict
[1, 2])
assert_array_equal(
np.sort(np.unique(parcelled_data[1])), # order is hard to predict
[1, 4])
assert_array_equal(parcelled_data[2], [1, 1, 1])
assert_array_equal(parcelled_data[3], [1, 1, 1])
# check labels
assert_equal(len(labels.shape), 1)
assert_array_equal(np.unique(labels), [10, 11, 12])
def test_build_parcellations(random_state=0):
"""Test parcellations building.
"""
# check random state
rng = check_random_state(random_state)
# Generate toy data
# define data structure
shape = (5, 5, 5)
mask = np.ones(shape, dtype=bool)
# data generation
data1 = np.ones(shape)
data1[1:3, 1:3, 1:3] = 2.
data2 = np.ones(shape)
data2[3:, 3:, 3:] = 4.
data = np.ones((4, np.prod(shape))) # 4 ravelized images
data[0] = np.ravel(data1)
data[1] = np.ravel(data2)
# Test _build_parcellations function
parcelled_data, labels = _build_parcellations(
data, mask, n_parcellations=2, n_parcels=3,
# make sure we use observations 1 and 2 at least once
n_bootstrap_samples=8, random_state=rng)
# check parcelled_data
assert_equal(parcelled_data.shape, (4, 3 * 2))
assert_array_equal(
np.sort(np.unique(parcelled_data[0])), # order is hard to predict
[1, 2])
assert_array_equal(
np.sort(np.unique(parcelled_data[1])), # order is hard to predict
[1, 4])
assert_array_equal(parcelled_data[2], [1, 1, 1, 1, 1, 1])
assert_array_equal(parcelled_data[3], [1, 1, 1, 1, 1, 1])
# check labels
assert_equal(len(labels.shape), 1)
assert_array_equal(np.unique(labels), np.arange(2 * 3))
### Test RPBI code ############################################################
from scipy import sparse
def test_compute_counting_statistic_from_parcel_level_scores(random_state=1):
"""Test the computation of RPBI's counting statistic.
"""
# check random state
rng = check_random_state(random_state)
# Generate toy data
# define data structure
shape = (5, 5, 5)
n_voxels = np.prod(shape)
mask = np.ones(shape, dtype=bool)
# data generation
data1 = np.ones(shape)
data1[1:3, 1:3, 1:3] = 2.
data2 = np.ones(shape)
data2[3:, 3:, 3:] = 4.
data = np.ones((4, np.prod(shape))) # 4 ravelized images
data[0] = np.ravel(data1)
data[1] = np.ravel(data2)
# Parcellate data and extract signal averages
n_parcellations = 2
n_parcels = 3
parcelled_data, labels = _build_parcellations(
data, mask, n_parcellations=n_parcellations, n_parcels=n_parcels,
# make sure we use observations 1 and 2 at least once
n_bootstrap_samples=6, random_state=rng)
parcel_level_results = GrowableSparseArray(n_rows=2)
data_tmp = parcelled_data[0]
data_tmp[data_tmp < 2] = 0
parcel_level_results.append(0, data_tmp)
data_tmp = parcelled_data[1]
data_tmp[data_tmp < 2] = 0
parcel_level_results.append(1, data_tmp)
parcellation_masks = np.zeros((n_parcellations * n_parcels, n_voxels))
for j in np.arange(n_parcellations): # loop on parcellations
label_slice = slice(j * n_voxels, (j + 1) * n_voxels)
for l in np.unique(labels[label_slice]):
parcellation_masks[l] = labels[label_slice] == l
parcellation_masks = sparse.coo_matrix(
parcellation_masks.astype(np.float32)).tocsr()
# Transform back data
# (transformed data should be similar to the original data (up to
# thresholding and sum across parcellations) since by construction
# the signal is homogeneous within each parcel for each subject)
thresholded_data = data.copy()
thresholded_data[thresholded_data < 2] = 0.
thresholded_data *= 2.
res = _compute_counting_statistic_from_parcel_level_scores(
parcel_level_results.get_data(), slice(0, 2), parcellation_masks,
n_parcellations, n_parcellations * n_parcels)
counting_stats_original_data, h0 = res
assert_array_equal(counting_stats_original_data,
thresholded_data[0])
assert_array_equal(h0, [8])
# Same thing but only for the permuted data
res = _compute_counting_statistic_from_parcel_level_scores(
parcel_level_results.get_data()[2:], slice(1, 2),
parcellation_masks, n_parcellations, n_parcellations * n_parcels)
counting_stats_original_data, h0 = res
assert_array_equal(counting_stats_original_data, [])
assert_array_equal(h0, [8])
def test_rpbi_core(random_state=2):
"""Test Randomized Parcellation Based Inference core function.
"""
# check random state
rng = check_random_state(random_state)
# Generate toy data
# define data structure
shape = (5, 5, 5)
n_voxels = np.prod(shape)
mask = np.ones(shape, dtype=bool)
# data generation
data = np.zeros(shape)
data[1:3, 1:3, 1:3] = 2.
data = data.reshape((1, -1))
data = np.repeat(data, 8, 0)
# add noise to avoid constant columns
data += 0.1 * rng.randn(data.shape[0], data.shape[1])
# Parcellate data and extract signal averages
n_parcellations = 2
n_parcels = 3
parcelled_data, labels = _build_parcellations(
data, mask, n_parcellations=n_parcellations, n_parcels=n_parcels,
# make sure we use observations 1 and 2 at least once
n_bootstrap_samples=6, random_state=rng)
# RPBI from already parcelled data
rng = check_random_state(random_state)
pvalues, counting_statistic_original_data, h0 = rpbi_core(
np.ones((8, 1)), parcelled_data, n_parcellations, labels,
n_parcels, model_intercept=False, threshold=0.1 / n_parcels,
n_perm=9, random_state=rng)
# check pvalues
expected_pvalues = np.zeros(shape)
expected_pvalues[1:3, 1:3, 1:3] = 1.
expected_pvalues = np.ravel(expected_pvalues)
print pvalues.shape, n_voxels
assert_equal(pvalues.shape, (n_voxels,))
assert_array_equal(pvalues, expected_pvalues)
# check counting statistic
assert_equal(counting_statistic_original_data.shape, (n_voxels,))
assert_array_equal(counting_statistic_original_data, 2 * expected_pvalues)
# h0
assert_equal(h0.shape, (9,))
assert_array_equal(h0, np.zeros(9))
# Same thing with model_intercept=True
rng = check_random_state(random_state)
pvalues, counting_statistic_original_data, h0 = rpbi_core(
np.ones((8, 1)), parcelled_data, n_parcellations, labels,
n_parcels, model_intercept=True, threshold=0.1 / n_parcels,
n_perm=9, random_state=rng)
# check pvalues
expected_pvalues = np.zeros(shape)
expected_pvalues[1:3, 1:3, 1:3] = 1.
expected_pvalues = np.ravel(expected_pvalues)
assert_equal(pvalues.shape, (n_voxels,))
assert_array_almost_equal(pvalues, expected_pvalues)
# check counting statistic
assert_equal(counting_statistic_original_data.shape, (n_voxels,))
assert_array_almost_equal(counting_statistic_original_data,
2 * expected_pvalues)
# h0
assert_equal(h0.shape, (9,))
assert_array_almost_equal(h0, np.zeros(9))
# Replace intercept test with a more complex test
rng = check_random_state(random_state)
tested_var = np.ones((8, 1))
tested_var[0:4] = 0
parcelled_data[0:4] *= -1
pvalues, counting_statistic_original_data, h0 = rpbi_core(
tested_var, parcelled_data, n_parcellations, labels,
n_parcels, model_intercept=True, threshold=0.05 / n_parcels,
n_perm=9, random_state=rng)
# check pvalues
expected_pvalues = np.zeros(shape)
expected_pvalues[1:3, 1:3, 1:3] = 1.
expected_pvalues = np.ravel(expected_pvalues)
assert_equal(pvalues.shape, (n_voxels,))
assert_array_almost_equal(pvalues, expected_pvalues)
# check counting statistic
assert_equal(counting_statistic_original_data.shape, (n_voxels,))
assert_array_almost_equal(counting_statistic_original_data,
2 * expected_pvalues)
# h0
assert_equal(h0.shape, (9,))
assert_array_almost_equal(h0, np.zeros(9))
def test_rpbi_core_withcovars(random_state=0):
"""Test Randomized Parcellation Based Inference core function with covars.
"""
# check random state
rng = check_random_state(random_state)
# Generate toy data
# define data structure
shape = (5, 5, 5)
n_voxels = np.prod(shape)
mask = np.ones(shape, dtype=bool)
# data generation
data = np.zeros(shape)
data[1:3, 1:3, 1:3] = 2.
data = data.reshape((1, -1))
data = np.repeat(data, 8, 0)
# add noise to avoid constant columns
data += 0.1 * rng.randn(data.shape[0], data.shape[1])
# Parcellate data and extract signal averages
n_parcellations = 2
n_parcels = 3
parcelled_data, labels = _build_parcellations(
data, mask, n_parcellations=n_parcellations, n_parcels=n_parcels,
# make sure we use observations 1 and 2 at least once
n_bootstrap_samples=6, random_state=rng)
# Covariates (dummy)
covars = 0.1 * rng.randn(8).reshape((-1, 1))
# RPBI from already parcelled data
rng = check_random_state(random_state)
pvalues, counting_statistic_original_data, h0 = rpbi_core(
np.ones((8, 1)), parcelled_data, n_parcellations, labels,
n_parcels, confounding_vars=covars, model_intercept=False,
threshold=0.05 / n_parcels, n_perm=9, random_state=rng)
# check pvalues
expected_pvalues = np.zeros(shape)
expected_pvalues[1:3, 1:3, 1:3] = 1.
expected_pvalues = np.ravel(expected_pvalues)
assert_equal(pvalues.shape, (n_voxels,))
assert_array_equal(pvalues, expected_pvalues)
# check counting statistic
assert_equal(counting_statistic_original_data.shape, (n_voxels,))
assert_array_equal(counting_statistic_original_data, 2 * expected_pvalues)
# h0
assert_equal(h0.shape, (9,))
assert_array_equal(h0, np.zeros(9))
# Same thing with model_intercept=True
rng = check_random_state(random_state)
pvalues, counting_statistic_original_data, h0 = rpbi_core(
np.ones((8, 1)), parcelled_data, n_parcellations, labels,
n_parcels, confounding_vars=covars, model_intercept=True,
threshold=0.05 / n_parcels, n_perm=9, random_state=rng)
# check pvalues
expected_pvalues = np.zeros(shape)
expected_pvalues[1:3, 1:3, 1:3] = 1.
expected_pvalues = np.ravel(expected_pvalues)
assert_equal(pvalues.shape, (n_voxels,))
assert_array_almost_equal(pvalues, expected_pvalues)
# check counting statistic
assert_equal(counting_statistic_original_data.shape, (n_voxels,))
assert_array_almost_equal(counting_statistic_original_data,
2 * expected_pvalues)
# h0
assert_equal(h0.shape, (9,))
assert_array_almost_equal(h0, np.zeros(9))
# Replace intercept test with a more complex test
rng = check_random_state(random_state)
tested_var = np.ones(8)
tested_var[0:4] = 0
parcelled_data[0:4] *= -1
pvalues, counting_statistic_original_data, h0 = rpbi_core(
tested_var, parcelled_data, n_parcellations, labels,
n_parcels, confounding_vars=covars, model_intercept=False,
threshold=0.1 / n_parcels, n_perm=9, random_state=rng)
# check pvalues
expected_pvalues = np.zeros(shape)
expected_pvalues[1:3, 1:3, 1:3] = 1.
expected_pvalues = np.ravel(expected_pvalues)
assert_equal(pvalues.shape, (n_voxels,))
assert_array_almost_equal(pvalues, expected_pvalues)
# check counting statistic
assert_equal(counting_statistic_original_data.shape, (n_voxels,))
assert_array_almost_equal(counting_statistic_original_data,
2 * expected_pvalues)
# h0
assert_equal(h0.shape, (9,))
assert_array_almost_equal(h0, np.zeros(9))
# Same thing with intercept modelling
rng = check_random_state(random_state)
pvalues, counting_statistic_original_data, h0 = rpbi_core(
tested_var, parcelled_data, n_parcellations, labels,
n_parcels, confounding_vars=covars, model_intercept=True,
threshold=0.1 / n_parcels, n_perm=9, random_state=rng)
# check pvalues
expected_pvalues = np.zeros(shape)
expected_pvalues[1:3, 1:3, 1:3] = 1.
expected_pvalues = np.ravel(expected_pvalues)
assert_equal(pvalues.shape, (n_voxels,))
assert_array_almost_equal(pvalues, expected_pvalues)
# check counting statistic
assert_equal(counting_statistic_original_data.shape, (n_voxels,))
assert_array_almost_equal(counting_statistic_original_data,
2 * expected_pvalues)
# h0
assert_equal(h0.shape, (9,))
assert_array_almost_equal(h0, np.zeros(9))
def test_randomized_parcellation_based_inference(random_state=1):
"""Test RPBI API.
"""
# check random state
rng = check_random_state(random_state)
# Generate toy data
# define data structure
shape = (5, 5, 5)
n_voxels = np.prod(shape)
mask = np.ones(shape, dtype=bool)
# data generation
data = np.zeros(shape)
data[1:3, 1:3, 1:3] = 1.
data = data.reshape((1, -1))
data = np.repeat(data, 8, 0)
# add noise to avoid constant columns
data += 0.1 * rng.randn(data.shape[0], data.shape[1])
# Randomized Parcellation Based Inference
n_parcellations = 2
n_parcels = 3
neg_log_pvals, counting_statistic_original_data, h0 = (
randomized_parcellation_based_inference(
np.ones(8), data, mask, confounding_vars=None,
model_intercept=True,
n_parcellations=n_parcellations, n_parcels=n_parcels,
threshold=0.05 / n_parcels, n_perm=9, random_state=rng,
verbose=True))
# check pvalues
expected_neg_log_pvals = np.zeros(shape)
expected_neg_log_pvals[1:3, 1:3, 1:3] = 1.
expected_neg_log_pvals = np.ravel(expected_neg_log_pvals)
assert_equal(neg_log_pvals.shape, (n_voxels,))
assert_array_almost_equal(neg_log_pvals, expected_neg_log_pvals)
# check counting statistic
assert_equal(counting_statistic_original_data.shape, (n_voxels,))
assert_array_almost_equal(counting_statistic_original_data,
2 * expected_neg_log_pvals)
# h0
assert_equal(h0.shape, (9,))
assert_array_almost_equal(h0, np.zeros(9))
### Same test with 1-dimensional tested_vars
# check random state
rng = check_random_state(random_state)
rng.randn(data.shape[0], data.shape[1])
# Randomized Parcellation Based Inference
n_parcellations = 2
n_parcels = 3
neg_log_pvals, counting_statistic_original_data, h0 = (
randomized_parcellation_based_inference(
np.ones(8), data, mask, confounding_vars=None,
model_intercept=True,
n_parcellations=n_parcellations, n_parcels=n_parcels,
threshold=0.05 / n_parcels, n_perm=9, random_state=rng,
verbose=True))
# check pvalues
expected_neg_log_pvals = np.zeros(shape)
expected_neg_log_pvals[1:3, 1:3, 1:3] = 1.
expected_neg_log_pvals = np.ravel(expected_neg_log_pvals)
assert_equal(neg_log_pvals.shape, (n_voxels,))
assert_array_almost_equal(neg_log_pvals, expected_neg_log_pvals)
# check counting statistic
assert_equal(counting_statistic_original_data.shape, (n_voxels,))
assert_array_almost_equal(counting_statistic_original_data,
2 * expected_neg_log_pvals)
# h0
assert_equal(h0.shape, (9,))
assert_array_almost_equal(h0, np.zeros(9))
| 39.278505 | 79 | 0.682117 | 2,933 | 21,014 | 4.60791 | 0.09001 | 0.052904 | 0.050906 | 0.008879 | 0.821014 | 0.803922 | 0.790825 | 0.764632 | 0.7431 | 0.72919 | 0 | 0.031727 | 0.205054 | 21,014 | 534 | 80 | 39.35206 | 0.777312 | 0.131484 | 0 | 0.711111 | 0 | 0 | 0.004214 | 0 | 0 | 0 | 0 | 0 | 0.280556 | 0 | null | null | 0 | 0.016667 | null | null | 0.002778 | 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 |
4b2e7538e3234c89dcfeb929314bab986d737143 | 72,828 | py | Python | ensembler/tests/test_system.py | philthiel/Ensembler | 943efac3c673eb40165927e81336386788e3a19f | [
"MIT"
] | 39 | 2020-05-19T08:45:27.000Z | 2022-03-17T16:58:34.000Z | ensembler/tests/test_system.py | SchroederB/Ensembler | 943efac3c673eb40165927e81336386788e3a19f | [
"MIT"
] | 38 | 2020-06-18T13:02:18.000Z | 2022-02-25T14:29:17.000Z | ensembler/tests/test_system.py | SchroederB/Ensembler | 943efac3c673eb40165927e81336386788e3a19f | [
"MIT"
] | 13 | 2020-05-19T08:45:57.000Z | 2022-03-10T16:18:20.000Z | import os
import tempfile
import unittest
import numpy as np
from ensembler import samplers
from ensembler import potentials
from ensembler import system
from ensembler.util import dataStructure as data
class test_System(unittest.TestCase):
system_class = system.system
tmp_test_dir: str = None
def setUp(self) -> None:
test_dir = os.getcwd()+"/tests_out"
if(not os.path.exists(test_dir)):
os.mkdir(test_dir)
if(__class__.tmp_test_dir is None):
__class__.tmp_test_dir = tempfile.mkdtemp(dir=test_dir, prefix="tmp_test_system")
_, self.tmp_out_path = tempfile.mkstemp(prefix="test_" + self.system_class.name, suffix=".obj", dir=__class__.tmp_test_dir)
self.sampler = samplers.stochastic.metropolisMonteCarloIntegrator()
self.pot = potentials.OneD.harmonicOscillatorPotential()
def test_system_constructor(self):
self.system_class(potential=self.pot, sampler=self.sampler)
def test_system_constructor_detail(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
conditions = []
temperature = 300
position = [0.1]
mass = [1]
expected_state = data.basicState(position=[0.1], temperature=temperature,
total_system_energy=0.005000000000000001, total_potential_energy=0.005000000000000001,
total_kinetic_energy=np.nan, dhdpos=[[np.nan]],
velocity=np.nan) # Monte carlo does not use dhdpos or velocity
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
curState = sys.current_state
# check attributes
self.assertEqual(self.pot.constants[self.pot.nDimensions], sys.nDimensions,
msg="Dimensionality was not the same for system and potential!")
self.assertEqual([], sys.conditions, msg="Conditions were not empty!")
# print(curState)
# check current state intialisation
self.assertEqual(expected_state.position, curState.position, msg="The initialised Position is not correct!")
self.assertEqual(expected_state.temperature, curState.temperature,
msg="The initialised temperature is not correct!")
self.assertAlmostEqual(expected_state.total_system_energy, curState.total_system_energy,
msg="The initialised total_system_energy is not correct!")
self.assertAlmostEqual(expected_state.total_potential_energy, curState.total_potential_energy,
msg="The initialised total_potential_energy is not correct!")
self.assertEqual(np.isnan(expected_state.total_kinetic_energy), np.isnan(curState.total_kinetic_energy),
msg="The initialised total_kinetic_energy is not correct!")
self.assertEqual(np.isnan(expected_state.velocity), np.isnan(curState.velocity),
msg="The initialised velocity is not correct!")
def test_append_state(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
conditions = []
temperature = 300
position = [0.1]
mass = [1]
newPosition = 10
newVelocity = -5
newForces = 3
expected_state = data.basicState(position=newPosition, temperature=temperature,
total_system_energy=62.5, total_potential_energy=50.0, total_kinetic_energy=12.5,
dhdpos=3, velocity=newVelocity)
# potential: _perturbedPotentialCls, samplers: _samplerCls, conditions: Iterable[Condition] = [],
# temperature: float = 298.0, position:(Iterable[Number] or float
sys = self.system_class(potential=self.pot, sampler=self.sampler, conditions=[], temperature=temperature,
start_position=position)
sys.append_state(new_position=newPosition, new_velocity=newVelocity, new_forces=newForces)
curState = sys.current_state
# check current state intialisation
self.assertEqual(curState.position, expected_state.position, msg="The initialised Position is not correct!")
self.assertEqual(curState.temperature, expected_state.temperature,
msg="The initialised temperature is not correct!")
self.assertAlmostEqual(curState.total_system_energy, expected_state.total_system_energy,
msg="The initialised total_system_energy is not correct!")
self.assertAlmostEqual(curState.total_potential_energy, expected_state.total_potential_energy,
msg="The initialised total_potential_energy is not correct!")
self.assertAlmostEqual(curState.total_kinetic_energy, expected_state.total_kinetic_energy,
msg="The initialised total_kinetic_energy is not correct!")
# self.assertEqual(curState.dhdpos, expected_state.dhdpos, msg="The initialised dhdpos is not correct!")
self.assertEqual(curState.velocity, expected_state.velocity, msg="The initialised velocity is not correct!")
def test_revertStep(self):
conditions = []
temperature = 300
position = [0.1]
mass = [1]
newPosition = 10
newVelocity = -5
newForces = 3
newPosition2 = 13
newVelocity2 = -4
newForces2 = 8
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
sys.append_state(new_position=newPosition, new_velocity=newVelocity, new_forces=newForces)
expected_state = sys.current_state
sys.append_state(new_position=newPosition2, new_velocity=newVelocity2, new_forces=newForces2)
not_expected_state = sys.current_state
sys.revert_step()
curState = sys.current_state
# check current state intialisation
self.assertEqual(curState.position, expected_state.position,
msg="The current Position is not equal to the one two steps before!")
self.assertEqual(curState.temperature, expected_state.temperature,
msg="The current temperature is not equal to the one two steps before!")
self.assertAlmostEqual(curState.total_system_energy, expected_state.total_system_energy,
msg="The current total_system_energy is not equal to the one two steps before!")
self.assertAlmostEqual(curState.total_potential_energy, expected_state.total_potential_energy,
msg="The current total_potential_energy is not equal to the one two steps before!")
self.assertEqual(np.isnan(curState.total_kinetic_energy), np.isnan(expected_state.total_kinetic_energy),
msg="The current total_kinetic_energy is not equal to the one two steps before!")
self.assertEqual(curState.dhdpos, expected_state.dhdpos,
msg="The current dhdpos is not equal to the one two steps before!")
self.assertEqual(curState.velocity, expected_state.velocity,
msg="The current velocity is not equal to the one two steps before!")
# check that middle step is not sames
self.assertNotEqual(curState.position, not_expected_state.position,
msg="The not expected Position equals the current one!")
self.assertEqual(curState.temperature, not_expected_state.temperature,
msg="The not expected temperature equals the current one")
self.assertNotAlmostEqual(curState.total_system_energy, not_expected_state.total_system_energy,
msg="The not expected total_system_energy equals the current one")
self.assertNotAlmostEqual(curState.total_potential_energy, not_expected_state.total_potential_energy,
msg="The not expected total_potential_energy equals the current one")
self.assertEqual(np.isnan(curState.total_kinetic_energy), np.isnan(not_expected_state.total_kinetic_energy),
msg="The not expected total_kinetic_energy equals the current one")
self.assertNotEqual(curState.dhdpos, not_expected_state.dhdpos,
msg="The not expected dhdpos, equals the current one")
self.assertNotEqual(curState.velocity, not_expected_state.velocity,
msg="The not expected velocity equals the current one")
def test_propergate(self):
conditions = []
temperature = 300
position = [0.1]
mass = [1]
expected_state = data.basicState(position=position, temperature=temperature,
total_system_energy=0.005000000000000001, total_potential_energy=0.005000000000000001,
total_kinetic_energy=np.nan,
dhdpos=np.nan, velocity=np.nan)
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
initialState = sys.current_state
sys.propagate()
# check that middle step is not sames
self.assertNotEqual(sys._currentPosition, initialState.position,
msg="The initialState equals the currentState after propergating in attribute: Position!")
self.assertEqual(sys._currentTemperature, initialState.temperature,
msg="The initialState does not equal the currentState after propergating in attribute: temperature!")
self.assertEqual(sys._currentTotPot, initialState.total_potential_energy,
msg="The initialState does not equal the currentState after propergating in attribute: total_potential_energy!")
self.assertEqual(np.isnan(sys._currentTotKin), np.isnan(initialState.total_kinetic_energy),
msg="The initialState does not equal the currentState after propergating in attribute: total_kinetic_energy!")
self.assertNotEqual(sys._currentForce, initialState.dhdpos,
msg="The initialState equals the currentState after propergating in attribute: dhdpos!")
self.assertEqual(np.isnan(sys._currentVelocities), np.isnan(initialState.velocity),
msg="The initialState does not equal the currentState after propergating in attribute: velocity!")
def test_simulate(self):
conditions = []
temperature = 300
position = [0.1]
mass = [1]
steps = 100
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
init_state = sys.current_state
sys.simulate(steps=steps, init_system=False,
withdraw_traj=True) # withdrawTraj is needed in the context because of the interaction between different Tests
trajectory = sys.trajectory
old_frame = trajectory.iloc[0]
# print(old_frame)
# print(init_state)
# Check that the first frame is the initial state!
self.assertEqual(init_state.position, old_frame.position,
msg="The initial state does not equal the frame 0 after propergating in attribute: Position!")
self.assertEqual(init_state.temperature, old_frame.temperature,
msg="The initial state does not equal the frame 0 after propergating in attribute: temperature!")
self.assertAlmostEqual(init_state.total_potential_energy, old_frame.total_potential_energy,
msg="The initial state does not equal the frame 0 after propergating in attribute: total_potential_energy!")
self.assertAlmostEqual(np.isnan(init_state.total_kinetic_energy), np.isnan(old_frame.total_kinetic_energy),
msg="The initial state does not equal the frame 0 after propergating in attribute: total_kinetic_energy!")
self.assertEqual(np.isnan(init_state.dhdpos), np.isnan(old_frame.dhdpos),
msg="The initial state does not equal the frame 0 after propergating in attribute: dhdpos!")
self.assertEqual(np.isnan(init_state.velocity), np.isnan(old_frame.velocity),
msg="The initial state does not equal the frame 0 after propergating in attribute: velocity!")
# check that the frames are all different from each other.
for ind, frame in list(trajectory.iterrows())[1:]:
# print()
# print(ind, frame)
# check that middle step is not sames
self.assertNotEqual(old_frame.position, frame.position,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: Position!")
self.assertEqual(old_frame.temperature, frame.temperature,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: temperature!") # due to samplers
self.assertNotAlmostEqual(old_frame.total_potential_energy, frame.total_potential_energy,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: total_potential_energy!")
self.assertEqual(np.isnan(old_frame.total_kinetic_energy), np.isnan(frame.total_kinetic_energy),
msg="The frame " + str(ind) + " equals not the frame " + str(
ind + 1) + " after propergating in attribute: total_kinetic_energy!") # due to samplers
self.assertNotEqual(old_frame.dhdpos, frame.dhdpos,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: dhdpos!")
self.assertEqual(np.isnan(old_frame.velocity), np.isnan(frame.velocity),
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: velocity!") # due to samplers
old_frame = frame
def test_applyConditions(self):
"""
NOT IMPLEMENTED!
"""
pass
def test_initVel(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
conditions = []
temperature = 300
position = [0.1]
mass = [1]
newPosition = 10
newVelocity = -5
newForces = 3
expected_state = data.basicState(position=newPosition, temperature=temperature,
total_system_energy=62.5, total_potential_energy=50.0, total_kinetic_energy=12.5,
dhdpos=3, velocity=newVelocity)
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
sys._init_velocities()
cur_velocity = sys._currentVelocities
# print(cur_velocity)
self.assertIsInstance(cur_velocity, float, msg="Velocity has not the correcttype!")
def test_updateTemp(self):
"""
NOT IMPLEMENTED
"""
pass
def test_updateEne(self):
conditions = []
temperature = 300
position = [0.1]
mass = [1]
expected_state = data.basicState(position=position, temperature=temperature,
total_system_energy=0.005000000000000001, total_potential_energy=0.005000000000000001,
total_kinetic_energy=np.nan, dhdpos=np.nan, velocity=np.nan)
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
initialState = sys.current_state
sys.propagate()
sys._update_energies()
# check that middle step is not sames
self.assertNotEqual(sys._currentPosition, initialState.position,
msg="The initialState equals the currentState after propergating in attribute: Position!")
self.assertEqual(sys._currentTemperature, initialState.temperature,
msg="The initialState does not equal the currentState after propergating in attribute: temperature!")
self.assertNotAlmostEqual(sys._currentTotPot, initialState.total_potential_energy,
msg="The initialState does equal the currentState after propergating in attribute: total_potential_energy!")
self.assertAlmostEqual(np.isnan(sys._currentTotKin), np.isnan(initialState.total_kinetic_energy),
msg="The initialState does equal the currentState after propergating in attribute: total_kinetic_energy!")
self.assertNotEqual(sys._currentForce, initialState.dhdpos,
msg="The initialState equals the currentState after propergating in attribute: dhdpos!")
self.assertEqual(np.isnan(sys._currentVelocities), np.isnan(initialState.velocity),
msg="The initialState does not equal the currentState after propergating in attribute: velocity!")
def test_totPot(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
temperature = 300
position = [1]
mass = [1]
expected_state = data.basicState(position=position, temperature=temperature,
total_system_energy=0.005000000000000001, total_potential_energy=0.005000000000000001,
total_kinetic_energy=0,
dhdpos=None, velocity=None)
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
self.assertAlmostEqual(sys.calculate_total_potential_energy(), 0.5, msg="The initialised total_potential_energy is not correct!")
def test_totKin(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
conditions = []
temperature = 300
position = [1]
mass = [1]
expected_state = data.basicState(position=position, temperature=temperature,
total_system_energy=0.005000000000000001, total_potential_energy=0.005000000000000001,
total_kinetic_energy=np.nan, dhdpos=np.nan, velocity=np.nan)
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
self.assertEqual(np.isnan(sys.calculate_total_kinetic_energy()), np.isnan(np.nan), msg="The initialised total_kinetic_energy is not correct!")
newPosition = 10
newVelocity = -5
newForces = 3
sys.append_state(new_position=newPosition, new_velocity=newVelocity, new_forces=newForces)
self.assertAlmostEqual(sys.calculate_total_potential_energy(), 50.0, msg="The initialised total_potential_energy is not correct!")
def test_setTemperature(self):
conditions = []
temperature = 300
temperature2 = 600
position = [0.1]
mass = [1]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
sys._currentVelocities = 100
sys.update_current_state()
initialState = sys.current_state
sys.set_temperature(temperature2)
# check that middle step is not sames
self.assertEqual(sys._currentPosition, initialState.position,
msg="The initialState equals the currentState after propergating in attribute: Position!")
self.assertNotEqual(sys._currentTemperature, initialState.temperature,
msg="The initialState does equal the currentState after propergating in attribute: temperature!")
self.assertAlmostEqual(sys._currentTotPot, initialState.total_potential_energy,
msg="The initialState does equal the currentState after propergating in attribute: total_potential_energy!")
# self.assertNotAlmostEqual(sys._currentTotKin, initialState.total_kinetic_energy,
# msg="The initialState does not equal the currentState after propergating in attribute: total_kinetic_energy!")
self.assertEqual(np.isnan(sys._currentForce), np.isnan(initialState.dhdpos),
msg="The initialState equals the currentState after propergating in attribute: dhdpos!")
self.assertEqual(sys._currentVelocities, initialState.velocity,
msg="The initialState does equal the currentState after propergating in attribute: velocity!")
def test_get_Pot(self):
conditions = []
temperature = 300
position = 0.1
mass = [1]
expected_state = data.basicState(position=position, temperature=temperature,
total_system_energy=0.005, total_potential_energy=0.005, total_kinetic_energy=0,
dhdpos=None, velocity=None)
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
self.assertEqual(0.005000000000000001, sys.total_potential_energy, msg="Could not get the correct Pot Energy!")
def test_get_Trajectory(self):
conditions = []
temperature = 300
position = [0.1]
mass = [1]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
sys.simulate(steps=10)
traj_pd = sys.trajectory
def test_save_obj_str(self):
path = self.tmp_out_path
out_path = self.system_class(potential=self.pot, sampler=self.sampler).save(path=path)
print(out_path)
def test_load_str_path(self):
path = self.tmp_out_path
out_path = self.system_class(potential=self.pot, sampler=self.sampler).save(path=path)
cls = self.system_class.load(path=out_path)
print(cls)
class test_perturbedSystem1D(test_System):
system_class = system.perturbed_system.perturbedSystem
tmp_test_dir: str = None
def setUp(self) -> None:
test_dir = os.getcwd()+"/tests_out"
if(not os.path.exists(test_dir)):
os.mkdir(test_dir)
if (__class__.tmp_test_dir is None):
__class__.tmp_test_dir = tempfile.mkdtemp(dir=test_dir, prefix="tmp_test_perturbedSystem")
_, self.tmp_out_path = tempfile.mkstemp(prefix="test_" + self.system_class.name, suffix=".obj",
dir=__class__.tmp_test_dir)
self.sampler = samplers.stochastic.metropolisMonteCarloIntegrator()
ha = potentials.OneD.harmonicOscillatorPotential(x_shift=-5)
hb = potentials.OneD.harmonicOscillatorPotential(x_shift=5)
self.pot = potentials.OneD.linearCoupledPotentials(Va=ha, Vb=hb, lam=1.0)
def test_system_constructor(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
lam = 0
conditions = []
temperature = 300
position = 0
mass = [1]
expected_state = data.lambdaState(position=0, temperature=temperature, lam=0.0,
total_system_energy=12.5, total_potential_energy=12.5, total_kinetic_energy=np.nan,
dhdpos=np.nan, velocity=np.nan, dhdlam=np.nan)
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, lam=lam)
curState = sys.current_state
# check attributes
self.assertEqual(self.pot.constants[self.pot.nDimensions], sys.nDimensions,
msg="Dimensionality was not the same for system and potential!")
self.assertEqual([], sys.conditions, msg="Conditions were not empty!")
# print(curState)
# check current state intialisation
self.assertEqual(curState.position, expected_state.position, msg="The initialised Position is not correct!")
self.assertEqual(curState.temperature, expected_state.temperature,
msg="The initialised temperature is not correct!")
self.assertAlmostEqual(curState.total_system_energy, expected_state.total_system_energy,
msg="The initialised total_system_energy is not correct!")
self.assertAlmostEqual(curState.total_potential_energy, expected_state.total_potential_energy,
msg="The initialised total_potential_energy is not correct!")
self.assertEqual(np.isnan(curState.total_kinetic_energy), np.isnan(expected_state.total_kinetic_energy),
msg="The initialised total_kinetic_energy is not correct!")
# self.assertEqual(np.isnan(curState.dhdpos), np.isnan(expected_state.dhdpos), msg="The initialised dhdpos is not correct!")
self.assertEqual(np.isnan(curState.velocity), np.isnan(expected_state.velocity),
msg="The initialised velocity is not correct!")
self.assertEqual(np.isnan(curState.lam), np.isnan(expected_state.lam),
msg="The initialised lam is not correct!")
# self.assertEqual(np.isnan(curState.dhdlam), np.isnan(expected_state.dhdlam), msg="The initialised dHdlam is not correct!")
def test_system_constructor_detail(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
conditions = []
temperature = 300
position = [0.1]
mass = [1]
expected_state = data.basicState(position=[0.1], temperature=temperature,
total_system_energy=12.005, total_potential_energy=12.005,
total_kinetic_energy=np.nan, dhdpos=[[np.nan]],
velocity=np.nan) # Monte carlo does not use dhdpos or velocity
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
curState = sys.current_state
# check attributes
self.assertEqual(self.pot.constants[self.pot.nDimensions], sys.nDimensions,
msg="Dimensionality was not the same for system and potential!")
self.assertEqual([], sys.conditions, msg="Conditions were not empty!")
# print(curState)
# check current state intialisation
self.assertEqual(expected_state.position, curState.position, msg="The initialised Position is not correct!")
self.assertEqual(expected_state.temperature, curState.temperature,
msg="The initialised temperature is not correct!")
self.assertAlmostEqual(expected_state.total_system_energy, curState.total_system_energy,
msg="The initialised total_system_energy is not correct!")
self.assertAlmostEqual(expected_state.total_potential_energy, curState.total_potential_energy,
msg="The initialised total_potential_energy is not correct!")
self.assertEqual(np.isnan(expected_state.total_kinetic_energy), np.isnan(curState.total_kinetic_energy),
msg="The initialised total_kinetic_energy is not correct!")
self.assertEqual(np.isnan(expected_state.velocity), np.isnan(curState.velocity),
msg="The initialised velocity is not correct!")
def test_append_state(self):
lam = 0
temperature = 300
position = 0
newPosition = 10
newVelocity = -5
newForces = 3
newLam = 1.0
expected_state = data.lambdaState(position=newPosition, temperature=temperature, lam=newLam,
total_system_energy=125.0, total_potential_energy=112.5, total_kinetic_energy=12.5,
dhdpos=newForces, velocity=newVelocity, dhdlam=np.nan)
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature)
sys.append_state(new_position=newPosition, new_velocity=newVelocity, new_forces=newForces, new_lambda=newLam)
curState = sys.current_state
# check current state intialisation
self.assertEqual(sys._currentPosition, expected_state.position, msg="The initialised Position is not correct!")
self.assertEqual(curState.temperature, expected_state.temperature,
msg="The initialised temperature is not correct!")
self.assertAlmostEqual(curState.total_system_energy, expected_state.total_system_energy,
msg="The initialised total_system_energy is not correct!")
self.assertAlmostEqual(curState.total_potential_energy, expected_state.total_potential_energy,
msg="The initialised total_potential_energy is not correct!")
self.assertAlmostEqual(curState.total_kinetic_energy, expected_state.total_kinetic_energy,
msg="The initialised total_kinetic_energy is not correct!")
# self.assertEqual(curState.dhdpos, expected_state.dhdpos, msg="The initialised dhdpos is not correct!")
self.assertEqual(np.isnan(curState.velocity), np.isnan(expected_state.velocity),
msg="The initialised velocity is not correct!")
self.assertEqual(curState.lam, expected_state.lam, msg="The initialised lam is not correct!")
# self.assertEqual(np.isnan(curState.dhdlam), np.isnan(expected_state.dhdlam), msg="The initialised dHdlam is not correct!")
def test_revertStep(self):
newPosition = 10
newVelocity = -5
newForces = 3
newLam = 1.0
newPosition2 = 13
newVelocity2 = -4
newForces2 = 8
newLam2 = 0.5
lam = 0
conditions = []
temperature = 300
position = [0]
mass = [1]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, lam=lam)
sys.append_state(new_position=newPosition, new_velocity=newVelocity, new_forces=newForces, new_lambda=newLam)
expected_state = sys.current_state
sys.append_state(new_position=newPosition2, new_velocity=newVelocity2, new_forces=newForces2, new_lambda=newLam2)
not_expected_state = sys.current_state
sys.revert_step()
curState = sys.current_state
# check current state intialisation
self.assertEqual(curState.position, expected_state.position,
msg="The current Position is not equal to the one two steps before!")
self.assertEqual(curState.temperature, expected_state.temperature,
msg="The current temperature is not equal to the one two steps before!")
self.assertAlmostEqual(curState.total_system_energy, expected_state.total_system_energy,
msg="The current total_system_energy is not equal to the one two steps before!")
self.assertAlmostEqual(curState.total_potential_energy, expected_state.total_potential_energy,
msg="The current total_potential_energy is not equal to the one two steps before!")
self.assertAlmostEqual(curState.total_kinetic_energy, expected_state.total_kinetic_energy,
msg="The current total_kinetic_energy is not equal to the one two steps before!")
# self.assertEqual(curState.dhdpos, expected_state.dhdpos, msg="The current dhdpos is not equal to the one two steps before!")
self.assertEqual(curState.velocity, expected_state.velocity,
msg="The current velocity is not equal to the one two steps before!")
self.assertEqual(curState.lam, expected_state.lam,
msg="The current lam is not equal to the one two steps before!")
self.assertEqual(np.isnan(curState.dhdlam), np.isnan(expected_state.dhdlam),
msg="The initialised dHdlam is not correct!")
# check that middle step is not sames
self.assertNotEqual(curState.position, not_expected_state.position,
msg="The not expected Position equals the current one!")
self.assertEqual(curState.temperature, not_expected_state.temperature,
msg="The not expected temperature equals the current one")
self.assertNotAlmostEqual(curState.total_system_energy, not_expected_state.total_system_energy,
msg="The not expected total_system_energy equals the current one")
self.assertNotAlmostEqual(curState.total_potential_energy, not_expected_state.total_potential_energy,
msg="The not expected total_potential_energy equals the current one")
self.assertNotAlmostEqual(curState.total_kinetic_energy, not_expected_state.total_kinetic_energy,
msg="The not expected total_kinetic_energy equals the current one")
# self.assertNotEqual(curState.dhdpos, not_expected_state.dhdpos, msg="The not expected dhdpos, equals the current one")
self.assertNotEqual(curState.velocity, not_expected_state.velocity,
msg="The not expected velocity equals the current one")
self.assertNotEqual(curState.lam, not_expected_state.lam, msg="The not expected lam equals the current one")
self.assertEqual(np.isnan(curState.dhdlam), np.isnan(expected_state.dhdlam),
msg="The initialised dHdlam is not correct!")
def test_propergate(self):
lam = 0
temperature = 300
position = [0]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, lam=lam)
initialState = sys.current_state
sys.propagate()
# check that middle step is not sames
self.assertNotEqual(sys._currentPosition, initialState.position,
msg="The initialState equals the currentState after propagating in attribute: Position!")
self.assertEqual(sys._currentTemperature, initialState.temperature,
msg="The initialState does not equal the currentState after propergating in attribute: temperature!")
self.assertAlmostEqual(sys._currentTotPot, initialState.total_potential_energy,
msg="The initialState does not equal the currentState after propergating in attribute: total_potential_energy!")
self.assertEqual(np.isnan(sys._currentTotKin), np.isnan(initialState.total_kinetic_energy),
msg="The initialState does not equal the currentState after propergating in attribute: total_kinetic_energy!")
self.assertNotEqual(sys._currentForce, initialState.dhdpos,
msg="The initialState equals the currentState after propergating in attribute: dhdpos!")
self.assertEqual(np.isnan(sys._currentVelocities), np.isnan(initialState.velocity),
msg="The initialState does not equal the currentState after propergating in attribute: velocity!")
self.assertEqual(sys._currentLambda, initialState.lam,
msg="The initialState does not equal the currentState after propergating in attribute: lam!")
self.assertEqual(np.isnan(sys._currentdHdLambda), np.isnan(initialState.dhdlam),
msg="The initialState does not equal the currentState after propergating in attribute: dHdLam!")
def test_simulate(self):
lam = 0
steps = 100
temperature = 300
position = [0]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, lam=lam)
init_state = sys.current_state
sys.simulate(steps=steps, init_system=False,
withdraw_traj=True) # withdrawTraj is needed in the context because of the interaction between different Tests
trajectory = sys.trajectory
old_frame = trajectory.iloc[0]
# Check that the first frame is the initial state!
self.assertListEqual(list(init_state.position), list(old_frame.position),
msg="The initial state does not equal the frame 0 after propergating in attribute: Position!")
self.assertEqual(init_state.temperature, old_frame.temperature,
msg="The initial state does not equal the frame 0 after propergating in attribute: temperature!")
self.assertAlmostEqual(init_state.total_potential_energy, old_frame.total_potential_energy,
msg="The initial state does not equal the frame 0 after propergating in attribute: total_potential_energy!")
self.assertAlmostEqual(np.isnan(init_state.total_kinetic_energy), np.isnan(old_frame.total_kinetic_energy),
msg="The initial state does not equal the frame 0 after propergating in attribute: total_kinetic_energy!")
self.assertEqual(np.isnan(init_state.dhdpos), np.isnan(old_frame.dhdpos),
msg="The initial state does not equal the frame 0 after propergating in attribute: dhdpos!")
self.assertEqual(np.isnan(init_state.velocity), np.isnan(old_frame.velocity),
msg="The initial state does not equal the frame 0 after propergating in attribute: velocity!")
self.assertEqual(init_state.lam, old_frame.lam,
msg="The initial state does not equal the frame 0 after propergating in attribute: lam!")
self.assertEqual(np.isnan(init_state.dhdlam), np.isnan(old_frame.dhdlam),
msg="The initial state does not equal the frame 0 after propergating in attribute: dhdLam!")
# check that the frames are all different from each other.
for ind, frame in list(trajectory.iterrows())[1:]:
# check that middle step is not sames
self.assertNotEqual(old_frame.position, frame.position,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: Position!")
self.assertEqual(old_frame.temperature, frame.temperature,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: temperature!") # due to samplers
self.assertNotAlmostEqual(old_frame.total_potential_energy, frame.total_potential_energy,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: total_potential_energy!")
self.assertAlmostEqual(np.isnan(old_frame.total_kinetic_energy), np.isnan(frame.total_kinetic_energy),
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: total_kinetic_energy!") # due to samplers
self.assertNotEqual(old_frame.dhdpos, frame.dhdpos,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: dhdpos!")
self.assertEqual(np.isnan(old_frame.velocity), np.isnan(frame.velocity),
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: velocity!") # due to samplers
self.assertEqual(init_state.lam, old_frame.lam,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: lam!")
self.assertEqual(np.isnan(init_state.dhdlam), np.isnan(old_frame.dhdlam),
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: dhdLam!")
old_frame = frame
def test_applyConditions(self):
"""
NOT IMPLEMENTED!
"""
pass
def test_initVel(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
lam = 0
temperature = 300
position = [0]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, lam=lam)
sys._init_velocities()
cur_velocity = sys._currentVelocities
# print(cur_velocity)
expected_vel = np.float64(-2.8014573319669176)
self.assertEqual(type(cur_velocity), type(expected_vel), msg="Velocity has not the correcttype!")
def test_updateTemp(self):
"""
NOT IMPLEMENTED
"""
pass
def test_updateEne(self):
lam = 0
temperature = 300
position = [0]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, lam=lam)
initialState = sys.current_state
sys.propagate()
sys._update_energies()
# check that middle step is not sames
self.assertNotEqual(sys._currentPosition, initialState.position,
msg="The initialState equals the currentState after propergating in attribute: Position!")
self.assertEqual(sys._currentTemperature, initialState.temperature,
msg="The initialState does not equal the currentState after propergating in attribute: temperature!")
self.assertNotAlmostEqual(sys._currentTotPot, initialState.total_potential_energy,
msg="The initialState does equal the currentState after propergating in attribute: total_potential_energy!")
self.assertEqual(np.isnan(sys._currentTotKin), np.isnan(initialState.total_kinetic_energy),
msg="The initialState does equal the currentState after propergating in attribute: total_kinetic_energy!")
self.assertNotEqual(sys._currentForce, initialState.dhdpos,
msg="The initialState equals the currentState after propergating in attribute: dhdpos!")
self.assertEqual(np.isnan(sys._currentVelocities), np.isnan(initialState.velocity),
msg="The initialState does not equal the currentState after propergating in attribute: velocity!")
def test_totPot(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
lam=0
temperature = 300
position = [0]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, lam=lam)
self.assertAlmostEqual(sys.calculate_total_potential_energy(), 12.5, msg="The initialised total_potential_energy is not correct!")
def test_totKin(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
lam = 0
temperature = 300
position = [0]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, lam=lam)
self.assertTrue(np.isnan(sys.calculate_total_kinetic_energy()), msg="The initialised total_potential_energy is not correct!")
newPosition = 10
newVelocity = -5
newForces = 3
newLam = 1
sys.append_state(new_position=newPosition, new_velocity=newVelocity, new_forces=newForces, new_lambda=newLam)
self.assertAlmostEqual(sys.calculate_total_kinetic_energy(), 12.5, msg="The initialised total_potential_energy is not correct!")
def test_setTemperature(self):
lam = 0
temperature = 300
temperature2 = 600
position = [0]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, lam=lam)
sys._currentVelocities = 100
sys.update_current_state()
initialState = sys.current_state
sys.set_temperature(temperature2)
# check that middle step is not sames
self.assertListEqual(list(sys._currentPosition), list(initialState.position),
msg="The initialState equals the currentState after propergating in attribute: Position!")
self.assertNotEqual(sys._currentTemperature, initialState.temperature,
msg="The initialState does equal the currentState after propergating in attribute: temperature!")
self.assertAlmostEqual(sys._currentTotPot, initialState.total_potential_energy,
msg="The initialState does equal the currentState after propergating in attribute: total_potential_energy!")
self.assertNotAlmostEqual(sys._currentTotKin, initialState.total_kinetic_energy,
msg="The initialState does not equal the currentState after propergating in attribute: total_kinetic_energy!")
self.assertEqual(np.isnan(sys._currentForce), np.isnan(initialState.dhdpos),
msg="The initialState equals the currentState after propergating in attribute: dhdpos!")
self.assertEqual(sys._currentVelocities, initialState.velocity,
msg="The initialState does equal the currentState after propergating in attribute: velocity!")
def test_get_Pot(self):
lam = 0
temperature = 300
position = [5]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, lam=lam)
self.assertEqual(0.0, sys.total_potential_energy, msg="Could not get the correct Pot Energy!")
class test_edsSystem1D(test_System):
system_class = system.eds_system.edsSystem
tmp_test_dir: str = None
def setUp(self) -> None:
test_dir = os.getcwd()+"/tests_out"
if(not os.path.exists(test_dir)):
os.mkdir(test_dir)
if (__class__.tmp_test_dir is None):
__class__.tmp_test_dir = tempfile.mkdtemp(dir=test_dir, prefix="tmp_test_eds_system")
_, self.tmp_out_path = tempfile.mkstemp(prefix="test_" + self.system_class.name, suffix=".obj",
dir=__class__.tmp_test_dir)
self.sampler = samplers.stochastic.metropolisMonteCarloIntegrator()
self.pot = potentials.OneD.envelopedPotential()
def test_system_constructor(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
s = 1
conditions = []
temperature = 300
position = 0
mass = [1]
expected_state = data.envelopedPStstate(position=0, temperature=temperature, s=1.0, eoff=[0,0],
total_system_energy=-0.011047744848593777, total_potential_energy=-0.011047744848593777, total_kinetic_energy=np.nan,
dhdpos=np.nan, velocity=np.nan)
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, eds_s=s)
curState = sys.current_state
# check attributes
self.assertEqual(self.pot.constants[self.pot.nDimensions], sys.nDimensions,
msg="Dimensionality was not the same for system and potential!")
self.assertEqual([], sys.conditions, msg="Conditions were not empty!")
# print(curState)
# check current state intialisation
self.assertEqual(curState.position, expected_state.position, msg="The initialised Position is not correct!")
self.assertEqual(curState.temperature, expected_state.temperature,
msg="The initialised temperature is not correct!")
self.assertAlmostEqual(curState.total_system_energy, expected_state.total_system_energy,
msg="The initialised total_system_energy is not correct!")
self.assertAlmostEqual(curState.total_potential_energy, expected_state.total_potential_energy,
msg="The initialised total_potential_energy is not correct!")
self.assertEqual(np.isnan(curState.total_kinetic_energy), np.isnan(expected_state.total_kinetic_energy),
msg="The initialised total_kinetic_energy is not correct!")
# self.assertEqual(np.isnan(curState.dhdpos), np.isnan(expected_state.dhdpos), msg="The initialised dhdpos is not correct!")
self.assertEqual(np.isnan(curState.velocity), np.isnan(expected_state.velocity),
msg="The initialised velocity is not correct!")
self.assertEqual(curState.s, expected_state.s,
msg="The initialised s is not correct!")
self.assertEqual(curState.eoff, expected_state.eoff,
msg="The initialised Eoff is not correct!")
def test_system_constructor_detail(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
conditions = []
temperature = 300
position = 0.1
mass = [1]
expected_state = data.basicState(position=position, temperature=temperature,
total_system_energy=-0.009884254671918117, total_potential_energy=-0.009884254671918117,
total_kinetic_energy=np.nan, dhdpos=np.array(-0.0556779),
velocity=np.nan) # Monte carlo does not use dhdpos or velocity
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position, temperature=temperature)
curState = sys.current_state
print(curState)
# check attributes
self.assertEqual(self.pot.constants[self.pot.nDimensions], sys.nDimensions,
msg="Dimensionality was not the same for system and potential!")
self.assertEqual([], sys.conditions, msg="Conditions were not empty!")
# print(curState)
# check current state intialisation
self.assertEqual(expected_state.position, curState.position, msg="The initialised Position is not correct!")
self.assertEqual(expected_state.temperature, curState.temperature,
msg="The initialised temperature is not correct!")
self.assertAlmostEqual(expected_state.total_system_energy, curState.total_system_energy,
msg="The initialised total_system_energy is not correct!")
self.assertAlmostEqual(expected_state.total_potential_energy, curState.total_potential_energy,
msg="The initialised total_potential_energy is not correct!")
self.assertEqual(np.isnan(expected_state.total_kinetic_energy), np.isnan(curState.total_kinetic_energy),
msg="The initialised total_kinetic_energy is not correct!")
self.assertEqual(np.isnan(expected_state.velocity), np.isnan(curState.velocity),
msg="The initialised velocity is not correct!")
def test_append_state(self):
temperature = 300
position = 0
s = 1.0
Eoff=[0,0]
newPosition = 10
newVelocity = -5
newForces = 3
newEoff = [1,1]
newS = [2]
expected_state = data.envelopedPStstate(position=newPosition, temperature=temperature, s=newS, eoff=newEoff,
total_system_energy=36.99999999999157, total_potential_energy=24.499999999991577, total_kinetic_energy=12.5,
dhdpos=newForces, velocity=newVelocity)
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, eds_s=s)
sys.append_state(new_position=newPosition, new_velocity=newVelocity, new_forces=newForces, new_s=newS, new_eoff=newEoff)
curState = sys.current_state
# check current state intialisation
self.assertEqual(sys._currentPosition, expected_state.position, msg="The initialised Position is not correct!")
self.assertEqual(curState.temperature, expected_state.temperature,
msg="The initialised temperature is not correct!")
self.assertAlmostEqual(curState.total_system_energy, expected_state.total_system_energy,
msg="The initialised total_system_energy is not correct!")
self.assertAlmostEqual(curState.total_potential_energy, expected_state.total_potential_energy,
msg="The initialised total_potential_energy is not correct!")
self.assertAlmostEqual(curState.total_kinetic_energy, expected_state.total_kinetic_energy,
msg="The initialised total_kinetic_energy is not correct!")
# self.assertEqual(curState.dhdpos, expected_state.dhdpos, msg="The initialised dhdpos is not correct!")
self.assertEqual(np.isnan(curState.velocity), np.isnan(expected_state.velocity),
msg="The initialised velocity is not correct!")
self.assertEqual(curState.s, expected_state.s, msg="The initialised s is not correct!")
self.assertEqual(curState.eoff, expected_state.eoff, msg="The initialised Eoff is not correct!")
def test_revertStep(self):
newPosition = 10
newVelocity = -5
newForces = 3
newS = 1.0
newEoff = [1,1]
newPosition2 = 13
newVelocity2 = -4
newForces2 = 8
newS2 = 0.5
newEoff2 = [2,2]
integ = samplers.stochastic.metropolisMonteCarloIntegrator()
ha = potentials.OneD.harmonicOscillatorPotential(x_shift=-5)
hb = potentials.OneD.harmonicOscillatorPotential(x_shift=5)
s = 1
pot = potentials.OneD.exponentialCoupledPotentials(Va=ha, Vb=hb, s=1)
conditions = []
temperature = 300
position = [0]
mass = [1]
sys = self.system_class(potential=pot, sampler=integ, start_position=position,
temperature=temperature, eds_s=s)
sys.append_state(new_position=newPosition, new_velocity=newVelocity, new_forces=newForces, new_s=newS, new_eoff=newEoff)
expected_state = sys.current_state
sys.append_state(new_position=newPosition2, new_velocity=newVelocity2, new_forces=newForces2, new_s=newS2, new_eoff=newEoff2)
not_expected_state = sys.current_state
print(len(sys._trajectory), sys._trajectory)
sys.revert_step()
curState = sys.current_state
print(curState)
print(not_expected_state)
# check current state intialisation
self.assertEqual(curState.position, expected_state.position,
msg="The current Position is not equal to the one two steps before!")
self.assertEqual(curState.temperature, expected_state.temperature,
msg="The current temperature is not equal to the one two steps before!")
self.assertAlmostEqual(curState.total_system_energy, expected_state.total_system_energy,
msg="The current total_system_energy is not equal to the one two steps before!")
self.assertAlmostEqual(curState.total_potential_energy, expected_state.total_potential_energy,
msg="The current total_potential_energy is not equal to the one two steps before!")
self.assertAlmostEqual(curState.total_kinetic_energy, expected_state.total_kinetic_energy,
msg="The current total_kinetic_energy is not equal to the one two steps before!")
# self.assertEqual(curState.dhdpos, expected_state.dhdpos, msg="The current dhdpos is not equal to the one two steps before!")
self.assertEqual(curState.velocity, expected_state.velocity,
msg="The current velocity is not equal to the one two steps before!")
self.assertEqual(curState.s, expected_state.s,
msg="The current s is not equal to the one two steps before!")
np.testing.assert_almost_equal(curState.eoff, expected_state.eoff,
err_msg="The initialised Eoff is not correct as not equal to two steps before!")
# check that middle step is not sames
self.assertNotEqual(curState.position, not_expected_state.position,
msg="The not expected Position equals the current one!")
self.assertEqual(curState.temperature, not_expected_state.temperature,
msg="The not expected temperature equals the current one")
self.assertNotAlmostEqual(curState.total_system_energy, not_expected_state.total_system_energy,
msg="The not expected total_system_energy equals the current one")
self.assertNotAlmostEqual(curState.total_potential_energy, not_expected_state.total_potential_energy,
msg="The not expected total_potential_energy equals the current one")
self.assertNotAlmostEqual(curState.total_kinetic_energy, not_expected_state.total_kinetic_energy,
msg="The not expected total_kinetic_energy equals the current one")
# self.assertNotEqual(curState.dhdpos, not_expected_state.dhdpos, msg="The not expected dhdpos, equals the current one")
self.assertNotEqual(curState.velocity, not_expected_state.velocity,
msg="The not expected velocity equals the current one")
self.assertNotEqual(curState.s, not_expected_state.s, msg="The not expected lam equals the current one")
self.assertNotEqual(curState.eoff, not_expected_state.eoff, msg="The initialised Eoff is not correct!")
def test_propergate(self):
temperature = 300
position = [0]
s=1
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, eds_s=s)
initialState = sys.current_state
sys.propagate()
# check that middle step is not sames
self.assertNotEqual(sys._currentPosition, initialState.position,
msg="The initialState equals the currentState after propagating in attribute: Position!")
self.assertEqual(sys._currentTemperature, initialState.temperature,
msg="The initialState does not equal the currentState after propergating in attribute: temperature!")
self.assertAlmostEqual(sys._currentTotPot, initialState.total_potential_energy,
msg="The initialState does not equal the currentState after propergating in attribute: total_potential_energy!")
self.assertEqual(np.isnan(sys._currentTotKin), np.isnan(initialState.total_kinetic_energy),
msg="The initialState does not equal the currentState after propergating in attribute: total_kinetic_energy!")
self.assertNotEqual(sys._currentForce, initialState.dhdpos,
msg="The initialState equals the currentState after propergating in attribute: dhdpos!")
self.assertEqual(np.isnan(sys._currentVelocities), np.isnan(initialState.velocity),
msg="The initialState does not equal the currentState after propergating in attribute: velocity!")
self.assertEqual(sys._currentEdsS, initialState.s,
msg="The initialState does not equal the currentState after propergating in attribute: s!")
np.testing.assert_almost_equal(sys._currentEdsEoffs, initialState.eoff,
err_msg="The initialState does not equal the currentState after propergating in attribute: Eoff!")
def test_simulate(self):
s =1
steps = 100
temperature = 300
position = [0]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, eds_s=s)
init_state = sys.current_state
sys.simulate(steps=steps, init_system=False,
withdraw_traj=True) # withdrawTraj is needed in the context because of the interaction between different Tests
trajectory = sys.trajectory
old_frame = trajectory.iloc[0]
# Check that the first frame is the initial state!
self.assertListEqual(list(init_state.position), list(old_frame.position),
msg="The initial state does not equal the frame 0 after propergating in attribute: Position!")
self.assertEqual(init_state.temperature, old_frame.temperature,
msg="The initial state does not equal the frame 0 after propergating in attribute: temperature!")
self.assertAlmostEqual(init_state.total_potential_energy, old_frame.total_potential_energy,
msg="The initial state does not equal the frame 0 after propergating in attribute: total_potential_energy!")
self.assertAlmostEqual(np.isnan(init_state.total_kinetic_energy), np.isnan(old_frame.total_kinetic_energy),
msg="The initial state does not equal the frame 0 after propergating in attribute: total_kinetic_energy!")
self.assertEqual(np.isnan(init_state.dhdpos), np.isnan(old_frame.dhdpos),
msg="The initial state does not equal the frame 0 after propergating in attribute: dhdpos!")
self.assertEqual(np.isnan(init_state.velocity), np.isnan(old_frame.velocity),
msg="The initial state does not equal the frame 0 after propergating in attribute: velocity!")
self.assertEqual(init_state.s, old_frame.s,
msg="The initial state does not equal the frame 0 after propergating in attribute: s!")
np.testing.assert_almost_equal(init_state.eoff, old_frame.eoff,
err_msg="The initial state does not equal the frame 0 after propergating in attribute: Eoff!")
# check that the frames are all different from each other.
for ind, frame in list(trajectory.iterrows())[1:]:
# check that middle step is not sames
self.assertNotEqual(old_frame.position, frame.position,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: Position!")
self.assertEqual(old_frame.temperature, frame.temperature,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: temperature!") # due to samplers
self.assertNotAlmostEqual(old_frame.total_potential_energy, frame.total_potential_energy,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: total_potential_energy!")
self.assertAlmostEqual(np.isnan(old_frame.total_kinetic_energy), np.isnan(frame.total_kinetic_energy),
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: total_kinetic_energy!") # due to samplers
self.assertNotEqual(old_frame.dhdpos, frame.dhdpos,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: dhdpos!")
self.assertEqual(np.isnan(old_frame.velocity), np.isnan(frame.velocity),
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: velocity!") # due to samplers
self.assertEqual(init_state.s, old_frame.s,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: s!")
self.assertEqual(init_state.eoff, old_frame.eoff,
msg="The frame " + str(ind) + " equals the frame " + str(
ind + 1) + " after propergating in attribute: Eoff!")
old_frame = frame
def test_applyConditions(self):
"""
NOT IMPLEMENTED!
"""
pass
def test_initVel(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
s=1
temperature = 300
position = [0]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, eds_s=s)
sys._init_velocities()
cur_velocity = sys._currentVelocities
expected_vel = [0.19334311622217965, 1.2272590394440765]
self.assertEqual(type(cur_velocity), type(expected_vel), msg="Velocity has not the correcttype!")
def test_updateTemp(self):
"""
NOT IMPLEMENTED
"""
pass
def test_updateEne(self):
s=1
temperature = 300
position = [0]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, eds_s=s)
initialState = sys.current_state
sys.propagate()
sys._update_energies()
# check that middle step is not sames
self.assertNotEqual(sys._currentPosition, initialState.position,
msg="The initialState equals the currentState after propergating in attribute: Position!")
self.assertEqual(sys._currentTemperature, initialState.temperature,
msg="The initialState does not equal the currentState after propergating in attribute: temperature!")
self.assertNotAlmostEqual(sys._currentTotPot, initialState.total_potential_energy,
msg="The initialState does equal the currentState after propergating in attribute: total_potential_energy!")
self.assertEqual(np.isnan(sys._currentTotKin), np.isnan(initialState.total_kinetic_energy),
msg="The initialState does equal the currentState after propergating in attribute: total_kinetic_energy!")
self.assertNotEqual(sys._currentForce, initialState.dhdpos,
msg="The initialState equals the currentState after propergating in attribute: dhdpos!")
self.assertEqual(np.isnan(sys._currentVelocities), np.isnan(initialState.velocity),
msg="The initialState does not equal the currentState after propergating in attribute: velocity!")
def test_totPot(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
s=1
temperature = 300
position = [12]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, eds_s=s)
self.assertAlmostEqual(sys.calculate_total_potential_energy(), 40.49999999999998, msg="The initialised total_potential_energy is not correct!")
def test_totKin(self):
"""
uses init_state, updateEne, randomPos, self.state
:return:
"""
s=1
temperature = 300
position = [0]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, eds_s=s)
self.assertTrue(np.isnan(sys.calculate_total_kinetic_energy()), msg="The initialised total_potential_energy is not correct!")
newPosition = 10
newVelocity = -5
newForces = 3
newS = 2
newEoff = [0,0]
sys.append_state(new_position=newPosition, new_velocity=newVelocity, new_forces=newForces, new_s=newS, new_eoff=newEoff)
self.assertAlmostEqual(sys.calculate_total_kinetic_energy(), 12.5, msg="The initialised total_potential_energy is not correct!")
def test_setTemperature(self):
s=1
temperature = 300
temperature2 = 600
position = [0]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, eds_s=s)
sys._currentVelocities = 100
sys.update_current_state()
initialState = sys.current_state
sys.set_temperature(temperature2)
# check that middle step is not sames
self.assertListEqual(list(sys.position), list(initialState.position),
msg="The initialState equals the currentState after propergating in attribute: Position!")
self.assertNotEqual(sys._currentTemperature, initialState.temperature,
msg="The initialState does equal the currentState after propergating in attribute: temperature!")
self.assertAlmostEqual(sys._currentTotPot, initialState.total_potential_energy,
msg="The initialState does equal the currentState after propergating in attribute: total_potential_energy!")
self.assertNotAlmostEqual(sys._currentTotKin, initialState.total_kinetic_energy,
msg="The initialState does not equal the currentState after propergating in attribute: total_kinetic_energy!")
self.assertEqual(np.isnan(sys._currentForce), np.isnan(initialState.dhdpos),
msg="The initialState equals the currentState after propergating in attribute: dhdpos!")
self.assertEqual(sys._currentVelocities, initialState.velocity,
msg="The initialState does equal the currentState after propergating in attribute: velocity!")
def test_get_Pot(self):
s=1
temperature = 300
position = [5]
sys = self.system_class(potential=self.pot, sampler=self.sampler, start_position=position,
temperature=temperature, eds_s=s)
self.assertEqual(1.9999724639297711, sys.total_potential_energy, msg="Could not get the correct Pot Energy!")
if __name__ == '__main__':
unittest.main()
| 58.309047 | 159 | 0.640427 | 7,855 | 72,828 | 5.775302 | 0.0345 | 0.029362 | 0.047173 | 0.061722 | 0.95448 | 0.945707 | 0.939733 | 0.927565 | 0.92708 | 0.917756 | 0 | 0.017092 | 0.280208 | 72,828 | 1,248 | 160 | 58.355769 | 0.848305 | 0.064398 | 0 | 0.861555 | 0 | 0 | 0.225996 | 0.017003 | 0 | 0 | 0 | 0 | 0.240682 | 1 | 0.051118 | false | 0.00639 | 0.00852 | 0 | 0.069223 | 0.00639 | 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 |
4b30049d1a5e10320b1af48103c3c3166ccebd3a | 18,120 | py | Python | bip39validator/LevDistResult.py | ZenulAbidin/bip39validator | b78f2db6f46b56b408eef3a51e921e96247a9b46 | [
"MIT"
] | 3 | 2021-02-11T20:37:56.000Z | 2021-06-11T03:29:15.000Z | bip39validator/LevDistResult.py | ZenulAbidin/bip39validator | b78f2db6f46b56b408eef3a51e921e96247a9b46 | [
"MIT"
] | 4 | 2020-10-04T23:11:08.000Z | 2020-12-23T00:32:52.000Z | bip39validator/LevDistResult.py | ZenulAbidin/bip39validator | b78f2db6f46b56b408eef3a51e921e96247a9b46 | [
"MIT"
] | null | null | null | from .internal.util import is_all_lower
class LevDistResult:
"""Levenshtein distances between each word pair.
Data structure returned or raised by ``BIP39WordList.test_lev_distance()``.
This class is not meant to be created directly.
"""
"""Test conducted with a minimum Levenshtien distance of ``threshold``."""
threshold = None
def __init__(self, res, words_sorted, lines_sorted, threshold):
lev, split = res
self.split = split
self.words_sorted = words_sorted
self.lines_sorted = lines_sorted
self.threshold = threshold
def __len__(self):
return len(self.split)
def _index_pair(self, first, second):
return (first, second)
def _word_pair(self, first, second):
return (self.words_sorted[first], self.words_sorted[second])
def _line_pair(self, first, second):
return (self.lines_sorted[first], self.lines_sorted[second])
def getwordpairs_eq(self, dist=None):
"""Gets the word pairs which have a Levenshtein distance of ``dist``
:param dist: Levenshtein distance
:type dist: int
:returns: a list of word pairs
"""
if not dist:
dist = self.threshold
assert type(dist) == int, 'Invalid type "{}" for argument `dist` (expected "int")' \
.format(type(dist).__name__)
assert dist > 0, 'Distance must be greater than 0'
pairs = []
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if dist_split == dist:
pairs.append(self._word_pair(first, second))
return pairs
def getlinepairs_eq(self, dist=None):
"""Gets the line numbers of pairs which have a Levenshtein distance of ``dist``
:param dist: Levenshtein distance
:type dist: int
:returns: a list of line pairs
"""
if not dist:
dist = self.threshold
assert type(dist) == int, 'Invalid type "{}" for argument `dist` (expected "int")' \
.format(type(dist).__name__)
assert dist > 0, 'Distance must be greater than 0'
pairs = []
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if dist_split == dist:
pairs.append(self._line_pair(first, second))
return pairs
def getwordpairs_lt(self, dist=None):
"""Gets the word pairs which have a Levenshtein distance less than ``dist``
:param dist: Levenshtein distance
:type dist: int
:returns: a list of word pairs
"""
if not dist:
dist = self.threshold
assert type(dist) == int, 'Invalid type "{}" for argument `dist` (expected "int")' \
.format(type(dist).__name__)
assert dist > 0, 'Distance must be greater than 0'
pairs = []
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if dist_split < dist:
pairs.append(self._word_pair(first, second))
return pairs
def getlinepairs_lt(self, dist=None):
"""Gets the line numbers of pairs which have a Levenshtein distance less than ``dist``
:param dist: Levenshtein distance
:type dist: int
:returns: a list of line number pairs
"""
if not dist:
dist = self.threshold
assert type(dist) == int, 'Invalid type "{}" for argument `dist` (expected "int")' \
.format(type(dist).__name__)
assert dist > 0, 'Distance must be greater than 0'
pairs = []
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if dist_split < dist:
pairs.append(self._line_pair(first, second))
return pairs
def getwordpairs_gt(self, dist=None):
"""Gets the word pairs which have a Levenshtein distance greater than ``dist``
:param dist: Levenshtein distance
:type dist: int
:returns: a list of word pairs"""
if not dist:
dist = self.threshold
assert type(dist) == int, 'Invalid type "{}" for argument `dist` (expected "int")' \
.format(type(dist).__name__)
assert dist > 0, 'Distance must be greater than 0'
pairs = []
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if dist_split > dist:
pairs.append(self._word_pair(first, second))
return pairs
def getlinepairs_gt(self, dist=None):
"""Gets the line numbers of pairs which have a Levenshtein distance greater than ``dist``
:param dist: Levenshtein distance
:type dist: int
:returns: a list of line number pairs"""
if not dist:
dist = self.threshold
assert type(dist) == int, 'Invalid type "{}" for argument `dist` (expected "int")' \
.format(type(dist).__name__)
assert dist > 0, 'Distance must be greater than 0'
pairs = []
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if dist_split > dist:
pairs.append(self._line_pair(first, second))
return pairs
def getwordpairs_list(self, dists):
"""Gets the word pairs which have a Levenshtein distance inside the list ``dists``
:param dists: list of Levenshtein distances
:type dists: list
:returns: a list of word pairs"""
assert type(dists) == list, 'Invalid type "{}" for argument `dists` (expected "list")' \
.format(type(dists).__name__)
assert len(dists) > 0, "Cannot use empty list as list of dists"
pairs = []
for i in range(0, len(dists)):
assert type(dists[i]) == int, 'Invalid type "{}" for list element of `dists` (expected "int")' \
.format(type(dists[i]).__name__)
assert dists[i] > 0, "Distance must be greater than 0"
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if dist_split in dists:
pairs.append(self._word_pair(first, second))
return pairs
def getlinepairs_list(self, dists):
"""Gets the line numbers of pairs which have a Levenshtein distance inside the list ``dists``
:param dists: list of Levenshtein distances
:type dists: list
:returns: a list of line number pairs"""
assert type(dists) == list, 'Invalid type "{}" for argument `dists` (expected "list")' \
.format(type(dists).__name__)
assert len(dists) > 0, "Cannot use empty list as list of dists"
pairs = []
for i in range(0, len(dists)):
assert type(dists[i]) == int, 'Invalid type "{}" for list element of `dists` (expected "int")' \
.format(type(dists[i]).__name__)
assert dists[i] > 0, "Distance must be greater than 0"
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if dist_split in dists:
pairs.append(self._line_pair(first, second))
return pairs
def getdist(self, word1, word2):
"""Gets Levenshtein distance between ``word1`` and ``word2``
:param word1: first word
:type word1: str
:param word2: second word
:type word2: str
:returns: Levenshtein distance between ``word1`` and ``word2``"""
assert type(word1) == str, 'Invalid type "{}" for argument `word1` (expected "str")' \
.format(type(word1).__name__)
assert len(word1) > 0, "Cannot use empty string as word"
assert is_all_lower(word1), 'Word "{}" is not all ASCII lowercase'.format(word1)
assert type(word2) == str, 'Invalid type "{}" for argument `word2` (expected "str")' \
.format(type(word2).__name__)
assert len(word2) > 0, "Cannot use empty string as word"
assert is_all_lower(word2), 'Word "{}" is not all ASCII lowercase'.format(word2)
if not is_all_lower(word1):
raise ValueError("{} is not all lowercase".format(word1))
if not is_all_lower(word2):
raise ValueError("{} is not all lowercase".format(word2))
if word1 > word2:
word1, word2 = (word2, word1)
dist = None
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if self.words_sorted[first] == word1 and self.words_sorted[second] == word2:
dist = dist_split
break
if not dist:
raise KeyError("word pair \"{}\" and \"{}\" not found".format(word1,
word2))
else:
return dist
def getdist_all(self, word):
"""Gets Levenshtein distance between `word` and all other words
:param word: the word
:type word: str
:returns: list of Levenshtein distances between ``word`` and each word"""
assert type(word) == str, 'Invalid type "{}" for argument `word` (expected "str")' \
.format(type(word).__name__)
assert len(word) > 0, "Cannot use empty string as word"
assert is_all_lower(word), 'Word "{}" is not all ASCII lowercase'.format(word)
dist_all = []
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
correct_idx = None
if self.words_sorted[first] == word:
correct_idx = first
other_idx = second
elif self.words_sorted[second] == word:
correct_idx = second
other_idx = first
if correct_idx != None:
dist_all.append((self._word_pair(other_idx, correct_idx),
self._line_pair(other_idx, correct_idx), dist_split))
if not dist_all:
raise KeyError("word \"{}\" not found".format(word))
else:
return dist_all
def getdist_all_eq(self, word, dist=None):
"""Gets Levenshtein distance between ``word`` and all other words, equal to ``dist``
:param word: the word
:type word: str
:param dist: Levenshtein distance
:type dist: int
:returns: list of Levenshtein distances between ``word`` and each word"""
if not dist:
dist = self.threshold
assert type(word) == str, 'Invalid type "{}" for argument `word` (expected "str")' \
.format(type(word).__name__)
assert len(word) > 0, "Cannot use empty string as word"
assert is_all_lower(word), 'Word "{}" is not all ASCII lowercase'.format(word)
assert type(dist) == int, 'Invalid type "{}" for argument `dist` (expected "int")' \
.format(type(dist).__name__)
assert dist > 0, 'Distance must be greater than 0'
dist_all = []
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if dist_split == dist:
correct_idx = None
if self.words_sorted[first] == word:
correct_idx = first
other_idx = second
elif self.words_sorted[second] == word:
correct_idx = second
other_idx = first
if correct_idx != None:
dist_all.append((self._word_pair(other_idx, correct_idx),
self._line_pair(other_idx, correct_idx), dist_split))
if not dist_all:
raise KeyError("word \"{}\" not found".format(word))
else:
return dist_all
def getdist_all_lt(self, word, dist=None):
"""Gets Levenshtein distance between ``word`` and all other words, less than ``dist``
:param word: the word
:type word: str
:param dist: Levenshtein distance
:type dist: int
:returns: list of Levenshtein distances between ``word`` and each word"""
if not dist:
dist = self.threshold
assert type(word) == str, 'Invalid type "{}" for argument `word` (expected "str")' \
.format(type(word).__name__)
assert len(word) > 0, "Cannot use empty string as word"
assert is_all_lower(word), 'Word "{}" is not all ASCII lowercase'.format(word)
assert type(dist) == int, 'Invalid type "{}" for argument `dist` (expected "int")' \
.format(type(dist).__name__)
assert dist > 0, 'Distance must be greater than 0'
dist_all = []
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if dist_split < dist:
correct_idx = None
if self.words_sorted[first] == word:
correct_idx = first
other_idx = second
elif self.words_sorted[second] == word:
correct_idx = second
other_idx = first
if correct_idx != None:
dist_all.append((self._word_pair(other_idx, correct_idx),
self._line_pair(other_idx, correct_idx), dist_split))
if not dist_all:
raise KeyError("word \"{}\" not found".format(word))
else:
return dist_all
def getdist_all_gt(self, word, dist=None):
"""Gets Levenshtein distance between ``word`` and all other words, greater than ``dist``
:param word: the word
:type word: str
:param dist: Levenshtein distance
:type dist: int
:returns: list of Levenshtein distances between ``word`` and each word"""
if not dist:
dist = self.threshold
assert type(word) == str, 'Invalid type "{}" for argument `word` (expected "str")' \
.format(type(word).__name__)
assert len(word) > 0, "Cannot use empty string as word"
assert is_all_lower(word), 'Word "{}" is not all ASCII lowercase'.format(word)
assert type(dist) == int, 'Invalid type "{}" for argument `dist` (expected "int")' \
.format(type(dist).__name__)
assert dist > 0, 'Distance must be greater than 0'
dist_all = []
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if dist_split > dist:
correct_idx = None
if self.words_sorted[first] == word:
correct_idx = first
other_idx = second
elif self.words_sorted[second] == word:
correct_idx = second
other_idx = first
if correct_idx != None:
dist_all.append((self._word_pair(other_idx, correct_idx),
self._line_pair(other_idx, correct_idx), dist_split))
if not dist_all:
raise KeyError("word \"{}\" not found".format(word))
else:
return dist_all
def getdist_all_list(self, word, dists):
"""Gets Levenshtein distance between ``word`` and all other words, inside the list ``dists``
:param word: the word
:type word: str
:param dists: list of Levenshtein distances
:type dists: list
:returns: list of Levenshtein distances between ``word`` and each word"""
assert type(word) == str, 'Invalid type "{}" for argument `word` (expected "str")' \
.format(type(word).__name__)
assert len(word) > 0, "Cannot use empty string as word"
assert is_all_lower(word), 'Word "{}" is not all ASCII lowercase'.format(word)
assert type(dists) == list, 'Invalid type "{}" for argument `dists` (expected "list")' \
.format(type(dists).__name__)
assert len(dists) > 0, "Cannot use empty list as list of dists"
for i in range(0, len(dists)):
assert type(dists[i]) == int, 'Invalid type "{}" for list element of `dists` (expected "int")' \
.format(type(dists[i]).__name__)
assert dists[i] > 0, "Distance must be greater than 0"
dist_all = []
for node in self.split:
data = node.split(',')
dist_split = int(data[0])
first = int(data[1])
second = int(data[2])
if dist_split in dists:
correct_idx = None
if self.words_sorted[first] == word:
correct_idx = first
other_idx = second
elif self.words_sorted[second] == word:
correct_idx = second
other_idx = first
if correct_idx != None:
dist_all.append((self._word_pair(other_idx, correct_idx),
self._line_pair(other_idx, correct_idx), dist_split))
if not dist_all:
raise KeyError("word \"{}\" not found".format(word))
else:
return dist_all
| 39.051724 | 108 | 0.552208 | 2,176 | 18,120 | 4.460018 | 0.054228 | 0.030294 | 0.031736 | 0.043071 | 0.893251 | 0.875837 | 0.860175 | 0.841937 | 0.839155 | 0.827718 | 0 | 0.009739 | 0.336976 | 18,120 | 463 | 109 | 39.136069 | 0.798069 | 0.15872 | 0 | 0.838006 | 0 | 0 | 0.159417 | 0 | 0 | 0 | 0 | 0 | 0.158879 | 1 | 0.05919 | false | 0 | 0.003115 | 0.012461 | 0.124611 | 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 |
4b3683f38102ca4f32d07d76d850f67028642c6f | 2,709 | py | Python | home/views.py | sa-y-an/retro | 08177bdedf3ce6dedadb61ffd59dbacdcffee793 | [
"BSD-2-Clause"
] | null | null | null | home/views.py | sa-y-an/retro | 08177bdedf3ce6dedadb61ffd59dbacdcffee793 | [
"BSD-2-Clause"
] | null | null | null | home/views.py | sa-y-an/retro | 08177bdedf3ce6dedadb61ffd59dbacdcffee793 | [
"BSD-2-Clause"
] | null | null | null | from django.http.response import HttpResponse
from django.shortcuts import render
from .classifier import nn_predictions
def home(request) :
return render(request, 'home/home.html')
def about(request) :
return render(request, 'home/about.html')
# modalities
def eda(request):
if request.method == 'POST' :
path = request.FILES['myfile'] # this is my file
ac_class, confidence_score, secs = nn_predictions(path,'EDA')
print(path)
print('here .....................')
print(ac_class, confidence_score)
return render(request, 'home/eda.html',{ "class" : ac_class, "score" : confidence_score , "path" :path , "time" : secs } )
else :
return render(request, 'home/eda.html')
def emg(request) :
if request.method == 'POST' :
path = request.FILES['myfile'] # this is my file
ac_class, confidence_score, secs = nn_predictions(path,'EMG')
print(path)
print('here .....................')
print(ac_class, confidence_score)
return render(request, 'home/emg.html',{ "class" : ac_class, "score" : confidence_score, "path" :path , "time" : secs } )
else :
return render(request, 'home/emg.html')
def ecg(request) :
if request.method == 'POST' :
path = request.FILES['myfile'] # this is my file
ac_class, confidence_score, secs = nn_predictions(path,'ECG')
print(path)
print('here .....................')
print(ac_class, confidence_score)
return render(request, 'home/ecg.html',{ "class" : ac_class, "score" : confidence_score , "path" :path, "time" : secs } )
else :
return render(request, 'home/ecg.html')
def resp(request) :
if request.method == 'POST' :
path = request.FILES['myfile'] # this is my file
ac_class, confidence_score, secs = nn_predictions(path,'Resp')
print(path)
print('here .....................')
print(ac_class, confidence_score)
return render(request, 'home/resp.html',{ "class" : ac_class, "score" : confidence_score , "path" :path , "time" : secs } )
else :
return render(request, 'home/resp.html')
def temp(request) :
if request.method == 'POST' :
path = request.FILES['myfile'] # this is my file
ac_class, confidence_score, secs = nn_predictions(path,'Temp')
print(path)
print('here .....................')
print(ac_class, confidence_score)
return render(request, 'home/temp.html',{ "class" : ac_class, "score" : confidence_score, "path" :path, "time" : secs } )
else :
return render(request, 'home/temp.html')
| 24.853211 | 133 | 0.588778 | 315 | 2,709 | 4.949206 | 0.133333 | 0.067351 | 0.146248 | 0.177037 | 0.87492 | 0.836434 | 0.801796 | 0.801796 | 0.801796 | 0.801796 | 0 | 0 | 0.241418 | 2,709 | 108 | 134 | 25.083333 | 0.758637 | 0.033223 | 0 | 0.526316 | 0 | 0 | 0.172348 | 0.040214 | 0 | 0 | 0 | 0 | 0 | 1 | 0.122807 | false | 0 | 0.052632 | 0.035088 | 0.385965 | 0.263158 | 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 |
299f87d4e784c8ee7efe696251222b0042b1d9d1 | 67 | py | Python | arcade_solutions/the_core/is_tandem_repeat.py | nickaigi/automatic-dollop | eb8222475c7871c1d5710242c5aed8c70ea0d2c8 | [
"Unlicense"
] | null | null | null | arcade_solutions/the_core/is_tandem_repeat.py | nickaigi/automatic-dollop | eb8222475c7871c1d5710242c5aed8c70ea0d2c8 | [
"Unlicense"
] | null | null | null | arcade_solutions/the_core/is_tandem_repeat.py | nickaigi/automatic-dollop | eb8222475c7871c1d5710242c5aed8c70ea0d2c8 | [
"Unlicense"
] | null | null | null | def is_tandem_repeat(s):
return s[:len(s)//2] == s[len(s)//2:]
| 22.333333 | 41 | 0.567164 | 14 | 67 | 2.571429 | 0.571429 | 0.222222 | 0.277778 | 0.333333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.035088 | 0.149254 | 67 | 2 | 42 | 33.5 | 0.596491 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 0.5 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 8 |
d9b294981a7022802a840b5274a2570a40c04422 | 27,136 | py | Python | opac/tests/test_interface_menu.py | robertatakenaka/opac | d304280d39c31317949c6c5ceaa2d4c7c33bd371 | [
"BSD-2-Clause"
] | null | null | null | opac/tests/test_interface_menu.py | robertatakenaka/opac | d304280d39c31317949c6c5ceaa2d4c7c33bd371 | [
"BSD-2-Clause"
] | null | null | null | opac/tests/test_interface_menu.py | robertatakenaka/opac | d304280d39c31317949c6c5ceaa2d4c7c33bd371 | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from flask import url_for, current_app
from flask_babelex import lazy_gettext as __
from .base import BaseTestCase
from . import utils
class MenuTestCase(BaseTestCase):
# Collection Menu
def test_alpha_link_is_selected_for_list_alpha(self):
"""
Verficamos que o link do menú "Alfabética" tem o css:
"selected" quando acessamos a view "collection_list_alpha"
"""
response = self.client.get(url_for('main.collection_list'))
self.assertStatus(response, 200)
self.assertTemplateUsed('collection/list_journal.html')
expected_anchor = '<a href="/journals/#alpha" class="tab_link">\n Lista alfab\xe9tica de peri\xf3dicos\n </a>'
self.assertIn(expected_anchor, response.data.decode('utf-8'))
def test_theme_link_is_selected_for_list_theme(self):
"""
Verficamos que o link do menú "Temática" tem o css:
"selected" quando acessamos a view "collection_list_theme"
"""
response = self.client.get(url_for('main.collection_list'))
self.assertStatus(response, 200)
self.assertTemplateUsed('collection/list_journal.html')
expected_anchor = '<a href="/journals/#theme" class="tab_link">\n Lista temática de periódicos\n </a>'
self.assertIn(expected_anchor, response.data.decode('utf-8'))
# Hamburger Menu
def test_links_in_hamburger_menu(self):
"""
no menú de hamurger, verificamos os links que apontam a views do opac
"""
with current_app.app_context():
collection = utils.makeOneCollection({'name': 'dummy collection'})
with self.client as c:
response = c.get(url_for('main.index'))
response_data = response.data.decode('utf-8')
self.assertStatus(response, 200)
expected_anchor1 = """<a href="%s">\n <strong>%s</strong>""" % (url_for('.index'), collection.name or __('NOME DA COLEÇÃO!!'))
self.assertIn(expected_anchor1, response_data)
expected_anchor2 = """<li>\n <a href="%s" class="tab_link">\n %s\n </a>\n </li>""" % (url_for('.collection_list') + '#alpha', __('Lista alfabética de periódicos'))
self.assertIn(expected_anchor2, response_data)
expected_anchor3 = """<li>\n <a href="%s" class="tab_link">\n %s\n </a>\n </li>""" % (url_for('.collection_list') + '#theme', __('Lista temática de periódicos'))
self.assertIn(expected_anchor3, response_data)
# expected_anchor4 = """<li>\n <a href="%s" class="tab_link">\n %s\n </a>\n </li>""" % (url_for('.collection_list') + '#publisher', __('Lista de periódicos por editoras'))
# self.assertIn(expected_anchor4, response_data)
expected_anchor5 = """<li>\n <a href="%s">\n %s\n </a>\n </li>""" % (current_app.config['URL_SEARCH'] + "?q=*&lang=pt&filter[in][]=" + current_app.config['OPAC_COLLECTION'], 'Busca')
self.assertIn(expected_anchor5, response_data)
expected_anchor6 = """<li>\n <a target="_blank" href="%s/?collection=%s">\n %s\n </a>\n </li>\n <li>""" % (current_app.config['METRICS_URL'], current_app.config['OPAC_COLLECTION'], __('M\xe9tricas'))
self.assertIn(expected_anchor6, response_data)
expected_anchor7 = """<a href="%s" class="onlineSubmission">\n <span class="glyphBtn infoMenu"></span>\n %s %s\n </a>""" % (url_for('.about_collection'), __('Sobre o SciELO'), collection.name)
self.assertIn(expected_anchor7, response_data)
expected_anchor8 = """<li>\n <a href="/collection/about/">\n %s\n </a>\n </li>""" % __('Contatos')
self.assertIn(expected_anchor8, response_data)
expected_anchor9 = """<a href="#">\n <strong>SciELO.org - %s</strong>\n </a>""" % __('Rede SciELO')
self.assertIn(expected_anchor9, response_data)
# rede/scielo org
expected_anchor10 = """<li>\n <a href="http://www.scielo.org/php/index.php">\n %s\n </a>\n </li>""" % __('Coleções nacionais e temáticas')
self.assertIn(expected_anchor10, response_data)
expected_anchor11 = """<li>\n <a href="http://www.scielo.org/applications/scielo-org/php/secondLevel.php?xml=secondLevelForAlphabeticList&xsl=secondLevelForAlphabeticList">\n %s\n </a>\n </li>""" % __('Lista alfabética de periódicos')
self.assertIn(expected_anchor11, response_data)
expected_anchor12 = """<li>\n <a href="http://www.scielo.org/applications/scielo-org/php/secondLevel.php?xml=secondLevelForSubjectByLetter&xsl=secondLevelForSubjectByLetter">\n %s\n </a>\n </li>""" % __('Lista de periódicos por assunto')
self.assertIn(expected_anchor12, response_data)
expected_anchor13 = """<li>\n <a href="%s">\n %s\n </a>\n </li>""" % (current_app.config['URL_SEARCH'], 'Busca')
self.assertIn(expected_anchor13, response_data)
expected_anchor14 = """<li>\n <a target="_blank" href="%s/?collection=%s">\n %s\n </a>\n </li>""" % (current_app.config['METRICS_URL'], current_app.config['OPAC_COLLECTION'], 'Métricas')
self.assertIn(expected_anchor14, response_data)
expected_anchor15 = """<li>\n <a href="http://www.scielo.org/php/level.php?lang=pt&component=56&item=9">\n %s\n </a>\n </li>""" % __('Acesso OAI e RSS')
self.assertIn(expected_anchor15, response_data)
expected_anchor16 = """<li>\n <a href="http://www.scielo.org/php/level.php?lang=pt&component=56&item=8">\n %s\n </a>\n </li>""" % __('Sobre a Rede SciELO')
self.assertIn(expected_anchor16, response_data)
expected_anchor17 = """<li>\n <a href="#">\n %s\n </a>\n </li>""" % __('Contatos')
self.assertIn(expected_anchor17, response_data)
# expected_anchor18 = u"""<li>\n <a href="#"><strong>%s</strong></a>\n </li>""" % __(u'Portal do Autor')
# self.assertIn(expected_anchor18, response_data)
def test_blog_link_in_hamburger_menu(self):
"""
Verificamos que o link para o blog em perspectiva fique
apontando ao link certo considerando o idioma da sessão
"""
with current_app.app_context():
utils.makeOneCollection({'name': 'dummy collection'})
with self.client as c:
# idioma em 'pt_br'
response = c.get(
url_for('main.set_locale', lang_code='pt_BR'),
headers={'Referer': '/'},
follow_redirects=True)
self.assertStatus(response, 200)
expected_anchor = '<a href="http://blog.scielo.org/">'
self.assertIn(expected_anchor, response.data.decode('utf-8'))
# idioma em 'en'
response = c.get(
url_for('main.set_locale', lang_code='en'),
headers={'Referer': '/'},
follow_redirects=True)
self.assertStatus(response, 200)
expected_anchor = '<a href="http://blog.scielo.org/en/">'
self.assertIn(expected_anchor, response.data.decode('utf-8'))
# idioma em 'es'
response = c.get(
url_for('main.set_locale', lang_code='es'),
headers={'Referer': '/'},
follow_redirects=True)
self.assertStatus(response, 200)
expected_anchor = '<a href="http://blog.scielo.org/es/">'
self.assertIn(expected_anchor, response.data.decode('utf-8'))
# Journal Menu
def test_journal_detail_menu(self):
"""
Teste para verificar se os botões estão ``anterior``, ``atual``,
``próximo`` estão disponíveis no ``journal/detail.html``
"""
journal = utils.makeOneJournal()
with current_app.app_context():
# Criando uma coleção para termos o objeto ``g`` na interface
utils.makeOneCollection()
utils.makeOneIssue({
'journal': journal,
'year': '2016', 'volume': '1',
'number': '1', 'order': '1',
})
issue2 = utils.makeOneIssue({
'journal': journal,
'year': '2016', 'volume': '1',
'number': '2', 'order': '2',
})
issue3 = utils.makeOneIssue({
'journal': journal,
'year': '2016', 'volume': '1',
'number': '3', 'order': '3',
})
response = self.client .get(
url_for('main.journal_detail', url_seg=journal.url_segment))
self.assertStatus(response, 200)
self.assertTemplateUsed('journal/detail.html')
expect_btn_anterior = '<a href="%s" class="btn group">' % url_for(
'.issue_toc', url_seg=journal.url_segment, url_seg_issue=issue2.url_segment) # número anterior
expect_btn_atual = '<a href="%s" class="btn group ">' % url_for(
'.issue_toc', url_seg=journal.url_segment, url_seg_issue=issue3.url_segment) # número atual
expect_btn_proximo = '<a href="#" class="btn group disabled">' # número seguinte
expected_btns = [expect_btn_anterior, expect_btn_atual, expect_btn_proximo]
# Verificar se todos os btns do menu estão presentes no HTML da resposta
for btn in expected_btns:
self.assertIn(btn, response.data.decode('utf-8'))
def test_journal_detail_menu_without_issues(self):
"""
Teste para verificar se os botões estão ``anterior``, ``atual``,
``próximo`` estão disponíveis no ``jorunal/detail.html`` quando o periódico
não tem número.
"""
journal = utils.makeOneJournal()
with current_app.app_context():
# Criando uma coleção para termos o objeto ``g`` na interface
utils.makeOneCollection()
response = self.client.get(url_for('main.journal_detail',
url_seg=journal.url_segment))
self.assertStatus(response, 200)
self.assertTemplateUsed('journal/detail.html')
expect_btn_anterior = '<a href="#" class="btn group disabled">' # número seguinte
expect_btn_atual = '<a href="#" class="btn group disabled">' # número atual
expect_btn_proximo = '<a href="#" class="btn group disabled">' # número anterior
expected_btns = [expect_btn_anterior, expect_btn_atual, expect_btn_proximo]
# Verificar se todos os btns do menu estão presentes no HTML da resposta
response_data = response.data.decode('utf-8')
for btn in expected_btns:
self.assertIn(btn, response_data)
def test_journal_detail_menu_with_one_issue(self):
"""
Teste para verificar se os botões estão ``anterior``, ``atual``,
``próximo`` estão disponíveis no ``jorunal/detail.html`` quando o periódico
tem um número o botão ``próximo`` e ``anterior`` deve vir desabilitados.
"""
journal = utils.makeOneJournal()
with current_app.app_context():
# Criando uma coleção para termos o objeto ``g`` na interface
utils.makeOneCollection()
issue = utils.makeOneIssue({
'journal': journal,
'year': '2016', 'volume': '1',
'number': '1', 'order': '1',
})
response = self.client.get(url_for('main.journal_detail',
url_seg=journal.url_segment))
self.assertStatus(response, 200)
self.assertTemplateUsed('journal/detail.html')
expect_btn_anterior = '<a href="#" class="btn group disabled">' # número anterior
expect_btn_atual = '<a href="%s" class="btn group ">' % url_for(
'.issue_toc', url_seg=journal.url_segment, url_seg_issue=issue.url_segment) # número atual
expect_btn_proximo = '<a href="#" class="btn group disabled">' # número seguinte
expected_btns = [expect_btn_anterior, expect_btn_atual, expect_btn_proximo]
# Verificar se todos os btns do menu estão presentes no HTML da resposta
response_data = response.data.decode('utf-8')
for btn in expected_btns:
self.assertIn(btn, response_data)
def test_journal_detail_menu_access_issue_toc_on_any_issue(self):
"""
Teste para verificar se os botões estão ``anterior``, ``atual``,
``próximo`` estão disponíveis no ``jorunal/detail.html``, quando acessamos
qualquer número.
"""
with current_app.app_context():
# Criando uma coleção para termos o objeto ``g`` na interface
utils.makeOneCollection()
journal = utils.makeOneJournal()
issue1 = utils.makeOneIssue({'journal': journal,
'year': '2016', 'volume': '1',
'number': '1', 'order': '1', })
issue2 = utils.makeOneIssue({'journal': journal,
'year': '2016', 'volume': '1',
'number': '2', 'order': '2', })
issue3 = utils.makeOneIssue({'journal': journal,
'year': '2016', 'volume': '1',
'number': '3', 'order': '3', })
issue_toc_url = url_for(
'main.issue_toc',
url_seg=journal.url_segment,
url_seg_issue=issue2.url_segment)
response = self.client .get(issue_toc_url)
self.assertStatus(response, 200)
self.assertTemplateUsed('issue/toc.html')
expect_btn_anterior = '<a href="%s" class="btn group">' % url_for(
'.issue_toc', url_seg=journal.url_segment, url_seg_issue=issue1.url_segment) # número anterior
expect_btn_atual = '<a href="%s" class="btn group ">' % url_for(
'.issue_toc', url_seg=journal.url_segment, url_seg_issue=issue3.url_segment) # número atual
expect_btn_proximo = '<a href="%s" class="btn group">' % url_for(
'.issue_toc', url_seg=journal.url_segment, url_seg_issue=issue3.url_segment) # número seguinte
expected_btns = [expect_btn_anterior, expect_btn_atual, expect_btn_proximo]
# Verificar se todos os btns do menu estão presentes no HTML da resposta
response_data = response.data.decode('utf-8')
for btn in expected_btns:
self.assertIn(btn, response_data)
def test_journal_detail_menu_access_issue_toc_lastest_issue(self):
"""
Teste para verificar se os botões estão ``anterior``, ``atual``,
``próximo`` estão disponíveis no ``jorunal/detail.html``, quando acessamos
o número mais recente.
"""
journal = utils.makeOneJournal()
with current_app.app_context():
# Criando uma coleção para termos o objeto ``g`` na interface
utils.makeOneCollection()
utils.makeOneIssue({
'journal': journal,
'year': '2016', 'volume': '1',
'number': '1', 'order': '1',
})
issue2 = utils.makeOneIssue({
'journal': journal,
'year': '2016', 'volume': '1',
'number': '2', 'order': '2'
})
issue3 = utils.makeOneIssue({
'journal': journal,
'year': '2016', 'volume': '1',
'number': '3', 'order': '3'
})
issue_toc_url = url_for(
'main.issue_toc',
url_seg=journal.url_segment,
url_seg_issue=issue3.url_segment)
response = self.client.get(issue_toc_url)
self.assertStatus(response, 200)
self.assertTemplateUsed('issue/toc.html')
expect_btn_anterior = '<a href="%s" class="btn group">' % url_for(
'.issue_toc', url_seg=journal.url_segment, url_seg_issue=issue2.url_segment) # número anterior
expect_btn_atual = '<a href="%s" class="btn group selected ">' % url_for(
'.issue_toc', url_seg=journal.url_segment, url_seg_issue=issue3.url_segment) # número atual
expect_btn_proximo = '<a href="#" class="btn group disabled">' # número seguinte
expected_btns = [expect_btn_anterior, expect_btn_atual, expect_btn_proximo]
# Verificar se todos os btns do menu estão presentes no HTML da resposta
for btn in expected_btns:
self.assertIn(btn, response.data.decode('utf-8'))
def test_journal_detail_menu_access_issue_toc_oldest_issue(self):
"""
Teste para verificar se os botões estão ``anterior``, ``atual``,
``próximo`` estão disponíveis no ``jorunal/detail.html``, quando acessamos
o número mais antigo.
"""
journal = utils.makeOneJournal()
with current_app.app_context():
# Criando uma coleção para termos o objeto ``g`` na interface
utils.makeOneCollection()
issue1 = utils.makeOneIssue({'journal': journal,
'year': '2016', 'volume': '1',
'number': '1', 'order': '1', })
issue2 = utils.makeOneIssue({'journal': journal,
'year': '2016', 'volume': '1',
'number': '2', 'order': '2', })
issue3 = utils.makeOneIssue({'journal': journal,
'year': '2016', 'volume': '1',
'number': '3', 'order': '3', })
response = self.client.get(url_for('main.issue_toc',
url_seg=journal.url_segment,
url_seg_issue=issue1.url_segment))
self.assertStatus(response, 200)
self.assertTemplateUsed('issue/toc.html')
expect_btn_anterior = '<a href="#" class="btn group disabled">' # número anterior
expect_btn_atual = '<a href="%s" class="btn group ">' % url_for(
'.issue_toc', url_seg=journal.url_segment, url_seg_issue=issue3.url_segment) # número atual
expect_btn_proximo = '<a href="%s" class="btn group">' % url_for(
'.issue_toc', url_seg=journal.url_segment, url_seg_issue=issue2.url_segment) # número seguinte
expected_btns = [expect_btn_anterior, expect_btn_atual, expect_btn_proximo]
# Verificar se todos os btns do menu estão presentes no HTML da resposta
for btn in expected_btns:
self.assertIn(btn, response.data.decode('utf-8'))
# Article Menu
def test_article_detail_menu(self):
"""
Teste para verificar se os botões estão ``anterior``, ``atual``,
``próximo`` estão disponíveis no ``article/detail.html``.
"""
with current_app.app_context():
# Criando uma coleção para termos o objeto ``g`` na interface
utils.makeOneCollection()
journal = utils.makeOneJournal()
issue = utils.makeOneIssue({
'journal': journal,
'year': '2016',
'volume': '1',
'number': '1',
'order': '1',
})
article1 = utils.makeOneArticle({
'issue': issue,
'order': 1,
'elocation': 'e1234560'
})
article2 = utils.makeOneArticle({
'issue': issue,
'order': 2,
'elocation': 'e1234561'
})
article3 = utils.makeOneArticle({
'issue': issue,
'order': 3,
'elocation': 'e1234562'
})
article_detail_url = url_for(
'main.article_detail',
url_seg=journal.url_segment,
url_seg_issue=issue.url_segment,
url_seg_article=article2.url_segment)
response = self.client.get(article_detail_url)
self.assertStatus(response, 200)
self.assertTemplateUsed('article/detail.html')
expect_btn_anterior = '<a href="%s" class="btn group">' % url_for(
'.article_detail',
url_seg=journal.url_segment,
url_seg_issue=issue.url_segment,
url_seg_article=article1.url_segment) # artigo anterior
expect_btn_atual = '<a href="#" class="btn group disabled">' # número atual
expect_btn_proximo = '<a href="%s" class="btn group">' % url_for(
'.article_detail',
url_seg=journal.url_segment,
url_seg_issue=issue.url_segment,
url_seg_article=article3.url_segment) # artigo seguinte
expected_btns = [expect_btn_anterior, expect_btn_atual, expect_btn_proximo]
# Verificar se todos os btns do menu estão presentes no HTML da resposta
for btn in expected_btns:
self.assertIn(btn, response.data.decode('utf-8'))
def test_article_detail_menu_when_last_article(self):
"""
Teste para verificar se os botões estão ``anterior``, ``atual``,
``próximo`` estão disponíveis no ``article/detail.html`` quando é o
último artigo. O botão próximo deve esta desativado.
"""
journal = utils.makeOneJournal()
with current_app.app_context():
# Criando uma coleção para termos o objeto ``g`` na interface
utils.makeOneCollection()
issue = utils.makeOneIssue({
'journal': journal,
'year': '2016',
'volume': '1',
'number': '1',
'order': '1'
})
utils.makeOneArticle({
'issue': issue,
'order': 1,
'elocation': 'e1234562'
})
article2 = utils.makeOneArticle({
'issue': issue,
'order': 2,
'elocation': 'e1234562'
})
article3 = utils.makeOneArticle({
'issue': issue,
'order': 3,
'elocation': 'e1234562'
})
article_detail_url = url_for(
'main.article_detail',
url_seg=journal.url_segment,
url_seg_issue=issue.url_segment,
url_seg_article=article3.url_segment)
response = self.client.get(article_detail_url)
self.assertStatus(response, 200)
self.assertTemplateUsed('article/detail.html')
expect_btn_anterior = '<a href="#" class="btn group disabled">' # artigo anterior
expect_btn_atual = '<a href="#" class="btn group disabled">' # número atual
expect_btn_proximo = '<a href="%s" class="btn group">' % url_for(
'.article_detail',
url_seg=journal.url_segment,
url_seg_issue=issue.url_segment,
url_seg_article=article2.url_segment) # artigo seguinte
expected_btns = [expect_btn_anterior, expect_btn_atual, expect_btn_proximo]
# Verificar se todos os btns do menu estão presentes no HTML da resposta
for btn in expected_btns:
self.assertIn(btn, response.data.decode('utf-8'))
def test_article_detail_menu_when_first_article(self):
"""
Teste para verificar se os botões estão ``anterior``, ``atual``,
``próximo`` estão disponíveis no ``article/detail.html`` quando é o
primeiro artigo. O botão anterior deve esta desativado.
"""
journal = utils.makeOneJournal()
with current_app.app_context():
# Criando uma coleção para termos o objeto ``g`` na interface
utils.makeOneCollection()
issue = utils.makeOneIssue({
'journal': journal,
'year': '2016', 'volume': '1',
'number': '1', 'order': '1'
})
article1 = utils.makeOneArticle({
'issue': issue,
'order': 1,
'elocation': 'e1234562'
})
article2 = utils.makeOneArticle({
'issue': issue,
'order': 2,
'elocation': 'e1234562'
})
utils.makeOneArticle({
'issue': issue,
'order': 3,
'elocation': 'e1234562'
})
article_detail_url = url_for(
'main.article_detail',
url_seg=journal.url_segment,
url_seg_issue=issue.url_segment,
url_seg_article=article1.url_segment)
response = self.client.get(article_detail_url)
self.assertStatus(response, 200)
self.assertTemplateUsed('article/detail.html')
expect_btn_anterior = '<a href="#" class="btn group disabled">' # artigo anterior
expect_btn_atual = '<a href="#" class="btn group disabled">' # número atual
expect_btn_proximo = '<a href="%s" class="btn group">' % url_for(
'.article_detail',
url_seg=journal.url_segment,
url_seg_issue=issue.url_segment,
url_seg_article=article2.url_segment) # artigo seguinte
expected_btns = [
expect_btn_anterior,
expect_btn_atual,
expect_btn_proximo
]
# Verificar se todos os btns do menu estão presentes no HTML da resposta
for btn in expected_btns:
self.assertIn(btn, response.data.decode('utf-8'))
| 45.683502 | 289 | 0.542858 | 2,857 | 27,136 | 4.953098 | 0.093105 | 0.034344 | 0.024804 | 0.030528 | 0.843121 | 0.825383 | 0.817963 | 0.803123 | 0.797329 | 0.792029 | 0 | 0.019061 | 0.334943 | 27,136 | 593 | 290 | 45.76054 | 0.765058 | 0.147995 | 0 | 0.776596 | 0 | 0.042553 | 0.225707 | 0.010483 | 0 | 0 | 0 | 0.015177 | 0.148936 | 1 | 0.034574 | false | 0 | 0.010638 | 0 | 0.047872 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
d9ccff84791ea6e6fc0c23bbb7acc235500c1caa | 150,940 | py | Python | leo/unittests/commands/test_editCommands.py | tbpassin/leo-editor | ee0a3334b466f6c6a260a62e8be0e90de0cb7156 | [
"MIT"
] | null | null | null | leo/unittests/commands/test_editCommands.py | tbpassin/leo-editor | ee0a3334b466f6c6a260a62e8be0e90de0cb7156 | [
"MIT"
] | null | null | null | leo/unittests/commands/test_editCommands.py | tbpassin/leo-editor | ee0a3334b466f6c6a260a62e8be0e90de0cb7156 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#@+leo-ver=5-thin
#@+node:ekr.20201202144422.1: * @file ../unittests/commands/test_editCommands.py
#@@first
"""Tests for leo.commands.editCommands"""
import textwrap
import unittest
from leo.core import leoGlobals as g
from leo.core import leoTest2
class EditCommandsTest(unittest.TestCase):
"""Unit tests for leo/commands/editCommands.py."""
# For pylint.
before_p = after_p = parent_p = tempNode = None
#@+others
#@+node:ekr.20201129161726.5: ** EditCommandsTest.run_test
def run_test(self,
before_b, after_b, # before/after body text.
before_sel, after_sel, # before and after selection ranges.
command_name,
directives=''
):
c = self.c
# For shortDescription().
self.command_name = command_name
# Compute the result in tempNode.b
command = c.commandsDict.get(command_name)
assert command, f"no command: {command_name}"
# Set the text.
parent_b = textwrap.dedent(directives)
before_b = textwrap.dedent(before_b)
after_b = textwrap.dedent(after_b)
self.parent_p.b = parent_b
self.tempNode.b = before_b
self.before_p.b = before_b
self.after_p.b = after_b
# Set the selection range and insert point.
w = c.frame.body.wrapper
i, j = before_sel
i = g.toPythonIndex(before_b, i)
j = g.toPythonIndex(before_b, j)
w.setSelectionRange(i, j, insert=j)
# Run the command!
c.k.simulateCommand(command_name)
s1 = self.tempNode.b
s2 = self.after_p.b
if s1 != s2: # pragma: no cover
print('mismatch in body')
g.printObj(g.splitLines(s2), tag='expected')
g.printObj(g.splitLines(s1), tag='got')
print('parent_p.b', repr(self.parent_p.b))
assert False
if 0: ### Not ready yet.
sel3 = w.getSelectionRange()
# Convert both selection ranges to gui indices.
### sel1 = before_sel
sel2 = after_sel
sel2_orig = sel2
assert len(sel2) == 2, f"Bad headline index. Expected index,index. got: {sel2}"
i, j = sel2; sel2 = w.toPythonIndex(i), w.toPythonIndex(j)
assert len(sel3) == 2, f"Bad headline index. Expected index,index. got: {sel3}"
i, j = sel3; sel3 = w.toPythonIndex(i), w.toPythonIndex(j)
if 0: # Be more permissive.
if sel2 != sel3:
print(f"\n{c.p.h}\nexpected: {sel2_orig} = {sel2}, got: {sel3}")
else:
message = f"mismatch in sel\nexpected: {sel2_orig} = {sel2}, got: {sel3}"
assert sel2 == sel3, message
# c.selectPosition(atTest)
# atTest.contract()
# Don't redraw.
# if 0: # Not correct!
# def compare(before, after, report):
# return self.compareOutlines(before, after, compareHeadlines=False, report=report)
# # Call the undoer only if we expect a change.
# same = compare(self.before_p, self.after_p, False)
# if same:
# return
# # These never test the resulting selection range or insert point.
# ok = compare(self.tempNode, self.after_p, True)
# assert ok, f"{command_name}: before undo1"
# u.undo()
# ok = compare(self.tempNode, self.before_p, True)
# assert ok, f"{command_name}: after undo1"
# u.redo()
# ok = compare(self.tempNode, self.after_p, True)
# assert ok, f"{command_name}: after redo1"
# u.undo()
# ok = compare(self.tempNode, self.before_p, True)
# assert ok, f"{command_name}: after undo2"
#@+node:ekr.20201201084621.1: ** EditCommandsTest.setUp & tearDown
def setUp(self):
"""Create the nodes in the commander."""
# Create a new commander for each test.
# This is fast, because setUpClass has done all the imports.
from leo.core import leoCommands
self.c = c = leoCommands.Commands(fileName=None, gui=g.app.gui)
# Create top-level parent node.
root = c.rootPosition()
self.parent_p = root.insertAsLastChild()
# Create children of the parent node.
self.tempNode = self.parent_p.insertAsLastChild()
self.before_p = self.parent_p.insertAsLastChild()
self.after_p = self.parent_p.insertAsLastChild()
self.tempNode.h = 'tempNode'
self.before_p.h = 'before'
self.after_p.h = 'after'
c.selectPosition(self.tempNode)
def tearDown(self):
self.c = None
#@+node:ekr.20201201084702.1: ** EditCommandsTest.setUpClass
@classmethod
def setUpClass(cls):
leoTest2.create_app()
#@+node:ekr.20201130091020.1: ** EditCommandTest: test cases...
#@+node:ekr.20201130090918.1: *3* add-space-to-lines
def test_add_space_to_lines(self):
"""Test case for add-space-to-lines"""
before_b = """\
first line
line 1
line a
line b
last line
"""
after_b = """\
first line
line 1
line a
line b
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.0", "4.6"),
after_sel=("2.0", "4.7"),
command_name="add-space-to-lines",
)
#@+node:ekr.20201130090918.2: *3* add-tab-to-lines
def test_add_tab_to_lines(self):
"""Test case for add-tab-to-lines"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.0", "5.6"),
after_sel=("2.0", "5.10"),
command_name="add-tab-to-lines",
)
#@+node:ekr.20201130090918.3: *3* back-char
def test_back_char(self):
"""Test case for back-char"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.8", "3.8"),
after_sel=("3.7", "3.7"),
command_name="back-char",
)
#@+node:ekr.20201130090918.4: *3* back-char-extend-selection
def test_back_char_extend_selection(self):
"""Test case for back-char-extend-selection"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("4.12", "4.12"),
after_sel=("4.11", "4.12"),
command_name="back-char-extend-selection",
)
#@+node:ekr.20201130090918.5: *3* back-paragraph
def test_back_paragraph(self):
"""Test case for back-paragraph"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("9.0", "9.0"),
after_sel=("6.7", "6.7"),
command_name="back-paragraph",
)
#@+node:ekr.20201130090918.6: *3* back-paragraph-extend-selection
def test_back_paragraph_extend_selection(self):
"""Test case for back-paragraph-extend-selection"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("9.0", "9.5"),
after_sel=("6.7", "9.5"),
command_name="back-paragraph-extend-selection",
)
#@+node:ekr.20201130090918.7: *3* back-sentence
def test_back_sentence(self):
"""Test case for back-sentence"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.169", "3.169"),
after_sel=("3.143", "3.143"),
command_name="back-sentence",
)
#@+node:ekr.20201130090918.8: *3* back-sentence-extend-selection
def test_back_sentence_extend_selection(self):
"""Test case for back-sentence-extend-selection"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.208", "3.208"),
after_sel=("3.143", "3.208"),
command_name="back-sentence-extend-selection",
)
#@+node:ekr.20201130090918.12: *3* back-to-home (at end of line)
def test_back_to_home_at_end_of_line(self):
"""Test case for back-to-home (at end of line)"""
before_b = """\
if a:
b = 'xyz'
"""
after_b = """\
if a:
b = 'xyz'
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.12", "2.12"),
after_sel=("2.4", "2.4"),
command_name="back-to-home",
)
#@+node:ekr.20201130090918.11: *3* back-to-home (at indentation
def test_back_to_home_at_indentation(self):
"""Test case for back-to-home (at indentation"""
before_b = """\
if a:
b = 'xyz'
"""
after_b = """\
if a:
b = 'xyz'
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.4", "2.4"),
after_sel=("2.0", "2.0"),
command_name="back-to-home",
)
#@+node:ekr.20201130090918.10: *3* back-to-home (at start of line)
def test_back_to_home_at_start_of_line(self):
"""Test case for back-to-home (at start of line)"""
before_b = """\
if a:
b = 'xyz'
"""
after_b = """\
if a:
b = 'xyz'
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.0", "2.0"),
after_sel=("2.4", "2.4"),
command_name="back-to-home",
)
#@+node:ekr.20201130090918.9: *3* back-to-indentation
def test_back_to_indentation(self):
"""Test case for back-to-indentation"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("4.13", "4.13"),
after_sel=("4.8", "4.8"),
command_name="back-to-indentation",
)
#@+node:ekr.20201130090918.13: *3* back-word
def test_back_word(self):
"""Test case for back-word"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.183", "1.183"),
after_sel=("1.178", "1.178"),
command_name="back-word",
)
#@+node:ekr.20201130090918.14: *3* back-word-extend-selection
def test_back_word_extend_selection(self):
"""Test case for back-word-extend-selection"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.342", "3.342"),
after_sel=("3.332", "3.342"),
command_name="back-word-extend-selection",
)
#@+node:ekr.20201130090918.15: *3* backward-delete-char
def test_backward_delete_char(self):
"""Test case for backward-delete-char"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first lie
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.9", "1.9"),
after_sel=("1.8", "1.8"),
command_name="backward-delete-char",
)
#@+node:ekr.20201130090918.16: *3* backward-delete-char (middle of line)
def test_backward_delete_char__middle_of_line(self):
"""Test case for backward-delete-char (middle of line)"""
before_b = """\
first line
last line
"""
after_b = """\
firstline
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.6", "1.6"),
after_sel=("1.5", "1.5"),
command_name="backward-delete-char",
)
#@+node:ekr.20201130090918.17: *3* backward-delete-char (last char)
def test_backward_delete_char_last_char(self):
"""Test case for backward-delete-char (last char)"""
before_b = """\
first line
last line
"""
after_b = """\
first line
last lin
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.9", "2.9"),
after_sel=("2.8", "2.8"),
command_name="backward-delete-char",
)
#@+node:ekr.20201130090918.18: *3* backward-delete-word (no selection)
def test_backward_delete_word_no_selection(self):
"""Test case for backward-delete-word (no selection)"""
before_b = """\
aaaa bbbb cccc dddd
"""
after_b = """\
aaaa cccc dddd
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.10", "1.10"),
after_sel=("1.5", "1.5"),
command_name="backward-delete-word",
)
#@+node:ekr.20201130090918.19: *3* backward-delete-word (selection)
def test_backward_delete_word_selection(self):
"""Test case for backward-delete-word (selection)"""
before_b = """\
aaaa bbbb cccc dddd
"""
after_b = """\
aaaa bbcc dddd
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.7", "1.12"),
after_sel=("1.7", "1.7"),
command_name="backward-delete-word",
)
#@+node:ekr.20201130090918.20: *3* backward-kill-paragraph
def test_backward_kill_paragraph(self):
"""Test case for backward-kill-paragraph"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("9.0", "9.0"),
after_sel=("7.0", "7.0"),
command_name="backward-kill-paragraph",
)
#@+node:ekr.20201130090918.21: *3* backward-kill-sentence
def test_backward_kill_sentence(self):
"""Test case for backward-kill-sentence"""
before_b = """\
This is the first sentence. This
is the second sentence. And
this is the last sentence.
"""
after_b = """\
This is the first sentence. This
is the second sentence.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.2", "3.2"),
after_sel=("2.23", "2.23"),
command_name="backward-kill-sentence",
)
#@+node:ekr.20201130090918.22: *3* backward-kill-word
def test_backward_kill_word(self):
"""Test case for backward-kill-word"""
before_b = """\
This is the first sentence. This
is the second sentence. And
this is the last sentence.
"""
after_b = """\
This is the first sentence. This
is the second sentence. And
this the last sentence.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.7", "3.7"),
after_sel=("3.5", "3.5"),
command_name="backward-kill-word",
)
#@+node:ekr.20201130090918.23: *3* beginning-of-buffer
def test_beginning_of_buffer(self):
"""Test case for beginning-of-buffer"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("5.56", "5.56"),
after_sel=("1.0", "1.0"),
command_name="beginning-of-buffer",
)
#@+node:ekr.20201130090918.24: *3* beginning-of-buffer-extend-selection
def test_beginning_of_buffer_extend_selection(self):
"""Test case for beginning-of-buffer-extend-selection"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.423", "3.423"),
after_sel=("1.0", "3.423"),
command_name="beginning-of-buffer-extend-selection",
)
#@+node:ekr.20201130090918.25: *3* beginning-of-line
def test_beginning_of_line(self):
"""Test case for beginning-of-line"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.10", "3.10"),
after_sel=("3.0", "3.0"),
command_name="beginning-of-line",
)
#@+node:ekr.20201130090918.26: *3* beginning-of-line-extend-selection
def test_beginning_of_line_extend_selection(self):
"""Test case for beginning-of-line-extend-selection"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("4.10", "4.10"),
after_sel=("4.0", "4.10"),
command_name="beginning-of-line-extend-selection",
)
#@+node:ekr.20201130090918.27: *3* capitalize-word
def test_capitalize_word(self):
"""Test case for capitalize-word"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
Line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.6", "3.6"),
after_sel=("3.6", "3.6"),
command_name="capitalize-word",
)
#@+node:ekr.20201130090918.28: *3* center-line
def test_center_line(self):
"""Test case for center-line"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related,
leading to around 500 deaths per year and nearly $14 billion in damage.
StormReady, a program started in 1999 in Tulsa, OK,
helps arm America's communities with the communication and safety
skills needed to save lives and property– before and during the event.
StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related,
leading to around 500 deaths per year and nearly $14 billion in damage.
StormReady, a program started in 1999 in Tulsa, OK,
helps arm America's communities with the communication and safety
skills needed to save lives and property– before and during the event.
StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.0", "9.0"),
after_sel=("3.0", "9.0"),
command_name="center-line",
)
#@+node:ekr.20201130090918.29: *3* center-region
def test_center_region(self):
"""Test case for center-region"""
before_b = """\
Some 90% of all presidentially declared disasters are weather related,
leading to around 500 deaths per year and nearly $14 billion in damage.
StormReady, a program started in 1999 in Tulsa, OK,
helps arm America's communities with the communication and safety
skills needed to save lives and property– before and during the event.
StormReady helps community leaders and emergency managers strengthen local safety programs.
"""
after_b = """\
Some 90% of all presidentially declared disasters are weather related,
leading to around 500 deaths per year and nearly $14 billion in damage.
StormReady, a program started in 1999 in Tulsa, OK,
helps arm America's communities with the communication and safety
skills needed to save lives and property– before and during the event.
StormReady helps community leaders and emergency managers strengthen local safety programs.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "7.0"),
after_sel=("1.0", "7.0"),
command_name="center-region",
directives="@pagewidth 70",
)
#@+node:ekr.20201130090918.30: *3* clean-lines
def test_clean_lines(self):
"""Test case for clean-lines"""
before_b = """\
# Should remove all trailing whitespace.
a = 2
b = 3
c = 4
d = 5
e = 6
x
"""
after_b = """\
# Should remove all trailing whitespace.
a = 2
b = 3
c = 4
d = 5
e = 6
x
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.0"),
after_sel=("1.0", "1.0"),
command_name="clean-lines",
)
#@+node:ekr.20201130090918.31: *3* clear-selected-text
def test_clear_selected_text(self):
"""Test case for clear-selected-text"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.4", "4.4"),
after_sel=("2.4", "2.4"),
command_name="clear-selected-text",
)
#@+node:ekr.20201130090918.32: *3* count-region
def test_count_region(self):
"""Test case for count-region"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.4", "4.8"),
after_sel=("2.4", "4.8"),
command_name="count-region",
)
#@+node:ekr.20201130090918.33: *3* delete-char
def test_delete_char(self):
"""Test case for delete-char"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
firstline
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.5", "1.5"),
after_sel=("1.5", "1.5"),
command_name="delete-char",
)
#@+node:ekr.20201130090918.34: *3* delete-indentation
def test_delete_indentation(self):
"""Test case for delete-indentation"""
before_b = """\
first line
line 1
last line
"""
after_b = """\
first line
line 1
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.8", "2.8"),
after_sel=("2.4", "2.4"),
command_name="delete-indentation",
)
#@+node:ekr.20201130090918.35: *3* delete-spaces
def test_delete_spaces(self):
"""Test case for delete-spaces"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.2", "3.2"),
after_sel=("3.0", "3.0"),
command_name="delete-spaces",
)
#@+node:ekr.20201130090918.36: *3* do-nothing
def test_do_nothing(self):
"""Test case for do-nothing"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.0"),
after_sel=("1.0", "1.0"),
command_name="do-nothing",
)
#@+node:ekr.20201130090918.37: *3* downcase-region
def test_downcase_region(self):
"""Test case for downcase-region"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. stormready, a program started in 1999 in tulsa, ok, helps arm america's communities with the communication and safety skills needed to save lives and property– before and during the event. stormready helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.0", "4.0"),
after_sel=("3.0", "4.0"),
command_name="downcase-region",
)
#@+node:ekr.20201130090918.38: *3* downcase-word
def test_downcase_word(self):
"""Test case for downcase-word"""
before_b = """\
XYZZY line
line 1
line a
line b
line c
last line
"""
after_b = """\
xyzzy line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.4", "1.4"),
after_sel=("1.4", "1.4"),
command_name="downcase-word",
)
#@+node:ekr.20201130090918.39: *3* end-of-buffer
def test_end_of_buffer(self):
"""Test case for end-of-buffer"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.3", "1.3"),
after_sel=("7.0", "7.0"),
command_name="end-of-buffer",
)
#@+node:ekr.20201130090918.40: *3* end-of-buffer-extend-selection
def test_end_of_buffer_extend_selection(self):
"""Test case for end-of-buffer-extend-selection"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.0"),
after_sel=("1.0", "7.0"),
command_name="end-of-buffer-extend-selection",
)
#@+node:ekr.20201130090918.41: *3* end-of-line
def test_end_of_line(self):
"""Test case for end-of-line"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.0"),
after_sel=("1.10", "1.10"),
command_name="end-of-line",
)
#@+node:ekr.20201130090918.44: *3* end-of-line (blank last line)
def test_end_of_line_blank_last_line(self):
"""Test case for end-of-line (blank last line)"""
before_b = """\
first line
line 1
line a
line b
line c
last non-blank line
"""
after_b = """\
first line
line 1
line a
line b
line c
last non-blank line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("7.0", "7.0"),
after_sel=("7.0", "7.0"),
command_name="end-of-line",
)
#@+node:ekr.20201130090918.43: *3* end-of-line (internal blank line)
def test_end_of_line_internal_blank_line(self):
"""Test case for end-of-line (internal blank line)"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.0", "2.0"),
after_sel=("2.0", "2.0"),
command_name="end-of-line",
)
#@+node:ekr.20201130090918.45: *3* end-of-line (single char last line)
def test_end_of_line_single_char_last_line(self):
"""Test case for end-of-line (single char last line)"""
before_b = """\
first line
line 1
line a
line b
line c
last non-blank line
"""
after_b = """\
first line
line 1
line a
line b
line c
last non-blank line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("7.0", "7.0"),
after_sel=("7.1", "7.1"),
command_name="end-of-line",
)
#@+node:ekr.20201130090918.42: *3* end-of-line 2
def test_end_of_line_2(self):
"""Test case for end-of-line 2"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("6.0", "6.0"),
after_sel=("6.9", "6.9"),
command_name="end-of-line",
)
#@+node:ekr.20201130090918.46: *3* end-of-line-extend-selection
def test_end_of_line_extend_selection(self):
"""Test case for end-of-line-extend-selection"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.0", "3.0"),
after_sel=("3.0", "3.10"),
command_name="end-of-line-extend-selection",
)
#@+node:ekr.20201130090918.47: *3* end-of-line-extend-selection (blank last line)
def test_end_of_line_extend_selection_blank_last_line(self):
"""Test case for end-of-line-extend-selection (blank last line)"""
before_b = """\
first line
line 1
line a
line b
line c
last non-blank line
"""
after_b = """\
first line
line 1
line a
line b
line c
last non-blank line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("7.0", "7.0"),
after_sel=("7.0", "7.0"),
command_name="end-of-line-extend-selection",
)
#@+node:ekr.20201130090918.48: *3* exchange-point-mark
def test_exchange_point_mark(self):
"""Test case for exchange-point-mark"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.10"),
after_sel=("1.0", "1.10"),
command_name="exchange-point-mark",
)
#@+node:ekr.20201130090918.49: *3* extend-to-line
def test_extend_to_line(self):
"""Test case for extend-to-line"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.3", "3.3"),
after_sel=("3.0", "3.10"),
command_name="extend-to-line",
)
#@+node:ekr.20201130090918.50: *3* extend-to-paragraph
def test_extend_to_paragraph(self):
"""Test case for extend-to-paragraph"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("9.0", "9.0"),
after_sel=("8.0", "13.33"),
command_name="extend-to-paragraph",
)
#@+node:ekr.20201130090918.51: *3* extend-to-sentence
def test_extend_to_sentence(self):
"""Test case for extend-to-sentence"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.5", "3.5"),
after_sel=("1.395", "3.142"),
command_name="extend-to-sentence",
)
#@+node:ekr.20201130090918.52: *3* extend-to-word
def test_extend_to_word(self):
"""Test case for extend-to-word"""
before_b = """\
first line
line 1
line_24a a
line b
line c
last line
"""
after_b = """\
first line
line 1
line_24a a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.10", "3.10"),
after_sel=("3.4", "3.12"),
command_name="extend-to-word",
)
#@+node:ekr.20201130090918.56: *3* fill-paragraph
def test_fill_paragraph(self):
"""Test case for fill-paragraph"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Services StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially
declared disasters are weather related,
leading to around 500 deaths per year
and nearly $14 billion in damage.
StormReady, a program
started in 1999 in Tulsa, OK,
helps arm America's
communities with the communication and
safety skills needed to save lives and
property--before and during the event.
StormReady helps community leaders and
emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Services StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property--before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.0", "3.7"),
after_sel=("10.0", " 10.0"),
command_name="fill-paragraph",
directives="@pagewidth 80",
)
#@+node:ekr.20201130090918.53: *3* finish-of-line
def test_finish_of_line(self):
"""Test case for finish-of-line"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.12", "3.12"),
after_sel=("3.9", "3.9"),
command_name="finish-of-line",
)
#@+node:ekr.20201130090918.54: *3* finish-of-line (2)
def test_finish_of_line_2(self):
"""Test case for finish-of-line (2)"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.1", "3.1"),
after_sel=("3.9", "3.9"),
command_name="finish-of-line",
)
#@+node:ekr.20201130090918.55: *3* finish-of-line-extend-selection
def test_finish_of_line_extend_selection(self):
"""Test case for finish-of-line-extend-selection"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.1", "3.1"),
after_sel=("3.1", "3.9"),
command_name="finish-of-line-extend-selection",
)
#@+node:ekr.20201130090918.57: *3* forward-char
def test_forward_char(self):
"""Test case for forward-char"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.2", "1.2"),
after_sel=("1.3", "1.3"),
command_name="forward-char",
)
#@+node:ekr.20201130090918.58: *3* forward-char-extend-selection
def test_forward_char_extend_selection(self):
"""Test case for forward-char-extend-selection"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.1", "1.1"),
after_sel=("1.1", "1.2"),
command_name="forward-char-extend-selection",
)
#@+node:ekr.20201130090918.59: *3* forward-end-word (end of line)
def test_forward_end_word_end_of_line(self):
"""Test case for forward-end-word (end of line)"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.395", "1.395"),
after_sel=("3.4", "3.4"),
command_name="forward-end-word",
)
#@+node:ekr.20201130090918.60: *3* forward-end-word (start of word)
def test_forward_end_word_start_of_word(self):
"""Test case for forward-end-word (start of word)"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.310", "1.310"),
after_sel=("1.317", "1.317"),
command_name="forward-end-word",
)
#@+node:ekr.20201130090918.61: *3* forward-end-word-extend-selection
def test_forward_end_word_extend_selection(self):
"""Test case for forward-end-word-extend-selection"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.20", "3.20"),
after_sel=("3.20", "3.30"),
command_name="forward-end-word-extend-selection",
)
#@+node:ekr.20201130090918.62: *3* forward-paragraph
def test_forward_paragraph(self):
"""Test case for forward-paragraph"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("9.0", "9.0"),
after_sel=("15.0", "15.0"),
command_name="forward-paragraph",
)
#@+node:ekr.20201130090918.63: *3* forward-paragraph-extend-selection
def test_forward_paragraph_extend_selection(self):
"""Test case for forward-paragraph-extend-selection"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("10.0", "10.0"),
after_sel=("10.0", "15.0"),
command_name="forward-paragraph-extend-selection",
)
#@+node:ekr.20201130090918.64: *3* forward-sentence
def test_forward_sentence(self):
"""Test case for forward-sentence"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.17", "3.17"),
after_sel=("3.142", "3.142"),
command_name="forward-sentence",
)
#@+node:ekr.20201130090918.65: *3* forward-sentence-extend-selection
def test_forward_sentence_extend_selection(self):
"""Test case for forward-sentence-extend-selection"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.264", "1.264"),
after_sel=("1.264", "1.395"),
command_name="forward-sentence-extend-selection",
)
#@+node:ekr.20201130090918.66: *3* forward-word
def test_forward_word(self):
"""Test case for forward-word"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.261", "1.261"),
after_sel=("1.272", "1.272"),
command_name="forward-word",
)
#@+node:ekr.20201130090918.67: *3* forward-word-extend-selection
def test_forward_word_extend_selection(self):
"""Test case for forward-word-extend-selection"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.395", "1.395"),
after_sel=("1.395", "3.4"),
command_name="forward-word-extend-selection",
)
#@+node:ekr.20201130090918.68: *3* indent-relative
def test_indent_relative(self):
"""Test case for indent-relative"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("5.0", "5.0"),
after_sel=("5.8", "5.8"),
command_name="indent-relative",
)
#@+node:ekr.20201130090918.69: *3* indent-rigidly
def test_indent_rigidly(self):
"""Test case for indent-rigidly"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.0", "5.0"),
after_sel=("2.0", "5.1"),
command_name="indent-rigidly",
)
#@+node:ekr.20201130090918.70: *3* indent-to-comment-column
def test_indent_to_comment_column(self):
"""Test case for indent-to-comment-column"""
before_b = """\
first line
line b
last line
"""
after_b = """\
first line
line b
last line
"""
self.c.editCommands.ccolumn = 4 # Set the comment column
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.0", "2.0"),
after_sel=("2.4", "2.4"),
command_name="indent-to-comment-column",
)
#@+node:ekr.20201130090918.71: *3* insert-newline
def test_insert_newline(self):
"""Test case for insert-newline"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first li
ne
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.8", "1.8"),
after_sel=("2.0", "2.0"),
command_name="insert-newline",
)
#@+node:ekr.20201130090918.72: *3* insert-parentheses
def test_insert_parentheses(self):
"""Test case for insert-parentheses"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first() line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.5", "1.5"),
after_sel=("1.6", "1.6"),
command_name="insert-parentheses",
)
#@+node:ekr.20201130090918.76: *3* kill-line end-body-text
def test_kill_line_end_body_text(self):
"""Test case for kill-line end-body-text"""
before_b = """\
line 1
line 2
line 3
"""
after_b = """\
line 1
line 2
line 3"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("4.1", "4.1"),
after_sel=("3.6", "3.6"),
command_name="kill-line",
)
#@+node:ekr.20201130090918.77: *3* kill-line end-line-text
def test_kill_line_end_line_text(self):
"""Test case for kill-line end-line-text"""
before_b = """\
line 1
line 2
line 3
"""
after_b = """\
line 1
line 2
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.5", "3.5"),
after_sel=("3.0", "3.0"),
command_name="kill-line",
)
#@+node:ekr.20201130090918.79: *3* kill-line start-blank-line
def test_kill_line_start_blank_line(self):
"""Test case for kill-line start-blank-line"""
before_b = """\
line 1
line 2
line 4
"""
after_b = """\
line 1
line 2
line 4
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.0", "3.0"),
after_sel=("3.0", "3.0"),
command_name="kill-line",
)
#@+node:ekr.20201130090918.78: *3* kill-line start-line
def test_kill_line_start_line(self):
"""Test case for kill-line start-line"""
before_b = """\
line 1
line 2
line 3
line 4
"""
after_b = """\
line 1
line 2
line 4
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.0", "3.0"),
after_sel=("3.0", "3.0"),
command_name="kill-line",
)
#@+node:ekr.20201130090918.73: *3* kill-paragraph
def test_kill_paragraph(self):
"""Test case for kill-paragraph"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
Some 90% of all presidentially declared disasters are weather related, leading
to around 500 deaths per year and nearly $14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK, helps arm America's communities with the
communication and safety skills needed to save lives and property– before and
during the event. StormReady helps community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year,
Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000
tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly
weather impacts every American. Communities can now rely on the National Weather
Service’s StormReady program to help them guard against the ravages of Mother
Nature.
StormReady communities are better prepared to save lives from the onslaught of
severe weather through better planning, education, and awareness. No community
is storm proof, but StormReady can help communities save lives. Does StormReady
make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("9.0", "9.0"),
after_sel=("8.0", "8.0"),
command_name="kill-paragraph",
)
#@+node:ekr.20201130090918.74: *3* kill-sentence
def test_kill_sentence(self):
"""Test case for kill-sentence"""
before_b = """\
This is the first sentence. This
is the second sentence. And
this is the last sentence.
"""
after_b = """\
This is the first sentence. And
this is the last sentence.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.2", "2.2"),
after_sel=("1.27", "1.27"),
command_name="kill-sentence",
)
#@+node:ekr.20201130090918.82: *3* kill-to-end-of-line after last visible char
def test_kill_to_end_of_line_after_last_visible_char(self):
"""Test case for kill-to-end-of-line after last visible char"""
before_b = """\
line 1
# The next line contains two trailing blanks.
line 3
line 4
"""
after_b = """\
line 1
# The next line contains two trailing blanks.
line 3line 4
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.6", "3.6"),
after_sel=("3.6", "3.6"),
command_name="kill-to-end-of-line",
)
#@+node:ekr.20201130090918.80: *3* kill-to-end-of-line end-body-text
def test_kill_to_end_of_line_end_body_text(self):
"""Test case for kill-to-end-of-line end-body-text"""
before_b = """\
line 1
line 2
line 3
"""
after_b = """\
line 1
line 2
line 3"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("4.1", "4.1"),
after_sel=("3.6", "3.6"),
command_name="kill-to-end-of-line",
)
#@+node:ekr.20201130090918.81: *3* kill-to-end-of-line end-line
def test_kill_to_end_of_line_end_line(self):
"""Test case for kill-to-end-of-line end-line"""
before_b = """\
line 1
line 2
line 3
"""
after_b = """\
line 1
line 2line 3
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.6", "2.6"),
after_sel=("2.6", "2.6"),
command_name="kill-to-end-of-line",
)
#@+node:ekr.20201130090918.85: *3* kill-to-end-of-line middle-line
def test_kill_to_end_of_line_middle_line(self):
"""Test case for kill-to-end-of-line middle-line"""
before_b = """\
line 1
line 2
line 3
"""
after_b = """\
line 1
li
line 3
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.2", "2.2"),
after_sel=("2.2", "2.2"),
command_name="kill-to-end-of-line",
)
#@+node:ekr.20201130090918.84: *3* kill-to-end-of-line start-blank-line
def test_kill_to_end_of_line_start_blank_line(self):
"""Test case for kill-to-end-of-line start-blank-line"""
before_b = """\
line 1
line 2
line 4
"""
after_b = """\
line 1
line 2
line 4
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.0", "3.0"),
after_sel=("3.0", "3.0"),
command_name="kill-to-end-of-line",
)
#@+node:ekr.20201130090918.83: *3* kill-to-end-of-line start-line
def test_kill_to_end_of_line_start_line(self):
"""Test case for kill-to-end-of-line start-line"""
before_b = """\
line 1
line 2
line 3
line 4
"""
after_b = """\
line 1
line 2
line 4
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.0", "3.0"),
after_sel=("3.0", "3.0"),
command_name="kill-to-end-of-line",
)
#@+node:ekr.20201130090918.75: *3* kill-word
def test_kill_word(self):
"""Test case for kill-word"""
before_b = """\
This is the first sentence. This
is the second sentence. And
this is the last sentence.
"""
after_b = """\
This is the first sentence. This
is the sentence. And
this is the last sentence.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.6", "2.6"),
after_sel=("2.7", "2.7"),
command_name="kill-word",
)
#@+node:ekr.20201130090918.86: *3* move-lines-down
def test_move_lines_down(self):
"""Test case for move-lines-down"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line c
line a
line b
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.3", "4.3"),
after_sel=("4.3", "5.3"),
command_name="move-lines-down",
)
#@+node:ekr.20201130090918.87: *3* move-lines-up
def test_move_lines_up(self):
"""Test case for move-lines-up"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
line 1
first line
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.2", "2.2"),
after_sel=("1.2", "1.2"),
command_name="move-lines-up",
)
#@+node:ekr.20201130090918.88: *3* move-lines-up (into docstring)
def test_move_lines_up_into_docstring(self):
"""Test case for move-lines-up (into docstring)"""
before_b = '''\
#@@language python
def test():
""" a
b
c
"""
print 1
print 2
'''
after_b = '''\
#@@language python
def test():
""" a
b
c
print 1
"""
print 2
'''
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("7.1", "7.1"),
after_sel=("6.1", "6.1"),
command_name="move-lines-up",
)
#@+node:ekr.20201130090918.89: *3* move-past-close
def test_move_past_close(self):
"""Test case for move-past-close"""
before_b = """\
first (line)
line 1
line a
line b
line c
last line
"""
after_b = """\
first (line)
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.10", "1.10"),
after_sel=("1.12", "1.12"),
command_name="move-past-close",
)
#@+node:ekr.20201130090918.90: *3* move-past-close-extend-selection
def test_move_past_close_extend_selection(self):
"""Test case for move-past-close-extend-selection"""
before_b = """\
first line
line 1
(line )a
line b
line c
last line
"""
after_b = """\
first line
line 1
(line )a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.7", "3.7"),
after_sel=("3.7", "3.11"),
command_name="move-past-close-extend-selection",
)
#@+node:ekr.20201130090918.91: *3* newline-and-indent
def test_newline_and_indent(self):
"""Test case for newline-and-indent"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.6", "2.6"),
after_sel=("3.4", "3.4"),
command_name="newline-and-indent",
)
#@+node:ekr.20201130090918.92: *3* next-line
def test_next_line(self):
"""Test case for next-line"""
before_b = """\
a
b
"""
after_b = """\
a
b
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.1", "1.1"),
after_sel=("2.0", "2.0"),
command_name="next-line",
)
#@+node:ekr.20201130090918.93: *3* previous-line
def test_previous_line(self):
"""Test case for previous-line"""
before_b = """\
a
b
"""
after_b = """\
a
b
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.0", "3.0"),
after_sel=("2.0", "2.0"),
command_name="previous-line",
)
#@+node:ekr.20201130090918.94: *3* rectangle-clear
def test_rectangle_clear(self):
"""Test case for rectangle-clear"""
before_b = """\
before
aaaxxxbbb
aaaxxxbbb
aaaxxxbbb
aaaxxxbbb
after
"""
after_b = """\
before
aaa bbb
aaa bbb
aaa bbb
aaa bbb
after
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.3", "5.6"),
after_sel=("2.3", "5.6"),
command_name="rectangle-clear",
)
#@+node:ekr.20201130090918.95: *3* rectangle-close
def test_rectangle_close(self):
"""Test case for rectangle-close"""
before_b = """\
before
aaa bbb
aaa bbb
aaa bbb
aaa bbb
after
"""
after_b = """\
before
aaabbb
aaabbb
aaabbb
aaabbb
after
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.3", "5.6"),
after_sel=("2.3", "5.3"),
command_name="rectangle-close",
)
#@+node:ekr.20201130090918.96: *3* rectangle-delete
def test_rectangle_delete(self):
"""Test case for rectangle-delete"""
before_b = """\
before
aaaxxxbbb
aaaxxxbbb
aaaxxxbbb
aaaxxxbbb
after
"""
after_b = """\
before
aaabbb
aaabbb
aaabbb
aaabbb
after
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.3", "5.6"),
after_sel=("2.3", "5.3"),
command_name="rectangle-delete",
)
#@+node:ekr.20201130090918.97: *3* rectangle-kill
def test_rectangle_kill(self):
"""Test case for rectangle-kill"""
before_b = """\
before
aaaxxxbbb
aaaxxxbbb
aaaxxxbbb
aaaxxxbbb
after
"""
after_b = """\
before
aaabbb
aaabbb
aaabbb
aaabbb
after
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.3", "5.6"),
after_sel=("5.3", "5.3"),
command_name="rectangle-kill",
)
#@+node:ekr.20201130090918.98: *3* rectangle-open
def test_rectangle_open(self):
"""Test case for rectangle-open"""
before_b = """\
before
aaaxxxbbb
aaaxxxbbb
aaaxxxbbb
aaaxxxbbb
after
"""
after_b = """\
before
aaa xxxbbb
aaa xxxbbb
aaa xxxbbb
aaa xxxbbb
after
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.3", "5.6"),
after_sel=("2.3", "5.6"),
command_name="rectangle-open",
)
#@+node:ekr.20201130090918.99: *3* rectangle-string
def test_rectangle_string(self):
"""Test case for rectangle-string"""
before_b = """\
before
aaaxxxbbb
aaaxxxbbb
aaaxxxbbb
aaaxxxbbb
after
"""
after_b = """\
before
aaas...sbbb
aaas...sbbb
aaas...sbbb
aaas...sbbb
after
"""
# A hack. The command tests for g.app.unitTesting.
g.app.unitTesting = True
try:
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.3", "5.6"),
after_sel=("2.3", "5.8"),
command_name="rectangle-string",
)
finally:
g.app.unitTesting = False
#@+node:ekr.20201130090918.100: *3* rectangle-yank
def test_rectangle_yank(self):
"""Test case for rectangle-yank"""
before_b = """\
before
aaaxxxbbb
aaaxxxbbb
aaaxxxbbb
aaaxxxbbb
after
"""
after_b = """\
before
aaaY1Ybbb
aaaY2Ybbb
aaaY3Ybbb
aaaY4Ybbb
after
"""
# A hack. The command tests for g.app.unitTesting.
g.app.unitTesting = True
try:
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.3", "5.6"),
after_sel=("2.3", "5.6"),
command_name="rectangle-yank",
)
finally:
g.app.unitTesting = False
#@+node:ekr.20201201201052.1: *3* reformat-paragraph tests
#@+node:ekr.20201130090918.122: *4* reformat-paragraph list 1 of 5
def test_reformat_paragraph_list_1_of_5(self):
"""Test case for reformat-paragraph list 1 of 5"""
before_b = """\
This paragraph leads of this test. It is the "lead"
paragraph.
1. This is item
number 1. It is the first item in the list.
2. This is item
number 2. It is the second item in the list.
3. This is item
number 3. It is the third item in the list.
This paragraph ends the test. It is the "final"
paragraph.
"""
after_b = """\
This paragraph leads of this test. It is
the "lead" paragraph.
1. This is item
number 1. It is the first item in the list.
2. This is item
number 2. It is the second item in the list.
3. This is item
number 3. It is the third item in the list.
This paragraph ends the test. It is the "final"
paragraph.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.0"),
after_sel=("4.0", "4.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.123: *4* reformat-paragraph list 2 of 5
def test_reformat_paragraph_list_2_of_5(self):
"""Test case for reformat-paragraph list 2 of 5"""
before_b = """\
This paragraph leads of this test. It is
the "lead" paragraph.
1. This is item number 1. It is the
first item in the list.
2. This is item
number 2. It is the second item in the list.
3. This is item
number 3. It is the third item in the list.
This paragraph ends the test. It is the "final"
paragraph.
"""
after_b = """\
This paragraph leads of this test. It is
the "lead" paragraph.
1. This is item number 1. It is the
first item in the list.
2. This is item
number 2. It is the second item in the list.
3. This is item
number 3. It is the third item in the list.
This paragraph ends the test. It is the "final"
paragraph.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("4.0", "4.0"),
after_sel=("7.0", "7.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.124: *4* reformat-paragraph list 3 of 5
def test_reformat_paragraph_list_3_of_5(self):
"""Test case for reformat-paragraph list 3 of 5"""
before_b = """\
This paragraph leads of this test. It is
the "lead" paragraph.
1. This is item number 1. It is the
first item in the list.
2. This is item
number 2. It is the second item in the list.
3. This is item
number 3. It is the third item in the list.
This paragraph ends the test. It is the "final"
paragraph.
"""
after_b = """\
This paragraph leads of this test. It is
the "lead" paragraph.
1. This is item number 1. It is the
first item in the list.
2. This is item number 2. It is the
second item in the list.
3. This is item
number 3. It is the third item in the list.
This paragraph ends the test. It is the "final"
paragraph.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("7.0", "7.0"),
after_sel=("10.0", "10.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.125: *4* reformat-paragraph list 4 of 5
def test_reformat_paragraph_list_4_of_5(self):
"""Test case for reformat-paragraph list 4 of 5"""
before_b = """\
This paragraph leads of this test. It is
the "lead" paragraph.
1. This is item number 1. It is the
first item in the list.
2. This is item number 2. It is the
second item in the list.
3. This is item
number 3. It is the third item in the list.
This paragraph ends the test. It is the "final"
paragraph.
"""
after_b = """\
This paragraph leads of this test. It is
the "lead" paragraph.
1. This is item number 1. It is the
first item in the list.
2. This is item number 2. It is the
second item in the list.
3. This is item number 3. It is the
third item in the list.
This paragraph ends the test. It is the "final"
paragraph.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("10.0", "10.0"),
after_sel=("13.0", "13.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.126: *4* reformat-paragraph list 5 of 5
def test_reformat_paragraph_list_5_of_5(self):
"""Test case for reformat-paragraph list 5 of 5"""
before_b = """\
This paragraph leads of this test. It is
the "lead" paragraph.
1. This is item number 1. It is the
first item in the list.
2. This is item number 2. It is the
second item in the list.
3. This is item number 3. It is the
third item in the list.
This paragraph ends the test. It is the "final"
paragraph.
"""
after_b = """\
This paragraph leads of this test. It is
the "lead" paragraph.
1. This is item number 1. It is the
first item in the list.
2. This is item number 2. It is the
second item in the list.
3. This is item number 3. It is the
third item in the list.
This paragraph ends the test. It is the
"final" paragraph.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("13.0", "13.0"),
after_sel=("15.1", "15.1"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.127: *4* reformat-paragraph new code 1 of 8
def test_reformat_paragraph_new_code_1_of_8(self):
"""Test case for reformat-paragraph new code 1 of 8"""
before_b = """\
#@@pagewidth 40
'''
docstring.
'''
"""
after_b = """\
#@@pagewidth 40
'''
docstring.
'''
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.0"),
after_sel=("2.0", "2.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.128: *4* reformat-paragraph new code 2 of 8
def test_reformat_paragraph_new_code_2_of_8(self):
"""Test case for reformat-paragraph new code 2 of 8"""
before_b = """\
#@@pagewidth 40
'''
docstring.
'''
"""
after_b = """\
#@@pagewidth 40
'''
docstring.
'''
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.0", "2.0"),
after_sel=("3.0", "3.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.129: *4* reformat-paragraph new code 3 of 8
def test_reformat_paragraph_new_code_3_of_8(self):
"""Test case for reformat-paragraph new code 3 of 8"""
before_b = """\
#@@pagewidth 40
'''
docstring.
more docstring.
'''
"""
after_b = """\
#@@pagewidth 40
'''
docstring. more docstring.
'''
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.1", "4.1"),
after_sel=("4.0", "4.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.130: *4* reformat-paragraph new code 4 of 8
def test_reformat_paragraph_new_code_4_of_8(self):
"""Test case for reformat-paragraph new code 4 of 8"""
before_b = """\
- Point 1. xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 11.
A. Point 2. xxxxxxxxxxxxxxxxxxxxxxxxxxx
"""
after_b = """\
- Point 1. xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 11.
A. Point 2. xxxxxxxxxxxxxxxxxxxxxxxxxxx
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.0"),
after_sel=("3.0", "3.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.131: *4* reformat-paragraph new code 5 of 8
def test_reformat_paragraph_new_code_5_of_8(self):
"""Test case for reformat-paragraph new code 5 of 8"""
before_b = """\
A. Point 2. xxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 22.
1. Point 3. xxxxxxxxxxxxxxxxxxxxxxxxxxx
"""
after_b = """\
A. Point 2. xxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 22.
1. Point 3. xxxxxxxxxxxxxxxxxxxxxxxxxxx
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "2.0"),
after_sel=("3.0", "3.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.132: *4* reformat-paragraph new code 6 of 8
def test_reformat_paragraph_new_code_6_of_8(self):
"""Test case for reformat-paragraph new code 6 of 8"""
before_b = """\
1. Point 3. xxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 32.
2. Point 4 xxxxxxxxxxxxxxxxxxxxxxxxxxx
"""
after_b = """\
1. Point 3. xxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 32.
2. Point 4 xxxxxxxxxxxxxxxxxxxxxxxxxxx
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.0"),
after_sel=("4.0", "4.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.133: *4* reformat-paragraph new code 7 of 8
def test_reformat_paragraph_new_code_7_of_8(self):
"""Test case for reformat-paragraph new code 7 of 8"""
before_b = """\
1. Point 3. xxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 32.
2. Point 4 xxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 41.
"""
after_b = """\
1. Point 3. xxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 32.
2. Point 4 xxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 41.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.11", "2.11"),
after_sel=("3.1", "3.1"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.134: *4* reformat-paragraph new code 8 of 8
def test_reformat_paragraph_new_code_8_of_8(self):
"""Test case for reformat-paragraph new code 8 of 8"""
before_b = """\
2. Point 4 xxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 41.
"""
after_b = """\
2. Point 4 xxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 41.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.0"),
after_sel=("3.0", "3.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.135: *4* reformat-paragraph paragraph 1 of 3
def test_reformat_paragraph_paragraph_1_of_3(self):
"""Test case for reformat-paragraph paragraph 1 of 3"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
Last paragraph.
"""
after_b = """\
Americans live in the most severe
weather-prone country on Earth. Each
year, Americans cope with an average of
10,000 thunderstorms, 2,500 floods,
1,000 tornadoes, as well as an average
of 6 deadly hurricanes. Potentially
deadly weather impacts every American.
Communities can now rely on the National
Weather Service’s StormReady program to
help them guard against the ravages of
Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
Last paragraph.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.0"),
after_sel=("13.0", "13.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.136: *4* reformat-paragraph paragraph 2 of 3
def test_reformat_paragraph_paragraph_2_of_3(self):
"""Test case for reformat-paragraph paragraph 2 of 3"""
before_b = """\
Americans live in the most severe
weather-prone country on Earth. Each
year, Americans cope with an average of
10,000 thunderstorms, 2,500 floods,
1,000 tornadoes, as well as an average
of 6 deadly hurricanes. Potentially
deadly weather impacts every American.
Communities can now rely on the National
Weather Service’s StormReady program to
help them guard against the ravages of
Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
Last paragraph.
"""
after_b = """\
Americans live in the most severe
weather-prone country on Earth. Each
year, Americans cope with an average of
10,000 thunderstorms, 2,500 floods,
1,000 tornadoes, as well as an average
of 6 deadly hurricanes. Potentially
deadly weather impacts every American.
Communities can now rely on the National
Weather Service’s StormReady program to
help them guard against the ravages of
Mother Nature.
Some 90% of all presidentially declared
disasters are weather related, leading
to around 500 deaths per year and nearly
$14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK,
helps arm America's communities with the
communication and safety skills needed
to save lives and property– before and
during the event. StormReady helps
community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
Last paragraph.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("13.0", "13.0"),
after_sel=("25.0", "25.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.137: *4* reformat-paragraph paragraph 3 of 3
def test_reformat_paragraph_paragraph_3_of_3(self):
"""Test case for reformat-paragraph paragraph 3 of 3"""
before_b = """\
Americans live in the most severe
weather-prone country on Earth. Each
year, Americans cope with an average of
10,000 thunderstorms, 2,500 floods,
1,000 tornadoes, as well as an average
of 6 deadly hurricanes. Potentially
deadly weather impacts every American.
Communities can now rely on the National
Weather Service’s StormReady program to
help them guard against the ravages of
Mother Nature.
Some 90% of all presidentially declared
disasters are weather related, leading
to around 500 deaths per year and nearly
$14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK,
helps arm America's communities with the
communication and safety skills needed
to save lives and property– before and
during the event. StormReady helps
community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
Last paragraph.
"""
after_b = """\
Americans live in the most severe
weather-prone country on Earth. Each
year, Americans cope with an average of
10,000 thunderstorms, 2,500 floods,
1,000 tornadoes, as well as an average
of 6 deadly hurricanes. Potentially
deadly weather impacts every American.
Communities can now rely on the National
Weather Service’s StormReady program to
help them guard against the ravages of
Mother Nature.
Some 90% of all presidentially declared
disasters are weather related, leading
to around 500 deaths per year and nearly
$14 billion in damage. StormReady, a
program started in 1999 in Tulsa, OK,
helps arm America's communities with the
communication and safety skills needed
to save lives and property– before and
during the event. StormReady helps
community leaders and emergency managers
strengthen local safety programs.
StormReady communities are better
prepared to save lives from the
onslaught of severe weather through
better planning, education, and
awareness. No community is storm proof,
but StormReady can help communities save
lives. Does StormReady make a
difference?
Last paragraph.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("25.10", "25.10"),
after_sel=("34.0", "34.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.138: *4* reformat-paragraph simple hanging indent
def test_reformat_paragraph_simple_hanging_indent(self):
"""Test case for reformat-paragraph simple hanging indent"""
before_b = """\
Honor this line that has a hanging indentation, please. Hanging
indentation is valuable for lists of all kinds. But it is tricky to get right.
Next paragraph.
"""
after_b = """\
Honor this line that has a hanging
indentation, please. Hanging
indentation is valuable for lists of
all kinds. But it is tricky to get
right.
Next paragraph.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.0"),
after_sel=("7.0", "7.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.139: *4* reformat-paragraph simple hanging indent 2
def test_reformat_paragraph_simple_hanging_indent_2(self):
"""Test case for reformat-paragraph simple hanging indent 2"""
before_b = """\
Honor this line that has
a hanging indentation, please. Hanging
indentation is valuable for lists of all kinds. But it is tricky to get right.
Next paragraph.
"""
after_b = """\
Honor this line that has a hanging
indentation, please. Hanging
indentation is valuable for lists of
all kinds. But it is tricky to get
right.
Next paragraph.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.0", "2.0"),
after_sel=("7.0", "7.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.140: *4* reformat-paragraph simple hanging indent 3
def test_reformat_paragraph_simple_hanging_indent_3(self):
"""Test case for reformat-paragraph simple hanging indent 3"""
before_b = """\
Honor this line that
has a hanging indentation,
please. Hanging
indentation is valuable
for lists of all kinds. But
it is tricky to get right.
Next Paragraph.
"""
after_b = """\
Honor this line that has a hanging
indentation, please. Hanging
indentation is valuable for lists of
all kinds. But it is tricky to get
right.
Next Paragraph.
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "1.0"),
after_sel=("7.0", "7.0"),
command_name="reformat-paragraph",
directives="@language plain\n@pagewidth 40\n@tabwidth 8",
)
#@+node:ekr.20201130090918.101: *3* remove-blank-lines
def test_remove_blank_lines(self):
"""Test case for remove-blank-lines"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "9.0"),
after_sel=("1.0", "6.9"),
command_name="remove-blank-lines",
)
#@+node:ekr.20201130090918.102: *3* remove-space-from-lines
def test_remove_space_from_lines(self):
"""Test case for remove-space-from-lines"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "9.0"),
after_sel=("1.0", "9.0"),
command_name="remove-space-from-lines",
)
#@+node:ekr.20201130090918.103: *3* remove-tab-from-lines
def test_remove_tab_from_lines(self):
"""Test case for remove-tab-from-lines"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "7.0"),
after_sel=("1.0", "7.0"),
command_name="remove-tab-from-lines",
)
#@+node:ekr.20201130090918.104: *3* reverse-region
def test_reverse_region(self):
"""Test case for reverse-region"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
last line
line c
line b
line a
line 1
first line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "7.0"),
after_sel=("7.10", "7.10"),
command_name="reverse-region",
)
#@+node:ekr.20201130090918.105: *3* reverse-sort-lines
def test_reverse_sort_lines(self):
"""Test case for reverse-sort-lines"""
before_b = """\
a
d
e
z
x
"""
after_b = """\
z
x
e
d
a
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "5.1"),
after_sel=("1.0", "5.1"),
command_name="reverse-sort-lines",
)
#@+node:ekr.20201130090918.106: *3* reverse-sort-lines-ignoring-case
def test_reverse_sort_lines_ignoring_case(self):
"""Test case for reverse-sort-lines-ignoring-case"""
before_b = """\
c
A
z
X
Y
b
"""
after_b = """\
z
Y
X
c
b
A
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "6.1"),
after_sel=("1.0", "6.1"),
command_name="reverse-sort-lines-ignoring-case",
)
#@+node:ekr.20201130090918.107: *3* sort-columns
def test_sort_columns(self):
"""Test case for sort-columns"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
line b
line a
first line
last line
line 1
line c
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "6.2"),
after_sel=("1.0", "7.0"),
command_name="sort-columns",
)
#@+node:ekr.20201130090918.108: *3* sort-lines
def test_sort_lines(self):
"""Test case for sort-lines"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line b
line a
line 1
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.0", "5.6"),
after_sel=("2.0", "5.6"),
command_name="sort-lines",
)
#@+node:ekr.20201130090918.109: *3* sort-lines-ignoring-case
def test_sort_lines_ignoring_case(self):
"""Test case for sort-lines-ignoring-case"""
before_b = """\
x
z
A
c
B
"""
after_b = """\
A
B
c
x
z
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "5.1"),
after_sel=("1.0", "5.1"),
command_name="sort-lines-ignoring-case",
)
#@+node:ekr.20201130090918.110: *3* split-line
def test_split_line(self):
"""Test case for split-line"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first
line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.5", "1.5"),
after_sel=("2.0", "2.0"),
command_name="split-line",
)
#@+node:ekr.20201130090918.111: *3* start-of-line
def test_start_of_line(self):
"""Test case for start-of-line"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.10", "3.10"),
after_sel=("3.4", "3.4"),
command_name="start-of-line",
)
#@+node:ekr.20201130090918.112: *3* start-of-line (2)
def test_start_of_line_2(self):
"""Test case for start-of-line (2)"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.1", "3.1"),
after_sel=("3.4", "3.4"),
command_name="start-of-line",
)
#@+node:ekr.20201130090918.113: *3* start-of-line-extend-selection
def test_start_of_line_extend_selection(self):
"""Test case for start-of-line-extend-selection"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.10", "3.10"),
after_sel=("3.4", "3.10"),
command_name="start-of-line-extend-selection",
)
#@+node:ekr.20201130090918.114: *3* start-of-line-extend-selection (2)
def test_start_of_line_extend_selection_2(self):
"""Test case for start-of-line-extend-selection (2)"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.1", "3.1"),
after_sel=("3.1", "3.4"),
command_name="start-of-line-extend-selection",
)
#@+node:ekr.20201130090918.115: *3* tabify
def test_tabify(self):
"""Test case for tabify"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "7.0"),
after_sel=("7.0", "7.0"),
command_name="tabify",
)
#@+node:ekr.20201130090918.116: *3* transpose-chars
def test_transpose_chars(self):
"""Test case for transpose-chars"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
frist line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.2", "1.2"),
after_sel=("1.2", "1.2"),
command_name="transpose-chars",
)
#@+node:ekr.20201130090918.117: *3* transpose-lines
def test_transpose_lines(self):
"""Test case for transpose-lines"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
line 1
first line
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.2", "2.2"),
after_sel=("2.10", "2.10"),
command_name="transpose-lines",
)
#@+node:ekr.20201130090918.118: *3* transpose-words
def test_transpose_words(self):
"""Test case for transpose-words"""
before_b = """\
first line
before bar2 += foo after
last line
"""
after_b = """\
first line
before foo += bar2 after
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("2.9", "2.9"),
after_sel=("2.11", "2.11"),
command_name="transpose-words",
)
#@+node:ekr.20201130090918.119: *3* untabify
def test_untabify(self):
"""Test case for untabify"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
line a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("1.0", "7.0"),
after_sel=("7.0", "7.0"),
command_name="untabify",
)
#@+node:ekr.20201130090918.120: *3* upcase-region
def test_upcase_region(self):
"""Test case for upcase-region"""
before_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
Some 90% of all presidentially declared disasters are weather related, leading to around 500 deaths per year and nearly $14 billion in damage. StormReady, a program started in 1999 in Tulsa, OK, helps arm America's communities with the communication and safety skills needed to save lives and property– before and during the event. StormReady helps community leaders and emergency managers strengthen local safety programs.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
after_b = """\
Americans live in the most severe weather-prone country on Earth. Each year, Americans cope with an average of 10,000 thunderstorms, 2,500 floods, 1,000 tornadoes, as well as an average of 6 deadly hurricanes. Potentially deadly weather impacts every American. Communities can now rely on the National Weather Service’s StormReady program to help them guard against the ravages of Mother Nature.
SOME 90% OF ALL PRESIDENTIALLY DECLARED DISASTERS ARE WEATHER RELATED, LEADING TO AROUND 500 DEATHS PER YEAR AND NEARLY $14 BILLION IN DAMAGE. STORMREADY, A PROGRAM STARTED IN 1999 IN TULSA, OK, HELPS ARM AMERICA'S COMMUNITIES WITH THE COMMUNICATION AND SAFETY SKILLS NEEDED TO SAVE LIVES AND PROPERTY– BEFORE AND DURING THE EVENT. STORMREADY HELPS COMMUNITY LEADERS AND EMERGENCY MANAGERS STRENGTHEN LOCAL SAFETY PROGRAMS.
StormReady communities are better prepared to save lives from the onslaught of severe weather through better planning, education, and awareness. No community is storm proof, but StormReady can help communities save lives. Does StormReady make a difference?
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.0", "4.0"),
after_sel=("3.0", "4.0"),
command_name="upcase-region",
)
#@+node:ekr.20201130090918.121: *3* upcase-word
def test_upcase_word(self):
"""Test case for upcase-word"""
before_b = """\
first line
line 1
line a
line b
line c
last line
"""
after_b = """\
first line
line 1
LINE a
line b
line c
last line
"""
self.run_test(
before_b=before_b,
after_b=after_b,
before_sel=("3.7", "3.7"),
after_sel=("3.7", "3.7"),
command_name="upcase-word",
)
#@-others
#@-leo
| 38.377829 | 427 | 0.629469 | 20,777 | 150,940 | 4.478847 | 0.028012 | 0.03212 | 0.021589 | 0.019837 | 0.913784 | 0.883974 | 0.856658 | 0.831351 | 0.808333 | 0.795115 | 0 | 0.053112 | 0.283371 | 150,940 | 3,932 | 428 | 38.387589 | 0.80668 | 0.099947 | 0 | 0.806357 | 0 | 0.033549 | 0.665394 | 0.008945 | 0 | 0 | 0 | 0 | 0.001471 | 1 | 0.042378 | false | 0 | 0.001471 | 0 | 0.045321 | 0.002649 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
8a1708e799441708c569727e7446a7bdf261da42 | 15,935 | py | Python | src/algorithms/lstm_enc_dec_axl.py | agnes-yang/DeepADoTS | 4a52caf4e49bad8e057649ca05ea9522c77518fb | [
"MIT"
] | null | null | null | src/algorithms/lstm_enc_dec_axl.py | agnes-yang/DeepADoTS | 4a52caf4e49bad8e057649ca05ea9522c77518fb | [
"MIT"
] | null | null | null | src/algorithms/lstm_enc_dec_axl.py | agnes-yang/DeepADoTS | 4a52caf4e49bad8e057649ca05ea9522c77518fb | [
"MIT"
] | null | null | null | <<<<<<< HEAD
import logging
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
from scipy.stats import multivariate_normal
from torch.utils.data import DataLoader
from torch.utils.data.sampler import SubsetRandomSampler
from tqdm import trange
from .algorithm_utils import Algorithm, PyTorchUtils
class LSTMED(Algorithm, PyTorchUtils):
def __init__(self, name: str = 'LSTM-ED', num_epochs: int = 10, batch_size: int = 20, lr: float = 1e-3,
hidden_size: int = 5, sequence_length: int = 30, train_gaussian_percentage: float = 0.25,
n_layers: tuple = (1, 1), use_bias: tuple = (True, True), dropout: tuple = (0, 0),
seed: int = None, gpu: int = None, details=True):
Algorithm.__init__(self, __name__, name, seed, details=details)
PyTorchUtils.__init__(self, seed, gpu)
self.num_epochs = num_epochs
self.batch_size = batch_size
self.lr = lr
self.hidden_size = hidden_size
self.sequence_length = sequence_length
self.train_gaussian_percentage = train_gaussian_percentage
self.n_layers = n_layers
self.use_bias = use_bias
self.dropout = dropout
self.lstmed = None
self.mean, self.cov = None, None
def fit(self, X: pd.DataFrame):
X.interpolate(inplace=True)
X.bfill(inplace=True)
data = X.values
sequences = [data[i:i + self.sequence_length] for i in range(data.shape[0] - self.sequence_length + 1)]
indices = np.random.permutation(len(sequences))
split_point = int(self.train_gaussian_percentage * len(sequences))
train_loader = DataLoader(dataset=sequences, batch_size=self.batch_size, drop_last=True,
sampler=SubsetRandomSampler(indices[:-split_point]), pin_memory=True)
train_gaussian_loader = DataLoader(dataset=sequences, batch_size=self.batch_size, drop_last=True,
sampler=SubsetRandomSampler(indices[-split_point:]), pin_memory=True)
self.lstmed = LSTMEDModule(X.shape[1], self.hidden_size,
self.n_layers, self.use_bias, self.dropout,
seed=self.seed, gpu=self.gpu)
self.to_device(self.lstmed)
optimizer = torch.optim.Adam(self.lstmed.parameters(), lr=self.lr)
self.lstmed.train()
for epoch in trange(self.num_epochs):
logging.debug(f'Epoch {epoch+1}/{self.num_epochs}.')
for ts_batch in train_loader:
output = self.lstmed(self.to_var(ts_batch))
loss = nn.MSELoss(size_average=False)(output, self.to_var(ts_batch.float()))
self.lstmed.zero_grad()
loss.backward()
optimizer.step()
self.lstmed.eval()
error_vectors = []
for ts_batch in train_gaussian_loader:
output = self.lstmed(self.to_var(ts_batch))
error = nn.L1Loss(reduce=False)(output, self.to_var(ts_batch.float()))
error_vectors += list(error.view(-1, X.shape[1]).data.cpu().numpy())
self.mean = np.mean(error_vectors, axis=0)
self.cov = np.cov(error_vectors, rowvar=False)
def predict(self, X: pd.DataFrame):
X.interpolate(inplace=True)
X.bfill(inplace=True)
data = X.values
sequences = [data[i:i + self.sequence_length] for i in range(data.shape[0] - self.sequence_length + 1)]
data_loader = DataLoader(dataset=sequences, batch_size=self.batch_size, shuffle=False, drop_last=False)
self.lstmed.eval()
mvnormal = multivariate_normal(self.mean, self.cov, allow_singular=True)
scores = []
outputs = []
errors = []
for idx, ts in enumerate(data_loader):
output = self.lstmed(self.to_var(ts))
error = nn.L1Loss(reduce=False)(output, self.to_var(ts.float()))
score = -mvnormal.logpdf(error.view(-1, X.shape[1]).data.cpu().numpy())
scores.append(score.reshape(ts.size(0), self.sequence_length))
if self.details:
outputs.append(output.data.numpy())
errors.append(error.data.numpy())
# stores seq_len-many scores per timestamp and averages them
scores = np.concatenate(scores)
lattice = np.full((self.sequence_length, data.shape[0]), np.nan)
for i, score in enumerate(scores):
lattice[i % self.sequence_length, i:i + self.sequence_length] = score
scores = np.nanmean(lattice, axis=0)
if self.details:
outputs = np.concatenate(outputs)
lattice = np.full((self.sequence_length, X.shape[0], X.shape[1]), np.nan)
for i, output in enumerate(outputs):
lattice[i % self.sequence_length, i:i + self.sequence_length, :] = output
self.prediction_details.update({'reconstructions_mean': np.nanmean(lattice, axis=0).T})
errors = np.concatenate(errors)
lattice = np.full((self.sequence_length, X.shape[0], X.shape[1]), np.nan)
for i, error in enumerate(errors):
lattice[i % self.sequence_length, i:i + self.sequence_length, :] = error
self.prediction_details.update({'errors_mean': np.nanmean(lattice, axis=0).T})
return scores
class LSTMEDModule(nn.Module, PyTorchUtils):
def __init__(self, n_features: int, hidden_size: int,
n_layers: tuple, use_bias: tuple, dropout: tuple,
seed: int, gpu: int):
super().__init__()
PyTorchUtils.__init__(self, seed, gpu)
self.n_features = n_features
self.hidden_size = hidden_size
self.n_layers = n_layers
self.use_bias = use_bias
self.dropout = dropout
self.encoder = nn.LSTM(self.n_features, self.hidden_size, batch_first=True,
num_layers=self.n_layers[0], bias=self.use_bias[0], dropout=self.dropout[0])
self.to_device(self.encoder)
self.decoder = nn.LSTM(self.n_features, self.hidden_size, batch_first=True,
num_layers=self.n_layers[1], bias=self.use_bias[1], dropout=self.dropout[1])
self.to_device(self.decoder)
self.hidden2output = nn.Linear(self.hidden_size, self.n_features)
self.to_device(self.hidden2output)
def _init_hidden(self, batch_size):
return (self.to_var(torch.Tensor(self.n_layers[0], batch_size, self.hidden_size).zero_()),
self.to_var(torch.Tensor(self.n_layers[0], batch_size, self.hidden_size).zero_()))
def forward(self, ts_batch, return_latent: bool = False):
batch_size = ts_batch.shape[0]
# 1. Encode the timeseries to make use of the last hidden state.
enc_hidden = self._init_hidden(batch_size) # initialization with zero
_, enc_hidden = self.encoder(ts_batch.float(), enc_hidden) # .float() here or .double() for the model
# 2. Use hidden state as initialization for our Decoder-LSTM
dec_hidden = enc_hidden
# 3. Also, use this hidden state to get the first output aka the last point of the reconstructed timeseries
# 4. Reconstruct timeseries backwards
# * Use true data for training decoder
# * Use hidden2output for prediction
output = self.to_var(torch.Tensor(ts_batch.size()).zero_())
for i in reversed(range(ts_batch.shape[1])):
output[:, i, :] = self.hidden2output(dec_hidden[0][0, :])
if self.training:
_, dec_hidden = self.decoder(ts_batch[:, i].unsqueeze(1).float(), dec_hidden)
else:
_, dec_hidden = self.decoder(output[:, i].unsqueeze(1), dec_hidden)
return (output, enc_hidden[1][-1]) if return_latent else output
=======
import logging
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
from scipy.stats import multivariate_normal
from torch.utils.data import DataLoader
from torch.utils.data.sampler import SubsetRandomSampler
from tqdm import trange
from .algorithm_utils import Algorithm, PyTorchUtils
class LSTMED(Algorithm, PyTorchUtils):
def __init__(self, name: str = 'LSTM-ED', num_epochs: int = 10, batch_size: int = 20, lr: float = 1e-3,
hidden_size: int = 5, sequence_length: int = 30, train_gaussian_percentage: float = 0.25,
n_layers: tuple = (1, 1), use_bias: tuple = (True, True), dropout: tuple = (0, 0),
seed: int = None, gpu: int = None, details=True):
Algorithm.__init__(self, __name__, name, seed, details=details)
PyTorchUtils.__init__(self, seed, gpu)
self.num_epochs = num_epochs
self.batch_size = batch_size
self.lr = lr
self.hidden_size = hidden_size
self.sequence_length = sequence_length
self.train_gaussian_percentage = train_gaussian_percentage
self.n_layers = n_layers
self.use_bias = use_bias
self.dropout = dropout
self.lstmed = None
self.mean, self.cov = None, None
def fit(self, X: pd.DataFrame):
X.interpolate(inplace=True)
X.bfill(inplace=True)
data = X.values
sequences = [data[i:i + self.sequence_length] for i in range(data.shape[0] - self.sequence_length + 1)]
indices = np.random.permutation(len(sequences))
split_point = int(self.train_gaussian_percentage * len(sequences))
train_loader = DataLoader(dataset=sequences, batch_size=self.batch_size, drop_last=True,
sampler=SubsetRandomSampler(indices[:-split_point]), pin_memory=True)
train_gaussian_loader = DataLoader(dataset=sequences, batch_size=self.batch_size, drop_last=True,
sampler=SubsetRandomSampler(indices[-split_point:]), pin_memory=True)
self.lstmed = LSTMEDModule(X.shape[1], self.hidden_size,
self.n_layers, self.use_bias, self.dropout,
seed=self.seed, gpu=self.gpu)
self.to_device(self.lstmed)
optimizer = torch.optim.Adam(self.lstmed.parameters(), lr=self.lr)
self.lstmed.train()
for epoch in trange(self.num_epochs):
logging.debug(f'Epoch {epoch+1}/{self.num_epochs}.')
for ts_batch in train_loader:
output = self.lstmed(self.to_var(ts_batch))
loss = nn.MSELoss(size_average=False)(output, self.to_var(ts_batch.float()))
self.lstmed.zero_grad()
loss.backward()
optimizer.step()
self.lstmed.eval()
error_vectors = []
for ts_batch in train_gaussian_loader:
output = self.lstmed(self.to_var(ts_batch))
error = nn.L1Loss(reduce=False)(output, self.to_var(ts_batch.float()))
error_vectors += list(error.view(-1, X.shape[1]).data.cpu().numpy())
self.mean = np.mean(error_vectors, axis=0)
self.cov = np.cov(error_vectors, rowvar=False)
def predict(self, X: pd.DataFrame):
X.interpolate(inplace=True)
X.bfill(inplace=True)
data = X.values
sequences = [data[i:i + self.sequence_length] for i in range(data.shape[0] - self.sequence_length + 1)]
data_loader = DataLoader(dataset=sequences, batch_size=self.batch_size, shuffle=False, drop_last=False)
self.lstmed.eval()
mvnormal = multivariate_normal(self.mean, self.cov, allow_singular=True)
scores = []
outputs = []
errors = []
for idx, ts in enumerate(data_loader):
output = self.lstmed(self.to_var(ts))
error = nn.L1Loss(reduce=False)(output, self.to_var(ts.float()))
score = -mvnormal.logpdf(error.view(-1, X.shape[1]).data.cpu().numpy())
scores.append(score.reshape(ts.size(0), self.sequence_length))
if self.details:
outputs.append(output.data.numpy())
errors.append(error.data.numpy())
# stores seq_len-many scores per timestamp and averages them
scores = np.concatenate(scores)
lattice = np.full((self.sequence_length, data.shape[0]), np.nan)
for i, score in enumerate(scores):
lattice[i % self.sequence_length, i:i + self.sequence_length] = score
scores = np.nanmean(lattice, axis=0)
if self.details:
outputs = np.concatenate(outputs)
lattice = np.full((self.sequence_length, X.shape[0], X.shape[1]), np.nan)
for i, output in enumerate(outputs):
lattice[i % self.sequence_length, i:i + self.sequence_length, :] = output
self.prediction_details.update({'reconstructions_mean': np.nanmean(lattice, axis=0).T})
errors = np.concatenate(errors)
lattice = np.full((self.sequence_length, X.shape[0], X.shape[1]), np.nan)
for i, error in enumerate(errors):
lattice[i % self.sequence_length, i:i + self.sequence_length, :] = error
self.prediction_details.update({'errors_mean': np.nanmean(lattice, axis=0).T})
return scores
class LSTMEDModule(nn.Module, PyTorchUtils):
def __init__(self, n_features: int, hidden_size: int,
n_layers: tuple, use_bias: tuple, dropout: tuple,
seed: int, gpu: int):
super().__init__()
PyTorchUtils.__init__(self, seed, gpu)
self.n_features = n_features
self.hidden_size = hidden_size
self.n_layers = n_layers
self.use_bias = use_bias
self.dropout = dropout
self.encoder = nn.LSTM(self.n_features, self.hidden_size, batch_first=True,
num_layers=self.n_layers[0], bias=self.use_bias[0], dropout=self.dropout[0])
self.to_device(self.encoder)
self.decoder = nn.LSTM(self.n_features, self.hidden_size, batch_first=True,
num_layers=self.n_layers[1], bias=self.use_bias[1], dropout=self.dropout[1])
self.to_device(self.decoder)
self.hidden2output = nn.Linear(self.hidden_size, self.n_features)
self.to_device(self.hidden2output)
def _init_hidden(self, batch_size):
return (self.to_var(torch.Tensor(self.n_layers[0], batch_size, self.hidden_size).zero_()),
self.to_var(torch.Tensor(self.n_layers[0], batch_size, self.hidden_size).zero_()))
def forward(self, ts_batch, return_latent: bool = False):
batch_size = ts_batch.shape[0]
# 1. Encode the timeseries to make use of the last hidden state.
enc_hidden = self._init_hidden(batch_size) # initialization with zero
_, enc_hidden = self.encoder(ts_batch.float(), enc_hidden) # .float() here or .double() for the model
# 2. Use hidden state as initialization for our Decoder-LSTM
dec_hidden = enc_hidden
# 3. Also, use this hidden state to get the first output aka the last point of the reconstructed timeseries
# 4. Reconstruct timeseries backwards
# * Use true data for training decoder
# * Use hidden2output for prediction
output = self.to_var(torch.Tensor(ts_batch.size()).zero_())
for i in reversed(range(ts_batch.shape[1])):
output[:, i, :] = self.hidden2output(dec_hidden[0][0, :])
if self.training:
_, dec_hidden = self.decoder(ts_batch[:, i].unsqueeze(1).float(), dec_hidden)
else:
_, dec_hidden = self.decoder(output[:, i].unsqueeze(1), dec_hidden)
return (output, enc_hidden[1][-1]) if return_latent else output
>>>>>>> upstream/master
| 46.867647 | 116 | 0.622278 | 2,055 | 15,935 | 4.63747 | 0.096837 | 0.049948 | 0.056663 | 0.031899 | 0.998111 | 0.998111 | 0.998111 | 0.998111 | 0.998111 | 0.998111 | 0 | 0.010575 | 0.264136 | 15,935 | 339 | 117 | 47.0059 | 0.802149 | 0.05855 | 0 | 0.988764 | 0 | 0 | 0.00972 | 0.00378 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.074906 | 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 |
8a2d79f6880a4725934827fda11a1a2e42fa8b77 | 59 | py | Python | test/test_auto_proto.py | aagnone3/auto-proto | 0f0c21132343c31d226069a8afa7f227441959c9 | [
"Apache-2.0"
] | null | null | null | test/test_auto_proto.py | aagnone3/auto-proto | 0f0c21132343c31d226069a8afa7f227441959c9 | [
"Apache-2.0"
] | null | null | null | test/test_auto_proto.py | aagnone3/auto-proto | 0f0c21132343c31d226069a8afa7f227441959c9 | [
"Apache-2.0"
] | null | null | null | import pytest
import auto_proto
def test_foo():
pass
| 8.428571 | 17 | 0.728814 | 9 | 59 | 4.555556 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.220339 | 59 | 6 | 18 | 9.833333 | 0.891304 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | true | 0.25 | 0.5 | 0 | 0.75 | 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 | 1 | 1 | 0 | 1 | 0 | 0 | 7 |
8a50fcc271641179fecae0fd8d5e0acda67ce730 | 13,949 | py | Python | lenstronomy/LensModel/Optimizer/fixed_routines.py | lucateo/lenstronomy | 3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab | [
"MIT"
] | null | null | null | lenstronomy/LensModel/Optimizer/fixed_routines.py | lucateo/lenstronomy | 3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab | [
"MIT"
] | null | null | null | lenstronomy/LensModel/Optimizer/fixed_routines.py | lucateo/lenstronomy | 3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab | [
"MIT"
] | null | null | null | import numpy as np
from lenstronomy.Util.param_util import shear_polar2cartesian,shear_cartesian2polar,phi_q2_ellipticity,\
ellipticity2phi_q
from lenstronomy.Util.util import approx_theta_E
from lenstronomy.Util.package_util import exporter
export, __all__ = exporter()
@export
class FixedShearPowerLaw(object):
_fixshear = True
def __init__(self,lens_model_list,kwargs_lens,xpos,ypos,constrain_params):
assert lens_model_list[0] in ['EPL', 'SPEP', 'SPEMD', 'PEMD']
assert lens_model_list[1] == 'SHEAR'
assert constrain_params is not None
assert 'shear' in constrain_params.keys()
self._Ntovary = 2
self._k_start = 2
self._kwargs_lens = kwargs_lens
self._theta_E_start = approx_theta_E(xpos, ypos)
self._tovary_indicies = [0, 1]
self.param_names = [['theta_E', 'center_x', 'center_y', 'e1', 'e2','gamma'], ['shear_magnitude', 'shear_PA']]
self.fixed_names = [['gamma'], ['shear_magnitude']]
self.fixed_values = [{'gamma': kwargs_lens[0]['gamma']}, {'shear_magnitude': constrain_params['shear']}]
self.params_to_vary = ['theta_E', 'center_x', 'center_y', 'e1', 'e2','shear_theta']
self._constrain_params = constrain_params
def _new_ellip(self,start_e1,start_e2,delta_phi,delta_gamma):
phi_start, gamma_start = ellipticity2phi_q(start_e1,start_e2)
phi_min,phi_max = phi_start + delta_phi, phi_start-delta_phi
gamma_min,gamma_max = max(0.001,gamma_start-delta_gamma),min(0.99,gamma_start+delta_gamma)
e1_min, e2_min = phi_q2_ellipticity(phi_min, gamma_min)
e1_max, e2_max = phi_q2_ellipticity(phi_max, gamma_max)
return e1_min,e2_min,e1_max,e2_max
def get_param_ranges(self,reoptimize=False, scale = 1):
if reoptimize:
delta_phi,delta_ellip = scale * 30*np.pi*180**-1, scale * 0.15
low_e1,low_e2, high_e1,high_e2 = self._new_ellip(self._kwargs_lens[0]['e1'], self._kwargs_lens[0]['e2'],
delta_phi, delta_ellip)
phi, _ = shear_cartesian2polar(self._kwargs_lens[1]['gamma1'], self._kwargs_lens[1]['gamma2'])
low_shear_PA = phi * 0.8 * scale
high_shear_pA = phi * 1.2 * scale
theta_E = scale * 0.005
center = 0.005
low_Rein = self._kwargs_lens[0]['theta_E'] - theta_E
hi_Rein = self._kwargs_lens[0]['theta_E'] + theta_E
low_centerx = self._kwargs_lens[0]['center_x'] - center
hi_centerx = self._kwargs_lens[0]['center_x'] + center
low_centery = self._kwargs_lens[0]['center_y'] - center
hi_centery = self._kwargs_lens[0]['center_y'] + center
else:
low_e1 = -0.3
low_e2 = low_e1
high_e1 = 0.3
high_e2 = high_e1
low_shear_PA = -np.pi
high_shear_pA = np.pi
low_Rein = self._theta_E_start - 0.1
hi_Rein = self._theta_E_start + 0.1
low_centerx = -0.015
hi_centerx = 0.015
low_centery = low_centerx
hi_centery = hi_centerx
sie_list_low = [low_Rein, low_centerx, low_centery, low_e1, low_e2]
sie_list_high = [hi_Rein, hi_centerx, hi_centery, high_e1, high_e2]
shear_list_low = [low_shear_PA]
shear_list_high = [high_shear_pA]
return sie_list_low+shear_list_low,sie_list_high+shear_list_high
@export
class FixedPowerLaw_Shear(object):
def __init__(self,lens_model_list,kwargs_lens,xpos,ypos,constrain_params):
assert lens_model_list[0] in ['EPL', 'SPEP', 'SPEMD', 'PEMD']
assert lens_model_list[1] == 'SHEAR'
self._Ntovary = 2
self._k_start = 2
self._kwargs_lens = kwargs_lens
self._theta_E_start = approx_theta_E(xpos, ypos)
self._tovary_indicies = [0, 1]
self.param_names = [['theta_E', 'center_x', 'center_y', 'e1', 'e2','gamma'], ['gamma1', 'gamma2']]
self.fixed_names = [['gamma'], []]
self.fixed_values = [{'gamma': kwargs_lens[0]['gamma']}, {}]
self.params_to_vary = ['theta_E', 'center_x', 'center_y', 'e1', 'e2','shear_e1','shear_e2']
self._constrain_params = constrain_params
def _new_ellip(self,start_e1,start_e2,delta_phi,delta_gamma):
phi_start, gamma_start = ellipticity2phi_q(start_e1,start_e2)
phi_min,phi_max = phi_start + delta_phi, phi_start-delta_phi
gamma_min,gamma_max = max(0.001,gamma_start-delta_gamma),min(0.99,gamma_start+delta_gamma)
e1_min, e2_min = phi_q2_ellipticity(phi_min, gamma_min)
e1_max, e2_max = phi_q2_ellipticity(phi_max, gamma_max)
return e1_min,e2_min,e1_max,e2_max
def _new_shear(self, start_e1, start_e2, delta_phi, delta_gamma):
phi_start, gamma_start = shear_cartesian2polar(start_e1, start_e2)
phi_min, phi_max = phi_start + delta_phi, phi_start - delta_phi
gamma_min, gamma_max = max(0.0001,gamma_start - delta_gamma), gamma_start + delta_gamma
e1_min, e2_min = shear_polar2cartesian(phi_min, gamma_min)
e1_max, e2_max = shear_polar2cartesian(phi_max, gamma_max)
return e1_min, e2_min, e1_max, e2_max
def get_param_ranges(self,reoptimize=False, scale = 1):
if reoptimize:
delta_phi,delta_ellip = scale * 30*np.pi*180**-1, scale * 0.15
delta_shear_phi,delta_shear = scale * 30*np.pi*180**-1, scale * 0.02
low_e1,low_e2, high_e1,high_e2 = self._new_ellip(self._kwargs_lens[0]['e1'], self._kwargs_lens[0]['e2'],
delta_phi, delta_ellip)
low_shear_e1,low_shear_e2,high_shear_e1,high_shear_e2 = self._new_shear(self._kwargs_lens[1]['gamma1'],
self._kwargs_lens[1]['gamma2'],
delta_shear_phi, delta_shear)
theta_E = scale * 0.005
center = 0.005
low_Rein = self._kwargs_lens[0]['theta_E'] - theta_E
hi_Rein = self._kwargs_lens[0]['theta_E'] + theta_E
low_centerx = self._kwargs_lens[0]['center_x'] - center
hi_centerx = self._kwargs_lens[0]['center_x'] + center
low_centery = self._kwargs_lens[0]['center_y'] - center
hi_centery = self._kwargs_lens[0]['center_y'] + center
if self._constrain_params is not None:
# keep the same PA, but change the shear magnitude
if 'shear' in self._constrain_params.keys():
phi_start, gamma_start = shear_cartesian2polar(self._kwargs_lens[1]['gamma1'], self._kwargs_lens[1]['gamma2'])
rescale = self._constrain_params['shear'][0] * gamma_start ** -1
low_shear_e1 = self._kwargs_lens[1]['gamma1'] * rescale * 0.8
high_shear_e1 = self._kwargs_lens[1]['gamma1'] * rescale * 1.2
low_shear_e2 = self._kwargs_lens[1]['gamma2'] * rescale * 0.8
high_shear_e2 = self._kwargs_lens[1]['gamma2'] * rescale * 1.2
else:
low_e1 = -0.3
low_e2 = low_e1
high_e1 = 0.3
high_e2 = high_e1
low_shear_e1 = -0.08
high_shear_e1 = 0.08
low_shear_e2 = low_shear_e1
high_shear_e2 = high_shear_e1
low_Rein = self._theta_E_start - 0.1
hi_Rein = self._theta_E_start + 0.1
low_centerx = -0.015
hi_centerx = 0.015
low_centery = low_centerx
hi_centery = hi_centerx
if self._constrain_params is not None:
if 'shear' in self._constrain_params.keys():
shear_value = self._constrain_params['shear'][0]
low_shear_e1 = -0.5*shear_value
high_shear_e1 = 0.5*shear_value
low_shear_e2 = -(shear_value ** 2 - low_shear_e1 ** 2)**0.5
high_shear_e2 = (shear_value ** 2 - low_shear_e1 ** 2) ** 0.5
sie_list_low = [low_Rein, low_centerx, low_centery, low_e1, low_e2]
sie_list_high = [hi_Rein, hi_centerx, hi_centery, high_e1, high_e2]
shear_list_low = [low_shear_e1, low_shear_e2]
shear_list_high = [high_shear_e1, high_shear_e2]
return sie_list_low+shear_list_low,sie_list_high+shear_list_high
@export
class VariablePowerLaw_Shear(object):
def __init__(self,lens_model_list,kwargs_lens,xpos,ypos,constrain_params):
assert lens_model_list[0] in ['EPL', 'SPEP', 'SPEMD', 'PEMD']
assert lens_model_list[1] == 'SHEAR'
self._Ntovary = 2
self._k_start = 2
self._kwargs_lens = kwargs_lens
self._theta_E_start = approx_theta_E(xpos, ypos)
self._tovary_indicies = [0, 1]
self.param_names = [['theta_E', 'center_x', 'center_y', 'e1', 'e2','gamma'], ['gamma1', 'gamma2']]
self.fixed_names = [[], []]
self.fixed_values = [{}, {}]
self.params_to_vary = ['theta_E', 'center_x', 'center_y', 'e1', 'e2','gamma','shear_e1','shear_e2']
self._constrain_params = constrain_params
def _new_ellip(self,start_e1,start_e2,delta_phi,delta_gamma):
phi_start, gamma_start = ellipticity2phi_q(start_e1,start_e2)
phi_min,phi_max = phi_start + delta_phi, phi_start-delta_phi
gamma_min,gamma_max = max(0.001,gamma_start-delta_gamma),min(0.99,gamma_start+delta_gamma)
e1_min, e2_min = phi_q2_ellipticity(phi_min, gamma_min)
e1_max, e2_max = phi_q2_ellipticity(phi_max, gamma_max)
return e1_min,e2_min,e1_max,e2_max
def _new_shear(self, start_e1, start_e2, delta_phi, delta_gamma):
phi_start, gamma_start = shear_cartesian2polar(start_e1, start_e2)
phi_min, phi_max = phi_start + delta_phi, phi_start - delta_phi
gamma_min, gamma_max = max(0.0001,gamma_start - delta_gamma), gamma_start + delta_gamma
e1_min, e2_min = shear_polar2cartesian(phi_min, gamma_min)
e1_max, e2_max = shear_polar2cartesian(phi_max, gamma_max)
return e1_min, e2_min, e1_max, e2_max
def get_param_ranges(self,reoptimize=False, scale = 1):
if reoptimize:
delta_phi,delta_ellip = scale * 30*np.pi*180**-1, scale * 0.15
delta_shear_phi,delta_shear = scale * 30*np.pi*180**-1, scale * 0.02
low_e1,low_e2, high_e1,high_e2 = self._new_ellip(self._kwargs_lens[0]['e1'], self._kwargs_lens[0]['e2'],
delta_phi, delta_ellip)
low_shear_e1,low_shear_e2,high_shear_e1,high_shear_e2 = self._new_shear(self._kwargs_lens[1]['gamma1'],
self._kwargs_lens[1]['gamma2'],
delta_shear_phi, delta_shear)
theta_E = scale * 0.005
center = 0.005
low_Rein = self._kwargs_lens[0]['theta_E'] - theta_E
hi_Rein = self._kwargs_lens[0]['theta_E'] + theta_E
low_centerx = self._kwargs_lens[0]['center_x'] - center
hi_centerx = self._kwargs_lens[0]['center_x'] + center
low_centery = self._kwargs_lens[0]['center_y'] - center
hi_centery = self._kwargs_lens[0]['center_y'] + center
low_gamma = self._kwargs_lens[0]['gamma'] - 0.03
high_gamma = self._kwargs_lens[0]['gamma'] + 0.03
if self._constrain_params is not None:
# keep the same PA, but change the shear magnitude
if 'shear' in self._constrain_params.keys():
phi_start, gamma_start = shear_cartesian2polar(self._kwargs_lens[1]['gamma1'],
self._kwargs_lens[1]['gamma2'])
rescale = self._constrain_params['shear'][0] * gamma_start ** -1
low_shear_e1 = self._kwargs_lens[1]['gamma1'] * rescale * 0.8
high_shear_e1 = self._kwargs_lens[1]['gamma1'] * rescale * 1.2
low_shear_e2 = self._kwargs_lens[1]['gamma2'] * rescale * 0.8
high_shear_e2 = self._kwargs_lens[1]['gamma2'] * rescale * 1.2
else:
low_e1 = -0.3
low_e2 = low_e1
high_e1 = 0.3
high_e2 = high_e1
low_shear_e1 = -0.08
high_shear_e1 = 0.08
low_shear_e2 = low_shear_e1
high_shear_e2 = high_shear_e1
low_Rein = self._theta_E_start - 0.1
hi_Rein = self._theta_E_start + 0.1
low_centerx = -0.015
hi_centerx = 0.015
low_centery = low_centerx
hi_centery = hi_centerx
low_gamma = self._kwargs_lens[0]['gamma'] - 0.06
high_gamma = self._kwargs_lens[0]['gamma'] + 0.06
if self._constrain_params is not None:
if 'shear' in self._constrain_params.keys():
shear_value = self._constrain_params['shear'][0]
low_shear_e1 = -0.5*shear_value
high_shear_e1 = 0.5*shear_value
low_shear_e2 = -(shear_value ** 2 - low_shear_e1 ** 2)**0.5
high_shear_e2 = (shear_value ** 2 - low_shear_e1 ** 2) ** 0.5
sie_list_low = [low_Rein, low_centerx, low_centery, low_e1, low_e2, low_gamma]
sie_list_high = [hi_Rein, hi_centerx, hi_centery, high_e1, high_e2, high_gamma]
shear_list_low = [low_shear_e1, low_shear_e2]
shear_list_high = [high_shear_e1, high_shear_e2]
return sie_list_low+shear_list_low, sie_list_high+shear_list_high
| 40.906158 | 130 | 0.601477 | 1,937 | 13,949 | 3.906557 | 0.060403 | 0.075327 | 0.090657 | 0.055504 | 0.929827 | 0.923748 | 0.923748 | 0.923748 | 0.897582 | 0.897582 | 0 | 0.051228 | 0.290487 | 13,949 | 340 | 131 | 41.026471 | 0.713347 | 0.006954 | 0 | 0.836207 | 0 | 0 | 0.052206 | 0 | 0 | 0 | 0 | 0 | 0.034483 | 1 | 0.047414 | false | 0 | 0.017241 | 0 | 0.116379 | 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 |
8a95df03c43b16af63a4429d55c5b74fd18d908f | 8,962 | py | Python | tests/test_xyz_analysis.py | aioneers/aiox | e4a8a053af9b0ca81728f29af2117b65d5702207 | [
"MIT"
] | null | null | null | tests/test_xyz_analysis.py | aioneers/aiox | e4a8a053af9b0ca81728f29af2117b65d5702207 | [
"MIT"
] | 1 | 2022-01-12T08:50:47.000Z | 2022-01-12T08:50:47.000Z | tests/test_xyz_analysis.py | aioneers/aiox | e4a8a053af9b0ca81728f29af2117b65d5702207 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import aiox
def test_xyz_analysis():
quantities = {}
np.random.seed(seed=42)
df = pd.DataFrame()
# create random time-series with aiox.create_time_series function
for i in range(100):
quantities = aiox.create_time_series(
distribution="normal",
p_mean=1000,
p_std=300,
num_periods=12,
periodicity="M",
start_date="2020-01-01",
actual_material_number=str("{:04d}".format(np.random.randint(1000)))
+ str("-")
+ str("{:02d}".format(np.random.randint(20)))
+ str("-")
+ str("{:05d}".format(np.random.randint(5))),
standard_price=1,
intermittency=0.2,
)
df = df.append(quantities)
# post process sample data
df = df.reset_index()
df = df.drop(columns=["Value", "index"])
# shorten date format from YYYY-MM-DD to YYYY-MM
df["Date"] = df["Date"].astype("str").str[:5] + df["Date"].astype("str").str[-2:]
# split key return from function create_time_series into three columns
df[["Material", "Country", "Region"]] = df["Material"].str.split("-", expand=True)
# sort columns into more logical order
df = df[["Material", "Country", "Region", "Date", "Quantity"]]
# delete random periods as actual data a likely to be incomplete
df = df.drop(np.random.choice(len(df), (int(len(df) / 2))))
# run test with created sample data
result = aiox.xyz_analysis(
df=df,
primary_dimension_keys=["Material", "Country", "Region"],
relevant_numeric_dimension="Quantity",
relevant_date_dimension="Date",
periods=12,
start_date="2020-01-01",
frequency="M",
)
assert len(result)
def test_xyz_analysis_key_without_demand():
quantities = {}
np.random.seed(seed=42)
df = pd.DataFrame()
# create random time series with aiox.create_time_series function
for i in range(1):
quantities = aiox.create_time_series(
distribution="normal",
p_mean=1000,
p_std=300,
num_periods=12,
periodicity="M",
start_date="2020-01-01",
actual_material_number=str("{:04d}".format(np.random.randint(1000)))
+ str("-")
+ str("{:02d}".format(np.random.randint(20)))
+ str("-")
+ str("{:05d}".format(np.random.randint(5))),
standard_price=1,
intermittency=0.2,
)
df = df.append(quantities)
# post process sample data
df = df.reset_index()
df = df.drop(columns=["Value", "index"])
# shorten date format from YYYY-MM-DD to YYYY-MM
df["Date"] = df["Date"].astype("str").str[:5] + df["Date"].astype("str").str[-2:]
# split key return from function create_time_series into three columns
df[["Material", "Country", "Region"]] = df["Material"].str.split("-", expand=True)
# sort columns into more logical order
df = df[["Material", "Country", "Region", "Date", "Quantity"]]
# delete random periods as actual data a likely to be incomplete
df = df.drop(np.random.choice(len(df), (int(len(df) / 2))))
# set demand quantity to 0 for each period
df["Quantity"] = 0
# run test with created sample data
result = aiox.xyz_analysis(
df=df,
primary_dimension_keys=["Material", "Country", "Region"],
relevant_numeric_dimension="Quantity",
relevant_date_dimension="Date",
periods=12,
start_date="2020-01-01",
frequency="M",
)
assert len(result[result["XYZ_Class"] == "N"]) == 1
def test_xyz_analysis_str_as_input_for_pri_dim():
quantities = {}
np.random.seed(seed=42)
df = pd.DataFrame()
# create random time series with aiox.create_time_series function
for i in range(10):
quantities = aiox.create_time_series(
distribution="normal",
p_mean=1000,
p_std=300,
num_periods=12,
periodicity="M",
start_date="2020-01-01",
actual_material_number=str("{:04d}".format(np.random.randint(1000)))
+ str("-")
+ str("{:02d}".format(np.random.randint(20)))
+ str("-")
+ str("{:05d}".format(np.random.randint(5))),
standard_price=1,
intermittency=0.2,
)
df = df.append(quantities)
# post process sample data
df = df.reset_index()
df = df.drop(columns=["Value", "index"])
# shorten date format from YYYY-MM-DD to YYYY-MM
df["Date"] = df["Date"].astype("str").str[:5] + df["Date"].astype("str").str[-2:]
# split key return from function create_time_series into three columns
df[["Material", "Country", "Region"]] = df["Material"].str.split("-", expand=True)
# sort columns into more logical order
df = df[["Material", "Country", "Region", "Date", "Quantity"]]
# delete random periods as actual data a likely to be incomplete
df = df.drop(np.random.choice(len(df), (int(len(df) / 2))))
# run test with created sample data
result = aiox.xyz_analysis(
df=df,
primary_dimension_keys="Material",
relevant_numeric_dimension="Quantity",
relevant_date_dimension="Date",
periods=12,
start_date="2020-01-01",
frequency="M",
)
assert len(result)
def test_xyz_analysis_short_list_as_input_for_pri_dim():
quantities = {}
np.random.seed(seed=42)
df = pd.DataFrame()
# create random time series with aiox.create_time_series function
for i in range(10):
quantities = aiox.create_time_series(
distribution="normal",
p_mean=1000,
p_std=300,
num_periods=12,
periodicity="M",
start_date="2020-01-01",
actual_material_number=str("{:04d}".format(np.random.randint(1000)))
+ str("-")
+ str("{:02d}".format(np.random.randint(20)))
+ str("-")
+ str("{:05d}".format(np.random.randint(5))),
standard_price=1,
intermittency=0.2,
)
df = df.append(quantities)
# post process sample data
df = df.reset_index()
df = df.drop(columns=["Value", "index"])
# shorten date format from YYYY-MM-DD to YYYY-MM
df["Date"] = df["Date"].astype("str").str[:5] + df["Date"].astype("str").str[-2:]
# split key return from function create_time_series into three columns
df[["Material", "Country", "Region"]] = df["Material"].str.split("-", expand=True)
# sort columns into more logical order
df = df[["Material", "Country", "Region", "Date", "Quantity"]]
# delete random periods as actual data a likely to be incomplete
df = df.drop(np.random.choice(len(df), (int(len(df) / 2))))
# run test with created sample data
result = aiox.xyz_analysis(
df=df,
primary_dimension_keys=["Material"],
relevant_numeric_dimension="Quantity",
relevant_date_dimension="Date",
periods=12,
start_date="2020-01-01",
frequency="M",
)
assert len(result)
def test_xyz_analysis_weekly():
quantities = {}
np.random.seed(seed=42)
df = pd.DataFrame()
# create random time series with aiox.create_time_series function
for i in range(10):
quantities = aiox.create_time_series(
distribution="normal",
p_mean=1000,
p_std=300,
num_periods=52,
periodicity="W",
start_date="2020-01-01",
actual_material_number=str("{:04d}".format(np.random.randint(1000)))
+ str("-")
+ str("{:02d}".format(np.random.randint(20)))
+ str("-")
+ str("{:05d}".format(np.random.randint(5))),
standard_price=1,
intermittency=0.2,
)
df = df.append(quantities)
# post process sample data
df = df.reset_index()
df = df.drop(columns=["Value", "index"])
# shorten date format from YYYY-MM-DD to YYYY-MM
df["Date"] = df["Date"].astype("str").str[:5] + df["Date"].astype("str").str[-2:]
# split key return from function create_time_series into three columns
df[["Material", "Country", "Region"]] = df["Material"].str.split("-", expand=True)
# sort columns into more logical order
df = df[["Material", "Country", "Region", "Date", "Quantity"]]
# delete random periods as actual data a likely to be incomplete
df = df.drop(np.random.choice(len(df), (int(len(df) / 2))))
# run test with created sample data
result = aiox.xyz_analysis(
df=df,
primary_dimension_keys="Material",
relevant_numeric_dimension="Quantity",
relevant_date_dimension="Date",
periods=52,
start_date="2020-01",
frequency="W",
)
assert len(result)
| 35.705179 | 86 | 0.588485 | 1,136 | 8,962 | 4.521127 | 0.110035 | 0.023364 | 0.046729 | 0.061332 | 0.955023 | 0.955023 | 0.955023 | 0.955023 | 0.955023 | 0.955023 | 0 | 0.037858 | 0.26021 | 8,962 | 250 | 87 | 35.848 | 0.736802 | 0.193595 | 0 | 0.851852 | 0 | 0 | 0.116273 | 0 | 0 | 0 | 0 | 0 | 0.026455 | 1 | 0.026455 | false | 0 | 0.015873 | 0 | 0.042328 | 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 |
8abcfa85ea60ff47d2fd663dfa6b14cdc5b3bfb2 | 5,931 | py | Python | tests/test_typeguard.py | kklein/icontract | 718ef1733cc2cce6d3c8f59a5a37de96f8be6664 | [
"MIT"
] | 244 | 2018-08-15T22:58:58.000Z | 2022-03-12T16:10:39.000Z | tests/test_typeguard.py | kklein/icontract | 718ef1733cc2cce6d3c8f59a5a37de96f8be6664 | [
"MIT"
] | 157 | 2018-08-29T21:36:47.000Z | 2022-02-14T19:30:24.000Z | tests/test_typeguard.py | kklein/icontract | 718ef1733cc2cce6d3c8f59a5a37de96f8be6664 | [
"MIT"
] | 23 | 2019-04-24T11:09:10.000Z | 2022-02-14T15:56:26.000Z | # pylint: disable=missing-docstring
# pylint: disable=no-self-use
# pylint: disable=invalid-name
# pylint: disable=unused-argument
import textwrap
import unittest
from typing import Optional
import typeguard
import icontract
import tests.error
class TestPrecondition(unittest.TestCase):
def test_both_precondition_and_typeguard_ok(self) -> None:
@typeguard.typechecked
@icontract.require(lambda x: x > 0)
def some_func(x: int) -> None:
pass
some_func(1)
def test_precondition_ok_and_typeguard_fails(self) -> None:
class A:
def is_ok(self) -> bool:
return True
class B:
def is_ok(self) -> bool:
return True
@typeguard.typechecked
@icontract.require(lambda x: x.is_ok())
def some_func(x: A) -> None:
pass
b = B()
type_error = None # type: Optional[TypeError]
try:
some_func(b) # type: ignore
except TypeError as err:
type_error = err
expected = 'type of argument "x" must be '
self.assertEqual(expected, str(type_error)[:len(expected)])
def test_precondition_fails_and_typeguard_ok(self) -> None:
@typeguard.typechecked
@icontract.require(lambda x: x > 0)
def some_func(x: int) -> None:
pass
violation_error = None # type: Optional[icontract.ViolationError]
try:
some_func(-10)
except icontract.ViolationError as err:
violation_error = err
self.assertIsNotNone(violation_error)
self.assertEqual('x > 0: x was -10', tests.error.wo_mandatory_location(str(violation_error)))
class TestInvariant(unittest.TestCase):
def test_both_invariant_and_typeguard_ok(self) -> None:
@typeguard.typechecked
@icontract.invariant(lambda self: self.x > 0)
class A:
def __init__(self, x: int) -> None:
self.x = x
def do_something(self, y: int) -> None:
self.x += y
a = A(x=1)
a.do_something(y=2)
def test_invariant_ok_and_typeguard_fails(self) -> None:
class A:
def is_ok(self) -> bool:
return True
class B:
def is_ok(self) -> bool:
return True
@typeguard.typechecked
@icontract.invariant(lambda self: self.x.is_ok())
class C:
def __init__(self, a: A) -> None:
self.a = a
b = B()
type_error = None # type: Optional[TypeError]
try:
_ = C(a=b) # type: ignore
except TypeError as err:
type_error = err
expected = 'type of argument "a" must be '
self.assertEqual(expected, str(type_error)[:len(expected)])
def test_invariant_fails_and_typeguard_ok(self) -> None:
@typeguard.typechecked
@icontract.invariant(lambda self: self.x > 0)
class A:
def __init__(self, x: int) -> None:
self.x = x
def __repr__(self) -> str:
return "an instance of {}".format(self.__class__.__name__)
violation_error = None # type: Optional[icontract.ViolationError]
try:
_ = A(-1)
except icontract.ViolationError as err:
violation_error = err
self.assertIsNotNone(violation_error)
self.assertEqual(
textwrap.dedent('''\
self.x > 0:
self was an instance of A
self.x was -1'''), tests.error.wo_mandatory_location(str(violation_error)))
class TestInheritance(unittest.TestCase):
def test_both_invariant_and_typeguard_ok(self) -> None:
@typeguard.typechecked
@icontract.invariant(lambda self: self.x > 0)
class A(icontract.DBC):
def __init__(self, x: int) -> None:
self.x = x
def do_something(self, y: int) -> None:
self.x += y
class B(A):
pass
b = B(x=1)
b.do_something(y=2)
def test_invariant_ok_and_typeguard_fails(self) -> None:
class A:
def is_ok(self) -> bool:
return True
class B:
def is_ok(self) -> bool:
return True
@typeguard.typechecked
@icontract.invariant(lambda self: self.x.is_ok())
class C(icontract.DBC):
def __init__(self, a: A) -> None:
self.a = a
class D(C):
pass
b = B()
type_error = None # type: Optional[TypeError]
try:
_ = D(a=b) # type: ignore
except TypeError as err:
type_error = err
self.assertIsNotNone(type_error)
expected = 'type of argument "a" must be '
self.assertEqual(expected, str(type_error)[:len(expected)])
def test_invariant_fails_and_typeguard_ok(self) -> None:
@typeguard.typechecked
@icontract.invariant(lambda self: self.x > 0)
class A:
def __init__(self, x: int) -> None:
self.x = x
def __repr__(self) -> str:
return "an instance of {}".format(self.__class__.__name__)
class B(A):
def __repr__(self) -> str:
return "an instance of {}".format(self.__class__.__name__)
violation_error = None # type: Optional[icontract.ViolationError]
try:
_ = B(-1)
except icontract.ViolationError as err:
violation_error = err
self.assertIsNotNone(violation_error)
self.assertEqual(
textwrap.dedent('''\
self.x > 0:
self was an instance of B
self.x was -1'''), tests.error.wo_mandatory_location(str(violation_error)))
if __name__ == '__main__':
unittest.main()
| 28.652174 | 101 | 0.562806 | 688 | 5,931 | 4.613372 | 0.127907 | 0.031506 | 0.082231 | 0.034026 | 0.861374 | 0.845306 | 0.845306 | 0.84058 | 0.822936 | 0.776938 | 0 | 0.005599 | 0.337548 | 5,931 | 206 | 102 | 28.791262 | 0.80224 | 0.061035 | 0 | 0.766234 | 0 | 0 | 0.065527 | 0 | 0 | 0 | 0 | 0 | 0.064935 | 1 | 0.188312 | false | 0.032468 | 0.038961 | 0.058442 | 0.402597 | 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 |
0a01153eee97d347527f48c2044409c9ecd289c7 | 190 | py | Python | meta_mb/meta_algos/__init__.py | iclavera/meta-mb | a1204e573c1415161129403cfb287bf120488fd0 | [
"MIT"
] | 4 | 2021-01-07T08:22:51.000Z | 2021-12-27T10:53:14.000Z | meta_mb/meta_algos/__init__.py | iclavera/meta-mb | a1204e573c1415161129403cfb287bf120488fd0 | [
"MIT"
] | null | null | null | meta_mb/meta_algos/__init__.py | iclavera/meta-mb | a1204e573c1415161129403cfb287bf120488fd0 | [
"MIT"
] | null | null | null | from meta_mb.meta_algos.base import MAMLAlgo
from meta_mb.meta_algos.ppo_maml import PPOMAML
from meta_mb.meta_algos.trpo_maml import TRPOMAML
from meta_mb.meta_algos.vpg_maml import VPGMAML | 47.5 | 49 | 0.878947 | 35 | 190 | 4.457143 | 0.4 | 0.205128 | 0.25641 | 0.358974 | 0.487179 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.078947 | 190 | 4 | 50 | 47.5 | 0.891429 | 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 |
0a29610a71eaa52eaf4e5390522698b48706f8a6 | 151 | py | Python | graphical_models/__init__.py | farzana0/pgm_graph_inference | 37f1ea68f191d4f3021e7fdc8dd246d945e37ead | [
"MIT"
] | 12 | 2019-04-28T21:30:14.000Z | 2022-03-24T10:38:16.000Z | graphical_models/__init__.py | farzana0/pgm_graph_inference | 37f1ea68f191d4f3021e7fdc8dd246d945e37ead | [
"MIT"
] | null | null | null | graphical_models/__init__.py | farzana0/pgm_graph_inference | 37f1ea68f191d4f3021e7fdc8dd246d945e37ead | [
"MIT"
] | 5 | 2020-02-04T20:16:14.000Z | 2021-12-02T14:44:48.000Z | """
Interface to GraphicalModels.
"""
from graphical_models.data_structs import BinaryMRF
from graphical_models.data_gen import construct_binary_mrf | 18.875 | 58 | 0.84106 | 19 | 151 | 6.368421 | 0.736842 | 0.214876 | 0.31405 | 0.380165 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.099338 | 151 | 8 | 58 | 18.875 | 0.889706 | 0.192053 | 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 |
0a3a6980e66f3062bb3cdde565083643876e557c | 701,108 | py | Python | rf_info/data/b_allocations.py | cosmicc/rf_info | 5141c81eb86a62d13a586444fcf9c90d57c967d9 | [
"MIT"
] | 2 | 2020-02-01T00:42:15.000Z | 2021-02-17T09:45:06.000Z | rf_info/data/b_allocations.py | cosmicc/rf_info | 5141c81eb86a62d13a586444fcf9c90d57c967d9 | [
"MIT"
] | 4 | 2020-03-24T18:14:12.000Z | 2021-06-02T01:02:12.000Z | rf_info/data/b_allocations.py | cosmicc/rf_info | 5141c81eb86a62d13a586444fcf9c90d57c967d9 | [
"MIT"
] | null | null | null | from rf_info.data.rangekeydict import RangeKeyDict
ALLOCATIONS = RangeKeyDict({
(0, 8301): (False, False, False, False, False, ['(Not Allocated)'], [], ['[5.53]: Administrations authorizing the use of frequencies below 8.3 kHz shall ensure that no harmful interference is caused to services to which the bands above 8.3 kHz are allocated. (WRC-12)', '[5.54]: Administrations conducting scientific research using frequencies below 8.3 kHz are urged to advise other administrations that may be concerned in order that such research may be afforded all practicable protection from harmful interference. (WRC-12)']),
(8300, 9001): (False, False, False, False, False, ['Meteorological Aids [5.54A][5.54B][5.54C]'], [], ['[5.54A]: Use of the 8.3-11.3 kHz frequency band by stations in the meteorological aids service is limited to passive use only. In the band 9-11.3 kHz, meteorological aids stations shall not claim protection from stations of the radionavigation service submitted for notification to the Bureau prior to 1 January 2013. For sharing between stations of the meteorological aids service and stations in the radionavigation service submitted for notification after this date, the most recent version of Recommendation ITU-R RS.1881 should be applied. (WRC-12)', '[5.54B]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Egypt, the United Arab Emirates, the Russian Federation, Iran (Islamic Republic of), Iraq, Kuwait, Lebanon, Morocco, Qatar, the Syrian Arab Republic, Sudan and Tunisia, the frequency band 8.3-9 kHz is also allocated to the radionavigation, fixed and mobile services on a primary basis. (WRC-15)', '[5.54C]: Additional allocation: in China, the frequency band 8.3-9 kHz is also allocated to the maritime radionavigation and maritime mobile services on a primary basis. (WRC-12)']),
(9000, 11301): (False, False, False, False, False, ['Meteorological Aids [5.54A]', 'Radionavigation'], [], ['[5.54A]: Use of the 8.3-11.3 kHz frequency band by stations in the meteorological aids service is limited to passive use only. In the band 9-11.3 kHz, meteorological aids stations shall not claim protection from stations of the radionavigation service submitted for notification to the Bureau prior to 1 January 2013. For sharing between stations of the meteorological aids service and stations in the radionavigation service submitted for notification after this date, the most recent version of Recommendation ITU-R RS.1881 should be applied. (WRC-12)']),
(11300, 14001): (False, False, False, False, False, ['Radionavigation'], [], []),
(14000, 19951): (False, True, True, False, False, ['Maritime Mobile [5.57]'], [], ['[5.57]: The use of the bands 14-19.95 kHz, 20.05-70 kHz and 70-90 kHz (72-84 kHz and 86-90 kHz in Region 1) by the maritime mobile service is limited to coast radiotelegraph stations (A1A and F1B only). Exceptionally, the use of class J2B or J7B emissions is authorized subject to the necessary bandwidth not exceeding that normally used for class A1A or F1B emissions in the band concerned.', '[5.55]: Additional allocation: in Armenia, the Russian Federation, Georgia, Kyrgyzstan, Tajikistan and Turkmenistan, the frequency band 14-17 kHz is also allocated to the radionavigation service on a primary basis. (WRC-15)', '[5.56]: The stations of services to which the bands 14-19.95 kHz and 20.05-70 kHz and in Region 1 also the bands 72-84 kHz and 86-90 kHz are allocated may transmit standard frequency and time signals. Such stations shall be afforded protection from harmful interference. In Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Kyrgyzstan, Tajikistan and Turkmenistan, the frequencies 25 kHz and 50 kHz will be used for this purpose under the same conditions. (WRC-12)']),
(19950, 20051): (False, False, False, False, False, ['Standard Frequency And Time Signal (20 Khz)'], [], []),
(20050, 70001): (False, True, True, False, False, ['Maritime Mobile [5.57]'], [], ['[5.57]: The use of the bands 14-19.95 kHz, 20.05-70 kHz and 70-90 kHz (72-84 kHz and 86-90 kHz in Region 1) by the maritime mobile service is limited to coast radiotelegraph stations (A1A and F1B only). Exceptionally, the use of class J2B or J7B emissions is authorized subject to the necessary bandwidth not exceeding that normally used for class A1A or F1B emissions in the band concerned.', '[5.56]: The stations of services to which the bands 14-19.95 kHz and 20.05-70 kHz and in Region 1 also the bands 72-84 kHz and 86-90 kHz are allocated may transmit standard frequency and time signals. Such stations shall be afforded protection from harmful interference. In Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Kyrgyzstan, Tajikistan and Turkmenistan, the frequencies 25 kHz and 50 kHz will be used for this purpose under the same conditions. (WRC-12)', '[5.58]: Additional allocation: in Armenia, Azerbaijan, the Russian Federation, Georgia, Kazakhstan, Kyrgyzstan, Tajikistan and Turkmenistan, the band 67-70 kHz is also allocated to the radionavigation service on a primary basis. (WRC-2000)']),
(70000, 72001): (False, False, False, False, False, ['Radionavigation [5.60]'], [], ['[5.60]: In the bands 70-90 kHz (70-86 kHz in Region 1) and 110-130 kHz (112-130 kHz in Region 1), pulsed radionavigation systems may be used on condition that they do not cause harmful interference to other services to which these bands are allocated.']),
(72000, 84001): (False, True, True, False, False, ['Maritime Mobile [5.57]', 'Radionavigation [5.60]'], [], ['[5.57]: The use of the bands 14-19.95 kHz, 20.05-70 kHz and 70-90 kHz (72-84 kHz and 86-90 kHz in Region 1) by the maritime mobile service is limited to coast radiotelegraph stations (A1A and F1B only). Exceptionally, the use of class J2B or J7B emissions is authorized subject to the necessary bandwidth not exceeding that normally used for class A1A or F1B emissions in the band concerned.', '[5.60]: In the bands 70-90 kHz (70-86 kHz in Region 1) and 110-130 kHz (112-130 kHz in Region 1), pulsed radionavigation systems may be used on condition that they do not cause harmful interference to other services to which these bands are allocated.', '[5.56]: The stations of services to which the bands 14-19.95 kHz and 20.05-70 kHz and in Region 1 also the bands 72-84 kHz and 86-90 kHz are allocated may transmit standard frequency and time signals. Such stations shall be afforded protection from harmful interference. In Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Kyrgyzstan, Tajikistan and Turkmenistan, the frequencies 25 kHz and 50 kHz will be used for this purpose under the same conditions. (WRC-12)']),
(84000, 86001): (False, False, False, False, False, ['Radionavigation [5.60]'], [], ['[5.60]: In the bands 70-90 kHz (70-86 kHz in Region 1) and 110-130 kHz (112-130 kHz in Region 1), pulsed radionavigation systems may be used on condition that they do not cause harmful interference to other services to which these bands are allocated.']),
(86000, 90001): (False, True, True, False, False, ['Maritime Mobile [5.57]', 'Radionavigation'], [], ['[5.57]: The use of the bands 14-19.95 kHz, 20.05-70 kHz and 70-90 kHz (72-84 kHz and 86-90 kHz in Region 1) by the maritime mobile service is limited to coast radiotelegraph stations (A1A and F1B only). Exceptionally, the use of class J2B or J7B emissions is authorized subject to the necessary bandwidth not exceeding that normally used for class A1A or F1B emissions in the band concerned.', '[5.56]: The stations of services to which the bands 14-19.95 kHz and 20.05-70 kHz and in Region 1 also the bands 72-84 kHz and 86-90 kHz are allocated may transmit standard frequency and time signals. Such stations shall be afforded protection from harmful interference. In Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Kyrgyzstan, Tajikistan and Turkmenistan, the frequencies 25 kHz and 50 kHz will be used for this purpose under the same conditions. (WRC-12)']),
(90000, 110001): (False, True, False, False, False, ['Radionavigation [5.62]'], [], ['[5.62]: Administrations which operate stations in the radionavigation service in the band 90-110 kHz are urged to coordinate technical and operating characteristics in such a way as to avoid harmful interference to the services provided by these stations.', '[5.64]: Only classes A1A or F1B, A2C, A3C, F1C or F3C emissions are authorized for stations of the fixed service in the bands allocated to this service between 90 kHz and 160 kHz (148.5 kHz in Region 1) and for stations of the maritime mobile service in the bands allocated to this service between 110 kHz and 160 kHz (148.5 kHz in Region 1). Exceptionally, class J2B or J7B emissions are also authorized in the bands between 110 kHz and 160 kHz (148.5 kHz in Region 1) for stations of the maritime mobile service.']),
(110000, 112001): (False, True, True, False, False, ['Maritime Mobile', 'Radionavigation'], [], ['[5.64]: Only classes A1A or F1B, A2C, A3C, F1C or F3C emissions are authorized for stations of the fixed service in the bands allocated to this service between 90 kHz and 160 kHz (148.5 kHz in Region 1) and for stations of the maritime mobile service in the bands allocated to this service between 110 kHz and 160 kHz (148.5 kHz in Region 1). Exceptionally, class J2B or J7B emissions are also authorized in the bands between 110 kHz and 160 kHz (148.5 kHz in Region 1) for stations of the maritime mobile service.']),
(112000, 115001): (False, False, False, False, False, ['Radionavigation [5.60]'], [], ['[5.60]: In the bands 70-90 kHz (70-86 kHz in Region 1) and 110-130 kHz (112-130 kHz in Region 1), pulsed radionavigation systems may be used on condition that they do not cause harmful interference to other services to which these bands are allocated.']),
(115000, 117601): (False, True, False, False, False, ['Radionavigation [5.60]'], ['Maritime Mobile'], ['[5.60]: In the bands 70-90 kHz (70-86 kHz in Region 1) and 110-130 kHz (112-130 kHz in Region 1), pulsed radionavigation systems may be used on condition that they do not cause harmful interference to other services to which these bands are allocated.', '[5.64]: Only classes A1A or F1B, A2C, A3C, F1C or F3C emissions are authorized for stations of the fixed service in the bands allocated to this service between 90 kHz and 160 kHz (148.5 kHz in Region 1) and for stations of the maritime mobile service in the bands allocated to this service between 110 kHz and 160 kHz (148.5 kHz in Region 1). Exceptionally, class J2B or J7B emissions are also authorized in the bands between 110 kHz and 160 kHz (148.5 kHz in Region 1) for stations of the maritime mobile service.', '[5.66]: Different category of service: in Germany, the allocation of the band 115-117.6 kHz to the fixed and maritime mobile services is on a primary basis (see No. 5.33) and to the radionavigation service on a secondary basis (see No. 5.32).']),
(117600, 126001): (False, True, True, False, False, ['Maritime Mobile', 'Radionavigation [5.60]'], [], ['[5.60]: In the bands 70-90 kHz (70-86 kHz in Region 1) and 110-130 kHz (112-130 kHz in Region 1), pulsed radionavigation systems may be used on condition that they do not cause harmful interference to other services to which these bands are allocated.', '[5.64]: Only classes A1A or F1B, A2C, A3C, F1C or F3C emissions are authorized for stations of the fixed service in the bands allocated to this service between 90 kHz and 160 kHz (148.5 kHz in Region 1) and for stations of the maritime mobile service in the bands allocated to this service between 110 kHz and 160 kHz (148.5 kHz in Region 1). Exceptionally, class J2B or J7B emissions are also authorized in the bands between 110 kHz and 160 kHz (148.5 kHz in Region 1) for stations of the maritime mobile service.']),
(126000, 129001): (False, False, False, False, False, ['Radionavigation [5.60]'], [], ['[5.60]: In the bands 70-90 kHz (70-86 kHz in Region 1) and 110-130 kHz (112-130 kHz in Region 1), pulsed radionavigation systems may be used on condition that they do not cause harmful interference to other services to which these bands are allocated.']),
(129000, 130001): (False, True, True, False, False, ['Maritime Mobile', 'Radionavigation [5.60]'], [], ['[5.60]: In the bands 70-90 kHz (70-86 kHz in Region 1) and 110-130 kHz (112-130 kHz in Region 1), pulsed radionavigation systems may be used on condition that they do not cause harmful interference to other services to which these bands are allocated.', '[5.64]: Only classes A1A or F1B, A2C, A3C, F1C or F3C emissions are authorized for stations of the fixed service in the bands allocated to this service between 90 kHz and 160 kHz (148.5 kHz in Region 1) and for stations of the maritime mobile service in the bands allocated to this service between 110 kHz and 160 kHz (148.5 kHz in Region 1). Exceptionally, class J2B or J7B emissions are also authorized in the bands between 110 kHz and 160 kHz (148.5 kHz in Region 1) for stations of the maritime mobile service.']),
(130000, 135701): (False, True, True, False, False, ['Maritime Mobile'], [], ['[5.64]: Only classes A1A or F1B, A2C, A3C, F1C or F3C emissions are authorized for stations of the fixed service in the bands allocated to this service between 90 kHz and 160 kHz (148.5 kHz in Region 1) and for stations of the maritime mobile service in the bands allocated to this service between 110 kHz and 160 kHz (148.5 kHz in Region 1). Exceptionally, class J2B or J7B emissions are also authorized in the bands between 110 kHz and 160 kHz (148.5 kHz in Region 1) for stations of the maritime mobile service.', '[5.67]: Additional allocation: in Mongolia, Kyrgyzstan and Turkmenistan, the band 130-148.5 kHz is also allocated to the radionavigation service on a secondary basis. Within and between these countries this service shall have an equal right to operate. (WRC-07)']),
(135700, 137801): (True, True, True, False, False, ['Maritime Mobile'], ['Amateur [5.67A]'], ['[5.67A]: Stations in the amateur service using frequencies in the band 135.7-137.8 kHz shall not exceed a maximum radiated power of 1 W (e.i.r.p.) and shall not cause harmful interference to stations of the radionavigation service operating in countries listed in No. 5.67. (WRC-07)', '[5.64]: Only classes A1A or F1B, A2C, A3C, F1C or F3C emissions are authorized for stations of the fixed service in the bands allocated to this service between 90 kHz and 160 kHz (148.5 kHz in Region 1) and for stations of the maritime mobile service in the bands allocated to this service between 110 kHz and 160 kHz (148.5 kHz in Region 1). Exceptionally, class J2B or J7B emissions are also authorized in the bands between 110 kHz and 160 kHz (148.5 kHz in Region 1) for stations of the maritime mobile service.', '[5.67]: Additional allocation: in Mongolia, Kyrgyzstan and Turkmenistan, the band 130-148.5 kHz is also allocated to the radionavigation service on a secondary basis. Within and between these countries this service shall have an equal right to operate. (WRC-07)', '[5.67B]: The use of the band 135.7-137.8 kHz in Algeria, Egypt, Iran (Islamic Republic of), Iraq, Lebanon, Syrian Arab Republic, Sudan, South Sudan and Tunisia is limited to the fixed and maritime mobile services. The amateur service shall not be used in the above-mentioned countries in the band 135.7-137.8 kHz, and this should be taken into account by the countries authorizing such use. (WRC-12)']),
(137800, 148501): (False, True, True, False, False, ['Maritime Mobile'], [], ['[5.64]: Only classes A1A or F1B, A2C, A3C, F1C or F3C emissions are authorized for stations of the fixed service in the bands allocated to this service between 90 kHz and 160 kHz (148.5 kHz in Region 1) and for stations of the maritime mobile service in the bands allocated to this service between 110 kHz and 160 kHz (148.5 kHz in Region 1). Exceptionally, class J2B or J7B emissions are also authorized in the bands between 110 kHz and 160 kHz (148.5 kHz in Region 1) for stations of the maritime mobile service.', '[5.67]: Additional allocation: in Mongolia, Kyrgyzstan and Turkmenistan, the band 130-148.5 kHz is also allocated to the radionavigation service on a secondary basis. Within and between these countries this service shall have an equal right to operate. (WRC-07)']),
(148500, 255001): (False, False, False, True, False, ['Broadcasting'], [], ['[5.68]: Alternative allocation: in Congo (Rep. of the), the Dem. Rep. of the Congo and South Africa, the frequency band 160-200 kHz is allocated to the fixed service on a primary basis. (WRC-15)', '[5.69]: Additional allocation: in Somalia, the band 200-255 kHz is also allocated to the aeronautical radionavigation service on a primary basis.', '[5.70]: Alternative allocation: in Angola, Botswana, Burundi, the Central African Rep., Congo (Rep. of the), Ethiopia, Kenya, Lesotho, Madagascar, Malawi, Mozambique, Namibia, Nigeria, Oman, the Dem. Rep. of the Congo, South Africa, Swaziland, Tanzania, Chad, Zambia and Zimbabwe, the band 200-283.5 kHz is allocated to the aeronautical radionavigation service on a primary basis. (WRC-12)']),
(255000, 283501): (False, False, False, True, False, ['Broadcasting', 'Aeronautical Radionavigation'], [], ['[5.70]: Alternative allocation: in Angola, Botswana, Burundi, the Central African Rep., Congo (Rep. of the), Ethiopia, Kenya, Lesotho, Madagascar, Malawi, Mozambique, Namibia, Nigeria, Oman, the Dem. Rep. of the Congo, South Africa, Swaziland, Tanzania, Chad, Zambia and Zimbabwe, the band 200-283.5 kHz is allocated to the aeronautical radionavigation service on a primary basis. (WRC-12)', '[5.71]: Alternative allocation: in Tunisia, the band 255-283.5 kHz is allocated to the broadcasting service on a primary basis.']),
(283500, 315001): (False, False, False, False, False, ['Aeronautical Radionavigation', 'Maritime Radionavigation (Radiobeacons) [5.73]'], [], ['[5.73]: The band 285-325 kHz (283.5-325 kHz in Region 1) in the maritime radionavigation service may be used to transmit supplementary navigational information using narrow-band techniques, on condition that no harmful interference is caused to radiobeacon stations operating in the radionavigation service. (WRC-97)', '[5.74]: Additional Allocation: in Region 1, the frequency band 285.3-285.7 kHz is also allocated to the maritime radionavigation service (other than radiobeacons) on a primary basis.']),
(315000, 325001): (False, False, False, False, False, ['Aeronautical Radionavigation'], ['Maritime Radionavigation (Radiobeacons) [5.73]'], ['[5.73]: The band 285-325 kHz (283.5-325 kHz in Region 1) in the maritime radionavigation service may be used to transmit supplementary navigational information using narrow-band techniques, on condition that no harmful interference is caused to radiobeacon stations operating in the radionavigation service. (WRC-97)', '[5.75]: Different category of service: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Moldova, Kyrgyzstan, Tajikistan, Turkmenistan, Ukraine and the Black Sea areas of Romania, the allocation of the band 315-325 kHz to the maritime radionavigation service is on a primary basis under the condition that in the Baltic Sea area, the assignment of frequencies in this band to new stations in the maritime or aeronautical radionavigation services shall be subject to prior consultation between the administrations concerned. (WRC-07)']),
(325000, 405001): (False, False, False, False, False, ['Aeronautical Radionavigation'], [], []),
(405000, 415001): (False, False, False, False, False, ['Radionavigation [5.76]'], [], ['[5.76]: The frequency 410 kHz is designated for radio direction-finding in the maritime radionavigation service. The other radionavigation services to which the band 405-415 kHz is allocated shall not cause harmful interference to radio direction-finding in the band 406.5-413.5 kHz.']),
(415000, 435001): (False, False, True, False, False, ['Maritime Mobile [5.79]', 'Aeronautical Radionavigation'], [], ['[5.79]: The use of the bands 415-495 kHz and 505-526.5 kHz (505-510 kHz in Region 2) by the maritime mobile service is limited to radiotelegraphy.']),
(435000, 472001): (False, False, True, False, False, ['Maritime Mobile [5.79]'], ['Aeronautical Radionavigation [5.77]'], ['[5.79]: The use of the bands 415-495 kHz and 505-526.5 kHz (505-510 kHz in Region 2) by the maritime mobile service is limited to radiotelegraphy.', '[5.77]: Different category of service: in Australia, China, the French overseas communities of Region 3, Korea (Rep. of), India, Iran (Islamic Republic of), Japan, Pakistan, Papua New Guinea and Sri Lanka, the allocation of the frequency band 415-495 kHz to the aeronautical radionavigation service is on a primary basis. In Armenia, Azerbaijan, Belarus, the Russian Federation, Kazakhstan, Latvia, Uzbekistan and Kyrgyzstan, the allocation of the frequency band 435-495 kHz to the aeronautical radionavigation service is on a primary basis. Administrations in all the aforementioned countries shall take all practical steps necessary to ensure that aeronautical radionavigation stations in the frequency band 435-495 kHz do not cause interference to reception by coast stations of transmissions from ship stations on frequencies designated for ship stations on a worldwide basis. (WRC-12)', '[5.82]: In the maritime mobile service, the frequency 490 kHz is to be used exclusively for the transmission by coast stations of navigational and meteorological warnings and urgent information to ships, by means of narrow-band direct-printing telegraphy. The conditions for use of the frequency 490 kHz are prescribed in Articles 31 and 52. In using the frequency band 415-495 kHz for the aeronautical radionavigation service, administrations are requested to ensure that no harmful interference is caused to the frequency 490 kHz. In using the frequency band 472-479 kHz for the amateur service, administrations shall ensure that no harmful interference is caused to the frequency 490 kHz. (WRC-12)']),
(472000, 479001): (True, False, True, False, False, ['Maritime Mobile [5.79]'], ['Amateur [5.80A]', 'Aeronautical Radionavigation [5.77][5.80]'], ['[5.79]: The use of the bands 415-495 kHz and 505-526.5 kHz (505-510 kHz in Region 2) by the maritime mobile service is limited to radiotelegraphy.', '[5.80A]: The maximum equivalent isotropically radiated power (e.i.r.p.) of stations in the amateur service using frequencies in the band 472-479 kHz shall not exceed 1 W. Administrations may increase this limit of e.i.r.p. to 5 W in portions of their territory which are at a distance of over 800 km from the borders of Algeria, Saudi Arabia, Azerbaijan, Bahrain, Belarus, China, Comoros, Djibouti, Egypt, United Arab Emirates, the Russian Federation, Iran (Islamic Republic of), Iraq, Jordan, Kazakhstan, Kuwait, Lebanon, Libya, Morocco, Mauritania, Oman, Uzbekistan, Qatar, Syrian Arab Republic, Kyrgyzstan, Somalia, Sudan, Tunisia, Ukraine and Yemen. In this frequency band, stations in the amateur service shall not cause harmful interference to, or claim protection from, stations of the aeronautical radionavigation service. (WRC-12)', '[5.77]: Different category of service: in Australia, China, the French overseas communities of Region 3, Korea (Rep. of), India, Iran (Islamic Republic of), Japan, Pakistan, Papua New Guinea and Sri Lanka, the allocation of the frequency band 415-495 kHz to the aeronautical radionavigation service is on a primary basis. In Armenia, Azerbaijan, Belarus, the Russian Federation, Kazakhstan, Latvia, Uzbekistan and Kyrgyzstan, the allocation of the frequency band 435-495 kHz to the aeronautical radionavigation service is on a primary basis. Administrations in all the aforementioned countries shall take all practical steps necessary to ensure that aeronautical radionavigation stations in the frequency band 435-495 kHz do not cause interference to reception by coast stations of transmissions from ship stations on frequencies designated for ship stations on a worldwide basis. (WRC-12)', '[5.80]: In Region 2, the use of the band 435-495 kHz by the aeronautical radionavigation service is limited to non-directional beacons not employing voice transmission.', '[5.80B]: The use of the frequency band 472-479 kHz in Algeria, Saudi Arabia, Azerbaijan, Bahrain, Belarus, China, Comoros, Djibouti, Egypt, United Arab Emirates, the Russian Federation, Iraq, Jordan, Kazakhstan, Kuwait, Lebanon, Libya, Mauritania, Oman, Uzbekistan, Qatar, Syrian Arab Republic, Kyrgyzstan, Somalia, Sudan, Tunisia and Yemen is limited to the maritime mobile and aeronautical radionavigation services. The amateur service shall not be used in the above-mentioned countries in this frequency band, and this should be taken into account by the countries authorizing such use. (WRC-12)', '[5.82]: In the maritime mobile service, the frequency 490 kHz is to be used exclusively for the transmission by coast stations of navigational and meteorological warnings and urgent information to ships, by means of narrow-band direct-printing telegraphy. The conditions for use of the frequency 490 kHz are prescribed in Articles 31 and 52. In using the frequency band 415-495 kHz for the aeronautical radionavigation service, administrations are requested to ensure that no harmful interference is caused to the frequency 490 kHz. In using the frequency band 472-479 kHz for the amateur service, administrations shall ensure that no harmful interference is caused to the frequency 490 kHz. (WRC-12)']),
(479000, 495001): (False, False, True, False, False, ['Maritime Mobile [5.79][5.79A]'], ['Aeronautical Radionavigation [5.77]'], ['[5.79]: The use of the bands 415-495 kHz and 505-526.5 kHz (505-510 kHz in Region 2) by the maritime mobile service is limited to radiotelegraphy.', '[5.79A]: When establishing coast stations in the NAVTEX service on the frequencies 490 kHz, 518 kHz and 4 209.5 kHz, administrations are strongly recommended to coordinate the operating characteristics in accordance with the procedures of the International Maritime Organization (IMO) (see Resolution 339 (Rev.WRC-07)). (WRC-07)', '[5.77]: Different category of service: in Australia, China, the French overseas communities of Region 3, Korea (Rep. of), India, Iran (Islamic Republic of), Japan, Pakistan, Papua New Guinea and Sri Lanka, the allocation of the frequency band 415-495 kHz to the aeronautical radionavigation service is on a primary basis. In Armenia, Azerbaijan, Belarus, the Russian Federation, Kazakhstan, Latvia, Uzbekistan and Kyrgyzstan, the allocation of the frequency band 435-495 kHz to the aeronautical radionavigation service is on a primary basis. Administrations in all the aforementioned countries shall take all practical steps necessary to ensure that aeronautical radionavigation stations in the frequency band 435-495 kHz do not cause interference to reception by coast stations of transmissions from ship stations on frequencies designated for ship stations on a worldwide basis. (WRC-12)', '[5.82]: In the maritime mobile service, the frequency 490 kHz is to be used exclusively for the transmission by coast stations of navigational and meteorological warnings and urgent information to ships, by means of narrow-band direct-printing telegraphy. The conditions for use of the frequency 490 kHz are prescribed in Articles 31 and 52. In using the frequency band 415-495 kHz for the aeronautical radionavigation service, administrations are requested to ensure that no harmful interference is caused to the frequency 490 kHz. In using the frequency band 472-479 kHz for the amateur service, administrations shall ensure that no harmful interference is caused to the frequency 490 kHz. (WRC-12)']),
(495000, 505001): (False, False, True, False, False, ['Maritime Mobile'], [], []),
(505000, 526501): (False, False, True, False, False, ['Maritime Mobile [5.79][5.79A][5.84]', 'Aeronautical Radionavigation'], [], ['[5.79]: The use of the bands 415-495 kHz and 505-526.5 kHz (505-510 kHz in Region 2) by the maritime mobile service is limited to radiotelegraphy.', '[5.79A]: When establishing coast stations in the NAVTEX service on the frequencies 490 kHz, 518 kHz and 4 209.5 kHz, administrations are strongly recommended to coordinate the operating characteristics in accordance with the procedures of the International Maritime Organization (IMO) (see Resolution 339 (Rev.WRC-07)). (WRC-07)', '[5.84]: The conditions for the use of the frequency 518 kHz by the maritime mobile service are prescribed in Articles 31 and 52. (WRC-07)']),
(526500, 1606501): (False, False, False, True, False, ['Broadcasting'], [], ['[5.87]: Additional allocation: in Angola, Botswana, Lesotho, Malawi, Mozambique, Namibia, Niger and Swaziland, the band 526.5-535 kHz is also allocated to the mobile service on a secondary basis. (WRC-12)', '[5.87A]: Additional allocation: in Uzbekistan, the band 526.5-1 606.5 kHz is also allocated to the radionavigation service on a primary basis. Such use is subject to agreement obtained under No. 9.21 with administrations concerned and limited to ground-based radiobeacons in operation on 27 October 1997 until the end of their lifetime. (WRC-97)']),
(1606500, 1625001): (False, True, True, False, False, ['Maritime Mobile [5.90]', 'Land Mobile'], [], ['[5.90]: In the band 1 605-1 705 kHz, in cases where a broadcasting station of Region 2 is concerned, the service area of the maritime mobile stations in Region 1 shall be limited to that provided by ground-wave propagation.', '[5.92]: Some countries of Region 1 use radiodetermination systems in the bands 1 606.5-1 625 kHz, 1 635-1 800 kHz, 1 850-2 160 kHz, 2 194-2 300 kHz, 2 502-2 850 kHz and 3 500-3 800 kHz, subject to agreement obtained under No. 9.21. The radiated mean power of these stations shall not exceed 50 W.']),
(1625000, 1635001): (False, False, False, False, False, ['Radiolocation'], [], ['[5.93]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Hungary, Kazakhstan, Latvia, Lithuania, Mongolia, Nigeria, Uzbekistan, Poland, Kyrgyzstan, Slovakia, Tajikistan, Chad, Turkmenistan and Ukraine, the frequency bands 1 625-1 635 kHz, 1 800-1 810 kHz and 2 160-2 170 kHz are also allocated to the fixed and land mobile services on a primary basis, subject to agreement obtained under No. 9.21. (WRC-15)']),
(1635000, 1800001): (False, True, True, False, False, ['Maritime Mobile [5.90]', 'Land Mobile'], [], ['[5.90]: In the band 1 605-1 705 kHz, in cases where a broadcasting station of Region 2 is concerned, the service area of the maritime mobile stations in Region 1 shall be limited to that provided by ground-wave propagation.', '[5.92]: Some countries of Region 1 use radiodetermination systems in the bands 1 606.5-1 625 kHz, 1 635-1 800 kHz, 1 850-2 160 kHz, 2 194-2 300 kHz, 2 502-2 850 kHz and 3 500-3 800 kHz, subject to agreement obtained under No. 9.21. The radiated mean power of these stations shall not exceed 50 W.', '[5.96]: In Germany, Armenia, Austria, Azerbaijan, Belarus, Croatia, Denmark, Estonia, the Russian Federation, Finland, Georgia, Hungary, Ireland, Iceland, Israel, Kazakhstan, Latvia, Liechtenstein, Lithuania, Malta, Moldova, Norway, Uzbekistan, Poland, Kyrgyzstan, Slovakia, the Czech Rep., the United Kingdom, Sweden, Switzerland, Tajikistan, Turkmenistan and Ukraine, administrations may allocate up to 200 kHz to their amateur service in the frequency bands 1 715-1 800 kHz and 1 850-2 000 kHz. However, when allocating the frequency bands within this range to their amateur service, administrations shall, after prior consultation with administrations of neighbouring countries, take such steps as may be necessary to prevent harmful interference from their amateur service to the fixed and mobile services of other countries. The mean power of any amateur station shall not exceed 10 W. (WRC-15)']),
(1800000, 1810001): (False, False, False, False, False, ['Radiolocation'], [], ['[5.93]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Hungary, Kazakhstan, Latvia, Lithuania, Mongolia, Nigeria, Uzbekistan, Poland, Kyrgyzstan, Slovakia, Tajikistan, Chad, Turkmenistan and Ukraine, the frequency bands 1 625-1 635 kHz, 1 800-1 810 kHz and 2 160-2 170 kHz are also allocated to the fixed and land mobile services on a primary basis, subject to agreement obtained under No. 9.21. (WRC-15)']),
(1810000, 1850001): (True, False, False, False, False, ['Amateur'], [], ['[5.98]: Alternative allocation: in Armenia, Azerbaijan, Belarus, Belgium, Cameroon, Congo (Rep. of the), Denmark, Egypt, Eritrea, Spain, Ethiopia, the Russian Federation, Georgia, Greece, Italy, Kazakhstan, Lebanon, Lithuania, the Syrian Arab Republic, Kyrgyzstan, Somalia, Tajikistan, Tunisia, Turkmenistan and Turkey, the frequency band 1 810-1 830 kHz is allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-15)', '[5.99]: Additional allocation: in Saudi Arabia, Austria, Iraq, Libya, Uzbekistan, Slovakia, Romania, Slovenia, Chad, and Togo, the band 1 810-1 830 kHz is also allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-12)', '[5.100]: In Region 1, the authorization to use the band 1 810-1 830 kHz by the amateur service in countries situated totally or partially north of 40° N shall be given only after consultation with the countries mentioned in Nos. 5.98 and 5.99 to define the necessary steps to be taken to prevent harmful interference between amateur stations and stations of other services operating in accordance with Nos. 5.98 and 5.99.']),
(1850000, 2000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], [], ['[5.92]: Some countries of Region 1 use radiodetermination systems in the bands 1 606.5-1 625 kHz, 1 635-1 800 kHz, 1 850-2 160 kHz, 2 194-2 300 kHz, 2 502-2 850 kHz and 3 500-3 800 kHz, subject to agreement obtained under No. 9.21. The radiated mean power of these stations shall not exceed 50 W.', '[5.96]: In Germany, Armenia, Austria, Azerbaijan, Belarus, Croatia, Denmark, Estonia, the Russian Federation, Finland, Georgia, Hungary, Ireland, Iceland, Israel, Kazakhstan, Latvia, Liechtenstein, Lithuania, Malta, Moldova, Norway, Uzbekistan, Poland, Kyrgyzstan, Slovakia, the Czech Rep., the United Kingdom, Sweden, Switzerland, Tajikistan, Turkmenistan and Ukraine, administrations may allocate up to 200 kHz to their amateur service in the frequency bands 1 715-1 800 kHz and 1 850-2 000 kHz. However, when allocating the frequency bands within this range to their amateur service, administrations shall, after prior consultation with administrations of neighbouring countries, take such steps as may be necessary to prevent harmful interference from their amateur service to the fixed and mobile services of other countries. The mean power of any amateur station shall not exceed 10 W. (WRC-15)', '[5.103]: In Region 1, in making assignments to stations in the fixed and mobile services in the bands 1 850-2 045 kHz, 2 194-2 498 kHz, 2 502-2 625 kHz and 2 650-2 850 kHz, administrations should bear in mind the special requirements of the maritime mobile service.']),
(2000000, 2025001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], [], ['[5.92]: Some countries of Region 1 use radiodetermination systems in the bands 1 606.5-1 625 kHz, 1 635-1 800 kHz, 1 850-2 160 kHz, 2 194-2 300 kHz, 2 502-2 850 kHz and 3 500-3 800 kHz, subject to agreement obtained under No. 9.21. The radiated mean power of these stations shall not exceed 50 W.', '[5.103]: In Region 1, in making assignments to stations in the fixed and mobile services in the bands 1 850-2 045 kHz, 2 194-2 498 kHz, 2 502-2 625 kHz and 2 650-2 850 kHz, administrations should bear in mind the special requirements of the maritime mobile service.']),
(2025000, 2045001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], ['Meteorological Aids [5.104]'], ['[5.104]: In Region 1, the use of the band 2 025-2 045 kHz by the meteorological aids service is limited to oceanographic buoy stations.', '[5.92]: Some countries of Region 1 use radiodetermination systems in the bands 1 606.5-1 625 kHz, 1 635-1 800 kHz, 1 850-2 160 kHz, 2 194-2 300 kHz, 2 502-2 850 kHz and 3 500-3 800 kHz, subject to agreement obtained under No. 9.21. The radiated mean power of these stations shall not exceed 50 W.', '[5.103]: In Region 1, in making assignments to stations in the fixed and mobile services in the bands 1 850-2 045 kHz, 2 194-2 498 kHz, 2 502-2 625 kHz and 2 650-2 850 kHz, administrations should bear in mind the special requirements of the maritime mobile service.']),
(2045000, 2160001): (False, True, True, False, False, ['Maritime Mobile', 'Land Mobile'], [], ['[5.92]: Some countries of Region 1 use radiodetermination systems in the bands 1 606.5-1 625 kHz, 1 635-1 800 kHz, 1 850-2 160 kHz, 2 194-2 300 kHz, 2 502-2 850 kHz and 3 500-3 800 kHz, subject to agreement obtained under No. 9.21. The radiated mean power of these stations shall not exceed 50 W.']),
(2160000, 2170001): (False, False, False, False, False, ['Radiolocation'], [], ['[5.93]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Hungary, Kazakhstan, Latvia, Lithuania, Mongolia, Nigeria, Uzbekistan, Poland, Kyrgyzstan, Slovakia, Tajikistan, Chad, Turkmenistan and Ukraine, the frequency bands 1 625-1 635 kHz, 1 800-1 810 kHz and 2 160-2 170 kHz are also allocated to the fixed and land mobile services on a primary basis, subject to agreement obtained under No. 9.21. (WRC-15)', '[5.107]: Additional allocation: in Saudi Arabia, Eritrea, Ethiopia, Iraq, Libya, Somalia and Swaziland, the band 2 160-2 170 kHz is also allocated to the fixed and mobile, except aeronautical mobile (R), services on a primary basis. The mean power of stations in these services shall not exceed 50 W. (WRC-12)']),
(2170000, 2173501): (False, False, True, False, False, ['Maritime Mobile'], [], []),
(2173500, 2190501): (False, False, True, False, False, ['Mobile (Distress And Calling)'], [], ['[5.108]: The carrier frequency 2 182 kHz is an international distress and calling frequency for radiotelephony. The conditions for the use of the band 2 173.5-2 190.5 kHz are prescribed in Articles 31 and 52. (WRC-07)', '[5.109]: The frequencies 2 187.5 kHz, 4 207.5 kHz, 6 312 kHz, 8 414.5 kHz, 12 577 kHz and 16 804.5 kHz are international distress frequencies for digital selective calling. The conditions for the use of these frequencies are prescribed in Article 31.', '[5.110]: The frequencies 2 174.5 kHz, 4 177.5 kHz, 6 268 kHz, 8 376.5 kHz, 12 520 kHz and 16 695 kHz are international distress frequencies for narrow-band direct-printing telegraphy. The conditions for the use of these frequencies are prescribed in Article 31.', '[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07)']),
(2190500, 2194001): (False, False, True, False, False, ['Maritime Mobile'], [], []),
(2194000, 2300001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], [], ['[5.92]: Some countries of Region 1 use radiodetermination systems in the bands 1 606.5-1 625 kHz, 1 635-1 800 kHz, 1 850-2 160 kHz, 2 194-2 300 kHz, 2 502-2 850 kHz and 3 500-3 800 kHz, subject to agreement obtained under No. 9.21. The radiated mean power of these stations shall not exceed 50 W.', '[5.103]: In Region 1, in making assignments to stations in the fixed and mobile services in the bands 1 850-2 045 kHz, 2 194-2 498 kHz, 2 502-2 625 kHz and 2 650-2 850 kHz, administrations should bear in mind the special requirements of the maritime mobile service.', '[5.112]: Alternative allocation: in Denmark and Sri Lanka, the band 2 194-2 300 kHz is allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-12)']),
(2300000, 2498001): (False, True, True, True, False, ['Mobile Except Aeronautical Mobile (R)', 'Broadcasting [5.113]'], [], ['[5.113]: For the conditions for the use of the bands 2 300-2 495 kHz (2 498 kHz in Region 1), 3 200-3 400 kHz, 4 750-4 995 kHz and 5 005-5 060 kHz by the broadcasting service, see Nos. 5.16 to 5.20, 5.21 and 23.3 to 23.10.', '[5.103]: In Region 1, in making assignments to stations in the fixed and mobile services in the bands 1 850-2 045 kHz, 2 194-2 498 kHz, 2 502-2 625 kHz and 2 650-2 850 kHz, administrations should bear in mind the special requirements of the maritime mobile service.']),
(2498000, 2501001): (False, False, False, False, False, ['Standard Frequency And Time Signal (2 500 Khz)'], [], []),
(2501000, 2502001): (False, False, False, False, False, ['Standard Frequency And Time Signal'], ['Space Research'], []),
(2502000, 2625001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], [], ['[5.92]: Some countries of Region 1 use radiodetermination systems in the bands 1 606.5-1 625 kHz, 1 635-1 800 kHz, 1 850-2 160 kHz, 2 194-2 300 kHz, 2 502-2 850 kHz and 3 500-3 800 kHz, subject to agreement obtained under No. 9.21. The radiated mean power of these stations shall not exceed 50 W.', '[5.103]: In Region 1, in making assignments to stations in the fixed and mobile services in the bands 1 850-2 045 kHz, 2 194-2 498 kHz, 2 502-2 625 kHz and 2 650-2 850 kHz, administrations should bear in mind the special requirements of the maritime mobile service.', '[5.114]: Alternative allocation: in Denmark and Iraq, the band 2 502-2 625 kHz is allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-12)']),
(2625000, 2650001): (False, False, True, False, False, ['Maritime Mobile', 'Maritime Radionavigation'], [], ['[5.92]: Some countries of Region 1 use radiodetermination systems in the bands 1 606.5-1 625 kHz, 1 635-1 800 kHz, 1 850-2 160 kHz, 2 194-2 300 kHz, 2 502-2 850 kHz and 3 500-3 800 kHz, subject to agreement obtained under No. 9.21. The radiated mean power of these stations shall not exceed 50 W.']),
(2650000, 2850001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], [], ['[5.92]: Some countries of Region 1 use radiodetermination systems in the bands 1 606.5-1 625 kHz, 1 635-1 800 kHz, 1 850-2 160 kHz, 2 194-2 300 kHz, 2 502-2 850 kHz and 3 500-3 800 kHz, subject to agreement obtained under No. 9.21. The radiated mean power of these stations shall not exceed 50 W.', '[5.103]: In Region 1, in making assignments to stations in the fixed and mobile services in the bands 1 850-2 045 kHz, 2 194-2 498 kHz, 2 502-2 625 kHz and 2 650-2 850 kHz, administrations should bear in mind the special requirements of the maritime mobile service.']),
(2850000, 3025001): (False, False, True, False, False, ['Aeronautical Mobile (R)'], [], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07) ', '[5.115]: The carrier (reference) frequencies 3 023 kHz and 5 680 kHz may also be used, in accordance with Article 31, by stations of the maritime mobile service engaged in coordinated search and rescue operations. (WRC-07)']),
(3025000, 3155001): (False, False, True, False, False, ['Aeronautical Mobile (Or)'], [], []),
(3155000, 3200001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], [], ['[5.116]: Administrations are urged to authorize the use of the band 3 155-3 195 kHz to provide a common worldwide channel for low power wireless hearing aids. Additional channels for these devices may be assigned by administrations in the bands between 3 155 kHz and 3 400 kHz to suit local needs.It should be noted that frequencies in the range 3 000 kHz to 4 000 kHz are suitable for hearing aid devices which are designed to operate over short distances within the induction field. ', "[5.117]: Alternative allocation: in Côte d'Ivoire, Denmark, Egypt, Liberia, Sri Lanka and Togo, the band 3 155-3 200 kHz is allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-12)"]),
(3200000, 3230001): (False, True, True, True, False, ['Mobile Except Aeronautical Mobile (R)', 'Broadcasting [5.113]'], [], ['[5.113]: For the conditions for the use of the bands 2 300-2 495 kHz (2 498 kHz in Region 1), 3 200-3 400 kHz, 4 750-4 995 kHz and 5 005-5 060 kHz by the broadcasting service, see Nos. 5.16 to 5.20, 5.21 and 23.3 to 23.10.', '[5.116]: Administrations are urged to authorize the use of the band 3 155-3 195 kHz to provide a common worldwide channel for low power wireless hearing aids. Additional channels for these devices may be assigned by administrations in the bands between 3 155 kHz and 3 400 kHz to suit local needs.It should be noted that frequencies in the range 3 000 kHz to 4 000 kHz are suitable for hearing aid devices which are designed to operate over short distances within the induction field.']),
(3230000, 3400001): (False, True, True, True, False, ['Mobile Except Aeronautical Mobile', 'Broadcasting [5.113]'], [], ['[5.113]: For the conditions for the use of the bands 2 300-2 495 kHz (2 498 kHz in Region 1), 3 200-3 400 kHz, 4 750-4 995 kHz and 5 005-5 060 kHz by the broadcasting service, see Nos. 5.16 to 5.20, 5.21 and 23.3 to 23.10.', '[5.116]: Administrations are urged to authorize the use of the band 3 155-3 195 kHz to provide a common worldwide channel for low power wireless hearing aids. Additional channels for these devices may be assigned by administrations in the bands between 3 155 kHz and 3 400 kHz to suit local needs.It should be noted that frequencies in the range 3 000 kHz to 4 000 kHz are suitable for hearing aid devices which are designed to operate over short distances within the induction field. ', '[5.118]: Additional allocation: in the United States, Mexico, Peru and Uruguay, the band 3 230-3 400 kHz is also allocated to the radiolocation service on a secondary basis. (WRC-03)']),
(3400000, 3500001): (False, False, True, False, False, ['Aeronautical Mobile (R)'], [], []),
(3500000, 3800001): (True, True, True, False, False, ['Amateur', 'Mobile Except Aeronautical Mobile'], [], ['[5.92]: Some countries of Region 1 use radiodetermination systems in the bands 1 606.5-1 625 kHz, 1 635-1 800 kHz, 1 850-2 160 kHz, 2 194-2 300 kHz, 2 502-2 850 kHz and 3 500-3 800 kHz, subject to agreement obtained under No. 9.21. The radiated mean power of these stations shall not exceed 50 W.']),
(3800000, 3900001): (False, True, True, False, False, ['Aeronautical Mobile (Or)', 'Land Mobile'], [], []),
(3900000, 3950001): (False, False, True, False, False, ['Aeronautical Mobile (Or)'], [], ['[5.123]: Additional allocation: in Botswana, Lesotho, Malawi, Mozambique, Namibia, South Africa, Swaziland, Zambia and Zimbabwe, the band 3 900-3 950 kHz is also allocated to the broadcasting service on a primary basis, subject to agreement obtained under No. 9.21.']),
(3950000, 4000001): (False, True, False, True, False, ['Broadcasting'], [], []),
(4000000, 4063000): (False, True, True, False, False, ['Maritime Mobile [5.127]'], [], ['[5.127]: The use of the band 4 000-4 063 kHz by the maritime mobile service is limited to ship stations using radiotelephony (see No. 52.220 and Appendix 17).', '[5.126]: In Region 3, the stations of those services to which the band 3 995-4 005 kHz is allocated may transmit standard frequency and time signals.']),
(4062999, 4438001): (False, False, True, False, False, ['Maritime Mobile [5.79A][5.109][5.110][5.130][5.131][5.132]'], [], ['[5.79A]: When establishing coast stations in the NAVTEX service on the frequencies 490 kHz, 518 kHz and 4 209.5 kHz, administrations are strongly recommended to coordinate the operating characteristics in accordance with the procedures of the International Maritime Organization (IMO) (see Resolution 339 (Rev.WRC-07)). (WRC-07)', '[5.109]: The frequencies 2 187.5 kHz, 4 207.5 kHz, 6 312 kHz, 8 414.5 kHz, 12 577 kHz and 16 804.5 kHz are international distress frequencies for digital selective calling. The conditions for the use of these frequencies are prescribed in Article 31.', '[5.110]: The frequencies 2 174.5 kHz, 4 177.5 kHz, 6 268 kHz, 8 376.5 kHz, 12 520 kHz and 16 695 kHz are international distress frequencies for narrow-band direct-printing telegraphy. The conditions for the use of these frequencies are prescribed in Article 31.', '[5.130]: The conditions for the use of the carrier frequencies 4 125 kHz and 6 215 kHz are prescribed in Articles 31 and 52. (WRC-07)', '[5.131]: The frequency 4 209.5 kHz is used exclusively for the transmission by coast stations of meteorological and navigational warnings and urgent information to ships by means of narrow-band direct-printing techniques. (WRC-97)', '[5.132]: The frequencies 4 210 kHz, 6 314 kHz, 8 416.5 kHz, 12 579 kHz, 16 806.5 kHz, 19 680.5 kHz, 22 376 kHz and 26 100.5 kHz are the international frequencies for the transmission of maritime safety information (MSI) (see Appendix 17).', '[5.128]: Frequencies in the bands 4 063-4 123 kHz and 4 130-4 438 kHz may be used exceptionally by stations in the fixed service, communicating only within the boundary of the country in which they are located, with a mean power not exceeding 50 W, on condition that harmful interference is not caused to the maritime mobile service. In addition, in Afghanistan, Argentina, Armenia, Azerbaijan, Belarus, Botswana, Burkina Faso, the Central African Rep., China, the Russian Federation, Georgia, India, Kazakhstan, Mali, Niger, Pakistan, Kyrgyzstan, Tajikistan, Chad, Turkmenistan and Ukraine, in the bands 4 063-4 123 kHz, 4 130-4 133 kHz and 4 408-4 438 kHz, stations in the fixed service, with a mean power not exceeding 1 kW, can be operated on condition that they are situated at least 600 km from the coast and that harmful interference is not caused to the maritime mobile service. (WRC-12)']),
(4438000, 4488001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], ['Radiolocation [5.132A]'], ['[5.132A]: Stations in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the fixed or mobile services. Applications of the radiolocation service are limited to oceanographic radars operating in accordance with Resolution 612 (Rev.WRC-12). (WRC-12)', '[5.132B]: Alternative allocation: in Armenia, Belarus, Moldova, Uzbekistan and Kyrgyzstan, the frequency band 4 438-4 488 kHz is allocated to the fixed and mobile, except aeronautical mobile (R), services on a primary basis. (WRC-15)']),
(4488000, 4650001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], [], []),
(4650000, 4700001): (False, False, True, False, False, ['Aeronautical Mobile (R)'], [], []),
(4700000, 4750001): (False, False, True, False, False, ['Aeronautical Mobile (Or)'], [], []),
(4750000, 4850001): (False, True, True, True, False, ['Aeronautical Mobile (Or)', 'Land Mobile', 'Broadcasting [5.113]'], [], ['[5.113]: For the conditions for the use of the bands 2 300-2 495 kHz (2 498 kHz in Region 1), 3 200-3 400 kHz, 4 750-4 995 kHz and 5 005-5 060 kHz by the broadcasting service, see Nos. 5.16 to 5.20, 5.21 and 23.3 to 23.10.']),
(4850000, 4995001): (False, True, True, True, False, ['Land Mobile', 'Broadcasting [5.113]'], [], ['[5.113]: For the conditions for the use of the bands 2 300-2 495 kHz (2 498 kHz in Region 1), 3 200-3 400 kHz, 4 750-4 995 kHz and 5 005-5 060 kHz by the broadcasting service, see Nos. 5.16 to 5.20, 5.21 and 23.3 to 23.10.']),
(4995000, 5003001): (False, False, False, False, False, ['Standard Frequency And Time Signal (5 000 Khz)'], [], []),
(5003000, 5005001): (False, False, False, False, False, ['Standard Frequency And Time Signal'], ['Space Research'], []),
(5005000, 5060001): (False, True, False, True, False, ['Broadcasting [5.113]'], [], ['[5.113]: For the conditions for the use of the bands 2 300-2 495 kHz (2 498 kHz in Region 1), 3 200-3 400 kHz, 4 750-4 995 kHz and 5 005-5 060 kHz by the broadcasting service, see Nos. 5.16 to 5.20, 5.21 and 23.3 to 23.10.']),
(5060000, 5250001): (False, True, True, False, False, [], ['Mobile Except Aeronautical Mobile'], ['[5.133]: Different category of service: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Latvia, Lithuania, Niger, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the allocation of the band 5 130-5 250 kHz to the mobile, except aeronautical mobile, service is on a primary basis (see No. 5.33). (WRC-12)']),
(5250000, 5275001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], ['Radiolocation [5.132A]'], ['[5.132A]: Stations in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the fixed or mobile services. Applications of the radiolocation service are limited to oceanographic radars operating in accordance with Resolution 612 (Rev.WRC-12). (WRC-12)', '[5.133A]: Alternative allocation: in Armenia, Belarus, Moldova, Uzbekistan and Kyrgyzstan, the frequency bands 5 250-5 275 kHz and 26 200-26 350 kHz are allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-15)']),
(5275000, 5351501): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], [], []),
(5351500, 5366501): (True, True, True, False, False, ['Mobile Except Aeronautical Mobile'], ['Amateur [5.133B]'], ['[5.133B]: Stations in the amateur service using the frequency band 5 351.5-5 366.5 kHz shall not exceed a maximum radiated power of 15 W (e.i.r.p.). However, in Region 2 in Mexico, stations in the amateur service using the frequency band 5 351.5-5 366.5 kHz shall not exceed a maximum radiated power of 20 W (e.i.r.p.). In the following Region 2 countries: Antigua and Barbuda, Argentina, Bahamas, Barbados, Belize, Bolivia, Brazil, Chile, Colombia, Costa Rica, Cuba, Dominican Republic, Dominica, El Salvador, Ecuador, Grenada, Guatemala, Guyana, Haiti, Honduras, Jamaica, Nicaragua, Panama, Paraguay, Peru, Saint Lucia, Saint Kitts and Nevis, Saint Vincent and the Grenadines, Suriname, Trinidad and Tobago, Uruguay, Venezuela, as well as the overseas territories of the Netherlands in Region 2, stations in the amateur service using the frequency band 5 351.5-5 366.5 kHz shall not exceed a maximum radiated power of 25 W (e.i.r.p.). (WRC-15)']),
(5366500, 5450001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], [], []),
(5450000, 5480001): (False, True, True, False, False, ['Aeronautical Mobile (Or)', 'Land Mobile'], [], []),
(5480000, 5680001): (False, False, True, False, False, ['Aeronautical Mobile (R)'], [], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07) ', '[5.115]: The carrier (reference) frequencies 3 023 kHz and 5 680 kHz may also be used, in accordance with Article 31, by stations of the maritime mobile service engaged in coordinated search and rescue operations. (WRC-07)']),
(5680000, 5730001): (False, False, True, False, False, ['Aeronautical Mobile (Or)'], [], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07) ', '[5.115]: The carrier (reference) frequencies 3 023 kHz and 5 680 kHz may also be used, in accordance with Article 31, by stations of the maritime mobile service engaged in coordinated search and rescue operations. (WRC-07)']),
(5730000, 5900001): (False, True, True, False, False, ['Land Mobile'], [], []),
(5900000, 5950001): (False, False, False, True, False, ['Broadcasting [5.134]'], [], ['[5.134]: The use of the bands 5 900-5 950 kHz, 7 300-7 350 kHz, 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 13 570-13 600 kHz, 13 800-13 870 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz by the broadcasting service is subject to the application of the procedure of Article 12. Administrations are encouraged to use these bands to facilitate the introduction of digitally modulated emissions in accordance with the provisions of Resolution 517 (Rev.WRC-07)*. (WRC-07)', '[5.136]: Additional allocation: frequencies in the band 5 900-5 950 kHz may be used by stations in the following services, communicating only within the boundary of the country in which they are located: fixed service (in all three Regions), land mobile service (in Region 1), mobile except aeronautical mobile (R) service (in Regions 2 and 3), on condition that harmful interference is not caused to the broadcasting service. When using frequencies for these services, administrations are urged to use the minimum power required and to take account of the seasonal use of frequencies by the broadcasting service published in accordance with the Radio Regulations. (WRC-07)']),
(5950000, 6200001): (False, False, False, True, False, ['Broadcasting'], [], []),
(6200000, 6525001): (False, False, True, False, False, ['Maritime Mobile [5.109][5.110][5.130][5.132]'], [], ['[5.109]: The frequencies 2 187.5 kHz, 4 207.5 kHz, 6 312 kHz, 8 414.5 kHz, 12 577 kHz and 16 804.5 kHz are international distress frequencies for digital selective calling. The conditions for the use of these frequencies are prescribed in Article 31.', '[5.110]: The frequencies 2 174.5 kHz, 4 177.5 kHz, 6 268 kHz, 8 376.5 kHz, 12 520 kHz and 16 695 kHz are international distress frequencies for narrow-band direct-printing telegraphy. The conditions for the use of these frequencies are prescribed in Article 31.', '[5.130]: The conditions for the use of the carrier frequencies 4 125 kHz and 6 215 kHz are prescribed in Articles 31 and 52. (WRC-07)', '[5.132]: The frequencies 4 210 kHz, 6 314 kHz, 8 416.5 kHz, 12 579 kHz, 16 806.5 kHz, 19 680.5 kHz, 22 376 kHz and 26 100.5 kHz are the international frequencies for the transmission of maritime safety information (MSI) (see Appendix 17).', '[5.137]: On condition that harmful interference is not caused to the maritime mobile service, the bands 6 200-6 213.5 kHz and 6 220.5-6 525 kHz may be used exceptionally by stations in the fixed service, communicating only within the boundary of the country in which they are located, with a mean power not exceeding 50 W. At the time of notification of these frequencies, the attention of the Bureau will be drawn to the above conditions.']),
(6525000, 6685001): (False, False, True, False, False, ['Aeronautical Mobile (R)'], [], []),
(6685000, 6765001): (False, False, True, False, False, ['Aeronautical Mobile (Or)'], [], []),
(6765000, 7000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], [], ['[5.138]: The following bands:6 765-6 795 kHz (centre frequency 6 780 kHz), 433.05-434.79 MHz (centre frequency 433.92 MHz) in Region 1 except in the countries mentioned in No. 5.280, 61-61.5 GHz (centre frequency 61.25 GHz), 122-123 GHz (centre frequency 122.5 GHz), and 244-246 GHz (centre frequency 245 GHz) are designated for industrial, scientific and medical (ISM) applications. The use of these frequency bands for ISM applications shall be subject to special authorization by the administration concerned, in agreement with other administrations whose radiocommunication services might be affected. In applying this provision, administrations shall have due regard to the latest relevant ITU-R Recommendations.']),
(7000000, 7100001): (True, False, False, False, False, ['Amateur', 'Amateur-Satellite'], [], ['[5.140]: Additional allocation: in Angola, Iraq, Somalia and Togo, the frequency band 7 000-7 050 kHz is also allocated to the fixed service on a primary basis. (WRC-15)', '[5.141]: Alternative allocation: in Egypt, Eritrea, Ethiopia, Guinea, Libya, Madagascar and Niger, the band 7 000-7 050 kHz is allocated to the fixed service on a primary basis. (WRC-12)', '[5.141A]: Additional allocation: in Uzbekistan and Kyrgyzstan, the bands 7 000-7 100 kHz and 7 100-7 200 kHz are also allocated to the fixed and land mobile services on a secondary basis. (WRC-03)']),
(7100000, 7200001): (True, False, False, False, False, ['Amateur'], [], ['[5.141A]: Additional allocation: in Uzbekistan and Kyrgyzstan, the bands 7 000-7 100 kHz and 7 100-7 200 kHz are also allocated to the fixed and land mobile services on a secondary basis. (WRC-03)', '[5.141B]: Additional allocation: in Algeria, Saudi Arabia, Australia, Bahrain, Botswana, Brunei Darussalam, China, Comoros, Korea (Rep. of), Diego Garcia, Djibouti, Egypt, United Arab Emirates, Eritrea, Guinea, Indonesia, Iran (Islamic Republic of), Japan, Jordan, Kuwait, Libya, Mali, Morocco, Mauritania, Niger, New Zealand, Oman, Papua New Guinea, Qatar, the Syrian Arab Republic, Singapore, Sudan, South Sudan, Tunisia, Viet Nam and Yemen, the frequency band 7 100-7 200 kHz is also allocated to the fixed and the mobile, except aeronautical mobile (R), services on a primary basis. (WRC-15)']),
(7200000, 7300001): (False, False, False, True, False, ['Broadcasting'], [], []),
(7300000, 7400001): (False, False, False, True, False, ['Broadcasting [5.134]'], [], ['[5.134]: The use of the bands 5 900-5 950 kHz, 7 300-7 350 kHz, 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 13 570-13 600 kHz, 13 800-13 870 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz by the broadcasting service is subject to the application of the procedure of Article 12. Administrations are encouraged to use these bands to facilitate the introduction of digitally modulated emissions in accordance with the provisions of Resolution 517 (Rev.WRC-07)*. (WRC-07)', '[5.143]: Additional allocation: frequencies in the band 7 300-7 350 kHz may be used by stations in the fixed service and in the land mobile service, communicating only within the boundary of the country in which they are located, on condition that harmful interference is not caused to the broadcasting service. When using frequencies for these services, administrations are urged to use the minimum power required and to take account of the seasonal use of frequencies by the broadcasting service published in accordance with the Radio Regulations. (WRC-07)', '[5.143A]: In Region 3, frequencies in the band 7 350-7 450 kHz may be used by stations in the fixed service on a primary basis and land mobile service on a secondary basis, communicating only within the boundary of the country in which they are located, on condition that harmful interference is not caused to the broadcasting service. When using frequencies for these services, administrations are urged to use the minimum power required and to take account of the seasonal use of frequencies by the broadcasting service published in accordance with the Radio Regulations. (WRC-12)', '[5.143B]: In Region 1, frequencies in the band 7 350-7 450 kHz may be used by stations in the fixed and land mobile services communicating only within the boundary of the country in which they are located on condition that harmful interference is not caused to the broadcasting service. The total radiated power of each station shall not exceed 24 dBW. (WRC-12)', '[5.143C]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Comoros, Djibouti, Egypt, United Arab Emirates, Iran (Islamic Republic of), Jordan, Kuwait, Libya, Morocco, Mauritania, Niger, Oman, Qatar, the Syrian Arab Republic, Sudan, South Sudan, Tunisia and Yemen, the bands 7 350-7 400 kHz and 7 400-7 450 kHz are also allocated to the fixed service on a primary basis. (WRC-12)', '[5.143D]: In Region 2, frequencies in the band 7 350-7 400 kHz may be used by stations in the fixed service and in the land mobile service, communicating only within the boundary of the country in which they are located, on condition that harmful interference is not caused to the broadcasting service. When using frequencies for these services, administrations are urged to use the minimum power required and to take account of the seasonal use of frequencies by the broadcasting service published in accordance with the Radio Regulations. (WRC-12)']),
(7400000, 7450001): (False, False, False, True, False, ['Broadcasting'], [], ['[5.143B]: In Region 1, frequencies in the band 7 350-7 450 kHz may be used by stations in the fixed and land mobile services communicating only within the boundary of the country in which they are located on condition that harmful interference is not caused to the broadcasting service. The total radiated power of each station shall not exceed 24 dBW. (WRC-12)', '[5.143C]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Comoros, Djibouti, Egypt, United Arab Emirates, Iran (Islamic Republic of), Jordan, Kuwait, Libya, Morocco, Mauritania, Niger, Oman, Qatar, the Syrian Arab Republic, Sudan, South Sudan, Tunisia and Yemen, the bands 7 350-7 400 kHz and 7 400-7 450 kHz are also allocated to the fixed service on a primary basis. (WRC-12)']),
(7450000, 8100001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], [], ['[5.144]: In Region 3, the stations of those services to which the band 7 995-8 005 kHz is allocated may transmit standard frequency and time signals.']),
(8100000, 8195001): (False, True, True, False, False, ['Maritime Mobile'], [], []),
(8195000, 8815001): (False, False, True, False, False, ['Maritime Mobile [5.109][5.110][5.132][5.145]'], [], ['[5.109]: The frequencies 2 187.5 kHz, 4 207.5 kHz, 6 312 kHz, 8 414.5 kHz, 12 577 kHz and 16 804.5 kHz are international distress frequencies for digital selective calling. The conditions for the use of these frequencies are prescribed in Article 31.', '[5.110]: The frequencies 2 174.5 kHz, 4 177.5 kHz, 6 268 kHz, 8 376.5 kHz, 12 520 kHz and 16 695 kHz are international distress frequencies for narrow-band direct-printing telegraphy. The conditions for the use of these frequencies are prescribed in Article 31.', '[5.132]: The frequencies 4 210 kHz, 6 314 kHz, 8 416.5 kHz, 12 579 kHz, 16 806.5 kHz, 19 680.5 kHz, 22 376 kHz and 26 100.5 kHz are the international frequencies for the transmission of maritime safety information (MSI) (see Appendix 17).', '[5.145]: The conditions for the use of the carrier frequencies 8 291 kHz, 12 290 kHz and 16 420 kHz are prescribed in Articles 31 and 52. (WRC-07)', '[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07)']),
(8815000, 8965001): (False, False, True, False, False, ['Aeronautical Mobile (R)'], [], []),
(8965000, 9040001): (False, False, True, False, False, ['Aeronautical Mobile (Or)'], [], []),
(9040000, 9305001): (False, True, False, False, False, [], [], []),
(9305000, 9355001): (False, True, False, False, False, [], ['Radiolocation [5.145A]'], ['[5.145A]: Stations in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the fixed service. Applications of the radiolocation service are limited to oceanographic radars operating in accordance with Resolution 612 (Rev.WRC-12). (WRC-12)', '[5.145B]: Alternative allocation: in Armenia, Belarus, Moldova, Uzbekistan and Kyrgyzstan, the frequency bands 9 305-9 355 kHz and 16 100-16 200 kHz are allocated to the fixed service on a primary basis. (WRC-15)']),
(9355000, 9400001): (False, True, False, False, False, [], [], []),
(9400000, 9500001): (False, False, False, True, False, ['Broadcasting [5.134]'], [], ['[5.134]: The use of the bands 5 900-5 950 kHz, 7 300-7 350 kHz, 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 13 570-13 600 kHz, 13 800-13 870 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz by the broadcasting service is subject to the application of the procedure of Article 12. Administrations are encouraged to use these bands to facilitate the introduction of digitally modulated emissions in accordance with the provisions of Resolution 517 (Rev.WRC-07)*. (WRC-07)', '[5.146]: Additional allocation: frequencies in the bands 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz may be used by stations in the fixed service, communicating only within the boundary of the country in which they are located, on condition that harmful interference is not caused to the broadcasting service. When using frequencies in the fixed service, administrations are urged to use the minimum power required and to take account of the seasonal use of frequencies by the broadcasting service published in accordance with the Radio Regulations. (WRC-07)']),
(9500000, 9900001): (False, False, False, True, False, ['Broadcasting'], [], ['[5.147]: On condition that harmful interference is not caused to the broadcasting service, frequencies in the bands 9 775-9 900 kHz, 11 650-11 700 kHz and 11 975-12 050 kHz may be used by stations in the fixed service communicating only within the boundary of the country in which they are located, each station using a total radiated power not exceeding 24 dBW.']),
(9900000, 9995001): (False, True, False, False, False, [], [], []),
(9995000, 10003001): (False, False, False, False, False, ['Standard Frequency And Time Signal (10 000 Khz)'], [], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07)']),
(10003000, 10005001): (False, False, False, False, False, ['Standard Frequency And Time Signal'], ['Space Research'], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07)']),
(10005000, 10100001): (False, False, True, False, False, ['Aeronautical Mobile (R)'], [], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07)']),
(10100000, 10150001): (True, True, False, False, False, [], ['Amateur'], []),
(10150000, 11175001): (False, True, True, False, False, [], ['Mobile Except Aeronautical Mobile (R)'], []),
(11175000, 11275001): (False, False, True, False, False, ['Aeronautical Mobile (Or)'], [], []),
(11275000, 11400001): (False, False, True, False, False, ['Aeronautical Mobile (R)'], [], []),
(11400000, 11600001): (False, True, False, False, False, [], [], []),
(11600000, 11650001): (False, False, False, True, False, ['Broadcasting [5.134]'], [], ['[5.134]: The use of the bands 5 900-5 950 kHz, 7 300-7 350 kHz, 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 13 570-13 600 kHz, 13 800-13 870 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz by the broadcasting service is subject to the application of the procedure of Article 12. Administrations are encouraged to use these bands to facilitate the introduction of digitally modulated emissions in accordance with the provisions of Resolution 517 (Rev.WRC-07)*. (WRC-07)', '[5.146]: Additional allocation: frequencies in the bands 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz may be used by stations in the fixed service, communicating only within the boundary of the country in which they are located, on condition that harmful interference is not caused to the broadcasting service. When using frequencies in the fixed service, administrations are urged to use the minimum power required and to take account of the seasonal use of frequencies by the broadcasting service published in accordance with the Radio Regulations. (WRC-07)']),
(11650000, 12050001): (False, False, False, True, False, ['Broadcasting'], [], ['[5.147]: On condition that harmful interference is not caused to the broadcasting service, frequencies in the bands 9 775-9 900 kHz, 11 650-11 700 kHz and 11 975-12 050 kHz may be used by stations in the fixed service communicating only within the boundary of the country in which they are located, each station using a total radiated power not exceeding 24 dBW.']),
(12050000, 12100001): (False, False, False, True, False, ['Broadcasting [5.134]'], [], ['[5.134]: The use of the bands 5 900-5 950 kHz, 7 300-7 350 kHz, 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 13 570-13 600 kHz, 13 800-13 870 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz by the broadcasting service is subject to the application of the procedure of Article 12. Administrations are encouraged to use these bands to facilitate the introduction of digitally modulated emissions in accordance with the provisions of Resolution 517 (Rev.WRC-07)*. (WRC-07)', '[5.146]: Additional allocation: frequencies in the bands 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz may be used by stations in the fixed service, communicating only within the boundary of the country in which they are located, on condition that harmful interference is not caused to the broadcasting service. When using frequencies in the fixed service, administrations are urged to use the minimum power required and to take account of the seasonal use of frequencies by the broadcasting service published in accordance with the Radio Regulations. (WRC-07)']),
(12100000, 12230001): (False, True, False, False, False, [], [], []),
(12230000, 13200001): (False, False, True, False, False, ['Maritime Mobile [5.109][5.110][5.132][5.145]'], [], ['[5.109]: The frequencies 2 187.5 kHz, 4 207.5 kHz, 6 312 kHz, 8 414.5 kHz, 12 577 kHz and 16 804.5 kHz are international distress frequencies for digital selective calling. The conditions for the use of these frequencies are prescribed in Article 31.', '[5.110]: The frequencies 2 174.5 kHz, 4 177.5 kHz, 6 268 kHz, 8 376.5 kHz, 12 520 kHz and 16 695 kHz are international distress frequencies for narrow-band direct-printing telegraphy. The conditions for the use of these frequencies are prescribed in Article 31.', '[5.132]: The frequencies 4 210 kHz, 6 314 kHz, 8 416.5 kHz, 12 579 kHz, 16 806.5 kHz, 19 680.5 kHz, 22 376 kHz and 26 100.5 kHz are the international frequencies for the transmission of maritime safety information (MSI) (see Appendix 17).', '[5.145]: The conditions for the use of the carrier frequencies 8 291 kHz, 12 290 kHz and 16 420 kHz are prescribed in Articles 31 and 52. (WRC-07)']),
(13200000, 13260001): (False, False, True, False, False, ['Aeronautical Mobile (Or)'], [], []),
(13260000, 13360001): (False, False, True, False, False, ['Aeronautical Mobile (R)'], [], []),
(13360000, 13410001): (False, True, False, False, False, ['Radio Astronomy'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(13410000, 13450001): (False, True, True, False, False, [], ['Mobile Except Aeronautical Mobile (R)'], []),
(13450000, 13550001): (False, True, True, False, False, [], ['Mobile Except Aeronautical Mobile (R)', 'Radiolocation [5.132A]'], ['[5.132A]: Stations in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the fixed or mobile services. Applications of the radiolocation service are limited to oceanographic radars operating in accordance with Resolution 612 (Rev.WRC-12). (WRC-12)', '[5.149A]: Alternative allocation: in Armenia, Belarus, Moldova, Uzbekistan and Kyrgyzstan, the frequency band 13 450-13 550 kHz is allocated to the fixed service on a primary basis and to the mobile, except aeronautical mobile (R), service on a secondary basis. (WRC-15)']),
(13550000, 13570001): (False, True, True, False, False, [], ['Mobile Except Aeronautical Mobile (R)'], ['[5.150]: The following bands:13 553-13 567 kHz (centre frequency 13 560 kHz), 26 957-27 283 kHz (centre frequency 27 120 kHz), 40.66-40.70 MHz (centre frequency 40.68 MHz), 902-928 MHz in Region 2 (centre frequency 915 MHz), 2 400-2 500 MHz (centre frequency 2 450 MHz), 5 725-5 875 MHz (centre frequency 5 800 MHz), and 24-24.25 GHz (centre frequency 24.125 GHz) are also designated for industrial, scientific and medical (ISM) applications. Radiocommunication services operating within these bands must accept harmful interference which may be caused by these applications. ISM equipment operating in these bands is subject to the provisions of No. 15.13.']),
(13570000, 13600001): (False, False, False, True, False, ['Broadcasting [5.134]'], [], ['[5.134]: The use of the bands 5 900-5 950 kHz, 7 300-7 350 kHz, 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 13 570-13 600 kHz, 13 800-13 870 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz by the broadcasting service is subject to the application of the procedure of Article 12. Administrations are encouraged to use these bands to facilitate the introduction of digitally modulated emissions in accordance with the provisions of Resolution 517 (Rev.WRC-07)*. (WRC-07)', '[5.151]: Additional allocation: frequencies in the bands 13 570-13 600 kHz and 13 800-13 870 kHz may be used by stations in the fixed service and in the mobile except aeronautical mobile (R) service, communicating only within the boundary of the country in which they are located, on the condition that harmful interference is not caused to the broadcasting service. When using frequencies in these services, administrations are urged to use the minimum power required and to take account of the seasonal use of frequencies by the broadcasting service published in accordance with the Radio Regulations. (WRC-07)']),
(13600000, 13800001): (False, False, False, True, False, ['Broadcasting'], [], []),
(13800000, 13870001): (False, False, False, True, False, ['Broadcasting [5.134]'], [], ['[5.134]: The use of the bands 5 900-5 950 kHz, 7 300-7 350 kHz, 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 13 570-13 600 kHz, 13 800-13 870 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz by the broadcasting service is subject to the application of the procedure of Article 12. Administrations are encouraged to use these bands to facilitate the introduction of digitally modulated emissions in accordance with the provisions of Resolution 517 (Rev.WRC-07)*. (WRC-07)', '[5.151]: Additional allocation: frequencies in the bands 13 570-13 600 kHz and 13 800-13 870 kHz may be used by stations in the fixed service and in the mobile except aeronautical mobile (R) service, communicating only within the boundary of the country in which they are located, on the condition that harmful interference is not caused to the broadcasting service. When using frequencies in these services, administrations are urged to use the minimum power required and to take account of the seasonal use of frequencies by the broadcasting service published in accordance with the Radio Regulations. (WRC-07)']),
(13870000, 14000001): (False, True, True, False, False, [], ['Mobile Except Aeronautical Mobile (R)'], []),
(14000000, 14250001): (True, False, False, False, False, ['Amateur', 'Amateur-Satellite'], [], []),
(14250000, 14350001): (True, False, False, False, False, ['Amateur'], [], ['[5.152]: Additional allocation: in Armenia, Azerbaijan, China, Côte d’Ivoire, the Russian Federation, Georgia, Iran (Islamic Republic of), Kazakhstan, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the band 14 250-14 350 kHz is also allocated to the fixed service on a primary basis. Stations of the fixed service shall not use a radiated power exceeding 24 dBW. (WRC-03)']),
(14350000, 14990001): (False, True, True, False, False, [], ['Mobile Except Aeronautical Mobile (R)'], []),
(14990000, 15005001): (False, False, False, False, False, ['Standard Frequency And Time Signal (15 000 Khz)'], [], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07)']),
(15005000, 15010001): (False, False, False, False, False, ['Standard Frequency And Time Signal'], ['Space Research'], []),
(15010000, 15100001): (False, False, True, False, False, ['Aeronautical Mobile (Or)'], [], []),
(15100000, 15600001): (False, False, False, True, False, ['Broadcasting'], [], []),
(15600000, 15800001): (False, False, False, True, False, ['Broadcasting [5.134]'], [], ['[5.134]: The use of the bands 5 900-5 950 kHz, 7 300-7 350 kHz, 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 13 570-13 600 kHz, 13 800-13 870 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz by the broadcasting service is subject to the application of the procedure of Article 12. Administrations are encouraged to use these bands to facilitate the introduction of digitally modulated emissions in accordance with the provisions of Resolution 517 (Rev.WRC-07)*. (WRC-07)', '[5.146]: Additional allocation: frequencies in the bands 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz may be used by stations in the fixed service, communicating only within the boundary of the country in which they are located, on condition that harmful interference is not caused to the broadcasting service. When using frequencies in the fixed service, administrations are urged to use the minimum power required and to take account of the seasonal use of frequencies by the broadcasting service published in accordance with the Radio Regulations. (WRC-07)']),
(15800000, 16100001): (False, True, False, False, False, [], [], ['[5.153]: In Region 3, the stations of those services to which the band 15 995-16 005 kHz is allocated may transmit standard frequency and time signals.']),
(16100000, 16200001): (False, True, False, False, False, [], ['Radiolocation [5.145A]'], ['[5.145A]: Stations in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the fixed service. Applications of the radiolocation service are limited to oceanographic radars operating in accordance with Resolution 612 (Rev.WRC-12). (WRC-12)', '[5.145B]: Alternative allocation: in Armenia, Belarus, Moldova, Uzbekistan and Kyrgyzstan, the frequency bands 9 305-9 355 kHz and 16 100-16 200 kHz are allocated to the fixed service on a primary basis. (WRC-15)']),
(16200000, 16360001): (False, True, False, False, False, [], [], []),
(16360000, 17410001): (False, False, True, False, False, ['Maritime Mobile [5.109][5.110][5.132][5.145]'], [], ['[5.109]: The frequencies 2 187.5 kHz, 4 207.5 kHz, 6 312 kHz, 8 414.5 kHz, 12 577 kHz and 16 804.5 kHz are international distress frequencies for digital selective calling. The conditions for the use of these frequencies are prescribed in Article 31.', '[5.110]: The frequencies 2 174.5 kHz, 4 177.5 kHz, 6 268 kHz, 8 376.5 kHz, 12 520 kHz and 16 695 kHz are international distress frequencies for narrow-band direct-printing telegraphy. The conditions for the use of these frequencies are prescribed in Article 31.', '[5.132]: The frequencies 4 210 kHz, 6 314 kHz, 8 416.5 kHz, 12 579 kHz, 16 806.5 kHz, 19 680.5 kHz, 22 376 kHz and 26 100.5 kHz are the international frequencies for the transmission of maritime safety information (MSI) (see Appendix 17).', '[5.145]: The conditions for the use of the carrier frequencies 8 291 kHz, 12 290 kHz and 16 420 kHz are prescribed in Articles 31 and 52. (WRC-07)']),
(17410000, 17480001): (False, True, False, False, False, [], [], []),
(17480000, 17550001): (False, False, False, True, False, ['Broadcasting [5.134]'], [], ['[5.134]: The use of the bands 5 900-5 950 kHz, 7 300-7 350 kHz, 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 13 570-13 600 kHz, 13 800-13 870 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz by the broadcasting service is subject to the application of the procedure of Article 12. Administrations are encouraged to use these bands to facilitate the introduction of digitally modulated emissions in accordance with the provisions of Resolution 517 (Rev.WRC-07)*. (WRC-07)', '[5.146]: Additional allocation: frequencies in the bands 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz may be used by stations in the fixed service, communicating only within the boundary of the country in which they are located, on condition that harmful interference is not caused to the broadcasting service. When using frequencies in the fixed service, administrations are urged to use the minimum power required and to take account of the seasonal use of frequencies by the broadcasting service published in accordance with the Radio Regulations. (WRC-07)']),
(17550000, 17900001): (False, False, False, True, False, ['Broadcasting'], [], []),
(17900000, 17970001): (False, False, True, False, False, ['Aeronautical Mobile (R)'], [], []),
(17970000, 18030001): (False, False, True, False, False, ['Aeronautical Mobile (Or)'], [], []),
(18030000, 18052001): (False, True, False, False, False, [], [], []),
(18052000, 18068001): (False, True, False, False, False, [], ['Space Research'], []),
(18068000, 18168001): (True, False, False, False, False, ['Amateur', 'Amateur-Satellite'], [], ['[5.154]: Additional allocation: in Armenia, Azerbaijan, the Russian Federation, Georgia, Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the band 18 068-18 168 kHz is also allocated to the fixed service on a primary basis for use within their boundaries, with a peak envelope power not exceeding 1 kW. (WRC-03)']),
(18168000, 18780001): (False, True, True, False, False, [], ['Mobile Except Aeronautical Mobile'], []),
(18780000, 18900001): (False, False, True, False, False, ['Maritime Mobile'], [], []),
(18900000, 19020001): (False, False, False, True, False, ['Broadcasting [5.134]'], [], ['[5.134]: The use of the bands 5 900-5 950 kHz, 7 300-7 350 kHz, 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 13 570-13 600 kHz, 13 800-13 870 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz by the broadcasting service is subject to the application of the procedure of Article 12. Administrations are encouraged to use these bands to facilitate the introduction of digitally modulated emissions in accordance with the provisions of Resolution 517 (Rev.WRC-07)*. (WRC-07)', '[5.146]: Additional allocation: frequencies in the bands 9 400-9 500 kHz, 11 600-11 650 kHz, 12 050-12 100 kHz, 15 600-15 800 kHz, 17 480-17 550 kHz and 18 900-19 020 kHz may be used by stations in the fixed service, communicating only within the boundary of the country in which they are located, on condition that harmful interference is not caused to the broadcasting service. When using frequencies in the fixed service, administrations are urged to use the minimum power required and to take account of the seasonal use of frequencies by the broadcasting service published in accordance with the Radio Regulations. (WRC-07)']),
(19020000, 19680001): (False, True, False, False, False, [], [], []),
(19680000, 19800001): (False, False, True, False, False, ['Maritime Mobile [5.132]'], [], ['[5.132]: The frequencies 4 210 kHz, 6 314 kHz, 8 416.5 kHz, 12 579 kHz, 16 806.5 kHz, 19 680.5 kHz, 22 376 kHz and 26 100.5 kHz are the international frequencies for the transmission of maritime safety information (MSI) (see Appendix 17).']),
(19800000, 19990001): (False, True, False, False, False, [], [], []),
(19990000, 19995001): (False, False, False, False, False, ['Standard Frequency And Time Signal'], ['Space Research'], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07)']),
(19995000, 20010001): (False, False, False, False, False, ['Standard Frequency And Time Signal (20 000 Khz)'], [], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07)']),
(20010000, 21000001): (False, True, True, False, False, [], [], []),
(21000000, 21450001): (True, False, False, False, False, ['Amateur', 'Amateur-Satellite'], [], []),
(21450000, 21850001): (False, False, False, True, False, ['Broadcasting'], [], []),
(21850000, 21870001): (False, True, False, False, False, ['Fixed [5.155A]'], [], ['[5.155A]: In Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Moldova, Mongolia, Uzbekistan, Kyrgyzstan, Slovakia, Tajikistan, Turkmenistan and Ukraine, the use of the band 21 850-21 870 kHz by the fixed service is limited to provision of services related to aircraft flight safety. (WRC-07)', '[5.155]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Moldova, Mongolia, Uzbekistan, Kyrgyzstan, Slovakia, Tajikistan, Turkmenistan and Ukraine, the band 21 850-21 870 kHz is also allocated to the aeronautical mobile (R) service on a primary basis. (WRC-07)']),
(21870000, 21924001): (False, True, False, False, False, ['Fixed [5.155B]'], [], ['[5.155B]: The band 21 870-21 924 kHz is used by the fixed service for provision of services related to aircraft flight safety.']),
(21924000, 22000001): (False, False, True, False, False, ['Aeronautical Mobile (R)'], [], []),
(22000000, 22855001): (False, False, True, False, False, ['Maritime Mobile [5.132]'], [], ['[5.132]: The frequencies 4 210 kHz, 6 314 kHz, 8 416.5 kHz, 12 579 kHz, 16 806.5 kHz, 19 680.5 kHz, 22 376 kHz and 26 100.5 kHz are the international frequencies for the transmission of maritime safety information (MSI) (see Appendix 17).', '[5.156]: Additional allocation: in Nigeria, the band 22 720-23 200 kHz is also allocated to the meteorological aids service (radiosondes) on a primary basis.']),
(22855000, 23000001): (False, True, False, False, False, [], [], ['[5.156]: Additional allocation: in Nigeria, the band 22 720-23 200 kHz is also allocated to the meteorological aids service (radiosondes) on a primary basis.']),
(23000000, 23200001): (False, True, True, False, False, [], ['Mobile Except Aeronautical Mobile (R)'], ['[5.156]: Additional allocation: in Nigeria, the band 22 720-23 200 kHz is also allocated to the meteorological aids service (radiosondes) on a primary basis.']),
(23200000, 23350001): (False, True, True, False, False, ['Fixed [5.156A]', 'Aeronautical Mobile (Or)'], [], ['[5.156A]: The use of the band 23 200-23 350 kHz by the fixed service is limited to provision of services related to aircraft flight safety.']),
(23350000, 24000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile [5.157]'], [], ['[5.157]: The use of the band 23 350-24 000 kHz by the maritime mobile service is limited to inter-ship radiotelegraphy.']),
(24000000, 24450001): (False, True, True, False, False, ['Land Mobile'], [], []),
(24450000, 24600001): (False, True, True, False, False, ['Land Mobile'], ['Radiolocation [5.132A]'], ['[5.132A]: Stations in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the fixed or mobile services. Applications of the radiolocation service are limited to oceanographic radars operating in accordance with Resolution 612 (Rev.WRC-12). (WRC-12)', '[5.158]: Alternative allocation: in Armenia, Belarus, Moldova, Uzbekistan and Kyrgyzstan, the frequency band 24 450-24 600 kHz is allocated to the fixed and land mobile services on a primary basis. (WRC-15)']),
(24600000, 24890001): (False, True, True, False, False, ['Land Mobile'], [], []),
(24890000, 24990001): (True, False, False, False, False, ['Amateur', 'Amateur-Satellite'], [], []),
(24990000, 25005001): (False, False, False, False, False, ['Standard Frequency And Time Signal (25 000 Khz)'], [], []),
(25005000, 25010001): (False, False, False, False, False, ['Standard Frequency And Time Signal'], ['Space Research'], []),
(25010000, 25070001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], [], []),
(25070000, 25210001): (False, False, True, False, False, ['Maritime Mobile'], [], []),
(25210000, 25550001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], [], []),
(25550000, 25670001): (False, False, False, False, False, ['Radio Astronomy'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(25670000, 26100001): (False, False, False, True, False, ['Broadcasting'], [], []),
(26100000, 26175001): (False, False, True, False, False, ['Maritime Mobile [5.132]'], [], ['[5.132]: The frequencies 4 210 kHz, 6 314 kHz, 8 416.5 kHz, 12 579 kHz, 16 806.5 kHz, 19 680.5 kHz, 22 376 kHz and 26 100.5 kHz are the international frequencies for the transmission of maritime safety information (MSI) (see Appendix 17).']),
(26175000, 26200001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], [], []),
(26200000, 26350001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], ['Radiolocation [5.132A]'], ['[5.132A]: Stations in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the fixed or mobile services. Applications of the radiolocation service are limited to oceanographic radars operating in accordance with Resolution 612 (Rev.WRC-12). (WRC-12)', '[5.133A]: Alternative allocation: in Armenia, Belarus, Moldova, Uzbekistan and Kyrgyzstan, the frequency bands 5 250-5 275 kHz and 26 200-26 350 kHz are allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-15)']),
(26350000, 27500001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], [], ['[5.150]: The following bands:13 553-13 567 kHz (centre frequency 13 560 kHz), 26 957-27 283 kHz (centre frequency 27 120 kHz), 40.66-40.70 MHz (centre frequency 40.68 MHz), 902-928 MHz in Region 2 (centre frequency 915 MHz), 2 400-2 500 MHz (centre frequency 2 450 MHz), 5 725-5 875 MHz (centre frequency 5 800 MHz), and 24-24.25 GHz (centre frequency 24.125 GHz) are also designated for industrial, scientific and medical (ISM) applications. Radiocommunication services operating within these bands must accept harmful interference which may be caused by these applications. ISM equipment operating in these bands is subject to the provisions of No. 15.13.']),
(27500000, 28000001): (False, True, True, False, False, ['Meteorological Aids'], [], []),
(28000000, 29700001): (True, False, False, False, False, ['Amateur', 'Amateur-Satellite'], [], []),
(29700000, 30005001): (False, True, True, False, False, [], [], []),
(30005000, 30010001): (False, True, True, False, False, ['Space Operation (Satellite Identification)', 'Space Research'], [], []),
(30010000, 37500001): (False, True, True, False, False, [], [], []),
(37500000, 38250001): (False, True, True, False, False, [], ['Radio Astronomy'], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(38250000, 39000001): (False, True, True, False, False, [], [], []),
(39000000, 39500001): (False, True, True, False, False, [], ['Radiolocation [5.132A]'], ['[5.132A]: Stations in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the fixed or mobile services. Applications of the radiolocation service are limited to oceanographic radars operating in accordance with Resolution 612 (Rev.WRC-12). (WRC-12)', '[5.159]: Alternative allocation: in Armenia, Belarus, Moldova, Uzbekistan and Kyrgyzstan, the frequency band 39-39.5 MHz is allocated to the fixed and mobile services on a primary basis. (WRC-15)']),
(39500000, 39986001): (False, True, True, False, False, [], [], []),
(39986000, 40020001): (False, True, True, False, False, [], ['Space Research'], []),
(40020000, 40980001): (False, True, True, False, False, [], [], ['[5.150]: The following bands:13 553-13 567 kHz (centre frequency 13 560 kHz), 26 957-27 283 kHz (centre frequency 27 120 kHz), 40.66-40.70 MHz (centre frequency 40.68 MHz), 902-928 MHz in Region 2 (centre frequency 915 MHz), 2 400-2 500 MHz (centre frequency 2 450 MHz), 5 725-5 875 MHz (centre frequency 5 800 MHz), and 24-24.25 GHz (centre frequency 24.125 GHz) are also designated for industrial, scientific and medical (ISM) applications. Radiocommunication services operating within these bands must accept harmful interference which may be caused by these applications. ISM equipment operating in these bands is subject to the provisions of No. 15.13.']),
(40980000, 41015001): (False, True, True, False, False, [], ['Space Research'], ['[5.160]: Additional allocation: in Botswana, Burundi, Dem. Rep. of the Congo and Rwanda, the band 41-44 MHz is also allocated to the aeronautical radionavigation service on a primary basis. (WRC-12)', '[5.161]: Additional allocation: in Iran (Islamic Republic of) and Japan, the band 41-44 MHz is also allocated to the radiolocation service on a secondary basis.']),
(41015000, 42000001): (False, True, True, False, False, [], [], ['[5.160]: Additional allocation: in Botswana, Burundi, Dem. Rep. of the Congo and Rwanda, the band 41-44 MHz is also allocated to the aeronautical radionavigation service on a primary basis. (WRC-12)', '[5.161]: Additional allocation: in Iran (Islamic Republic of) and Japan, the band 41-44 MHz is also allocated to the radiolocation service on a secondary basis.', '[5.161A]: Additional allocation: in Korea (Rep. of) and the United States, the frequency bands 41.015-41.665 MHz and 43.35-44 MHz are also allocated to the radiolocation service on a primary basis. Stations in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the fixed or mobile services. Applications of the radiolocation service are limited to oceanographic radars operating in accordance with Resolution 612 (Rev.WRC-12). (WRC-12)']),
(42000000, 42500001): (False, True, True, False, False, [], ['Radiolocation [5.132A]'], ['[5.132A]: Stations in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the fixed or mobile services. Applications of the radiolocation service are limited to oceanographic radars operating in accordance with Resolution 612 (Rev.WRC-12). (WRC-12)', '[5.160]: Additional allocation: in Botswana, Burundi, Dem. Rep. of the Congo and Rwanda, the band 41-44 MHz is also allocated to the aeronautical radionavigation service on a primary basis. (WRC-12)', '[5.161B]: Alternative allocation: in Albania, Germany, Armenia, Austria, Belarus, Belgium, Bosnia and Herzegovina, Cyprus, Vatican, Croatia, Denmark, Spain, Estonia, Finland, France, Greece, Hungary, Ireland, Iceland, Italy, Latvia, The Former Yugoslav Rep. of Macedonia, Liechtenstein, Lithuania, Luxembourg, Malta, Moldova, Monaco, Montenegro, Norway, Uzbekistan, Netherlands, Portugal, Kyrgyzstan, Slovakia, Czech Rep., Romania, United Kingdom, San Marino, Slovenia, Sweden, Switzerland, Turkey and Ukraine, the frequency band 42-42.5 MHz is allocated to the fixed and mobile services on a primary basis. (WRC-15)']),
(42500000, 44000001): (False, True, True, False, False, [], [], ['[5.160]: Additional allocation: in Botswana, Burundi, Dem. Rep. of the Congo and Rwanda, the band 41-44 MHz is also allocated to the aeronautical radionavigation service on a primary basis. (WRC-12)', '[5.161]: Additional allocation: in Iran (Islamic Republic of) and Japan, the band 41-44 MHz is also allocated to the radiolocation service on a secondary basis.', '[5.161A]: Additional allocation: in Korea (Rep. of) and the United States, the frequency bands 41.015-41.665 MHz and 43.35-44 MHz are also allocated to the radiolocation service on a primary basis. Stations in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the fixed or mobile services. Applications of the radiolocation service are limited to oceanographic radars operating in accordance with Resolution 612 (Rev.WRC-12). (WRC-12)']),
(44000000, 47000001): (False, True, True, False, False, [], [], ['[5.162]: Additional allocation: in Australia, the band 44-47 MHz is also allocated to the broadcasting service on a primary basis. (WRC-12)', '[5.162A]: Additional allocation: in Germany, Austria, Belgium, Bosnia and Herzegovina, China, Vatican, Denmark, Spain, Estonia, the Russian Federation, Finland, France, Ireland, Iceland, Italy, Latvia, The Former Yugoslav Republic of Macedonia, Liechtenstein, Lithuania, Luxembourg, Monaco, Montenegro, Norway, the Netherlands, Poland, Portugal, the Czech Rep., the United Kingdom, Serbia, Slovenia, Sweden and Switzerland the band 46-68 MHz is also allocated to the radiolocation service on a secondary basis. This use is limited to the operation of wind profiler radars in accordance with Resolution 217 (WRC-97). (WRC-12)']),
(47000000, 68000001): (False, False, False, True, False, ['Broadcasting'], [], ['[5.162A]: Additional allocation: in Germany, Austria, Belgium, Bosnia and Herzegovina, China, Vatican, Denmark, Spain, Estonia, the Russian Federation, Finland, France, Ireland, Iceland, Italy, Latvia, The Former Yugoslav Republic of Macedonia, Liechtenstein, Lithuania, Luxembourg, Monaco, Montenegro, Norway, the Netherlands, Poland, Portugal, the Czech Rep., the United Kingdom, Serbia, Slovenia, Sweden and Switzerland the band 46-68 MHz is also allocated to the radiolocation service on a secondary basis. This use is limited to the operation of wind profiler radars in accordance with Resolution 217 (WRC-97). (WRC-12)', '[5.163]: Additional allocation: in Armenia, Belarus, the Russian Federation, Georgia, Hungary, Kazakhstan, Latvia, Moldova, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the bands 47-48.5 MHz and 56.5-58 MHz are also allocated to the fixed and land mobile services on a secondary basis. (WRC-12)', "[5.164]: Additional allocation: in Albania, Algeria, Germany, Austria, Belgium, Bosnia and Herzegovina, Botswana, Bulgaria, Côte d'Ivoire, Croatia, Denmark, Spain, Estonia, Finland, France, Gabon, Greece, Ireland, Israel, Italy, Jordan, Lebanon, Libya, Liechtenstein, Lithuania, Luxembourg, Madagascar, Mali, Malta, Morocco, Mauritania, Monaco, Montenegro, Nigeria, Norway, the Netherlands, Poland, Syrian Arab Republic, Slovakia, Czech Rep., Romania, the United Kingdom, Serbia, Slovenia, Sweden, Switzerland, Swaziland, Chad, Togo, Tunisia and Turkey, the frequency band 47-68 MHz, in South Africa the frequency band 47-50 MHz, and in Latvia the frequency band 48.5-56.5 MHz, are also allocated to the land mobile service on a primary basis. However, stations of the land mobile service in the countries mentioned in connection with each frequency band referred to in this footnote shall not cause harmful interference to, or claim protection from, existing or planned broadcasting stations of countries other than those mentioned in connection with the frequency band. (WRC-15)", '[5.165]: Additional allocation: in Angola, Cameroon, Congo (Rep. of the), Madagascar, Mozambique, Niger, Somalia, Sudan, South Sudan, Tanzania and Chad, the band 47-68 MHz is also allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-12)', '[5.169]: Alternative allocation: in Botswana, Lesotho, Malawi, Namibia, the Dem. Rep. of the Congo, Rwanda, South Africa, Swaziland, Zambia and Zimbabwe, the band 50-54 MHz is allocated to the amateur service on a primary basis. In Senegal, the band 50-51 MHz is allocated to the amateur service on a primary basis. (WRC-12)', '[5.171]: Additional allocation: in Botswana, Lesotho, Malawi, Mali, Namibia, Dem. Rep. of the Congo, Rwanda, South Africa, Swaziland, Zambia and Zimbabwe, the band 54-68 MHz is also allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-12)']),
(68000000, 74800001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.175]: Alternative allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Moldova, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the bands 68-73 MHz and 76-87.5 MHz are allocated to the broadcasting service on a primary basis. In Latvia and Lithuania, the bands 68-73 MHz and 76-87.5 MHz are allocated to the broadcasting and mobile, except aeronautical mobile, services on a primary basis. The services to which these bands are allocated in other countries and the broadcasting service in the countries listed above are subject to agreements with the neighbouring countries concerned. (WRC-07)', '[5.177]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the band 73-74 MHz is also allocated to the broadcasting service on a primary basis, subject to agreement obtained under No. 9.21. (WRC-07)', '[5.179]: Additional allocation: in Armenia, Azerbaijan, Belarus, China, the Russian Federation, Georgia, Kazakhstan, Lithuania, Mongolia, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the bands 74.6-74.8 MHz and 75.2-75.4 MHz are also allocated to the aeronautical radionavigation service, on a primary basis, for ground-based transmitters only. (WRC-12)']),
(74800000, 75200001): (False, False, False, False, False, ['Aeronautical Radionavigation'], [], ['[5.180]: The frequency 75 MHz is assigned to marker beacons. Administrations shall refrain from assigning frequencies close to the limits of the guardband to stations of other services which, because of their power or geographical position, might cause harmful interference or otherwise place a constraint on marker beacons.Every effort should be made to improve further the characteristics of airborne receivers and to limit the power of transmitting stations close to the limits 74.8 MHz and 75.2 MHz. ', '[5.181]: Additional allocation: in Egypt, Israel and the Syrian Arab Republic, the band 74.8-75.2 MHz is also allocated to the mobile service on a secondary basis, subject to agreement obtained under No. 9.21. In order to ensure that harmful interference is not caused to stations of the aeronautical radionavigation service, stations of the mobile service shall not be introduced in the band until it is no longer required for the aeronautical radionavigation service by any administration which may be identified in the application of the procedure invoked under No. 9.21. (WRC-03)']),
(75200000, 87500001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], [], ['[5.175]: Alternative allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Moldova, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the bands 68-73 MHz and 76-87.5 MHz are allocated to the broadcasting service on a primary basis. In Latvia and Lithuania, the bands 68-73 MHz and 76-87.5 MHz are allocated to the broadcasting and mobile, except aeronautical mobile, services on a primary basis. The services to which these bands are allocated in other countries and the broadcasting service in the countries listed above are subject to agreements with the neighbouring countries concerned. (WRC-07)', '[5.179]: Additional allocation: in Armenia, Azerbaijan, Belarus, China, the Russian Federation, Georgia, Kazakhstan, Lithuania, Mongolia, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the bands 74.6-74.8 MHz and 75.2-75.4 MHz are also allocated to the aeronautical radionavigation service, on a primary basis, for ground-based transmitters only. (WRC-12)', '[5.187]: Alternative allocation: in Albania, the band 81-87.5 MHz is allocated to the broadcasting service on a primary basis and used in accordance with the decisions contained in the Final Acts of the Special Regional Conference (Geneva, 1960).']),
(87500000, 100000001): (False, False, False, True, False, ['Broadcasting'], [], ['[5.190]: Additional allocation: in Monaco, the band 87.5-88 MHz is also allocated to the land mobile service on a primary basis, subject to agreement obtained under No. 9.21. (WRC-97)']),
(100000000, 108000001): (False, False, False, True, False, ['Broadcasting'], [], ['[5.192]: Additional allocation: in China and Korea (Rep. of), the band 100-108 MHz is also allocated to the fixed and mobile services on a primary basis. (WRC-97)', '[5.194]: Additional allocation: in Azerbaijan, Kyrgyzstan, Somalia and Turkmenistan, the band 104-108 MHz is also allocated to the mobile, except aeronautical mobile (R), service on a secondary basis. (WRC-07)']),
(108000000, 117975001): (False, False, False, False, False, ['Aeronautical Radionavigation'], [], ['[5.197]: Additional allocation: in the Syrian Arab Republic, the band 108-111.975 MHz is also allocated to the mobile service on a secondary basis, subject to agreement obtained under No. 9.21. In order to ensure that harmful interference is not caused to stations of the aeronautical radionavigation service, stations of the mobile service shall not be introduced in the band until it is no longer required for the aeronautical radionavigation service by any administration which may be identified in the application of the procedures invoked under No. 9.21. (WRC-12)', '[5.197A]: Additional allocation: the band 108-117.975 MHz is also allocated on a primary basis to the aeronautical mobile (R) service, limited to systems operating in accordance with recognized international aeronautical standards. Such use shall be in accordance with Resolution 413 (Rev.WRC-07)*. The use of the band 108-112 MHz by the aeronautical mobile (R) service shall be limited to systems composed of ground-based transmitters and associated receivers that provide navigational information in support of air navigation functions in accordance with recognized international aeronautical standards. (WRC-07)']),
(117975000, 137000001): (False, False, True, False, False, ['Aeronautical Mobile (R)'], [], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07) ', '[5.200]: In the band 117.975-137 MHz, the frequency 121.5 MHz is the aeronautical emergency frequency and, where required, the frequency 123.1 MHz is the aeronautical frequency auxiliary to 121.5 MHz. Mobile stations of the maritime mobile service may communicate on these frequencies under the conditions laid down in Article 31 for distress and safety purposes with stations of the aeronautical mobile service. (WRC-07)', '[5.201]: Additional allocation: in Armenia, Azerbaijan, Belarus, Bulgaria, Estonia, the Russian Federation, Georgia, Hungary, Iran (Islamic Republic of), Iraq (Republic of), Japan, Kazakhstan, Moldova, Mongolia, Mozambique, Uzbekistan, Papua New Guinea, Poland, Kyrgyzstan, Romania, Tajikistan, Turkmenistan and Ukraine, the frequency band 132-136 MHz is also allocated to the aeronautical mobile (OR) service on a primary basis. In assigning frequencies to stations of the aeronautical mobile (OR) service, the administration shall take account of the frequencies assigned to stations in the aeronautical mobile (R) service. (WRC-15)', '[5.202]: Additional allocation: in Saudi Arabia, Armenia, Azerbaijan, Belarus, Bulgaria, the United Arab Emirates, the Russian Federation, Georgia, Iran (Islamic Republic of), Jordan, Oman, Uzbekistan, Poland, the Syrian Arab Republic, Kyrgyzstan, Romania, Tajikistan, Turkmenistan and Ukraine, the frequency band 136-137 MHz is also allocated to the aeronautical mobile (OR) service on a primary basis. In assigning frequencies to stations of the aeronautical mobile (OR) service, the administration shall take account of the frequencies assigned to stations in the aeronautical mobile (R) service. (WRC-15)']),
(137000000, 137025001): (False, True, True, False, False, ['Space Operation (Space-To-Earth)', 'Meteorological-Satellite (Space-To-Earth)', 'Mobile-Satellite (Space-To-Earth) [5.208A][5.208B][5.209]', 'Space Research (Space-To-Earth)'], ['Mobile Except Aeronautical Mobile (R)'], ['[5.208A]: In making assignments to space stations in the mobile-satellite service in the bands 137-138 MHz, 387-390 MHz and 400.15-401 MHz, administrations shall take all practicable steps to protect the radio astronomy service in the bands 150.05-153 MHz, 322-328.6 MHz, 406.1-410 MHz and 608-614 MHz from harmful interference from unwanted emissions. The threshold levels of interference detrimental to the radio astronomy service are shown in the relevant ITU-R Recommendation. (WRC-07)', '[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.209]: The use of the bands 137-138 MHz, 148-150.05 MHz, 399.9-400.05 MHz, 400.15-401 MHz, 454-456 MHz and 459-460 MHz by the mobile-satellite service is limited to non-geostationary-satellite systems. (WRC-97)', '[5.204]: Different category of service: in Afghanistan, Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, China, Cuba, the United Arab Emirates, India, Indonesia, Iran (Islamic Republic of), Iraq, Kuwait, Montenegro, Oman, Pakistan, the Philippines, Qatar, Serbia, Singapore, Thailand and Yemen, the band 137-138 MHz is allocated to the fixed and mobile, except aeronautical mobile (R), services on a primary basis (see No. 5.33). (WRC-07)', '[5.205]: Different category of service: in Israel and Jordan, the allocation of the band 137-138 MHz to the fixed and mobile, except aeronautical mobile, services is on a primary basis (see No. 5.33).', '[5.206]: Different category of service: in Armenia, Azerbaijan, Belarus, Bulgaria, Egypt, the Russian Federation, Finland, France, Georgia, Greece, Kazakhstan, Lebanon, Moldova, Mongolia, Uzbekistan, Poland, Kyrgyzstan, the Syrian Arab Republic, Slovakia, the Czech Rep., Romania, Tajikistan, Turkmenistan and Ukraine, the allocation of the band 137-138 MHz to the aeronautical mobile (OR) service is on a primary basis (see No. 5.33). (WRC-2000)', '[5.207]: Additional allocation: in Australia, the band 137-144 MHz is also allocated to the broadcasting service on a primary basis until that service can be accommodated within regional broadcasting allocations.', '[5.208]: The use of the band 137-138 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. (WRC-97)']),
(137025000, 137175001): (False, True, True, False, False, ['Space Operation (Space-To-Earth)', 'Meteorological-Satellite (Space-To-Earth)', 'Space Research (Space-To-Earth)'], ['Mobile Except Aeronautical Mobile (R)', 'Mobile-Satellite (Space-To-Earth) [5.208A][5.208B][5.209]'], ['[5.208A]: In making assignments to space stations in the mobile-satellite service in the bands 137-138 MHz, 387-390 MHz and 400.15-401 MHz, administrations shall take all practicable steps to protect the radio astronomy service in the bands 150.05-153 MHz, 322-328.6 MHz, 406.1-410 MHz and 608-614 MHz from harmful interference from unwanted emissions. The threshold levels of interference detrimental to the radio astronomy service are shown in the relevant ITU-R Recommendation. (WRC-07)', '[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.209]: The use of the bands 137-138 MHz, 148-150.05 MHz, 399.9-400.05 MHz, 400.15-401 MHz, 454-456 MHz and 459-460 MHz by the mobile-satellite service is limited to non-geostationary-satellite systems. (WRC-97)', '[5.204]: Different category of service: in Afghanistan, Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, China, Cuba, the United Arab Emirates, India, Indonesia, Iran (Islamic Republic of), Iraq, Kuwait, Montenegro, Oman, Pakistan, the Philippines, Qatar, Serbia, Singapore, Thailand and Yemen, the band 137-138 MHz is allocated to the fixed and mobile, except aeronautical mobile (R), services on a primary basis (see No. 5.33). (WRC-07)', '[5.205]: Different category of service: in Israel and Jordan, the allocation of the band 137-138 MHz to the fixed and mobile, except aeronautical mobile, services is on a primary basis (see No. 5.33).', '[5.206]: Different category of service: in Armenia, Azerbaijan, Belarus, Bulgaria, Egypt, the Russian Federation, Finland, France, Georgia, Greece, Kazakhstan, Lebanon, Moldova, Mongolia, Uzbekistan, Poland, Kyrgyzstan, the Syrian Arab Republic, Slovakia, the Czech Rep., Romania, Tajikistan, Turkmenistan and Ukraine, the allocation of the band 137-138 MHz to the aeronautical mobile (OR) service is on a primary basis (see No. 5.33). (WRC-2000)', '[5.207]: Additional allocation: in Australia, the band 137-144 MHz is also allocated to the broadcasting service on a primary basis until that service can be accommodated within regional broadcasting allocations.', '[5.208]: The use of the band 137-138 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. (WRC-97)']),
(137175000, 137825001): (False, True, True, False, False, ['Space Operation (Space-To-Earth)', 'Meteorological-Satellite (Space-To-Earth)', 'Mobile-Satellite (Space-To-Earth) [5.208A][5.208B][5.209]', 'Space Research (Space-To-Earth)'], ['Mobile Except Aeronautical Mobile (R)'], ['[5.208A]: In making assignments to space stations in the mobile-satellite service in the bands 137-138 MHz, 387-390 MHz and 400.15-401 MHz, administrations shall take all practicable steps to protect the radio astronomy service in the bands 150.05-153 MHz, 322-328.6 MHz, 406.1-410 MHz and 608-614 MHz from harmful interference from unwanted emissions. The threshold levels of interference detrimental to the radio astronomy service are shown in the relevant ITU-R Recommendation. (WRC-07)', '[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.209]: The use of the bands 137-138 MHz, 148-150.05 MHz, 399.9-400.05 MHz, 400.15-401 MHz, 454-456 MHz and 459-460 MHz by the mobile-satellite service is limited to non-geostationary-satellite systems. (WRC-97)', '[5.204]: Different category of service: in Afghanistan, Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, China, Cuba, the United Arab Emirates, India, Indonesia, Iran (Islamic Republic of), Iraq, Kuwait, Montenegro, Oman, Pakistan, the Philippines, Qatar, Serbia, Singapore, Thailand and Yemen, the band 137-138 MHz is allocated to the fixed and mobile, except aeronautical mobile (R), services on a primary basis (see No. 5.33). (WRC-07)', '[5.205]: Different category of service: in Israel and Jordan, the allocation of the band 137-138 MHz to the fixed and mobile, except aeronautical mobile, services is on a primary basis (see No. 5.33).', '[5.206]: Different category of service: in Armenia, Azerbaijan, Belarus, Bulgaria, Egypt, the Russian Federation, Finland, France, Georgia, Greece, Kazakhstan, Lebanon, Moldova, Mongolia, Uzbekistan, Poland, Kyrgyzstan, the Syrian Arab Republic, Slovakia, the Czech Rep., Romania, Tajikistan, Turkmenistan and Ukraine, the allocation of the band 137-138 MHz to the aeronautical mobile (OR) service is on a primary basis (see No. 5.33). (WRC-2000)', '[5.207]: Additional allocation: in Australia, the band 137-144 MHz is also allocated to the broadcasting service on a primary basis until that service can be accommodated within regional broadcasting allocations.', '[5.208]: The use of the band 137-138 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. (WRC-97)']),
(137825000, 138000001): (False, True, True, False, False, ['Space Operation (Space-To-Earth)', 'Meteorological-Satellite (Space-To-Earth)', 'Space Research (Space-To-Earth)'], ['Mobile Except Aeronautical Mobile (R)', 'Mobile-Satellite (Space-To-Earth) [5.208A][5.208B][5.209]'], ['[5.208A]: In making assignments to space stations in the mobile-satellite service in the bands 137-138 MHz, 387-390 MHz and 400.15-401 MHz, administrations shall take all practicable steps to protect the radio astronomy service in the bands 150.05-153 MHz, 322-328.6 MHz, 406.1-410 MHz and 608-614 MHz from harmful interference from unwanted emissions. The threshold levels of interference detrimental to the radio astronomy service are shown in the relevant ITU-R Recommendation. (WRC-07)', '[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.209]: The use of the bands 137-138 MHz, 148-150.05 MHz, 399.9-400.05 MHz, 400.15-401 MHz, 454-456 MHz and 459-460 MHz by the mobile-satellite service is limited to non-geostationary-satellite systems. (WRC-97)', '[5.204]: Different category of service: in Afghanistan, Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, China, Cuba, the United Arab Emirates, India, Indonesia, Iran (Islamic Republic of), Iraq, Kuwait, Montenegro, Oman, Pakistan, the Philippines, Qatar, Serbia, Singapore, Thailand and Yemen, the band 137-138 MHz is allocated to the fixed and mobile, except aeronautical mobile (R), services on a primary basis (see No. 5.33). (WRC-07)', '[5.205]: Different category of service: in Israel and Jordan, the allocation of the band 137-138 MHz to the fixed and mobile, except aeronautical mobile, services is on a primary basis (see No. 5.33).', '[5.206]: Different category of service: in Armenia, Azerbaijan, Belarus, Bulgaria, Egypt, the Russian Federation, Finland, France, Georgia, Greece, Kazakhstan, Lebanon, Moldova, Mongolia, Uzbekistan, Poland, Kyrgyzstan, the Syrian Arab Republic, Slovakia, the Czech Rep., Romania, Tajikistan, Turkmenistan and Ukraine, the allocation of the band 137-138 MHz to the aeronautical mobile (OR) service is on a primary basis (see No. 5.33). (WRC-2000)', '[5.207]: Additional allocation: in Australia, the band 137-144 MHz is also allocated to the broadcasting service on a primary basis until that service can be accommodated within regional broadcasting allocations.', '[5.208]: The use of the band 137-138 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. (WRC-97)']),
(138000000, 143600001): (False, False, True, False, False, ['Aeronautical Mobile (Or)'], [], ['[5.210]: Additional allocation: in Italy, the Czech Rep. and the United Kingdom, the bands 138-143.6 MHz and 143.65-144 MHz are also allocated to the space research service (space-to-Earth) on a secondary basis. (WRC-07)', '[5.211]: Additional allocation: in Germany, Saudi Arabia, Austria, Bahrain, Belgium, Denmark, the United Arab Emirates, Spain, Finland, Greece, Guinea, Ireland, Israel, Kenya, Kuwait, The Former Yugoslav Republic of Macedonia, Lebanon, Liechtenstein, Luxembourg, Mali, Malta, Montenegro, Norway, the Netherlands, Qatar, Slovakia, the United Kingdom, Serbia, Slovenia, Somalia, Sweden, Switzerland, Tanzania, Tunisia and Turkey, the frequency band 138-144 MHz is also allocated to the maritime mobile and land mobile services on a primary basis. (WRC-15)', '[5.212]: Alternative allocation: in Angola, Botswana, Cameroon, the Central African Rep., Congo (Rep. of the), Gabon, Gambia, Ghana, Guinea, Iraq, Jordan, Lesotho, Liberia, Libya, Malawi, Mozambique, Namibia, Niger, Oman, Uganda, Syrian Arab Republic, the Dem. Rep. of the Congo, Rwanda, Sierra Leone, South Africa, Swaziland, Chad, Togo, Zambia and Zimbabwe, the band 138-144 MHz is allocated to the fixed and mobile services on a primary basis. (WRC-12)', '[5.214]: Additional allocation: in Eritrea, Ethiopia, Kenya, The Former Yugoslav Republic of Macedonia, Montenegro, Serbia, Somalia, Sudan, South Sudan and Tanzania, the band 138-144 MHz is also allocated to the fixed service on a primary basis. (WRC-12)']),
(143600000, 143650001): (False, False, True, False, False, ['Aeronautical Mobile (Or)', 'Space Research (Space-To-Earth)'], [], ['[5.211]: Additional allocation: in Germany, Saudi Arabia, Austria, Bahrain, Belgium, Denmark, the United Arab Emirates, Spain, Finland, Greece, Guinea, Ireland, Israel, Kenya, Kuwait, The Former Yugoslav Republic of Macedonia, Lebanon, Liechtenstein, Luxembourg, Mali, Malta, Montenegro, Norway, the Netherlands, Qatar, Slovakia, the United Kingdom, Serbia, Slovenia, Somalia, Sweden, Switzerland, Tanzania, Tunisia and Turkey, the frequency band 138-144 MHz is also allocated to the maritime mobile and land mobile services on a primary basis. (WRC-15)', '[5.212]: Alternative allocation: in Angola, Botswana, Cameroon, the Central African Rep., Congo (Rep. of the), Gabon, Gambia, Ghana, Guinea, Iraq, Jordan, Lesotho, Liberia, Libya, Malawi, Mozambique, Namibia, Niger, Oman, Uganda, Syrian Arab Republic, the Dem. Rep. of the Congo, Rwanda, Sierra Leone, South Africa, Swaziland, Chad, Togo, Zambia and Zimbabwe, the band 138-144 MHz is allocated to the fixed and mobile services on a primary basis. (WRC-12)', '[5.214]: Additional allocation: in Eritrea, Ethiopia, Kenya, The Former Yugoslav Republic of Macedonia, Montenegro, Serbia, Somalia, Sudan, South Sudan and Tanzania, the band 138-144 MHz is also allocated to the fixed service on a primary basis. (WRC-12)']),
(143650000, 144000001): (False, False, True, False, False, ['Aeronautical Mobile (Or)'], [], ['[5.210]: Additional allocation: in Italy, the Czech Rep. and the United Kingdom, the bands 138-143.6 MHz and 143.65-144 MHz are also allocated to the space research service (space-to-Earth) on a secondary basis. (WRC-07)', '[5.211]: Additional allocation: in Germany, Saudi Arabia, Austria, Bahrain, Belgium, Denmark, the United Arab Emirates, Spain, Finland, Greece, Guinea, Ireland, Israel, Kenya, Kuwait, The Former Yugoslav Republic of Macedonia, Lebanon, Liechtenstein, Luxembourg, Mali, Malta, Montenegro, Norway, the Netherlands, Qatar, Slovakia, the United Kingdom, Serbia, Slovenia, Somalia, Sweden, Switzerland, Tanzania, Tunisia and Turkey, the frequency band 138-144 MHz is also allocated to the maritime mobile and land mobile services on a primary basis. (WRC-15)', '[5.212]: Alternative allocation: in Angola, Botswana, Cameroon, the Central African Rep., Congo (Rep. of the), Gabon, Gambia, Ghana, Guinea, Iraq, Jordan, Lesotho, Liberia, Libya, Malawi, Mozambique, Namibia, Niger, Oman, Uganda, Syrian Arab Republic, the Dem. Rep. of the Congo, Rwanda, Sierra Leone, South Africa, Swaziland, Chad, Togo, Zambia and Zimbabwe, the band 138-144 MHz is allocated to the fixed and mobile services on a primary basis. (WRC-12)', '[5.214]: Additional allocation: in Eritrea, Ethiopia, Kenya, The Former Yugoslav Republic of Macedonia, Montenegro, Serbia, Somalia, Sudan, South Sudan and Tanzania, the band 138-144 MHz is also allocated to the fixed service on a primary basis. (WRC-12)']),
(144000000, 146000001): (True, False, False, False, False, ['Amateur', 'Amateur-Satellite'], [], ['[5.216]: Additional allocation: in China, the band 144-146 MHz is also allocated to the aeronautical mobile (OR) service on a secondary basis.']),
(146000000, 148000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], [], []),
(148000000, 149900001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)', 'Mobile-Satellite (Earth-To-Space) [5.209]'], [], ['[5.209]: The use of the bands 137-138 MHz, 148-150.05 MHz, 399.9-400.05 MHz, 400.15-401 MHz, 454-456 MHz and 459-460 MHz by the mobile-satellite service is limited to non-geostationary-satellite systems. (WRC-97)', '[5.218]: Additional allocation: the band 148-149.9 MHz is also allocated to the space operation service (Earth-to-space) on a primary basis, subject to agreement obtained under No. 9.21. The bandwidth of any individual transmission shall not exceed ± 25 kHz.', '[5.219]: The use of the band 148-149.9 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. The mobile-satellite service shall not constrain the development and use of the fixed, mobile and space operation services in the band 148-149.9 MHz.', "[5.221]: Stations of the mobile-satellite service in the frequency band 148-149.9 MHz shall not cause harmful interference to, or claim protection from, stations of the fixed or mobile services operating in accordance with the Table of Frequency Allocations in the following countries: Albania, Algeria, Germany, Saudi Arabia, Australia, Austria, Bahrain, Bangladesh, Barbados, Belarus, Belgium, Benin, Bosnia and Herzegovina, Botswana, Brunei Darussalam, Bulgaria, Cameroon, China, Cyprus, Congo (Rep. of the), Korea (Rep. of), Côte d'Ivoire, Croatia, Cuba, Denmark, Djibouti, Egypt, the United Arab Emirates, Eritrea, Spain, Estonia, Ethiopia, the Russian Federation, Finland, France, Gabon, Georgia, Ghana, Greece, Guinea, Guinea Bissau, Hungary, India, Iran (Islamic Republic of), Ireland, Iceland, Israel, Italy, Jamaica, Japan, Jordan, Kazakhstan, Kenya, Kuwait, The Former Yugoslav Republic of Macedonia, Lesotho, Latvia, Lebanon, Libya, Liechtenstein, Lithuania, Luxembourg, Malaysia, Mali, Malta, Mauritania, Moldova, Mongolia, Montenegro, Mozambique, Namibia, Norway, New Zealand, Oman, Uganda, Uzbekistan, Pakistan, Panama, Papua New Guinea, Paraguay, the Netherlands, the Philippines, Poland, Portugal, Qatar, the Syrian Arab Republic, Kyrgyzstan, Dem. People’s Rep. of Korea, Slovakia, Romania, the United Kingdom, Senegal, Serbia, Sierra Leone, Singapore, Slovenia, Sudan, Sri Lanka, South Africa, Sweden, Switzerland, Swaziland, Tanzania, Chad, Togo, Tonga, Trinidad and Tobago, Tunisia, Turkey, Ukraine, Viet Nam, Yemen, Zambia and Zimbabwe. (WRC-15)"]),
(149900000, 150050001): (False, False, False, False, False, ['Mobile-Satellite (Earth-To-Space) [5.209][5.220]'], [], ['[5.209]: The use of the bands 137-138 MHz, 148-150.05 MHz, 399.9-400.05 MHz, 400.15-401 MHz, 454-456 MHz and 459-460 MHz by the mobile-satellite service is limited to non-geostationary-satellite systems. (WRC-97)', '[5.220]: The use of the frequency bands 149.9-150.05 MHz and 399.9-400.05 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. (WRC-15)']),
(150050000, 153000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile', 'Radio Astronomy'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(153000000, 154000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], ['Meteorological Aids'], []),
(154000000, 156488001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], [], ['[5.225A]: Additional allocation: in Algeria, Armenia, Azerbaijan, Belarus, China, the Russian Federation, France, Iran (Islamic Republic of), Kazakhstan, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan, Ukraine and Viet Nam, the frequency band 154-156 MHz is also allocated to the radiolocation service on a primary basis. The usage of the frequency band 154-156 MHz by the radiolocation service shall be limited to space-object detection systems operating from terrestrial locations. The operation of stations in the radiolocation service in the frequency band 154-156 MHz shall be subject to agreement obtained under No. 9.21. For the identification of potentially affected administrations in Region 1, the instantaneous field-strength value of 12 dB(μV/m) for 10% of the time produced at 10 m above ground level in the 25 kHz reference frequency band at the border of the territory of any other administration shall be used. For the identification of potentially affected administrations in Region 3, the interference-to-noise ratio (I/N) value of −6 dB (N = −161 dBW/4 kHz), or −10 dB for applications with greater protection requirements, such as public protection and disaster relief (PPDR (N = −161 dBW/4 kHz)), for 1% of the time produced at 60 m above ground level at the border of the territory of any other administration shall be used. In the frequency bands 156.7625-156.8375 MHz, 156.5125-156.5375 MHz, 161.9625-161.9875 MHz, 162.0125-162.0375 MHz, out-of-band e.i.r.p. of space surveillance radars shall not exceed −16 dBW. Frequency assignments to the radiolocation service under this allocation in Ukraine shall not be used without the agreement of Moldova. (WRC-12)', '[5.226]: The frequency 156.525 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service using digital selective calling (DSC). The conditions for the use of this frequency and the band 156.4875-156.5625 MHz are contained in Articles 31 and 52, and in Appendix 18.The frequency 156.8 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service. The conditions for the use of this frequency and the band 156.7625-156.8375 MHz are contained in Article 31 and Appendix 18. In the bands 156-156.4875 MHz, 156.5625-156.7625 MHz, 156.8375-157.45 MHz, 160.6-160.975 MHz and 161.475-162.05 MHz, each administration shall give priority to the maritime mobile service on only such frequencies as are assigned to stations of the maritime mobile service by the administration (see Articles 31 and 52, and Appendix 18). Any use of frequencies in these bands by stations of other services to which they are allocated should be avoided in areas where such use might cause harmful interference to the maritime mobile VHF radiocommunication service. However, the frequencies 156.8 MHz and 156.525 MHz and the frequency bands in which priority is given to the maritime mobile service may be used for radiocommunications on inland waterways subject to agreement between interested and affected administrations and taking into account current frequency usage and existing agreements. (WRC-07)']),
(156488000, 156563001): (False, False, True, False, False, ['Maritime Mobile (Distress And Calling Via Dsc)'], [], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07) ', '[5.226]: The frequency 156.525 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service using digital selective calling (DSC). The conditions for the use of this frequency and the band 156.4875-156.5625 MHz are contained in Articles 31 and 52, and in Appendix 18.The frequency 156.8 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service. The conditions for the use of this frequency and the band 156.7625-156.8375 MHz are contained in Article 31 and Appendix 18. In the bands 156-156.4875 MHz, 156.5625-156.7625 MHz, 156.8375-157.45 MHz, 160.6-160.975 MHz and 161.475-162.05 MHz, each administration shall give priority to the maritime mobile service on only such frequencies as are assigned to stations of the maritime mobile service by the administration (see Articles 31 and 52, and Appendix 18). Any use of frequencies in these bands by stations of other services to which they are allocated should be avoided in areas where such use might cause harmful interference to the maritime mobile VHF radiocommunication service. However, the frequencies 156.8 MHz and 156.525 MHz and the frequency bands in which priority is given to the maritime mobile service may be used for radiocommunications on inland waterways subject to agreement between interested and affected administrations and taking into account current frequency usage and existing agreements. (WRC-07) ', '[5.227]: Additional allocation: the bands 156.4875-156.5125 MHz and 156.5375-156.5625 MHz are also allocated to the fixed and land mobile services on a primary basis. The use of these bands by the fixed and land mobile services shall not cause harmful interference to nor claim protection from the maritime mobile VHF radiocommunication service. (WRC-07)']),
(156563000, 156763001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile (R)'], [], ['[5.226]: The frequency 156.525 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service using digital selective calling (DSC). The conditions for the use of this frequency and the band 156.4875-156.5625 MHz are contained in Articles 31 and 52, and in Appendix 18.The frequency 156.8 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service. The conditions for the use of this frequency and the band 156.7625-156.8375 MHz are contained in Article 31 and Appendix 18. In the bands 156-156.4875 MHz, 156.5625-156.7625 MHz, 156.8375-157.45 MHz, 160.6-160.975 MHz and 161.475-162.05 MHz, each administration shall give priority to the maritime mobile service on only such frequencies as are assigned to stations of the maritime mobile service by the administration (see Articles 31 and 52, and Appendix 18). Any use of frequencies in these bands by stations of other services to which they are allocated should be avoided in areas where such use might cause harmful interference to the maritime mobile VHF radiocommunication service. However, the frequencies 156.8 MHz and 156.525 MHz and the frequency bands in which priority is given to the maritime mobile service may be used for radiocommunications on inland waterways subject to agreement between interested and affected administrations and taking into account current frequency usage and existing agreements. (WRC-07)']),
(156763000, 156787001): (False, False, True, False, False, ['Maritime Mobile'], ['Mobile-Satellite (Earth-To-Space)'], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07) ', '[5.226]: The frequency 156.525 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service using digital selective calling (DSC). The conditions for the use of this frequency and the band 156.4875-156.5625 MHz are contained in Articles 31 and 52, and in Appendix 18.The frequency 156.8 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service. The conditions for the use of this frequency and the band 156.7625-156.8375 MHz are contained in Article 31 and Appendix 18. In the bands 156-156.4875 MHz, 156.5625-156.7625 MHz, 156.8375-157.45 MHz, 160.6-160.975 MHz and 161.475-162.05 MHz, each administration shall give priority to the maritime mobile service on only such frequencies as are assigned to stations of the maritime mobile service by the administration (see Articles 31 and 52, and Appendix 18). Any use of frequencies in these bands by stations of other services to which they are allocated should be avoided in areas where such use might cause harmful interference to the maritime mobile VHF radiocommunication service. However, the frequencies 156.8 MHz and 156.525 MHz and the frequency bands in which priority is given to the maritime mobile service may be used for radiocommunications on inland waterways subject to agreement between interested and affected administrations and taking into account current frequency usage and existing agreements. (WRC-07) ', '[5.228]: The use of the frequency bands 156.7625-156.7875 MHz and 156.8125-156.8375 MHz by the mobile-satellite service (Earth-to-space) is limited to the reception of automatic identification system (AIS) emissions of long-range AIS broadcast messages (Message 27, see the most recent version of Recommendation ITU-R M.1371). With the exception of AIS emissions, emissions in these frequency bands by systems operating in the maritime mobile service for communications shall not exceed 1 W. (WRC-12)']),
(156787000, 156813001): (False, False, True, False, False, ['Maritime Mobile (Distress And Calling)'], [], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07) ', '[5.226]: The frequency 156.525 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service using digital selective calling (DSC). The conditions for the use of this frequency and the band 156.4875-156.5625 MHz are contained in Articles 31 and 52, and in Appendix 18.The frequency 156.8 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service. The conditions for the use of this frequency and the band 156.7625-156.8375 MHz are contained in Article 31 and Appendix 18. In the bands 156-156.4875 MHz, 156.5625-156.7625 MHz, 156.8375-157.45 MHz, 160.6-160.975 MHz and 161.475-162.05 MHz, each administration shall give priority to the maritime mobile service on only such frequencies as are assigned to stations of the maritime mobile service by the administration (see Articles 31 and 52, and Appendix 18). Any use of frequencies in these bands by stations of other services to which they are allocated should be avoided in areas where such use might cause harmful interference to the maritime mobile VHF radiocommunication service. However, the frequencies 156.8 MHz and 156.525 MHz and the frequency bands in which priority is given to the maritime mobile service may be used for radiocommunications on inland waterways subject to agreement between interested and affected administrations and taking into account current frequency usage and existing agreements. (WRC-07)']),
(156813000, 156838001): (False, False, True, False, False, ['Maritime Mobile'], ['Mobile-Satellite (Earth-To-Space)'], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07) ', '[5.226]: The frequency 156.525 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service using digital selective calling (DSC). The conditions for the use of this frequency and the band 156.4875-156.5625 MHz are contained in Articles 31 and 52, and in Appendix 18.The frequency 156.8 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service. The conditions for the use of this frequency and the band 156.7625-156.8375 MHz are contained in Article 31 and Appendix 18. In the bands 156-156.4875 MHz, 156.5625-156.7625 MHz, 156.8375-157.45 MHz, 160.6-160.975 MHz and 161.475-162.05 MHz, each administration shall give priority to the maritime mobile service on only such frequencies as are assigned to stations of the maritime mobile service by the administration (see Articles 31 and 52, and Appendix 18). Any use of frequencies in these bands by stations of other services to which they are allocated should be avoided in areas where such use might cause harmful interference to the maritime mobile VHF radiocommunication service. However, the frequencies 156.8 MHz and 156.525 MHz and the frequency bands in which priority is given to the maritime mobile service may be used for radiocommunications on inland waterways subject to agreement between interested and affected administrations and taking into account current frequency usage and existing agreements. (WRC-07) ', '[5.228]: The use of the frequency bands 156.7625-156.7875 MHz and 156.8125-156.8375 MHz by the mobile-satellite service (Earth-to-space) is limited to the reception of automatic identification system (AIS) emissions of long-range AIS broadcast messages (Message 27, see the most recent version of Recommendation ITU-R M.1371). With the exception of AIS emissions, emissions in these frequency bands by systems operating in the maritime mobile service for communications shall not exceed 1 W. (WRC-12)']),
(156838000, 161938001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], [], ['[5.226]: The frequency 156.525 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service using digital selective calling (DSC). The conditions for the use of this frequency and the band 156.4875-156.5625 MHz are contained in Articles 31 and 52, and in Appendix 18.The frequency 156.8 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service. The conditions for the use of this frequency and the band 156.7625-156.8375 MHz are contained in Article 31 and Appendix 18. In the bands 156-156.4875 MHz, 156.5625-156.7625 MHz, 156.8375-157.45 MHz, 160.6-160.975 MHz and 161.475-162.05 MHz, each administration shall give priority to the maritime mobile service on only such frequencies as are assigned to stations of the maritime mobile service by the administration (see Articles 31 and 52, and Appendix 18). Any use of frequencies in these bands by stations of other services to which they are allocated should be avoided in areas where such use might cause harmful interference to the maritime mobile VHF radiocommunication service. However, the frequencies 156.8 MHz and 156.525 MHz and the frequency bands in which priority is given to the maritime mobile service may be used for radiocommunications on inland waterways subject to agreement between interested and affected administrations and taking into account current frequency usage and existing agreements. (WRC-07)']),
(161938000, 161963001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], ['Maritime Mobile-Satellite (Earth-To-Space) [5.228Aa]'], ['[5.228AA]: The use of the frequency bands 161.9375-161.9625 MHz and 161.9875-162.0125 MHz by the maritime mobile-satellite (Earth-to-space) service is limited to the systems which operate in accordance with Appendix 18. (WRC-15)', '[5.226]: The frequency 156.525 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service using digital selective calling (DSC). The conditions for the use of this frequency and the band 156.4875-156.5625 MHz are contained in Articles 31 and 52, and in Appendix 18.The frequency 156.8 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service. The conditions for the use of this frequency and the band 156.7625-156.8375 MHz are contained in Article 31 and Appendix 18. In the bands 156-156.4875 MHz, 156.5625-156.7625 MHz, 156.8375-157.45 MHz, 160.6-160.975 MHz and 161.475-162.05 MHz, each administration shall give priority to the maritime mobile service on only such frequencies as are assigned to stations of the maritime mobile service by the administration (see Articles 31 and 52, and Appendix 18). Any use of frequencies in these bands by stations of other services to which they are allocated should be avoided in areas where such use might cause harmful interference to the maritime mobile VHF radiocommunication service. However, the frequencies 156.8 MHz and 156.525 MHz and the frequency bands in which priority is given to the maritime mobile service may be used for radiocommunications on inland waterways subject to agreement between interested and affected administrations and taking into account current frequency usage and existing agreements. (WRC-07)']),
(161963000, 161988001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], ['Mobile-Satellite (Earth-To-Space) [5.228F]'], ['[5.228F]: The use of the frequency bands 161.9625-161.9875 MHz and 162.0125-162.0375 MHz by the mobile-satellite service (Earth-to-space) is limited to the reception of automatic identification system emissions from stations operating in the maritime mobile service. (WRC-12)', '[5.226]: The frequency 156.525 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service using digital selective calling (DSC). The conditions for the use of this frequency and the band 156.4875-156.5625 MHz are contained in Articles 31 and 52, and in Appendix 18.The frequency 156.8 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service. The conditions for the use of this frequency and the band 156.7625-156.8375 MHz are contained in Article 31 and Appendix 18. In the bands 156-156.4875 MHz, 156.5625-156.7625 MHz, 156.8375-157.45 MHz, 160.6-160.975 MHz and 161.475-162.05 MHz, each administration shall give priority to the maritime mobile service on only such frequencies as are assigned to stations of the maritime mobile service by the administration (see Articles 31 and 52, and Appendix 18). Any use of frequencies in these bands by stations of other services to which they are allocated should be avoided in areas where such use might cause harmful interference to the maritime mobile VHF radiocommunication service. However, the frequencies 156.8 MHz and 156.525 MHz and the frequency bands in which priority is given to the maritime mobile service may be used for radiocommunications on inland waterways subject to agreement between interested and affected administrations and taking into account current frequency usage and existing agreements. (WRC-07) ', '[5.228A]: The frequency bands 161.9625-161.9875 MHz and 162.0125-162.0375 MHz may be used by aircraft stations for the purpose of search and rescue operations and other safety-related communications. (WRC-12)', '[5.228B]: The use of the frequency bands 161.9625-161.9875 MHz and 162.0125-162.0375 MHz by the fixed and land mobile services shall not cause harmful interference to, or claim protection from, the maritime mobile service. (WRC-12)']),
(161988000, 162013001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], ['Maritime Mobile-Satellite (Earth-To-Space) [5.228Aa]'], ['[5.228AA]: The use of the frequency bands 161.9375-161.9625 MHz and 161.9875-162.0125 MHz by the maritime mobile-satellite (Earth-to-space) service is limited to the systems which operate in accordance with Appendix 18. (WRC-15)', '[5.226]: The frequency 156.525 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service using digital selective calling (DSC). The conditions for the use of this frequency and the band 156.4875-156.5625 MHz are contained in Articles 31 and 52, and in Appendix 18.The frequency 156.8 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service. The conditions for the use of this frequency and the band 156.7625-156.8375 MHz are contained in Article 31 and Appendix 18. In the bands 156-156.4875 MHz, 156.5625-156.7625 MHz, 156.8375-157.45 MHz, 160.6-160.975 MHz and 161.475-162.05 MHz, each administration shall give priority to the maritime mobile service on only such frequencies as are assigned to stations of the maritime mobile service by the administration (see Articles 31 and 52, and Appendix 18). Any use of frequencies in these bands by stations of other services to which they are allocated should be avoided in areas where such use might cause harmful interference to the maritime mobile VHF radiocommunication service. However, the frequencies 156.8 MHz and 156.525 MHz and the frequency bands in which priority is given to the maritime mobile service may be used for radiocommunications on inland waterways subject to agreement between interested and affected administrations and taking into account current frequency usage and existing agreements. (WRC-07) ', '[5.229]: Alternative allocation: in Morocco, the band 162-174 MHz is allocated to the broadcasting service on a primary basis. The use of this band shall be subject to agreement with administrations having services, operating or planned, in accordance with the Table which are likely to be affected. Stations in existence on 1 January 1981, with their technical characteristics as of that date, are not affected by such agreement.']),
(162013000, 162037001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], ['Mobile-Satellite (Earth-To-Space) [5.228F]'], ['[5.228F]: The use of the frequency bands 161.9625-161.9875 MHz and 162.0125-162.0375 MHz by the mobile-satellite service (Earth-to-space) is limited to the reception of automatic identification system emissions from stations operating in the maritime mobile service. (WRC-12)', '[5.226]: The frequency 156.525 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service using digital selective calling (DSC). The conditions for the use of this frequency and the band 156.4875-156.5625 MHz are contained in Articles 31 and 52, and in Appendix 18.The frequency 156.8 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service. The conditions for the use of this frequency and the band 156.7625-156.8375 MHz are contained in Article 31 and Appendix 18. In the bands 156-156.4875 MHz, 156.5625-156.7625 MHz, 156.8375-157.45 MHz, 160.6-160.975 MHz and 161.475-162.05 MHz, each administration shall give priority to the maritime mobile service on only such frequencies as are assigned to stations of the maritime mobile service by the administration (see Articles 31 and 52, and Appendix 18). Any use of frequencies in these bands by stations of other services to which they are allocated should be avoided in areas where such use might cause harmful interference to the maritime mobile VHF radiocommunication service. However, the frequencies 156.8 MHz and 156.525 MHz and the frequency bands in which priority is given to the maritime mobile service may be used for radiocommunications on inland waterways subject to agreement between interested and affected administrations and taking into account current frequency usage and existing agreements. (WRC-07) ', '[5.228A]: The frequency bands 161.9625-161.9875 MHz and 162.0125-162.0375 MHz may be used by aircraft stations for the purpose of search and rescue operations and other safety-related communications. (WRC-12)', '[5.228B]: The use of the frequency bands 161.9625-161.9875 MHz and 162.0125-162.0375 MHz by the fixed and land mobile services shall not cause harmful interference to, or claim protection from, the maritime mobile service. (WRC-12)', '[5.229]: Alternative allocation: in Morocco, the band 162-174 MHz is allocated to the broadcasting service on a primary basis. The use of this band shall be subject to agreement with administrations having services, operating or planned, in accordance with the Table which are likely to be affected. Stations in existence on 1 January 1981, with their technical characteristics as of that date, are not affected by such agreement.']),
(162037000, 174000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], [], ['[5.226]: The frequency 156.525 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service using digital selective calling (DSC). The conditions for the use of this frequency and the band 156.4875-156.5625 MHz are contained in Articles 31 and 52, and in Appendix 18.The frequency 156.8 MHz is the international distress, safety and calling frequency for the maritime mobile VHF radiotelephone service. The conditions for the use of this frequency and the band 156.7625-156.8375 MHz are contained in Article 31 and Appendix 18. In the bands 156-156.4875 MHz, 156.5625-156.7625 MHz, 156.8375-157.45 MHz, 160.6-160.975 MHz and 161.475-162.05 MHz, each administration shall give priority to the maritime mobile service on only such frequencies as are assigned to stations of the maritime mobile service by the administration (see Articles 31 and 52, and Appendix 18). Any use of frequencies in these bands by stations of other services to which they are allocated should be avoided in areas where such use might cause harmful interference to the maritime mobile VHF radiocommunication service. However, the frequencies 156.8 MHz and 156.525 MHz and the frequency bands in which priority is given to the maritime mobile service may be used for radiocommunications on inland waterways subject to agreement between interested and affected administrations and taking into account current frequency usage and existing agreements. (WRC-07) ', '[5.229]: Alternative allocation: in Morocco, the band 162-174 MHz is allocated to the broadcasting service on a primary basis. The use of this band shall be subject to agreement with administrations having services, operating or planned, in accordance with the Table which are likely to be affected. Stations in existence on 1 January 1981, with their technical characteristics as of that date, are not affected by such agreement.']),
(174000000, 223000001): (False, False, False, True, False, ['Broadcasting'], [], ['[5.235]: Additional allocation: in Germany, Austria, Belgium, Denmark, Spain, Finland, France, Israel, Italy, Liechtenstein, Malta, Monaco, Norway, the Netherlands, the United Kingdom, Sweden and Switzerland, the band 174-223 MHz is also allocated to the land mobile service on a primary basis. However, the stations of the land mobile service shall not cause harmful interference to, or claim protection from, broadcasting stations, existing or planned, in countries other than those listed in this footnote.', '[5.237]: Additional allocation: in Congo (Rep. of the), Egypt, Eritrea, Ethiopia, Gambia, Guinea, Libya, Mali, Sierra Leone, Somalia and Chad, the band 174-223 MHz is also allocated to the fixed and mobile services on a secondary basis. (WRC-12)', '[5.243]: Additional allocation: in Somalia, the band 216-225 MHz is also allocated to the aeronautical radionavigation service on a primary basis, subject to not causing harmful interference to existing or planned broadcasting services in other countries.']),
(223000000, 230000001): (False, True, True, True, False, ['Broadcasting'], [], ['[5.243]: Additional allocation: in Somalia, the band 216-225 MHz is also allocated to the aeronautical radionavigation service on a primary basis, subject to not causing harmful interference to existing or planned broadcasting services in other countries.', '[5.246]: Alternative allocation: in Spain, France, Israel and Monaco, the band 223-230 MHz is allocated to the broadcasting and land mobile services on a primary basis (see No. 5.33) on the basis that, in the preparation of frequency plans, the broadcasting service shall have prior choice of frequencies; and allocated to the fixed and mobile, except land mobile, services on a secondary basis. However, the stations of the land mobile service shall not cause harmful interference to, or claim protection from, existing or planned broadcasting stations in Morocco and Algeria.', '[5.247]: Additional allocation: in Saudi Arabia, Bahrain, the United Arab Emirates, Jordan, Oman, Qatar and Syrian Arab Republic, the band 223-235 MHz is also allocated to the aeronautical radionavigation service on a primary basis.']),
(230000000, 235000001): (False, True, True, False, False, [], [], ['[5.247]: Additional allocation: in Saudi Arabia, Bahrain, the United Arab Emirates, Jordan, Oman, Qatar and Syrian Arab Republic, the band 223-235 MHz is also allocated to the aeronautical radionavigation service on a primary basis.', '[5.251]: Additional allocation: in Nigeria, the band 230-235 MHz is also allocated to the aeronautical radionavigation service on a primary basis, subject to agreement obtained under No. 9.21.', '[5.252]: Alternative allocation: in Botswana, Lesotho, Malawi, Mozambique, Namibia, South Africa, Swaziland, Zambia and Zimbabwe, the bands 230-238 MHz and 246-254 MHz are allocated to the broadcasting service on a primary basis, subject to agreement obtained under No. 9.21.']),
(235000000, 267000001): (False, True, True, False, False, [], [], ['[5.111]: The carrier frequencies 2 182 kHz, 3 023 kHz, 5 680 kHz, 8 364 kHz and the frequencies 121.5 MHz, 156.525 MHz, 156.8 MHz and 243 MHz may also be used, in accordance with the procedures in force for terrestrial radiocommunication services, for search and rescue operations concerning manned space vehicles. The conditions for the use of the frequencies are prescribed in Article 31.The same applies to the frequencies 10 003 kHz, 14 993 kHz and 19 993 kHz, but in each of these cases emissions must be confined in a band of ± 3 kHz about the frequency. (WRC-07) ', '[5.252]: Alternative allocation: in Botswana, Lesotho, Malawi, Mozambique, Namibia, South Africa, Swaziland, Zambia and Zimbabwe, the bands 230-238 MHz and 246-254 MHz are allocated to the broadcasting service on a primary basis, subject to agreement obtained under No. 9.21.', '[5.254]: The bands 235-322 MHz and 335.4-399.9 MHz may be used by the mobile-satellite service, subject to agreement obtained under No. 9.21, on condition that stations in this service do not cause harmful interference to those of other services operating or planned to be operated in accordance with the Table of Frequency Allocations except for the additional allocation made in footnote No. 5.256A. (WRC-03)', '[5.256]: The frequency 243 MHz is the frequency in this band for use by survival craft stations and equipment used for survival purposes. (WRC-07)', '[5.256A]: Additional allocation: in China, the Russian Federation and Kazakhstan, the frequency band 258-261 MHz is also allocated to the space research service (Earth-to-space) and space operation service (Earth-to-space) on a primary basis. Stations in the space research service (Earth-to-space) and space operation service (Earth-to-space) shall not cause harmful interference to, or claim protection from, or constrain the use and development of, the mobile service systems and mobile-satellite service systems operating in the frequency band. Stations in space research service (Earth-to-space) and space operation service (Earth-to-space) shall not constrain the future development of fixed service systems of other countries. (WRC-15)']),
(267000000, 272000001): (False, True, True, False, False, [], ['Space Operation (Space-To-Earth)'], ['[5.254]: The bands 235-322 MHz and 335.4-399.9 MHz may be used by the mobile-satellite service, subject to agreement obtained under No. 9.21, on condition that stations in this service do not cause harmful interference to those of other services operating or planned to be operated in accordance with the Table of Frequency Allocations except for the additional allocation made in footnote No. 5.256A. (WRC-03)', '[5.257]: The band 267-272 MHz may be used by administrations for space telemetry in their countries on a primary basis, subject to agreement obtained under No. 9.21.']),
(272000000, 273000001): (False, True, True, False, False, ['Space Operation (Space-To-Earth)'], [], ['[5.254]: The bands 235-322 MHz and 335.4-399.9 MHz may be used by the mobile-satellite service, subject to agreement obtained under No. 9.21, on condition that stations in this service do not cause harmful interference to those of other services operating or planned to be operated in accordance with the Table of Frequency Allocations except for the additional allocation made in footnote No. 5.256A. (WRC-03)']),
(273000000, 312000001): (False, True, True, False, False, [], [], ['[5.254]: The bands 235-322 MHz and 335.4-399.9 MHz may be used by the mobile-satellite service, subject to agreement obtained under No. 9.21, on condition that stations in this service do not cause harmful interference to those of other services operating or planned to be operated in accordance with the Table of Frequency Allocations except for the additional allocation made in footnote No. 5.256A. (WRC-03)']),
(312000000, 315000001): (False, True, True, False, False, [], ['Mobile-Satellite (Earth-To-Space) [5.254][5.255]'], ['[5.254]: The bands 235-322 MHz and 335.4-399.9 MHz may be used by the mobile-satellite service, subject to agreement obtained under No. 9.21, on condition that stations in this service do not cause harmful interference to those of other services operating or planned to be operated in accordance with the Table of Frequency Allocations except for the additional allocation made in footnote No. 5.256A. (WRC-03)', '[5.255]: The bands 312-315 MHz (Earth-to-space) and 387-390 MHz (space-to-Earth) in the mobile-satellite service may also be used by non-geostationary-satellite systems. Such use is subject to coordination under No. 9.11A.']),
(315000000, 322000001): (False, True, True, False, False, [], [], ['[5.254]: The bands 235-322 MHz and 335.4-399.9 MHz may be used by the mobile-satellite service, subject to agreement obtained under No. 9.21, on condition that stations in this service do not cause harmful interference to those of other services operating or planned to be operated in accordance with the Table of Frequency Allocations except for the additional allocation made in footnote No. 5.256A. (WRC-03)']),
(322000000, 328600001): (False, True, True, False, False, ['Radio Astronomy'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(328600000, 335400001): (False, False, False, False, False, ['Aeronautical Radionavigation [5.258]'], [], ['[5.258]: The use of the band 328.6-335.4 MHz by the aeronautical radionavigation service is limited to Instrument Landing Systems (glide path).', '[5.259]: Additional allocation: in Egypt and the Syrian Arab Republic, the band 328.6-335.4 MHz is also allocated to the mobile service on a secondary basis, subject to agreement obtained under No. 9.21. In order to ensure that harmful interference is not caused to stations of the aeronautical radionavigation service, stations of the mobile service shall not be introduced in the band until it is no longer required for the aeronautical radionavigation service by any administration which may be identified in the application of the procedure invoked under No. 9.21. (WRC-12)']),
(335400000, 387000001): (False, True, True, False, False, [], [], ['[5.254]: The bands 235-322 MHz and 335.4-399.9 MHz may be used by the mobile-satellite service, subject to agreement obtained under No. 9.21, on condition that stations in this service do not cause harmful interference to those of other services operating or planned to be operated in accordance with the Table of Frequency Allocations except for the additional allocation made in footnote No. 5.256A. (WRC-03)']),
(387000000, 390000001): (False, True, True, False, False, [], ['Mobile-Satellite (Space-To-Earth) [5.208A][5.208B][5.254][5.255]'], ['[5.208A]: In making assignments to space stations in the mobile-satellite service in the bands 137-138 MHz, 387-390 MHz and 400.15-401 MHz, administrations shall take all practicable steps to protect the radio astronomy service in the bands 150.05-153 MHz, 322-328.6 MHz, 406.1-410 MHz and 608-614 MHz from harmful interference from unwanted emissions. The threshold levels of interference detrimental to the radio astronomy service are shown in the relevant ITU-R Recommendation. (WRC-07)', '[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.254]: The bands 235-322 MHz and 335.4-399.9 MHz may be used by the mobile-satellite service, subject to agreement obtained under No. 9.21, on condition that stations in this service do not cause harmful interference to those of other services operating or planned to be operated in accordance with the Table of Frequency Allocations except for the additional allocation made in footnote No. 5.256A. (WRC-03)', '[5.255]: The bands 312-315 MHz (Earth-to-space) and 387-390 MHz (space-to-Earth) in the mobile-satellite service may also be used by non-geostationary-satellite systems. Such use is subject to coordination under No. 9.11A.']),
(390000000, 399900001): (False, True, True, False, False, [], [], ['[5.254]: The bands 235-322 MHz and 335.4-399.9 MHz may be used by the mobile-satellite service, subject to agreement obtained under No. 9.21, on condition that stations in this service do not cause harmful interference to those of other services operating or planned to be operated in accordance with the Table of Frequency Allocations except for the additional allocation made in footnote No. 5.256A. (WRC-03)']),
(399900000, 400050001): (False, False, False, False, False, ['Mobile-Satellite (Earth-To-Space) [5.209][5.220]'], [], ['[5.209]: The use of the bands 137-138 MHz, 148-150.05 MHz, 399.9-400.05 MHz, 400.15-401 MHz, 454-456 MHz and 459-460 MHz by the mobile-satellite service is limited to non-geostationary-satellite systems. (WRC-97)', '[5.220]: The use of the frequency bands 149.9-150.05 MHz and 399.9-400.05 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. (WRC-15)']),
(400050000, 400150001): (False, False, False, False, True, ['Standard Frequency And Time Signal- Satellite (400.1 Mhz)'], [], ['[5.261]: Emissions shall be confined in a band of ± 25 kHz about the standard frequency 400.1 MHz.', '[5.262]: Additional allocation: in Saudi Arabia, Armenia, Azerbaijan, Bahrain, Belarus, Botswana, Colombia, Cuba, Egypt, the United Arab Emirates, Ecuador, the Russian Federation, Georgia, Hungary, Iran (Islamic Republic of), Iraq, Israel, Jordan, Kazakhstan, Kuwait, Liberia, Malaysia, Moldova, Oman, Uzbekistan, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, Kyrgyzstan, Singapore, Somalia, Tajikistan, Chad, Turkmenistan and Ukraine, the band 400.05-401 MHz is also allocated to the fixed and mobile services on a primary basis. (WRC-12)']),
(400150000, 401000001): (False, False, False, False, False, ['Meteorological Aids', 'Meteorological-Satellite (Space-To-Earth)', 'Mobile-Satellite (Space-To-Earth) [5.208A][5.208B][5.209]', 'Space Research (Space-To-Earth) [5.263]'], ['Space Operation (Space-To-Earth)'], ['[5.208A]: In making assignments to space stations in the mobile-satellite service in the bands 137-138 MHz, 387-390 MHz and 400.15-401 MHz, administrations shall take all practicable steps to protect the radio astronomy service in the bands 150.05-153 MHz, 322-328.6 MHz, 406.1-410 MHz and 608-614 MHz from harmful interference from unwanted emissions. The threshold levels of interference detrimental to the radio astronomy service are shown in the relevant ITU-R Recommendation. (WRC-07)', '[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.209]: The use of the bands 137-138 MHz, 148-150.05 MHz, 399.9-400.05 MHz, 400.15-401 MHz, 454-456 MHz and 459-460 MHz by the mobile-satellite service is limited to non-geostationary-satellite systems. (WRC-97)', '[5.263]: The band 400.15-401 MHz is also allocated to the space research service in the space-to-space direction for communications with manned space vehicles. In this application, the space research service will not be regarded as a safety service.', '[5.262]: Additional allocation: in Saudi Arabia, Armenia, Azerbaijan, Bahrain, Belarus, Botswana, Colombia, Cuba, Egypt, the United Arab Emirates, Ecuador, the Russian Federation, Georgia, Hungary, Iran (Islamic Republic of), Iraq, Israel, Jordan, Kazakhstan, Kuwait, Liberia, Malaysia, Moldova, Oman, Uzbekistan, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, Kyrgyzstan, Singapore, Somalia, Tajikistan, Chad, Turkmenistan and Ukraine, the band 400.05-401 MHz is also allocated to the fixed and mobile services on a primary basis. (WRC-12)', '[5.264]: The use of the band 400.15-401 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. The power flux-density limit indicated in Annex 1 of Appendix 5 shall apply until such time as a competent world radiocommunication conference revises it.']),
(401000000, 402000001): (False, True, True, False, False, ['Meteorological Aids', 'Space Operation (Space-To-Earth)', 'Earth Exploration-Satellite (Earth-To-Space)', 'Meteorological-Satellite (Earth-To-Space)'], ['Mobile Except Aeronautical Mobile'], []),
(402000000, 403000001): (False, True, True, False, False, ['Meteorological Aids', 'Earth Exploration-Satellite (Earth-To-Space)', 'Meteorological-Satellite (Earth-To-Space)'], ['Mobile Except Aeronautical Mobile'], []),
(403000000, 406000001): (False, True, True, False, False, ['Meteorological Aids'], ['Mobile Except Aeronautical Mobile'], ['[5.265]: In the frequency band 403-410 MHz, Resolution 205 (Rev.WRC-15) applies. (WRC-15)']),
(406000000, 406100001): (False, False, False, False, False, ['Mobile-Satellite (Earth-To-Space)'], [], ['[5.265]: In the frequency band 403-410 MHz, Resolution 205 (Rev.WRC-15) applies. (WRC-15)', '[5.266]: The use of the band 406-406.1 MHz by the mobile-satellite service is limited to low power satellite emergency position-indicating radiobeacons (see also Article 31). (WRC-07)', '[5.267]: Any emission capable of causing harmful interference to the authorized uses of the band 406-406.1 MHz is prohibited.']),
(406100000, 410000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile', 'Radio Astronomy'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.265]: In the frequency band 403-410 MHz, Resolution 205 (Rev.WRC-15) applies. (WRC-15)']),
(410000000, 420000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile', 'Space Research (Space-To-Space) [5.268]'], [], ['[5.268]: Use of the frequency band 410-420 MHz by the space research service is limited to space-to-space communication links with an orbiting, manned space vehicle. The power flux-density at the surface of the Earth produced by emissions from transmitting stations of the space research service (space-to-space) in the frequency band 410-420 MHz shall not exceed −153 dB(W/m2) for 0° £ d £ 5°, −153 + 0.077 (d − 5) dB(W/m2) for 5° £ d £ 70° and −148 dB(W/m2) for 70° £ d £ 90°, where d is the angle of arrival of the radio-frequency wave and the reference bandwidth is 4 kHz. In this frequency band, stations of the space research service (space-to-space) shall not claim protection from, nor constrain the use and development of, stations of the fixed and mobile services. No. 4.10 does not apply. (WRC-15)']),
(420000000, 430000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], ['Radiolocation'], ['[5.269]: Different category of service: in Australia, the United States, India, Japan and the United Kingdom, the allocation of the bands 420-430 MHz and 440-450 MHz to the radiolocation service is on a primary basis (see No. 5.33).', '[5.270]: Additional allocation: in Australia, the United States, Jamaica and the Philippines, the bands 420-430 MHz and 440-450 MHz are also allocated to the amateur service on a secondary basis.', '[5.271]: Additional allocation: in Belarus, China, India, Kyrgyzstan and Turkmenistan, the band 420-460 MHz is also allocated to the aeronautical radionavigation service (radio altimeters) on a secondary basis. (WRC-07)']),
(430000000, 432000001): (True, False, False, False, False, ['Amateur', 'Radiolocation'], [], ['[5.271]: Additional allocation: in Belarus, China, India, Kyrgyzstan and Turkmenistan, the band 420-460 MHz is also allocated to the aeronautical radionavigation service (radio altimeters) on a secondary basis. (WRC-07)', '[5.274]: Alternative allocation: in Denmark, Norway, Sweden and Chad, the bands 430-432 MHz and 438-440 MHz are allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-12)', '[5.275]: Additional allocation: in Croatia, Estonia, Finland, Libya, The Former Yugoslav Republic of Macedonia, Montenegro and Serbia, the frequency bands 430-432 MHz and 438-440 MHz are also allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-15)', '[5.276]: Additional allocation: in Afghanistan, Algeria, Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, Burkina Faso, Djibouti, Egypt, the United Arab Emirates, Ecuador, Eritrea, Ethiopia, Greece, Guinea, India, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Italy, Jordan, Kenya, Kuwait, Libya, Malaysia, Niger, Nigeria, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. People’s Rep. of Korea, Singapore, Somalia, Sudan, Switzerland, Thailand, Togo, Turkey and Yemen, the frequency band 430-440 MHz is also allocated to the fixed service on a primary basis and the frequency bands 430-435 MHz and 438-440 MHz are also allocated, except in Ecuador, to the mobile, except aeronautical mobile, service on a primary basis. (WRC-15)', '[5.277]: Additional allocation: in Angola, Armenia, Azerbaijan, Belarus, Cameroon, Congo (Rep. of the), Djibouti, the Russian Federation, Georgia, Hungary, Israel, Kazakhstan, Mali, Mongolia, Uzbekistan, Poland, the Dem. Rep. of the Congo, Kyrgyzstan, Slovakia, Romania, Rwanda, Tajikistan, Chad, Turkmenistan and Ukraine, the band 430-440 MHz is also allocated to the fixed service on a primary basis. (WRC-12)']),
(432000000, 438000001): (True, False, False, False, False, ['Amateur', 'Radiolocation'], ['Earth Exploration-Satellite (Active) [5.279A]'], ['[5.279A]: The use of the frequency band 432-438 MHz by sensors in the Earth exploration-satellite service (active) shall be in accordance with Recommendation ITU-R RS.1260-1. Additionally, the Earth exploration-satellite service (active) in the frequency band 432-438 MHz shall not cause harmful interference to the aeronautical radionavigation service in China. The provisions of this footnote in no way diminish the obligation of the Earth exploration-satellite service (active) to operate as a secondary service in accordance with Nos. 5.29 and 5.30. (WRC-15)', '[5.138]: The following bands:6 765-6 795 kHz (centre frequency 6 780 kHz), 433.05-434.79 MHz (centre frequency 433.92 MHz) in Region 1 except in the countries mentioned in No. 5.280, 61-61.5 GHz (centre frequency 61.25 GHz), 122-123 GHz (centre frequency 122.5 GHz), and 244-246 GHz (centre frequency 245 GHz) are designated for industrial, scientific and medical (ISM) applications. The use of these frequency bands for ISM applications shall be subject to special authorization by the administration concerned, in agreement with other administrations whose radiocommunication services might be affected. In applying this provision, administrations shall have due regard to the latest relevant ITU-R Recommendations. ', '[5.271]: Additional allocation: in Belarus, China, India, Kyrgyzstan and Turkmenistan, the band 420-460 MHz is also allocated to the aeronautical radionavigation service (radio altimeters) on a secondary basis. (WRC-07)', '[5.276]: Additional allocation: in Afghanistan, Algeria, Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, Burkina Faso, Djibouti, Egypt, the United Arab Emirates, Ecuador, Eritrea, Ethiopia, Greece, Guinea, India, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Italy, Jordan, Kenya, Kuwait, Libya, Malaysia, Niger, Nigeria, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. People’s Rep. of Korea, Singapore, Somalia, Sudan, Switzerland, Thailand, Togo, Turkey and Yemen, the frequency band 430-440 MHz is also allocated to the fixed service on a primary basis and the frequency bands 430-435 MHz and 438-440 MHz are also allocated, except in Ecuador, to the mobile, except aeronautical mobile, service on a primary basis. (WRC-15)', '[5.277]: Additional allocation: in Angola, Armenia, Azerbaijan, Belarus, Cameroon, Congo (Rep. of the), Djibouti, the Russian Federation, Georgia, Hungary, Israel, Kazakhstan, Mali, Mongolia, Uzbekistan, Poland, the Dem. Rep. of the Congo, Kyrgyzstan, Slovakia, Romania, Rwanda, Tajikistan, Chad, Turkmenistan and Ukraine, the band 430-440 MHz is also allocated to the fixed service on a primary basis. (WRC-12)', '[5.280]: In Germany, Austria, Bosnia and Herzegovina, Croatia, The Former Yugoslav Republic of Macedonia, Liechtenstein, Montenegro, Portugal, Serbia, Slovenia and Switzerland, the band 433.05-434.79 MHz (centre frequency 433.92 MHz) is designated for industrial, scientific and medical (ISM) applications. Radiocommunication services of these countries operating within this band must accept harmful interference which may be caused by these applications. ISM equipment operating in this band is subject to the provisions of No. 15.13. (WRC-07)', '[5.281]: Additional allocation: in the French overseas departments and communities in Region 2 and India, the band 433.75-434.25 MHz is also allocated to the space operation service (Earth-to-space) on a primary basis. In France and in Brazil, the band is allocated to the same service on a secondary basis.', '[5.282]: In the bands 435-438 MHz, 1 260-1 270 MHz, 2 400-2 450 MHz, 3 400-3 410 MHz (in Regions 2 and 3 only) and 5 650-5 670 MHz, the amateur-satellite service may operate subject to not causing harmful interference to other services operating in accordance with the Table (see No. 5.43). Administrations authorizing such use shall ensure that any harmful interference caused by emissions from a station in the amateur-satellite service is immediately eliminated in accordance with the provisions of No. 25.11. The use of the bands 1 260-1 270 MHz and 5 650-5 670 MHz by the amateur-satellite service is limited to the Earth-to-space direction.']),
(438000000, 440000001): (True, False, False, False, False, ['Amateur', 'Radiolocation'], [], ['[5.271]: Additional allocation: in Belarus, China, India, Kyrgyzstan and Turkmenistan, the band 420-460 MHz is also allocated to the aeronautical radionavigation service (radio altimeters) on a secondary basis. (WRC-07)', '[5.274]: Alternative allocation: in Denmark, Norway, Sweden and Chad, the bands 430-432 MHz and 438-440 MHz are allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-12)', '[5.275]: Additional allocation: in Croatia, Estonia, Finland, Libya, The Former Yugoslav Republic of Macedonia, Montenegro and Serbia, the frequency bands 430-432 MHz and 438-440 MHz are also allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-15)', '[5.276]: Additional allocation: in Afghanistan, Algeria, Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, Burkina Faso, Djibouti, Egypt, the United Arab Emirates, Ecuador, Eritrea, Ethiopia, Greece, Guinea, India, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Italy, Jordan, Kenya, Kuwait, Libya, Malaysia, Niger, Nigeria, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. People’s Rep. of Korea, Singapore, Somalia, Sudan, Switzerland, Thailand, Togo, Turkey and Yemen, the frequency band 430-440 MHz is also allocated to the fixed service on a primary basis and the frequency bands 430-435 MHz and 438-440 MHz are also allocated, except in Ecuador, to the mobile, except aeronautical mobile, service on a primary basis. (WRC-15)', '[5.277]: Additional allocation: in Angola, Armenia, Azerbaijan, Belarus, Cameroon, Congo (Rep. of the), Djibouti, the Russian Federation, Georgia, Hungary, Israel, Kazakhstan, Mali, Mongolia, Uzbekistan, Poland, the Dem. Rep. of the Congo, Kyrgyzstan, Slovakia, Romania, Rwanda, Tajikistan, Chad, Turkmenistan and Ukraine, the band 430-440 MHz is also allocated to the fixed service on a primary basis. (WRC-12)', '[5.283]: Additional allocation: in Austria, the band 438-440 MHz is also allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis.']),
(440000000, 450000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], ['Radiolocation'], ['[5.269]: Different category of service: in Australia, the United States, India, Japan and the United Kingdom, the allocation of the bands 420-430 MHz and 440-450 MHz to the radiolocation service is on a primary basis (see No. 5.33).', '[5.270]: Additional allocation: in Australia, the United States, Jamaica and the Philippines, the bands 420-430 MHz and 440-450 MHz are also allocated to the amateur service on a secondary basis.', '[5.271]: Additional allocation: in Belarus, China, India, Kyrgyzstan and Turkmenistan, the band 420-460 MHz is also allocated to the aeronautical radionavigation service (radio altimeters) on a secondary basis. (WRC-07)', '[5.284]: Additional allocation: in Canada, the band 440-450 MHz is also allocated to the amateur service on a secondary basis.', '[5.285]: Different category of service: in Canada, the allocation of the band 440-450 MHz to the radiolocation service is on a primary basis (see No. 5.33).', '[5.286]: The band 449.75-450.25 MHz may be used for the space operation service (Earth-to-space) and the space research service (Earth-to-space), subject to agreement obtained under No. 9.21.']),
(450000000, 455000001): (False, True, True, False, False, ['Mobile [5.286Aa]'], [], ['[5.286AA]: The frequency band 450-470 MHz is identified for use by administrations wishing to implement International Mobile Telecommunications (IMT). See Resolution 224 (Rev.WRC-15). This identification does not preclude the use of this frequency band by any application of the services to which it is allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.209]: The use of the bands 137-138 MHz, 148-150.05 MHz, 399.9-400.05 MHz, 400.15-401 MHz, 454-456 MHz and 459-460 MHz by the mobile-satellite service is limited to non-geostationary-satellite systems. (WRC-97)', '[5.271]: Additional allocation: in Belarus, China, India, Kyrgyzstan and Turkmenistan, the band 420-460 MHz is also allocated to the aeronautical radionavigation service (radio altimeters) on a secondary basis. (WRC-07)', '[5.286]: The band 449.75-450.25 MHz may be used for the space operation service (Earth-to-space) and the space research service (Earth-to-space), subject to agreement obtained under No. 9.21.', '[5.286A]: The use of the bands 454-456 MHz and 459-460 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. (WRC-97)', '[5.286B]: The use of the band 454-455 MHz in the countries listed in No. 5.286D, 455-456 MHz and 459-460 MHz in Region 2, and 454-456 MHz and 459-460 MHz in the countries listed in No. 5.286E, by stations in the mobile-satellite service, shall not cause harmful interference to, or claim protection from, stations of the fixed or mobile services operating in accordance with the Table of Frequency Allocations. (WRC-97)', '[5.286C]: The use of the band 454-455 MHz in the countries listed in No. 5.286D, 455-456 MHz and 459-460 MHz in Region 2, and 454-456 MHz and 459-460 MHz in the countries listed in No. 5.286E, by stations in the mobile-satellite service, shall not constrain the development and use of the fixed and mobile services operating in accordance with the Table of Frequency Allocations. (WRC-97)', '[5.286D]: Additional allocation: in Canada, the United States and Panama, the band 454-455 MHz is also allocated to the mobile-satellite service (Earth-to-space) on a primary basis. (WRC-07)', '[5.286E]: Additional allocation: in Cape Verde, Nepal and Nigeria, the bands 454-456 MHz and 459-460 MHz are also allocated to the mobile-satellite (Earth-to-space) service on a primary basis. (WRC-07)']),
(455000000, 456000001): (False, True, True, False, False, ['Mobile [5.286Aa]'], [], ['[5.286AA]: The frequency band 450-470 MHz is identified for use by administrations wishing to implement International Mobile Telecommunications (IMT). See Resolution 224 (Rev.WRC-15). This identification does not preclude the use of this frequency band by any application of the services to which it is allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.209]: The use of the bands 137-138 MHz, 148-150.05 MHz, 399.9-400.05 MHz, 400.15-401 MHz, 454-456 MHz and 459-460 MHz by the mobile-satellite service is limited to non-geostationary-satellite systems. (WRC-97)', '[5.271]: Additional allocation: in Belarus, China, India, Kyrgyzstan and Turkmenistan, the band 420-460 MHz is also allocated to the aeronautical radionavigation service (radio altimeters) on a secondary basis. (WRC-07)', '[5.286A]: The use of the bands 454-456 MHz and 459-460 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. (WRC-97)', '[5.286B]: The use of the band 454-455 MHz in the countries listed in No. 5.286D, 455-456 MHz and 459-460 MHz in Region 2, and 454-456 MHz and 459-460 MHz in the countries listed in No. 5.286E, by stations in the mobile-satellite service, shall not cause harmful interference to, or claim protection from, stations of the fixed or mobile services operating in accordance with the Table of Frequency Allocations. (WRC-97)', '[5.286C]: The use of the band 454-455 MHz in the countries listed in No. 5.286D, 455-456 MHz and 459-460 MHz in Region 2, and 454-456 MHz and 459-460 MHz in the countries listed in No. 5.286E, by stations in the mobile-satellite service, shall not constrain the development and use of the fixed and mobile services operating in accordance with the Table of Frequency Allocations. (WRC-97)', '[5.286E]: Additional allocation: in Cape Verde, Nepal and Nigeria, the bands 454-456 MHz and 459-460 MHz are also allocated to the mobile-satellite (Earth-to-space) service on a primary basis. (WRC-07)']),
(456000000, 459000001): (False, True, True, False, False, ['Mobile [5.286Aa]'], [], ['[5.286AA]: The frequency band 450-470 MHz is identified for use by administrations wishing to implement International Mobile Telecommunications (IMT). See Resolution 224 (Rev.WRC-15). This identification does not preclude the use of this frequency band by any application of the services to which it is allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.271]: Additional allocation: in Belarus, China, India, Kyrgyzstan and Turkmenistan, the band 420-460 MHz is also allocated to the aeronautical radionavigation service (radio altimeters) on a secondary basis. (WRC-07)', '[5.287]: Use of the frequency bands 457.5125-457.5875 MHz and 467.5125-467.5875 MHz by the maritime mobile service is limited to on-board communication stations. The characteristics of the equipment and the channelling arrangement shall be in accordance with Recommendation ITU-R M.1174-3. The use of these frequency bands in territorial waters is subject to the national regulations of the administration concerned. (WRC-15)', '[5.288]: In the territorial waters of the United States and the Philippines, the preferred frequencies for use by on-board communication stations shall be 457.525 MHz, 457.550 MHz, 457.575 MHz and 457.600 MHz paired, respectively, with 467.750 MHz, 467.775 MHz, 467.800 MHz and 467.825 MHz. The characteristics of the equipment used shall conform to those specified in Recommendation ITU-R M.1174-3. (WRC-15)']),
(459000000, 460000001): (False, True, True, False, False, ['Mobile [5.286Aa]'], [], ['[5.286AA]: The frequency band 450-470 MHz is identified for use by administrations wishing to implement International Mobile Telecommunications (IMT). See Resolution 224 (Rev.WRC-15). This identification does not preclude the use of this frequency band by any application of the services to which it is allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.209]: The use of the bands 137-138 MHz, 148-150.05 MHz, 399.9-400.05 MHz, 400.15-401 MHz, 454-456 MHz and 459-460 MHz by the mobile-satellite service is limited to non-geostationary-satellite systems. (WRC-97)', '[5.271]: Additional allocation: in Belarus, China, India, Kyrgyzstan and Turkmenistan, the band 420-460 MHz is also allocated to the aeronautical radionavigation service (radio altimeters) on a secondary basis. (WRC-07)', '[5.286A]: The use of the bands 454-456 MHz and 459-460 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. (WRC-97)', '[5.286B]: The use of the band 454-455 MHz in the countries listed in No. 5.286D, 455-456 MHz and 459-460 MHz in Region 2, and 454-456 MHz and 459-460 MHz in the countries listed in No. 5.286E, by stations in the mobile-satellite service, shall not cause harmful interference to, or claim protection from, stations of the fixed or mobile services operating in accordance with the Table of Frequency Allocations. (WRC-97)', '[5.286C]: The use of the band 454-455 MHz in the countries listed in No. 5.286D, 455-456 MHz and 459-460 MHz in Region 2, and 454-456 MHz and 459-460 MHz in the countries listed in No. 5.286E, by stations in the mobile-satellite service, shall not constrain the development and use of the fixed and mobile services operating in accordance with the Table of Frequency Allocations. (WRC-97)', '[5.286E]: Additional allocation: in Cape Verde, Nepal and Nigeria, the bands 454-456 MHz and 459-460 MHz are also allocated to the mobile-satellite (Earth-to-space) service on a primary basis. (WRC-07)']),
(460000000, 470000001): (False, True, True, False, False, ['Mobile [5.286Aa]'], ['Meteorological-Satellite (Space-To-Earth)'], ['[5.286AA]: The frequency band 450-470 MHz is identified for use by administrations wishing to implement International Mobile Telecommunications (IMT). See Resolution 224 (Rev.WRC-15). This identification does not preclude the use of this frequency band by any application of the services to which it is allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.287]: Use of the frequency bands 457.5125-457.5875 MHz and 467.5125-467.5875 MHz by the maritime mobile service is limited to on-board communication stations. The characteristics of the equipment and the channelling arrangement shall be in accordance with Recommendation ITU-R M.1174-3. The use of these frequency bands in territorial waters is subject to the national regulations of the administration concerned. (WRC-15)', '[5.288]: In the territorial waters of the United States and the Philippines, the preferred frequencies for use by on-board communication stations shall be 457.525 MHz, 457.550 MHz, 457.575 MHz and 457.600 MHz paired, respectively, with 467.750 MHz, 467.775 MHz, 467.800 MHz and 467.825 MHz. The characteristics of the equipment used shall conform to those specified in Recommendation ITU-R M.1174-3. (WRC-15)', '[5.289]: Earth exploration-satellite service applications, other than the meteorological-satellite service, may also be used in the bands 460-470 MHz and 1 690-1 710 MHz for space-to-Earth transmissions subject to not causing harmful interference to stations operating in accordance with the Table.', '[5.290]: Different category of service: in Afghanistan, Azerbaijan, Belarus, China, the Russian Federation, Japan, Kyrgyzstan, Tajikistan and Turkmenistan, the allocation of the band 460-470 MHz to the meteorological-satellite service (space-to-Earth) is on a primary basis (see No. 5.33), subject to agreement obtained under No. 9.21. (WRC-12)']),
(470000000, 694000001): (False, False, False, True, False, ['Broadcasting'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.291A]: Additional allocation: in Germany, Austria, Denmark, Estonia, Liechtenstein, the Czech Rep., Serbia and Switzerland, the frequency band 470-494 MHz is also allocated to the radiolocation service on a secondary basis. This use is limited to the operation of wind profiler radars in accordance with Resolution 217 (WRC-97). (WRC-15)', "[5.294]: Additional allocation: in Saudi Arabia, Cameroon, Côte d'Ivoire, Egypt, Ethiopia, Israel, Libya, the Syrian Arab Republic, Chad and Yemen, the frequency band 470-582 MHz is also allocated to the fixed service on a secondary basis. (WRC-15)", "[5.296]: Additional allocation: in Albania, Germany, Angola, Saudi Arabia, Austria, Bahrain, Belgium, Benin, Bosnia and Herzegovina, Botswana, Bulgaria, Burkina Faso, Burundi, Cameroon, Vatican, Congo (Rep. of the), Côte d'Ivoire, Croatia, Denmark, Djibouti, Egypt, United Arab Emirates, Spain, Estonia, Finland, France, Gabon, Georgia, Ghana, Hungary, Iraq, Ireland, Iceland, Israel, Italy, Jordan, Kenya, Kuwait, Lesotho, Latvia, The Former Yugoslav Republic of Macedonia, Lebanon, Libya, Liechtenstein, Lithuania, Luxembourg, Malawi, Mali, Malta, Morocco, Mauritius, Mauritania, Moldova, Monaco, Mozambique, Namibia, Niger, Nigeria, Norway, Oman, Uganda, the Netherlands, Poland, Portugal, Qatar, the Syrian Arab Republic, Slovakia, the Czech Republic, the United Kingdom, Rwanda, San Marino, Serbia, Sudan, South Africa, Sweden, Switzerland, Swaziland, Tanzania, Chad, Togo, Tunisia, Turkey, Ukraine, Zambia and Zimbabwe, the frequency band 470-694 MHz is also allocated on a secondary basis to the land mobile service, intended for applications ancillary to broadcasting and programme-making. Stations of the land mobile service in the countries listed in this footnote shall not cause harmful interference to existing or planned stations operating in accordance with the Table in countries other than those listed in this footnote. (WRC-15)", '[5.300]: Additional allocation: in Saudi Arabia, Cameroon, Egypt, United Arab Emirates, Israel, Jordan, Libya, Oman, Qatar, the Syrian Arab Republic and Sudan, the frequency band 582-790 MHz is also allocated to the fixed and mobile, except aeronautical mobile, services on a secondary basis. (WRC-15)', '[5.304]: Additional allocation: in the African Broadcasting Area (see Nos. 5.10 to 5.13), the band 606-614 MHz is also allocated to the radio astronomy service on a primary basis.', '[5.306]: Additional allocation: in Region 1, except in the African Broadcasting Area (see Nos. 5.10 to 5.13), and in Region 3, the band 608-614 MHz is also allocated to the radio astronomy service on a secondary basis.', '[5.311A]: For the frequency band 620-790 MHz, see also Resolution 549 (WRC-07). (WRC-07)', '[5.312]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the frequency band 645-862 MHz, in Bulgaria the frequency bands 646-686 MHz, 726-758 MHz, 766-814 MHz and 822-862 MHz, and in Poland the frequency band 860-862 MHz until 31 December 2017, are also allocated to the aeronautical radionavigation service on a primary basis. (WRC-15)']),
(694000000, 790000001): (False, False, True, True, False, ['Mobile Except Aeronautical Mobile [5.312A][5.317A]', 'Broadcasting'], [], ['[5.312A]: In Region 1, the use of the frequency band 694-790 MHz by the mobile, except aeronautical mobile, service is subject to the provisions of Resolution 760 (WRC-15). See also Resolution 224 (Rev.WRC-15). (WRC-15)', '[5.317A]: The parts of the frequency band 698-960 MHz in Region 2 and the frequency bands 694-790 MHz in Region 1 and 790-960 MHz in Regions 1 and 3 which are allocated to the mobile service on a primary basis are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) – see Resolutions 224 (Rev.WRC-15), 760 (WRC-15) and 749 (Rev.WRC-15), where applicable. This identification does not preclude the use of these frequency bands by any application of the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.300]: Additional allocation: in Saudi Arabia, Cameroon, Egypt, United Arab Emirates, Israel, Jordan, Libya, Oman, Qatar, the Syrian Arab Republic and Sudan, the frequency band 582-790 MHz is also allocated to the fixed and mobile, except aeronautical mobile, services on a secondary basis. (WRC-15)', '[5.311A]: For the frequency band 620-790 MHz, see also Resolution 549 (WRC-07). (WRC-07)', '[5.312]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the frequency band 645-862 MHz, in Bulgaria the frequency bands 646-686 MHz, 726-758 MHz, 766-814 MHz and 822-862 MHz, and in Poland the frequency band 860-862 MHz until 31 December 2017, are also allocated to the aeronautical radionavigation service on a primary basis. (WRC-15)']),
(790000000, 862000001): (False, True, True, True, False, ['Mobile Except Aeronautical Mobile [5.316B][5.317A]', 'Broadcasting'], [], ['[5.316B]: In Region 1, the allocation to the mobile, except aeronautical mobile, service in the frequency band 790-862 MHz is subject to agreement obtained under No. 9.21 with respect to the aeronautical radionavigation service in countries mentioned in No. 5.312. For countries party to the GE06 Agreement, the use of stations of the mobile service is also subject to the successful application of the procedures of that Agreement. Resolutions 224 (Rev.WRC-15) and 749 (Rev.WRC-15) shall apply, as appropriate. (WRC-15)', '[5.317A]: The parts of the frequency band 698-960 MHz in Region 2 and the frequency bands 694-790 MHz in Region 1 and 790-960 MHz in Regions 1 and 3 which are allocated to the mobile service on a primary basis are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) – see Resolutions 224 (Rev.WRC-15), 760 (WRC-15) and 749 (Rev.WRC-15), where applicable. This identification does not preclude the use of these frequency bands by any application of the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.312]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kazakhstan, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the frequency band 645-862 MHz, in Bulgaria the frequency bands 646-686 MHz, 726-758 MHz, 766-814 MHz and 822-862 MHz, and in Poland the frequency band 860-862 MHz until 31 December 2017, are also allocated to the aeronautical radionavigation service on a primary basis. (WRC-15)', '[5.319]: Additional allocation: in Belarus, the Russian Federation and Ukraine, the bands 806-840 MHz (Earth-to-space) and 856-890 MHz (space-to-Earth) are also allocated to the mobile-satellite, except aeronautical mobile-satellite (R), service. The use of these bands by this service shall not cause harmful interference to, or claim protection from, services in other countries operating in accordance with the Table of Frequency Allocations and is subject to special agreements between the administrations concerned.']),
(862000000, 890000001): (False, True, True, True, False, ['Mobile Except Aeronautical Mobile [5.317A]', 'Broadcasting [5.322]'], [], ['[5.317A]: The parts of the frequency band 698-960 MHz in Region 2 and the frequency bands 694-790 MHz in Region 1 and 790-960 MHz in Regions 1 and 3 which are allocated to the mobile service on a primary basis are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) – see Resolutions 224 (Rev.WRC-15), 760 (WRC-15) and 749 (Rev.WRC-15), where applicable. This identification does not preclude the use of these frequency bands by any application of the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.322]: In Region 1, in the band 862-960 MHz, stations of the broadcasting service shall be operated only in the African Broadcasting Area (see Nos. 5.10 to 5.13) excluding Algeria, Burundi, Egypt, Spain, Lesotho, Libya, Morocco, Malawi, Namibia, Nigeria, South Africa, Tanzania, Zimbabwe and Zambia, subject to agreement obtained under No. 9.21. (WRC-12)', '[5.319]: Additional allocation: in Belarus, the Russian Federation and Ukraine, the bands 806-840 MHz (Earth-to-space) and 856-890 MHz (space-to-Earth) are also allocated to the mobile-satellite, except aeronautical mobile-satellite (R), service. The use of these bands by this service shall not cause harmful interference to, or claim protection from, services in other countries operating in accordance with the Table of Frequency Allocations and is subject to special agreements between the administrations concerned.', '[5.323]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Kazakhstan, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the band 862-960 MHz, in Bulgaria the bands 862-890.2 MHz and 900-935.2 MHz, in Poland the band 862-876 MHz until 31 December 2017, and in Romania the bands 862-880 MHz and 915-925 MHz, are also allocated to the aeronautical radionavigation service on a primary basis. Such use is subject to agreement obtained under No. 9.21 with administrations concerned and limited to ground-based radiobeacons in operation on 27 October 1997 until the end of their lifetime. (WRC-12)']),
(890000000, 942000001): (False, True, True, True, False, ['Mobile Except Aeronautical Mobile [5.317A]', 'Broadcasting [5.322]'], ['Radiolocation'], ['[5.317A]: The parts of the frequency band 698-960 MHz in Region 2 and the frequency bands 694-790 MHz in Region 1 and 790-960 MHz in Regions 1 and 3 which are allocated to the mobile service on a primary basis are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) – see Resolutions 224 (Rev.WRC-15), 760 (WRC-15) and 749 (Rev.WRC-15), where applicable. This identification does not preclude the use of these frequency bands by any application of the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.322]: In Region 1, in the band 862-960 MHz, stations of the broadcasting service shall be operated only in the African Broadcasting Area (see Nos. 5.10 to 5.13) excluding Algeria, Burundi, Egypt, Spain, Lesotho, Libya, Morocco, Malawi, Namibia, Nigeria, South Africa, Tanzania, Zimbabwe and Zambia, subject to agreement obtained under No. 9.21. (WRC-12)', '[5.323]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Kazakhstan, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the band 862-960 MHz, in Bulgaria the bands 862-890.2 MHz and 900-935.2 MHz, in Poland the band 862-876 MHz until 31 December 2017, and in Romania the bands 862-880 MHz and 915-925 MHz, are also allocated to the aeronautical radionavigation service on a primary basis. Such use is subject to agreement obtained under No. 9.21 with administrations concerned and limited to ground-based radiobeacons in operation on 27 October 1997 until the end of their lifetime. (WRC-12)']),
(942000000, 960000001): (False, True, True, True, False, ['Mobile Except Aeronautical Mobile [5.317A]', 'Broadcasting [5.322]'], [], ['[5.317A]: The parts of the frequency band 698-960 MHz in Region 2 and the frequency bands 694-790 MHz in Region 1 and 790-960 MHz in Regions 1 and 3 which are allocated to the mobile service on a primary basis are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) – see Resolutions 224 (Rev.WRC-15), 760 (WRC-15) and 749 (Rev.WRC-15), where applicable. This identification does not preclude the use of these frequency bands by any application of the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.322]: In Region 1, in the band 862-960 MHz, stations of the broadcasting service shall be operated only in the African Broadcasting Area (see Nos. 5.10 to 5.13) excluding Algeria, Burundi, Egypt, Spain, Lesotho, Libya, Morocco, Malawi, Namibia, Nigeria, South Africa, Tanzania, Zimbabwe and Zambia, subject to agreement obtained under No. 9.21. (WRC-12)', '[5.323]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Kazakhstan, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the band 862-960 MHz, in Bulgaria the bands 862-890.2 MHz and 900-935.2 MHz, in Poland the band 862-876 MHz until 31 December 2017, and in Romania the bands 862-880 MHz and 915-925 MHz, are also allocated to the aeronautical radionavigation service on a primary basis. Such use is subject to agreement obtained under No. 9.21 with administrations concerned and limited to ground-based radiobeacons in operation on 27 October 1997 until the end of their lifetime. (WRC-12)']),
(960000000, 1164000001): (False, False, True, False, False, ['Aeronautical Mobile (R) [5.327A]', 'Aeronautical Radionavigation [5.328]'], [], ['[5.327A]: The use of the frequency band 960-1 164 MHz by the aeronautical mobile (R) service is limited to systems that operate in accordance with recognized international aeronautical standards. Such use shall be in accordance with Resolution 417 (Rev.WRC-15). (WRC-15)', '[5.328]: The use of the band 960-1 215 MHz by the aeronautical radionavigation service is reserved on a worldwide basis for the operation and development of airborne electronic aids to air navigation and any directly associated ground-based facilities. (WRC-2000)', '[5.328AA]: The frequency band 1 087.7-1 092.3 MHz is also allocated to the aeronautical mobile-satellite (R) service (Earth-to-space) on a primary basis, limited to the space station reception of Automatic Dependent Surveillance-Broadcast (ADS-B) emissions from aircraft transmitters that operate in accordance with recognized international aeronautical standards. Stations operating in the aeronautical mobile-satellite (R) service shall not claim protection from stations operating in the aeronautical radionavigation service. Resolution 425 (WRC-15) shall apply. (WRC-15)']),
(1164000000, 1215000001): (False, False, False, False, False, ['Aeronautical Radionavigation [5.328]', 'Radionavigation-Satellite (Space-To-Earth) [5.328B]', 'Radionavigation-Satellite (Space-To-Space) [5.328B]'], [], ['[5.328]: The use of the band 960-1 215 MHz by the aeronautical radionavigation service is reserved on a worldwide basis for the operation and development of airborne electronic aids to air navigation and any directly associated ground-based facilities. (WRC-2000)', '[5.328B]: The use of the bands 1 164-1 300 MHz, 1 559-1 610 MHz and 5 010-5 030 MHz by systems and networks in the radionavigation-satellite service for which complete coordination or notification information, as appropriate, is received by the Radiocommunication Bureau after 1 January 2005 is subject to the application of the provisions of Nos. 9.12, 9.12A and 9.13. Resolution 610 (WRC-03) shall also apply; however, in the case of radionavigation-satellite service (space-to-space) networks and systems, Resolution 610 (WRC-03) shall only apply to transmitting space stations. In accordance with No. 5.329A, for systems and networks in the radionavigation-satellite service (space-to-space) in the bands 1 215-1 300 MHz and 1 559-1 610 MHz, the provisions of Nos. 9.7, 9.12, 9.12A and 9.13 shall only apply with respect to other systems and networks in the radionavigation-satellite service (space-to-space). (WRC-07)', '[5.328A]: Stations in the radionavigation-satellite service in the band 1 164-1 215 MHz shall operate in accordance with the provisions of Resolution 609 (Rev.WRC-07) and shall not claim protection from stations in the aeronautical radionavigation service in the band 960-1 215 MHz. No. 5.43A does not apply. The provisions of No. 21.18 shall apply. (WRC-07)']),
(1215000000, 1240000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active)', 'Radiolocation', 'Radionavigation-Satellite (Space-To-Earth) [5.328B][5.329][5.329A]', 'Radionavigation-Satellite (Space-To-Space) [5.328B][5.329][5.329A]', 'Space Research (Active)'], [], ['[5.328B]: The use of the bands 1 164-1 300 MHz, 1 559-1 610 MHz and 5 010-5 030 MHz by systems and networks in the radionavigation-satellite service for which complete coordination or notification information, as appropriate, is received by the Radiocommunication Bureau after 1 January 2005 is subject to the application of the provisions of Nos. 9.12, 9.12A and 9.13. Resolution 610 (WRC-03) shall also apply; however, in the case of radionavigation-satellite service (space-to-space) networks and systems, Resolution 610 (WRC-03) shall only apply to transmitting space stations. In accordance with No. 5.329A, for systems and networks in the radionavigation-satellite service (space-to-space) in the bands 1 215-1 300 MHz and 1 559-1 610 MHz, the provisions of Nos. 9.7, 9.12, 9.12A and 9.13 shall only apply with respect to other systems and networks in the radionavigation-satellite service (space-to-space). (WRC-07)', '[5.329]: Use of the radionavigation-satellite service in the band 1 215-1 300 MHz shall be subject to the condition that no harmful interference is caused to, and no protection is claimed from, the radionavigation service authorized under No. 5.331. Furthermore, the use of the radionavigation-satellite service in the band 1 215-1 300 MHz shall be subject to the condition that no harmful interference is caused to the radiolocation service. No. 5.43 shall not apply in respect of the radiolocation service. Resolution 608 (WRC-03)* shall apply. (WRC-03)', '[5.329A]: Use of systems in the radionavigation-satellite service (space-to-space) operating in the bands 1 215-1 300 MHz and 1 559-1 610 MHz is not intended to provide safety service applications, and shall not impose any additional constraints on radionavigation-satellite service (space-to-Earth) systems or on other services operating in accordance with the Table of Frequency Allocations. (WRC-07)', '[5.330]: Additional allocation: in Angola, Saudi Arabia, Bahrain, Bangladesh, Cameroon, China, Djibouti, Egypt, the United Arab Emirates, Eritrea, Ethiopia, Guyana, India, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Japan, Jordan, Kuwait, Nepal, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, Somalia, Sudan, South Sudan, Chad, Togo and Yemen, the band 1 215-1 300 MHz is also allocated to the fixed and mobile services on a primary basis. (WRC-12)', '[5.331]: Additional allocation: in Algeria, Germany, Saudi Arabia, Australia, Austria, Bahrain, Belarus, Belgium, Benin, Bosnia and Herzegovina, Brazil, Burkina Faso, Burundi, Cameroon, China, Korea (Rep. of), Croatia, Denmark, Egypt, the United Arab Emirates, Estonia, the Russian Federation, Finland, France, Ghana, Greece, Guinea, Equatorial Guinea, Hungary, India, Indonesia, Iran (Islamic Republic of), Iraq, Ireland, Israel, Jordan, Kenya, Kuwait, The Former Yugoslav Republic of Macedonia, Lesotho, Latvia, Lebanon, Liechtenstein, Lithuania, Luxembourg, Madagascar, Mali, Mauritania, Montenegro, Nigeria, Norway, Oman, Pakistan, the Netherlands, Poland, Portugal, Qatar, the Syrian Arab Republic, Dem. People’s Rep. of Korea, Slovakia, the United Kingdom, Serbia, Slovenia, Somalia, Sudan, South Sudan, Sri Lanka, South Africa, Sweden, Switzerland, Thailand, Togo, Turkey, Venezuela and Viet Nam, the band 1 215-1 300 MHz is also allocated to the radionavigation service on a primary basis. In Canada and the United States, the band 1 240-1 300 MHz is also allocated to the radionavigation service, and use of the radionavigation service shall be limited to the aeronautical radionavigation service. (WRC-12)', '[5.332]: In the band 1 215-1 260 MHz, active spaceborne sensors in the Earth exploration-satellite and space research services shall not cause harmful interference to, claim protection from, or otherwise impose constraints on operation or development of the radiolocation service, the radionavigation-satellite service and other services allocated on a primary basis. (WRC-2000)']),
(1240000000, 1300000001): (True, False, False, False, False, ['Earth Exploration-Satellite (Active)', 'Radiolocation', 'Radionavigation-Satellite (Space-To-Earth) [5.328B][5.329][5.329A]', 'Radionavigation-Satellite (Space-To-Space) [5.328B][5.329][5.329A]', 'Space Research (Active)'], ['Amateur'], ['[5.328B]: The use of the bands 1 164-1 300 MHz, 1 559-1 610 MHz and 5 010-5 030 MHz by systems and networks in the radionavigation-satellite service for which complete coordination or notification information, as appropriate, is received by the Radiocommunication Bureau after 1 January 2005 is subject to the application of the provisions of Nos. 9.12, 9.12A and 9.13. Resolution 610 (WRC-03) shall also apply; however, in the case of radionavigation-satellite service (space-to-space) networks and systems, Resolution 610 (WRC-03) shall only apply to transmitting space stations. In accordance with No. 5.329A, for systems and networks in the radionavigation-satellite service (space-to-space) in the bands 1 215-1 300 MHz and 1 559-1 610 MHz, the provisions of Nos. 9.7, 9.12, 9.12A and 9.13 shall only apply with respect to other systems and networks in the radionavigation-satellite service (space-to-space). (WRC-07)', '[5.329]: Use of the radionavigation-satellite service in the band 1 215-1 300 MHz shall be subject to the condition that no harmful interference is caused to, and no protection is claimed from, the radionavigation service authorized under No. 5.331. Furthermore, the use of the radionavigation-satellite service in the band 1 215-1 300 MHz shall be subject to the condition that no harmful interference is caused to the radiolocation service. No. 5.43 shall not apply in respect of the radiolocation service. Resolution 608 (WRC-03)* shall apply. (WRC-03)', '[5.329A]: Use of systems in the radionavigation-satellite service (space-to-space) operating in the bands 1 215-1 300 MHz and 1 559-1 610 MHz is not intended to provide safety service applications, and shall not impose any additional constraints on radionavigation-satellite service (space-to-Earth) systems or on other services operating in accordance with the Table of Frequency Allocations. (WRC-07)', '[5.282]: In the bands 435-438 MHz, 1 260-1 270 MHz, 2 400-2 450 MHz, 3 400-3 410 MHz (in Regions 2 and 3 only) and 5 650-5 670 MHz, the amateur-satellite service may operate subject to not causing harmful interference to other services operating in accordance with the Table (see No. 5.43). Administrations authorizing such use shall ensure that any harmful interference caused by emissions from a station in the amateur-satellite service is immediately eliminated in accordance with the provisions of No. 25.11. The use of the bands 1 260-1 270 MHz and 5 650-5 670 MHz by the amateur-satellite service is limited to the Earth-to-space direction.', '[5.330]: Additional allocation: in Angola, Saudi Arabia, Bahrain, Bangladesh, Cameroon, China, Djibouti, Egypt, the United Arab Emirates, Eritrea, Ethiopia, Guyana, India, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Japan, Jordan, Kuwait, Nepal, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, Somalia, Sudan, South Sudan, Chad, Togo and Yemen, the band 1 215-1 300 MHz is also allocated to the fixed and mobile services on a primary basis. (WRC-12)', '[5.331]: Additional allocation: in Algeria, Germany, Saudi Arabia, Australia, Austria, Bahrain, Belarus, Belgium, Benin, Bosnia and Herzegovina, Brazil, Burkina Faso, Burundi, Cameroon, China, Korea (Rep. of), Croatia, Denmark, Egypt, the United Arab Emirates, Estonia, the Russian Federation, Finland, France, Ghana, Greece, Guinea, Equatorial Guinea, Hungary, India, Indonesia, Iran (Islamic Republic of), Iraq, Ireland, Israel, Jordan, Kenya, Kuwait, The Former Yugoslav Republic of Macedonia, Lesotho, Latvia, Lebanon, Liechtenstein, Lithuania, Luxembourg, Madagascar, Mali, Mauritania, Montenegro, Nigeria, Norway, Oman, Pakistan, the Netherlands, Poland, Portugal, Qatar, the Syrian Arab Republic, Dem. People’s Rep. of Korea, Slovakia, the United Kingdom, Serbia, Slovenia, Somalia, Sudan, South Sudan, Sri Lanka, South Africa, Sweden, Switzerland, Thailand, Togo, Turkey, Venezuela and Viet Nam, the band 1 215-1 300 MHz is also allocated to the radionavigation service on a primary basis. In Canada and the United States, the band 1 240-1 300 MHz is also allocated to the radionavigation service, and use of the radionavigation service shall be limited to the aeronautical radionavigation service. (WRC-12)', '[5.332]: In the band 1 215-1 260 MHz, active spaceborne sensors in the Earth exploration-satellite and space research services shall not cause harmful interference to, claim protection from, or otherwise impose constraints on operation or development of the radiolocation service, the radionavigation-satellite service and other services allocated on a primary basis. (WRC-2000)', '[5.335]: In Canada and the United States in the band 1 240-1 300 MHz, active spaceborne sensors in the Earth exploration-satellite and space research services shall not cause interference to, claim protection from, or otherwise impose constraints on operation or development of the aeronautical radionavigation service. (WRC-97)', '[5.335A]: In the band 1 260-1 300 MHz, active spaceborne sensors in the Earth exploration-satellite and space research services shall not cause harmful interference to, claim protection from, or otherwise impose constraints on operation or development of the radiolocation service and other services allocated by footnotes on a primary basis. (WRC-2000)']),
(1300000000, 1350000001): (False, False, False, False, False, ['Radiolocation', 'Aeronautical Radionavigation [5.337]', 'Radionavigation-Satellite (Earth-To-Space)'], [], ['[5.337]: The use of the bands 1 300-1 350 MHz, 2 700-2 900 MHz and 9 000-9 200 MHz by the aeronautical radionavigation service is restricted to ground-based radars and to associated airborne transponders which transmit only on frequencies in these bands and only when actuated by radars operating in the same band.', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.337A]: The use of the band 1 300-1 350 MHz by earth stations in the radionavigation-satellite service and by stations in the radiolocation service shall not cause harmful interference to, nor constrain the operation and development of, the aeronautical-radionavigation service. (WRC-2000)']),
(1350000000, 1400000001): (False, True, True, False, False, ['Radiolocation'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.338]: In Kyrgyzstan, Slovakia and Turkmenistan, existing installations of the radionavigation service may continue to operate in the band 1 350-1 400 MHz. (WRC-12)', '[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)', '[5.339]: The bands 1 370-1 400 MHz, 2 640-2 655 MHz, 4 950-4 990 MHz and 15.20-15.35 GHz are also allocated to the space research (passive) and Earth exploration-satellite (passive) services on a secondary basis.']),
(1400000000, 1427000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(1427000000, 1429000001): (False, True, True, False, False, ['Space Operation (Earth-To-Space)', 'Mobile Except Aeronautical Mobile [5.341A][5.341B][5.341C]'], [], ['[5.341A]: In Region 1, the frequency bands 1 427-1 452 MHz and 1 492-1 518 MHz are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) in accordance with Resolution 223 (Rev.WRC-15). This identification does not preclude the use of these frequency bands by any other application of the services to which it is allocated and does not establish priority in the Radio Regulations. The use of IMT stations is subject to agreement obtained under No. 9.21 with respect to the aeronautical mobile service used for aeronautical telemetry in accordance with No. 5.342. (WRC-15)', '[5.341B]: In Region 2, the frequency band 1 427-1 518 MHz is identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) in accordance with Resolution 223 (Rev.WRC-15). This identification does not preclude the use of this frequency band by any application of the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.341C]: The frequency bands 1 427-1 452 MHz and 1 492-1 518 MHz are identified for use by administrations in Region 3 wishing to implement International Mobile Telecommunications (IMT) in accordance with Resolution 223 (Rev.WRC-15). The use of these frequency bands by the above administrations for the implementation of IMT in the frequency bands 1 429-1 452 MHz and 1 492-1 518 MHz is subject to agreement obtained under No. 9.21 from countries using stations of the aeronautical mobile service. This identification does not preclude the use of these frequency bands by any application of the services to which it is allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(1429000000, 1452000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile [5.341A]'], [], ['[5.341A]: In Region 1, the frequency bands 1 427-1 452 MHz and 1 492-1 518 MHz are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) in accordance with Resolution 223 (Rev.WRC-15). This identification does not preclude the use of these frequency bands by any other application of the services to which it is allocated and does not establish priority in the Radio Regulations. The use of IMT stations is subject to agreement obtained under No. 9.21 with respect to the aeronautical mobile service used for aeronautical telemetry in accordance with No. 5.342. (WRC-15)', '[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.342]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Uzbekistan, Kyrgyzstan and Ukraine, the frequency band 1 429-1 535 MHz is also allocated to the aeronautical mobile service on a primary basis, exclusively for the purposes of aeronautical telemetry within the national territory. As of 1 April 2007, the use of the frequency band 1 452-1 492 MHz is subject to agreement between the administrations concerned. (WRC-15)']),
(1452000000, 1492000001): (False, True, True, True, False, ['Mobile Except Aeronautical Mobile [5.346]', 'Broadcasting', 'Broadcasting-Satellite [5.208B]'], [], ["[5.346]: In Algeria, Angola, Saudi Arabia, Bahrain, Benin, Botswana, Burkina Faso, Burundi, Cameroon, Central African Republic, Congo (Rep. of the), Côte d'Ivoire, Djibouti, Egypt, United Arab Emirates, Gabon, Gambia, Ghana, Guinea, Iraq, Jordan, Kenya, Kuwait, Lesotho, Lebanon, Liberia, Madagascar, Malawi, Mali, Morocco, Mauritius, Mauritania, Mozambique, Namibia, Niger, Nigeria, Oman, Uganda, Palestine**, Qatar, Dem. Rep. of the Congo, Rwanda, Senegal, Seychelles, Sudan, South Sudan, South Africa, Swaziland, Tanzania, Chad, Togo, Tunisia, Zambia, and Zimbabwe, the frequency band 1 452-1 492 MHz is identified for use by administrations listed above wishing to implement International Mobile Telecommunications (IMT) in accordance with Resolution 223 (Rev.WRC-15). This identification does not preclude the use of this frequency band by any other application of the services to which it is allocated and does not establish priority in the Radio Regulations. The use of this frequency band for the implementation of IMT is subject to agreement obtained under No. 9.21 with respect to the aeronautical mobile service used for aeronautical telemetry in accordance with No. 5.342. See also Resolution 761 (WRC-15). (WRC-15)", '[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.342]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Uzbekistan, Kyrgyzstan and Ukraine, the frequency band 1 429-1 535 MHz is also allocated to the aeronautical mobile service on a primary basis, exclusively for the purposes of aeronautical telemetry within the national territory. As of 1 April 2007, the use of the frequency band 1 452-1 492 MHz is subject to agreement between the administrations concerned. (WRC-15)', '[5.345]: Use of the band 1 452-1 492 MHz by the broadcasting-satellite service, and by the broadcasting service, is limited to digital audio broadcasting and is subject to the provisions of Resolution 528 (WARC-92)*.']),
(1492000000, 1518000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile [5.341A]'], [], ['[5.341A]: In Region 1, the frequency bands 1 427-1 452 MHz and 1 492-1 518 MHz are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) in accordance with Resolution 223 (Rev.WRC-15). This identification does not preclude the use of these frequency bands by any other application of the services to which it is allocated and does not establish priority in the Radio Regulations. The use of IMT stations is subject to agreement obtained under No. 9.21 with respect to the aeronautical mobile service used for aeronautical telemetry in accordance with No. 5.342. (WRC-15)', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.342]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Uzbekistan, Kyrgyzstan and Ukraine, the frequency band 1 429-1 535 MHz is also allocated to the aeronautical mobile service on a primary basis, exclusively for the purposes of aeronautical telemetry within the national territory. As of 1 April 2007, the use of the frequency band 1 452-1 492 MHz is subject to agreement between the administrations concerned. (WRC-15)']),
(1518000000, 1525000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile', 'Mobile-Satellite (Space-To-Earth) [5.348][5.348A][5.348B][5.351A]'], [], ['[5.348]: The use of the band 1 518-1 525 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. In the band 1 518-1 525 MHz stations in the mobile-satellite service shall not claim protection from the stations in the fixed service. No. 5.43A does not apply. (WRC-03)', '[5.348A]: In the band 1 518-1 525 MHz, the coordination threshold in terms of the power flux-density levels at the surface of the Earth in application of No. 9.11A for space stations in the mobile-satellite (space-to-Earth) service, with respect to the land mobile service use for specialized mobile radios or used in conjunction with public switched telecommunication networks (PSTN) operating within the territory of Japan, shall be –150 dB(W/m2) in any 4 kHz band for all angles of arrival, instead of those given in Table 5-2 of Appendix 5. In the band 1 518-1 525 MHz stations in the mobile-satellite service shall not claim protection from stations in the mobile service in the territory of Japan. No. 5.43A does not apply. (WRC-03)', '[5.348B]: In the band 1 518-1 525 MHz, stations in the mobile-satellite service shall not claim protection from aeronautical mobile telemetry stations in the mobile service in the territory of the United States (see Nos. 5.343 and 5.344) and in the countries listed in No. 5.342. No. 5.43A does not apply. (WRC-03)', '[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.342]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Uzbekistan, Kyrgyzstan and Ukraine, the frequency band 1 429-1 535 MHz is also allocated to the aeronautical mobile service on a primary basis, exclusively for the purposes of aeronautical telemetry within the national territory. As of 1 April 2007, the use of the frequency band 1 452-1 492 MHz is subject to agreement between the administrations concerned. (WRC-15)']),
(1525000000, 1530000001): (False, True, True, False, False, ['Space Operation (Space-To-Earth)', 'Mobile-Satellite (Space-To-Earth) [5.208B][5.351A]'], ['Earth Exploration-Satellite', 'Mobile Except Aeronautical Mobile [5.349]'], ['[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.349]: Different category of service: in Saudi Arabia, Azerbaijan, Bahrain, Cameroon, Egypt, France, Iran (Islamic Republic of), Iraq, Israel, Kazakhstan, Kuwait, The Former Yugoslav Republic of Macedonia, Lebanon, Morocco, Qatar, Syrian Arab Republic, Kyrgyzstan, Turkmenistan and Yemen, the allocation of the band 1 525-1 530 MHz to the mobile, except aeronautical mobile, service is on a primary basis (see No. 5.33). (WRC-07)', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.342]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Uzbekistan, Kyrgyzstan and Ukraine, the frequency band 1 429-1 535 MHz is also allocated to the aeronautical mobile service on a primary basis, exclusively for the purposes of aeronautical telemetry within the national territory. As of 1 April 2007, the use of the frequency band 1 452-1 492 MHz is subject to agreement between the administrations concerned. (WRC-15)', '[5.350]: Additional allocation: in Azerbaijan, Kyrgyzstan and Turkmenistan, the band 1 525-1 530 MHz is also allocated to the aeronautical mobile service on a primary basis. (WRC-2000)', '[5.351]: The bands 1 525-1 544 MHz, 1 545-1 559 MHz, 1 626.5-1 645.5 MHz and 1 646.5-1 660.5 MHz shall not be used for feeder links of any service. In exceptional circumstances, however, an earth station at a specified fixed point in any of the mobile-satellite services may be authorized by an administration to communicate via space stations using these bands.', '[5.352A]: In the frequency band 1 525-1 530 MHz, stations in the mobile-satellite service, except stations in the maritime mobile-satellite service, shall not cause harmful interference to, or claim protection from, stations of the fixed service in Algeria, Saudi Arabia, Egypt, France and French overseas communities of Region 3, Guinea, India, Israel, Italy, Jordan, Kuwait, Mali, Morocco, Mauritania, Nigeria, Oman, Pakistan, the Philippines, Qatar, Syrian Arab Republic, Viet Nam and Yemen notified prior to 1 April 1998. (WRC-15)', '[5.354]: The use of the bands 1 525-1 559 MHz and 1 626.5-1 660.5 MHz by the mobile-satellite services is subject to coordination under No. 9.11A.']),
(1530000000, 1535000001): (False, True, True, False, False, ['Space Operation (Space-To-Earth)', 'Mobile-Satellite (Space-To-Earth) [5.208B][5.351A][5.353A]'], ['Earth Exploration-Satellite', 'Mobile Except Aeronautical Mobile'], ['[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.353A]: In applying the procedures of Section II of Article 9 to the mobile-satellite service in the bands 1 530-1 544 MHz and 1 626.5-1 645.5 MHz, priority shall be given to accommodating the spectrum requirements for distress, urgency and safety communications of the Global Maritime Distress and Safety System (GMDSS). Maritime mobile-satellite distress, urgency and safety communications shall have priority access and immediate availability over all other mobile satellite communications operating within a network. Mobile-satellite systems shall not cause unacceptable interference to, or claim protection from, distress, urgency and safety communications of the GMDSS. Account shall be taken of the priority of safety-related communications in the other mobile-satellite services. (The provisions of Resolution 222 (WRC-2000)* shall apply.) (WRC-2000)', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.342]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Uzbekistan, Kyrgyzstan and Ukraine, the frequency band 1 429-1 535 MHz is also allocated to the aeronautical mobile service on a primary basis, exclusively for the purposes of aeronautical telemetry within the national territory. As of 1 April 2007, the use of the frequency band 1 452-1 492 MHz is subject to agreement between the administrations concerned. (WRC-15)', '[5.351]: The bands 1 525-1 544 MHz, 1 545-1 559 MHz, 1 626.5-1 645.5 MHz and 1 646.5-1 660.5 MHz shall not be used for feeder links of any service. In exceptional circumstances, however, an earth station at a specified fixed point in any of the mobile-satellite services may be authorized by an administration to communicate via space stations using these bands.', '[5.354]: The use of the bands 1 525-1 559 MHz and 1 626.5-1 660.5 MHz by the mobile-satellite services is subject to coordination under No. 9.11A.']),
(1535000000, 1559000001): (False, False, False, False, False, ['Mobile-Satellite (Space-To-Earth) [5.208B][5.351A]'], [], ['[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.351]: The bands 1 525-1 544 MHz, 1 545-1 559 MHz, 1 626.5-1 645.5 MHz and 1 646.5-1 660.5 MHz shall not be used for feeder links of any service. In exceptional circumstances, however, an earth station at a specified fixed point in any of the mobile-satellite services may be authorized by an administration to communicate via space stations using these bands.', '[5.353A]: In applying the procedures of Section II of Article 9 to the mobile-satellite service in the bands 1 530-1 544 MHz and 1 626.5-1 645.5 MHz, priority shall be given to accommodating the spectrum requirements for distress, urgency and safety communications of the Global Maritime Distress and Safety System (GMDSS). Maritime mobile-satellite distress, urgency and safety communications shall have priority access and immediate availability over all other mobile satellite communications operating within a network. Mobile-satellite systems shall not cause unacceptable interference to, or claim protection from, distress, urgency and safety communications of the GMDSS. Account shall be taken of the priority of safety-related communications in the other mobile-satellite services. (The provisions of Resolution 222 (WRC-2000)* shall apply.) (WRC-2000)', '[5.354]: The use of the bands 1 525-1 559 MHz and 1 626.5-1 660.5 MHz by the mobile-satellite services is subject to coordination under No. 9.11A.', '[5.355]: Additional allocation: in Bahrain, Bangladesh, Congo (Rep. of the), Djibouti, Egypt, Eritrea, Iraq, Israel, Kuwait, Qatar, Syrian Arab Republic, Somalia, Sudan, South Sudan, Chad, Togo and Yemen, the bands 1 540-1 559 MHz, 1 610-1 645.5 MHz and 1 646.5-1 660 MHz are also allocated to the fixed service on a secondary basis. (WRC-12)', '[5.356]: The use of the band 1 544-1 545 MHz by the mobile-satellite service (space-to-Earth) is limited to distress and safety communications (see Article 31).', '[5.357]: Transmissions in the band 1 545-1 555 MHz from terrestrial aeronautical stations directly to aircraft stations, or between aircraft stations, in the aeronautical mobile (R) service are also authorized when such transmissions are used to extend or supplement the satellite-to-aircraft links.', '[5.357A]: In applying the procedures of Section II of Article 9 to the mobile-satellite service in the frequency bands 1 545-1 555 MHz and 1 646.5-1 656.5 MHz, priority shall be given to accommodating the spectrum requirements of the aeronautical mobile-satellite (R) service providing transmission of messages with priority 1 to 6 in Article 44. Aeronautical mobile-satellite (R) service communications with priority 1 to 6 in Article 44 shall have priority access and immediate availability, by pre-emption if necessary, over all other mobile-satellite communications operating within a network. Mobile-satellite systems shall not cause unacceptable interference to, or claim protection from, aeronautical mobile-satellite (R) service communications with priority 1 to 6 in Article 44. Account shall be taken of the priority of safety-related communications in the other mobile-satellite services. (The provisions of Resolution 222 (Rev.WRC-12)* shall apply.) (WRC-12)', '[5.359]: Additional allocation: in Germany, Saudi Arabia, Armenia, Azerbaijan, Belarus, Benin, Cameroon, the Russian Federation, France, Georgia, Guinea, Guinea-Bissau, Jordan, Kazakhstan, Kuwait, Lithuania, Mauritania, Uganda, Uzbekistan, Pakistan, Poland, the Syrian Arab Republic, Kyrgyzstan, the Dem. People’s Rep. of Korea, Romania, Tajikistan, Tunisia, Turkmenistan and Ukraine, the frequency bands 1 550-1 559 MHz, 1 610-1 645.5 MHz and 1 646.5-1 660 MHz are also allocated to the fixed service on a primary basis. Administrations are urged to make all practicable efforts to avoid the implementation of new fixed-service stations in these frequency bands. (WRC-15)', '[5.362A]: In the United States, in the bands 1 555-1 559 MHz and 1 656.5-1 660.5 MHz, the aeronautical mobile-satellite (R) service shall have priority access and immediate availability, by pre-emption if necessary, over all other mobile-satellite communications operating within a network. Mobile-satellite systems shall not cause unacceptable interference to, or claim protection from, aeronautical mobile-satellite (R) service communications with priority 1 to 6 in Article 44. Account shall be taken of the priority of safety-related communications in the other mobile-satellite services. (WRC-97)']),
(1559000000, 1610000001): (False, False, False, False, False, ['Aeronautical Radionavigation', 'Radionavigation-Satellite (Space-To-Earth) [5.208B][5.328B][5.329A]', 'Radionavigation-Satellite (Space-To-Space) [5.208B][5.328B][5.329A]'], [], ['[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.328B]: The use of the bands 1 164-1 300 MHz, 1 559-1 610 MHz and 5 010-5 030 MHz by systems and networks in the radionavigation-satellite service for which complete coordination or notification information, as appropriate, is received by the Radiocommunication Bureau after 1 January 2005 is subject to the application of the provisions of Nos. 9.12, 9.12A and 9.13. Resolution 610 (WRC-03) shall also apply; however, in the case of radionavigation-satellite service (space-to-space) networks and systems, Resolution 610 (WRC-03) shall only apply to transmitting space stations. In accordance with No. 5.329A, for systems and networks in the radionavigation-satellite service (space-to-space) in the bands 1 215-1 300 MHz and 1 559-1 610 MHz, the provisions of Nos. 9.7, 9.12, 9.12A and 9.13 shall only apply with respect to other systems and networks in the radionavigation-satellite service (space-to-space). (WRC-07)', '[5.329A]: Use of systems in the radionavigation-satellite service (space-to-space) operating in the bands 1 215-1 300 MHz and 1 559-1 610 MHz is not intended to provide safety service applications, and shall not impose any additional constraints on radionavigation-satellite service (space-to-Earth) systems or on other services operating in accordance with the Table of Frequency Allocations. (WRC-07)', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(1610000000, 1610600001): (False, False, False, False, False, ['Mobile-Satellite (Earth-To-Space) [5.351A]', 'Aeronautical Radionavigation'], [], ['[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.355]: Additional allocation: in Bahrain, Bangladesh, Congo (Rep. of the), Djibouti, Egypt, Eritrea, Iraq, Israel, Kuwait, Qatar, Syrian Arab Republic, Somalia, Sudan, South Sudan, Chad, Togo and Yemen, the bands 1 540-1 559 MHz, 1 610-1 645.5 MHz and 1 646.5-1 660 MHz are also allocated to the fixed service on a secondary basis. (WRC-12)', '[5.359]: Additional allocation: in Germany, Saudi Arabia, Armenia, Azerbaijan, Belarus, Benin, Cameroon, the Russian Federation, France, Georgia, Guinea, Guinea-Bissau, Jordan, Kazakhstan, Kuwait, Lithuania, Mauritania, Uganda, Uzbekistan, Pakistan, Poland, the Syrian Arab Republic, Kyrgyzstan, the Dem. People’s Rep. of Korea, Romania, Tajikistan, Tunisia, Turkmenistan and Ukraine, the frequency bands 1 550-1 559 MHz, 1 610-1 645.5 MHz and 1 646.5-1 660 MHz are also allocated to the fixed service on a primary basis. Administrations are urged to make all practicable efforts to avoid the implementation of new fixed-service stations in these frequency bands. (WRC-15)', '[5.364]: The use of the band 1 610-1 626.5 MHz by the mobile-satellite service (Earth-to-space) and by the radiodetermination-satellite service (Earth-to-space) is subject to coordination under No. 9.11A. A mobile earth station operating in either of the services in this band shall not produce a peak e.i.r.p. density in excess of -15 dB(W/4 kHz) in the part of the band used by systems operating in accordance with the provisions of No. 5.366 (to which No. 4.10 applies), unless otherwise agreed by the affected administrations. In the part of the band where such systems are not operating, the mean e.i.r.p. density of a mobile earth station shall not exceed –3 dB(W/4 kHz). Stations of the mobile-satellite service shall not claim protection from stations in the aeronautical radionavigation service, stations operating in accordance with the provisions of No. 5.366 and stations in the fixed service operating in accordance with the provisions of No. 5.359. Administrations responsible for the coordination of mobile-satellite networks shall make all practicable efforts to ensure protection of stations operating in accordance with the provisions of No. 5.366.', '[5.366]: The band 1 610-1 626.5 MHz is reserved on a worldwide basis for the use and development of airborne electronic aids to air navigation and any directly associated ground-based or satellite-borne facilities. Such satellite use is subject to agreement obtained under No. 9.21.', '[5.367]: Additional allocation: The frequency band 1 610-1 626.5 MHz is also allocated to the aeronautical mobile-satellite (R) service on a primary basis, subject to agreement obtained under No. 9.21. (WRC-12)', '[5.368]: With respect to the radiodetermination-satellite and mobile-satellite services the provisions of No. 4.10 do not apply in the band 1 610-1 626.5 MHz, with the exception of the aeronautical radionavigation-satellite service.', '[5.369]: Different category of service: in Angola, Australia, China, Eritrea, Ethiopia, India, Iran (Islamic Republic of), Israel, Lebanon, Liberia, Madagascar, Mali, Pakistan, Papua New Guinea, Syrian Arab Republic, the Dem. Rep. of the Congo, Sudan, South Sudan, Togo and Zambia, the allocation of the band 1 610-1 626.5 MHz to the radiodetermination-satellite service (Earth-to-space) is on a primary basis (see No. 5.33), subject to agreement obtained under No. 9.21 from countries not listed in this provision. (WRC-12)', '[5.371]: Additional allocation: in Region 1, the band 1 610-1 626.5 MHz (Earth-to-space) is also allocated to the radiodetermination-satellite service on a secondary basis, subject to agreement obtained under No. 9.21. (WRC-12)', '[5.372]: Harmful interference shall not be caused to stations of the radio astronomy service using the band 1 610.6-1 613.8 MHz by stations of the radiodetermination-satellite and mobile-satellite services (No. 29.13 applies).']),
(1610600000, 1613800001): (False, False, False, False, False, ['Mobile-Satellite (Earth-To-Space) [5.351A]', 'Radio Astronomy', 'Aeronautical Radionavigation'], [], ['[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.355]: Additional allocation: in Bahrain, Bangladesh, Congo (Rep. of the), Djibouti, Egypt, Eritrea, Iraq, Israel, Kuwait, Qatar, Syrian Arab Republic, Somalia, Sudan, South Sudan, Chad, Togo and Yemen, the bands 1 540-1 559 MHz, 1 610-1 645.5 MHz and 1 646.5-1 660 MHz are also allocated to the fixed service on a secondary basis. (WRC-12)', '[5.359]: Additional allocation: in Germany, Saudi Arabia, Armenia, Azerbaijan, Belarus, Benin, Cameroon, the Russian Federation, France, Georgia, Guinea, Guinea-Bissau, Jordan, Kazakhstan, Kuwait, Lithuania, Mauritania, Uganda, Uzbekistan, Pakistan, Poland, the Syrian Arab Republic, Kyrgyzstan, the Dem. People’s Rep. of Korea, Romania, Tajikistan, Tunisia, Turkmenistan and Ukraine, the frequency bands 1 550-1 559 MHz, 1 610-1 645.5 MHz and 1 646.5-1 660 MHz are also allocated to the fixed service on a primary basis. Administrations are urged to make all practicable efforts to avoid the implementation of new fixed-service stations in these frequency bands. (WRC-15)', '[5.364]: The use of the band 1 610-1 626.5 MHz by the mobile-satellite service (Earth-to-space) and by the radiodetermination-satellite service (Earth-to-space) is subject to coordination under No. 9.11A. A mobile earth station operating in either of the services in this band shall not produce a peak e.i.r.p. density in excess of -15 dB(W/4 kHz) in the part of the band used by systems operating in accordance with the provisions of No. 5.366 (to which No. 4.10 applies), unless otherwise agreed by the affected administrations. In the part of the band where such systems are not operating, the mean e.i.r.p. density of a mobile earth station shall not exceed –3 dB(W/4 kHz). Stations of the mobile-satellite service shall not claim protection from stations in the aeronautical radionavigation service, stations operating in accordance with the provisions of No. 5.366 and stations in the fixed service operating in accordance with the provisions of No. 5.359. Administrations responsible for the coordination of mobile-satellite networks shall make all practicable efforts to ensure protection of stations operating in accordance with the provisions of No. 5.366.', '[5.366]: The band 1 610-1 626.5 MHz is reserved on a worldwide basis for the use and development of airborne electronic aids to air navigation and any directly associated ground-based or satellite-borne facilities. Such satellite use is subject to agreement obtained under No. 9.21.', '[5.367]: Additional allocation: The frequency band 1 610-1 626.5 MHz is also allocated to the aeronautical mobile-satellite (R) service on a primary basis, subject to agreement obtained under No. 9.21. (WRC-12)', '[5.368]: With respect to the radiodetermination-satellite and mobile-satellite services the provisions of No. 4.10 do not apply in the band 1 610-1 626.5 MHz, with the exception of the aeronautical radionavigation-satellite service.', '[5.369]: Different category of service: in Angola, Australia, China, Eritrea, Ethiopia, India, Iran (Islamic Republic of), Israel, Lebanon, Liberia, Madagascar, Mali, Pakistan, Papua New Guinea, Syrian Arab Republic, the Dem. Rep. of the Congo, Sudan, South Sudan, Togo and Zambia, the allocation of the band 1 610-1 626.5 MHz to the radiodetermination-satellite service (Earth-to-space) is on a primary basis (see No. 5.33), subject to agreement obtained under No. 9.21 from countries not listed in this provision. (WRC-12)', '[5.371]: Additional allocation: in Region 1, the band 1 610-1 626.5 MHz (Earth-to-space) is also allocated to the radiodetermination-satellite service on a secondary basis, subject to agreement obtained under No. 9.21. (WRC-12)', '[5.372]: Harmful interference shall not be caused to stations of the radio astronomy service using the band 1 610.6-1 613.8 MHz by stations of the radiodetermination-satellite and mobile-satellite services (No. 29.13 applies).']),
(1613800000, 1626500001): (False, False, False, False, False, ['Mobile-Satellite (Earth-To-Space) [5.351A]', 'Aeronautical Radionavigation'], ['Mobile-Satellite (Space-To-Earth) [5.208B]'], ['[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.355]: Additional allocation: in Bahrain, Bangladesh, Congo (Rep. of the), Djibouti, Egypt, Eritrea, Iraq, Israel, Kuwait, Qatar, Syrian Arab Republic, Somalia, Sudan, South Sudan, Chad, Togo and Yemen, the bands 1 540-1 559 MHz, 1 610-1 645.5 MHz and 1 646.5-1 660 MHz are also allocated to the fixed service on a secondary basis. (WRC-12)', '[5.359]: Additional allocation: in Germany, Saudi Arabia, Armenia, Azerbaijan, Belarus, Benin, Cameroon, the Russian Federation, France, Georgia, Guinea, Guinea-Bissau, Jordan, Kazakhstan, Kuwait, Lithuania, Mauritania, Uganda, Uzbekistan, Pakistan, Poland, the Syrian Arab Republic, Kyrgyzstan, the Dem. People’s Rep. of Korea, Romania, Tajikistan, Tunisia, Turkmenistan and Ukraine, the frequency bands 1 550-1 559 MHz, 1 610-1 645.5 MHz and 1 646.5-1 660 MHz are also allocated to the fixed service on a primary basis. Administrations are urged to make all practicable efforts to avoid the implementation of new fixed-service stations in these frequency bands. (WRC-15)', '[5.364]: The use of the band 1 610-1 626.5 MHz by the mobile-satellite service (Earth-to-space) and by the radiodetermination-satellite service (Earth-to-space) is subject to coordination under No. 9.11A. A mobile earth station operating in either of the services in this band shall not produce a peak e.i.r.p. density in excess of -15 dB(W/4 kHz) in the part of the band used by systems operating in accordance with the provisions of No. 5.366 (to which No. 4.10 applies), unless otherwise agreed by the affected administrations. In the part of the band where such systems are not operating, the mean e.i.r.p. density of a mobile earth station shall not exceed –3 dB(W/4 kHz). Stations of the mobile-satellite service shall not claim protection from stations in the aeronautical radionavigation service, stations operating in accordance with the provisions of No. 5.366 and stations in the fixed service operating in accordance with the provisions of No. 5.359. Administrations responsible for the coordination of mobile-satellite networks shall make all practicable efforts to ensure protection of stations operating in accordance with the provisions of No. 5.366.', '[5.365]: The use of the band 1 613.8-1 626.5 MHz by the mobile-satellite service (space-to-Earth) is subject to coordination under No. 9.11A.', '[5.366]: The band 1 610-1 626.5 MHz is reserved on a worldwide basis for the use and development of airborne electronic aids to air navigation and any directly associated ground-based or satellite-borne facilities. Such satellite use is subject to agreement obtained under No. 9.21.', '[5.367]: Additional allocation: The frequency band 1 610-1 626.5 MHz is also allocated to the aeronautical mobile-satellite (R) service on a primary basis, subject to agreement obtained under No. 9.21. (WRC-12)', '[5.368]: With respect to the radiodetermination-satellite and mobile-satellite services the provisions of No. 4.10 do not apply in the band 1 610-1 626.5 MHz, with the exception of the aeronautical radionavigation-satellite service.', '[5.369]: Different category of service: in Angola, Australia, China, Eritrea, Ethiopia, India, Iran (Islamic Republic of), Israel, Lebanon, Liberia, Madagascar, Mali, Pakistan, Papua New Guinea, Syrian Arab Republic, the Dem. Rep. of the Congo, Sudan, South Sudan, Togo and Zambia, the allocation of the band 1 610-1 626.5 MHz to the radiodetermination-satellite service (Earth-to-space) is on a primary basis (see No. 5.33), subject to agreement obtained under No. 9.21 from countries not listed in this provision. (WRC-12)', '[5.371]: Additional allocation: in Region 1, the band 1 610-1 626.5 MHz (Earth-to-space) is also allocated to the radiodetermination-satellite service on a secondary basis, subject to agreement obtained under No. 9.21. (WRC-12)', '[5.372]: Harmful interference shall not be caused to stations of the radio astronomy service using the band 1 610.6-1 613.8 MHz by stations of the radiodetermination-satellite and mobile-satellite services (No. 29.13 applies).']),
(1626500000, 1660000001): (False, False, False, False, False, ['Mobile-Satellite (Earth-To-Space) [5.351A]'], [], ['[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.351]: The bands 1 525-1 544 MHz, 1 545-1 559 MHz, 1 626.5-1 645.5 MHz and 1 646.5-1 660.5 MHz shall not be used for feeder links of any service. In exceptional circumstances, however, an earth station at a specified fixed point in any of the mobile-satellite services may be authorized by an administration to communicate via space stations using these bands.', '[5.353A]: In applying the procedures of Section II of Article 9 to the mobile-satellite service in the bands 1 530-1 544 MHz and 1 626.5-1 645.5 MHz, priority shall be given to accommodating the spectrum requirements for distress, urgency and safety communications of the Global Maritime Distress and Safety System (GMDSS). Maritime mobile-satellite distress, urgency and safety communications shall have priority access and immediate availability over all other mobile satellite communications operating within a network. Mobile-satellite systems shall not cause unacceptable interference to, or claim protection from, distress, urgency and safety communications of the GMDSS. Account shall be taken of the priority of safety-related communications in the other mobile-satellite services. (The provisions of Resolution 222 (WRC-2000)* shall apply.) (WRC-2000)', '[5.354]: The use of the bands 1 525-1 559 MHz and 1 626.5-1 660.5 MHz by the mobile-satellite services is subject to coordination under No. 9.11A.', '[5.355]: Additional allocation: in Bahrain, Bangladesh, Congo (Rep. of the), Djibouti, Egypt, Eritrea, Iraq, Israel, Kuwait, Qatar, Syrian Arab Republic, Somalia, Sudan, South Sudan, Chad, Togo and Yemen, the bands 1 540-1 559 MHz, 1 610-1 645.5 MHz and 1 646.5-1 660 MHz are also allocated to the fixed service on a secondary basis. (WRC-12)', '[5.357A]: In applying the procedures of Section II of Article 9 to the mobile-satellite service in the frequency bands 1 545-1 555 MHz and 1 646.5-1 656.5 MHz, priority shall be given to accommodating the spectrum requirements of the aeronautical mobile-satellite (R) service providing transmission of messages with priority 1 to 6 in Article 44. Aeronautical mobile-satellite (R) service communications with priority 1 to 6 in Article 44 shall have priority access and immediate availability, by pre-emption if necessary, over all other mobile-satellite communications operating within a network. Mobile-satellite systems shall not cause unacceptable interference to, or claim protection from, aeronautical mobile-satellite (R) service communications with priority 1 to 6 in Article 44. Account shall be taken of the priority of safety-related communications in the other mobile-satellite services. (The provisions of Resolution 222 (Rev.WRC-12)* shall apply.) (WRC-12)', '[5.359]: Additional allocation: in Germany, Saudi Arabia, Armenia, Azerbaijan, Belarus, Benin, Cameroon, the Russian Federation, France, Georgia, Guinea, Guinea-Bissau, Jordan, Kazakhstan, Kuwait, Lithuania, Mauritania, Uganda, Uzbekistan, Pakistan, Poland, the Syrian Arab Republic, Kyrgyzstan, the Dem. People’s Rep. of Korea, Romania, Tajikistan, Tunisia, Turkmenistan and Ukraine, the frequency bands 1 550-1 559 MHz, 1 610-1 645.5 MHz and 1 646.5-1 660 MHz are also allocated to the fixed service on a primary basis. Administrations are urged to make all practicable efforts to avoid the implementation of new fixed-service stations in these frequency bands. (WRC-15)', '[5.362A]: In the United States, in the bands 1 555-1 559 MHz and 1 656.5-1 660.5 MHz, the aeronautical mobile-satellite (R) service shall have priority access and immediate availability, by pre-emption if necessary, over all other mobile-satellite communications operating within a network. Mobile-satellite systems shall not cause unacceptable interference to, or claim protection from, aeronautical mobile-satellite (R) service communications with priority 1 to 6 in Article 44. Account shall be taken of the priority of safety-related communications in the other mobile-satellite services. (WRC-97)', '[5.374]: Mobile earth stations in the mobile-satellite service operating in the bands 1 631.5-1 634.5 MHz and 1 656.5-1 660 MHz shall not cause harmful interference to stations in the fixed service operating in the countries listed in No. 5.359. (WRC-97)', '[5.375]: The use of the band 1 645.5-1 646.5 MHz by the mobile-satellite service (Earth-to-space) and for inter-satellite links is limited to distress and safety communications (see Article 31).', '[5.376]: Transmissions in the band 1 646.5-1 656.5 MHz from aircraft stations in the aeronautical mobile (R) service directly to terrestrial aeronautical stations, or between aircraft stations, are also authorized when such transmissions are used to extend or supplement the aircraft-to-satellite links.']),
(1660000000, 1660500001): (False, False, False, False, False, ['Mobile-Satellite (Earth-To-Space) [5.351A]', 'Radio Astronomy'], [], ['[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.351]: The bands 1 525-1 544 MHz, 1 545-1 559 MHz, 1 626.5-1 645.5 MHz and 1 646.5-1 660.5 MHz shall not be used for feeder links of any service. In exceptional circumstances, however, an earth station at a specified fixed point in any of the mobile-satellite services may be authorized by an administration to communicate via space stations using these bands.', '[5.354]: The use of the bands 1 525-1 559 MHz and 1 626.5-1 660.5 MHz by the mobile-satellite services is subject to coordination under No. 9.11A.', '[5.362A]: In the United States, in the bands 1 555-1 559 MHz and 1 656.5-1 660.5 MHz, the aeronautical mobile-satellite (R) service shall have priority access and immediate availability, by pre-emption if necessary, over all other mobile-satellite communications operating within a network. Mobile-satellite systems shall not cause unacceptable interference to, or claim protection from, aeronautical mobile-satellite (R) service communications with priority 1 to 6 in Article 44. Account shall be taken of the priority of safety-related communications in the other mobile-satellite services. (WRC-97)', '[5.376A]: Mobile earth stations operating in the band 1 660-1 660.5 MHz shall not cause harmful interference to stations in the radio astronomy service. (WRC-97)']),
(1660500000, 1668000001): (False, True, True, False, False, ['Radio Astronomy', 'Space Research (Passive)'], ['Mobile Except Aeronautical Mobile'], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.379]: Additional allocation: in Bangladesh, India, Indonesia, Nigeria and Pakistan, the band 1 660.5-1 668.4 MHz is also allocated to the meteorological aids service on a secondary basis.', '[5.379A]: Administrations are urged to give all practicable protection in the band 1 660.5-1 668.4 MHz for future research in radio astronomy, particularly by eliminating air-to-ground transmissions in the meteorological aids service in the band 1 664.4-1 668.4 MHz as soon as practicable.']),
(1668000000, 1668400001): (False, True, True, False, False, ['Mobile-Satellite (Earth-To-Space) [5.351A][5.379B][5.379C]', 'Radio Astronomy', 'Space Research (Passive)'], ['Mobile Except Aeronautical Mobile'], ['[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.379B]: The use of the band 1 668-1 675 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. In the band 1 668-1 668.4 MHz, Resolution 904 (WRC-07) shall apply. (WRC-07)', '[5.379C]: In order to protect the radio astronomy service in the band 1 668-1 670 MHz, the aggregate power flux-density values produced by mobile earth stations in a network of the mobile-satellite service operating in this band shall not exceed –181 dB(W/m2) in 10 MHz and -194 dB(W/m2) in any 20 kHz at any radio astronomy station recorded in the Master International Frequency Register, for more than 2% of integration periods of 2 000 s. (WRC-03)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.379]: Additional allocation: in Bangladesh, India, Indonesia, Nigeria and Pakistan, the band 1 660.5-1 668.4 MHz is also allocated to the meteorological aids service on a secondary basis.', '[5.379A]: Administrations are urged to give all practicable protection in the band 1 660.5-1 668.4 MHz for future research in radio astronomy, particularly by eliminating air-to-ground transmissions in the meteorological aids service in the band 1 664.4-1 668.4 MHz as soon as practicable.']),
(1668400000, 1670000001): (False, True, True, False, False, ['Meteorological Aids', 'Mobile Except Aeronautical Mobile', 'Mobile-Satellite (Earth-To-Space) [5.351A][5.379B][5.379C]', 'Radio Astronomy'], [], ['[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.379B]: The use of the band 1 668-1 675 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. In the band 1 668-1 668.4 MHz, Resolution 904 (WRC-07) shall apply. (WRC-07)', '[5.379C]: In order to protect the radio astronomy service in the band 1 668-1 670 MHz, the aggregate power flux-density values produced by mobile earth stations in a network of the mobile-satellite service operating in this band shall not exceed –181 dB(W/m2) in 10 MHz and -194 dB(W/m2) in any 20 kHz at any radio astronomy station recorded in the Master International Frequency Register, for more than 2% of integration periods of 2 000 s. (WRC-03)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.379D]: For sharing of the band 1 668.4-1 675 MHz between the mobile-satellite service and the fixed and mobile services, Resolution 744 (Rev.WRC-07) shall apply. (WRC-07)', '[5.379E]: In the band 1 668.4-1 675 MHz, stations in the mobile-satellite service shall not cause harmful interference to stations in the meteorological aids service in China, Iran (Islamic Republic of), Japan and Uzbekistan. In the band 1 668.4-1 675 MHz, administrations are urged not to implement new systems in the meteorological aids service and are encouraged to migrate existing meteorological aids service operations to other bands as soon as practicable. (WRC-03)']),
(1670000000, 1675000001): (False, True, True, False, False, ['Meteorological Aids', 'Meteorological-Satellite (Space-To-Earth)', 'Mobile-Satellite (Earth-To-Space) [5.351A][5.379B]'], [], ['[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.379B]: The use of the band 1 668-1 675 MHz by the mobile-satellite service is subject to coordination under No. 9.11A. In the band 1 668-1 668.4 MHz, Resolution 904 (WRC-07) shall apply. (WRC-07)', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.379D]: For sharing of the band 1 668.4-1 675 MHz between the mobile-satellite service and the fixed and mobile services, Resolution 744 (Rev.WRC-07) shall apply. (WRC-07)', '[5.379E]: In the band 1 668.4-1 675 MHz, stations in the mobile-satellite service shall not cause harmful interference to stations in the meteorological aids service in China, Iran (Islamic Republic of), Japan and Uzbekistan. In the band 1 668.4-1 675 MHz, administrations are urged not to implement new systems in the meteorological aids service and are encouraged to migrate existing meteorological aids service operations to other bands as soon as practicable. (WRC-03)', '[5.380A]: In the band 1 670-1 675 MHz, stations in the mobile-satellite service shall not cause harmful interference to, nor constrain the development of, existing earth stations in the meteorological-satellite service notified before 1 January 2004. Any new assignment to these earth stations in this band shall also be protected from harmful interference from stations in the mobile-satellite service. (WRC-07)']),
(1675000000, 1690000001): (False, True, True, False, False, ['Meteorological Aids', 'Meteorological-Satellite (Space-To-Earth)', 'Mobile Except Aeronautical Mobile'], [], ['[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(1690000000, 1700000001): (False, True, True, False, False, ['Meteorological Aids', 'Meteorological-Satellite (Space-To-Earth)'], ['Mobile Except Aeronautical Mobile'], ['[5.289]: Earth exploration-satellite service applications, other than the meteorological-satellite service, may also be used in the bands 460-470 MHz and 1 690-1 710 MHz for space-to-Earth transmissions subject to not causing harmful interference to stations operating in accordance with the Table.', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.382]: Different category of service: in Saudi Arabia, Armenia, Azerbaijan, Bahrain, Belarus, Congo (Rep. of the), Egypt, the United Arab Emirates, Eritrea, Ethiopia, the Russian Federation, Guinea, Iraq, Israel, Jordan, Kazakhstan, Kuwait, the Former Yugoslav Republic of Macedonia, Lebanon, Mauritania, Moldova, Mongolia, Oman, Uzbekistan, Poland, Qatar, the Syrian Arab Republic, Kyrgyzstan, Somalia, Tajikistan, Turkmenistan, Ukraine and Yemen, the allocation of the frequency band 1 690-1 700 MHz to the fixed and mobile, except aeronautical mobile, services is on a primary basis (see No. 5.33), and in the Dem. People’s Rep. of Korea, the allocation of the frequency band 1 690-1 700 MHz to the fixed service is on a primary basis (see No. 5.33) and to the mobile, except aeronautical mobile, service on a secondary basis. (WRC-15)']),
(1700000000, 1710000001): (False, True, True, False, False, ['Meteorological-Satellite (Space-To-Earth)', 'Mobile Except Aeronautical Mobile'], [], ['[5.289]: Earth exploration-satellite service applications, other than the meteorological-satellite service, may also be used in the bands 460-470 MHz and 1 690-1 710 MHz for space-to-Earth transmissions subject to not causing harmful interference to stations operating in accordance with the Table.', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(1710000000, 1930000001): (False, True, True, False, False, ['Mobile [5.384A][5.388A][5.388B]'], [], ['[5.384A]: The frequency bands 1 710-1 885 MHz, 2 300-2 400 MHz and 2 500-2 690 MHz, or portions thereof, are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) in accordance with Resolution 223 (Rev.WRC-15). This identification does not preclude the use of these frequency bands by any application of the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.388A]: In Regions 1 and 3, the bands 1 885-1 980 MHz, 2 010-2 025 MHz and 2 110-2 170 MHz and, in Region 2, the bands 1 885-1 980 MHz and 2 110-2 160 MHz may be used by high altitude platform stations as base stations to provide International Mobile Telecommunications (IMT), in accordance with Resolution 221 (Rev.WRC-07). Their use by IMT applications using high altitude platform stations as base stations does not preclude the use of these bands by any station in the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-12)', '[5.388B]: In Algeria, Saudi Arabia, Bahrain, Benin, Burkina Faso, Cameroon, Comoros, Côte d’Ivoire, China, Cuba, Djibouti, Egypt, United Arab Emirates, Eritrea, Ethiopia, Gabon, Ghana, India, Iran (Islamic Republic of), Israel, Jordan, Kenya, Kuwait, Libya, Mali, Morocco, Mauritania, Nigeria, Oman, Uganda, Pakistan, Qatar, the Syrian Arab Republic, Senegal, Singapore, Sudan, South Sudan, Tanzania, Chad, Togo, Tunisia, Yemen, Zambia and Zimbabwe, for the purpose of protecting fixed and mobile services, including IMT mobile stations, in their territories from co-channel interference, a high altitude platform station (HAPS) operating as an IMT base station in neighbouring countries, in the bands referred to in No. 5.388A, shall not exceed a co-channel power flux-density of −127 dB(W/(m2 · MHz)) at the Earth’s surface outside a country’s borders unless explicit agreement of the affected administration is provided at the time of the notification of HAPS. (WRC-12)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.385]: Additional allocation: the band 1 718.8-1 722.2 MHz is also allocated to the radio astronomy service on a secondary basis for spectral line observations. (WRC-2000)', '[5.386]: Additional allocation: the frequency band 1 750-1 850 MHz is also allocated to the space operation (Earth-to-space) and space research (Earth-to-space) services in Region 2 (except in Mexico), in Australia, Guam, India, Indonesia and Japan on a primary basis, subject to agreement obtained under No. 9.21, having particular regard to troposcatter systems. (WRC-15)', '[5.387]: Additional allocation: in Belarus, Georgia, Kazakhstan, Kyrgyzstan, Romania, Tajikistan and Turkmenistan, the band 1 770-1 790 MHz is also allocated to the meteorological-satellite service on a primary basis, subject to agreement obtained under No. 9.21. (WRC-12)', '[5.388]: The frequency bands 1 885-2 025 MHz and 2 110-2 200 MHz are intended for use, on a worldwide basis, by administrations wishing to implement International Mobile Telecommunications (IMT). Such use does not preclude the use of these frequency bands by other services to which they are allocated. The frequency bands should be made available for IMT in accordance with Resolution 212 (Rev.WRC-15) (see also Resolution 223 (Rev.WRC-15)). (WRC-15)']),
(1930000000, 1970000001): (False, True, True, False, False, ['Mobile [5.388A][5.388B]'], [], ['[5.388A]: In Regions 1 and 3, the bands 1 885-1 980 MHz, 2 010-2 025 MHz and 2 110-2 170 MHz and, in Region 2, the bands 1 885-1 980 MHz and 2 110-2 160 MHz may be used by high altitude platform stations as base stations to provide International Mobile Telecommunications (IMT), in accordance with Resolution 221 (Rev.WRC-07). Their use by IMT applications using high altitude platform stations as base stations does not preclude the use of these bands by any station in the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-12)', '[5.388B]: In Algeria, Saudi Arabia, Bahrain, Benin, Burkina Faso, Cameroon, Comoros, Côte d’Ivoire, China, Cuba, Djibouti, Egypt, United Arab Emirates, Eritrea, Ethiopia, Gabon, Ghana, India, Iran (Islamic Republic of), Israel, Jordan, Kenya, Kuwait, Libya, Mali, Morocco, Mauritania, Nigeria, Oman, Uganda, Pakistan, Qatar, the Syrian Arab Republic, Senegal, Singapore, Sudan, South Sudan, Tanzania, Chad, Togo, Tunisia, Yemen, Zambia and Zimbabwe, for the purpose of protecting fixed and mobile services, including IMT mobile stations, in their territories from co-channel interference, a high altitude platform station (HAPS) operating as an IMT base station in neighbouring countries, in the bands referred to in No. 5.388A, shall not exceed a co-channel power flux-density of −127 dB(W/(m2 · MHz)) at the Earth’s surface outside a country’s borders unless explicit agreement of the affected administration is provided at the time of the notification of HAPS. (WRC-12)', '[5.388]: The frequency bands 1 885-2 025 MHz and 2 110-2 200 MHz are intended for use, on a worldwide basis, by administrations wishing to implement International Mobile Telecommunications (IMT). Such use does not preclude the use of these frequency bands by other services to which they are allocated. The frequency bands should be made available for IMT in accordance with Resolution 212 (Rev.WRC-15) (see also Resolution 223 (Rev.WRC-15)). (WRC-15)']),
(1970000000, 1980000001): (False, True, True, False, False, ['Mobile [5.388A][5.388B]'], [], ['[5.388A]: In Regions 1 and 3, the bands 1 885-1 980 MHz, 2 010-2 025 MHz and 2 110-2 170 MHz and, in Region 2, the bands 1 885-1 980 MHz and 2 110-2 160 MHz may be used by high altitude platform stations as base stations to provide International Mobile Telecommunications (IMT), in accordance with Resolution 221 (Rev.WRC-07). Their use by IMT applications using high altitude platform stations as base stations does not preclude the use of these bands by any station in the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-12)', '[5.388B]: In Algeria, Saudi Arabia, Bahrain, Benin, Burkina Faso, Cameroon, Comoros, Côte d’Ivoire, China, Cuba, Djibouti, Egypt, United Arab Emirates, Eritrea, Ethiopia, Gabon, Ghana, India, Iran (Islamic Republic of), Israel, Jordan, Kenya, Kuwait, Libya, Mali, Morocco, Mauritania, Nigeria, Oman, Uganda, Pakistan, Qatar, the Syrian Arab Republic, Senegal, Singapore, Sudan, South Sudan, Tanzania, Chad, Togo, Tunisia, Yemen, Zambia and Zimbabwe, for the purpose of protecting fixed and mobile services, including IMT mobile stations, in their territories from co-channel interference, a high altitude platform station (HAPS) operating as an IMT base station in neighbouring countries, in the bands referred to in No. 5.388A, shall not exceed a co-channel power flux-density of −127 dB(W/(m2 · MHz)) at the Earth’s surface outside a country’s borders unless explicit agreement of the affected administration is provided at the time of the notification of HAPS. (WRC-12)', '[5.388]: The frequency bands 1 885-2 025 MHz and 2 110-2 200 MHz are intended for use, on a worldwide basis, by administrations wishing to implement International Mobile Telecommunications (IMT). Such use does not preclude the use of these frequency bands by other services to which they are allocated. The frequency bands should be made available for IMT in accordance with Resolution 212 (Rev.WRC-15) (see also Resolution 223 (Rev.WRC-15)). (WRC-15)']),
(1980000000, 2010000001): (False, True, True, False, False, ['Mobile-Satellite (Earth-To-Space) [5.351A]'], [], ['[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.388]: The frequency bands 1 885-2 025 MHz and 2 110-2 200 MHz are intended for use, on a worldwide basis, by administrations wishing to implement International Mobile Telecommunications (IMT). Such use does not preclude the use of these frequency bands by other services to which they are allocated. The frequency bands should be made available for IMT in accordance with Resolution 212 (Rev.WRC-15) (see also Resolution 223 (Rev.WRC-15)). (WRC-15)', '[5.389A]: The use of the bands 1 980-2 010 MHz and 2 170-2 200 MHz by the mobile-satellite service is subject to coordination under No. 9.11A and to the provisions of Resolution 716 (Rev.WRC-2000)*. (WRC-07)', '[5.389B]: The use of the band 1 980-1 990 MHz by the mobile-satellite service shall not cause harmful interference to or constrain the development of the fixed and mobile services in Argentina, Brazil, Canada, Chile, Ecuador, the United States, Honduras, Jamaica, Mexico, Peru, Suriname, Trinidad and Tobago, Uruguay and Venezuela.', '[5.389F]: In Algeria, Benin, Cape Verde, Egypt, Iran (Islamic Republic of), Mali, Syrian Arab Republic and Tunisia, the use of the bands 1 980-2 010 MHz and 2 170-2 200 MHz by the mobile-satellite service shall neither cause harmful interference to the fixed and mobile services, nor hamper the development of those services prior to 1 January 2005, nor shall the former service request protection from the latter services. (WRC-2000)']),
(2010000000, 2025000001): (False, True, True, False, False, ['Mobile [5.388A][5.388B]'], [], ['[5.388A]: In Regions 1 and 3, the bands 1 885-1 980 MHz, 2 010-2 025 MHz and 2 110-2 170 MHz and, in Region 2, the bands 1 885-1 980 MHz and 2 110-2 160 MHz may be used by high altitude platform stations as base stations to provide International Mobile Telecommunications (IMT), in accordance with Resolution 221 (Rev.WRC-07). Their use by IMT applications using high altitude platform stations as base stations does not preclude the use of these bands by any station in the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-12)', '[5.388B]: In Algeria, Saudi Arabia, Bahrain, Benin, Burkina Faso, Cameroon, Comoros, Côte d’Ivoire, China, Cuba, Djibouti, Egypt, United Arab Emirates, Eritrea, Ethiopia, Gabon, Ghana, India, Iran (Islamic Republic of), Israel, Jordan, Kenya, Kuwait, Libya, Mali, Morocco, Mauritania, Nigeria, Oman, Uganda, Pakistan, Qatar, the Syrian Arab Republic, Senegal, Singapore, Sudan, South Sudan, Tanzania, Chad, Togo, Tunisia, Yemen, Zambia and Zimbabwe, for the purpose of protecting fixed and mobile services, including IMT mobile stations, in their territories from co-channel interference, a high altitude platform station (HAPS) operating as an IMT base station in neighbouring countries, in the bands referred to in No. 5.388A, shall not exceed a co-channel power flux-density of −127 dB(W/(m2 · MHz)) at the Earth’s surface outside a country’s borders unless explicit agreement of the affected administration is provided at the time of the notification of HAPS. (WRC-12)', '[5.388]: The frequency bands 1 885-2 025 MHz and 2 110-2 200 MHz are intended for use, on a worldwide basis, by administrations wishing to implement International Mobile Telecommunications (IMT). Such use does not preclude the use of these frequency bands by other services to which they are allocated. The frequency bands should be made available for IMT in accordance with Resolution 212 (Rev.WRC-15) (see also Resolution 223 (Rev.WRC-15)). (WRC-15)']),
(2025000000, 2110000001): (False, True, True, False, False, ['Space Operation (Earth-To-Space)', 'Space Operation (Space-To-Space)', 'Earth Exploration-Satellite (Earth-To-Space)', 'Earth Exploration-Satellite (Space-To-Space)', 'Mobile [5.391]', 'Space Research (Earth-To-Space)', 'Space Research (Space-To-Space)'], [], ['[5.391]: In making assignments to the mobile service in the frequency bands 2 025-2 110 MHz and 2 200-2 290 MHz, administrations shall not introduce high-density mobile systems, as described in Recommendation ITU-R SA.1154-0, and shall take that Recommendation into account for the introduction of any other type of mobile system. (WRC-15)', '[5.392]: Administrations are urged to take all practicable measures to ensure that space-to-space transmissions between two or more non-geostationary satellites, in the space research, space operations and Earth exploration-satellite services in the bands 2 025-2 110 MHz and 2 200-2 290 MHz, shall not impose any constraints on Earth-to-space, space-to-Earth and other space-to-space transmissions of those services and in those bands between geostationary and non-geostationary satellites.']),
(2110000000, 2120000001): (False, True, True, False, False, ['Mobile [5.388A][5.388B]', 'Space Research (Deep Space)', 'Space Research (Earth-To-Space)'], [], ['[5.388A]: In Regions 1 and 3, the bands 1 885-1 980 MHz, 2 010-2 025 MHz and 2 110-2 170 MHz and, in Region 2, the bands 1 885-1 980 MHz and 2 110-2 160 MHz may be used by high altitude platform stations as base stations to provide International Mobile Telecommunications (IMT), in accordance with Resolution 221 (Rev.WRC-07). Their use by IMT applications using high altitude platform stations as base stations does not preclude the use of these bands by any station in the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-12)', '[5.388B]: In Algeria, Saudi Arabia, Bahrain, Benin, Burkina Faso, Cameroon, Comoros, Côte d’Ivoire, China, Cuba, Djibouti, Egypt, United Arab Emirates, Eritrea, Ethiopia, Gabon, Ghana, India, Iran (Islamic Republic of), Israel, Jordan, Kenya, Kuwait, Libya, Mali, Morocco, Mauritania, Nigeria, Oman, Uganda, Pakistan, Qatar, the Syrian Arab Republic, Senegal, Singapore, Sudan, South Sudan, Tanzania, Chad, Togo, Tunisia, Yemen, Zambia and Zimbabwe, for the purpose of protecting fixed and mobile services, including IMT mobile stations, in their territories from co-channel interference, a high altitude platform station (HAPS) operating as an IMT base station in neighbouring countries, in the bands referred to in No. 5.388A, shall not exceed a co-channel power flux-density of −127 dB(W/(m2 · MHz)) at the Earth’s surface outside a country’s borders unless explicit agreement of the affected administration is provided at the time of the notification of HAPS. (WRC-12)', '[5.388]: The frequency bands 1 885-2 025 MHz and 2 110-2 200 MHz are intended for use, on a worldwide basis, by administrations wishing to implement International Mobile Telecommunications (IMT). Such use does not preclude the use of these frequency bands by other services to which they are allocated. The frequency bands should be made available for IMT in accordance with Resolution 212 (Rev.WRC-15) (see also Resolution 223 (Rev.WRC-15)). (WRC-15)']),
(2120000000, 2160000001): (False, True, True, False, False, ['Mobile [5.388A][5.388B]'], [], ['[5.388A]: In Regions 1 and 3, the bands 1 885-1 980 MHz, 2 010-2 025 MHz and 2 110-2 170 MHz and, in Region 2, the bands 1 885-1 980 MHz and 2 110-2 160 MHz may be used by high altitude platform stations as base stations to provide International Mobile Telecommunications (IMT), in accordance with Resolution 221 (Rev.WRC-07). Their use by IMT applications using high altitude platform stations as base stations does not preclude the use of these bands by any station in the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-12)', '[5.388B]: In Algeria, Saudi Arabia, Bahrain, Benin, Burkina Faso, Cameroon, Comoros, Côte d’Ivoire, China, Cuba, Djibouti, Egypt, United Arab Emirates, Eritrea, Ethiopia, Gabon, Ghana, India, Iran (Islamic Republic of), Israel, Jordan, Kenya, Kuwait, Libya, Mali, Morocco, Mauritania, Nigeria, Oman, Uganda, Pakistan, Qatar, the Syrian Arab Republic, Senegal, Singapore, Sudan, South Sudan, Tanzania, Chad, Togo, Tunisia, Yemen, Zambia and Zimbabwe, for the purpose of protecting fixed and mobile services, including IMT mobile stations, in their territories from co-channel interference, a high altitude platform station (HAPS) operating as an IMT base station in neighbouring countries, in the bands referred to in No. 5.388A, shall not exceed a co-channel power flux-density of −127 dB(W/(m2 · MHz)) at the Earth’s surface outside a country’s borders unless explicit agreement of the affected administration is provided at the time of the notification of HAPS. (WRC-12)', '[5.388]: The frequency bands 1 885-2 025 MHz and 2 110-2 200 MHz are intended for use, on a worldwide basis, by administrations wishing to implement International Mobile Telecommunications (IMT). Such use does not preclude the use of these frequency bands by other services to which they are allocated. The frequency bands should be made available for IMT in accordance with Resolution 212 (Rev.WRC-15) (see also Resolution 223 (Rev.WRC-15)). (WRC-15)']),
(2160000000, 2170000001): (False, True, True, False, False, ['Mobile [5.388A][5.388B]'], [], ['[5.388A]: In Regions 1 and 3, the bands 1 885-1 980 MHz, 2 010-2 025 MHz and 2 110-2 170 MHz and, in Region 2, the bands 1 885-1 980 MHz and 2 110-2 160 MHz may be used by high altitude platform stations as base stations to provide International Mobile Telecommunications (IMT), in accordance with Resolution 221 (Rev.WRC-07). Their use by IMT applications using high altitude platform stations as base stations does not preclude the use of these bands by any station in the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-12)', '[5.388B]: In Algeria, Saudi Arabia, Bahrain, Benin, Burkina Faso, Cameroon, Comoros, Côte d’Ivoire, China, Cuba, Djibouti, Egypt, United Arab Emirates, Eritrea, Ethiopia, Gabon, Ghana, India, Iran (Islamic Republic of), Israel, Jordan, Kenya, Kuwait, Libya, Mali, Morocco, Mauritania, Nigeria, Oman, Uganda, Pakistan, Qatar, the Syrian Arab Republic, Senegal, Singapore, Sudan, South Sudan, Tanzania, Chad, Togo, Tunisia, Yemen, Zambia and Zimbabwe, for the purpose of protecting fixed and mobile services, including IMT mobile stations, in their territories from co-channel interference, a high altitude platform station (HAPS) operating as an IMT base station in neighbouring countries, in the bands referred to in No. 5.388A, shall not exceed a co-channel power flux-density of −127 dB(W/(m2 · MHz)) at the Earth’s surface outside a country’s borders unless explicit agreement of the affected administration is provided at the time of the notification of HAPS. (WRC-12)', '[5.388]: The frequency bands 1 885-2 025 MHz and 2 110-2 200 MHz are intended for use, on a worldwide basis, by administrations wishing to implement International Mobile Telecommunications (IMT). Such use does not preclude the use of these frequency bands by other services to which they are allocated. The frequency bands should be made available for IMT in accordance with Resolution 212 (Rev.WRC-15) (see also Resolution 223 (Rev.WRC-15)). (WRC-15)']),
(2170000000, 2200000001): (False, True, True, False, False, ['Mobile-Satellite (Space-To-Earth) [5.351A]'], [], ['[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.388]: The frequency bands 1 885-2 025 MHz and 2 110-2 200 MHz are intended for use, on a worldwide basis, by administrations wishing to implement International Mobile Telecommunications (IMT). Such use does not preclude the use of these frequency bands by other services to which they are allocated. The frequency bands should be made available for IMT in accordance with Resolution 212 (Rev.WRC-15) (see also Resolution 223 (Rev.WRC-15)). (WRC-15)', '[5.389A]: The use of the bands 1 980-2 010 MHz and 2 170-2 200 MHz by the mobile-satellite service is subject to coordination under No. 9.11A and to the provisions of Resolution 716 (Rev.WRC-2000)*. (WRC-07)', '[5.389F]: In Algeria, Benin, Cape Verde, Egypt, Iran (Islamic Republic of), Mali, Syrian Arab Republic and Tunisia, the use of the bands 1 980-2 010 MHz and 2 170-2 200 MHz by the mobile-satellite service shall neither cause harmful interference to the fixed and mobile services, nor hamper the development of those services prior to 1 January 2005, nor shall the former service request protection from the latter services. (WRC-2000)']),
(2200000000, 2290000001): (False, True, True, False, False, ['Space Operation (Space-To-Earth)', 'Space Operation (Space-To-Space)', 'Earth Exploration-Satellite (Space-To-Earth)', 'Earth Exploration-Satellite (Space-To-Space)', 'Mobile [5.391]', 'Space Research (Space-To-Earth)', 'Space Research (Space-To-Space)'], [], ['[5.391]: In making assignments to the mobile service in the frequency bands 2 025-2 110 MHz and 2 200-2 290 MHz, administrations shall not introduce high-density mobile systems, as described in Recommendation ITU-R SA.1154-0, and shall take that Recommendation into account for the introduction of any other type of mobile system. (WRC-15)', '[5.392]: Administrations are urged to take all practicable measures to ensure that space-to-space transmissions between two or more non-geostationary satellites, in the space research, space operations and Earth exploration-satellite services in the bands 2 025-2 110 MHz and 2 200-2 290 MHz, shall not impose any constraints on Earth-to-space, space-to-Earth and other space-to-space transmissions of those services and in those bands between geostationary and non-geostationary satellites.']),
(2290000000, 2300000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile', 'Space Research (Deep Space)', 'Space Research (Space-To-Earth)'], [], []),
(2300000000, 2450000001): (True, True, True, False, False, ['Mobile [5.384A]'], ['Amateur', 'Radiolocation'], ['[5.384A]: The frequency bands 1 710-1 885 MHz, 2 300-2 400 MHz and 2 500-2 690 MHz, or portions thereof, are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) in accordance with Resolution 223 (Rev.WRC-15). This identification does not preclude the use of these frequency bands by any application of the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.150]: The following bands:13 553-13 567 kHz (centre frequency 13 560 kHz), 26 957-27 283 kHz (centre frequency 27 120 kHz), 40.66-40.70 MHz (centre frequency 40.68 MHz), 902-928 MHz in Region 2 (centre frequency 915 MHz), 2 400-2 500 MHz (centre frequency 2 450 MHz), 5 725-5 875 MHz (centre frequency 5 800 MHz), and 24-24.25 GHz (centre frequency 24.125 GHz) are also designated for industrial, scientific and medical (ISM) applications. Radiocommunication services operating within these bands must accept harmful interference which may be caused by these applications. ISM equipment operating in these bands is subject to the provisions of No. 15.13. ', '[5.282]: In the bands 435-438 MHz, 1 260-1 270 MHz, 2 400-2 450 MHz, 3 400-3 410 MHz (in Regions 2 and 3 only) and 5 650-5 670 MHz, the amateur-satellite service may operate subject to not causing harmful interference to other services operating in accordance with the Table (see No. 5.43). Administrations authorizing such use shall ensure that any harmful interference caused by emissions from a station in the amateur-satellite service is immediately eliminated in accordance with the provisions of No. 25.11. The use of the bands 1 260-1 270 MHz and 5 650-5 670 MHz by the amateur-satellite service is limited to the Earth-to-space direction.', '[5.395]: In France and Turkey, the use of the band 2 310-2 360 MHz by the aeronautical mobile service for telemetry has priority over other uses by the mobile service. (WRC-03)']),
(2450000000, 2483500001): (False, True, True, False, False, [], ['Radiolocation'], ['[5.150]: The following bands:13 553-13 567 kHz (centre frequency 13 560 kHz), 26 957-27 283 kHz (centre frequency 27 120 kHz), 40.66-40.70 MHz (centre frequency 40.68 MHz), 902-928 MHz in Region 2 (centre frequency 915 MHz), 2 400-2 500 MHz (centre frequency 2 450 MHz), 5 725-5 875 MHz (centre frequency 5 800 MHz), and 24-24.25 GHz (centre frequency 24.125 GHz) are also designated for industrial, scientific and medical (ISM) applications. Radiocommunication services operating within these bands must accept harmful interference which may be caused by these applications. ISM equipment operating in these bands is subject to the provisions of No. 15.13.']),
(2483500000, 2500000001): (False, True, True, False, True, ['Mobile-Satellite (Space-To-Earth) [5.351A]', 'Radiodetermination- Satellite (Space-To-Earth) [5.398]'], ['Radiolocation [5.398A]'], ['[5.351A]: For the use of the bands 1 518-1 544 MHz, 1 545-1 559 MHz, 1 610-1 645.5 MHz, 1 646.5-1 660.5 MHz, 1 668-1 675 MHz, 1 980-2 010 MHz, 2 170-2 200 MHz, 2 483.5-2 520 MHz and 2 670-2 690 MHz by the mobile-satellite service, see Resolutions 212 (Rev.WRC-07)* and 225 (Rev.WRC-07)**. (WRC-07)', '[5.398]: In respect of the radiodetermination-satellite service in the band 2 483.5-2 500 MHz, the provisions of No. 4.10 do not apply.', '[5.398A]: Different category of service: in Armenia, Azerbaijan, Belarus, the Russian Federation, Kazakhstan, Uzbekistan, Kyrgyzstan, Tajikistan and Ukraine, the band 2 483.5-2 500 MHz is allocated on a primary basis to the radiolocation service. The radiolocation stations in these countries shall not cause harmful interference to, or claim protection from, stations of the fixed, mobile and mobile-satellite services operating in accordance with the Radio Regulations in the frequency band 2 483.5-2 500 MHz. (WRC-12)', '[5.150]: The following bands:13 553-13 567 kHz (centre frequency 13 560 kHz), 26 957-27 283 kHz (centre frequency 27 120 kHz), 40.66-40.70 MHz (centre frequency 40.68 MHz), 902-928 MHz in Region 2 (centre frequency 915 MHz), 2 400-2 500 MHz (centre frequency 2 450 MHz), 5 725-5 875 MHz (centre frequency 5 800 MHz), and 24-24.25 GHz (centre frequency 24.125 GHz) are also designated for industrial, scientific and medical (ISM) applications. Radiocommunication services operating within these bands must accept harmful interference which may be caused by these applications. ISM equipment operating in these bands is subject to the provisions of No. 15.13. ', '[5.399]: Except for cases referred to in No. 5.401, stations of the radiodetermination-satellite service operating in the frequency band 2 483.5-2 500 MHz for which notification information is received by the Bureau after 17 February 2012, and the service area of which includes Armenia, Azerbaijan, Belarus, the Russian Federation, Kazakhstan, Uzbekistan, Kyrgyzstan, Tajikistan and Ukraine, shall not cause harmful interference to, and shall not claim protection from stations of the radiolocation service operating in these countries in accordance with No. 5.398A. (WRC-12)', '[5.401]: In Angola, Australia, Bangladesh, China, Eritrea, Ethiopia, India, Iran (Islamic Republic of), Lebanon, Liberia, Libya, Madagascar, Mali, Pakistan, Papua New Guinea, Syrian Arab Republic, Dem. Rep. of the Congo, Sudan, Swaziland, Togo and Zambia, the frequency band 2 483.5-2 500 MHz was already allocated on a primary basis to the radiodetermination-satellite service before WRC-12, subject to agreement obtained under No. 9.21 from countries not listed in this provision. Systems in the radiodetermination-satellite service for which complete coordination information has been received by the Radiocommunication Bureau before 18 February 2012 will retain their regulatory status, as of the date of receipt of the coordination request information. (WRC-15)', '[5.402]: The use of the band 2 483.5-2 500 MHz by the mobile-satellite and the radiodetermination-satellite services is subject to the coordination under No. 9.11A. Administrations are urged to take all practicable steps to prevent harmful interference to the radio astronomy service from emissions in the 2 483.5-2 500 MHz band, especially those caused by second-harmonic radiation that would fall into the 4 990-5 000 MHz band allocated to the radio astronomy service worldwide.']),
(2500000000, 2520000001): (False, True, True, False, False, ['Fixed [5.410]', 'Mobile Except Aeronautical Mobile [5.384A]'], [], ['[5.410]: The band 2 500-2 690 MHz may be used for tropospheric scatter systems in Region 1, subject to agreement obtained under No. 9.21. No. 9.21 does not apply to tropospheric scatter links situated entirely outside Region 1. Administrations shall make all practicable efforts to avoid developing new tropospheric scatter systems in this band. When planning new tropospheric scatter radio-relay links in this band, all possible measures shall be taken to avoid directing the antennas of these links towards the geostationary-satellite orbit. (WRC-12)', '[5.384A]: The frequency bands 1 710-1 885 MHz, 2 300-2 400 MHz and 2 500-2 690 MHz, or portions thereof, are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) in accordance with Resolution 223 (Rev.WRC-15). This identification does not preclude the use of these frequency bands by any application of the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.412]: Alternative allocation: in Kyrgyzstan and Turkmenistan, the band 2 500-2 690 MHz is allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-12)']),
(2520000000, 2655000001): (False, True, True, False, False, ['Fixed [5.410]', 'Mobile Except Aeronautical Mobile [5.384A]', 'Broadcasting-Satellite [5.413][5.416]'], [], ['[5.410]: The band 2 500-2 690 MHz may be used for tropospheric scatter systems in Region 1, subject to agreement obtained under No. 9.21. No. 9.21 does not apply to tropospheric scatter links situated entirely outside Region 1. Administrations shall make all practicable efforts to avoid developing new tropospheric scatter systems in this band. When planning new tropospheric scatter radio-relay links in this band, all possible measures shall be taken to avoid directing the antennas of these links towards the geostationary-satellite orbit. (WRC-12)', '[5.384A]: The frequency bands 1 710-1 885 MHz, 2 300-2 400 MHz and 2 500-2 690 MHz, or portions thereof, are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) in accordance with Resolution 223 (Rev.WRC-15). This identification does not preclude the use of these frequency bands by any application of the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.413]: In the design of systems in the broadcasting-satellite service in the bands between 2 500 MHz and 2 690 MHz, administrations are urged to take all necessary steps to protect the radio astronomy service in the band 2 690-2 700 MHz.', '[5.416]: The use of the band 2 520-2 670 MHz by the broadcasting-satellite service is limited to national and regional systems for community reception, subject to agreement obtained under No. 9.21. The provisions of No. 9.19 shall be applied by administrations in this band in their bilateral and multilateral negotiations. (WRC-07)', '[5.339]: The bands 1 370-1 400 MHz, 2 640-2 655 MHz, 4 950-4 990 MHz and 15.20-15.35 GHz are also allocated to the space research (passive) and Earth exploration-satellite (passive) services on a secondary basis.', '[5.412]: Alternative allocation: in Kyrgyzstan and Turkmenistan, the band 2 500-2 690 MHz is allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-12)', '[5.418B]: Use of the band 2 630-2 655 MHz by non-geostationary-satellite systems in the broadcasting-satellite service (sound), pursuant to No. 5.418, for which complete Appendix 4 coordination information, or notification information, has been received after 2 June 2000, is subject to the application of the provisions of No. 9.12. (WRC-03)', '[5.418C]: Use of the band 2 630-2 655 MHz by geostationary-satellite networks for which complete Appendix 4 coordination information, or notification information, has been received after 2 June 2000 is subject to the application of the provisions of No. 9.13 with respect to non-geostationary-satellite systems in the broadcasting-satellite service (sound), pursuant to No. 5.418 and No. 22.2 does not apply. (WRC-03)']),
(2655000000, 2670000001): (False, True, True, False, False, ['Fixed [5.410]', 'Mobile Except Aeronautical Mobile [5.384A]', 'Broadcasting-Satellite [5.208B][5.413][5.416]'], ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], ['[5.410]: The band 2 500-2 690 MHz may be used for tropospheric scatter systems in Region 1, subject to agreement obtained under No. 9.21. No. 9.21 does not apply to tropospheric scatter links situated entirely outside Region 1. Administrations shall make all practicable efforts to avoid developing new tropospheric scatter systems in this band. When planning new tropospheric scatter radio-relay links in this band, all possible measures shall be taken to avoid directing the antennas of these links towards the geostationary-satellite orbit. (WRC-12)', '[5.384A]: The frequency bands 1 710-1 885 MHz, 2 300-2 400 MHz and 2 500-2 690 MHz, or portions thereof, are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) in accordance with Resolution 223 (Rev.WRC-15). This identification does not preclude the use of these frequency bands by any application of the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.413]: In the design of systems in the broadcasting-satellite service in the bands between 2 500 MHz and 2 690 MHz, administrations are urged to take all necessary steps to protect the radio astronomy service in the band 2 690-2 700 MHz.', '[5.416]: The use of the band 2 520-2 670 MHz by the broadcasting-satellite service is limited to national and regional systems for community reception, subject to agreement obtained under No. 9.21. The provisions of No. 9.19 shall be applied by administrations in this band in their bilateral and multilateral negotiations. (WRC-07)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.412]: Alternative allocation: in Kyrgyzstan and Turkmenistan, the band 2 500-2 690 MHz is allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-12)']),
(2670000000, 2690000001): (False, True, True, False, False, ['Fixed [5.410]', 'Mobile Except Aeronautical Mobile [5.384A]'], ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], ['[5.410]: The band 2 500-2 690 MHz may be used for tropospheric scatter systems in Region 1, subject to agreement obtained under No. 9.21. No. 9.21 does not apply to tropospheric scatter links situated entirely outside Region 1. Administrations shall make all practicable efforts to avoid developing new tropospheric scatter systems in this band. When planning new tropospheric scatter radio-relay links in this band, all possible measures shall be taken to avoid directing the antennas of these links towards the geostationary-satellite orbit. (WRC-12)', '[5.384A]: The frequency bands 1 710-1 885 MHz, 2 300-2 400 MHz and 2 500-2 690 MHz, or portions thereof, are identified for use by administrations wishing to implement International Mobile Telecommunications (IMT) in accordance with Resolution 223 (Rev.WRC-15). This identification does not preclude the use of these frequency bands by any application of the services to which they are allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.412]: Alternative allocation: in Kyrgyzstan and Turkmenistan, the band 2 500-2 690 MHz is allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-12)']),
(2690000000, 2700000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03) ', "[5.422]: Additional allocation: in Saudi Arabia, Armenia, Azerbaijan, Bahrain, Belarus, Brunei Darussalam, Congo (Rep. of the), Côte d'Ivoire, Cuba, Djibouti, Egypt, the United Arab Emirates, Eritrea, Ethiopia, Gabon, Georgia, Guinea, Guinea-Bissau, Iran (Islamic Republic of), Iraq, Israel, Jordan, Kuwait, Lebanon, Mauritania, Mongolia, Montenegro, Nigeria, Oman, Pakistan, the Philippines, Qatar, Syrian Arab Republic, Kyrgyzstan, the Dem. Rep. of the Congo, Romania, Somalia, Tajikistan, Tunisia, Turkmenistan, Ukraine and Yemen, the band 2 690-2 700 MHz is also allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. Such use is limited to equipment in operation by 1 January 1985. (WRC-12)"]),
(2700000000, 2900000001): (False, False, False, False, False, ['Aeronautical Radionavigation [5.337]'], ['Radiolocation'], ['[5.337]: The use of the bands 1 300-1 350 MHz, 2 700-2 900 MHz and 9 000-9 200 MHz by the aeronautical radionavigation service is restricted to ground-based radars and to associated airborne transponders which transmit only on frequencies in these bands and only when actuated by radars operating in the same band.', '[5.423]: In the band 2 700-2 900 MHz, ground-based radars used for meteorological purposes are authorized to operate on a basis of equality with stations of the aeronautical radionavigation service.', '[5.424]: Additional allocation: in Canada, the band 2 850-2 900 MHz is also allocated to the maritime radionavigation service, on a primary basis, for use by shore-based radars.']),
(2900000000, 3100000001): (False, False, False, False, False, ['Radiolocation [5.424A]', 'Radionavigation [5.426]'], [], ['[5.424A]: In the band 2 900-3 100 MHz, stations in the radiolocation service shall not cause harmful interference to, nor claim protection from, radar systems in the radionavigation service. (WRC-03)', '[5.426]: The use of the band 2 900-3 100 MHz by the aeronautical radionavigation service is limited to ground-based radars.', '[5.425]: In the band 2 900-3 100 MHz, the use of the shipborne interrogator-transponder (SIT) system shall be confined to the sub-band 2 930 -2 950 MHz.', '[5.427]: In the bands 2 900-3 100 MHz and 9 300-9 500 MHz, the response from radar transponders shall not be capable of being confused with the response from radar beacons (racons) and shall not cause interference to ship or aeronautical radars in the radionavigation service, having regard, however, to No. 4.9.']),
(3100000000, 3300000001): (False, False, False, False, False, ['Radiolocation'], ['Earth Exploration-Satellite (Active)', 'Space Research (Active)'], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.428]: Additional allocation: in Azerbaijan, Kyrgyzstan and Turkmenistan, the frequency band 3 100-3 300 MHz is also allocated to the radionavigation service on a primary basis. (WRC-15)']),
(3300000000, 3400000001): (False, False, False, False, False, ['Radiolocation'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', "[5.429]: Additional allocation: in Saudi Arabia, Bahrain, Bangladesh, Benin, Brunei Darussalam, Cambodia, Cameroon, China, Congo (Rep. of the), Korea (Rep. of), Côte d'Ivoire, Egypt, the United Arab Emirates, India, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Japan, Jordan, Kenya, Kuwait, Lebanon, Libya, Malaysia, Oman, Uganda, Pakistan, Qatar, the Syrian Arab Republic, the Dem. Rep. of the Congo, the Dem. People’s Rep. of Korea, Sudan and Yemen, the frequency band 3 300-3 400 MHz is also allocated to the fixed and mobile services on a primary basis. The countries bordering the Mediterranean shall not claim protection for their fixed and mobile services from the radiolocation service. (WRC-15)", '[5.429A]: Additional allocation: in Angola, Benin, Botswana, Burkina Faso, Burundi, Ghana, Guinea, Guinea-Bissau, Lesotho, Liberia, Malawi, Mauritania, Mozambique, Namibia, Niger, Nigeria, Rwanda, Sudan, South Sudan, South Africa, Swaziland, Tanzania, Chad, Togo, Zambia and Zimbabwe, the frequency band 3 300-3 400 MHz is allocated to the mobile, except aeronautical mobile, service on a primary basis. Stations in the mobile service operating in the frequency band 3 300-3 400 MHz shall not cause harmful interference to, or claim protection from, stations operating in the radiolocation service. (WRC-15)', '[5.429B]: In the following countries of Region 1 south of 30° parallel north: Angola, Benin, Botswana, Burkina Faso, Burundi, Cameroon, Congo (Rep. of the), Côte d’Ivoire, Egypt, Ghana, Guinea, Guinea-Bissau, Kenya, Lesotho, Liberia, Malawi, Mauritania, Mozambique, Namibia, Niger, Nigeria, Uganda, the Dem. Rep. of the Congo, Rwanda, Sudan, South Sudan, South Africa, Swaziland, Tanzania, Chad, Togo, Zambia and Zimbabwe, the frequency band 3 300-3 400 MHz is identified for the implementation of International Mobile Telecommunications (IMT). The use of this frequency band shall be in accordance with Resolution 223 (Rev.WRC-15). The use of the frequency band 3 300-3 400 MHz by IMT stations in the mobile service shall not cause harmful interference to, or claim protection from, systems in the radiolocation service, and administrations wishing to implement IMT shall obtain the agreement of neighbouring countries to protect operations within the radiolocation service. This identification does not preclude the use of this frequency band by any application of the services to which it is allocated and does not establish priority in the Radio Regulations. (WRC-15)', '[5.430]: Additional allocation: in Azerbaijan, Kyrgyzstan and Turkmenistan, the frequency band 3 300-3 400 MHz is also allocated to the radionavigation service on a primary basis. (WRC-15)']),
(3400000000, 3600000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)', 'Mobile Except Aeronautical Mobile [5.430A]'], ['Radiolocation'], ['[5.430A]: The allocation of the frequency band 3 400-3 600 MHz to the mobile, except aeronautical mobile, service is subject to agreement obtained under No. 9.21. This frequency band is identified for International Mobile Telecommunications (IMT). This identification does not preclude the use of this frequency band by any application of the services to which it is allocated and does not establish priority in the Radio Regulations. The provisions of Nos. 9.17 and 9.18 shall also apply in the coordination phase. Before an administration brings into use a (base or mobile) station of the mobile service in this frequency band, it shall ensure that the power flux-density (pfd) produced at 3 m above ground does not exceed −154.5 dB(W/(m2 × 4 kHz)) for more than 20% of time at the border of the territory of any other administration. This limit may be exceeded on the territory of any country whose administration has so agreed. In order to ensure that the pfd limit at the border of the territory of any other administration is met, the calculations and verification shall be made, taking into account all relevant information, with the mutual agreement of both administrations (the administration responsible for the terrestrial station and the administration responsible for the earth station) and with the assistance of the Bureau if so requested. In case of disagreement, calculation and verification of the pfd shall be made by the Bureau, taking into account the information referred to above. Stations of the mobile service in the frequency band 3 400-3 600 MHz shall not claim more protection from space stations than that provided in Table 21-4 of the Radio Regulations (Edition of 2004). (WRC-15)', '[5.431]: Additional allocation: in Germany and Israel, the frequency band 3 400-3 475 MHz is also allocated to the amateur service on a secondary basis. (WRC-15)']),
(3600000000, 4200000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)'], [], []),
(4200000000, 4400000001): (False, False, True, False, False, ['Aeronautical Mobile (R) [5.436]', 'Aeronautical Radionavigation [5.438]'], [], ['[5.436]: Use of the frequency band 4 200-4 400 MHz by stations in the aeronautical mobile (R) service is reserved exclusively for wireless avionics intra-communication systems that operate in accordance with recognized international aeronautical standards. Such use shall be in accordance with Resolution 424 (WRC-15). (WRC-15)', '[5.438]: Use of the frequency band 4 200-4 400 MHz by the aeronautical radionavigation service is reserved exclusively for radio altimeters installed on board aircraft and for the associated transponders on the ground. (WRC-15)', '[5.437]: Passive sensing in the Earth exploration-satellite and space research services may be authorized in the frequency band 4 200-4 400 MHz on a secondary basis. (WRC-15)', '[5.439]: Additional allocation: in Iran (Islamic Republic of), the band 4 200-4 400 MHz is also allocated to the fixed service on a secondary basis. (WRC-12)', '[5.440]: The standard frequency and time signal-satellite service may be authorized to use the frequency 4 202 MHz for space-to-Earth transmissions and the frequency 6 427 MHz for Earth-to-space transmissions. Such transmissions shall be confined within the limits of ± 2 MHz of these frequencies, subject to agreement obtained under No. 9.21.']),
(4400000000, 4500000001): (False, True, True, False, False, ['Mobile [5.440A]'], [], ['[5.440A]: In Region 2 (except Brazil, Cuba, French overseas departments and communities, Guatemala, Paraguay, Uruguay and Venezuela), and in Australia, the band 4 400-4 940 MHz may be used for aeronautical mobile telemetry for flight testing by aircraft stations (see No. 1.83). Such use shall be in accordance with Resolution 416 (WRC-07) and shall not cause harmful interference to, nor claim protection from, the fixed-satellite and fixed services. Any such use does not preclude the use of this band by other mobile service applications or by other services to which this band is allocated on a co-primary basis and does not establish priority in the Radio Regulations. (WRC-07)']),
(4500000000, 4800000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth) [5.441]', 'Mobile [5.440A]'], [], ['[5.441]: The use of the bands 4 500-4 800 MHz (space-to-Earth), 6 725-7 025 MHz (Earth-to-space) by the fixed-satellite service shall be in accordance with the provisions of Appendix 30B. The use of the bands 10.7-10.95 GHz (space-to-Earth), 11.2-11.45 GHz (space-to-Earth) and 12.75-13.25 GHz (Earth-to-space) by geostationary-satellite systems in the fixed-satellite service shall be in accordance with the provisions of Appendix 30B. The use of the bands 10.7-10.95 GHz (space-to-Earth), 11.2-11.45 GHz (space-to-Earth) and 12.75-13.25 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.440A]: In Region 2 (except Brazil, Cuba, French overseas departments and communities, Guatemala, Paraguay, Uruguay and Venezuela), and in Australia, the band 4 400-4 940 MHz may be used for aeronautical mobile telemetry for flight testing by aircraft stations (see No. 1.83). Such use shall be in accordance with Resolution 416 (WRC-07) and shall not cause harmful interference to, nor claim protection from, the fixed-satellite and fixed services. Any such use does not preclude the use of this band by other mobile service applications or by other services to which this band is allocated on a co-primary basis and does not establish priority in the Radio Regulations. (WRC-07)']),
(4800000000, 4990000001): (False, True, True, False, False, ['Mobile [5.440A][5.441A][5.441B][5.442]'], ['Radio Astronomy'], ['[5.440A]: In Region 2 (except Brazil, Cuba, French overseas departments and communities, Guatemala, Paraguay, Uruguay and Venezuela), and in Australia, the band 4 400-4 940 MHz may be used for aeronautical mobile telemetry for flight testing by aircraft stations (see No. 1.83). Such use shall be in accordance with Resolution 416 (WRC-07) and shall not cause harmful interference to, nor claim protection from, the fixed-satellite and fixed services. Any such use does not preclude the use of this band by other mobile service applications or by other services to which this band is allocated on a co-primary basis and does not establish priority in the Radio Regulations. (WRC-07)', '[5.441A]: In Uruguay, the frequency band 4 800-4 900 MHz, or portions thereof, is identified for the implementation of International Mobile Telecommunications (IMT). This identification does not preclude the use of this frequency band by any application of the services to which it is allocated and does not establish priority in the Radio Regulations. The use of this frequency band for the implementation of IMT is subject to agreement obtained with neighbouring countries, and IMT stations shall not claim protection from stations of other applications of the mobile service. Such use shall be in accordance with Resolution 223 (Rev.WRC-15). (WRC-15)', '[5.441B]: In Cambodia, Lao P.D.R. and Viet Nam, the frequency band 4 800-4 990 MHz, or portions thereof, is identified for use by administrations wishing to implement International Mobile Telecommunications (IMT). This identification does not preclude the use of this frequency band by any application of the services to which it is allocated and does not establish priority in the Radio Regulations. The use of this frequency band for the implementation of IMT is subject to agreement obtained under No. 9.21 with concerned administrations, and IMT stations shall not claim protection from stations of other applications of the mobile service. In addition, before an administration brings into use an IMT station in the mobile service, it shall ensure that the power flux-density produced by this station does not exceed −155 dB(W/(m2 · 1 MHz)) produced up to 19 km above sea level at 20 km from the coast, defined as the low-water mark, as officially recognized by the coastal State. This criterion is subject to review at WRC-19. See Resolution 223 (Rev.WRC-15). This identification shall be effective after WRC-19. (WRC-15)', '[5.442]: In the frequency bands 4 825-4 835 MHz and 4 950-4 990 MHz, the allocation to the mobile service is restricted to the mobile, except aeronautical mobile, service. In Region 2 (except Brazil, Cuba, Guatemala, Mexico, Paraguay, Uruguay and Venezuela), and in Australia, the frequency band 4 825-4 835 MHz is also allocated to the aeronautical mobile service, limited to aeronautical mobile telemetry for flight testing by aircraft stations. Such use shall be in accordance with Resolution 416 (WRC-07) and shall not cause harmful interference to the fixed service. (WRC-15)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.339]: The bands 1 370-1 400 MHz, 2 640-2 655 MHz, 4 950-4 990 MHz and 15.20-15.35 GHz are also allocated to the space research (passive) and Earth exploration-satellite (passive) services on a secondary basis.', '[5.443]: Different category of service: in Argentina, Australia and Canada, the allocation of the bands 4 825-4 835 MHz and 4 950-4 990 MHz to the radio astronomy service is on a primary basis (see No. 5.33).']),
(4990000000, 5000000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile', 'Radio Astronomy'], ['Space Research (Passive)'], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(5000000000, 5010000001): (False, False, False, False, False, ['Aeronautical Mobile-Satellite (R) [5.443Aa]', 'Aeronautical Radionavigation', 'Radionavigation-Satellite (Earth-To-Space)'], [], ['[5.443AA]: In the frequency bands 5 000-5 030 MHz and 5 091-5 150 MHz, the aeronautical mobile-satellite (R) service is subject to agreement obtained under No. 9.21. The use of these bands by the aeronautical mobile-satellite (R) service is limited to internationally standardized aeronautical systems. (WRC-12)']),
(5010000000, 5030000001): (False, False, False, False, False, ['Aeronautical Mobile-Satellite (R) [5.443Aa]', 'Aeronautical Radionavigation', 'Radionavigation-Satellite (Space-To-Earth)', 'Radionavigation-Satellite (Space-To-Space)'], [], ['[5.443AA]: In the frequency bands 5 000-5 030 MHz and 5 091-5 150 MHz, the aeronautical mobile-satellite (R) service is subject to agreement obtained under No. 9.21. The use of these bands by the aeronautical mobile-satellite (R) service is limited to internationally standardized aeronautical systems. (WRC-12)', '[5.328B]: The use of the bands 1 164-1 300 MHz, 1 559-1 610 MHz and 5 010-5 030 MHz by systems and networks in the radionavigation-satellite service for which complete coordination or notification information, as appropriate, is received by the Radiocommunication Bureau after 1 January 2005 is subject to the application of the provisions of Nos. 9.12, 9.12A and 9.13. Resolution 610 (WRC-03) shall also apply; however, in the case of radionavigation-satellite service (space-to-space) networks and systems, Resolution 610 (WRC-03) shall only apply to transmitting space stations. In accordance with No. 5.329A, for systems and networks in the radionavigation-satellite service (space-to-space) in the bands 1 215-1 300 MHz and 1 559-1 610 MHz, the provisions of Nos. 9.7, 9.12, 9.12A and 9.13 shall only apply with respect to other systems and networks in the radionavigation-satellite service (space-to-space). (WRC-07)', '[5.443B]: In order not to cause harmful interference to the microwave landing system operating above 5 030 MHz, the aggregate power flux-density produced at the Earth’s surface in the frequency band 5 030-5 150 MHz by all the space stations within any radionavigation-satellite service system (space-to-Earth) operating in the frequency band 5 010-5 030 MHz shall not exceed −124.5 dB(W/m2) in a 150 kHz band. In order not to cause harmful interference to the radio astronomy service in the frequency band 4 990-5 000 MHz, radionavigation-satellite service systems operating in the frequency band 5 010-5 030 MHz shall comply with the limits in the frequency band 4 990-5 000 MHz defined in Resolution 741 (Rev.WRC-15). (WRC-15)']),
(5030000000, 5091000001): (False, False, True, False, False, ['Aeronautical Mobile (R) [5.443C]', 'Aeronautical Mobile-Satellite (R) [5.443D]', 'Aeronautical Radionavigation'], [], ['[5.443C]: The use of the frequency band 5 030-5 091 MHz by the aeronautical mobile (R) service is limited to internationally standardized aeronautical systems. Unwanted emissions from the aeronautical mobile (R) service in the frequency band 5 030-5 091 MHz shall be limited to protect RNSS system downlinks in the adjacent 5 010-5 030 MHz band. Until such time that an appropriate value is established in a relevant ITU-R Recommendation, the e.i.r.p. density limit of −75 dBW/MHz in the frequency band 5 010-5 030 MHz for any AM(R)S station unwanted emission should be used. (WRC-12)', '[5.443D]: In the frequency band 5 030-5 091 MHz, the aeronautical mobile-satellite (R) service is subject to coordination under No. 9.11A. The use of this frequency band by the aeronautical mobile-satellite (R) service is limited to internationally standardized aeronautical systems. (WRC-12)', '[5.444]: The frequency band 5 030-5 150 MHz is to be used for the operation of the international standard system (microwave landing system) for precision approach and landing. In the frequency band 5 030-5 091 MHz, the requirements of this system shall have priority over other uses of this frequency band. For the use of the frequency band 5 091-5 150 MHz, No. 5.444A and Resolution 114 (Rev.WRC-15) apply. (WRC-15)']),
(5091000000, 5150000001): (False, False, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.444A]', 'Aeronautical Mobile [5.444B]', 'Aeronautical Mobile-Satellite (R) [5.443Aa]', 'Aeronautical Radionavigation'], [], ['[5.444A]: The use of the allocation to the fixed-satellite service (Earth-to-space) in the frequency band 5 091-5 150 MHz is limited to feeder links of non-geostationary satellite systems in the mobile-satellite service and is subject to coordination under No. 9.11A. The use of the frequency band 5 091-5 150 MHz by feeder links of non-geostationary satellite systems in the mobile-satellite service shall be subject to application of Resolution 114 (Rev.WRC-15). Moreover, to ensure that the aeronautical radionavigation service is protected from harmful interference, coordination is required for feeder-link earth stations of the non-geostationary satellite systems in the mobile-satellite service which are separated by less than 450 km from the territory of an administration operating ground stations in the aeronautical radionavigation service. (WRC-15)', '[5.444B]: The use of the frequency band 5 091-5 150 MHz by the aeronautical mobile service is limited to:– systems operating in the aeronautical mobile (R) service and in accordance with international aeronautical standards, limited to surface applications at airports. Such use shall be in accordance with Resolution 748 (Rev.WRC-15); – aeronautical telemetry transmissions from aircraft stations (see No. 1.83) in accordance with Resolution 418 (Rev.WRC-15). (WRC-15) ', '[5.443AA]: In the frequency bands 5 000-5 030 MHz and 5 091-5 150 MHz, the aeronautical mobile-satellite (R) service is subject to agreement obtained under No. 9.21. The use of these bands by the aeronautical mobile-satellite (R) service is limited to internationally standardized aeronautical systems. (WRC-12)', '[5.444]: The frequency band 5 030-5 150 MHz is to be used for the operation of the international standard system (microwave landing system) for precision approach and landing. In the frequency band 5 030-5 091 MHz, the requirements of this system shall have priority over other uses of this frequency band. For the use of the frequency band 5 091-5 150 MHz, No. 5.444A and Resolution 114 (Rev.WRC-15) apply. (WRC-15)']),
(5150000000, 5250000001): (False, False, False, False, False, ['Fixed-Satellite (Earth-To-Space) [5.447A]', '(,5.446A,5.446B)', 'Aeronautical Radionavigation'], [], ['[5.447A]: The allocation to the fixed-satellite service (Earth-to-space) in the band 5 150-5 250 MHz is limited to feeder links of non-geostationary-satellite systems in the mobile-satellite service and is subject to coordination under No. 9.11A.', '[5.446A]: The use of the bands 5 150-5 350 MHz and 5 470-5 725 MHz by the stations in the mobile, except aeronautical mobile, service shall be in accordance with Resolution 229 (Rev.WRC-12). (WRC-12)', '[5.446B]: In the band 5 150-5 250 MHz, stations in the mobile service shall not claim protection from earth stations in the fixed-satellite service. No. 5.43A does not apply to the mobile service with respect to fixed-satellite service earth stations. (WRC-03)', '[5.446]: Additional allocation: in the countries listed in No. 5.369, the frequency band 5 150-5 216 MHz is also allocated to the radiodetermination-satellite service (space-to-Earth) on a primary basis, subject to agreement obtained under No. 9.21. In Region 2 (except in Mexico), the frequency band is also allocated to the radiodetermination-satellite service (space-to-Earth) on a primary basis. In Regions 1 and 3, except those countries listed in No. 5.369 and Bangladesh, the frequency band is also allocated to the radiodetermination-satellite service (space-to-Earth) on a secondary basis. The use by the radiodetermination-satellite service is limited to feeder links in conjunction with the radiodetermination-satellite service operating in the frequency bands 1 610-1 626.5 MHz and/or 2 483.5-2 500 MHz. The total power flux-density at the Earth’s surface shall in no case exceed −159 dB(W/m2) in any 4 kHz band for all angles of arrival. (WRC-15)', '[5.446C]: Additional allocation: in Region 1 (except in Algeria, Saudi Arabia, Bahrain, Egypt, United Arab Emirates, Jordan, Kuwait, Lebanon, Morocco, Oman, Qatar, Syrian Arab Republic, Sudan, South Sudan and Tunisia) and in Brazil, the band 5 150-5 250 MHz is also allocated to the aeronautical mobile service on a primary basis, limited to aeronautical telemetry transmissions from aircraft stations (see No. 1.83), in accordance with Resolution 418 (Rev.WRC-12)*. These stations shall not claim protection from other stations operating in accordance with Article 5. No. 5.43A does not apply. (WRC-12)', "[5.447]: Additional allocation: in Côte d'Ivoire, Egypt, Israel, Lebanon, the Syrian Arab Republic and Tunisia, the band 5 150-5 250 MHz is also allocated to the mobile service, on a primary basis, subject to agreement obtained under No. 9.21. In this case, the provisions of Resolution 229 (Rev.WRC-12) do not apply. (WRC-12)", '[5.447B]: Additional allocation: the band 5 150-5 216 MHz is also allocated to the fixed-satellite service (space-to-Earth) on a primary basis. This allocation is limited to feeder links of non-geostationary-satellite systems in the mobile-satellite service and is subject to provisions of No. 9.11A. The power flux-density at the Earth’s surface produced by space stations of the fixed-satellite service operating in the space-to-Earth direction in the band 5 150-5 216 MHz shall in no case exceed –164 dB(W/m2) in any 4 kHz band for all angles of arrival.', '[5.447C]: Administrations responsible for fixed-satellite service networks in the band 5 150-5 250 MHz operated under Nos. 5.447A and 5.447B shall coordinate on an equal basis in accordance with No. 9.11A with administrations responsible for non-geostationary-satellite networks operated under No. 5.446 and brought into use prior to 17 November 1995. Satellite networks operated under No. 5.446 brought into use after 17 November 1995 shall not claim protection from, and shall not cause harmful interference to, stations of the fixed-satellite service operated under Nos. 5.447A and 5.447B.']),
(5250000000, 5255000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active)', '(,5.446A,5.447F)', 'Radiolocation', 'Space Research [5.447D]'], [], ['[5.446A]: The use of the bands 5 150-5 350 MHz and 5 470-5 725 MHz by the stations in the mobile, except aeronautical mobile, service shall be in accordance with Resolution 229 (Rev.WRC-12). (WRC-12)', '[5.447F]: In the frequency band 5 250-5 350 MHz, stations in the mobile service shall not claim protection from the radiolocation service, the Earth exploration-satellite service (active) and the space research service (active). These services shall not impose on the mobile service more stringent protection criteria, based on system characteristics and interference criteria, than those stated in Recommendations ITU-R M.1638-0 and ITU-R RS.1632-0. (WRC-15)', '[5.447D]: The allocation of the band 5 250-5 255 MHz to the space research service on a primary basis is limited to active spaceborne sensors. Other uses of the band by the space research service are on a secondary basis. (WRC-97)', '[5.447E]: Additional allocation: The frequency band 5 250-5 350 MHz is also allocated to the fixed service on a primary basis in the following countries in Region 3: Australia, Korea (Rep. of), India, Indonesia, Iran (Islamic Republic of), Japan, Malaysia, Papua New Guinea, the Philippines, Dem. People’s Rep. of Korea, Sri Lanka, Thailand and Viet Nam. The use of this frequency band by the fixed service is intended for the implementation of fixed wireless access systems and shall comply with Recommendation ITU-R F.1613-0. In addition, the fixed service shall not claim protection from the radiodetermination, Earth exploration-satellite (active) and space research (active) services, but the provisions of No. 5.43A do not apply to the fixed service with respect to the Earth exploration-satellite (active) and space research (active) services. After implementation of fixed wireless access systems in the fixed service with protection for the existing radiodetermination systems, no more stringent constraints should be imposed on the fixed wireless access systems by future radiodetermination implementations. (WRC-15)', '[5.448]: Additional allocation: in Azerbaijan, Kyrgyzstan, Romania and Turkmenistan, the band 5 250-5 350 MHz is also allocated to the radionavigation service on a primary basis. (WRC-12)', '[5.448A]: The Earth exploration-satellite (active) and space research (active) services in the frequency band 5 250-5 350 MHz shall not claim protection from the radiolocation service. No. 5.43A does not apply. (WRC-03)']),
(5255000000, 5350000001): (False, False, True, False, False, ['Earth Exploration-Satellite (Active)', 'Mobile Except Aeronautical Mobile [5.446A][5.447F]', 'Radiolocation', 'Space Research (Active)'], [], ['[5.446A]: The use of the bands 5 150-5 350 MHz and 5 470-5 725 MHz by the stations in the mobile, except aeronautical mobile, service shall be in accordance with Resolution 229 (Rev.WRC-12). (WRC-12)', '[5.447F]: In the frequency band 5 250-5 350 MHz, stations in the mobile service shall not claim protection from the radiolocation service, the Earth exploration-satellite service (active) and the space research service (active). These services shall not impose on the mobile service more stringent protection criteria, based on system characteristics and interference criteria, than those stated in Recommendations ITU-R M.1638-0 and ITU-R RS.1632-0. (WRC-15)', '[5.447E]: Additional allocation: The frequency band 5 250-5 350 MHz is also allocated to the fixed service on a primary basis in the following countries in Region 3: Australia, Korea (Rep. of), India, Indonesia, Iran (Islamic Republic of), Japan, Malaysia, Papua New Guinea, the Philippines, Dem. People’s Rep. of Korea, Sri Lanka, Thailand and Viet Nam. The use of this frequency band by the fixed service is intended for the implementation of fixed wireless access systems and shall comply with Recommendation ITU-R F.1613-0. In addition, the fixed service shall not claim protection from the radiodetermination, Earth exploration-satellite (active) and space research (active) services, but the provisions of No. 5.43A do not apply to the fixed service with respect to the Earth exploration-satellite (active) and space research (active) services. After implementation of fixed wireless access systems in the fixed service with protection for the existing radiodetermination systems, no more stringent constraints should be imposed on the fixed wireless access systems by future radiodetermination implementations. (WRC-15)', '[5.448]: Additional allocation: in Azerbaijan, Kyrgyzstan, Romania and Turkmenistan, the band 5 250-5 350 MHz is also allocated to the radionavigation service on a primary basis. (WRC-12)', '[5.448A]: The Earth exploration-satellite (active) and space research (active) services in the frequency band 5 250-5 350 MHz shall not claim protection from the radiolocation service. No. 5.43A does not apply. (WRC-03)']),
(5350000000, 5460000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active) [5.448B]', 'Radiolocation [5.448D]', 'Aeronautical Radionavigation [5.449]', '(,5.448C)'], [], ['[5.448B]: The Earth exploration-satellite service (active) operating in the band 5 350-5 570 MHz and space research service (active) operating in the band 5 460-5 570 MHz shall not cause harmful interference to the aeronautical radionavigation service in the band 5 350-5 460 MHz, the radionavigation service in the band 5 460-5 470 MHz and the maritime radionavigation service in the band 5 470-5 570 MHz. (WRC-03)', '[5.448D]: In the frequency band 5 350-5 470 MHz, stations in the radiolocation service shall not cause harmful interference to, nor claim protection from, radar systems in the aeronautical radionavigation service operating in accordance with No. 5.449. (WRC-03)', '[5.449]: The use of the band 5 350-5 470 MHz by the aeronautical radionavigation service is limited to airborne radars and associated airborne beacons.', '[5.448C]: The space research service (active) operating in the band 5 350-5 460 MHz shall not cause harmful interference to nor claim protection from other services to which this band is allocated. (WRC-03)']),
(5460000000, 5470000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active)', 'Radiolocation [5.448D]', 'Radionavigation [5.449]', 'Space Research (Active)'], [], ['[5.448D]: In the frequency band 5 350-5 470 MHz, stations in the radiolocation service shall not cause harmful interference to, nor claim protection from, radar systems in the aeronautical radionavigation service operating in accordance with No. 5.449. (WRC-03)', '[5.449]: The use of the band 5 350-5 470 MHz by the aeronautical radionavigation service is limited to airborne radars and associated airborne beacons.', '[5.448B]: The Earth exploration-satellite service (active) operating in the band 5 350-5 570 MHz and space research service (active) operating in the band 5 460-5 570 MHz shall not cause harmful interference to the aeronautical radionavigation service in the band 5 350-5 460 MHz, the radionavigation service in the band 5 460-5 470 MHz and the maritime radionavigation service in the band 5 470-5 570 MHz. (WRC-03)']),
(5470000000, 5570000001): (False, False, True, False, False, ['Earth Exploration-Satellite (Active)', 'Mobile Except Aeronautical Mobile [5.446A][5.450A]', 'Radiolocation [5.450B]', 'Maritime Radionavigation', ''], [], ['[5.446A]: The use of the bands 5 150-5 350 MHz and 5 470-5 725 MHz by the stations in the mobile, except aeronautical mobile, service shall be in accordance with Resolution 229 (Rev.WRC-12). (WRC-12)', '[5.450A]: In the frequency band 5 470-5 725 MHz, stations in the mobile service shall not claim protection from radiodetermination services. Radiodetermination services shall not impose on the mobile service more stringent protection criteria, based on system characteristics and interference criteria, than those stated in Recommendation ITU-R M.1638-0. (WRC-15)', '[5.450B]: In the frequency band 5 470-5 650 MHz, stations in the radiolocation service, except ground-based radars used for meteorological purposes in the band 5 600-5 650 MHz, shall not cause harmful interference to, nor claim protection from, radar systems in the maritime radionavigation service. (WRC-03)', '[5.448B]: The Earth exploration-satellite service (active) operating in the band 5 350-5 570 MHz and space research service (active) operating in the band 5 460-5 570 MHz shall not cause harmful interference to the aeronautical radionavigation service in the band 5 350-5 460 MHz, the radionavigation service in the band 5 460-5 470 MHz and the maritime radionavigation service in the band 5 470-5 570 MHz. (WRC-03)', '[5.450]: Additional allocation: in Austria, Azerbaijan, Iran (Islamic Republic of), Kyrgyzstan, Romania, Turkmenistan and Ukraine, the band 5 470-5 650 MHz is also allocated to the aeronautical radionavigation service on a primary basis. (WRC-12)', '[5.451]: Additional allocation: in the United Kingdom, the band 5 470-5 850 MHz is also allocated to the land mobile service on a secondary basis. The power limits specified in Nos. 21.2, 21.3, 21.4 and 21.5 shall apply in the band 5 725-5 850 MHz.']),
(5570000000, 5650000001): (False, False, True, False, False, ['Mobile Except Aeronautical Mobile [5.446A][5.450A]', '(,5.450B)', 'Maritime Radionavigation'], [], ['[5.446A]: The use of the bands 5 150-5 350 MHz and 5 470-5 725 MHz by the stations in the mobile, except aeronautical mobile, service shall be in accordance with Resolution 229 (Rev.WRC-12). (WRC-12)', '[5.450A]: In the frequency band 5 470-5 725 MHz, stations in the mobile service shall not claim protection from radiodetermination services. Radiodetermination services shall not impose on the mobile service more stringent protection criteria, based on system characteristics and interference criteria, than those stated in Recommendation ITU-R M.1638-0. (WRC-15)', '[5.450B]: In the frequency band 5 470-5 650 MHz, stations in the radiolocation service, except ground-based radars used for meteorological purposes in the band 5 600-5 650 MHz, shall not cause harmful interference to, nor claim protection from, radar systems in the maritime radionavigation service. (WRC-03)', '[5.450]: Additional allocation: in Austria, Azerbaijan, Iran (Islamic Republic of), Kyrgyzstan, Romania, Turkmenistan and Ukraine, the band 5 470-5 650 MHz is also allocated to the aeronautical radionavigation service on a primary basis. (WRC-12)', '[5.451]: Additional allocation: in the United Kingdom, the band 5 470-5 850 MHz is also allocated to the land mobile service on a secondary basis. The power limits specified in Nos. 21.2, 21.3, 21.4 and 21.5 shall apply in the band 5 725-5 850 MHz.', '[5.452]: Between 5 600 MHz and 5 650 MHz, ground-based radars used for meteorological purposes are authorized to operate on a basis of equality with stations of the maritime radionavigation service.']),
(5650000000, 5725000001): (True, False, True, False, False, ['Mobile Except Aeronautical Mobile [5.446A][5.450A]', 'Radiolocation'], ['Amateur', 'Space Research (Deep Space)'], ['[5.446A]: The use of the bands 5 150-5 350 MHz and 5 470-5 725 MHz by the stations in the mobile, except aeronautical mobile, service shall be in accordance with Resolution 229 (Rev.WRC-12). (WRC-12)', '[5.450A]: In the frequency band 5 470-5 725 MHz, stations in the mobile service shall not claim protection from radiodetermination services. Radiodetermination services shall not impose on the mobile service more stringent protection criteria, based on system characteristics and interference criteria, than those stated in Recommendation ITU-R M.1638-0. (WRC-15)', '[5.282]: In the bands 435-438 MHz, 1 260-1 270 MHz, 2 400-2 450 MHz, 3 400-3 410 MHz (in Regions 2 and 3 only) and 5 650-5 670 MHz, the amateur-satellite service may operate subject to not causing harmful interference to other services operating in accordance with the Table (see No. 5.43). Administrations authorizing such use shall ensure that any harmful interference caused by emissions from a station in the amateur-satellite service is immediately eliminated in accordance with the provisions of No. 25.11. The use of the bands 1 260-1 270 MHz and 5 650-5 670 MHz by the amateur-satellite service is limited to the Earth-to-space direction.', '[5.451]: Additional allocation: in the United Kingdom, the band 5 470-5 850 MHz is also allocated to the land mobile service on a secondary basis. The power limits specified in Nos. 21.2, 21.3, 21.4 and 21.5 shall apply in the band 5 725-5 850 MHz.', '[5.453]: Additional allocation: in Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, Cameroon, China, Congo (Rep. of the), Korea (Rep. of), Côte d’Ivoire, Djibouti, Egypt, the United Arab Emirates, Gabon, Guinea, Equatorial Guinea, India, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Japan, Jordan, Kenya, Kuwait, Lebanon, Libya, Madagascar, Malaysia, Niger, Nigeria, Oman, Uganda, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. People’s Rep. of Korea, Singapore, Sri Lanka, Swaziland, Tanzania, Chad, Thailand, Togo, Viet Nam and Yemen, the band 5 650-5 850 MHz is also allocated to the fixed and mobile services on a primary basis. In this case, the provisions of Resolution 229 (Rev.WRC-12) do not apply. (WRC-12)', '[5.454]: Different category of service: in Azerbaijan, the Russian Federation, Georgia, Kyrgyzstan, Tajikistan and Turkmenistan, the allocation of the band 5 670-5 725 MHz to the space research service is on a primary basis (see No. 5.33). (WRC-12)', '[5.455]: Additional allocation: in Armenia, Azerbaijan, Belarus, Cuba, the Russian Federation, Georgia, Hungary, Kazakhstan, Moldova, Mongolia, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the band 5 670-5 850 MHz is also allocated to the fixed service on a primary basis. (WRC-07)']),
(5725000000, 5830000001): (True, False, False, False, False, ['Fixed-Satellite (Earth-To-Space)', 'Radiolocation'], ['Amateur'], ['[5.150]: The following bands:13 553-13 567 kHz (centre frequency 13 560 kHz), 26 957-27 283 kHz (centre frequency 27 120 kHz), 40.66-40.70 MHz (centre frequency 40.68 MHz), 902-928 MHz in Region 2 (centre frequency 915 MHz), 2 400-2 500 MHz (centre frequency 2 450 MHz), 5 725-5 875 MHz (centre frequency 5 800 MHz), and 24-24.25 GHz (centre frequency 24.125 GHz) are also designated for industrial, scientific and medical (ISM) applications. Radiocommunication services operating within these bands must accept harmful interference which may be caused by these applications. ISM equipment operating in these bands is subject to the provisions of No. 15.13. ', '[5.451]: Additional allocation: in the United Kingdom, the band 5 470-5 850 MHz is also allocated to the land mobile service on a secondary basis. The power limits specified in Nos. 21.2, 21.3, 21.4 and 21.5 shall apply in the band 5 725-5 850 MHz.', '[5.453]: Additional allocation: in Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, Cameroon, China, Congo (Rep. of the), Korea (Rep. of), Côte d’Ivoire, Djibouti, Egypt, the United Arab Emirates, Gabon, Guinea, Equatorial Guinea, India, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Japan, Jordan, Kenya, Kuwait, Lebanon, Libya, Madagascar, Malaysia, Niger, Nigeria, Oman, Uganda, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. People’s Rep. of Korea, Singapore, Sri Lanka, Swaziland, Tanzania, Chad, Thailand, Togo, Viet Nam and Yemen, the band 5 650-5 850 MHz is also allocated to the fixed and mobile services on a primary basis. In this case, the provisions of Resolution 229 (Rev.WRC-12) do not apply. (WRC-12)', '[5.455]: Additional allocation: in Armenia, Azerbaijan, Belarus, Cuba, the Russian Federation, Georgia, Hungary, Kazakhstan, Moldova, Mongolia, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the band 5 670-5 850 MHz is also allocated to the fixed service on a primary basis. (WRC-07)']),
(5830000000, 5850000001): (True, False, False, False, False, ['Fixed-Satellite (Earth-To-Space)', 'Radiolocation'], ['Amateur', 'Amateur-Satellite (Space-To-Earth)'], ['[5.150]: The following bands:13 553-13 567 kHz (centre frequency 13 560 kHz), 26 957-27 283 kHz (centre frequency 27 120 kHz), 40.66-40.70 MHz (centre frequency 40.68 MHz), 902-928 MHz in Region 2 (centre frequency 915 MHz), 2 400-2 500 MHz (centre frequency 2 450 MHz), 5 725-5 875 MHz (centre frequency 5 800 MHz), and 24-24.25 GHz (centre frequency 24.125 GHz) are also designated for industrial, scientific and medical (ISM) applications. Radiocommunication services operating within these bands must accept harmful interference which may be caused by these applications. ISM equipment operating in these bands is subject to the provisions of No. 15.13. ', '[5.451]: Additional allocation: in the United Kingdom, the band 5 470-5 850 MHz is also allocated to the land mobile service on a secondary basis. The power limits specified in Nos. 21.2, 21.3, 21.4 and 21.5 shall apply in the band 5 725-5 850 MHz.', '[5.453]: Additional allocation: in Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, Cameroon, China, Congo (Rep. of the), Korea (Rep. of), Côte d’Ivoire, Djibouti, Egypt, the United Arab Emirates, Gabon, Guinea, Equatorial Guinea, India, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Japan, Jordan, Kenya, Kuwait, Lebanon, Libya, Madagascar, Malaysia, Niger, Nigeria, Oman, Uganda, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. People’s Rep. of Korea, Singapore, Sri Lanka, Swaziland, Tanzania, Chad, Thailand, Togo, Viet Nam and Yemen, the band 5 650-5 850 MHz is also allocated to the fixed and mobile services on a primary basis. In this case, the provisions of Resolution 229 (Rev.WRC-12) do not apply. (WRC-12)', '[5.455]: Additional allocation: in Armenia, Azerbaijan, Belarus, Cuba, the Russian Federation, Georgia, Hungary, Kazakhstan, Moldova, Mongolia, Uzbekistan, Kyrgyzstan, Tajikistan, Turkmenistan and Ukraine, the band 5 670-5 850 MHz is also allocated to the fixed service on a primary basis. (WRC-07)']),
(5850000000, 5925000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space)'], [], ['[5.150]: The following bands:13 553-13 567 kHz (centre frequency 13 560 kHz), 26 957-27 283 kHz (centre frequency 27 120 kHz), 40.66-40.70 MHz (centre frequency 40.68 MHz), 902-928 MHz in Region 2 (centre frequency 915 MHz), 2 400-2 500 MHz (centre frequency 2 450 MHz), 5 725-5 875 MHz (centre frequency 5 800 MHz), and 24-24.25 GHz (centre frequency 24.125 GHz) are also designated for industrial, scientific and medical (ISM) applications. Radiocommunication services operating within these bands must accept harmful interference which may be caused by these applications. ISM equipment operating in these bands is subject to the provisions of No. 15.13.']),
(5925000000, 6700000001): (False, True, True, False, False, ['Fixed [5.457]', 'Fixed-Satellite (Earth-To-Space) [5.457A][5.457B]', 'Mobile [5.457C]'], [], ["[5.457]: In Australia, Burkina Faso, Cote d'Ivoire, Mali and Nigeria, the allocation to the fixed service in the bands 6 440-6 520 MHz (HAPS-to-ground direction) and 6 560-6 640 MHz (ground-to-HAPS direction) may also be used by gateway links for high-altitude platform stations (HAPS) within the territory of these countries. Such use is limited to operation in HAPS gateway links and shall not cause harmful interference to, and shall not claim protection from, existing services, and shall be in compliance with Resolution 150 (WRC-12). Existing services shall not be constrained in future development by HAPS gateway links. The use of HAPS gateway links in these bands requires explicit agreement with other administrations whose territories are located within 1 000 kilometres from the border of an administration intending to use the HAPS gateway links. (WRC-12)", '[5.457A]: In the frequency bands 5 925-6 425 MHz and 14-14.5 GHz, earth stations located on board vessels may communicate with space stations of the fixed-satellite service. Such use shall be in accordance with Resolution 902 (WRC-03). In the frequency band 5 925-6 425 MHz, earth stations located on board vessels and communicating with space stations of the fixed-satellite service may employ transmit antennas with minimum diameter of 1.2 m and operate without prior agreement of any administration if located at least 330 km away from the low-water mark as officially recognized by the coastal State. All other provisions of Resolution 902 (WRC-03) shall apply. (WRC-15)', '[5.457B]: In the frequency bands 5 925-6 425 MHz and 14-14.5 GHz, earth stations located on board vessels may operate with the characteristics and under the conditions contained in Resolution 902 (WRC-03) in Algeria, Saudi Arabia, Bahrain, Comoros, Djibouti, Egypt, United Arab Emirates, Jordan, Kuwait, Libya, Morocco, Mauritania, Oman, Qatar, the Syrian Arab Republic, Sudan, Tunisia and Yemen, in the maritime mobile-satellite service on a secondary basis. Such use shall be in accordance with Resolution 902 (WRC-03). (WRC-15)', '[5.457C]: In Region 2 (except Brazil, Cuba, French overseas departments and communities, Guatemala, Mexico, Paraguay, Uruguay and Venezuela), the frequency band 5 925-6 700 MHz may be used for aeronautical mobile telemetry for flight testing by aircraft stations (see No. 1.83). Such use shall be in accordance with Resolution 416 (WRC-07) and shall not cause harmful interference to, or claim protection from, the fixed-satellite and fixed services. Any such use does not preclude the use of this frequency band by other mobile service applications or by other services to which this frequency band is allocated on a co-primary basis and does not establish priority in the Radio Regulations. (WRC-15)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.440]: The standard frequency and time signal-satellite service may be authorized to use the frequency 4 202 MHz for space-to-Earth transmissions and the frequency 6 427 MHz for Earth-to-space transmissions. Such transmissions shall be confined within the limits of ± 2 MHz of these frequencies, subject to agreement obtained under No. 9.21.', '[5.458]: In the band 6 425-7 075 MHz, passive microwave sensor measurements are carried out over the oceans. In the band 7 075-7 250 MHz, passive microwave sensor measurements are carried out. Administrations should bear in mind the needs of the Earth exploration-satellite (passive) and space research (passive) services in their future planning of the bands 6 425-7 075 MHz and 7 075-7 250 MHz.']),
(6700000000, 7075000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.441]', 'Fixed-Satellite (Space-To-Earth) [5.441]'], [], ['[5.441]: The use of the bands 4 500-4 800 MHz (space-to-Earth), 6 725-7 025 MHz (Earth-to-space) by the fixed-satellite service shall be in accordance with the provisions of Appendix 30B. The use of the bands 10.7-10.95 GHz (space-to-Earth), 11.2-11.45 GHz (space-to-Earth) and 12.75-13.25 GHz (Earth-to-space) by geostationary-satellite systems in the fixed-satellite service shall be in accordance with the provisions of Appendix 30B. The use of the bands 10.7-10.95 GHz (space-to-Earth), 11.2-11.45 GHz (space-to-Earth) and 12.75-13.25 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.458]: In the band 6 425-7 075 MHz, passive microwave sensor measurements are carried out over the oceans. In the band 7 075-7 250 MHz, passive microwave sensor measurements are carried out. Administrations should bear in mind the needs of the Earth exploration-satellite (passive) and space research (passive) services in their future planning of the bands 6 425-7 075 MHz and 7 075-7 250 MHz.', '[5.458A]: In making assignments in the band 6 700-7 075 MHz to space stations of the fixed-satellite service, administrations are urged to take all practicable steps to protect spectral line observations of the radio astronomy service in the band 6 650-6 675.2 MHz from harmful interference from unwanted emissions.', '[5.458B]: The space-to-Earth allocation to the fixed-satellite service in the band 6 700-7 075 MHz is limited to feeder links for non-geostationary satellite systems of the mobile-satellite service and is subject to coordination under No. 9.11A. The use of the band 6 700-7 075 MHz (space-to-Earth) by feeder links for non-geostationary satellite systems in the mobile-satellite service is not subject to No. 22.2.']),
(7075000000, 7145000001): (False, True, True, False, False, [], [], ['[5.458]: In the band 6 425-7 075 MHz, passive microwave sensor measurements are carried out over the oceans. In the band 7 075-7 250 MHz, passive microwave sensor measurements are carried out. Administrations should bear in mind the needs of the Earth exploration-satellite (passive) and space research (passive) services in their future planning of the bands 6 425-7 075 MHz and 7 075-7 250 MHz.', '[5.459]: Additional allocation: in the Russian Federation, the frequency bands 7 100-7 155 MHz and 7 190-7 235 MHz are also allocated to the space operation service (Earth-to-space) on a primary basis, subject to agreement obtained under No. 9.21. In the frequency band 7 190-7 235 MHz, with respect to the Earth exploration-satellite service (Earth-to-space), No. 9.21 does not apply. (WRC-15)']),
(7145000000, 7190000001): (False, True, True, False, False, ['Space Research (Deep Space)', 'Space Research (Earth-To-Space)'], [], ['[5.458]: In the band 6 425-7 075 MHz, passive microwave sensor measurements are carried out over the oceans. In the band 7 075-7 250 MHz, passive microwave sensor measurements are carried out. Administrations should bear in mind the needs of the Earth exploration-satellite (passive) and space research (passive) services in their future planning of the bands 6 425-7 075 MHz and 7 075-7 250 MHz.', '[5.459]: Additional allocation: in the Russian Federation, the frequency bands 7 100-7 155 MHz and 7 190-7 235 MHz are also allocated to the space operation service (Earth-to-space) on a primary basis, subject to agreement obtained under No. 9.21. In the frequency band 7 190-7 235 MHz, with respect to the Earth exploration-satellite service (Earth-to-space), No. 9.21 does not apply. (WRC-15)']),
(7190000000, 7235000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Earth-To-Space) [5.460A][5.460B]', 'Space Research (Earth-To-Space) [5.460]'], [], ['[5.460A]: The use of the frequency band 7 190-7 250 MHz (Earth-to-space) by the Earth exploration-satellite service shall be limited to tracking, telemetry and command for the operation of spacecraft. Space stations operating in the Earth exploration-satellite service (Earth-to-space) in the frequency band 7 190-7 250 MHz shall not claim protection from existing and future stations in the fixed and mobile services, and No. 5.43A does not apply. No. 9.17 applies. Additionally, to ensure protection of the existing and future deployment of fixed and mobile services, the location of earth stations supporting spacecraft in the Earth exploration-satellite service in non-geostationary orbits or geostationary orbit shall maintain a separation distance of at least 10 km and 50 km, respectively, from the respective border(s) of neighbouring countries, unless a shorter distance is otherwise agreed between the corresponding administrations. (WRC-15)', '[5.460B]: Space stations on the geostationary orbit operating in the Earth exploration-satellite service (Earth-to-space) in the frequency band 7 190-7 235 MHz shall not claim protection from existing and future stations of the space research service, and No. 5.43A does not apply. (WRC-15)', '[5.460]: No emissions from space research service (Earth-to-space) systems intended for deep space shall be effected in the frequency band 7 190-7 235 MHz. Geostationary satellites in the space research service operating in the frequency band 7 190-7 235 MHz shall not claim protection from existing and future stations of the fixed and mobile services and No. 5.43A does not apply. (WRC-15)', '[5.458]: In the band 6 425-7 075 MHz, passive microwave sensor measurements are carried out over the oceans. In the band 7 075-7 250 MHz, passive microwave sensor measurements are carried out. Administrations should bear in mind the needs of the Earth exploration-satellite (passive) and space research (passive) services in their future planning of the bands 6 425-7 075 MHz and 7 075-7 250 MHz.', '[5.459]: Additional allocation: in the Russian Federation, the frequency bands 7 100-7 155 MHz and 7 190-7 235 MHz are also allocated to the space operation service (Earth-to-space) on a primary basis, subject to agreement obtained under No. 9.21. In the frequency band 7 190-7 235 MHz, with respect to the Earth exploration-satellite service (Earth-to-space), No. 9.21 does not apply. (WRC-15)']),
(7235000000, 7250000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Earth-To-Space) [5.460A]'], [], ['[5.460A]: The use of the frequency band 7 190-7 250 MHz (Earth-to-space) by the Earth exploration-satellite service shall be limited to tracking, telemetry and command for the operation of spacecraft. Space stations operating in the Earth exploration-satellite service (Earth-to-space) in the frequency band 7 190-7 250 MHz shall not claim protection from existing and future stations in the fixed and mobile services, and No. 5.43A does not apply. No. 9.17 applies. Additionally, to ensure protection of the existing and future deployment of fixed and mobile services, the location of earth stations supporting spacecraft in the Earth exploration-satellite service in non-geostationary orbits or geostationary orbit shall maintain a separation distance of at least 10 km and 50 km, respectively, from the respective border(s) of neighbouring countries, unless a shorter distance is otherwise agreed between the corresponding administrations. (WRC-15)', '[5.458]: In the band 6 425-7 075 MHz, passive microwave sensor measurements are carried out over the oceans. In the band 7 075-7 250 MHz, passive microwave sensor measurements are carried out. Administrations should bear in mind the needs of the Earth exploration-satellite (passive) and space research (passive) services in their future planning of the bands 6 425-7 075 MHz and 7 075-7 250 MHz.']),
(7250000000, 7300000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)'], [], ['[5.461]: Additional allocation: the bands 7 250-7 375 MHz (space-to-Earth) and 7 900-8 025 MHz (Earth-to-space) are also allocated to the mobile-satellite service on a primary basis, subject to agreement obtained under No. 9.21.']),
(7300000000, 7375000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)', 'Mobile Except Aeronautical Mobile'], [], ['[5.461]: Additional allocation: the bands 7 250-7 375 MHz (space-to-Earth) and 7 900-8 025 MHz (Earth-to-space) are also allocated to the mobile-satellite service on a primary basis, subject to agreement obtained under No. 9.21.']),
(7375000000, 7450000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)', 'Mobile Except Aeronautical Mobile', 'Maritime Mobile-Satellite (Space-To-Earth) [5.461Aa][5.461Ab]'], [], ['[5.461AA]: The use of the frequency band 7 375-7 750 MHz by the maritime mobile-satellite service is limited to geostationary-satellite networks. (WRC-15)', '[5.461AB]: In the frequency band 7 375-7 750 MHz, earth stations in the maritime mobile-satellite service shall not claim protection from, nor constrain the use and development of, stations in the fixed and mobile, except aeronautical mobile, services. No. 5.43A does not apply. (WRC-15)']),
(7450000000, 7550000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)', 'Meteorological-Satellite (Space-To-Earth)', 'Mobile Except Aeronautical Mobile', 'Maritime Mobile-Satellite (Space-To-Earth) [5.461Aa][5.461Ab]'], [], ['[5.461AA]: The use of the frequency band 7 375-7 750 MHz by the maritime mobile-satellite service is limited to geostationary-satellite networks. (WRC-15)', '[5.461AB]: In the frequency band 7 375-7 750 MHz, earth stations in the maritime mobile-satellite service shall not claim protection from, nor constrain the use and development of, stations in the fixed and mobile, except aeronautical mobile, services. No. 5.43A does not apply. (WRC-15)', '[5.461A]: The use of the band 7 450-7 550 MHz by the meteorological-satellite service (space-to-Earth) is limited to geostationary-satellite systems. Non-geostationary meteorological-satellite systems in this band notified before 30 November 1997 may continue to operate on a primary basis until the end of their lifetime. (WRC-97)']),
(7550000000, 7750000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)', 'Mobile Except Aeronautical Mobile', 'Maritime Mobile-Satellite (Space-To-Earth) [5.461Aa][5.461Ab]'], [], ['[5.461AA]: The use of the frequency band 7 375-7 750 MHz by the maritime mobile-satellite service is limited to geostationary-satellite networks. (WRC-15)', '[5.461AB]: In the frequency band 7 375-7 750 MHz, earth stations in the maritime mobile-satellite service shall not claim protection from, nor constrain the use and development of, stations in the fixed and mobile, except aeronautical mobile, services. No. 5.43A does not apply. (WRC-15)']),
(7750000000, 7900000001): (False, True, True, False, False, ['Meteorological-Satellite (Space-To-Earth) [5.461B]', 'Mobile Except Aeronautical Mobile'], [], ['[5.461B]: The use of the band 7 750-7 900 MHz by the meteorological-satellite service (space-to-Earth) is limited to non-geostationary satellite systems. (WRC-12)']),
(7900000000, 8025000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space)'], [], ['[5.461]: Additional allocation: the bands 7 250-7 375 MHz (space-to-Earth) and 7 900-8 025 MHz (Earth-to-space) are also allocated to the mobile-satellite service on a primary basis, subject to agreement obtained under No. 9.21.']),
(8025000000, 8175000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Space-To-Earth)', 'Fixed-Satellite (Earth-To-Space)', 'Mobile [5.463]'], [], ['[5.463]: Aircraft stations are not permitted to transmit in the band 8 025-8 400 MHz. (WRC-97)', '[5.462A]: In Regions 1 and 3 (except for Japan), in the band 8 025-8 400 MHz, the Earth exploration-satellite service using geostationary satellites shall not produce a power flux-density in excess of the following values for angles of arrival (q), without the consent of the affected administration:']),
(8175000000, 8215000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Space-To-Earth)', 'Fixed-Satellite (Earth-To-Space)', 'Meteorological-Satellite (Earth-To-Space)', 'Mobile [5.463]'], [], ['[5.463]: Aircraft stations are not permitted to transmit in the band 8 025-8 400 MHz. (WRC-97)', '[5.462A]: In Regions 1 and 3 (except for Japan), in the band 8 025-8 400 MHz, the Earth exploration-satellite service using geostationary satellites shall not produce a power flux-density in excess of the following values for angles of arrival (q), without the consent of the affected administration:']),
(8215000000, 8400000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Space-To-Earth)', 'Fixed-Satellite (Earth-To-Space)', 'Mobile [5.463]'], [], ['[5.463]: Aircraft stations are not permitted to transmit in the band 8 025-8 400 MHz. (WRC-97)', '[5.462A]: In Regions 1 and 3 (except for Japan), in the band 8 025-8 400 MHz, the Earth exploration-satellite service using geostationary satellites shall not produce a power flux-density in excess of the following values for angles of arrival (q), without the consent of the affected administration:']),
(8400000000, 8500000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile', 'Space Research (Space-To-Earth) [5.465][5.466]'], [], ['[5.465]: In the space research service, the use of the band 8 400-8 450 MHz is limited to deep space.', '[5.466]: Different category of service: in Singapore and Sri Lanka, the allocation of the band 8 400-8 500 MHz to the space research service is on a secondary basis (see No. 5.32). (WRC-12)']),
(8500000000, 8550000001): (False, False, False, False, False, ['Radiolocation'], [], ['[5.468]: Additional allocation: in Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, Burundi, Cameroon, China, Congo (Rep. of the), Djibouti, Egypt, the United Arab Emirates, Gabon, Guyana, Indonesia, Iran (Islamic Republic of), Iraq, Jamaica, Jordan, Kenya, Kuwait, Lebanon, Libya, Malaysia, Mali, Morocco, Mauritania, Nepal, Nigeria, Oman, Uganda, Pakistan, Qatar, Syrian Arab Republic, the Dem. People’s Rep. of Korea, Senegal, Singapore, Somalia, Sudan, Swaziland, Chad, Togo, Tunisia and Yemen, the frequency band 8 500-8 750 MHz is also allocated to the fixed and mobile services on a primary basis. (WRC-15)', '[5.469]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Hungary, Lithuania, Mongolia, Uzbekistan, Poland, Kyrgyzstan, the Czech Rep., Romania, Tajikistan, Turkmenistan and Ukraine, the band 8 500-8 750 MHz is also allocated to the land mobile and radionavigation services on a primary basis. (WRC-12)']),
(8550000000, 8650000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active)', 'Radiolocation', 'Space Research (Active)'], [], ['[5.468]: Additional allocation: in Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, Burundi, Cameroon, China, Congo (Rep. of the), Djibouti, Egypt, the United Arab Emirates, Gabon, Guyana, Indonesia, Iran (Islamic Republic of), Iraq, Jamaica, Jordan, Kenya, Kuwait, Lebanon, Libya, Malaysia, Mali, Morocco, Mauritania, Nepal, Nigeria, Oman, Uganda, Pakistan, Qatar, Syrian Arab Republic, the Dem. People’s Rep. of Korea, Senegal, Singapore, Somalia, Sudan, Swaziland, Chad, Togo, Tunisia and Yemen, the frequency band 8 500-8 750 MHz is also allocated to the fixed and mobile services on a primary basis. (WRC-15)', '[5.469]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Hungary, Lithuania, Mongolia, Uzbekistan, Poland, Kyrgyzstan, the Czech Rep., Romania, Tajikistan, Turkmenistan and Ukraine, the band 8 500-8 750 MHz is also allocated to the land mobile and radionavigation services on a primary basis. (WRC-12)', '[5.469A]: In the band 8 550-8 650 MHz, stations in the Earth exploration-satellite service (active) and space research service (active) shall not cause harmful interference to, or constrain the use and development of, stations of the radiolocation service. (WRC-97)']),
(8650000000, 8750000001): (False, False, False, False, False, ['Radiolocation'], [], ['[5.468]: Additional allocation: in Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, Burundi, Cameroon, China, Congo (Rep. of the), Djibouti, Egypt, the United Arab Emirates, Gabon, Guyana, Indonesia, Iran (Islamic Republic of), Iraq, Jamaica, Jordan, Kenya, Kuwait, Lebanon, Libya, Malaysia, Mali, Morocco, Mauritania, Nepal, Nigeria, Oman, Uganda, Pakistan, Qatar, Syrian Arab Republic, the Dem. People’s Rep. of Korea, Senegal, Singapore, Somalia, Sudan, Swaziland, Chad, Togo, Tunisia and Yemen, the frequency band 8 500-8 750 MHz is also allocated to the fixed and mobile services on a primary basis. (WRC-15)', '[5.469]: Additional allocation: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Hungary, Lithuania, Mongolia, Uzbekistan, Poland, Kyrgyzstan, the Czech Rep., Romania, Tajikistan, Turkmenistan and Ukraine, the band 8 500-8 750 MHz is also allocated to the land mobile and radionavigation services on a primary basis. (WRC-12)']),
(8750000000, 8850000001): (False, False, False, False, False, ['Radiolocation', 'Aeronautical Radionavigation [5.470]'], [], ['[5.470]: The use of the band 8 750-8 850 MHz by the aeronautical radionavigation service is limited to airborne Doppler navigation aids on a centre frequency of 8 800 MHz.', '[5.471]: Additional allocation: in Algeria, Germany, Bahrain, Belgium, China, Egypt, the United Arab Emirates, France, Greece, Indonesia, Iran (Islamic Republic of), Libya, the Netherlands, Qatar and Sudan, the frequency bands 8 825-8 850 MHz and 9 000-9 200 MHz are also allocated to the maritime radionavigation service, on a primary basis, for use by shore-based radars only. (WRC-15)']),
(8850000000, 9000000001): (False, False, False, False, False, ['Radiolocation', 'Maritime Radionavigation [5.472]'], [], ['[5.472]: In the bands 8 850-9 000 MHz and 9 200-9 225 MHz, the maritime radionavigation service is limited to shore-based radars.', '[5.473]: Additional allocation: in Armenia, Austria, Azerbaijan, Belarus, Cuba, the Russian Federation, Georgia, Hungary, Mongolia, Uzbekistan, Poland, Kyrgyzstan, Romania, Tajikistan, Turkmenistan and Ukraine, the bands 8 850-9 000 MHz and 9 200-9 300 MHz are also allocated to the radionavigation service on a primary basis. (WRC-07)']),
(9000000000, 9200000001): (False, False, False, False, False, ['Radiolocation', 'Aeronautical Radionavigation [5.337]'], [], ['[5.337]: The use of the bands 1 300-1 350 MHz, 2 700-2 900 MHz and 9 000-9 200 MHz by the aeronautical radionavigation service is restricted to ground-based radars and to associated airborne transponders which transmit only on frequencies in these bands and only when actuated by radars operating in the same band.', '[5.471]: Additional allocation: in Algeria, Germany, Bahrain, Belgium, China, Egypt, the United Arab Emirates, France, Greece, Indonesia, Iran (Islamic Republic of), Libya, the Netherlands, Qatar and Sudan, the frequency bands 8 825-8 850 MHz and 9 000-9 200 MHz are also allocated to the maritime radionavigation service, on a primary basis, for use by shore-based radars only. (WRC-15)', '[5.473A]: In the band 9 000-9 200 MHz, stations operating in the radiolocation service shall not cause harmful interference to, nor claim protection from, systems identified in No. 5.337 operating in the aeronautical radionavigation service, or radar systems in the maritime radionavigation service operating in this band on a primary basis in the countries listed in No. 5.471. (WRC-07)']),
(9200000000, 9300000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active) [5.474A][5.474B][5.474C]', 'Radiolocation', 'Maritime Radionavigation [5.472]'], [], ['[5.474A]: The use of the frequency bands 9 200-9 300 MHz and 9 900-10 400 MHz by the Earth exploration-satellite service (active) is limited to systems requiring necessary bandwidth greater than 600 MHz that cannot be fully accommodated within the frequency band 9 300-9 900 MHz. Such use is subject to agreement to be obtained under No. 9.21 from Algeria, Saudi Arabia, Bahrain, Egypt, Indonesia, Iran (Islamic Republic of), Lebanon and Tunisia. An administration that has not replied under No. 9.52 is considered as not having agreed to the coordination request. In this case, the notifying administration of the satellite system operating in the Earth exploration-satellite service (active) may request the assistance of the Bureau under Sub-Section IID of Article 9. (WRC-15)', '[5.474B]: Stations operating in the Earth exploration-satellite (active) service shall comply with Recommendation ITU-R RS.2066-0. (WRC-15)', '[5.474C]: Stations operating in the Earth exploration-satellite (active) service shall comply with Recommendation ITU-R RS.2065-0. (WRC-15)', '[5.472]: In the bands 8 850-9 000 MHz and 9 200-9 225 MHz, the maritime radionavigation service is limited to shore-based radars.', '[5.473]: Additional allocation: in Armenia, Austria, Azerbaijan, Belarus, Cuba, the Russian Federation, Georgia, Hungary, Mongolia, Uzbekistan, Poland, Kyrgyzstan, Romania, Tajikistan, Turkmenistan and Ukraine, the bands 8 850-9 000 MHz and 9 200-9 300 MHz are also allocated to the radionavigation service on a primary basis. (WRC-07)', '[5.474]: In the band 9 200-9 500 MHz, search and rescue transponders (SART) may be used, having due regard to the appropriate ITU-R Recommendation (see also Article 31).', '[5.474D]: Stations in the Earth exploration-satellite service (active) shall not cause harmful interference to, or claim protection from, stations of the maritime radionavigation and radiolocation services in the frequency band 9 200-9 300 MHz, the radionavigation and radiolocation services in the frequency band 9 900-10 000 MHz and the radiolocation service in the frequency band 10.0-10.4 GHz. (WRC-15)']),
(9300000000, 9500000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active)', 'Radiolocation', 'Radionavigation', 'Space Research (Active)'], [], ['[5.427]: In the bands 2 900-3 100 MHz and 9 300-9 500 MHz, the response from radar transponders shall not be capable of being confused with the response from radar beacons (racons) and shall not cause interference to ship or aeronautical radars in the radionavigation service, having regard, however, to No. 4.9.', '[5.474]: In the band 9 200-9 500 MHz, search and rescue transponders (SART) may be used, having due regard to the appropriate ITU-R Recommendation (see also Article 31).', '[5.475]: The use of the band 9 300-9 500 MHz by the aeronautical radionavigation service is limited to airborne weather radars and ground-based radars. In addition, ground-based radar beacons in the aeronautical radionavigation service are permitted in the band 9 300-9 320 MHz on condition that harmful interference is not caused to the maritime radionavigation service. (WRC-07)', '[5.475A]: The use of the band 9 300-9 500 MHz by the Earth exploration-satellite service (active) and the space research service (active) is limited to systems requiring necessary bandwidth greater than 300 MHz that cannot be fully accommodated within the 9 500-9 800 MHz band. (WRC-07)', '[5.475B]: In the band 9 300-9 500 MHz, stations operating in the radiolocation service shall not cause harmful interference to, nor claim protection from, radars operating in the radionavigation service in conformity with the Radio Regulations. Ground-based radars used for meteorological purposes have priority over other radiolocation uses. (WRC-07)', '[5.476A]: In the band 9 300-9 800 MHz, stations in the Earth exploration-satellite service (active) and space research service (active) shall not cause harmful interference to, nor claim protection from, stations of the radionavigation and radiolocation services. (WRC-07)']),
(9500000000, 9800000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active)', 'Radiolocation', 'Radionavigation', 'Space Research (Active)'], [], ['[5.476A]: In the band 9 300-9 800 MHz, stations in the Earth exploration-satellite service (active) and space research service (active) shall not cause harmful interference to, nor claim protection from, stations of the radionavigation and radiolocation services. (WRC-07)']),
(9800000000, 9900000001): (False, True, False, False, False, ['Radiolocation'], ['Earth Exploration-Satellite (Active)', 'Space Research (Active)'], ['[5.477]: Different category of service: in Algeria, Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, Cameroon, Djibouti, Egypt, the United Arab Emirates, Eritrea, Ethiopia, Guyana, India, Indonesia, Iran (Islamic Republic of), Iraq, Jamaica, Japan, Jordan, Kuwait, Lebanon, Liberia, Malaysia, Nigeria, Oman, Uganda, Pakistan, Qatar, Syrian Arab Republic, the Dem. People’s Rep. of Korea, Singapore, Somalia, Sudan, South Sudan, Trinidad and Tobago, and Yemen, the allocation of the frequency band 9 800-10 000 MHz to the fixed service is on a primary basis (see No. 5.33). (WRC-15)', '[5.478]: Additional allocation: in Azerbaijan, Mongolia, Kyrgyzstan, Romania, Turkmenistan and Ukraine, the band 9 800-10 000 MHz is also allocated to the radionavigation service on a primary basis. (WRC-07)', '[5.478A]: The use of the band 9 800-9 900 MHz by the Earth exploration-satellite service (active) and the space research service (active) is limited to systems requiring necessary bandwidth greater than 500 MHz that cannot be fully accommodated within the 9 300-9 800 MHz band. (WRC-07)', '[5.478B]: In the band 9 800-9 900 MHz, stations in the Earth exploration-satellite service (active) and space research service (active) shall not cause harmful interference to, nor claim protection from stations of the fixed service to which this band is allocated on a secondary basis. (WRC-07)']),
(9900000000, 10000000001): (False, True, False, False, False, ['Earth Exploration-Satellite (Active) [5.474A][5.474B][5.474C]', 'Radiolocation'], [], ['[5.474A]: The use of the frequency bands 9 200-9 300 MHz and 9 900-10 400 MHz by the Earth exploration-satellite service (active) is limited to systems requiring necessary bandwidth greater than 600 MHz that cannot be fully accommodated within the frequency band 9 300-9 900 MHz. Such use is subject to agreement to be obtained under No. 9.21 from Algeria, Saudi Arabia, Bahrain, Egypt, Indonesia, Iran (Islamic Republic of), Lebanon and Tunisia. An administration that has not replied under No. 9.52 is considered as not having agreed to the coordination request. In this case, the notifying administration of the satellite system operating in the Earth exploration-satellite service (active) may request the assistance of the Bureau under Sub-Section IID of Article 9. (WRC-15)', '[5.474B]: Stations operating in the Earth exploration-satellite (active) service shall comply with Recommendation ITU-R RS.2066-0. (WRC-15)', '[5.474C]: Stations operating in the Earth exploration-satellite (active) service shall comply with Recommendation ITU-R RS.2065-0. (WRC-15)', '[5.474D]: Stations in the Earth exploration-satellite service (active) shall not cause harmful interference to, or claim protection from, stations of the maritime radionavigation and radiolocation services in the frequency band 9 200-9 300 MHz, the radionavigation and radiolocation services in the frequency band 9 900-10 000 MHz and the radiolocation service in the frequency band 10.0-10.4 GHz. (WRC-15)', '[5.477]: Different category of service: in Algeria, Saudi Arabia, Bahrain, Bangladesh, Brunei Darussalam, Cameroon, Djibouti, Egypt, the United Arab Emirates, Eritrea, Ethiopia, Guyana, India, Indonesia, Iran (Islamic Republic of), Iraq, Jamaica, Japan, Jordan, Kuwait, Lebanon, Liberia, Malaysia, Nigeria, Oman, Uganda, Pakistan, Qatar, Syrian Arab Republic, the Dem. People’s Rep. of Korea, Singapore, Somalia, Sudan, South Sudan, Trinidad and Tobago, and Yemen, the allocation of the frequency band 9 800-10 000 MHz to the fixed service is on a primary basis (see No. 5.33). (WRC-15)', '[5.478]: Additional allocation: in Azerbaijan, Mongolia, Kyrgyzstan, Romania, Turkmenistan and Ukraine, the band 9 800-10 000 MHz is also allocated to the radionavigation service on a primary basis. (WRC-07)', '[5.479]: The band 9 975-10 025 MHz is also allocated to the meteorological-satellite service on a secondary basis for use by weather radars.']),
(10000000000, 10400000001): (True, True, True, False, False, ['Earth Exploration-Satellite (Active) [5.474A][5.474B][5.474C]', 'Radiolocation'], ['Amateur'], ['[5.474A]: The use of the frequency bands 9 200-9 300 MHz and 9 900-10 400 MHz by the Earth exploration-satellite service (active) is limited to systems requiring necessary bandwidth greater than 600 MHz that cannot be fully accommodated within the frequency band 9 300-9 900 MHz. Such use is subject to agreement to be obtained under No. 9.21 from Algeria, Saudi Arabia, Bahrain, Egypt, Indonesia, Iran (Islamic Republic of), Lebanon and Tunisia. An administration that has not replied under No. 9.52 is considered as not having agreed to the coordination request. In this case, the notifying administration of the satellite system operating in the Earth exploration-satellite service (active) may request the assistance of the Bureau under Sub-Section IID of Article 9. (WRC-15)', '[5.474B]: Stations operating in the Earth exploration-satellite (active) service shall comply with Recommendation ITU-R RS.2066-0. (WRC-15)', '[5.474C]: Stations operating in the Earth exploration-satellite (active) service shall comply with Recommendation ITU-R RS.2065-0. (WRC-15)', '[5.474D]: Stations in the Earth exploration-satellite service (active) shall not cause harmful interference to, or claim protection from, stations of the maritime radionavigation and radiolocation services in the frequency band 9 200-9 300 MHz, the radionavigation and radiolocation services in the frequency band 9 900-10 000 MHz and the radiolocation service in the frequency band 10.0-10.4 GHz. (WRC-15)', '[5.479]: The band 9 975-10 025 MHz is also allocated to the meteorological-satellite service on a secondary basis for use by weather radars.']),
(10400000000, 10450000001): (True, True, True, False, False, ['Radiolocation'], ['Amateur'], []),
(10450000000, 10500000001): (True, False, False, False, False, ['Radiolocation'], ['Amateur', 'Amateur-Satellite'], ["[5.481]: Additional allocation: in Algeria, Germany, Angola, Brazil, China, Côte d'Ivoire, El Salvador, Ecuador, Spain, Guatemala, Hungary, Japan, Kenya, Morocco, Nigeria, Oman, Uzbekistan, Pakistan, Paraguay, Peru, the Dem. People’s Rep. of Korea, Romania and Uruguay, the frequency band 10.45-10.5 GHz is also allocated to the fixed and mobile services on a primary basis. In Costa Rica, the frequency band 10.45-10.5 GHz is also allocated to the fixed service on a primary basis. (WRC-15)"]),
(10500000000, 10550000001): (False, True, True, False, False, [], ['Radiolocation'], []),
(10550000000, 10600000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], ['Radiolocation'], []),
(10600000000, 10680000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Passive)', 'Mobile Except Aeronautical Mobile', 'Radio Astronomy', 'Space Research (Passive)'], ['Radiolocation'], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.482]: In the band 10.6-10.68 GHz, the power delivered to the antenna of stations of the fixed and mobile, except aeronautical mobile, services shall not exceed −3 dBW. This limit may be exceeded, subject to agreement obtained under No. 9.21. However, in Algeria, Saudi Arabia, Armenia, Azerbaijan, Bahrain, Bangladesh, Belarus, Egypt, United Arab Emirates, Georgia, India, Indonesia, Iran (Islamic Republic of), Iraq, Jordan, Kazakhstan, Kuwait, Lebanon, Libya, Morocco, Mauritania, Moldova, Nigeria, Oman, Uzbekistan, Pakistan, Philippines, Qatar, Syrian Arab Republic, Kyrgyzstan, Singapore, Tajikistan, Tunisia, Turkmenistan and Viet Nam, this restriction on the fixed and mobile, except aeronautical mobile, services is not applicable. (WRC-07)', '[5.482A]: For sharing of the band 10.6-10.68 GHz between the Earth exploration-satellite (passive) service and the fixed and mobile, except aeronautical mobile, services, Resolution 751 (WRC-07) applies. (WRC-07)']),
(10680000000, 10700000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03) ', '[5.483]: Additional allocation: in Saudi Arabia, Armenia, Azerbaijan, Bahrain, Belarus, China, Colombia, Korea (Rep. of), Costa Rica, Egypt, the United Arab Emirates, Georgia, Iran (Islamic Republic of), Iraq, Israel, Jordan, Kazakhstan, Kuwait, Lebanon, Mongolia, Qatar, Kyrgyzstan, the Dem. People’s Rep. of Korea, Tajikistan, Turkmenistan and Yemen, the band 10.68-10.7 GHz is also allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. Such use is limited to equipment in operation by 1 January 1985. (WRC-12)']),
(10700000000, 10950000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth) [5.441]', 'Fixed-Satellite (Earth-To-Space) [5.484]', 'Mobile Except Aeronautical Mobile'], [], ['[5.441]: The use of the bands 4 500-4 800 MHz (space-to-Earth), 6 725-7 025 MHz (Earth-to-space) by the fixed-satellite service shall be in accordance with the provisions of Appendix 30B. The use of the bands 10.7-10.95 GHz (space-to-Earth), 11.2-11.45 GHz (space-to-Earth) and 12.75-13.25 GHz (Earth-to-space) by geostationary-satellite systems in the fixed-satellite service shall be in accordance with the provisions of Appendix 30B. The use of the bands 10.7-10.95 GHz (space-to-Earth), 11.2-11.45 GHz (space-to-Earth) and 12.75-13.25 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484]: In Region 1, the use of the band 10.7-11.7 GHz by the fixed-satellite service (Earth-to-space) is limited to feeder links for the broadcasting-satellite service.']),
(10950000000, 11200000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth) [5.484A][5.484B]', 'Fixed-Satellite (Earth-To-Space) [5.484]', 'Mobile Except Aeronautical Mobile'], [], ['[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484B]: Resolution 155 (WRC-15) shall apply. (WRC-15)', '[5.484]: In Region 1, the use of the band 10.7-11.7 GHz by the fixed-satellite service (Earth-to-space) is limited to feeder links for the broadcasting-satellite service.']),
(11200000000, 11450000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth) [5.441]', 'Fixed-Satellite (Earth-To-Space) [5.484]', 'Mobile Except Aeronautical Mobile'], [], ['[5.441]: The use of the bands 4 500-4 800 MHz (space-to-Earth), 6 725-7 025 MHz (Earth-to-space) by the fixed-satellite service shall be in accordance with the provisions of Appendix 30B. The use of the bands 10.7-10.95 GHz (space-to-Earth), 11.2-11.45 GHz (space-to-Earth) and 12.75-13.25 GHz (Earth-to-space) by geostationary-satellite systems in the fixed-satellite service shall be in accordance with the provisions of Appendix 30B. The use of the bands 10.7-10.95 GHz (space-to-Earth), 11.2-11.45 GHz (space-to-Earth) and 12.75-13.25 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484]: In Region 1, the use of the band 10.7-11.7 GHz by the fixed-satellite service (Earth-to-space) is limited to feeder links for the broadcasting-satellite service.']),
(11450000000, 11700000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth) [5.484A][5.484B]', 'Fixed-Satellite (Earth-To-Space) [5.484]', 'Mobile Except Aeronautical Mobile'], [], ['[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484B]: Resolution 155 (WRC-15) shall apply. (WRC-15)', '[5.484]: In Region 1, the use of the band 10.7-11.7 GHz by the fixed-satellite service (Earth-to-space) is limited to feeder links for the broadcasting-satellite service.']),
(11700000000, 12500000001): (False, True, True, True, False, ['Mobile Except Aeronautical Mobile', 'Broadcasting', 'Broadcasting-Satellite [5.492]'], [], ['[5.492]: Assignments to stations of the broadcasting-satellite service which are in conformity with the appropriate regional Plan or included in the Regions 1 and 3 List in Appendix 30 may also be used for transmissions in the fixed-satellite service (space-to-Earth), provided that such transmissions do not cause more interference, or require more protection from interference, than the broadcasting-satellite service transmissions operating in conformity with the Plan or the List, as appropriate. (WRC-2000)', '[5.487]: In the band 11.7-12.5 GHz in Regions 1 and 3, the fixed, fixed-satellite, mobile, except aeronautical mobile, and broadcasting services, in accordance with their respective allocations, shall not cause harmful interference to, or claim protection from, broadcasting-satellite stations operating in accordance with the Regions 1 and 3 Plan in Appendix 30. (WRC-03)', '[5.487A]: Additional allocation: in Region 1, the band 11.7-12.5 GHz, in Region 2, the band 12.2-12.7 GHz and, in Region 3, the band 11.7-12.2 GHz, are also allocated to the fixed-satellite service (space-to-Earth) on a primary basis, limited to non-geostationary systems and subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the broadcasting-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-03)']),
(12500000000, 12750000001): (False, False, False, False, False, ['Fixed-Satellite (Space-To-Earth) [5.484A][5.484B]', 'Fixed-Satellite (Earth-To-Space)'], [], ['[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484B]: Resolution 155 (WRC-15) shall apply. (WRC-15)', '[5.494]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Cameroon, the Central African Rep., Congo (Rep. of the), Côte d’Ivoire, Djibouti, Egypt, the United Arab Emirates, Eritrea, Ethiopia, Gabon, Ghana, Guinea, Iraq, Israel, Jordan, Kuwait, Lebanon, Libya, Madagascar, Mali, Morocco, Mongolia, Nigeria, Oman, Qatar, the Syrian Arab Republic, the Dem. Rep. of the Congo, Somalia, Sudan, South Sudan, Chad, Togo and Yemen, the frequency band 12.5-12.75 GHz is also allocated to the fixed and mobile, except aeronautical mobile, services on a primary basis. (WRC-15)', '[5.495]: Additional allocation: in France, Greece, Monaco, Montenegro, Uganda, Romania and Tunisia, the frequency band 12.5-12.75 GHz is also allocated to the fixed and mobile, except aeronautical mobile, services on a secondary basis. (WRC-15)', '[5.496]: Additional allocation: in Austria, Azerbaijan, Kyrgyzstan and Turkmenistan, the band 12.5-12.75 GHz is also allocated to the fixed service and the mobile, except aeronautical mobile, service on a primary basis. However, stations in these services shall not cause harmful interference to fixed-satellite service earth stations of countries in Region 1 other than those listed in this footnote. Coordination of these earth stations is not required with stations of the fixed and mobile services of the countries listed in this footnote. The power flux-density limit at the Earth’s surface given in Table 21-4 of Article 21, for the fixed-satellite service shall apply on the territory of the countries listed in this footnote. (WRC-2000)']),
(12750000000, 13250000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.441]'], ['Space Research (Deep Space)', 'Space Research (Space-To-Earth)'], ['[5.441]: The use of the bands 4 500-4 800 MHz (space-to-Earth), 6 725-7 025 MHz (Earth-to-space) by the fixed-satellite service shall be in accordance with the provisions of Appendix 30B. The use of the bands 10.7-10.95 GHz (space-to-Earth), 11.2-11.45 GHz (space-to-Earth) and 12.75-13.25 GHz (Earth-to-space) by geostationary-satellite systems in the fixed-satellite service shall be in accordance with the provisions of Appendix 30B. The use of the bands 10.7-10.95 GHz (space-to-Earth), 11.2-11.45 GHz (space-to-Earth) and 12.75-13.25 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)']),
(13250000000, 13400000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active)', 'Aeronautical Radionavigation [5.497]', 'Space Research (Active)'], [], ['[5.497]: The use of the band 13.25-13.4 GHz by the aeronautical radionavigation service is limited to Doppler navigation aids.', '[5.498A]: The Earth exploration-satellite (active) and space research (active) services operating in the band 13.25-13.4 GHz shall not cause harmful interference to, or constrain the use and development of, the aeronautical radionavigation service. (WRC-97)', '[5.499]: Additional allocation: in Bangladesh and India, the band 13.25-14 GHz is also allocated to the fixed service on a primary basis. In Pakistan, the band 13.25-13.75 GHz is allocated to the fixed service on a primary basis. (WRC-12)']),
(13400000000, 13650000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active)', 'Fixed-Satellite (Space-To-Earth) [5.499A][5.499B]', 'Radiolocation', 'Space Research [5.499C][5.499D]'], ['Standard Frequency And Time Signal-Satellite (Earth-To-Space)'], ['[5.499A]: The use of the frequency band 13.4-13.65 GHz by the fixed-satellite service (space-to-Earth) is limited to geostationary-satellite systems and is subject to agreement obtained under No. 9.21 with respect to satellite systems operating in the space research service (space-to-space) to relay data from space stations in the geostationary-satellite orbit to associated space stations in non-geostationary satellite orbits for which advance publication information has been received by the Bureau by 27 November 2015. (WRC-15)', '[5.499B]: Administrations shall not preclude the deployment and operation of transmitting earth stations in the standard frequency and time signal-satellite service (Earth-to-space) allocated on a secondary basis in the frequency band 13.4-13.65 GHz due to the primary allocation to FSS (space-to-Earth). (WRC-15)', '[5.499C]: The allocation of the frequency band 13.4-13.65 GHz to the space research service on a primary basis is limited to:– satellite systems operating in the space research service (space-to-space) to relay data from space stations in the geostationary-satellite orbit to associated space stations in non-geostationary satellite orbits for which advance publication information has been received by the Bureau by 27 November 2015, – active spaceborne sensors, – satellite systems operating in the space research service (space-to-Earth) to relay data from space stations in the geostationary-satellite orbit to associated earth stations. Other uses of the frequency band by the space research service are on a secondary basis. (WRC-15) ', '[5.499D]: In the frequency band 13.4-13.65 GHz, satellite systems in the space research service (space-to-Earth) and/or the space research service (space-to-space) shall not cause harmful interference to, nor claim protection from, stations in the fixed, mobile, radiolocation and Earth exploration-satellite (active) services. (WRC-15)', '[5.499]: Additional allocation: in Bangladesh and India, the band 13.25-14 GHz is also allocated to the fixed service on a primary basis. In Pakistan, the band 13.25-13.75 GHz is allocated to the fixed service on a primary basis. (WRC-12)', '[5.499E]: In the frequency band 13.4-13.65 GHz, geostationary-satellite networks in the fixed-satellite service (space-to-Earth) shall not claim protection from space stations in the Earth exploration-satellite service (active) operating in accordance with these Regulations, and No. 5.43A does not apply. The provisions of No. 22.2 do not apply to the Earth exploration-satellite service (active) with respect to the fixed-satellite service (space-to-Earth) in this frequency band. (WRC-15)', '[5.500]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Brunei Darussalam, Cameroon, Egypt, the United Arab Emirates, Gabon, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Jordan, Kuwait, Lebanon, Madagascar, Malaysia, Mali, Morocco, Mauritania, Niger, Nigeria, Oman, Qatar, the Syrian Arab Republic, Singapore, Sudan, South Sudan, Chad and Tunisia, the frequency band 13.4-14 GHz is also allocated to the fixed and mobile services on a primary basis. In Pakistan, the frequency band 13.4-13.75 GHz is also allocated to the fixed and mobile services on a primary basis. (WRC-15)', '[5.501]: Additional allocation: in Azerbaijan, Hungary, Japan, Kyrgyzstan, Romania and Turkmenistan, the band 13.4-14 GHz is also allocated to the radionavigation service on a primary basis. (WRC-12)', '[5.501B]: In the band 13.4-13.75 GHz, the Earth exploration-satellite (active) and space research (active) services shall not cause harmful interference to, or constrain the use and development of, the radiolocation service. (WRC-97)']),
(13650000000, 13750000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active)', 'Radiolocation', 'Space Research [5.501A]'], ['Standard Frequency And Time Signal-Satellite (Earth-To-Space)'], ['[5.501A]: The allocation of the frequency band 13.65-13.75 GHz to the space research service on a primary basis is limited to active spaceborne sensors. Other uses of the frequency band by the space research service are on a secondary basis. (WRC-15)', '[5.499]: Additional allocation: in Bangladesh and India, the band 13.25-14 GHz is also allocated to the fixed service on a primary basis. In Pakistan, the band 13.25-13.75 GHz is allocated to the fixed service on a primary basis. (WRC-12)', '[5.500]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Brunei Darussalam, Cameroon, Egypt, the United Arab Emirates, Gabon, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Jordan, Kuwait, Lebanon, Madagascar, Malaysia, Mali, Morocco, Mauritania, Niger, Nigeria, Oman, Qatar, the Syrian Arab Republic, Singapore, Sudan, South Sudan, Chad and Tunisia, the frequency band 13.4-14 GHz is also allocated to the fixed and mobile services on a primary basis. In Pakistan, the frequency band 13.4-13.75 GHz is also allocated to the fixed and mobile services on a primary basis. (WRC-15)', '[5.501]: Additional allocation: in Azerbaijan, Hungary, Japan, Kyrgyzstan, Romania and Turkmenistan, the band 13.4-14 GHz is also allocated to the radionavigation service on a primary basis. (WRC-12)', '[5.501B]: In the band 13.4-13.75 GHz, the Earth exploration-satellite (active) and space research (active) services shall not cause harmful interference to, or constrain the use and development of, the radiolocation service. (WRC-97)']),
(13750000000, 14000000001): (False, False, False, False, False, ['Fixed-Satellite (Earth-To-Space) [5.484A]', 'Radiolocation'], ['Earth Exploration-Satellite', 'Standard Frequency And Time Signal-Satellite (Earth-To-Space)', 'Space Research'], ['[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.499]: Additional allocation: in Bangladesh and India, the band 13.25-14 GHz is also allocated to the fixed service on a primary basis. In Pakistan, the band 13.25-13.75 GHz is allocated to the fixed service on a primary basis. (WRC-12)', '[5.500]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Brunei Darussalam, Cameroon, Egypt, the United Arab Emirates, Gabon, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Jordan, Kuwait, Lebanon, Madagascar, Malaysia, Mali, Morocco, Mauritania, Niger, Nigeria, Oman, Qatar, the Syrian Arab Republic, Singapore, Sudan, South Sudan, Chad and Tunisia, the frequency band 13.4-14 GHz is also allocated to the fixed and mobile services on a primary basis. In Pakistan, the frequency band 13.4-13.75 GHz is also allocated to the fixed and mobile services on a primary basis. (WRC-15)', '[5.501]: Additional allocation: in Azerbaijan, Hungary, Japan, Kyrgyzstan, Romania and Turkmenistan, the band 13.4-14 GHz is also allocated to the radionavigation service on a primary basis. (WRC-12)', '[5.502]: In the band 13.75-14 GHz, an earth station of a geostationary fixed-satellite service network shall have a minimum antenna diameter of 1.2 m and an earth station of a non-geostationary fixed-satellite service system shall have a minimum antenna diameter of 4.5 m. In addition, the e.i.r.p., averaged over one second, radiated by a station in the radiolocation or radionavigation services shall not exceed 59 dBW for elevation angles above 2° and 65 dBW at lower angles. Before an administration brings into use an earth station in a geostationary-satellite network in the fixed-satellite service in this band with an antenna diameter smaller than 4.5 m, it shall ensure that the power flux-density produced by this earth station does not exceed:– –115 dB(W/(m2 · 10 MHz)) for more than 1% of the time produced at 36 m above sea level at the low water mark, as officially recognized by the coastal State; – –115 dB(W/(m2 · 10 MHz)) for more than 1% of the time produced 3 m above ground at the border of the territory of an administration deploying or planning to deploy land mobile radars in this band, unless prior agreement has been obtained. For earth stations within the fixed-satellite service having an antenna diameter greater than or equal to 4.5 m, the e.i.r.p. of any emission should be at least 68 dBW and should not exceed 85 dBW. (WRC-03) ', '[5.503]: In the band 13.75-14 GHz, geostationary space stations in the space research service for which information for advance publication has been received by the Bureau prior to 31 January 1992 shall operate on an equal basis with stations in the fixed-satellite service; after that date, new geostationary space stations in the space research service will operate on a secondary basis. Until those geostationary space stations in the space research service for which information for advance publication has been received by the Bureau prior to 31 January 1992 cease to operate in this band:– in the band 13.77-13.78 GHz, the e.i.r.p. density of emissions from any earth station in the fixed-satellite service operating with a space station in geostationary-satellite orbit shall not exceed: i) 4.7D + 28 dB(W/40 kHz), where D is the fixed-satellite service earth station antenna diameter (m) for antenna diameters equal to or greater than 1.2 m and less than 4.5 m; ii) 49.2 + 20 log(D/4.5) dB(W/40 kHz), where D is the fixed-satellite service earth station antenna diameter (m) for antenna diameters equal to or greater than 4.5 m and less than 31.9 m; iii) 66.2 dB(W/40 kHz) for any fixed-satellite service earth station for antenna diameters (m) equal to or greater than 31.9 m; iv) 56.2 dB(W/4 kHz) for narrow-band (less than 40 kHz of necessary bandwidth) fixed-satellite service earth station emissions from any fixed-satellite service earth station having an antenna diameter of 4.5 m or greater; – the e.i.r.p. density of emissions from any earth station in the fixed-satellite service operating with a space station in non-geostationary-satellite orbit shall not exceed 51 dBW in the 6 MHz band from 13.772 to 13.778 GHz. Automatic power control may be used to increase the e.i.r.p. density in these frequency ranges to compensate for rain attenuation, to the extent that the power flux-density at the fixed-satellite service space station does not exceed the value resulting from use by an earth station of an e.i.r.p. meeting the above limits in clear-sky conditions. (WRC-03)']),
(14000000000, 14250000001): (False, False, False, False, False, ['Fixed-Satellite (Earth-To-Space) [5.457A][5.457B][5.484A][5.484B][5.506][5.506B]', 'Radionavigation [5.504]'], ['Mobile-Satellite (Earth-To-Space) [5.504B][5.504C][5.506A]', 'Space Research'], ['[5.457A]: In the frequency bands 5 925-6 425 MHz and 14-14.5 GHz, earth stations located on board vessels may communicate with space stations of the fixed-satellite service. Such use shall be in accordance with Resolution 902 (WRC-03). In the frequency band 5 925-6 425 MHz, earth stations located on board vessels and communicating with space stations of the fixed-satellite service may employ transmit antennas with minimum diameter of 1.2 m and operate without prior agreement of any administration if located at least 330 km away from the low-water mark as officially recognized by the coastal State. All other provisions of Resolution 902 (WRC-03) shall apply. (WRC-15)', '[5.457B]: In the frequency bands 5 925-6 425 MHz and 14-14.5 GHz, earth stations located on board vessels may operate with the characteristics and under the conditions contained in Resolution 902 (WRC-03) in Algeria, Saudi Arabia, Bahrain, Comoros, Djibouti, Egypt, United Arab Emirates, Jordan, Kuwait, Libya, Morocco, Mauritania, Oman, Qatar, the Syrian Arab Republic, Sudan, Tunisia and Yemen, in the maritime mobile-satellite service on a secondary basis. Such use shall be in accordance with Resolution 902 (WRC-03). (WRC-15)', '[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484B]: Resolution 155 (WRC-15) shall apply. (WRC-15)', '[5.506]: The band 14-14.5 GHz may be used, within the fixed-satellite service (Earth-to-space), for feeder links for the broadcasting-satellite service, subject to coordination with other networks in the fixed-satellite service. Such use of feeder links is reserved for countries outside Europe.', '[5.506B]: Earth stations located on board vessels communicating with space stations in the fixed-satellite service may operate in the frequency band 14-14.5 GHz without the need for prior agreement from Cyprus and Malta, within the minimum distance given in Resolution 902 (WRC-03) from these countries. (WRC-15)', '[5.504]: The use of the band 14-14.3 GHz by the radionavigation service shall be such as to provide sufficient protection to space stations of the fixed-satellite service.', '[5.504B]: Aircraft earth stations operating in the aeronautical mobile-satellite service in the frequency band 14-14.5 GHz shall comply with the provisions of Annex 1, Part C of Recommendation ITU-R M.1643-0, with respect to any radio astronomy station performing observations in the 14.47-14.5 GHz frequency band located on the territory of Spain, France, India, Italy, the United Kingdom and South Africa. (WRC-15)', '[5.504C]: In the frequency band 14-14.25 GHz, the power flux-density produced on the territory of the countries of Saudi Arabia, Bahrain, Botswana, Côte d’Ivoire, Egypt, Guinea, India, Iran (Islamic Republic of), Kuwait, Nigeria, Oman, the Syrian Arab Republic and Tunisia by any aircraft earth station in the aeronautical mobile-satellite service shall not exceed the limits given in Annex 1, Part B of Recommendation ITU-R M.1643-0, unless otherwise specifically agreed by the affected administration(s). The provisions of this footnote in no way derogate the obligations of the aeronautical mobile-satellite service to operate as a secondary service in accordance with No. 5.29. (WRC-15)', '[5.506A]: In the band 14-14.5 GHz, ship earth stations with an e.i.r.p. greater than 21 dBW shall operate under the same conditions as earth stations located on board vessels, as provided in Resolution 902 (WRC-03). This footnote shall not apply to ship earth stations for which the complete Appendix 4 information has been received by the Bureau prior to 5 July 2003. (WRC-03)', '[5.504A]: In the band 14-14.5 GHz, aircraft earth stations in the secondary aeronautical mobile-satellite service may also communicate with space stations in the fixed-satellite service. The provisions of Nos. 5.29, 5.30 and 5.31 apply. (WRC-03)', '[5.505]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Botswana, Brunei Darussalam, Cameroon, China, Congo (Rep. of the), Korea (Rep. of), Djibouti, Egypt, the United Arab Emirates, Gabon, Guinea, India, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Japan, Jordan, Kuwait, Lebanon, Malaysia, Mali, Morocco, Mauritania, Oman, the Philippines, Qatar, the Syrian Arab Republic, the Dem. People’s Rep. of Korea, Singapore, Somalia, Sudan, South Sudan, Swaziland, Chad, Viet Nam and Yemen, the frequency band 14-14.3 GHz is also allocated to the fixed service on a primary basis. (WRC-15)']),
(14250000000, 14300000001): (False, False, False, False, False, ['Fixed-Satellite (Earth-To-Space) [5.457A][5.457B][5.484A][5.484B][5.506][5.506B]', 'Radionavigation [5.504]'], ['Mobile-Satellite (Earth-To-Space) [5.504B][5.506A][5.508A]', 'Space Research'], ['[5.457A]: In the frequency bands 5 925-6 425 MHz and 14-14.5 GHz, earth stations located on board vessels may communicate with space stations of the fixed-satellite service. Such use shall be in accordance with Resolution 902 (WRC-03). In the frequency band 5 925-6 425 MHz, earth stations located on board vessels and communicating with space stations of the fixed-satellite service may employ transmit antennas with minimum diameter of 1.2 m and operate without prior agreement of any administration if located at least 330 km away from the low-water mark as officially recognized by the coastal State. All other provisions of Resolution 902 (WRC-03) shall apply. (WRC-15)', '[5.457B]: In the frequency bands 5 925-6 425 MHz and 14-14.5 GHz, earth stations located on board vessels may operate with the characteristics and under the conditions contained in Resolution 902 (WRC-03) in Algeria, Saudi Arabia, Bahrain, Comoros, Djibouti, Egypt, United Arab Emirates, Jordan, Kuwait, Libya, Morocco, Mauritania, Oman, Qatar, the Syrian Arab Republic, Sudan, Tunisia and Yemen, in the maritime mobile-satellite service on a secondary basis. Such use shall be in accordance with Resolution 902 (WRC-03). (WRC-15)', '[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484B]: Resolution 155 (WRC-15) shall apply. (WRC-15)', '[5.506]: The band 14-14.5 GHz may be used, within the fixed-satellite service (Earth-to-space), for feeder links for the broadcasting-satellite service, subject to coordination with other networks in the fixed-satellite service. Such use of feeder links is reserved for countries outside Europe.', '[5.506B]: Earth stations located on board vessels communicating with space stations in the fixed-satellite service may operate in the frequency band 14-14.5 GHz without the need for prior agreement from Cyprus and Malta, within the minimum distance given in Resolution 902 (WRC-03) from these countries. (WRC-15)', '[5.504]: The use of the band 14-14.3 GHz by the radionavigation service shall be such as to provide sufficient protection to space stations of the fixed-satellite service.', '[5.504B]: Aircraft earth stations operating in the aeronautical mobile-satellite service in the frequency band 14-14.5 GHz shall comply with the provisions of Annex 1, Part C of Recommendation ITU-R M.1643-0, with respect to any radio astronomy station performing observations in the 14.47-14.5 GHz frequency band located on the territory of Spain, France, India, Italy, the United Kingdom and South Africa. (WRC-15)', '[5.506A]: In the band 14-14.5 GHz, ship earth stations with an e.i.r.p. greater than 21 dBW shall operate under the same conditions as earth stations located on board vessels, as provided in Resolution 902 (WRC-03). This footnote shall not apply to ship earth stations for which the complete Appendix 4 information has been received by the Bureau prior to 5 July 2003. (WRC-03)', '[5.508A]: In the frequency band 14.25-14.3 GHz, the power flux-density produced on the territory of the countries of Saudi Arabia, Bahrain, Botswana, China, Côte d’Ivoire, Egypt, France, Guinea, India, Iran (Islamic Republic of), Italy, Kuwait, Nigeria, Oman, the Syrian Arab Republic, the United Kingdom and Tunisia by any aircraft earth station in the aeronautical mobile-satellite service shall not exceed the limits given in Annex 1, Part B of Recommendation ITU-R M.1643-0, unless otherwise specifically agreed by the affected administration(s). The provisions of this footnote in no way derogate the obligations of the aeronautical mobile-satellite service to operate as a secondary service in accordance with No. 5.29. (WRC-15)', '[5.504A]: In the band 14-14.5 GHz, aircraft earth stations in the secondary aeronautical mobile-satellite service may also communicate with space stations in the fixed-satellite service. The provisions of Nos. 5.29, 5.30 and 5.31 apply. (WRC-03)', '[5.505]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Botswana, Brunei Darussalam, Cameroon, China, Congo (Rep. of the), Korea (Rep. of), Djibouti, Egypt, the United Arab Emirates, Gabon, Guinea, India, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Japan, Jordan, Kuwait, Lebanon, Malaysia, Mali, Morocco, Mauritania, Oman, the Philippines, Qatar, the Syrian Arab Republic, the Dem. People’s Rep. of Korea, Singapore, Somalia, Sudan, South Sudan, Swaziland, Chad, Viet Nam and Yemen, the frequency band 14-14.3 GHz is also allocated to the fixed service on a primary basis. (WRC-15)', '[5.508]: Additional allocation: in Germany, France, Italy, Libya, The Former Yugoslav Rep. of Macedonia and the United Kingdom, the band 14.25-14.3 GHz is also allocated to the fixed service on a primary basis. (WRC-12)']),
(14300000000, 14400000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.457A][5.457B][5.484A][5.484B][5.506][5.506B]', 'Mobile Except Aeronautical Mobile'], ['Mobile-Satellite (Earth-To-Space) [5.504B][5.506A][5.509A]', 'Radionavigation-Satellite'], ['[5.457A]: In the frequency bands 5 925-6 425 MHz and 14-14.5 GHz, earth stations located on board vessels may communicate with space stations of the fixed-satellite service. Such use shall be in accordance with Resolution 902 (WRC-03). In the frequency band 5 925-6 425 MHz, earth stations located on board vessels and communicating with space stations of the fixed-satellite service may employ transmit antennas with minimum diameter of 1.2 m and operate without prior agreement of any administration if located at least 330 km away from the low-water mark as officially recognized by the coastal State. All other provisions of Resolution 902 (WRC-03) shall apply. (WRC-15)', '[5.457B]: In the frequency bands 5 925-6 425 MHz and 14-14.5 GHz, earth stations located on board vessels may operate with the characteristics and under the conditions contained in Resolution 902 (WRC-03) in Algeria, Saudi Arabia, Bahrain, Comoros, Djibouti, Egypt, United Arab Emirates, Jordan, Kuwait, Libya, Morocco, Mauritania, Oman, Qatar, the Syrian Arab Republic, Sudan, Tunisia and Yemen, in the maritime mobile-satellite service on a secondary basis. Such use shall be in accordance with Resolution 902 (WRC-03). (WRC-15)', '[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484B]: Resolution 155 (WRC-15) shall apply. (WRC-15)', '[5.506]: The band 14-14.5 GHz may be used, within the fixed-satellite service (Earth-to-space), for feeder links for the broadcasting-satellite service, subject to coordination with other networks in the fixed-satellite service. Such use of feeder links is reserved for countries outside Europe.', '[5.506B]: Earth stations located on board vessels communicating with space stations in the fixed-satellite service may operate in the frequency band 14-14.5 GHz without the need for prior agreement from Cyprus and Malta, within the minimum distance given in Resolution 902 (WRC-03) from these countries. (WRC-15)', '[5.504B]: Aircraft earth stations operating in the aeronautical mobile-satellite service in the frequency band 14-14.5 GHz shall comply with the provisions of Annex 1, Part C of Recommendation ITU-R M.1643-0, with respect to any radio astronomy station performing observations in the 14.47-14.5 GHz frequency band located on the territory of Spain, France, India, Italy, the United Kingdom and South Africa. (WRC-15)', '[5.506A]: In the band 14-14.5 GHz, ship earth stations with an e.i.r.p. greater than 21 dBW shall operate under the same conditions as earth stations located on board vessels, as provided in Resolution 902 (WRC-03). This footnote shall not apply to ship earth stations for which the complete Appendix 4 information has been received by the Bureau prior to 5 July 2003. (WRC-03)', '[5.509A]: In the frequency band 14.3-14.5 GHz, the power flux-density produced on the territory of the countries of Saudi Arabia, Bahrain, Botswana, Cameroon, China, Côte d’Ivoire, Egypt, France, Gabon, Guinea, India, Iran (Islamic Republic of), Italy, Kuwait, Morocco, Nigeria, Oman, the Syrian Arab Republic, the United Kingdom, Sri Lanka, Tunisia and Viet Nam by any aircraft earth station in the aeronautical mobile-satellite service shall not exceed the limits given in Annex 1, Part B of Recommendation ITU-R M.1643-0, unless otherwise specifically agreed by the affected administration(s). The provisions of this footnote in no way derogate the obligations of the aeronautical mobile-satellite service to operate as a secondary service in accordance with No. 5.29. (WRC-15)', '[5.504A]: In the band 14-14.5 GHz, aircraft earth stations in the secondary aeronautical mobile-satellite service may also communicate with space stations in the fixed-satellite service. The provisions of Nos. 5.29, 5.30 and 5.31 apply. (WRC-03)']),
(14400000000, 14470000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.457A][5.457B][5.484A][5.484B][5.506][5.506B]', 'Mobile Except Aeronautical Mobile'], ['Mobile-Satellite (Earth-To-Space) [5.504B][5.506A][5.509A]', 'Space Research (Space-To-Earth)'], ['[5.457A]: In the frequency bands 5 925-6 425 MHz and 14-14.5 GHz, earth stations located on board vessels may communicate with space stations of the fixed-satellite service. Such use shall be in accordance with Resolution 902 (WRC-03). In the frequency band 5 925-6 425 MHz, earth stations located on board vessels and communicating with space stations of the fixed-satellite service may employ transmit antennas with minimum diameter of 1.2 m and operate without prior agreement of any administration if located at least 330 km away from the low-water mark as officially recognized by the coastal State. All other provisions of Resolution 902 (WRC-03) shall apply. (WRC-15)', '[5.457B]: In the frequency bands 5 925-6 425 MHz and 14-14.5 GHz, earth stations located on board vessels may operate with the characteristics and under the conditions contained in Resolution 902 (WRC-03) in Algeria, Saudi Arabia, Bahrain, Comoros, Djibouti, Egypt, United Arab Emirates, Jordan, Kuwait, Libya, Morocco, Mauritania, Oman, Qatar, the Syrian Arab Republic, Sudan, Tunisia and Yemen, in the maritime mobile-satellite service on a secondary basis. Such use shall be in accordance with Resolution 902 (WRC-03). (WRC-15)', '[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484B]: Resolution 155 (WRC-15) shall apply. (WRC-15)', '[5.506]: The band 14-14.5 GHz may be used, within the fixed-satellite service (Earth-to-space), for feeder links for the broadcasting-satellite service, subject to coordination with other networks in the fixed-satellite service. Such use of feeder links is reserved for countries outside Europe.', '[5.506B]: Earth stations located on board vessels communicating with space stations in the fixed-satellite service may operate in the frequency band 14-14.5 GHz without the need for prior agreement from Cyprus and Malta, within the minimum distance given in Resolution 902 (WRC-03) from these countries. (WRC-15)', '[5.504B]: Aircraft earth stations operating in the aeronautical mobile-satellite service in the frequency band 14-14.5 GHz shall comply with the provisions of Annex 1, Part C of Recommendation ITU-R M.1643-0, with respect to any radio astronomy station performing observations in the 14.47-14.5 GHz frequency band located on the territory of Spain, France, India, Italy, the United Kingdom and South Africa. (WRC-15)', '[5.506A]: In the band 14-14.5 GHz, ship earth stations with an e.i.r.p. greater than 21 dBW shall operate under the same conditions as earth stations located on board vessels, as provided in Resolution 902 (WRC-03). This footnote shall not apply to ship earth stations for which the complete Appendix 4 information has been received by the Bureau prior to 5 July 2003. (WRC-03)', '[5.509A]: In the frequency band 14.3-14.5 GHz, the power flux-density produced on the territory of the countries of Saudi Arabia, Bahrain, Botswana, Cameroon, China, Côte d’Ivoire, Egypt, France, Gabon, Guinea, India, Iran (Islamic Republic of), Italy, Kuwait, Morocco, Nigeria, Oman, the Syrian Arab Republic, the United Kingdom, Sri Lanka, Tunisia and Viet Nam by any aircraft earth station in the aeronautical mobile-satellite service shall not exceed the limits given in Annex 1, Part B of Recommendation ITU-R M.1643-0, unless otherwise specifically agreed by the affected administration(s). The provisions of this footnote in no way derogate the obligations of the aeronautical mobile-satellite service to operate as a secondary service in accordance with No. 5.29. (WRC-15)', '[5.504A]: In the band 14-14.5 GHz, aircraft earth stations in the secondary aeronautical mobile-satellite service may also communicate with space stations in the fixed-satellite service. The provisions of Nos. 5.29, 5.30 and 5.31 apply. (WRC-03)']),
(14470000000, 14500000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.457A][5.457B][5.484A][5.506][5.506B]', 'Mobile Except Aeronautical Mobile'], ['Mobile-Satellite (Earth-To-Space) [5.504B][5.506A][5.509A]', 'Radio Astronomy'], ['[5.457A]: In the frequency bands 5 925-6 425 MHz and 14-14.5 GHz, earth stations located on board vessels may communicate with space stations of the fixed-satellite service. Such use shall be in accordance with Resolution 902 (WRC-03). In the frequency band 5 925-6 425 MHz, earth stations located on board vessels and communicating with space stations of the fixed-satellite service may employ transmit antennas with minimum diameter of 1.2 m and operate without prior agreement of any administration if located at least 330 km away from the low-water mark as officially recognized by the coastal State. All other provisions of Resolution 902 (WRC-03) shall apply. (WRC-15)', '[5.457B]: In the frequency bands 5 925-6 425 MHz and 14-14.5 GHz, earth stations located on board vessels may operate with the characteristics and under the conditions contained in Resolution 902 (WRC-03) in Algeria, Saudi Arabia, Bahrain, Comoros, Djibouti, Egypt, United Arab Emirates, Jordan, Kuwait, Libya, Morocco, Mauritania, Oman, Qatar, the Syrian Arab Republic, Sudan, Tunisia and Yemen, in the maritime mobile-satellite service on a secondary basis. Such use shall be in accordance with Resolution 902 (WRC-03). (WRC-15)', '[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.506]: The band 14-14.5 GHz may be used, within the fixed-satellite service (Earth-to-space), for feeder links for the broadcasting-satellite service, subject to coordination with other networks in the fixed-satellite service. Such use of feeder links is reserved for countries outside Europe.', '[5.506B]: Earth stations located on board vessels communicating with space stations in the fixed-satellite service may operate in the frequency band 14-14.5 GHz without the need for prior agreement from Cyprus and Malta, within the minimum distance given in Resolution 902 (WRC-03) from these countries. (WRC-15)', '[5.504B]: Aircraft earth stations operating in the aeronautical mobile-satellite service in the frequency band 14-14.5 GHz shall comply with the provisions of Annex 1, Part C of Recommendation ITU-R M.1643-0, with respect to any radio astronomy station performing observations in the 14.47-14.5 GHz frequency band located on the territory of Spain, France, India, Italy, the United Kingdom and South Africa. (WRC-15)', '[5.506A]: In the band 14-14.5 GHz, ship earth stations with an e.i.r.p. greater than 21 dBW shall operate under the same conditions as earth stations located on board vessels, as provided in Resolution 902 (WRC-03). This footnote shall not apply to ship earth stations for which the complete Appendix 4 information has been received by the Bureau prior to 5 July 2003. (WRC-03)', '[5.509A]: In the frequency band 14.3-14.5 GHz, the power flux-density produced on the territory of the countries of Saudi Arabia, Bahrain, Botswana, Cameroon, China, Côte d’Ivoire, Egypt, France, Gabon, Guinea, India, Iran (Islamic Republic of), Italy, Kuwait, Morocco, Nigeria, Oman, the Syrian Arab Republic, the United Kingdom, Sri Lanka, Tunisia and Viet Nam by any aircraft earth station in the aeronautical mobile-satellite service shall not exceed the limits given in Annex 1, Part B of Recommendation ITU-R M.1643-0, unless otherwise specifically agreed by the affected administration(s). The provisions of this footnote in no way derogate the obligations of the aeronautical mobile-satellite service to operate as a secondary service in accordance with No. 5.29. (WRC-15)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.504A]: In the band 14-14.5 GHz, aircraft earth stations in the secondary aeronautical mobile-satellite service may also communicate with space stations in the fixed-satellite service. The provisions of Nos. 5.29, 5.30 and 5.31 apply. (WRC-03)']),
(14500000000, 14750000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.509B][5.509C][5.509D][5.509E][5.509F][5.510]'], ['Space Research [5.509G]'], ['[5.509B]: The use of the frequency bands 14.5-14.75 GHz in countries listed in Resolution 163 (WRC-15) and 14.5-14.8 GHz in countries listed in Resolution 164 (WRC-15) by the fixed-satellite service (Earth-to-space) not for feeder links for the broadcasting-satellite service is limited to geostationary-satellites. (WRC-15)', '[5.509C]: For the use of the frequency bands 14.5-14.75 GHz in countries listed in Resolution 163 (WRC-15) and 14.5-14.8 GHz in countries listed in Resolution 164 (WRC-15) by the fixed-satellite service (Earth-to-space) not for feeder links for the broadcasting-satellite service, the fixed-satellite service earth stations shall have a minimum antenna diameter of 6 m and a maximum power spectral density of −44.5 dBW/Hz at the input of the antenna. The earth stations shall be notified at known locations on land. (WRC-15)', '[5.509D]: Before an administration brings into use an earth station in the fixed-satellite service (Earth-to-space) not for feeder links for the broadcasting-satellite service in the frequency bands 14.5-14.75 GHz (in countries listed in Resolution 163 (WRC-15)) and 14.5-14.8 GHz (in countries listed in Resolution 164 (WRC-15)), it shall ensure that the power flux-density produced by this earth station does not exceed −151.5 dB(W/(m2 · 4 kHz)) produced at all altitudes from 0 m to 19 000 m above sea level at 22 km seaward from all coasts, defined as the low-water mark, as officially recognized by each coastal State. (WRC-15)', '[5.509E]: In the frequency bands 14.50-14.75 GHz in countries listed in Resolution 163 (WRC-15) and 14.50-14.8 GHz in countries listed in Resolution 164 (WRC-15), the location of earth stations in the fixed-satellite service (Earth-to-space) not for feeder links for the broadcasting-satellite service shall maintain a separation distance of at least 500 km from the border(s) of other countries unless shorter distances are explicitly agreed by those administrations. No. 9.17 does not apply. When applying this provision, administrations should consider the relevant parts of these Regulations and the latest relevant ITU-R Recommendations. (WRC-15)', '[5.509F]: In the frequency bands 14.50-14.75 GHz in countries listed in Resolution 163 (WRC-15) and 14.50-14.8 GHz in countries listed in Resolution 164 (WRC-15), earth stations in the fixed-satellite service (Earth-to-space) not for feeder links for the broadcasting-satellite service shall not constrain the future deployment of the fixed and mobile services. (WRC-15)', '[5.510]: Except for use in accordance with Resolution 163 (WRC-15) and Resolution 164 (WRC-15), the use of the frequency band 14.5-14.8 GHz by the fixed-satellite service (Earth-to-space) is limited to feeder links for the broadcasting-satellite service. This use is reserved for countries outside Europe. Uses other than feeder links for the broadcasting-satellite service are not authorized in Regions 1 and 2 in the frequency band 14.75-14.8 GHz. (WRC-15)', '[5.509G]: The frequency band 14.5-14.8 GHz is also allocated to the space research service on a primary basis. However, such use is limited to the satellite systems operating in the space research service (Earth-to-space) to relay data to space stations in the geostationary-satellite orbit from associated earth stations. Stations in the space research service shall not cause harmful interference to, or claim protection from, stations in the fixed and mobile services and in the fixed-satellite service limited to feeder links for the broadcasting-satellite service and associated space operations functions using the guardbands under Appendix 30A and feeder links for the broadcasting-satellite service in Region 2. Other uses of this frequency band by the space research service are on a secondary basis. (WRC-15)']),
(14750000000, 14800000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.510]'], ['Space Research [5.509G]'], ['[5.510]: Except for use in accordance with Resolution 163 (WRC-15) and Resolution 164 (WRC-15), the use of the frequency band 14.5-14.8 GHz by the fixed-satellite service (Earth-to-space) is limited to feeder links for the broadcasting-satellite service. This use is reserved for countries outside Europe. Uses other than feeder links for the broadcasting-satellite service are not authorized in Regions 1 and 2 in the frequency band 14.75-14.8 GHz. (WRC-15)', '[5.509G]: The frequency band 14.5-14.8 GHz is also allocated to the space research service on a primary basis. However, such use is limited to the satellite systems operating in the space research service (Earth-to-space) to relay data to space stations in the geostationary-satellite orbit from associated earth stations. Stations in the space research service shall not cause harmful interference to, or claim protection from, stations in the fixed and mobile services and in the fixed-satellite service limited to feeder links for the broadcasting-satellite service and associated space operations functions using the guardbands under Appendix 30A and feeder links for the broadcasting-satellite service in Region 2. Other uses of this frequency band by the space research service are on a secondary basis. (WRC-15)']),
(14800000000, 15350000001): (False, True, True, False, False, [], ['Space Research'], ['[5.339]: The bands 1 370-1 400 MHz, 2 640-2 655 MHz, 4 950-4 990 MHz and 15.20-15.35 GHz are also allocated to the space research (passive) and Earth exploration-satellite (passive) services on a secondary basis.']),
(15350000000, 15400000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03) ', '[5.511]: Additional allocation: in Saudi Arabia, Bahrain, Cameroon, Egypt, the United Arab Emirates, Guinea, Iran (Islamic Republic of), Iraq, Israel, Kuwait, Lebanon, Oman, Pakistan, Qatar, the Syrian Arab Republic and Somalia, the band 15.35-15.4 GHz is also allocated to the fixed and mobile services on a secondary basis. (WRC-12)']),
(15400000000, 15430000001): (False, False, False, False, False, ['Radiolocation [5.511E][5.511F]', 'Aeronautical Radionavigation'], [], ['[5.511E]: In the frequency band 15.4-15.7 GHz, stations operating in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the aeronautical radionavigation service. (WRC-12)', '[5.511F]: In order to protect the radio astronomy service in the frequency band 15.35-15.4 GHz, radiolocation stations operating in the frequency band 15.4-15.7 GHz shall not exceed the power flux-density level of −156 dB(W/m2) in a 50 MHz bandwidth in the frequency band 15.35-15.4 GHz, at any radio astronomy observatory site for more than 2 per cent of the time. (WRC-12)']),
(15430000000, 15630000001): (False, False, False, False, False, ['Fixed-Satellite (Earth-To-Space) [5.511A]', 'Radiolocation [5.511E][5.511F]', 'Aeronautical Radionavigation'], [], ['[5.511A]: Use of the frequency band 15.43-15.63 GHz by the fixed-satellite service (Earth-to-space) is limited to feeder links of non-geostationary systems in the mobile-satellite service, subject to coordination under No. 9.11A. (WRC-15)', '[5.511E]: In the frequency band 15.4-15.7 GHz, stations operating in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the aeronautical radionavigation service. (WRC-12)', '[5.511F]: In order to protect the radio astronomy service in the frequency band 15.35-15.4 GHz, radiolocation stations operating in the frequency band 15.4-15.7 GHz shall not exceed the power flux-density level of −156 dB(W/m2) in a 50 MHz bandwidth in the frequency band 15.35-15.4 GHz, at any radio astronomy observatory site for more than 2 per cent of the time. (WRC-12)', '[5.511C]: Stations operating in the aeronautical radionavigation service shall limit the effective e.i.r.p. in accordance with Recommendation ITU-R S.1340-0. The minimum coordination distance required to protect the aeronautical radionavigation stations (No. 4.10 applies) from harmful interference from feeder-link earth stations and the maximum e.i.r.p. transmitted towards the local horizontal plane by a feeder-link earth station shall be in accordance with Recommendation ITU-R S.1340-0. (WRC-15)']),
(15630000000, 15700000001): (False, False, False, False, False, ['Radiolocation [5.511E][5.511F]', 'Aeronautical Radionavigation'], [], ['[5.511E]: In the frequency band 15.4-15.7 GHz, stations operating in the radiolocation service shall not cause harmful interference to, or claim protection from, stations operating in the aeronautical radionavigation service. (WRC-12)', '[5.511F]: In order to protect the radio astronomy service in the frequency band 15.35-15.4 GHz, radiolocation stations operating in the frequency band 15.4-15.7 GHz shall not exceed the power flux-density level of −156 dB(W/m2) in a 50 MHz bandwidth in the frequency band 15.35-15.4 GHz, at any radio astronomy observatory site for more than 2 per cent of the time. (WRC-12)']),
(15700000000, 16600000001): (False, False, False, False, False, ['Radiolocation'], [], ['[5.512]: Additional allocation: in Algeria, Saudi Arabia, Austria, Bahrain, Bangladesh, Brunei Darussalam, Cameroon, Congo (Rep. of the), Egypt, El Salvador, the United Arab Emirates, Eritrea, Finland, Guatemala, India, Indonesia, Iran (Islamic Republic of), Jordan, Kenya, Kuwait, Lebanon, Libya, Malaysia, Mali, Morocco, Mauritania, Montenegro, Nepal, Nicaragua, Niger, Oman, Pakistan, Qatar, Syrian Arab Republic, the Dem. Rep. of the Congo, Singapore, Somalia, Sudan, South Sudan, Chad, Togo and Yemen, the frequency band 15.7-17.3 GHz is also allocated to the fixed and mobile services on a primary basis. (WRC-15)', '[5.513]: Additional allocation: in Israel, the band 15.7-17.3 GHz is also allocated to the fixed and mobile services on a primary basis. These services shall not claim protection from or cause harmful interference to services operating in accordance with the Table in countries other than those included in No. 5.512.']),
(16600000000, 17100000001): (False, False, False, False, False, ['Radiolocation'], ['Space Research (Deep Space)', 'Space Research (Earth-To-Space)'], ['[5.512]: Additional allocation: in Algeria, Saudi Arabia, Austria, Bahrain, Bangladesh, Brunei Darussalam, Cameroon, Congo (Rep. of the), Egypt, El Salvador, the United Arab Emirates, Eritrea, Finland, Guatemala, India, Indonesia, Iran (Islamic Republic of), Jordan, Kenya, Kuwait, Lebanon, Libya, Malaysia, Mali, Morocco, Mauritania, Montenegro, Nepal, Nicaragua, Niger, Oman, Pakistan, Qatar, Syrian Arab Republic, the Dem. Rep. of the Congo, Singapore, Somalia, Sudan, South Sudan, Chad, Togo and Yemen, the frequency band 15.7-17.3 GHz is also allocated to the fixed and mobile services on a primary basis. (WRC-15)', '[5.513]: Additional allocation: in Israel, the band 15.7-17.3 GHz is also allocated to the fixed and mobile services on a primary basis. These services shall not claim protection from or cause harmful interference to services operating in accordance with the Table in countries other than those included in No. 5.512.']),
(17100000000, 17200000001): (False, False, False, False, False, ['Radiolocation'], [], ['[5.512]: Additional allocation: in Algeria, Saudi Arabia, Austria, Bahrain, Bangladesh, Brunei Darussalam, Cameroon, Congo (Rep. of the), Egypt, El Salvador, the United Arab Emirates, Eritrea, Finland, Guatemala, India, Indonesia, Iran (Islamic Republic of), Jordan, Kenya, Kuwait, Lebanon, Libya, Malaysia, Mali, Morocco, Mauritania, Montenegro, Nepal, Nicaragua, Niger, Oman, Pakistan, Qatar, Syrian Arab Republic, the Dem. Rep. of the Congo, Singapore, Somalia, Sudan, South Sudan, Chad, Togo and Yemen, the frequency band 15.7-17.3 GHz is also allocated to the fixed and mobile services on a primary basis. (WRC-15)', '[5.513]: Additional allocation: in Israel, the band 15.7-17.3 GHz is also allocated to the fixed and mobile services on a primary basis. These services shall not claim protection from or cause harmful interference to services operating in accordance with the Table in countries other than those included in No. 5.512.']),
(17200000000, 17300000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active)', 'Radiolocation', 'Space Research (Active)'], [], ['[5.512]: Additional allocation: in Algeria, Saudi Arabia, Austria, Bahrain, Bangladesh, Brunei Darussalam, Cameroon, Congo (Rep. of the), Egypt, El Salvador, the United Arab Emirates, Eritrea, Finland, Guatemala, India, Indonesia, Iran (Islamic Republic of), Jordan, Kenya, Kuwait, Lebanon, Libya, Malaysia, Mali, Morocco, Mauritania, Montenegro, Nepal, Nicaragua, Niger, Oman, Pakistan, Qatar, Syrian Arab Republic, the Dem. Rep. of the Congo, Singapore, Somalia, Sudan, South Sudan, Chad, Togo and Yemen, the frequency band 15.7-17.3 GHz is also allocated to the fixed and mobile services on a primary basis. (WRC-15)', '[5.513]: Additional allocation: in Israel, the band 15.7-17.3 GHz is also allocated to the fixed and mobile services on a primary basis. These services shall not claim protection from or cause harmful interference to services operating in accordance with the Table in countries other than those included in No. 5.512.', '[5.513A]: Spaceborne active sensors operating in the band 17.2-17.3 GHz shall not cause harmful interference to, or constrain the development of, the radiolocation and other services allocated on a primary basis. (WRC-97)']),
(17300000000, 17700000001): (False, False, False, False, False, ['Fixed-Satellite (Earth-To-Space) [5.516]', 'Fixed-Satellite (Space-To-Earth) [5.516A][5.516B]'], ['Radiolocation'], ['[5.516]: The use of the band 17.3-18.1 GHz by geostationary-satellite systems in the fixed-satellite service (Earth-to-space) is limited to feeder links for the broadcasting-satellite service. The use of the band 17.3-17.8 GHz in Region 2 by systems in the fixed-satellite service (Earth-to-space) is limited to geostationary satellites. For the use of the band 17.3-17.8 GHz in Region 2 by feeder links for the broadcasting-satellite service in the band 12.2-12.7 GHz, see Article 11. The use of the bands 17.3-18.1 GHz (Earth-to-space) in Regions 1 and 3 and 17.8-18.1 GHz (Earth-to-space) in Region 2 by non-geostationary-satellite systems in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.516A]: In the band 17.3-17.7 GHz, earth stations of the fixed-satellite service (space-to-Earth) in Region 1 shall not claim protection from the broadcasting-satellite service feeder-link earth stations operating under Appendix 30A, nor put any limitations or restrictions on the locations of the broadcasting-satellite service feeder-link earth stations anywhere within the service area of the feeder link. (WRC-03)', '[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.514]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Bangladesh, Cameroon, El Salvador, the United Arab Emirates, Guatemala, India, Iran (Islamic Republic of), Iraq, Israel, Italy, Japan, Jordan, Kuwait, Libya, Lithuania, Nepal, Nicaragua, Nigeria, Oman, Uzbekistan, Pakistan, Qatar, Kyrgyzstan, Sudan and South Sudan, the frequency band 17.3-17.7 GHz is also allocated to the fixed and mobile services on a secondary basis. The power limits given in Nos. 21.3 and 21.5 shall apply. (WRC-15)']),
(17700000000, 18100000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth) [5.484A]', 'Fixed-Satellite (Earth-To-Space) [5.516]'], [], ['[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.516]: The use of the band 17.3-18.1 GHz by geostationary-satellite systems in the fixed-satellite service (Earth-to-space) is limited to feeder links for the broadcasting-satellite service. The use of the band 17.3-17.8 GHz in Region 2 by systems in the fixed-satellite service (Earth-to-space) is limited to geostationary satellites. For the use of the band 17.3-17.8 GHz in Region 2 by feeder links for the broadcasting-satellite service in the band 12.2-12.7 GHz, see Article 11. The use of the bands 17.3-18.1 GHz (Earth-to-space) in Regions 1 and 3 and 17.8-18.1 GHz (Earth-to-space) in Region 2 by non-geostationary-satellite systems in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)']),
(18100000000, 18400000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth) [5.484A][5.516B]', 'Fixed-Satellite (Earth-To-Space) [5.520]'], [], ['[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.520]: The use of the band 18.1-18.4 GHz by the fixed-satellite service (Earth-to-space) is limited to feeder links of geostationary-satellite systems in the broadcasting-satellite service. (WRC-2000)', '[5.519]: Additional allocation: the bands 18-18.3 GHz in Region 2 and 18.1-18.4 GHz in Regions 1 and 3 are also allocated to the meteorological-satellite service (space-to-Earth) on a primary basis. Their use is limited to geostationary satellites. (WRC-07)', '[5.521]: Alternative allocation: in the United Arab Emirates and Greece, the frequency band 18.1-18.4 GHz is allocated to the fixed, fixed-satellite (space-to-Earth) and mobile services on a primary basis (see No. 5.33). The provisions of No. 5.519 also apply. (WRC-15)']),
(18400000000, 18600000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth) [5.484A][5.516B]'], [], ['[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03)']),
(18600000000, 18800000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Passive)', 'Fixed-Satellite (Space-To-Earth) [5.522B]', 'Mobile Except Aeronautical Mobile'], ['Space Research (Passive)'], ['[5.522B]: The use of the band 18.6-18.8 GHz by the fixed-satellite service is limited to geostationary systems and systems with an orbit of apogee greater than 20 000 km. (WRC-2000)', '[5.522A]: The emissions of the fixed service and the fixed-satellite service in the band 18.6-18.8 GHz are limited to the values given in Nos. 21.5A and 21.16.2, respectively. (WRC-2000)', '[5.522C]: In the band 18.6-18.8 GHz, in Algeria, Saudi Arabia, Bahrain, Egypt, the United Arab Emirates, Jordan, Lebanon, Libya, Morocco, Oman, Qatar, the Syrian Arab Republic, Tunisia and Yemen, fixed-service systems in operation at the date of entry into force of the Final Acts of WRC-2000 are not subject to the limits of No. 21.5A. (WRC-2000)']),
(18800000000, 19300000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth) [5.516B][5.523A]'], [], ['[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.523A]: The use of the bands 18.8-19.3 GHz (space-to-Earth) and 28.6-29.1 GHz (Earth-to-space) by geostationary and non-geostationary fixed-satellite service networks is subject to the application of the provisions of No. 9.11A and No. 22.2 does not apply. Administrations having geostationary-satellite networks under coordination prior to 18 November 1995 shall cooperate to the maximum extent possible to coordinate pursuant to No. 9.11A with non-geostationary-satellite networks for which notification information has been received by the Bureau prior to that date, with a view to reaching results acceptable to all the parties concerned. Non-geostationary-satellite networks shall not cause unacceptable interference to geostationary fixed-satellite service networks for which complete Appendix 4 notification information is considered as having been received by the Bureau prior to 18 November 1995. (WRC-97)']),
(19300000000, 19700000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth) [5.523B][5.523C][5.523D][5.523E]', 'Fixed-Satellite (Earth-To-Space) [5.523B][5.523C][5.523D][5.523E]'], [], ['[5.523B]: The use of the band 19.3-19.6 GHz (Earth-to-space) by the fixed-satellite service is limited to feeder links for non-geostationary-satellite systems in the mobile-satellite service. Such use is subject to the application of the provisions of No. 9.11A, and No. 22.2 does not apply.', '[5.523C]: No. 22.2 shall continue to apply in the bands 19.3-19.6 GHz and 29.1-29.4 GHz, between feeder links of non-geostationary mobile-satellite service networks and those fixed-satellite service networks for which complete Appendix 4 coordination information, or notification information, is considered as having been received by the Bureau prior to 18 November 1995. (WRC-97)', '[5.523D]: The use of the band 19.3-19.7 GHz (space-to-Earth) by geostationary fixed-satellite service systems and by feeder links for non-geostationary-satellite systems in the mobile-satellite service is subject to the application of the provisions of No. 9.11A, but not subject to the provisions of No. 22.2. The use of this band for other non-geostationary fixed-satellite service systems, or for the cases indicated in Nos. 5.523C and 5.523E, is not subject to the provisions of No. 9.11A and shall continue to be subject to Articles 9 (except No. 9.11A) and 11 procedures, and to the provisions of No. 22.2. (WRC-97)', '[5.523E]: No. 22.2 shall continue to apply in the bands 19.6-19.7 GHz and 29.4-29.5 GHz, between feeder links of non-geostationary mobile-satellite service networks and those fixed-satellite service networks for which complete Appendix 4 coordination information, or notification information, is considered as having been received by the Bureau by 21 November 1997. (WRC-97)']),
(19700000000, 20100000001): (False, False, False, False, False, ['Fixed-Satellite (Space-To-Earth) [5.484A][5.484B][5.516B][5.527A]'], ['Mobile-Satellite (Space-To-Earth)'], ['[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484B]: Resolution 155 (WRC-15) shall apply. (WRC-15)', '[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.527A]: The operation of earth stations in motion communicating with the FSS is subject to Resolution 156 (WRC-15). (WRC-15)', '[5.524]: Additional allocation: in Afghanistan, Algeria, Saudi Arabia, Bahrain, Brunei Darussalam, Cameroon, China, Congo (Rep. of the), Costa Rica, Egypt, the United Arab Emirates, Gabon, Guatemala, Guinea, India, Iran (Islamic Republic of), Iraq, Israel, Japan, Jordan, Kuwait, Lebanon, Malaysia, Mali, Morocco, Mauritania, Nepal, Nigeria, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. Rep. of the Congo, the Dem. People’s Rep. of Korea, Singapore, Somalia, Sudan, South Sudan, Chad, Togo and Tunisia, the frequency band 19.7-21.2 GHz is also allocated to the fixed and mobile services on a primary basis. This additional use shall not impose any limitation on the power flux-density of space stations in the fixed-satellite service in the frequency band 19.7-21.2 GHz and of space stations in the mobile-satellite service in the frequency band 19.7-20.2 GHz where the allocation to the mobile-satellite service is on a primary basis in the latter frequency band. (WRC-15)']),
(20100000000, 20200000001): (False, False, False, False, False, ['Fixed-Satellite (Space-To-Earth) [5.484A][5.484B][5.516B][5.527A]', 'Mobile-Satellite (Space-To-Earth)'], [], ['[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484B]: Resolution 155 (WRC-15) shall apply. (WRC-15)', '[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.527A]: The operation of earth stations in motion communicating with the FSS is subject to Resolution 156 (WRC-15). (WRC-15)', '[5.524]: Additional allocation: in Afghanistan, Algeria, Saudi Arabia, Bahrain, Brunei Darussalam, Cameroon, China, Congo (Rep. of the), Costa Rica, Egypt, the United Arab Emirates, Gabon, Guatemala, Guinea, India, Iran (Islamic Republic of), Iraq, Israel, Japan, Jordan, Kuwait, Lebanon, Malaysia, Mali, Morocco, Mauritania, Nepal, Nigeria, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. Rep. of the Congo, the Dem. People’s Rep. of Korea, Singapore, Somalia, Sudan, South Sudan, Chad, Togo and Tunisia, the frequency band 19.7-21.2 GHz is also allocated to the fixed and mobile services on a primary basis. This additional use shall not impose any limitation on the power flux-density of space stations in the fixed-satellite service in the frequency band 19.7-21.2 GHz and of space stations in the mobile-satellite service in the frequency band 19.7-20.2 GHz where the allocation to the mobile-satellite service is on a primary basis in the latter frequency band. (WRC-15)', '[5.525]: In order to facilitate interregional coordination between networks in the mobile-satellite and fixed-satellite services, carriers in the mobile-satellite service that are most susceptible to interference shall, to the extent practicable, be located in the higher parts of the bands 19.7-20.2 GHz and 29.5-30 GHz.', '[5.526]: In the bands 19.7-20.2 GHz and 29.5-30 GHz in Region 2, and in the bands 20.1-20.2 GHz and 29.9-30 GHz in Regions 1 and 3, networks which are both in the fixed-satellite service and in the mobile-satellite service may include links between earth stations at specified or unspecified points or while in motion, through one or more satellites for point-to-point and point-to-multipoint communications.', '[5.527]: In the bands 19.7-20.2 GHz and 29.5-30 GHz, the provisions of No. 4.10 do not apply with respect to the mobile-satellite service.', '[5.528]: The allocation to the mobile-satellite service is intended for use by networks which use narrow spot-beam antennas and other advanced technology at the space stations. Administrations operating systems in the mobile-satellite service in the band 19.7-20.1 GHz in Region 2 and in the band 20.1-20.2 GHz shall take all practicable steps to ensure the continued availability of these bands for administrations operating fixed and mobile systems in accordance with the provisions of No. 5.524.']),
(20200000000, 21200000001): (False, False, False, False, False, ['Fixed-Satellite (Space-To-Earth)', 'Mobile-Satellite (Space-To-Earth)'], ['Standard Frequency And Time Signal-Satellite (Space-To-Earth)'], ['[5.524]: Additional allocation: in Afghanistan, Algeria, Saudi Arabia, Bahrain, Brunei Darussalam, Cameroon, China, Congo (Rep. of the), Costa Rica, Egypt, the United Arab Emirates, Gabon, Guatemala, Guinea, India, Iran (Islamic Republic of), Iraq, Israel, Japan, Jordan, Kuwait, Lebanon, Malaysia, Mali, Morocco, Mauritania, Nepal, Nigeria, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. Rep. of the Congo, the Dem. People’s Rep. of Korea, Singapore, Somalia, Sudan, South Sudan, Chad, Togo and Tunisia, the frequency band 19.7-21.2 GHz is also allocated to the fixed and mobile services on a primary basis. This additional use shall not impose any limitation on the power flux-density of space stations in the fixed-satellite service in the frequency band 19.7-21.2 GHz and of space stations in the mobile-satellite service in the frequency band 19.7-20.2 GHz where the allocation to the mobile-satellite service is on a primary basis in the latter frequency band. (WRC-15)']),
(21200000000, 21400000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Passive)', 'Space Research (Passive)'], [], []),
(21400000000, 22000000001): (False, True, True, False, False, ['Broadcasting-Satellite [5.208B]'], [], ['[5.208B]: * In the frequency bands:137-138 MHz, 387-390 MHz, 400.15-401 MHz, 1 452-1 492 MHz, 1 525-1 610 MHz, 1 613.8-1 626.5 MHz, 2 655-2 690 MHz, 21.4-22 GHz, Resolution 739 (Rev.WRC-15) applies. (WRC-15) ', '[5.530A]: Unless otherwise agreed between the administrations concerned, any station in the fixed or mobile services of an administration shall not produce a power flux-density in excess of −120.4 dB(W/(m2 · MHz)) at 3 m above the ground of any point of the territory of any other administration in Regions 1 and 3 for more than 20% of the time. In conducting the calculations, administrations should use the most recent version of Recommendation ITU-R P.452 (see also the most recent version of Recommendation ITU-R BO.1898). (WRC-15)', '[5.530B]: In the band 21.4-22 GHz, in order to facilitate the development of the broadcasting-satellite service, administrations in Regions 1 and 3 are encouraged not to deploy stations in the mobile service and are encouraged to limit the deployment of stations in the fixed service to point-to-point links. (WRC-12)', '[5.530D]: See Resolution 555 (WRC-12)*. (WRC-12)']),
(22000000000, 22210000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(22210000000, 22500000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Passive)', 'Mobile Except Aeronautical Mobile', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.532]: The use of the band 22.21-22.5 GHz by the Earth exploration-satellite (passive) and space research (passive) services shall not impose constraints upon the fixed and mobile, except aeronautical mobile, services.']),
(22500000000, 22550000001): (False, True, True, False, False, [], [], []),
(22550000000, 23150000001): (False, True, True, False, False, ['Inter-Satellite [5.338A]', 'Space Research (Earth-To-Space) [5.532A]'], [], ['[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)', '[5.532A]: The location of earth stations in the space research service shall maintain a separation distance of at least 54 km from the respective border(s) of neighbouring countries to protect the existing and future deployment of fixed and mobile services unless a shorter distance is otherwise agreed between the corresponding administrations. Nos. 9.17 and 9.18 do not apply. (WRC-12)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(23150000000, 23550000001): (False, True, True, False, False, ['Inter-Satellite [5.338A]'], [], ['[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)']),
(23550000000, 23600000001): (False, True, True, False, False, [], [], []),
(23600000000, 24000000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03)']),
(24000000000, 24050000001): (True, False, False, False, False, ['Amateur', 'Amateur-Satellite'], [], ['[5.150]: The following bands:13 553-13 567 kHz (centre frequency 13 560 kHz), 26 957-27 283 kHz (centre frequency 27 120 kHz), 40.66-40.70 MHz (centre frequency 40.68 MHz), 902-928 MHz in Region 2 (centre frequency 915 MHz), 2 400-2 500 MHz (centre frequency 2 450 MHz), 5 725-5 875 MHz (centre frequency 5 800 MHz), and 24-24.25 GHz (centre frequency 24.125 GHz) are also designated for industrial, scientific and medical (ISM) applications. Radiocommunication services operating within these bands must accept harmful interference which may be caused by these applications. ISM equipment operating in these bands is subject to the provisions of No. 15.13.']),
(24050000000, 24250000001): (True, False, False, False, False, ['Radiolocation'], ['Amateur', 'Earth Exploration-Satellite (Active)'], ['[5.150]: The following bands:13 553-13 567 kHz (centre frequency 13 560 kHz), 26 957-27 283 kHz (centre frequency 27 120 kHz), 40.66-40.70 MHz (centre frequency 40.68 MHz), 902-928 MHz in Region 2 (centre frequency 915 MHz), 2 400-2 500 MHz (centre frequency 2 450 MHz), 5 725-5 875 MHz (centre frequency 5 800 MHz), and 24-24.25 GHz (centre frequency 24.125 GHz) are also designated for industrial, scientific and medical (ISM) applications. Radiocommunication services operating within these bands must accept harmful interference which may be caused by these applications. ISM equipment operating in these bands is subject to the provisions of No. 15.13.']),
(24250000000, 24450000001): (False, True, False, False, False, [], [], []),
(24450000000, 24650000001): (False, True, False, False, False, ['Inter-Satellite'], [], []),
(24650000000, 24750000001): (False, True, False, False, False, ['Fixed-Satellite (Earth-To-Space) [5.532B]', 'Inter-Satellite'], [], ['[5.532B]: Use of the band 24.65-25.25 GHz in Region 1 and the band 24.65-24.75 GHz in Region 3 by the fixed-satellite service (Earth-to-space) is limited to earth stations using a minimum antenna diameter of 4.5 m. (WRC-12)']),
(24750000000, 25250000001): (False, True, False, False, False, ['Fixed-Satellite (Earth-To-Space) [5.532B]'], [], ['[5.532B]: Use of the band 24.65-25.25 GHz in Region 1 and the band 24.65-24.75 GHz in Region 3 by the fixed-satellite service (Earth-to-space) is limited to earth stations using a minimum antenna diameter of 4.5 m. (WRC-12)']),
(25250000000, 25500000001): (False, True, True, False, False, ['Inter-Satellite [5.536]'], ['Standard Frequency And Time Signal-Satellite (Earth-To-Space)'], ['[5.536]: Use of the 25.25-27.5 GHz band by the inter-satellite service is limited to space research and Earth exploration-satellite applications, and also transmissions of data originating from industrial and medical activities in space.']),
(25500000000, 27000000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Space-To Earth) [5.536B]', 'Inter-Satellite [5.536]', 'Space Research (Space-To-Earth) [5.536C]'], ['Standard Frequency And Time Signal-Satellite (Earth-To-Space)'], ['[5.536B]: In Saudi Arabia, Austria, Bahrain, Belgium, Brazil, China, Korea (Rep. of), Denmark, Egypt, United Arab Emirates, Estonia, Finland, Hungary, India, Iran (Islamic Republic of), Ireland, Israel, Italy, Jordan, Kenya, Kuwait, Lebanon, Libya, Lithuania, Moldova, Norway, Oman, Uganda, Pakistan, the Philippines, Poland, Portugal, the Syrian Arab Republic, Dem. People’s Rep. of Korea, Slovakia, the Czech Rep., Romania, the United Kingdom, Singapore, Sweden, Tanzania, Turkey, Viet Nam and Zimbabwe, earth stations operating in the Earth exploration-satellite service in the frequency band 25.5-27 GHz shall not claim protection from, or constrain the use and deployment of, stations of the fixed and mobile services. (WRC-15)', '[5.536]: Use of the 25.25-27.5 GHz band by the inter-satellite service is limited to space research and Earth exploration-satellite applications, and also transmissions of data originating from industrial and medical activities in space.', '[5.536C]: In Algeria, Saudi Arabia, Bahrain, Botswana, Brazil, Cameroon, Comoros, Cuba, Djibouti, Egypt, United Arab Emirates, Estonia, Finland, Iran (Islamic Republic of), Israel, Jordan, Kenya, Kuwait, Lithuania, Malaysia, Morocco, Nigeria, Oman, Qatar, Syrian Arab Republic, Somalia, Sudan, South Sudan, Tanzania, Tunisia, Uruguay, Zambia and Zimbabwe, earth stations operating in the space research service in the band 25.5-27 GHz shall not claim protection from, or constrain the use and deployment of, stations of the fixed and mobile services. (WRC-12)', '[5.536A]: Administrations operating earth stations in the Earth exploration-satellite service or the space research service shall not claim protection from stations in the fixed and mobile services operated by other administrations. In addition, earth stations in the Earth exploration-satellite service or in the space research service should be operated taking into account the most recent version of Recommendation ITU-R SA.1862. (WRC-12)']),
(27000000000, 27500000001): (False, True, True, False, False, ['Inter-Satellite [5.536]'], [], ['[5.536]: Use of the 25.25-27.5 GHz band by the inter-satellite service is limited to space research and Earth exploration-satellite applications, and also transmissions of data originating from industrial and medical activities in space.']),
(27500000000, 28500000001): (False, True, True, False, False, ['Fixed [5.537A]', 'Fixed-Satellite (Earth-To-Space) [5.484A][5.516B][5][.539]'], [], ['[5.537A]: In Bhutan, Cameroon, Korea (Rep. of), the Russian Federation, India, Indonesia, Iran (Islamic Republic of), Iraq, Japan, Kazakhstan, Malaysia, Maldives, Mongolia, Myanmar, Uzbekistan, Pakistan, the Philippines, Kyrgyzstan, the Dem. People’s Rep. of Korea, Sudan, Sri Lanka, Thailand and Viet Nam, the allocation to the fixed service in the band 27.9-28.2 GHz may also be used by high altitude platform stations (HAPS) within the territory of these countries. Such use of 300 MHz of the fixed-service allocation by HAPS in the above countries is further limited to operation in the HAPS-to-ground direction and shall not cause harmful interference to, nor claim protection from, other types of fixed-service systems or other co-primary services. Furthermore, the development of these other services shall not be constrained by HAPS. See Resolution 145 (Rev.WRC-12). (WRC-12)', '[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.538]: Additional allocation: the bands 27.500-27.501 GHz and 29.999-30.000 GHz are also allocated to the fixed-satellite service (space-to-Earth) on a primary basis for the beacon transmissions intended for up-link power control. Such space-to-Earth transmissions shall not exceed an equivalent isotropically radiated power (e.i.r.p.) of +10 dBW in the direction of adjacent satellites on the geostationary-satellite orbit. (WRC-07)', '[5.540]: Additional allocation: the band 27.501-29.999 GHz is also allocated to the fixed-satellite service (space-to-Earth) on a secondary basis for beacon transmissions intended for up-link power control.']),
(28500000000, 29100000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.484A][5.516B][5.523A][5.539]'], ['Earth Exploration-Satellite (Earth-To-Space) [5.541]'], ['[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.523A]: The use of the bands 18.8-19.3 GHz (space-to-Earth) and 28.6-29.1 GHz (Earth-to-space) by geostationary and non-geostationary fixed-satellite service networks is subject to the application of the provisions of No. 9.11A and No. 22.2 does not apply. Administrations having geostationary-satellite networks under coordination prior to 18 November 1995 shall cooperate to the maximum extent possible to coordinate pursuant to No. 9.11A with non-geostationary-satellite networks for which notification information has been received by the Bureau prior to that date, with a view to reaching results acceptable to all the parties concerned. Non-geostationary-satellite networks shall not cause unacceptable interference to geostationary fixed-satellite service networks for which complete Appendix 4 notification information is considered as having been received by the Bureau prior to 18 November 1995. (WRC-97)', '[5.539]: The band 27.5-30 GHz may be used by the fixed-satellite service (Earth-to-space) for the provision of feeder links for the broadcasting-satellite service.', '[5.541]: In the band 28.5-30 GHz, the earth exploration-satellite service is limited to the transfer of data between stations and not to the primary collection of information by means of active or passive sensors.', '[5.540]: Additional allocation: the band 27.501-29.999 GHz is also allocated to the fixed-satellite service (space-to-Earth) on a secondary basis for beacon transmissions intended for up-link power control.']),
(29100000000, 29500000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.516B][5.523C][5.523E][5.535A][5.539][5.541A]'], ['Earth Exploration-Satellite (Earth-To-Space) [5.541]'], ['[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.523C]: No. 22.2 shall continue to apply in the bands 19.3-19.6 GHz and 29.1-29.4 GHz, between feeder links of non-geostationary mobile-satellite service networks and those fixed-satellite service networks for which complete Appendix 4 coordination information, or notification information, is considered as having been received by the Bureau prior to 18 November 1995. (WRC-97)', '[5.523E]: No. 22.2 shall continue to apply in the bands 19.6-19.7 GHz and 29.4-29.5 GHz, between feeder links of non-geostationary mobile-satellite service networks and those fixed-satellite service networks for which complete Appendix 4 coordination information, or notification information, is considered as having been received by the Bureau by 21 November 1997. (WRC-97)', '[5.535A]: The use of the band 29.1-29.5 GHz (Earth-to-space) by the fixed-satellite service is limited to geostationary-satellite systems and feeder links to non-geostationary-satellite systems in the mobile-satellite service. Such use is subject to the application of the provisions of No. 9.11A, but not subject to the provisions of No. 22.2, except as indicated in Nos. 5.523C and 5.523E where such use is not subject to the provisions of No. 9.11A and shall continue to be subject to Articles 9 (except No. 9.11A) and 11 procedures, and to the provisions of No. 22.2. (WRC-97)', '[5.539]: The band 27.5-30 GHz may be used by the fixed-satellite service (Earth-to-space) for the provision of feeder links for the broadcasting-satellite service.', '[5.541A]: Feeder links of non-geostationary networks in the mobile-satellite service and geostationary networks in the fixed-satellite service operating in the band 29.1-29.5 GHz (Earth-to-space) shall employ uplink adaptive power control or other methods of fade compensation, such that the earth station transmissions shall be conducted at the power level required to meet the desired link performance while reducing the level of mutual interference between both networks. These methods shall apply to networks for which Appendix 4 coordination information is considered as having been received by the Bureau after 17 May 1996 and until they are changed by a future competent world radiocommunication conference. Administrations submitting Appendix 4 information for coordination before this date are encouraged to utilize these techniques to the extent practicable. (WRC-2000)', '[5.541]: In the band 28.5-30 GHz, the earth exploration-satellite service is limited to the transfer of data between stations and not to the primary collection of information by means of active or passive sensors.', '[5.540]: Additional allocation: the band 27.501-29.999 GHz is also allocated to the fixed-satellite service (space-to-Earth) on a secondary basis for beacon transmissions intended for up-link power control.']),
(29500000000, 29900000001): (False, False, False, False, False, ['Fixed-Satellite (Earth-To-Space) [5.484A][5.484B][5.516B][5.527A][5.539]'], ['Earth Exploration-Satellite (Earth-To-Space) [5.541]', 'Mobile-Satellite (Earth-To-Space)'], ['[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484B]: Resolution 155 (WRC-15) shall apply. (WRC-15)', '[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.527A]: The operation of earth stations in motion communicating with the FSS is subject to Resolution 156 (WRC-15). (WRC-15)', '[5.539]: The band 27.5-30 GHz may be used by the fixed-satellite service (Earth-to-space) for the provision of feeder links for the broadcasting-satellite service.', '[5.541]: In the band 28.5-30 GHz, the earth exploration-satellite service is limited to the transfer of data between stations and not to the primary collection of information by means of active or passive sensors.', '[5.540]: Additional allocation: the band 27.501-29.999 GHz is also allocated to the fixed-satellite service (space-to-Earth) on a secondary basis for beacon transmissions intended for up-link power control.', '[5.542]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Brunei Darussalam, Cameroon, China, Congo (Rep. of the), Egypt, the United Arab Emirates, Eritrea, Ethiopia, Guinea, India, Iran (Islamic Republic of), Iraq, Japan, Jordan, Kuwait, Lebanon, Malaysia, Mali, Morocco, Mauritania, Nepal, Oman, Pakistan, Philippines, Qatar, the Syrian Arab Republic, the Dem. People’s Rep. of Korea, Somalia, Sudan, South Sudan, Sri Lanka and Chad, the band 29.5-31 GHz is also allocated to the fixed and mobile services on a secondary basis. The power limits specified in Nos. 21.3 and 21.5 shall apply. (WRC-12)']),
(29900000000, 30000000001): (False, False, False, False, False, ['Fixed-Satellite (Earth-To-Space) [5.484A][5.484B][5.516B][5.527A][5.539]', 'Mobile-Satellite (Earth-To-Space)'], ['Earth Exploration-Satellite (Earth-To-Space) [5.541][5.543]'], ['[5.484A]: The use of the bands 10.95-11.2 GHz (space-to-Earth), 11.45-11.7 GHz (space-to-Earth), 11.7-12.2 GHz (space-to-Earth) in Region 2, 12.2-12.75 GHz (space-to-Earth) in Region 3, 12.5-12.75 GHz (space-to-Earth) in Region 1, 13.75-14.5 GHz (Earth-to-space), 17.8-18.6 GHz (space-to-Earth), 19.7-20.2 GHz (space-to-Earth), 27.5-28.6 GHz (Earth-to-space), 29.5-30 GHz (Earth-to-space) by a non-geostationary-satellite system in the fixed-satellite service is subject to application of the provisions of No. 9.12 for coordination with other non-geostationary-satellite systems in the fixed-satellite service. Non-geostationary-satellite systems in the fixed-satellite service shall not claim protection from geostationary-satellite networks in the fixed-satellite service operating in accordance with the Radio Regulations, irrespective of the dates of receipt by the Bureau of the complete coordination or notification information, as appropriate, for the non-geostationary-satellite systems in the fixed-satellite service and of the complete coordination or notification information, as appropriate, for the geostationary-satellite networks, and No. 5.43A does not apply. Non-geostationary-satellite systems in the fixed-satellite service in the above bands shall be operated in such a way that any unacceptable interference that may occur during their operation shall be rapidly eliminated. (WRC-2000)', '[5.484B]: Resolution 155 (WRC-15) shall apply. (WRC-15)', '[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.527A]: The operation of earth stations in motion communicating with the FSS is subject to Resolution 156 (WRC-15). (WRC-15)', '[5.539]: The band 27.5-30 GHz may be used by the fixed-satellite service (Earth-to-space) for the provision of feeder links for the broadcasting-satellite service.', '[5.541]: In the band 28.5-30 GHz, the earth exploration-satellite service is limited to the transfer of data between stations and not to the primary collection of information by means of active or passive sensors.', '[5.543]: The band 29.95-30 GHz may be used for space-to-space links in the Earth exploration-satellite service for telemetry, tracking, and control purposes, on a secondary basis.', '[5.525]: In order to facilitate interregional coordination between networks in the mobile-satellite and fixed-satellite services, carriers in the mobile-satellite service that are most susceptible to interference shall, to the extent practicable, be located in the higher parts of the bands 19.7-20.2 GHz and 29.5-30 GHz.', '[5.526]: In the bands 19.7-20.2 GHz and 29.5-30 GHz in Region 2, and in the bands 20.1-20.2 GHz and 29.9-30 GHz in Regions 1 and 3, networks which are both in the fixed-satellite service and in the mobile-satellite service may include links between earth stations at specified or unspecified points or while in motion, through one or more satellites for point-to-point and point-to-multipoint communications.', '[5.527]: In the bands 19.7-20.2 GHz and 29.5-30 GHz, the provisions of No. 4.10 do not apply with respect to the mobile-satellite service.', '[5.538]: Additional allocation: the bands 27.500-27.501 GHz and 29.999-30.000 GHz are also allocated to the fixed-satellite service (space-to-Earth) on a primary basis for the beacon transmissions intended for up-link power control. Such space-to-Earth transmissions shall not exceed an equivalent isotropically radiated power (e.i.r.p.) of +10 dBW in the direction of adjacent satellites on the geostationary-satellite orbit. (WRC-07)', '[5.540]: Additional allocation: the band 27.501-29.999 GHz is also allocated to the fixed-satellite service (space-to-Earth) on a secondary basis for beacon transmissions intended for up-link power control.', '[5.542]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Brunei Darussalam, Cameroon, China, Congo (Rep. of the), Egypt, the United Arab Emirates, Eritrea, Ethiopia, Guinea, India, Iran (Islamic Republic of), Iraq, Japan, Jordan, Kuwait, Lebanon, Malaysia, Mali, Morocco, Mauritania, Nepal, Oman, Pakistan, Philippines, Qatar, the Syrian Arab Republic, the Dem. People’s Rep. of Korea, Somalia, Sudan, South Sudan, Sri Lanka and Chad, the band 29.5-31 GHz is also allocated to the fixed and mobile services on a secondary basis. The power limits specified in Nos. 21.3 and 21.5 shall apply. (WRC-12)']),
(30000000000, 31000000001): (False, False, False, False, False, ['Fixed-Satellite (Earth-To-Space) [5.338A]', 'Mobile-Satellite (Earth-To-Space)'], ['Standard Frequency And Time Signal-Satellite (Space-To-Earth)'], ['[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)', '[5.542]: Additional allocation: in Algeria, Saudi Arabia, Bahrain, Brunei Darussalam, Cameroon, China, Congo (Rep. of the), Egypt, the United Arab Emirates, Eritrea, Ethiopia, Guinea, India, Iran (Islamic Republic of), Iraq, Japan, Jordan, Kuwait, Lebanon, Malaysia, Mali, Morocco, Mauritania, Nepal, Oman, Pakistan, Philippines, Qatar, the Syrian Arab Republic, the Dem. People’s Rep. of Korea, Somalia, Sudan, South Sudan, Sri Lanka and Chad, the band 29.5-31 GHz is also allocated to the fixed and mobile services on a secondary basis. The power limits specified in Nos. 21.3 and 21.5 shall apply. (WRC-12)']),
(31000000000, 31300000001): (False, True, True, False, False, ['Fixed [5.338A][5.543A]'], ['Standard Frequency And Time Signal-Satellite (Space-To-Earth)', 'Space Research [5.544][5.545]'], ['[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)', '[5.543A]: In Bhutan, Cameroon, Korea (Rep. of), the Russian Federation, India, Indonesia, Iran (Islamic Republic of), Iraq, Japan, Kazakhstan, Malaysia, Maldives, Mongolia, Myanmar, Uzbekistan, Pakistan, the Philippines, Kyrgyzstan, the Dem. People’s Rep. of Korea, Sudan, Sri Lanka, Thailand and Viet Nam, the allocation to the fixed service in the frequency band 31-31.3 GHz may also be used by systems using high altitude platform stations (HAPS) in the ground-to-HAPS direction. The use of the frequency band 31-31.3 GHz by systems using HAPS is limited to the territory of the countries listed above and shall not cause harmful interference to, nor claim protection from, other types of fixed-service systems, systems in the mobile service and systems operated under No. 5.545. Furthermore, the development of these services shall not be constrained by HAPS. Systems using HAPS in the frequency band 31-31.3 GHz shall not cause harmful interference to the radio astronomy service having a primary allocation in the frequency band 31.3-31.8 GHz, taking into account the protection criterion as given in the most recent version of Recommendation ITU-R RA.769. In order to ensure the protection of satellite passive services, the level of unwanted power density into a HAPS ground station antenna in the frequency band 31.3-31.8 GHz shall be limited to −106 dB(W/MHz) under clear-sky conditions, and may be increased up to −100 dB(W/MHz) under rainy conditions to mitigate fading due to rain, provided the effective impact on the passive satellite does not exceed the impact under clear-sky conditions. See Resolution 145 (Rev.WRC-12). (WRC-15)', '[5.544]: In the band 31-31.3 GHz the power flux-density limits specified in Article 21, Table 21-4 shall apply to the space research service.', '[5.545]: Different category of service: in Armenia, Georgia, Kyrgyzstan, Tajikistan and Turkmenistan, the allocation of the band 31-31.3 GHz to the space research service is on a primary basis (see No. 5.33). (WRC-12)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(31300000000, 31500000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03)']),
(31500000000, 31800000001): (False, True, True, False, True, ['Earth Exploration- Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], ['Mobile Except Aeronautical Mobile'], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.546]: Different category of service: in Saudi Arabia, Armenia, Azerbaijan, Belarus, Egypt, the United Arab Emirates, Spain, Estonia, the Russian Federation, Georgia, Hungary, Iran (Islamic Republic of), Israel, Jordan, Lebanon, Moldova, Mongolia, Oman, Uzbekistan, Poland, the Syrian Arab Republic, Kyrgyzstan, Romania, the United Kingdom, South Africa, Tajikistan, Turkmenistan and Turkey, the allocation of the band 31.5-31.8 GHz to the fixed and mobile, except aeronautical mobile, services is on a primary basis (see No. 5.33). (WRC-12)']),
(31800000000, 32000000001): (False, True, False, False, False, ['Fixed [5.547A]', 'Radionavigation', 'Space Research (Deep Space)', 'Space Research (Space-To-Earth)'], [], ['[5.547A]: Administrations should take practical measures to minimize the potential interference between stations in the fixed service and airborne stations in the radionavigation service in the 31.8-33.4 GHz band, taking into account the operational needs of the airborne radar systems. (WRC-2000)', '[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)', '[5.547B]: Alternative allocation: in the United States, the band 31.8-32 GHz is allocated to the radionavigation and space research (deep space) (space-to-Earth) services on a primary basis. (WRC-97)', '[5.548]: In designing systems for the inter-satellite service in the band 32.3-33 GHz, for the radionavigation service in the band 32-33 GHz, and for the space research service (deep space) in the band 31.8-32.3 GHz, administrations shall take all necessary measures to prevent harmful interference between these services, bearing in mind the safety aspects of the radionavigation service (see Recommendation 707). (WRC-03)']),
(32000000000, 32300000001): (False, True, False, False, False, ['Fixed [5.547A]', 'Radionavigation', 'Space Research (Deep Space)', 'Space Research (Space-To-Earth)'], [], ['[5.547A]: Administrations should take practical measures to minimize the potential interference between stations in the fixed service and airborne stations in the radionavigation service in the 31.8-33.4 GHz band, taking into account the operational needs of the airborne radar systems. (WRC-2000)', '[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)', '[5.547C]: Alternative allocation: in the United States, the band 32-32.3 GHz is allocated to the radionavigation and space research (deep space) (space-to-Earth) services on a primary basis. (WRC-03)', '[5.548]: In designing systems for the inter-satellite service in the band 32.3-33 GHz, for the radionavigation service in the band 32-33 GHz, and for the space research service (deep space) in the band 31.8-32.3 GHz, administrations shall take all necessary measures to prevent harmful interference between these services, bearing in mind the safety aspects of the radionavigation service (see Recommendation 707). (WRC-03)']),
(32300000000, 33000000001): (False, True, False, False, False, ['Fixed [5.547A]', 'Inter-Satellite', 'Radionavigation'], [], ['[5.547A]: Administrations should take practical measures to minimize the potential interference between stations in the fixed service and airborne stations in the radionavigation service in the 31.8-33.4 GHz band, taking into account the operational needs of the airborne radar systems. (WRC-2000)', '[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)', '[5.547D]: Alternative allocation: in the United States, the band 32.3-33 GHz is allocated to the inter-satellite and radionavigation services on a primary basis. (WRC-97)', '[5.548]: In designing systems for the inter-satellite service in the band 32.3-33 GHz, for the radionavigation service in the band 32-33 GHz, and for the space research service (deep space) in the band 31.8-32.3 GHz, administrations shall take all necessary measures to prevent harmful interference between these services, bearing in mind the safety aspects of the radionavigation service (see Recommendation 707). (WRC-03)']),
(33000000000, 33400000001): (False, True, False, False, False, ['Fixed [5.547A]', 'Radionavigation'], [], ['[5.547A]: Administrations should take practical measures to minimize the potential interference between stations in the fixed service and airborne stations in the radionavigation service in the 31.8-33.4 GHz band, taking into account the operational needs of the airborne radar systems. (WRC-2000)', '[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)', '[5.547E]: Alternative allocation: in the United States, the band 33-33.4 GHz is allocated to the radionavigation service on a primary basis. (WRC-97)']),
(33400000000, 34200000001): (False, False, False, False, False, ['Radiolocation'], [], ['[5.549]: Additional allocation: in Saudi Arabia, Bahrain, Bangladesh, Egypt, the United Arab Emirates, Gabon, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Jordan, Kuwait, Lebanon, Libya, Malaysia, Mali, Morocco, Mauritania, Nepal, Nigeria, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. Rep. of the Congo, Singapore, Somalia, Sudan, South Sudan, Sri Lanka, Togo, Tunisia and Yemen, the band 33.4-36 GHz is also allocated to the fixed and mobile services on a primary basis. (WRC-12)']),
(34200000000, 34700000001): (False, False, False, False, False, ['Radiolocation', 'Space Research (Deep Space)', 'Space Research (Earth-To-Space)'], [], ['[5.549]: Additional allocation: in Saudi Arabia, Bahrain, Bangladesh, Egypt, the United Arab Emirates, Gabon, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Jordan, Kuwait, Lebanon, Libya, Malaysia, Mali, Morocco, Mauritania, Nepal, Nigeria, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. Rep. of the Congo, Singapore, Somalia, Sudan, South Sudan, Sri Lanka, Togo, Tunisia and Yemen, the band 33.4-36 GHz is also allocated to the fixed and mobile services on a primary basis. (WRC-12)']),
(34700000000, 35200000001): (False, False, False, False, False, ['Radiolocation'], ['Space Research [5.550]'], ['[5.550]: Different category of service: in Armenia, Azerbaijan, Belarus, the Russian Federation, Georgia, Kyrgyzstan, Tajikistan and Turkmenistan, the allocation of the band 34.7-35.2 GHz to the space research service is on a primary basis (see No. 5.33). (WRC-12)', '[5.549]: Additional allocation: in Saudi Arabia, Bahrain, Bangladesh, Egypt, the United Arab Emirates, Gabon, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Jordan, Kuwait, Lebanon, Libya, Malaysia, Mali, Morocco, Mauritania, Nepal, Nigeria, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. Rep. of the Congo, Singapore, Somalia, Sudan, South Sudan, Sri Lanka, Togo, Tunisia and Yemen, the band 33.4-36 GHz is also allocated to the fixed and mobile services on a primary basis. (WRC-12)']),
(35200000000, 35500000001): (False, False, False, False, False, ['Meteorological Aids', 'Radiolocation'], [], ['[5.549]: Additional allocation: in Saudi Arabia, Bahrain, Bangladesh, Egypt, the United Arab Emirates, Gabon, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Jordan, Kuwait, Lebanon, Libya, Malaysia, Mali, Morocco, Mauritania, Nepal, Nigeria, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. Rep. of the Congo, Singapore, Somalia, Sudan, South Sudan, Sri Lanka, Togo, Tunisia and Yemen, the band 33.4-36 GHz is also allocated to the fixed and mobile services on a primary basis. (WRC-12)']),
(35500000000, 36000000001): (False, False, False, False, False, ['Meteorological Aids', 'Earth Exploration-Satellite (Active)', 'Radiolocation', 'Space Research (Active)'], [], ['[5.549]: Additional allocation: in Saudi Arabia, Bahrain, Bangladesh, Egypt, the United Arab Emirates, Gabon, Indonesia, Iran (Islamic Republic of), Iraq, Israel, Jordan, Kuwait, Lebanon, Libya, Malaysia, Mali, Morocco, Mauritania, Nepal, Nigeria, Oman, Pakistan, the Philippines, Qatar, the Syrian Arab Republic, the Dem. Rep. of the Congo, Singapore, Somalia, Sudan, South Sudan, Sri Lanka, Togo, Tunisia and Yemen, the band 33.4-36 GHz is also allocated to the fixed and mobile services on a primary basis. (WRC-12)', '[5.549A]: In the band 35.5-36.0 GHz, the mean power flux-density at the Earth’s surface, generated by any spaceborne sensor in the Earth exploration-satellite service (active) or space research service (active), for any angle greater than 0.8° from the beam centre shall not exceed -73.3 dB(W/m2) in this band. (WRC-03)']),
(36000000000, 37000000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Passive)', 'Space Research (Passive)'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.550A]: For sharing of the band 36-37 GHz between the Earth exploration-satellite (passive) service and the fixed and mobile services, Resolution 752 (WRC-07) shall apply. (WRC-07)']),
(37000000000, 37500000001): (False, True, True, False, False, ['Mobile Except Aeronautical Mobile', 'Space Research (Space-To-Earth)'], [], ['[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)']),
(37500000000, 38000000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)', 'Mobile Except Aeronautical Mobile', 'Space Research (Space-To-Earth)'], ['Earth Exploration-Satellite (Space-To-Earth)'], ['[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)']),
(38000000000, 39500000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)'], ['Earth Exploration-Satellite (Space-To-Earth)'], ['[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)']),
(39500000000, 40000000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth) [5.516B]', 'Mobile-Satellite (Space-To-Earth)'], ['Earth Exploration-Satellite (Space-To-Earth)'], ['[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)']),
(40000000000, 40500000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Earth-To-Space)', 'Fixed-Satellite (Space-To-Earth) [5.516B]', 'Mobile-Satellite (Space-To-Earth)', 'Space Research (Earth-To-Space)'], ['Earth Exploration-Satellite (Space-To-Earth)'], ['[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03)']),
(40500000000, 41000000001): (False, True, True, True, False, ['Fixed-Satellite (Space-To-Earth)', 'Broadcasting', 'Broadcasting-Satellite'], [], ['[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)']),
(41000000000, 42500000001): (False, True, True, True, False, ['Fixed-Satellite (Space-To-Earth) [5.516B]', 'Broadcasting', 'Broadcasting-Satellite'], [], ['[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)', '[5.551F]: Different category of service: in Japan, the allocation of the band 41.5-42.5 GHz to the mobile service is on a primary basis (see No. 5.33). (WRC-97)', '[5.551H]: The equivalent power flux-density (epfd) produced in the frequency band 42.5-43.5 GHz by all space stations in any non-geostationary-satellite system in the fixed-satellite service (space-to-Earth), or in the broadcasting-satellite service operating in the frequency band 42-42.5 GHz, shall not exceed the following values at the site of any radio astronomy station for more than 2% of the time:−230 dB(W/m2) in 1 GHz and −246 dB(W/m2) in any 500 kHz of the frequency band 42.5-43.5 GHz at the site of any radio astronomy station registered as a single-dish telescope; and −209 dB(W/m2) in any 500 kHz of the frequency band 42.5-43.5 GHz at the site of any radio astronomy station registered as a very long baseline interferometry station. These epfd values shall be evaluated using the methodology given in Recommendation ITU-R S.1586-1 and the reference antenna pattern and the maximum gain of an antenna in the radio astronomy service given in Recommendation ITU-R RA.1631-0 and shall apply over the whole sky and for elevation angles higher than the minimum operating angle θmin of the radiotelescope (for which a default value of 5° should be adopted in the absence of notified information). These values shall apply at any radio astronomy station that either: – was in operation prior to 5 July 2003 and has been notified to the Bureau before 4 January 2004; or – was notified before the date of receipt of the complete Appendix 4 information for coordination or notification, as appropriate, for the space station to which the limits apply. Other radio astronomy stations notified after these dates may seek an agreement with administrations that have authorized the space stations. In Region 2, Resolution 743 (WRC-03) shall apply. The limits in this footnote may be exceeded at the site of a radio astronomy station of any country whose administration so agreed. (WRC-15) ', '[5.551I]: The power flux-density in the band 42.5-43.5 GHz produced by any geostationary space station in the fixed-satellite service (space-to-Earth), or the broadcasting-satellite service operating in the 42-42.5 GHz band, shall not exceed the following values at the site of any radio astronomy station:–137 dB(W/m2) in 1 GHz and –153 dB(W/m2) in any 500 kHz of the 42.5-43.5 GHz band at the site of any radio astronomy station registered as a single-dish telescope; and –116 dB(W/m2) in any 500 kHz of the 42.5-43.5 GHz band at the site of any radio astronomy station registered as a very long baseline interferometry station. These values shall apply at the site of any radio astronomy station that either: – was in operation prior to 5 July 2003 and has been notified to the Bureau before 4 January 2004; or – was notified before the date of receipt of the complete Appendix 4 information for coordination or notification, as appropriate, for the space station to which the limits apply. Other radio astronomy stations notified after these dates may seek an agreement with administrations that have authorized the space stations. In Region 2, Resolution 743 (WRC-03) shall apply. The limits in this footnote may be exceeded at the site of a radio astronomy station of any country whose administration so agreed. (WRC-03)']),
(42500000000, 43500000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.552]', 'Mobile Except Aeronautical Mobile', 'Radio Astronomy'], [], ['[5.552]: The allocation of the spectrum for the fixed-satellite service in the bands 42.5-43.5 GHz and 47.2-50.2 GHz for Earth-to-space transmission is greater than that in the band 37.5-39.5 GHz for space-to-Earth transmission in order to accommodate feeder links to broadcasting satellites. Administrations are urged to take all practicable steps to reserve the band 47.2-49.2 GHz for feeder links for the broadcasting-satellite service operating in the band 40.5-42.5 GHz.', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)']),
(43500000000, 47000000001): (False, False, True, False, False, ['Mobile [5.553]', 'Mobile-Satellite', 'Radionavigation', 'Radionavigation-Satellite'], [], ['[5.553]: In the bands 43.5-47 GHz and 66-71 GHz, stations in the land mobile service may be operated subject to not causing harmful interference to the space radiocommunication services to which these bands are allocated (see No. 5.43). (WRC-2000)', '[5.554]: In the bands 43.5-47 GHz, 66-71 GHz, 95-100 GHz, 123-130 GHz, 191.8-200 GHz and 252-265 GHz, satellite links connecting land stations at specified fixed points are also authorized when used in conjunction with the mobile-satellite service or the radionavigation-satellite service. (WRC-2000)']),
(47000000000, 47200000001): (True, False, False, False, False, ['Amateur', 'Amateur-Satellite'], [], []),
(47200000000, 47500000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.552]'], [], ['[5.552]: The allocation of the spectrum for the fixed-satellite service in the bands 42.5-43.5 GHz and 47.2-50.2 GHz for Earth-to-space transmission is greater than that in the band 37.5-39.5 GHz for space-to-Earth transmission in order to accommodate feeder links to broadcasting satellites. Administrations are urged to take all practicable steps to reserve the band 47.2-49.2 GHz for feeder links for the broadcasting-satellite service operating in the band 40.5-42.5 GHz.', '[5.552A]: The allocation to the fixed service in the bands 47.2-47.5 GHz and 47.9-48.2 GHz is designated for use by high altitude platform stations. The use of the bands 47.2-47.5 GHz and 47.9-48.2 GHz is subject to the provisions of Resolution 122 (Rev.WRC-07). (WRC-07)']),
(47500000000, 47900000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.552]', 'Fixed-Satellite (Space-To-Earth) [5.516B][5.554A]'], [], ['[5.552]: The allocation of the spectrum for the fixed-satellite service in the bands 42.5-43.5 GHz and 47.2-50.2 GHz for Earth-to-space transmission is greater than that in the band 37.5-39.5 GHz for space-to-Earth transmission in order to accommodate feeder links to broadcasting satellites. Administrations are urged to take all practicable steps to reserve the band 47.2-49.2 GHz for feeder links for the broadcasting-satellite service operating in the band 40.5-42.5 GHz.', '[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.554A]: The use of the bands 47.5-47.9 GHz, 48.2-48.54 GHz and 49.44-50.2 GHz by the fixed-satellite service (space-to-Earth) is limited to geostationary satellites. (WRC-03)']),
(47900000000, 48200000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.552]'], [], ['[5.552]: The allocation of the spectrum for the fixed-satellite service in the bands 42.5-43.5 GHz and 47.2-50.2 GHz for Earth-to-space transmission is greater than that in the band 37.5-39.5 GHz for space-to-Earth transmission in order to accommodate feeder links to broadcasting satellites. Administrations are urged to take all practicable steps to reserve the band 47.2-49.2 GHz for feeder links for the broadcasting-satellite service operating in the band 40.5-42.5 GHz.', '[5.552A]: The allocation to the fixed service in the bands 47.2-47.5 GHz and 47.9-48.2 GHz is designated for use by high altitude platform stations. The use of the bands 47.2-47.5 GHz and 47.9-48.2 GHz is subject to the provisions of Resolution 122 (Rev.WRC-07). (WRC-07)']),
(48200000000, 48540000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.552]', 'Fixed-Satellite (Space-To-Earth) [5.516B][5.554A][5.555B]'], [], ['[5.552]: The allocation of the spectrum for the fixed-satellite service in the bands 42.5-43.5 GHz and 47.2-50.2 GHz for Earth-to-space transmission is greater than that in the band 37.5-39.5 GHz for space-to-Earth transmission in order to accommodate feeder links to broadcasting satellites. Administrations are urged to take all practicable steps to reserve the band 47.2-49.2 GHz for feeder links for the broadcasting-satellite service operating in the band 40.5-42.5 GHz.', '[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.554A]: The use of the bands 47.5-47.9 GHz, 48.2-48.54 GHz and 49.44-50.2 GHz by the fixed-satellite service (space-to-Earth) is limited to geostationary satellites. (WRC-03)', '[5.555B]: The power flux-density in the band 48.94-49.04 GHz produced by any geostationary space station in the fixed-satellite service (space-to-Earth) operating in the bands 48.2-48.54 GHz and 49.44-50.2 GHz shall not exceed –151.8 dB(W/m2) in any 500 kHz band at the site of any radio astronomy station. (WRC-03)']),
(48540000000, 49440000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.552]'], [], ['[5.552]: The allocation of the spectrum for the fixed-satellite service in the bands 42.5-43.5 GHz and 47.2-50.2 GHz for Earth-to-space transmission is greater than that in the band 37.5-39.5 GHz for space-to-Earth transmission in order to accommodate feeder links to broadcasting satellites. Administrations are urged to take all practicable steps to reserve the band 47.2-49.2 GHz for feeder links for the broadcasting-satellite service operating in the band 40.5-42.5 GHz.', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03) ', '[5.555]: Additional allocation: the band 48.94-49.04 GHz is also allocated to the radio astronomy service on a primary basis. (WRC-2000)']),
(49440000000, 50200000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.338A][5.552]', 'Fixed-Satellite (Space-To-Earth) [5.516B][5.554A][5.555B]'], [], ['[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)', '[5.552]: The allocation of the spectrum for the fixed-satellite service in the bands 42.5-43.5 GHz and 47.2-50.2 GHz for Earth-to-space transmission is greater than that in the band 37.5-39.5 GHz for space-to-Earth transmission in order to accommodate feeder links to broadcasting satellites. Administrations are urged to take all practicable steps to reserve the band 47.2-49.2 GHz for feeder links for the broadcasting-satellite service operating in the band 40.5-42.5 GHz.', '[5.516B]: The following bands are identified for use by high-density applications in the fixed-satellite service:17.3-17.7 GHz (space-to-Earth) in Region 1, 18.3-19.3 GHz (space-to-Earth) in Region 2, 19.7-20.2 GHz (space-to-Earth) in all Regions, 39.5-40 GHz (space-to-Earth) in Region 1, 40-40.5 GHz (space-to-Earth) in all Regions, 40.5-42 GHz (space-to-Earth) in Region 2, 47.5-47.9 GHz (space-to-Earth) in Region 1, 48.2-48.54 GHz (space-to-Earth) in Region 1, 49.44-50.2 GHz (space-to-Earth) in Region 1, and 27.5-27.82 GHz (Earth-to-space) in Region 1, 28.35-28.45 GHz (Earth-to-space) in Region 2, 28.45-28.94 GHz (Earth-to-space) in all Regions, 28.94-29.1 GHz (Earth-to-space) in Region 2 and 3, 29.25-29.46 GHz (Earth-to-space) in Region 2, 29.46-30 GHz (Earth-to-space) in all Regions, 48.2-50.2 GHz (Earth-to-space) in Region 2. This identification does not preclude the use of these bands by other fixed-satellite service applications or by other services to which these bands are allocated on a co-primary basis and does not establish priority in these Radio Regulations among users of the bands. Administrations should take this into account when considering regulatory provisions in relation to these bands. See Resolution 143 (WRC-03)*. (WRC-03) ', '[5.554A]: The use of the bands 47.5-47.9 GHz, 48.2-48.54 GHz and 49.44-50.2 GHz by the fixed-satellite service (space-to-Earth) is limited to geostationary satellites. (WRC-03)', '[5.555B]: The power flux-density in the band 48.94-49.04 GHz produced by any geostationary space station in the fixed-satellite service (space-to-Earth) operating in the bands 48.2-48.54 GHz and 49.44-50.2 GHz shall not exceed –151.8 dB(W/m2) in any 500 kHz band at the site of any radio astronomy station. (WRC-03)']),
(50200000000, 50400000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03)']),
(50400000000, 51400000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space) [5.338A]'], ['Mobile-Satellite (Earth-To-Space)'], ['[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)']),
(51400000000, 52600000001): (False, True, True, False, False, ['Fixed [5.338A]'], [], ['[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)', '[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)', '[5.556]: In the bands 51.4-54.25 GHz, 58.2-59 GHz and 64-65 GHz, radio astronomy observations may be carried out under national arrangements. (WRC-2000)']),
(52600000000, 54250000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03) ', '[5.556]: In the bands 51.4-54.25 GHz, 58.2-59 GHz and 64-65 GHz, radio astronomy observations may be carried out under national arrangements. (WRC-2000)']),
(54250000000, 55780000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Inter-Satellite [5.556A]', 'Space Research (Passive)'], [], ['[5.556A]: Use of the bands 54.25-56.9 GHz, 57-58.2 GHz and 59-59.3 GHz by the inter-satellite service is limited to satellites in the geostationary-satellite orbit. The single-entry power flux-density at all altitudes from 0 km to 1 000 km above the Earth’s surface produced by a station in the inter-satellite service, for all conditions and for all methods of modulation, shall not exceed –147 dB(W/(m2 × 100 MHz)) for all angles of arrival. (WRC-97)', '[5.556B]: Additional allocation: in Japan, the band 54.25-55.78 GHz is also allocated to the mobile service on a primary basis for low-density use. (WRC-97)']),
(55780000000, 56900000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Passive)', 'Fixed [5.557A]', 'Inter-Satellite [5.556A]', 'Mobile [5.558]', 'Space Research (Passive)'], [], ['[5.557A]: In the band 55.78-56.26 GHz, in order to protect stations in the Earth exploration-satellite service (passive), the maximum power density delivered by a transmitter to the antenna of a fixed service station is limited to –26 dB(W/MHz). (WRC-2000)', '[5.556A]: Use of the bands 54.25-56.9 GHz, 57-58.2 GHz and 59-59.3 GHz by the inter-satellite service is limited to satellites in the geostationary-satellite orbit. The single-entry power flux-density at all altitudes from 0 km to 1 000 km above the Earth’s surface produced by a station in the inter-satellite service, for all conditions and for all methods of modulation, shall not exceed –147 dB(W/(m2 × 100 MHz)) for all angles of arrival. (WRC-97)', '[5.558]: In the bands 55.78-58.2 GHz, 59-64 GHz, 66-71 GHz, 122.25-123 GHz, 130-134 GHz, 167-174.8 GHz and 191.8-200 GHz, stations in the aeronautical mobile service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)', '[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)', '[5.557]: Additional allocation: in Japan, the band 55.78-58.2 GHz is also allocated to the radiolocation service on a primary basis. (WRC-97)']),
(56900000000, 57000000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Passive)', 'Inter-Satellite [5.558A]', 'Mobile [5.558]', 'Space Research (Passive)'], [], ['[5.558A]: Use of the band 56.9-57 GHz by inter-satellite systems is limited to links between satellites in geostationary-satellite orbit and to transmissions from non-geostationary satellites in high-Earth orbit to those in low-Earth orbit. For links between satellites in the geostationary-satellite orbit, the single entry power flux-density at all altitudes from 0 km to 1 000 km above the Earth’s surface, for all conditions and for all methods of modulation, shall not exceed –147 dB(W/(m2 × 100 MHz)) for all angles of arrival. (WRC-97)', '[5.558]: In the bands 55.78-58.2 GHz, 59-64 GHz, 66-71 GHz, 122.25-123 GHz, 130-134 GHz, 167-174.8 GHz and 191.8-200 GHz, stations in the aeronautical mobile service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)', '[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)', '[5.557]: Additional allocation: in Japan, the band 55.78-58.2 GHz is also allocated to the radiolocation service on a primary basis. (WRC-97)']),
(57000000000, 58200000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Passive)', 'Inter-Satellite [5.556A]', 'Mobile [5.558]', 'Space Research (Passive)'], [], ['[5.556A]: Use of the bands 54.25-56.9 GHz, 57-58.2 GHz and 59-59.3 GHz by the inter-satellite service is limited to satellites in the geostationary-satellite orbit. The single-entry power flux-density at all altitudes from 0 km to 1 000 km above the Earth’s surface produced by a station in the inter-satellite service, for all conditions and for all methods of modulation, shall not exceed –147 dB(W/(m2 × 100 MHz)) for all angles of arrival. (WRC-97)', '[5.558]: In the bands 55.78-58.2 GHz, 59-64 GHz, 66-71 GHz, 122.25-123 GHz, 130-134 GHz, 167-174.8 GHz and 191.8-200 GHz, stations in the aeronautical mobile service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)', '[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)', '[5.557]: Additional allocation: in Japan, the band 55.78-58.2 GHz is also allocated to the radiolocation service on a primary basis. (WRC-97)']),
(58200000000, 59000000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Passive)', 'Space Research (Passive)'], [], ['[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)', '[5.556]: In the bands 51.4-54.25 GHz, 58.2-59 GHz and 64-65 GHz, radio astronomy observations may be carried out under national arrangements. (WRC-2000)']),
(59000000000, 59300000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Passive)', 'Inter-Satellite [5.556A]', 'Mobile [5.558]', 'Radiolocation [5.559]', 'Space Research (Passive)'], [], ['[5.556A]: Use of the bands 54.25-56.9 GHz, 57-58.2 GHz and 59-59.3 GHz by the inter-satellite service is limited to satellites in the geostationary-satellite orbit. The single-entry power flux-density at all altitudes from 0 km to 1 000 km above the Earth’s surface produced by a station in the inter-satellite service, for all conditions and for all methods of modulation, shall not exceed –147 dB(W/(m2 × 100 MHz)) for all angles of arrival. (WRC-97)', '[5.558]: In the bands 55.78-58.2 GHz, 59-64 GHz, 66-71 GHz, 122.25-123 GHz, 130-134 GHz, 167-174.8 GHz and 191.8-200 GHz, stations in the aeronautical mobile service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)', '[5.559]: In the band 59-64 GHz, airborne radars in the radiolocation service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)']),
(59300000000, 64000000001): (False, True, True, False, False, ['Inter-Satellite', 'Mobile [5.558]', 'Radiolocation [5.559]'], [], ['[5.558]: In the bands 55.78-58.2 GHz, 59-64 GHz, 66-71 GHz, 122.25-123 GHz, 130-134 GHz, 167-174.8 GHz and 191.8-200 GHz, stations in the aeronautical mobile service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)', '[5.559]: In the band 59-64 GHz, airborne radars in the radiolocation service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)', '[5.138]: The following bands:6 765-6 795 kHz (centre frequency 6 780 kHz), 433.05-434.79 MHz (centre frequency 433.92 MHz) in Region 1 except in the countries mentioned in No. 5.280, 61-61.5 GHz (centre frequency 61.25 GHz), 122-123 GHz (centre frequency 122.5 GHz), and 244-246 GHz (centre frequency 245 GHz) are designated for industrial, scientific and medical (ISM) applications. The use of these frequency bands for ISM applications shall be subject to special authorization by the administration concerned, in agreement with other administrations whose radiocommunication services might be affected. In applying this provision, administrations shall have due regard to the latest relevant ITU-R Recommendations.']),
(64000000000, 65000000001): (False, True, True, False, False, ['Inter-Satellite', 'Mobile Except Aeronautical Mobile'], [], ['[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)', '[5.556]: In the bands 51.4-54.25 GHz, 58.2-59 GHz and 64-65 GHz, radio astronomy observations may be carried out under national arrangements. (WRC-2000)']),
(65000000000, 66000000001): (False, True, True, False, False, ['Earth Exploration-Satellite', 'Inter-Satellite', 'Mobile Except Aeronautical Mobile', 'Space Research'], [], ['[5.547]: The bands 31.8-33.4 GHz, 37-40 GHz, 40.5-43.5 GHz, 51.4-52.6 GHz, 55.78-59 GHz and 64-66 GHz are available for high-density applications in the fixed service (see Resolution 75 (WRC-2000)*). Administrations should take this into account when considering regulatory provisions in relation to these bands. Because of the potential deployment of high-density applications in the fixed-satellite service in the bands 39.5-40 GHz and 40.5-42 GHz (see No. 5.516B), administrations should further take into account potential constraints to high-density applications in the fixed service, as appropriate. (WRC-07)']),
(66000000000, 71000000001): (False, False, True, False, False, ['Inter-Satellite', 'Mobile [5.553][5.558]', 'Mobile-Satellite', 'Radionavigation', 'Radionavigation-Satellite'], [], ['[5.553]: In the bands 43.5-47 GHz and 66-71 GHz, stations in the land mobile service may be operated subject to not causing harmful interference to the space radiocommunication services to which these bands are allocated (see No. 5.43). (WRC-2000)', '[5.558]: In the bands 55.78-58.2 GHz, 59-64 GHz, 66-71 GHz, 122.25-123 GHz, 130-134 GHz, 167-174.8 GHz and 191.8-200 GHz, stations in the aeronautical mobile service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)', '[5.554]: In the bands 43.5-47 GHz, 66-71 GHz, 95-100 GHz, 123-130 GHz, 191.8-200 GHz and 252-265 GHz, satellite links connecting land stations at specified fixed points are also authorized when used in conjunction with the mobile-satellite service or the radionavigation-satellite service. (WRC-2000)']),
(71000000000, 74000000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)', 'Mobile-Satellite (Space-To-Earth)'], [], []),
(74000000000, 76000000001): (False, True, True, True, False, ['Fixed-Satellite (Space-To-Earth)', 'Broadcasting', 'Broadcasting-Satellite'], ['Space Research (Space-To-Earth)'], ['[5.561]: In the band 74-76 GHz, stations in the fixed, mobile and broadcasting services shall not cause harmful interference to stations of the fixed-satellite service or stations of the broadcasting-satellite service operating in accordance with the decisions of the appropriate frequency assignment planning conference for the broadcasting-satellite service. (WRC-2000)']),
(76000000000, 77500000001): (True, False, False, False, False, ['Radio Astronomy', 'Radiolocation'], ['Amateur', 'Amateur-Satellite', 'Space Research (Space-To-Earth)'], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(77500000000, 78000000001): (True, False, False, False, False, ['Amateur', 'Amateur-Satellite', 'Radiolocation [5.559B]'], ['Radio Astronomy', 'Space Research (Space-To-Earth)'], ['[5.559B]: The use of the frequency band 77.5-78 GHz by the radiolocation service shall be limited to short-range radar for ground-based applications, including automotive radars. The technical characteristics of these radars are provided in the most recent version of Recommendation ITU-R M.2057. The provisions of No. 4.10 do not apply. (WRC-15)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(78000000000, 79000000001): (True, False, False, False, False, ['Radiolocation'], ['Amateur', 'Amateur-Satellite', 'Radio Astronomy', 'Space Research (Space-To-Earth)'], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.560]: In the band 78-79 GHz radars located on space stations may be operated on a primary basis in the Earth exploration-satellite service and in the space research service.']),
(79000000000, 81000000001): (True, False, False, False, False, ['Radio Astronomy', 'Radiolocation'], ['Amateur', 'Amateur-Satellite', 'Space Research (Space-To-Earth)'], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(81000000000, 84000000001): (False, True, True, False, False, ['Fixed [5.338A]', 'Fixed-Satellite (Earth-To-Space)', 'Mobile-Satellite (Earth-To-Space)', 'Radio Astronomy'], ['Space Research (Space-To-Earth)'], ['[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.561A]: The 81-81.5 GHz band is also allocated to the amateur and amateur-satellite services on a secondary basis. (WRC-2000)']),
(84000000000, 86000000001): (False, True, True, False, False, ['Fixed [5.338A]', 'Fixed-Satellite (Earth-To-Space) [5.561B]', 'Radio Astronomy'], [], ['[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)', '[5.561B]: In Japan, use of the band 84-86 GHz, by the fixed-satellite service (Earth-to-space) is limited to feeder links in the broadcasting-satellite service using the geostationary-satellite orbit. (WRC-2000)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(86000000000, 92000000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03)']),
(92000000000, 94000000001): (False, True, True, False, False, ['Fixed [5.338A]', 'Radio Astronomy', 'Radiolocation'], [], ['[5.338A]: In the frequency bands 1 350-1 400 MHz, 1 427-1 452 MHz, 22.55-23.55 GHz, 30-31.3 GHz, 49.7-50.2 GHz, 50.4-50.9 GHz, 51.4-52.6 GHz, 81-86 GHz and 92-94 GHz, Resolution 750 (Rev.WRC-15) applies. (WRC-15)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(94000000000, 94100000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Active)', 'Radiolocation', 'Space Research (Active)'], ['Radio Astronomy'], ['[5.562]: The use of the band 94-94.1 GHz by the Earth exploration-satellite (active) and space research (active) services is limited to spaceborne cloud radars. (WRC-97)', '[5.562A]: In the bands 94-94.1 GHz and 130-134 GHz, transmissions from space stations of the Earth exploration-satellite service (active) that are directed into the main beam of a radio astronomy antenna have the potential to damage some radio astronomy receivers. Space agencies operating the transmitters and the radio astronomy stations concerned should mutually plan their operations so as to avoid such occurrences to the maximum extent possible. (WRC-2000)']),
(94100000000, 95000000001): (False, True, True, False, False, ['Radio Astronomy', 'Radiolocation'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(95000000000, 100000000001): (False, True, True, False, False, ['Radio Astronomy', 'Radiolocation', 'Radionavigation', 'Radionavigation-Satellite'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.554]: In the bands 43.5-47 GHz, 66-71 GHz, 95-100 GHz, 123-130 GHz, 191.8-200 GHz and 252-265 GHz, satellite links connecting land stations at specified fixed points are also authorized when used in conjunction with the mobile-satellite service or the radionavigation-satellite service. (WRC-2000)']),
(100000000000, 102000000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(102000000000, 105000000001): (False, True, True, False, False, ['Radio Astronomy'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(105000000000, 109500000001): (False, True, True, False, False, ['Radio Astronomy', 'Space Research (Passive) [5.562B]'], [], ['[5.562B]: In the bands 105-109.5 GHz, 111.8-114.25 GHz, 155.5-158.5 GHz and 217-226 GHz, the use of this allocation is limited to space-based radio astronomy only. (WRC-2000)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(109500000000, 111800000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(111800000000, 114250000001): (False, True, True, False, False, ['Radio Astronomy', 'Space Research (Passive) [5.562B]'], [], ['[5.562B]: In the bands 105-109.5 GHz, 111.8-114.25 GHz, 155.5-158.5 GHz and 217-226 GHz, the use of this allocation is limited to space-based radio astronomy only. (WRC-2000)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(114250000000, 116000000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(116000000000, 119980000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Inter-Satellite [5.562C]', 'Space Research (Passive)'], [], ['[5.562C]: Use of the band 116-122.25 GHz by the inter-satellite service is limited to satellites in the geostationary-satellite orbit. The single-entry power flux-density produced by a station in the inter-satellite service, for all conditions and for all methods of modulation, at all altitudes from 0 km to 1 000 km above the Earth’s surface and in the vicinity of all geostationary orbital positions occupied by passive sensors, shall not exceed –148 dB(W/(m2 × MHz)) for all angles of arrival. (WRC-2000)', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(119980000000, 122250000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Inter-Satellite [5.562C]', 'Space Research (Passive)'], [], ['[5.562C]: Use of the band 116-122.25 GHz by the inter-satellite service is limited to satellites in the geostationary-satellite orbit. The single-entry power flux-density produced by a station in the inter-satellite service, for all conditions and for all methods of modulation, at all altitudes from 0 km to 1 000 km above the Earth’s surface and in the vicinity of all geostationary orbital positions occupied by passive sensors, shall not exceed –148 dB(W/(m2 × MHz)) for all angles of arrival. (WRC-2000)', '[5.138]: The following bands:6 765-6 795 kHz (centre frequency 6 780 kHz), 433.05-434.79 MHz (centre frequency 433.92 MHz) in Region 1 except in the countries mentioned in No. 5.280, 61-61.5 GHz (centre frequency 61.25 GHz), 122-123 GHz (centre frequency 122.5 GHz), and 244-246 GHz (centre frequency 245 GHz) are designated for industrial, scientific and medical (ISM) applications. The use of these frequency bands for ISM applications shall be subject to special authorization by the administration concerned, in agreement with other administrations whose radiocommunication services might be affected. In applying this provision, administrations shall have due regard to the latest relevant ITU-R Recommendations. ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(122250000000, 123000000001): (True, True, True, False, False, ['Inter-Satellite', 'Mobile [5.558]'], ['Amateur'], ['[5.558]: In the bands 55.78-58.2 GHz, 59-64 GHz, 66-71 GHz, 122.25-123 GHz, 130-134 GHz, 167-174.8 GHz and 191.8-200 GHz, stations in the aeronautical mobile service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)', '[5.138]: The following bands:6 765-6 795 kHz (centre frequency 6 780 kHz), 433.05-434.79 MHz (centre frequency 433.92 MHz) in Region 1 except in the countries mentioned in No. 5.280, 61-61.5 GHz (centre frequency 61.25 GHz), 122-123 GHz (centre frequency 122.5 GHz), and 244-246 GHz (centre frequency 245 GHz) are designated for industrial, scientific and medical (ISM) applications. The use of these frequency bands for ISM applications shall be subject to special authorization by the administration concerned, in agreement with other administrations whose radiocommunication services might be affected. In applying this provision, administrations shall have due regard to the latest relevant ITU-R Recommendations.']),
(123000000000, 130000000001): (False, False, False, False, False, ['Fixed-Satellite (Space-To-Earth)', 'Mobile-Satellite (Space-To-Earth)', 'Radionavigation', 'Radionavigation-Satellite'], ['Radio Astronomy [5.562D]'], ['[5.562D]: Additional allocation: In Korea (Rep. of), the frequency bands 128-130 GHz, 171-171.6 GHz, 172.2-172.8 GHz and 173.3-174 GHz are also allocated to the radio astronomy service on a primary basis. Radio astronomy stations in Korea (Rep. of) operating in the frequency bands referred to in this footnote shall not claim protection from, or constrain the use and development of, services in other countries operating in accordance with the Radio Regulations. (WRC-15)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.554]: In the bands 43.5-47 GHz, 66-71 GHz, 95-100 GHz, 123-130 GHz, 191.8-200 GHz and 252-265 GHz, satellite links connecting land stations at specified fixed points are also authorized when used in conjunction with the mobile-satellite service or the radionavigation-satellite service. (WRC-2000)']),
(130000000000, 134000000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Active) [5.562E]', 'Inter-Satellite', 'Mobile [5.558]', 'Radio Astronomy'], [], ['[5.562E]: The allocation to the Earth exploration-satellite service (active) is limited to the band 133.5-134 GHz. (WRC-2000)', '[5.558]: In the bands 55.78-58.2 GHz, 59-64 GHz, 66-71 GHz, 122.25-123 GHz, 130-134 GHz, 167-174.8 GHz and 191.8-200 GHz, stations in the aeronautical mobile service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.562A]: In the bands 94-94.1 GHz and 130-134 GHz, transmissions from space stations of the Earth exploration-satellite service (active) that are directed into the main beam of a radio astronomy antenna have the potential to damage some radio astronomy receivers. Space agencies operating the transmitters and the radio astronomy stations concerned should mutually plan their operations so as to avoid such occurrences to the maximum extent possible. (WRC-2000)']),
(134000000000, 136000000001): (True, False, False, False, False, ['Amateur', 'Amateur-Satellite'], ['Radio Astronomy'], []),
(136000000000, 141000000001): (True, False, False, False, False, ['Radio Astronomy', 'Radiolocation'], ['Amateur', 'Amateur-Satellite'], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(141000000000, 148500000001): (False, True, True, False, False, ['Radio Astronomy', 'Radiolocation'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(148500000000, 151500000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03)']),
(151500000000, 155500000001): (False, True, True, False, False, ['Radio Astronomy', 'Radiolocation'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(155500000000, 158500000001): (False, True, True, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive) [5.562B]'], [], ['[5.562B]: In the bands 105-109.5 GHz, 111.8-114.25 GHz, 155.5-158.5 GHz and 217-226 GHz, the use of this allocation is limited to space-based radio astronomy only. (WRC-2000)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.562F]: In the band 155.5-158.5 GHz, the allocation to the Earth exploration-satellite (passive) and space research (passive) services shall terminate on 1 January 2018. (WRC-2000)', '[5.562G]: The date of entry into force of the allocation to the fixed and mobile services in the band 155.5-158.5 GHz shall be 1 January 2018. (WRC-2000)']),
(158500000000, 164000000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)', 'Mobile-Satellite (Space-To-Earth)'], [], []),
(164000000000, 167000000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03)']),
(167000000000, 174500000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)', 'Inter-Satellite', 'Mobile [5.558]'], [], ['[5.558]: In the bands 55.78-58.2 GHz, 59-64 GHz, 66-71 GHz, 122.25-123 GHz, 130-134 GHz, 167-174.8 GHz and 191.8-200 GHz, stations in the aeronautical mobile service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.562D]: Additional allocation: In Korea (Rep. of), the frequency bands 128-130 GHz, 171-171.6 GHz, 172.2-172.8 GHz and 173.3-174 GHz are also allocated to the radio astronomy service on a primary basis. Radio astronomy stations in Korea (Rep. of) operating in the frequency bands referred to in this footnote shall not claim protection from, or constrain the use and development of, services in other countries operating in accordance with the Radio Regulations. (WRC-15)']),
(174500000000, 174800000001): (False, True, True, False, False, ['Inter-Satellite', 'Mobile [5.558]'], [], ['[5.558]: In the bands 55.78-58.2 GHz, 59-64 GHz, 66-71 GHz, 122.25-123 GHz, 130-134 GHz, 167-174.8 GHz and 191.8-200 GHz, stations in the aeronautical mobile service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)']),
(174800000000, 182000000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Inter-Satellite [5.562H]', 'Space Research (Passive)'], [], ['[5.562H]: Use of the bands 174.8-182 GHz and 185-190 GHz by the inter-satellite service is limited to satellites in the geostationary-satellite orbit. The single-entry power flux-density produced by a station in the inter-satellite service, for all conditions and for all methods of modulation, at all altitudes from 0 to 1 000 km above the Earth’s surface and in the vicinity of all geostationary orbital positions occupied by passive sensors, shall not exceed -144 dB(W/(m2 × MHz)) for all angles of arrival. (WRC-2000)']),
(182000000000, 185000000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03)']),
(185000000000, 190000000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Inter-Satellite [5.562H]', 'Space Research (Passive)'], [], ['[5.562H]: Use of the bands 174.8-182 GHz and 185-190 GHz by the inter-satellite service is limited to satellites in the geostationary-satellite orbit. The single-entry power flux-density produced by a station in the inter-satellite service, for all conditions and for all methods of modulation, at all altitudes from 0 to 1 000 km above the Earth’s surface and in the vicinity of all geostationary orbital positions occupied by passive sensors, shall not exceed -144 dB(W/(m2 × MHz)) for all angles of arrival. (WRC-2000)']),
(190000000000, 191800000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03)']),
(191800000000, 200000000001): (False, True, True, False, False, ['Inter-Satellite', 'Mobile [5.558]', 'Mobile-Satellite', 'Radionavigation', 'Radionavigation-Satellite'], [], ['[5.558]: In the bands 55.78-58.2 GHz, 59-64 GHz, 66-71 GHz, 122.25-123 GHz, 130-134 GHz, 167-174.8 GHz and 191.8-200 GHz, stations in the aeronautical mobile service may be operated subject to not causing harmful interference to the inter-satellite service (see No. 5.43). (WRC-2000)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.554]: In the bands 43.5-47 GHz, 66-71 GHz, 95-100 GHz, 123-130 GHz, 191.8-200 GHz and 252-265 GHz, satellite links connecting land stations at specified fixed points are also authorized when used in conjunction with the mobile-satellite service or the radionavigation-satellite service. (WRC-2000)']),
(200000000000, 209000000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.', '[5.563A]: In the bands 200-209 GHz, 235-238 GHz, 250-252 GHz and 265-275 GHz, ground-based passive atmospheric sensing is carried out to monitor atmospheric constituents. (WRC-2000)']),
(209000000000, 217000000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space)', 'Radio Astronomy'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(217000000000, 226000000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space)', 'Radio Astronomy', 'Space Research (Passive) [5.562B]'], [], ['[5.562B]: In the bands 105-109.5 GHz, 111.8-114.25 GHz, 155.5-158.5 GHz and 217-226 GHz, the use of this allocation is limited to space-based radio astronomy only. (WRC-2000)', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.341]: In the bands 1 400-1 727 MHz, 101-120 GHz and 197-220 GHz, passive research is being conducted by some countries in a programme for the search for intentional emissions of extraterrestrial origin.']),
(226000000000, 231500000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03)']),
(231500000000, 232000000001): (False, True, True, False, False, [], ['Radiolocation'], []),
(232000000000, 235000000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)'], ['Radiolocation'], []),
(235000000000, 238000000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Fixed-Satellite (Space-To-Earth)', 'Space Research (Passive)'], [], ['[5.563A]: In the bands 200-209 GHz, 235-238 GHz, 250-252 GHz and 265-275 GHz, ground-based passive atmospheric sensing is carried out to monitor atmospheric constituents. (WRC-2000)', '[5.563B]: The band 237.9-238 GHz is also allocated to the Earth exploration-satellite service (active) and the space research service (active) for spaceborne cloud radars only. (WRC-2000)']),
(238000000000, 240000000001): (False, True, True, False, False, ['Fixed-Satellite (Space-To-Earth)', 'Radiolocation', 'Radionavigation', 'Radionavigation-Satellite'], [], []),
(240000000000, 241000000001): (False, True, True, False, False, ['Radiolocation'], [], []),
(241000000000, 248000000001): (True, False, False, False, False, ['Radio Astronomy', 'Radiolocation'], ['Amateur', 'Amateur-Satellite'], ['[5.138]: The following bands:6 765-6 795 kHz (centre frequency 6 780 kHz), 433.05-434.79 MHz (centre frequency 433.92 MHz) in Region 1 except in the countries mentioned in No. 5.280, 61-61.5 GHz (centre frequency 61.25 GHz), 122-123 GHz (centre frequency 122.5 GHz), and 244-246 GHz (centre frequency 245 GHz) are designated for industrial, scientific and medical (ISM) applications. The use of these frequency bands for ISM applications shall be subject to special authorization by the administration concerned, in agreement with other administrations whose radiocommunication services might be affected. In applying this provision, administrations shall have due regard to the latest relevant ITU-R Recommendations. ', '[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(248000000000, 250000000001): (True, False, False, False, False, ['Amateur', 'Amateur-Satellite'], ['Radio Astronomy'], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07)']),
(250000000000, 252000000001): (False, False, False, False, False, ['Earth Exploration-Satellite (Passive)', 'Radio Astronomy', 'Space Research (Passive)'], [], ['[5.340]: All emissions are prohibited in the following bands:1 400-1 427 MHz, 2 690-2 700 MHz, except those provided for by No. 5.422, 10.68-10.7 GHz, except those provided for by No. 5.483, 15.35-15.4 GHz, except those provided for by No. 5.511, 23.6-24 GHz, 31.3-31.5 GHz, 31.5-31.8 GHz, in Region 2, 48.94-49.04 GHz, from airborne stations 50.2-50.4 GHz2, 52.6-54.25 GHz, 86-92 GHz, 100-102 GHz, 109.5-111.8 GHz, 114.25-116 GHz, 148.5-151.5 GHz, 164-167 GHz, 182-185 GHz, 190-191.8 GHz, 200-209 GHz, 226-231.5 GHz, 250-252 GHz. (WRC-03) ', '[5.563A]: In the bands 200-209 GHz, 235-238 GHz, 250-252 GHz and 265-275 GHz, ground-based passive atmospheric sensing is carried out to monitor atmospheric constituents. (WRC-2000)']),
(252000000000, 265000000001): (False, True, True, False, False, ['Mobile-Satellite (Earth-To-Space)', 'Radio Astronomy', 'Radionavigation', 'Radionavigation-Satellite'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.554]: In the bands 43.5-47 GHz, 66-71 GHz, 95-100 GHz, 123-130 GHz, 191.8-200 GHz and 252-265 GHz, satellite links connecting land stations at specified fixed points are also authorized when used in conjunction with the mobile-satellite service or the radionavigation-satellite service. (WRC-2000)']),
(265000000000, 275000000001): (False, True, True, False, False, ['Fixed-Satellite (Earth-To-Space)', 'Radio Astronomy'], [], ['[5.149]: In making assignments to stations of other services to which the bands:13 360-13 410 kHz, 25 550-25 670 kHz, 37.5-38.25 MHz, 73-74.6 MHz in Regions 1 and 3, 150.05-153 MHz in Region 1, 322-328.6 MHz, 406.1-410 MHz, 608-614 MHz in Regions 1 and 3, 1 330-1 400 MHz, 1 610.6-1 613.8 MHz, 1 660-1 670 MHz, 1 718.8-1 722.2 MHz, 2 655-2 690 MHz, 3 260-3 267 MHz, 3 332-3 339 MHz, 3 345.8-3 352.5 MHz, 4 825-4 835 MHz, 4 950-4 990 MHz, 4 990-5 000 MHz, 6 650-6 675.2 MHz, 10.6-10.68 GHz, 14.47-14.5 GHz, 22.01-22.21 GHz, 22.21-22.5 GHz, 22.81-22.86 GHz, 23.07-23.12 GHz, 31.2-31.3 GHz, 31.5-31.8 GHz in Regions 1 and 3, 36.43-36.5 GHz, 42.5-43.5 GHz, 48.94-49.04 GHz, 76-86 GHz, 92-94 GHz, 94.1-100 GHz, 102-109.5 GHz, 111.8-114.25 GHz, 128.33-128.59 GHz, 129.23-129.49 GHz, 130-134 GHz, 136-148.5 GHz, 151.5-158.5 GHz, 168.59-168.93 GHz, 171.11-171.45 GHz, 172.31-172.65 GHz, 173.52-173.85 GHz, 195.75-196.15 GHz, 209-226 GHz, 241-250 GHz, 252-275 GHz are allocated, administrations are urged to take all practicable steps to protect the radio astronomy service from harmful interference. Emissions from spaceborne or airborne stations can be particularly serious sources of interference to the radio astronomy service (see Nos. 4.5 and 4.6 and Article 29). (WRC-07) ', '[5.563A]: In the bands 200-209 GHz, 235-238 GHz, 250-252 GHz and 265-275 GHz, ground-based passive atmospheric sensing is carried out to monitor atmospheric constituents. (WRC-2000)']),
(275000000000, 3000000000001): (False, False, False, False, False, ['(Not Allocated) [5.565]'], [], ['[5.565]: The following frequency bands in the range 275-1 000 GHz are identified for use by administrations for passive service applications:– radio astronomy service: 275-323 GHz, 327-371 GHz, 388-424 GHz, 426-442 GHz, 453-510 GHz, 623-711 GHz, 795-909 GHz and 926-945 GHz; – Earth exploration-satellite service (passive) and space research service (passive): 275-286 GHz, 296-306 GHz, 313-356 GHz, 361-365 GHz, 369-392 GHz, 397-399 GHz, 409-411 GHz, 416-434 GHz, 439-467 GHz, 477-502 GHz, 523-527 GHz, 538-581 GHz, 611-630 GHz, 634-654 GHz, 657-692 GHz, 713-718 GHz, 729-733 GHz, 750-754 GHz, 771-776 GHz, 823-846 GHz, 850-854 GHz, 857-862 GHz, 866-882 GHz, 905-928 GHz, 951-956 GHz, 968-973 GHz and 985-990 GHz.']),
})
| 1,291.174954 | 6,612 | 0.757086 | 122,857 | 701,108 | 4.321553 | 0.02634 | 0.013891 | 0.011436 | 0.014239 | 0.93111 | 0.915089 | 0.898968 | 0.884381 | 0.870217 | 0.856238 | 0 | 0.132974 | 0.147293 | 701,108 | 542 | 6,613 | 1,293.557196 | 0.754886 | 0 | 0 | 0 | 0 | 2.524954 | 0.930741 | 0.023265 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.162662 | 0.001848 | 0 | 0.001848 | 0.016636 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 11 |
0a4926d1cc4df7e389ff7e45f20052fa7ac77469 | 16,187 | py | Python | cabot/cabotapp/migrations/0016_auto__add_index_statuscheckresult_check_time_complete.py | villaaston/cabot | d6fda8f8b8915f745ec21a82a80532d057dfed01 | [
"MIT"
] | 1 | 2016-04-21T02:06:50.000Z | 2016-04-21T02:06:50.000Z | cabot/cabotapp/migrations/0016_auto__add_index_statuscheckresult_check_time_complete.py | villaaston/cabot | d6fda8f8b8915f745ec21a82a80532d057dfed01 | [
"MIT"
] | 2 | 2021-02-08T21:02:37.000Z | 2021-06-10T23:44:42.000Z | cabot/cabotapp/migrations/0016_auto__add_index_statuscheckresult_check_time_complete.py | villaaston/cabot | d6fda8f8b8915f745ec21a82a80532d057dfed01 | [
"MIT"
] | 1 | 2017-05-25T20:24:21.000Z | 2017-05-25T20:24:21.000Z | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding index on 'StatusCheckResult', fields ['check', 'time_complete']
db.create_index(u'cabotapp_statuscheckresult', ['check_id', 'time_complete'])
def backwards(self, orm):
# Removing index on 'StatusCheckResult', fields ['check', 'time_complete']
db.delete_index(u'cabotapp_statuscheckresult', ['check_id', 'time_complete'])
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'cabotapp.alertacknowledgement': {
'Meta': {'object_name': 'AlertAcknowledgement'},
'cancelled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'cancelled_user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cancelleduser_set'", 'null': 'True', 'to': u"orm['auth.User']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'service': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['cabotapp.Service']"}),
'time': ('django.db.models.fields.DateTimeField', [], {}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
},
u'cabotapp.alertplugin': {
'Meta': {'object_name': 'AlertPlugin'},
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_cabotapp.alertplugin_set'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}),
'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'cabotapp.alertpluginuserdata': {
'Meta': {'unique_together': "(('title', 'user'),)", 'object_name': 'AlertPluginUserData'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_cabotapp.alertpluginuserdata_set'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['cabotapp.UserProfile']"})
},
u'cabotapp.instance': {
'Meta': {'ordering': "['name']", 'object_name': 'Instance'},
'address': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'alerts': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['cabotapp.AlertPlugin']", 'symmetrical': 'False', 'blank': 'True'}),
'alerts_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'email_alert': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'hackpad_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'hipchat_alert': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_alert_sent': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.TextField', [], {}),
'old_overall_status': ('django.db.models.fields.TextField', [], {'default': "'PASSING'"}),
'overall_status': ('django.db.models.fields.TextField', [], {'default': "'PASSING'"}),
'sms_alert': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'status_checks': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['cabotapp.StatusCheck']", 'symmetrical': 'False', 'blank': 'True'}),
'telephone_alert': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'users_to_notify': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'})
},
u'cabotapp.instancestatussnapshot': {
'Meta': {'object_name': 'InstanceStatusSnapshot'},
'did_send_alert': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'snapshots'", 'to': u"orm['cabotapp.Instance']"}),
'num_checks_active': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'num_checks_failing': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'num_checks_passing': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'overall_status': ('django.db.models.fields.TextField', [], {'default': "'PASSING'"}),
'time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'})
},
u'cabotapp.service': {
'Meta': {'ordering': "['name']", 'object_name': 'Service'},
'alerts': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['cabotapp.AlertPlugin']", 'symmetrical': 'False', 'blank': 'True'}),
'alerts_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'email_alert': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'hackpad_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'hipchat_alert': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instances': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['cabotapp.Instance']", 'symmetrical': 'False', 'blank': 'True'}),
'last_alert_sent': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.TextField', [], {}),
'old_overall_status': ('django.db.models.fields.TextField', [], {'default': "'PASSING'"}),
'overall_status': ('django.db.models.fields.TextField', [], {'default': "'PASSING'"}),
'sms_alert': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'status_checks': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['cabotapp.StatusCheck']", 'symmetrical': 'False', 'blank': 'True'}),
'telephone_alert': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'url': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'users_to_notify': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'})
},
u'cabotapp.servicestatussnapshot': {
'Meta': {'object_name': 'ServiceStatusSnapshot'},
'did_send_alert': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'num_checks_active': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'num_checks_failing': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'num_checks_passing': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'overall_status': ('django.db.models.fields.TextField', [], {'default': "'PASSING'"}),
'service': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'snapshots'", 'to': u"orm['cabotapp.Service']"}),
'time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'})
},
u'cabotapp.shift': {
'Meta': {'object_name': 'Shift'},
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'end': ('django.db.models.fields.DateTimeField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'start': ('django.db.models.fields.DateTimeField', [], {}),
'uid': ('django.db.models.fields.TextField', [], {}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
},
u'cabotapp.statuscheck': {
'Meta': {'ordering': "['name']", 'object_name': 'StatusCheck'},
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'allowed_num_failures': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
'cached_health': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'calculated_status': ('django.db.models.fields.CharField', [], {'default': "'passing'", 'max_length': '50', 'blank': 'True'}),
'check_type': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True'}),
'debounce': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
'endpoint': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'expected_num_hosts': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
'frequency': ('django.db.models.fields.IntegerField', [], {'default': '5'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'importance': ('django.db.models.fields.CharField', [], {'default': "'ERROR'", 'max_length': '30'}),
'last_run': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'max_queued_build_time': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'metric': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'name': ('django.db.models.fields.TextField', [], {}),
'password': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_cabotapp.statuscheck_set'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}),
'status_code': ('django.db.models.fields.TextField', [], {'default': '200', 'null': 'True'}),
'text_match': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'timeout': ('django.db.models.fields.IntegerField', [], {'default': '30', 'null': 'True'}),
'username': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'value': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'verify_ssl_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
},
u'cabotapp.statuscheckresult': {
'Meta': {'ordering': "['-time_complete']", 'object_name': 'StatusCheckResult', 'index_together': "(('check', 'time_complete'),)"},
'check': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['cabotapp.StatusCheck']"}),
'error': ('django.db.models.fields.TextField', [], {'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'job_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
'raw_data': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'succeeded': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
'time_complete': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'})
},
u'cabotapp.userprofile': {
'Meta': {'object_name': 'UserProfile'},
'fallback_alert_user': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'hipchat_alias': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mobile_number': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20', 'blank': 'True'}),
'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': u"orm['auth.User']"})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
}
}
complete_apps = ['cabotapp'] | 82.586735 | 211 | 0.57262 | 1,631 | 16,187 | 5.570202 | 0.110975 | 0.113594 | 0.197248 | 0.281783 | 0.805504 | 0.757733 | 0.732636 | 0.64667 | 0.56896 | 0.50776 | 0 | 0.004459 | 0.182616 | 16,187 | 196 | 212 | 82.586735 | 0.682186 | 0.010193 | 0 | 0.302703 | 0 | 0 | 0.602847 | 0.351146 | 0 | 0 | 0 | 0 | 0 | 1 | 0.010811 | false | 0.059459 | 0.027027 | 0 | 0.054054 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
6a50f8376fdbefe11864fedd4102982026d1bf27 | 3,492 | py | Python | ivy/functional/backends/torch/core/reductions.py | swaroop516/ivy | 6b7541ec518f304e0c9363f7867760f04e7ce8f6 | [
"Apache-2.0"
] | null | null | null | ivy/functional/backends/torch/core/reductions.py | swaroop516/ivy | 6b7541ec518f304e0c9363f7867760f04e7ce8f6 | [
"Apache-2.0"
] | null | null | null | ivy/functional/backends/torch/core/reductions.py | swaroop516/ivy | 6b7541ec518f304e0c9363f7867760f04e7ce8f6 | [
"Apache-2.0"
] | null | null | null | """
Collection of PyTorch reduction functions, wrapped to fit Ivy syntax and signature.
"""
# global
import torch as _torch
from typing import Optional, List
def reduce_sum(x, axis: Optional[List[int]] = None, keepdims: bool = False):
if axis is None:
num_dims = len(x.shape)
axis = list(range(num_dims))
ret = _torch.sum(x, dim=axis, keepdim=keepdims)
if ret.shape == ():
return ret.view((1,))
return ret
def reduce_prod(x, axis: Optional[List[int]] = None, keepdims: bool = False):
if axis is None:
num_dims = len(x.shape)
axis = list(range(num_dims))
if isinstance(axis, int):
ret = _torch.prod(x, dim=axis, keepdim=keepdims)
if ret.shape == ():
return ret.view((1,))
return ret
dims = len(x.shape)
axis = [i%dims for i in axis]
axis.sort()
for i, a in enumerate(axis):
x = _torch.prod(x, dim=a if keepdims else a - i, keepdim=keepdims)
ret = x
if ret.shape == ():
return ret.view((1,))
return ret
def reduce_mean(x, axis: Optional[List[int]] = None, keepdims: bool = False):
if axis is None:
num_dims = len(x.shape)
axis = list(range(num_dims))
ret = _torch.mean(x, dim=axis, keepdim=keepdims)
if ret.shape == ():
return ret.view((1,))
return ret
def reduce_var(x, axis: Optional[List[int]] = None, keepdims: bool = False):
if axis is None:
num_dims = len(x.shape)
axis = list(range(num_dims))
ret = _torch.var(x, dim=axis, unbiased=False, keepdim=keepdims)
if ret.shape == ():
return ret.view((1,))
return ret
def reduce_min(x, axis: Optional[List[int]] = None, keepdims: bool = False):
if axis is None:
num_dims = len(x.shape)
axis = list(range(num_dims))
if isinstance(axis, int):
ret = _torch.min(x, dim=axis, keepdim=keepdims).values
if ret.shape == ():
return ret.view((1,))
return ret
dims = len(x.shape)
axis = [i%dims for i in axis]
axis.sort()
for i, a in enumerate(axis):
x = _torch.min(x, dim=a if keepdims else a - i, keepdim=keepdims).values
ret = x
if ret.shape == ():
return ret.view((1,))
return ret
def reduce_max(x, axis: Optional[List[int]] = None, keepdims: bool = False):
if axis is None:
num_dims = len(x.shape)
axis = list(range(num_dims))
if isinstance(axis, int):
ret = _torch.max(x, dim=axis, keepdim=keepdims).values
if ret.shape == ():
return ret.view((1,))
return ret
dims = len(x.shape)
axis = [i%dims for i in axis]
axis.sort()
for i, a in enumerate(axis):
x = _torch.max(x, dim=a if keepdims else a - i, keepdim=keepdims).values
ret = x
if ret.shape == ():
return ret.view((1,))
return ret
def einsum(equation, *operands):
ret = _torch.einsum(equation, *operands)
if ret.shape == ():
return ret.view((1,))
return ret
def all(x, axis: Optional[List[int]] = None, keepdims: bool = False):
x = x.type(_torch.bool)
if axis is None:
num_dims = len(x.shape)
axis = list(range(num_dims))
if isinstance(axis, int):
return _torch.all(x, dim=axis, keepdim=keepdims)
dims = len(x.shape)
axis = [i%dims for i in axis]
axis.sort()
for i, a in enumerate(axis):
x = _torch.all(x, dim=a if keepdims else a - i, keepdim=keepdims)
return x
| 29.1 | 83 | 0.588488 | 521 | 3,492 | 3.879079 | 0.120921 | 0.089065 | 0.043543 | 0.070757 | 0.853538 | 0.842157 | 0.842157 | 0.842157 | 0.842157 | 0.82187 | 0 | 0.00394 | 0.273196 | 3,492 | 119 | 84 | 29.344538 | 0.792356 | 0.02606 | 0 | 0.755102 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.081633 | false | 0 | 0.020408 | 0 | 0.326531 | 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 |
6ab98132b219be76a68e17fc4db1bb1cb52213bd | 19,895 | py | Python | saleor/graphql/giftcard/tests/mutations/test_gift_card_create.py | flamingowebjo/saleor | ecba9e1c10d32cd66c63a986e4cb907c421ce303 | [
"CC-BY-4.0"
] | null | null | null | saleor/graphql/giftcard/tests/mutations/test_gift_card_create.py | flamingowebjo/saleor | ecba9e1c10d32cd66c63a986e4cb907c421ce303 | [
"CC-BY-4.0"
] | 76 | 2021-11-01T04:53:42.000Z | 2022-03-28T04:51:25.000Z | saleor/graphql/giftcard/tests/mutations/test_gift_card_create.py | gustavoarmoa/saleor | f81b2f347e4c7a624cd68a1eca3b0a5611498f6e | [
"CC-BY-4.0"
] | null | null | null | from datetime import date, timedelta
from unittest import mock
import graphene
import pytest
from django.utils.functional import SimpleLazyObject
from .....giftcard import GiftCardEvents
from .....giftcard.error_codes import GiftCardErrorCode
from .....giftcard.models import GiftCard
from .....webhook.event_types import WebhookEventAsyncType
from ....tests.utils import assert_no_permission, get_graphql_content
CREATE_GIFT_CARD_MUTATION = """
mutation giftCardCreate($input: GiftCardCreateInput!){
giftCardCreate(input: $input) {
giftCard {
id
code
last4CodeChars
isActive
expiryDate
tags {
name
}
created
lastUsedOn
initialBalance {
currency
amount
}
currentBalance {
currency
amount
}
createdBy {
email
}
usedBy {
email
}
createdByEmail
usedByEmail
app {
name
}
product {
name
}
events {
type
message
user {
email
}
app {
name
}
balance {
initialBalance {
amount
currency
}
oldInitialBalance {
amount
currency
}
currentBalance {
amount
currency
}
oldCurrentBalance {
amount
currency
}
}
}
}
errors {
field
message
code
}
}
}
"""
@mock.patch("saleor.graphql.giftcard.mutations.send_gift_card_notification")
def test_create_never_expiry_gift_card(
send_notification_mock,
staff_api_client,
customer_user,
channel_USD,
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
gift_card_tag_list,
):
# given
initial_balance = 100
currency = "USD"
new_tag = "gift-card-tag"
existing_tag_name = gift_card_tag_list[0].name
tags = [new_tag, existing_tag_name]
note = "This is gift card note that will be save in gift card event."
variables = {
"input": {
"balance": {
"amount": initial_balance,
"currency": currency,
},
"userEmail": customer_user.email,
"channel": channel_USD.slug,
"addTags": tags,
"note": note,
"isActive": True,
}
}
# when
response = staff_api_client.post_graphql(
CREATE_GIFT_CARD_MUTATION,
variables,
permissions=[
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
],
)
# then
content = get_graphql_content(response)
errors = content["data"]["giftCardCreate"]["errors"]
data = content["data"]["giftCardCreate"]["giftCard"]
assert not errors
assert data["code"]
assert data["last4CodeChars"]
assert not data["expiryDate"]
assert len(data["tags"]) == 2
assert {tag["name"] for tag in data["tags"]} == set(tags)
assert data["createdBy"]["email"] == staff_api_client.user.email
assert data["createdByEmail"] == staff_api_client.user.email
assert not data["usedBy"]
assert not data["usedByEmail"]
assert not data["app"]
assert not data["lastUsedOn"]
assert data["isActive"]
assert data["initialBalance"]["amount"] == initial_balance
assert data["currentBalance"]["amount"] == initial_balance
assert len(data["events"]) == 2
created_event, note_added = data["events"]
assert created_event["type"] == GiftCardEvents.ISSUED.upper()
assert created_event["user"]["email"] == staff_api_client.user.email
assert not created_event["app"]
assert created_event["balance"]["initialBalance"]["amount"] == initial_balance
assert created_event["balance"]["initialBalance"]["currency"] == currency
assert created_event["balance"]["currentBalance"]["amount"] == initial_balance
assert created_event["balance"]["currentBalance"]["currency"] == currency
assert not created_event["balance"]["oldInitialBalance"]
assert not created_event["balance"]["oldCurrentBalance"]
assert note_added["type"] == GiftCardEvents.NOTE_ADDED.upper()
assert note_added["user"]["email"] == staff_api_client.user.email
assert not note_added["app"]
assert note_added["message"] == note
gift_card = GiftCard.objects.get()
send_notification_mock.assert_called_once_with(
staff_api_client.user,
None,
customer_user,
customer_user.email,
gift_card,
mock.ANY,
channel_slug=channel_USD.slug,
resending=False,
)
@mock.patch("saleor.graphql.giftcard.mutations.send_gift_card_notification")
def test_create_gift_card_by_app(
send_notification_mock,
app_api_client,
permission_manage_gift_card,
permission_manage_users,
):
# given
initial_balance = 100
currency = "USD"
tag = "gift-card-tag"
note = "This is gift card note that will be save in gift card event."
variables = {
"input": {
"balance": {
"amount": initial_balance,
"currency": currency,
},
"addTags": [tag],
"note": note,
"expiryDate": None,
"isActive": False,
}
}
# when
response = app_api_client.post_graphql(
CREATE_GIFT_CARD_MUTATION,
variables,
permissions=[permission_manage_gift_card, permission_manage_users],
)
# then
content = get_graphql_content(response)
errors = content["data"]["giftCardCreate"]["errors"]
data = content["data"]["giftCardCreate"]["giftCard"]
assert not errors
assert data["code"]
assert data["last4CodeChars"]
assert not data["expiryDate"]
assert len(data["tags"]) == 1
assert data["tags"][0]["name"] == tag
assert not data["createdBy"]
assert not data["createdByEmail"]
assert not data["usedBy"]
assert not data["usedByEmail"]
assert data["app"]["name"] == app_api_client.app.name
assert not data["lastUsedOn"]
assert data["isActive"] is False
assert data["initialBalance"]["amount"] == initial_balance
assert data["currentBalance"]["amount"] == initial_balance
assert len(data["events"]) == 2
created_event, note_added = data["events"]
assert created_event["type"] == GiftCardEvents.ISSUED.upper()
assert not created_event["user"]
assert created_event["app"]["name"] == app_api_client.app.name
assert created_event["balance"]["initialBalance"]["amount"] == initial_balance
assert created_event["balance"]["initialBalance"]["currency"] == currency
assert created_event["balance"]["currentBalance"]["amount"] == initial_balance
assert created_event["balance"]["currentBalance"]["currency"] == currency
assert not created_event["balance"]["oldInitialBalance"]
assert not created_event["balance"]["oldCurrentBalance"]
assert note_added["type"] == GiftCardEvents.NOTE_ADDED.upper()
assert not note_added["user"]
assert note_added["app"]["name"] == app_api_client.app.name
assert note_added["message"] == note
send_notification_mock.assert_not_called()
def test_create_gift_card_by_customer(api_client, customer_user, channel_USD):
# given
initial_balance = 100
currency = "USD"
tag = "gift-card-tag"
variables = {
"input": {
"balance": {
"amount": initial_balance,
"currency": currency,
},
"userEmail": customer_user.email,
"channel": channel_USD.slug,
"addTags": [tag],
"note": "This is gift card note that will be save in gift card event.",
"expiryDate": None,
"isActive": True,
}
}
# when
response = api_client.post_graphql(
CREATE_GIFT_CARD_MUTATION,
variables,
)
# then
assert_no_permission(response)
def test_create_gift_card_no_premissions(staff_api_client):
# given
initial_balance = 100
currency = "USD"
tag = "gift-card-tag"
variables = {
"input": {
"balance": {
"amount": initial_balance,
"currency": currency,
},
"addTags": [tag],
"note": "This is gift card note that will be save in gift card event.",
"expiryDate": None,
"isActive": True,
}
}
# when
response = staff_api_client.post_graphql(
CREATE_GIFT_CARD_MUTATION,
variables,
)
# then
assert_no_permission(response)
def test_create_gift_card_with_too_many_decimal_places_in_balance_amount(
staff_api_client,
customer_user,
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
):
# given
initial_balance = 10.123
currency = "USD"
tag = "gift-card-tag"
variables = {
"input": {
"balance": {
"amount": initial_balance,
"currency": currency,
},
"userEmail": customer_user.email,
"addTags": [tag],
"note": "This is gift card note that will be save in gift card event.",
"isActive": True,
}
}
# when
response = staff_api_client.post_graphql(
CREATE_GIFT_CARD_MUTATION,
variables,
permissions=[
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
],
)
# then
content = get_graphql_content(response)
errors = content["data"]["giftCardCreate"]["errors"]
data = content["data"]["giftCardCreate"]["giftCard"]
assert not data
assert len(errors) == 1
assert errors[0]["field"] == "balance"
assert errors[0]["code"] == GiftCardErrorCode.INVALID.name
def test_create_gift_card_with_malformed_email(
staff_api_client,
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
):
# given
initial_balance = 10
currency = "USD"
tag = "gift-card-tag"
variables = {
"input": {
"balance": {
"amount": initial_balance,
"currency": currency,
},
"userEmail": "malformed",
"addTags": [tag],
"note": "This is gift card note that will be save in gift card event.",
"isActive": True,
}
}
# when
response = staff_api_client.post_graphql(
CREATE_GIFT_CARD_MUTATION,
variables,
permissions=[
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
],
)
# then
content = get_graphql_content(response)
data = content["data"]["giftCardCreate"]["giftCard"]
errors = content["data"]["giftCardCreate"]["errors"]
assert not data
assert len(errors) == 1
error = errors[0]
assert error["field"] == "email"
assert error["code"] == GiftCardErrorCode.INVALID.name
def test_create_gift_card_lack_of_channel(
staff_api_client,
customer_user,
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
):
# given
initial_balance = 10
currency = "USD"
tag = "gift-card-tag"
variables = {
"input": {
"balance": {
"amount": initial_balance,
"currency": currency,
},
"userEmail": customer_user.email,
"addTags": [tag],
"note": "This is gift card note that will be save in gift card event.",
"isActive": True,
}
}
# when
response = staff_api_client.post_graphql(
CREATE_GIFT_CARD_MUTATION,
variables,
permissions=[
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
],
)
# then
content = get_graphql_content(response)
data = content["data"]["giftCardCreate"]["giftCard"]
errors = content["data"]["giftCardCreate"]["errors"]
assert not data
assert len(errors) == 1
error = errors[0]
assert error["field"] == "channel"
assert error["code"] == GiftCardErrorCode.REQUIRED.name
def test_create_gift_card_with_zero_balance_amount(
staff_api_client,
customer_user,
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
):
# given
currency = "USD"
tag = "gift-card-tag"
variables = {
"input": {
"balance": {
"amount": 0,
"currency": currency,
},
"userEmail": customer_user.email,
"addTags": [tag],
"note": "This is gift card note that will be save in gift card event.",
"isActive": True,
}
}
# when
response = staff_api_client.post_graphql(
CREATE_GIFT_CARD_MUTATION,
variables,
permissions=[
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
],
)
# then
content = get_graphql_content(response)
errors = content["data"]["giftCardCreate"]["errors"]
data = content["data"]["giftCardCreate"]["giftCard"]
assert not data
assert len(errors) == 1
assert errors[0]["field"] == "balance"
assert errors[0]["code"] == GiftCardErrorCode.INVALID.name
@mock.patch("saleor.graphql.giftcard.mutations.send_gift_card_notification")
def test_create_gift_card_with_expiry_date(
send_notification_mock,
staff_api_client,
customer_user,
channel_USD,
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
):
# given
initial_balance = 100
currency = "USD"
date_value = date.today() + timedelta(days=365)
tag = "gift-card-tag"
variables = {
"input": {
"balance": {
"amount": initial_balance,
"currency": currency,
},
"userEmail": customer_user.email,
"channel": channel_USD.slug,
"addTags": [tag],
"expiryDate": date_value,
"isActive": True,
}
}
# when
response = staff_api_client.post_graphql(
CREATE_GIFT_CARD_MUTATION,
variables,
permissions=[
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
],
)
# then
content = get_graphql_content(response)
errors = content["data"]["giftCardCreate"]["errors"]
data = content["data"]["giftCardCreate"]["giftCard"]
assert not errors
assert data["code"]
assert data["last4CodeChars"]
assert data["expiryDate"] == date_value.isoformat()
assert len(data["events"]) == 1
created_event = data["events"][0]
assert created_event["type"] == GiftCardEvents.ISSUED.upper()
assert created_event["user"]["email"] == staff_api_client.user.email
assert not created_event["app"]
assert created_event["balance"]["initialBalance"]["amount"] == initial_balance
assert created_event["balance"]["initialBalance"]["currency"] == currency
assert created_event["balance"]["currentBalance"]["amount"] == initial_balance
assert created_event["balance"]["currentBalance"]["currency"] == currency
assert not created_event["balance"]["oldInitialBalance"]
assert not created_event["balance"]["oldCurrentBalance"]
gift_card = GiftCard.objects.get()
send_notification_mock.assert_called_once_with(
staff_api_client.user,
None,
customer_user,
customer_user.email,
gift_card,
mock.ANY,
channel_slug=channel_USD.slug,
resending=False,
)
@pytest.mark.parametrize("date_value", [date(1999, 1, 1), date.today()])
def test_create_gift_card_with_expiry_date_type_invalid(
date_value,
staff_api_client,
customer_user,
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
):
# given
initial_balance = 100
currency = "USD"
tag = "gift-card-tag"
variables = {
"input": {
"balance": {
"amount": initial_balance,
"currency": currency,
},
"userEmail": customer_user.email,
"addTags": [tag],
"note": "This is gift card note that will be save in gift card event.",
"expiryDate": date_value,
"isActive": True,
}
}
# when
response = staff_api_client.post_graphql(
CREATE_GIFT_CARD_MUTATION,
variables,
permissions=[
permission_manage_gift_card,
permission_manage_users,
permission_manage_apps,
],
)
# then
content = get_graphql_content(response)
errors = content["data"]["giftCardCreate"]["errors"]
data = content["data"]["giftCardCreate"]["giftCard"]
assert not data
assert len(errors) == 1
assert errors[0]["field"] == "expiryDate"
assert errors[0]["code"] == GiftCardErrorCode.INVALID.name
@mock.patch("saleor.plugins.webhook.plugin.get_webhooks_for_event")
@mock.patch("saleor.plugins.webhook.plugin.trigger_webhooks_async")
def test_create_gift_card_trigger_webhook(
mocked_webhook_trigger,
mocked_get_webhooks_for_event,
any_webhook,
app_api_client,
permission_manage_gift_card,
permission_manage_users,
settings,
):
# given
mocked_get_webhooks_for_event.return_value = [any_webhook]
settings.PLUGINS = ["saleor.plugins.webhook.plugin.WebhookPlugin"]
initial_balance = 100
currency = "USD"
tag = "gift-card-tag"
note = "This is gift card note that will be save in gift card event."
variables = {
"input": {
"balance": {
"amount": initial_balance,
"currency": currency,
},
"addTags": [tag],
"note": note,
"expiryDate": None,
"isActive": False,
}
}
# when
response = app_api_client.post_graphql(
CREATE_GIFT_CARD_MUTATION,
variables,
permissions=[permission_manage_gift_card, permission_manage_users],
)
gift_card = GiftCard.objects.last()
# then
content = get_graphql_content(response)
errors = content["data"]["giftCardCreate"]["errors"]
data = content["data"]["giftCardCreate"]["giftCard"]
assert not errors
assert data["code"]
mocked_webhook_trigger.assert_called_once_with(
{
"id": graphene.Node.to_global_id("GiftCard", gift_card.id),
"is_active": gift_card.is_active,
},
WebhookEventAsyncType.GIFT_CARD_CREATED,
[any_webhook],
gift_card,
SimpleLazyObject(lambda: app_api_client.app),
)
| 29.128843 | 83 | 0.586479 | 1,940 | 19,895 | 5.751031 | 0.085052 | 0.061665 | 0.028861 | 0.03872 | 0.821278 | 0.810791 | 0.797526 | 0.782648 | 0.770189 | 0.750291 | 0 | 0.00472 | 0.307816 | 19,895 | 682 | 84 | 29.171554 | 0.805461 | 0.008796 | 0 | 0.710345 | 0 | 0 | 0.262064 | 0.020065 | 0 | 0 | 0 | 0 | 0.174138 | 1 | 0.018966 | false | 0 | 0.017241 | 0 | 0.036207 | 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 |
6acaf0efb51b68d20653630a94df067d5ea0795f | 16,857 | py | Python | tests/test_export_mojave_10_14_6.py | hhoeck/osxphotos | 432da7f139a5e4b37eeb358f4ede45314407f8e5 | [
"MIT"
] | null | null | null | tests/test_export_mojave_10_14_6.py | hhoeck/osxphotos | 432da7f139a5e4b37eeb358f4ede45314407f8e5 | [
"MIT"
] | null | null | null | tests/test_export_mojave_10_14_6.py | hhoeck/osxphotos | 432da7f139a5e4b37eeb358f4ede45314407f8e5 | [
"MIT"
] | null | null | null | import pytest
from osxphotos._constants import _UNKNOWN_PERSON
# TODO: put some of this code into a pre-function
PHOTOS_DB = "./tests/Test-10.14.6.photoslibrary/database/photos.db"
PHOTOS_DB_PATH = "/Test-10.14.6.photoslibrary/database/photos.db"
PHOTOS_LIBRARY_PATH = "/Test-10.14.6.photoslibrary"
KEYWORDS = [
"Kids",
"wedding",
"flowers",
"England",
"London",
"London 2018",
"St. James's Park",
"UK",
"United Kingdom",
]
PERSONS = ["Katie", "Suzy", "Maria"]
ALBUMS = ["Pumpkin Farm", "Test Album", "Test Album (1)"]
KEYWORDS_DICT = {
"Kids": 4,
"wedding": 2,
"flowers": 1,
"England": 1,
"London": 1,
"London 2018": 1,
"St. James's Park": 1,
"UK": 1,
"United Kingdom": 1,
}
PERSONS_DICT = {"Katie": 3, "Suzy": 2, "Maria": 1}
ALBUM_DICT = {"Pumpkin Farm": 3, "Test Album": 1, "Test Album (1)": 1}
UUID_DICT = {
"missing": "od0fmC7NQx+ayVr+%i06XA",
"has_adjustments": "6bxcNnzRQKGnK4uPrCJ9UQ",
"no_adjustments": "15uNd7%8RguTEgNPKHfTWw",
"export": "15uNd7%8RguTEgNPKHfTWw",
"location": "3Jn73XpSQQCluzRBMWRsMA",
"xmp": "8SOE9s0XQVGsuq4ONohTng",
}
def test_export_1():
# test basic export
# get an unedited image and export it using default filename
import os
import os.path
import tempfile
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["export"]])
filename = photos[0].filename
expected_dest = os.path.join(dest, filename)
got_dest = photos[0].export(dest)[0]
assert got_dest == expected_dest
assert os.path.isfile(got_dest)
def test_export_2():
# test export with user provided filename
import os
import os.path
import tempfile
import time
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["export"]])
timestamp = time.time()
filename = f"osxphotos-export-2-test-{timestamp}.jpg"
expected_dest = os.path.join(dest, filename)
got_dest = photos[0].export(dest, filename)[0]
assert got_dest == expected_dest
assert os.path.isfile(got_dest)
def test_export_3():
# test file already exists and test increment=True (default)
import os
import os.path
import pathlib
import tempfile
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["export"]])
filename = photos[0].filename
filename2 = pathlib.Path(filename)
filename2 = f"{filename2.stem} (1){filename2.suffix}"
expected_dest = os.path.join(dest, filename)
expected_dest_2 = os.path.join(dest, filename2)
got_dest = photos[0].export(dest)[0]
got_dest_2 = photos[0].export(dest)[0]
assert got_dest_2 == expected_dest_2
assert os.path.isfile(got_dest_2)
def test_export_4():
# test user supplied file already exists and test increment=True (default)
import os
import os.path
import pathlib
import tempfile
import time
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["export"]])
timestamp = time.time()
filename = f"osxphotos-export-2-test-{timestamp}.jpg"
filename2 = f"osxphotos-export-2-test-{timestamp} (1).jpg"
expected_dest = os.path.join(dest, filename)
expected_dest_2 = os.path.join(dest, filename2)
got_dest = photos[0].export(dest, filename)[0]
got_dest_2 = photos[0].export(dest, filename)[0]
assert got_dest_2 == expected_dest_2
assert os.path.isfile(got_dest_2)
def test_export_5():
# test file already exists and test increment=True (default)
# and overwrite = True
import os
import os.path
import tempfile
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["export"]])
filename = photos[0].filename
expected_dest = os.path.join(dest, filename)
got_dest = photos[0].export(dest)[0]
got_dest_2 = photos[0].export(dest, overwrite=True)[0]
assert got_dest_2 == got_dest
assert got_dest_2 == expected_dest
assert os.path.isfile(got_dest_2)
def test_export_6():
# test user supplied file already exists and test increment=True (default)
# and overwrite = True
import os
import os.path
import pathlib
import tempfile
import time
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["export"]])
timestamp = time.time()
filename = f"osxphotos-export-test-{timestamp}.jpg"
expected_dest = os.path.join(dest, filename)
got_dest = photos[0].export(dest, filename)[0]
got_dest_2 = photos[0].export(dest, filename, overwrite=True)[0]
assert got_dest_2 == got_dest
assert got_dest_2 == expected_dest
assert os.path.isfile(got_dest_2)
def test_export_7():
# test file already exists and test increment=False (not default), overwrite=False (default)
# should raise exception
import os
import os.path
import tempfile
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["export"]])
filename = photos[0].filename
expected_dest = os.path.join(dest, filename)
got_dest = photos[0].export(dest)[0]
with pytest.raises(Exception) as e:
# try to export again with increment = False
assert photos[0].export(dest, increment=False)[0]
assert e.type == type(FileExistsError())
def test_export_8():
# try to export missing file
# should raise exception
import os
import os.path
import tempfile
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["missing"]])
filename = photos[0].filename
expected_dest = os.path.join(dest, filename)
with pytest.raises(Exception) as e:
assert photos[0].export(dest)[0]
assert e.type == type(FileNotFoundError())
def test_export_9():
# try to export edited file that's not edited
# should raise exception
import os
import os.path
import tempfile
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["no_adjustments"]])
filename = photos[0].filename
expected_dest = os.path.join(dest, filename)
with pytest.raises(Exception) as e:
assert photos[0].export(dest, edited=True)
assert e.type == ValueError
def test_export_10():
# try to export edited file that's not edited and name provided
# should raise exception
import os
import os.path
import tempfile
import time
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["no_adjustments"]])
timestamp = time.time()
filename = f"osxphotos-export-test-{timestamp}.jpg"
expected_dest = os.path.join(dest, filename)
with pytest.raises(Exception) as e:
assert photos[0].export(dest, filename, edited=True)[0]
assert e.type == ValueError
def test_export_11():
# export edited file with name provided
import os
import os.path
import tempfile
import time
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["has_adjustments"]])
timestamp = time.time()
filename = f"osxphotos-export-test-{timestamp}.jpg"
expected_dest = os.path.join(dest, filename)
got_dest = photos[0].export(dest, filename, edited=True)[0]
assert got_dest == expected_dest
def test_export_12():
# export edited file with default name
import os
import os.path
import pathlib
import tempfile
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["has_adjustments"]])
edited_name = pathlib.Path(photos[0].path_edited).name
edited_suffix = pathlib.Path(edited_name).suffix
filename = pathlib.Path(photos[0].filename).stem + "_edited" + edited_suffix
expected_dest = os.path.join(dest, filename)
got_dest = photos[0].export(dest, edited=True)[0]
assert got_dest == expected_dest
def test_export_13():
# export to invalid destination
# should raise exception
import os
import os.path
import tempfile
import osxphotos
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
# create a folder that doesn't exist
i = 0
while os.path.isdir(dest):
dest = os.path.join(dest, str(i))
i += 1
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["export"]])
filename = photos[0].filename
expected_dest = os.path.join(dest, filename)
with pytest.raises(Exception) as e:
assert photos[0].export(dest)[0]
assert e.type == type(FileNotFoundError())
def test_exiftool_json_sidecar():
import osxphotos
import json
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["location"]])
json_expected = json.loads(
"""
[{"XMP:Title": "St. James\'s Park",
"XMP:TagsList": ["London 2018", "St. James\'s Park", "England", "United Kingdom", "UK", "London"],
"IPTC:Keywords": ["London 2018", "St. James\'s Park", "England", "United Kingdom", "UK", "London"],
"XMP:Subject": ["London 2018", "St. James\'s Park", "England", "United Kingdom", "UK", "London"],
"EXIF:GPSLatitude": "51 deg 30\' 12.86\\" N",
"EXIF:GPSLongitude": "0 deg 7\' 54.50\\" W",
"EXIF:GPSLatitudeRef": "North", "EXIF:GPSLongitudeRef": "West",
"EXIF:DateTimeOriginal": "2018:10:13 09:18:12",
"EXIF:OffsetTimeOriginal": "-04:00",
"EXIF:ModifyDate": "2019:12:01 11:43:45",
"_CreatedBy": "osxphotos, https://github.com/RhetTbull/osxphotos"
}] """
)[0]
json_got = photos[0]._exiftool_json_sidecar()
json_got = json.loads(json_got)[0]
# some gymnastics to account for different sort order in different pythons
for k, v in json_got.items():
if type(v) in (list, tuple):
assert sorted(json_expected[k]) == sorted(v)
else:
assert json_expected[k] == v
for k, v in json_expected.items():
if type(v) in (list, tuple):
assert sorted(json_got[k]) == sorted(v)
else:
assert json_got[k] == v
def test_xmp_sidecar():
import osxphotos
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["xmp"]])
xmp_expected = """<!-- Created with osxphotos https://github.com/RhetTbull/osxphotos -->
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.4.0">
<!-- mirrors Photos 5 "Export IPTC as XMP" option -->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
<photoshop:SidecarForExtension>jpg</photoshop:SidecarForExtension>
<dc:description>Girls with pumpkins</dc:description>
<dc:title>Can we carry this?</dc:title>
<!-- keywords and persons listed in <dc:subject> as Photos does -->
<dc:subject>
<rdf:Seq>
<rdf:li>Kids</rdf:li>
<rdf:li>Suzy</rdf:li>
<rdf:li>Katie</rdf:li>
</rdf:Seq>
</dc:subject>
<photoshop:DateCreated>2018-09-28T15:35:49.063000-04:00</photoshop:DateCreated>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:Iptc4xmpExt='http://iptc.org/std/Iptc4xmpExt/2008-02-29/'>
<Iptc4xmpExt:PersonInImage>
<rdf:Bag>
<rdf:li>Suzy</rdf:li>
<rdf:li>Katie</rdf:li>
</rdf:Bag>
</Iptc4xmpExt:PersonInImage>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:digiKam='http://www.digikam.org/ns/1.0/'>
<digiKam:TagsList>
<rdf:Seq>
<rdf:li>Kids</rdf:li>
</rdf:Seq>
</digiKam:TagsList>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmp='http://ns.adobe.com/xap/1.0/'>
<xmp:CreateDate>2018-09-28T15:35:49</xmp:CreateDate>
<xmp:ModifyDate>2018-09-28T15:35:49</xmp:ModifyDate>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:exif='http://ns.adobe.com/exif/1.0/'>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>"""
xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")]
xmp_got = photos[0]._xmp_sidecar(extension="jpg")
xmp_got_lines = [line.strip() for line in xmp_got.split("\n")]
for line_expected, line_got in zip(xmp_expected_lines, xmp_got_lines):
assert line_expected == line_got
def test_xmp_sidecar_keyword_template():
import osxphotos
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photos = photosdb.photos(uuid=[UUID_DICT["xmp"]])
xmp_expected = """<!-- Created with osxphotos https://github.com/RhetTbull/osxphotos -->
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.4.0">
<!-- mirrors Photos 5 "Export IPTC as XMP" option -->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
<photoshop:SidecarForExtension>jpg</photoshop:SidecarForExtension>
<dc:description>Girls with pumpkins</dc:description>
<dc:title>Can we carry this?</dc:title>
<!-- keywords and persons listed in <dc:subject> as Photos does -->
<dc:subject>
<rdf:Seq>
<rdf:li>Kids</rdf:li>
<rdf:li>Suzy</rdf:li>
<rdf:li>Katie</rdf:li>
</rdf:Seq>
</dc:subject>
<photoshop:DateCreated>2018-09-28T15:35:49.063000-04:00</photoshop:DateCreated>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:Iptc4xmpExt='http://iptc.org/std/Iptc4xmpExt/2008-02-29/'>
<Iptc4xmpExt:PersonInImage>
<rdf:Bag>
<rdf:li>Suzy</rdf:li>
<rdf:li>Katie</rdf:li>
</rdf:Bag>
</Iptc4xmpExt:PersonInImage>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:digiKam='http://www.digikam.org/ns/1.0/'>
<digiKam:TagsList>
<rdf:Seq>
<rdf:li>Kids</rdf:li>
<rdf:li>Test Album</rdf:li>
<rdf:li>Pumpkin Farm</rdf:li>
<rdf:li>2018</rdf:li>
</rdf:Seq>
</digiKam:TagsList>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmp='http://ns.adobe.com/xap/1.0/'>
<xmp:CreateDate>2018-09-28T15:35:49</xmp:CreateDate>
<xmp:ModifyDate>2018-09-28T15:35:49</xmp:ModifyDate>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:exif='http://ns.adobe.com/exif/1.0/'>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>"""
xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")]
xmp_got = photos[0]._xmp_sidecar(
keyword_template=["{folder_album}", "{created.year}"], extension="jpg"
)
xmp_got_lines = [line.strip() for line in xmp_got.split("\n")]
for line_expected, line_got in zip(
sorted(xmp_expected_lines), sorted(xmp_got_lines)
):
assert line_expected == line_got
| 31.274583 | 104 | 0.64626 | 2,159 | 16,857 | 4.94025 | 0.122279 | 0.020251 | 0.031877 | 0.028689 | 0.827302 | 0.819895 | 0.800675 | 0.791393 | 0.783236 | 0.763641 | 0 | 0.030066 | 0.218663 | 16,857 | 538 | 105 | 31.332714 | 0.779743 | 0.063179 | 0 | 0.745501 | 0 | 0.015424 | 0.352663 | 0.101731 | 0 | 0 | 0 | 0.001859 | 0.082262 | 1 | 0.041131 | false | 0 | 0.172237 | 0 | 0.213368 | 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 |
6ad07073a03e324975fda0d7c70abbf2e618f0a5 | 257 | py | Python | turbogears/i18n/tests/test_utils.py | timmartin19/turbogears | b5420cb7e55757d418d8fadb512dbd7803c4279c | [
"MIT"
] | null | null | null | turbogears/i18n/tests/test_utils.py | timmartin19/turbogears | b5420cb7e55757d418d8fadb512dbd7803c4279c | [
"MIT"
] | 9 | 2015-01-27T19:13:56.000Z | 2019-03-29T14:44:31.000Z | turbogears/i18n/tests/test_utils.py | timmartin19/turbogears | b5420cb7e55757d418d8fadb512dbd7803c4279c | [
"MIT"
] | 13 | 2015-04-14T14:15:53.000Z | 2020-03-18T01:05:46.000Z |
from turbogears.i18n.utils import *
def test_get_accept_languages():
assert get_accept_languages("da, en-gb;q=0.8, en;q=0.7") == ["da", "en_GB", "en"]
assert get_accept_languages("da;q=0.6, en-gb;q=1.0, en;q=0.7") == ["en_GB", "en", "da"]
| 32.125 | 92 | 0.614786 | 49 | 257 | 3.040816 | 0.408163 | 0.107383 | 0.362416 | 0.322148 | 0.348993 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0553 | 0.155642 | 257 | 7 | 93 | 36.714286 | 0.631336 | 0 | 0 | 0 | 0 | 0.25 | 0.298387 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0.25 | true | 0 | 0.25 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
0a77d101abbb47fc1a05ad52982957e7805c1a14 | 155 | py | Python | psi/app/utils/__init__.py | lusi1990/betterlifepsi | 8e7f8562967ab1816d8c25db3251c550a357f39c | [
"MIT"
] | 33 | 2018-10-19T03:41:56.000Z | 2022-01-23T16:26:02.000Z | psi/app/utils/__init__.py | lusi1990/betterlifepsi | 8e7f8562967ab1816d8c25db3251c550a357f39c | [
"MIT"
] | 318 | 2018-09-23T15:16:54.000Z | 2022-03-31T22:58:55.000Z | psi/app/utils/__init__.py | lusi1990/betterlifepsi | 8e7f8562967ab1816d8c25db3251c550a357f39c | [
"MIT"
] | 19 | 2018-10-22T18:04:18.000Z | 2021-12-06T19:49:05.000Z | from .db_util import *
from .date_util import *
from .decorations import *
from .form_util import *
from .format_util import *
from .security_util import * | 25.833333 | 28 | 0.774194 | 23 | 155 | 5 | 0.391304 | 0.434783 | 0.486957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148387 | 155 | 6 | 28 | 25.833333 | 0.871212 | 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 |
0aa75d5d4edfeceefa02e5772132285dae32c755 | 6,269 | py | Python | loldib/getratings/models/NA/na_ahri/na_ahri_bot.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_ahri/na_ahri_bot.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_ahri/na_ahri_bot.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | from getratings.models.ratings import Ratings
class NA_Ahri_Bot_Aatrox(Ratings):
pass
class NA_Ahri_Bot_Ahri(Ratings):
pass
class NA_Ahri_Bot_Akali(Ratings):
pass
class NA_Ahri_Bot_Alistar(Ratings):
pass
class NA_Ahri_Bot_Amumu(Ratings):
pass
class NA_Ahri_Bot_Anivia(Ratings):
pass
class NA_Ahri_Bot_Annie(Ratings):
pass
class NA_Ahri_Bot_Ashe(Ratings):
pass
class NA_Ahri_Bot_AurelionSol(Ratings):
pass
class NA_Ahri_Bot_Azir(Ratings):
pass
class NA_Ahri_Bot_Bard(Ratings):
pass
class NA_Ahri_Bot_Blitzcrank(Ratings):
pass
class NA_Ahri_Bot_Brand(Ratings):
pass
class NA_Ahri_Bot_Braum(Ratings):
pass
class NA_Ahri_Bot_Caitlyn(Ratings):
pass
class NA_Ahri_Bot_Camille(Ratings):
pass
class NA_Ahri_Bot_Cassiopeia(Ratings):
pass
class NA_Ahri_Bot_Chogath(Ratings):
pass
class NA_Ahri_Bot_Corki(Ratings):
pass
class NA_Ahri_Bot_Darius(Ratings):
pass
class NA_Ahri_Bot_Diana(Ratings):
pass
class NA_Ahri_Bot_Draven(Ratings):
pass
class NA_Ahri_Bot_DrMundo(Ratings):
pass
class NA_Ahri_Bot_Ekko(Ratings):
pass
class NA_Ahri_Bot_Elise(Ratings):
pass
class NA_Ahri_Bot_Evelynn(Ratings):
pass
class NA_Ahri_Bot_Ezreal(Ratings):
pass
class NA_Ahri_Bot_Fiddlesticks(Ratings):
pass
class NA_Ahri_Bot_Fiora(Ratings):
pass
class NA_Ahri_Bot_Fizz(Ratings):
pass
class NA_Ahri_Bot_Galio(Ratings):
pass
class NA_Ahri_Bot_Gangplank(Ratings):
pass
class NA_Ahri_Bot_Garen(Ratings):
pass
class NA_Ahri_Bot_Gnar(Ratings):
pass
class NA_Ahri_Bot_Gragas(Ratings):
pass
class NA_Ahri_Bot_Graves(Ratings):
pass
class NA_Ahri_Bot_Hecarim(Ratings):
pass
class NA_Ahri_Bot_Heimerdinger(Ratings):
pass
class NA_Ahri_Bot_Illaoi(Ratings):
pass
class NA_Ahri_Bot_Irelia(Ratings):
pass
class NA_Ahri_Bot_Ivern(Ratings):
pass
class NA_Ahri_Bot_Janna(Ratings):
pass
class NA_Ahri_Bot_JarvanIV(Ratings):
pass
class NA_Ahri_Bot_Jax(Ratings):
pass
class NA_Ahri_Bot_Jayce(Ratings):
pass
class NA_Ahri_Bot_Jhin(Ratings):
pass
class NA_Ahri_Bot_Jinx(Ratings):
pass
class NA_Ahri_Bot_Kalista(Ratings):
pass
class NA_Ahri_Bot_Karma(Ratings):
pass
class NA_Ahri_Bot_Karthus(Ratings):
pass
class NA_Ahri_Bot_Kassadin(Ratings):
pass
class NA_Ahri_Bot_Katarina(Ratings):
pass
class NA_Ahri_Bot_Kayle(Ratings):
pass
class NA_Ahri_Bot_Kayn(Ratings):
pass
class NA_Ahri_Bot_Kennen(Ratings):
pass
class NA_Ahri_Bot_Khazix(Ratings):
pass
class NA_Ahri_Bot_Kindred(Ratings):
pass
class NA_Ahri_Bot_Kled(Ratings):
pass
class NA_Ahri_Bot_KogMaw(Ratings):
pass
class NA_Ahri_Bot_Leblanc(Ratings):
pass
class NA_Ahri_Bot_LeeSin(Ratings):
pass
class NA_Ahri_Bot_Leona(Ratings):
pass
class NA_Ahri_Bot_Lissandra(Ratings):
pass
class NA_Ahri_Bot_Lucian(Ratings):
pass
class NA_Ahri_Bot_Lulu(Ratings):
pass
class NA_Ahri_Bot_Lux(Ratings):
pass
class NA_Ahri_Bot_Malphite(Ratings):
pass
class NA_Ahri_Bot_Malzahar(Ratings):
pass
class NA_Ahri_Bot_Maokai(Ratings):
pass
class NA_Ahri_Bot_MasterYi(Ratings):
pass
class NA_Ahri_Bot_MissFortune(Ratings):
pass
class NA_Ahri_Bot_MonkeyKing(Ratings):
pass
class NA_Ahri_Bot_Mordekaiser(Ratings):
pass
class NA_Ahri_Bot_Morgana(Ratings):
pass
class NA_Ahri_Bot_Nami(Ratings):
pass
class NA_Ahri_Bot_Nasus(Ratings):
pass
class NA_Ahri_Bot_Nautilus(Ratings):
pass
class NA_Ahri_Bot_Nidalee(Ratings):
pass
class NA_Ahri_Bot_Nocturne(Ratings):
pass
class NA_Ahri_Bot_Nunu(Ratings):
pass
class NA_Ahri_Bot_Olaf(Ratings):
pass
class NA_Ahri_Bot_Orianna(Ratings):
pass
class NA_Ahri_Bot_Ornn(Ratings):
pass
class NA_Ahri_Bot_Pantheon(Ratings):
pass
class NA_Ahri_Bot_Poppy(Ratings):
pass
class NA_Ahri_Bot_Quinn(Ratings):
pass
class NA_Ahri_Bot_Rakan(Ratings):
pass
class NA_Ahri_Bot_Rammus(Ratings):
pass
class NA_Ahri_Bot_RekSai(Ratings):
pass
class NA_Ahri_Bot_Renekton(Ratings):
pass
class NA_Ahri_Bot_Rengar(Ratings):
pass
class NA_Ahri_Bot_Riven(Ratings):
pass
class NA_Ahri_Bot_Rumble(Ratings):
pass
class NA_Ahri_Bot_Ryze(Ratings):
pass
class NA_Ahri_Bot_Sejuani(Ratings):
pass
class NA_Ahri_Bot_Shaco(Ratings):
pass
class NA_Ahri_Bot_Shen(Ratings):
pass
class NA_Ahri_Bot_Shyvana(Ratings):
pass
class NA_Ahri_Bot_Singed(Ratings):
pass
class NA_Ahri_Bot_Sion(Ratings):
pass
class NA_Ahri_Bot_Sivir(Ratings):
pass
class NA_Ahri_Bot_Skarner(Ratings):
pass
class NA_Ahri_Bot_Sona(Ratings):
pass
class NA_Ahri_Bot_Soraka(Ratings):
pass
class NA_Ahri_Bot_Swain(Ratings):
pass
class NA_Ahri_Bot_Syndra(Ratings):
pass
class NA_Ahri_Bot_TahmKench(Ratings):
pass
class NA_Ahri_Bot_Taliyah(Ratings):
pass
class NA_Ahri_Bot_Talon(Ratings):
pass
class NA_Ahri_Bot_Taric(Ratings):
pass
class NA_Ahri_Bot_Teemo(Ratings):
pass
class NA_Ahri_Bot_Thresh(Ratings):
pass
class NA_Ahri_Bot_Tristana(Ratings):
pass
class NA_Ahri_Bot_Trundle(Ratings):
pass
class NA_Ahri_Bot_Tryndamere(Ratings):
pass
class NA_Ahri_Bot_TwistedFate(Ratings):
pass
class NA_Ahri_Bot_Twitch(Ratings):
pass
class NA_Ahri_Bot_Udyr(Ratings):
pass
class NA_Ahri_Bot_Urgot(Ratings):
pass
class NA_Ahri_Bot_Varus(Ratings):
pass
class NA_Ahri_Bot_Vayne(Ratings):
pass
class NA_Ahri_Bot_Veigar(Ratings):
pass
class NA_Ahri_Bot_Velkoz(Ratings):
pass
class NA_Ahri_Bot_Vi(Ratings):
pass
class NA_Ahri_Bot_Viktor(Ratings):
pass
class NA_Ahri_Bot_Vladimir(Ratings):
pass
class NA_Ahri_Bot_Volibear(Ratings):
pass
class NA_Ahri_Bot_Warwick(Ratings):
pass
class NA_Ahri_Bot_Xayah(Ratings):
pass
class NA_Ahri_Bot_Xerath(Ratings):
pass
class NA_Ahri_Bot_XinZhao(Ratings):
pass
class NA_Ahri_Bot_Yasuo(Ratings):
pass
class NA_Ahri_Bot_Yorick(Ratings):
pass
class NA_Ahri_Bot_Zac(Ratings):
pass
class NA_Ahri_Bot_Zed(Ratings):
pass
class NA_Ahri_Bot_Ziggs(Ratings):
pass
class NA_Ahri_Bot_Zilean(Ratings):
pass
class NA_Ahri_Bot_Zyra(Ratings):
pass
| 15.033573 | 46 | 0.75642 | 972 | 6,269 | 4.452675 | 0.151235 | 0.223198 | 0.350739 | 0.446396 | 0.791359 | 0.791359 | 0 | 0 | 0 | 0 | 0 | 0 | 0.177221 | 6,269 | 416 | 47 | 15.069712 | 0.839085 | 0 | 0 | 0.498195 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.498195 | 0.00361 | 0 | 0.501805 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 7 |
0ab000bb34c2ad82274f0c0d1f97083457198303 | 178 | py | Python | minitf/autodiff/vjp_maker.py | guocuimi/minitf | f272a6b1546b82aaec41ec7d2c2d34fa40a40385 | [
"MIT"
] | 7 | 2020-02-10T08:16:30.000Z | 2021-01-31T14:08:02.000Z | minitf/autodiff/vjp_maker.py | guocuimi/minitf | f272a6b1546b82aaec41ec7d2c2d34fa40a40385 | [
"MIT"
] | 1 | 2020-02-29T01:57:54.000Z | 2020-02-29T01:57:54.000Z | minitf/autodiff/vjp_maker.py | guocuimi/minitf | f272a6b1546b82aaec41ec7d2c2d34fa40a40385 | [
"MIT"
] | null | null | null | __PRIMITIVE_VJP_MAKERS = {}
def def_vjp_maker(fun, vjp_maker):
__PRIMITIVE_VJP_MAKERS[fun] = vjp_maker
def get_vjp_maker(fun):
return __PRIMITIVE_VJP_MAKERS.get(fun)
| 17.8 | 43 | 0.769663 | 27 | 178 | 4.407407 | 0.296296 | 0.268908 | 0.453782 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.140449 | 178 | 9 | 44 | 19.777778 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0 | 0.2 | 0.6 | 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 |
0adc57535c1537c031f6863846b40dc8e0d646f6 | 13,328 | py | Python | devel/lib/python2.7/dist-packages/kinova_msgs/srv/_SetForceControlParams.py | Jam-cpu/Masters-Project---Final | 0b266b1f117a579b96507249f0a128d0e3cc082a | [
"BSD-3-Clause-Clear"
] | null | null | null | devel/lib/python2.7/dist-packages/kinova_msgs/srv/_SetForceControlParams.py | Jam-cpu/Masters-Project---Final | 0b266b1f117a579b96507249f0a128d0e3cc082a | [
"BSD-3-Clause-Clear"
] | null | null | null | devel/lib/python2.7/dist-packages/kinova_msgs/srv/_SetForceControlParams.py | Jam-cpu/Masters-Project---Final | 0b266b1f117a579b96507249f0a128d0e3cc082a | [
"BSD-3-Clause-Clear"
] | null | null | null | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from kinova_msgs/SetForceControlParamsRequest.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import geometry_msgs.msg
class SetForceControlParamsRequest(genpy.Message):
_md5sum = "5c0999be3d1c60dba47ea0b2fd08231e"
_type = "kinova_msgs/SetForceControlParamsRequest"
_has_header = False # flag to mark the presence of a Header object
_full_text = """geometry_msgs/Vector3 inertia_linear
geometry_msgs/Vector3 inertia_angular
geometry_msgs/Vector3 damping_linear
geometry_msgs/Vector3 damping_angular
geometry_msgs/Vector3 force_min_linear
geometry_msgs/Vector3 force_min_angular
geometry_msgs/Vector3 force_max_linear
geometry_msgs/Vector3 force_max_angular
================================================================================
MSG: geometry_msgs/Vector3
# This represents a vector in free space.
# It is only meant to represent a direction. Therefore, it does not
# make sense to apply a translation to it (e.g., when applying a
# generic rigid transformation to a Vector3, tf2 will only apply the
# rotation). If you want your data to be translatable too, use the
# geometry_msgs/Point message instead.
float64 x
float64 y
float64 z"""
__slots__ = ['inertia_linear','inertia_angular','damping_linear','damping_angular','force_min_linear','force_min_angular','force_max_linear','force_max_angular']
_slot_types = ['geometry_msgs/Vector3','geometry_msgs/Vector3','geometry_msgs/Vector3','geometry_msgs/Vector3','geometry_msgs/Vector3','geometry_msgs/Vector3','geometry_msgs/Vector3','geometry_msgs/Vector3']
def __init__(self, *args, **kwds):
"""
Constructor. Any message fields that are implicitly/explicitly
set to None will be assigned a default value. The recommend
use is keyword arguments as this is more robust to future message
changes. You cannot mix in-order arguments and keyword arguments.
The available fields are:
inertia_linear,inertia_angular,damping_linear,damping_angular,force_min_linear,force_min_angular,force_max_linear,force_max_angular
:param args: complete set of field values, in .msg order
:param kwds: use keyword arguments corresponding to message field names
to set specific fields.
"""
if args or kwds:
super(SetForceControlParamsRequest, self).__init__(*args, **kwds)
# message fields cannot be None, assign default values for those that are
if self.inertia_linear is None:
self.inertia_linear = geometry_msgs.msg.Vector3()
if self.inertia_angular is None:
self.inertia_angular = geometry_msgs.msg.Vector3()
if self.damping_linear is None:
self.damping_linear = geometry_msgs.msg.Vector3()
if self.damping_angular is None:
self.damping_angular = geometry_msgs.msg.Vector3()
if self.force_min_linear is None:
self.force_min_linear = geometry_msgs.msg.Vector3()
if self.force_min_angular is None:
self.force_min_angular = geometry_msgs.msg.Vector3()
if self.force_max_linear is None:
self.force_max_linear = geometry_msgs.msg.Vector3()
if self.force_max_angular is None:
self.force_max_angular = geometry_msgs.msg.Vector3()
else:
self.inertia_linear = geometry_msgs.msg.Vector3()
self.inertia_angular = geometry_msgs.msg.Vector3()
self.damping_linear = geometry_msgs.msg.Vector3()
self.damping_angular = geometry_msgs.msg.Vector3()
self.force_min_linear = geometry_msgs.msg.Vector3()
self.force_min_angular = geometry_msgs.msg.Vector3()
self.force_max_linear = geometry_msgs.msg.Vector3()
self.force_max_angular = geometry_msgs.msg.Vector3()
def _get_types(self):
"""
internal API method
"""
return self._slot_types
def serialize(self, buff):
"""
serialize message into buffer
:param buff: buffer, ``StringIO``
"""
try:
_x = self
buff.write(_get_struct_24d().pack(_x.inertia_linear.x, _x.inertia_linear.y, _x.inertia_linear.z, _x.inertia_angular.x, _x.inertia_angular.y, _x.inertia_angular.z, _x.damping_linear.x, _x.damping_linear.y, _x.damping_linear.z, _x.damping_angular.x, _x.damping_angular.y, _x.damping_angular.z, _x.force_min_linear.x, _x.force_min_linear.y, _x.force_min_linear.z, _x.force_min_angular.x, _x.force_min_angular.y, _x.force_min_angular.z, _x.force_max_linear.x, _x.force_max_linear.y, _x.force_max_linear.z, _x.force_max_angular.x, _x.force_max_angular.y, _x.force_max_angular.z))
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
def deserialize(self, str):
"""
unpack serialized message in str into this message instance
:param str: byte array of serialized message, ``str``
"""
if python3:
codecs.lookup_error("rosmsg").msg_type = self._type
try:
if self.inertia_linear is None:
self.inertia_linear = geometry_msgs.msg.Vector3()
if self.inertia_angular is None:
self.inertia_angular = geometry_msgs.msg.Vector3()
if self.damping_linear is None:
self.damping_linear = geometry_msgs.msg.Vector3()
if self.damping_angular is None:
self.damping_angular = geometry_msgs.msg.Vector3()
if self.force_min_linear is None:
self.force_min_linear = geometry_msgs.msg.Vector3()
if self.force_min_angular is None:
self.force_min_angular = geometry_msgs.msg.Vector3()
if self.force_max_linear is None:
self.force_max_linear = geometry_msgs.msg.Vector3()
if self.force_max_angular is None:
self.force_max_angular = geometry_msgs.msg.Vector3()
end = 0
_x = self
start = end
end += 192
(_x.inertia_linear.x, _x.inertia_linear.y, _x.inertia_linear.z, _x.inertia_angular.x, _x.inertia_angular.y, _x.inertia_angular.z, _x.damping_linear.x, _x.damping_linear.y, _x.damping_linear.z, _x.damping_angular.x, _x.damping_angular.y, _x.damping_angular.z, _x.force_min_linear.x, _x.force_min_linear.y, _x.force_min_linear.z, _x.force_min_angular.x, _x.force_min_angular.y, _x.force_min_angular.z, _x.force_max_linear.x, _x.force_max_linear.y, _x.force_max_linear.z, _x.force_max_angular.x, _x.force_max_angular.y, _x.force_max_angular.z,) = _get_struct_24d().unpack(str[start:end])
return self
except struct.error as e:
raise genpy.DeserializationError(e) # most likely buffer underfill
def serialize_numpy(self, buff, numpy):
"""
serialize message with numpy array types into buffer
:param buff: buffer, ``StringIO``
:param numpy: numpy python module
"""
try:
_x = self
buff.write(_get_struct_24d().pack(_x.inertia_linear.x, _x.inertia_linear.y, _x.inertia_linear.z, _x.inertia_angular.x, _x.inertia_angular.y, _x.inertia_angular.z, _x.damping_linear.x, _x.damping_linear.y, _x.damping_linear.z, _x.damping_angular.x, _x.damping_angular.y, _x.damping_angular.z, _x.force_min_linear.x, _x.force_min_linear.y, _x.force_min_linear.z, _x.force_min_angular.x, _x.force_min_angular.y, _x.force_min_angular.z, _x.force_max_linear.x, _x.force_max_linear.y, _x.force_max_linear.z, _x.force_max_angular.x, _x.force_max_angular.y, _x.force_max_angular.z))
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
def deserialize_numpy(self, str, numpy):
"""
unpack serialized message in str into this message instance using numpy for array types
:param str: byte array of serialized message, ``str``
:param numpy: numpy python module
"""
if python3:
codecs.lookup_error("rosmsg").msg_type = self._type
try:
if self.inertia_linear is None:
self.inertia_linear = geometry_msgs.msg.Vector3()
if self.inertia_angular is None:
self.inertia_angular = geometry_msgs.msg.Vector3()
if self.damping_linear is None:
self.damping_linear = geometry_msgs.msg.Vector3()
if self.damping_angular is None:
self.damping_angular = geometry_msgs.msg.Vector3()
if self.force_min_linear is None:
self.force_min_linear = geometry_msgs.msg.Vector3()
if self.force_min_angular is None:
self.force_min_angular = geometry_msgs.msg.Vector3()
if self.force_max_linear is None:
self.force_max_linear = geometry_msgs.msg.Vector3()
if self.force_max_angular is None:
self.force_max_angular = geometry_msgs.msg.Vector3()
end = 0
_x = self
start = end
end += 192
(_x.inertia_linear.x, _x.inertia_linear.y, _x.inertia_linear.z, _x.inertia_angular.x, _x.inertia_angular.y, _x.inertia_angular.z, _x.damping_linear.x, _x.damping_linear.y, _x.damping_linear.z, _x.damping_angular.x, _x.damping_angular.y, _x.damping_angular.z, _x.force_min_linear.x, _x.force_min_linear.y, _x.force_min_linear.z, _x.force_min_angular.x, _x.force_min_angular.y, _x.force_min_angular.z, _x.force_max_linear.x, _x.force_max_linear.y, _x.force_max_linear.z, _x.force_max_angular.x, _x.force_max_angular.y, _x.force_max_angular.z,) = _get_struct_24d().unpack(str[start:end])
return self
except struct.error as e:
raise genpy.DeserializationError(e) # most likely buffer underfill
_struct_I = genpy.struct_I
def _get_struct_I():
global _struct_I
return _struct_I
_struct_24d = None
def _get_struct_24d():
global _struct_24d
if _struct_24d is None:
_struct_24d = struct.Struct("<24d")
return _struct_24d
# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from kinova_msgs/SetForceControlParamsResponse.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
class SetForceControlParamsResponse(genpy.Message):
_md5sum = "d41d8cd98f00b204e9800998ecf8427e"
_type = "kinova_msgs/SetForceControlParamsResponse"
_has_header = False # flag to mark the presence of a Header object
_full_text = """
"""
__slots__ = []
_slot_types = []
def __init__(self, *args, **kwds):
"""
Constructor. Any message fields that are implicitly/explicitly
set to None will be assigned a default value. The recommend
use is keyword arguments as this is more robust to future message
changes. You cannot mix in-order arguments and keyword arguments.
The available fields are:
:param args: complete set of field values, in .msg order
:param kwds: use keyword arguments corresponding to message field names
to set specific fields.
"""
if args or kwds:
super(SetForceControlParamsResponse, self).__init__(*args, **kwds)
def _get_types(self):
"""
internal API method
"""
return self._slot_types
def serialize(self, buff):
"""
serialize message into buffer
:param buff: buffer, ``StringIO``
"""
try:
pass
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
def deserialize(self, str):
"""
unpack serialized message in str into this message instance
:param str: byte array of serialized message, ``str``
"""
if python3:
codecs.lookup_error("rosmsg").msg_type = self._type
try:
end = 0
return self
except struct.error as e:
raise genpy.DeserializationError(e) # most likely buffer underfill
def serialize_numpy(self, buff, numpy):
"""
serialize message with numpy array types into buffer
:param buff: buffer, ``StringIO``
:param numpy: numpy python module
"""
try:
pass
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
def deserialize_numpy(self, str, numpy):
"""
unpack serialized message in str into this message instance using numpy for array types
:param str: byte array of serialized message, ``str``
:param numpy: numpy python module
"""
if python3:
codecs.lookup_error("rosmsg").msg_type = self._type
try:
end = 0
return self
except struct.error as e:
raise genpy.DeserializationError(e) # most likely buffer underfill
_struct_I = genpy.struct_I
def _get_struct_I():
global _struct_I
return _struct_I
class SetForceControlParams(object):
_type = 'kinova_msgs/SetForceControlParams'
_md5sum = '5c0999be3d1c60dba47ea0b2fd08231e'
_request_class = SetForceControlParamsRequest
_response_class = SetForceControlParamsResponse
| 46.277778 | 590 | 0.719838 | 1,929 | 13,328 | 4.683774 | 0.101607 | 0.067737 | 0.054787 | 0.077919 | 0.862867 | 0.848035 | 0.848035 | 0.830548 | 0.812618 | 0.812618 | 0 | 0.015814 | 0.169718 | 13,328 | 287 | 591 | 46.439024 | 0.800651 | 0.185474 | 0 | 0.760417 | 1 | 0 | 0.148609 | 0.061872 | 0 | 0 | 0.001913 | 0 | 0 | 1 | 0.078125 | false | 0.010417 | 0.046875 | 0 | 0.270833 | 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 |
7c3471b810474c150401f68130c31d6d1ee39226 | 31,357 | py | Python | stable_baselines3/common/evaluation.py | osmarcedron/stable-baselines3 | 1dc35cf517e50b8a692ef09cf54cc7388831f73e | [
"MIT"
] | null | null | null | stable_baselines3/common/evaluation.py | osmarcedron/stable-baselines3 | 1dc35cf517e50b8a692ef09cf54cc7388831f73e | [
"MIT"
] | null | null | null | stable_baselines3/common/evaluation.py | osmarcedron/stable-baselines3 | 1dc35cf517e50b8a692ef09cf54cc7388831f73e | [
"MIT"
] | null | null | null | import warnings
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import gym
import numpy as np
import os
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from multiprocessing import Process
from stable_baselines3.common import base_class
from stable_baselines3.common.vec_env import DummyVecEnv, VecEnv, VecMonitor, is_vecenv_wrapped
from array2gif import write_gif
from os.path import normpath, basename
def heatmap_(data, row_labels, col_labels, ax=None,
cbar_kw={}, cbarlabel="", **kwargs):
"""
Create a heatmap from a numpy array and two lists of labels.
Parameters
----------
data
A 2D numpy array of shape (N, M).
row_labels
A list or array of length N with the labels for the rows.
col_labels
A list or array of length M with the labels for the columns.
ax
A `matplotlib.axes.Axes` instance to which the heatmap is plotted. If
not provided, use current axes or create a new one. Optional.
cbar_kw
A dictionary with arguments to `matplotlib.Figure.colorbar`. Optional.
cbarlabel
The label for the colorbar. Optional.
**kwargs
All other arguments are forwarded to `imshow`.
"""
if not ax:
ax = plt.gca()
# Plot the heatmap
im = ax.imshow(data, **kwargs)
# Create colorbar
cbar = ax.figure.colorbar(im, ax=ax, **cbar_kw)
cbar.ax.set_ylabel(cbarlabel, rotation=-90, va="bottom")
# We want to show all ticks...
ax.set_xticks(np.arange(data.shape[1]))
ax.set_yticks(np.arange(data.shape[0]))
# ... and label them with the respective list entries.
ax.set_xticklabels(col_labels)
ax.set_yticklabels(row_labels)
# Let the horizontal axes labeling appear on top.
ax.tick_params(top=True, bottom=False,
labeltop=True, labelbottom=False)
# Rotate the tick labels and set their alignment.
plt.setp(ax.get_xticklabels(), rotation=-30, ha="right",
rotation_mode="anchor")
# Turn spines off and create white grid.
ax.spines['right'].set_visible(False)
ax.spines['left'].set_visible(False)
ax.spines['bottom'].set_visible(False)
ax.spines['top'].set_visible(False)
ax.set_xticks(np.arange(data.shape[1]+1)-.5, minor=True)
ax.set_yticks(np.arange(data.shape[0]+1)-.5, minor=True)
ax.grid(which="minor", color="w", linestyle='-', linewidth=3)
ax.tick_params(which="minor", bottom=False, left=False)
return im, cbar
def annotate_heatmap(im, data=None, valfmt="{x:.2f}",
textcolors=("black", "white"),
threshold=None, **textkw):
"""
A function to annotate a heatmap.
Parameters
----------
im
The AxesImage to be labeled.
data
Data used to annotate. If None, the image's data is used. Optional.
valfmt
The format of the annotations inside the heatmap. This should either
use the string format method, e.g. "$ {x:.2f}", or be a
`matplotlib.ticker.Formatter`. Optional.
textcolors
A pair of colors. The first is used for values below a threshold,
the second for those above. Optional.
threshold
Value in data units according to which the colors from textcolors are
applied. If None (the default) uses the middle of the colormap as
separation. Optional.
**kwargs
All other arguments are forwarded to each call to `text` used to create
the text labels.
"""
if not isinstance(data, (list, np.ndarray)):
data = im.get_array()
# Normalize the threshold to the images color range.
if threshold is not None:
threshold = im.norm(threshold)
else:
threshold = im.norm(data.max())/2.
# Set default alignment to center, but allow it to be
# overwritten by textkw.
kw = dict(horizontalalignment="center",
verticalalignment="center")
kw.update(textkw)
# Get the formatter in case a string is supplied
if isinstance(valfmt, str):
valfmt = matplotlib.ticker.StrMethodFormatter(valfmt)
# Loop over the data and create a `Text` for each "pixel".
# Change the text's color depending on the data.
texts = []
for i in range(data.shape[0]):
for j in range(data.shape[1]):
kw.update(color=textcolors[int(im.norm(data[i, j]) > threshold)])
text = im.axes.text(j, i, valfmt(data[i, j], None), **kw)
texts.append(text)
return texts
def evaluate_policy(
model: "base_class.BaseAlgorithm",
env: Union[gym.Env, VecEnv],
n_eval_episodes: int = 10,
deterministic: bool = True,
render: bool = False,
callback: Optional[Callable[[Dict[str, Any], Dict[str, Any]], None]] = None,
reward_threshold: Optional[float] = None,
return_episode_rewards: bool = False,
warn: bool = True,
path: str = '',
gif: bool = False,
heatmap: bool = False
) -> Union[Tuple[float, float], Tuple[List[float], List[int]]]:
"""
Runs policy for ``n_eval_episodes`` episodes and returns average reward.
If a vector env is passed in, this divides the episodes to evaluate onto the
different elements of the vector env. This static division of work is done to
remove bias. See https://github.com/DLR-RM/stable-baselines3/issues/402 for more
details and discussion.
.. note::
If environment has not been wrapped with ``Monitor`` wrapper, reward and
episode lengths are counted as it appears with ``env.step`` calls. If
the environment contains wrappers that modify rewards or episode lengths
(e.g. reward scaling, early episode reset), these will affect the evaluation
results as well. You can avoid this by wrapping environment with ``Monitor``
wrapper before anything else.
:param model: The RL agent you want to evaluate.
:param env: The gym environment or ``VecEnv`` environment.
:param n_eval_episodes: Number of episode to evaluate the agent
:param deterministic: Whether to use deterministic or stochastic actions
:param render: Whether to render the environment or not
:param callback: callback function to do additional checks,
called after each step. Gets locals() and globals() passed as parameters.
:param reward_threshold: Minimum expected reward per episode,
this will raise an error if the performance is not met
:param return_episode_rewards: If True, a list of rewards and episode lengths
per episode will be returned instead of the mean.
:param warn: If True (default), warns user about lack of a Monitor wrapper in the
evaluation environment.
:return: Mean reward per episode, std of reward per episode.
Returns ([float], [int]) when ``return_episode_rewards`` is True, first
list containing per-episode rewards and second containing per-episode lengths
(in number of steps).
"""
is_monitor_wrapped = False
# Avoid circular import
from stable_baselines3.common.monitor import Monitor
if not isinstance(env, VecEnv):
env = DummyVecEnv([lambda: env])
is_monitor_wrapped = is_vecenv_wrapped(env, VecMonitor) or env.env_is_wrapped(Monitor)[0]
if not is_monitor_wrapped and warn:
warnings.warn(
"Evaluation environment is not wrapped with a ``Monitor`` wrapper. "
"This may result in reporting modified episode lengths and rewards, if other wrappers happen to modify these. "
"Consider wrapping environment first with ``Monitor`` wrapper.",
UserWarning,
)
n_envs = env.num_envs
episode_rewards = []
episode_lengths = []
episode_counts = np.zeros(n_envs, dtype="int")
# Divides episodes among different sub environments in the vector as evenly as possible
episode_count_targets = np.array([(n_eval_episodes + i) // n_envs for i in range(n_envs)], dtype="int")
current_rewards = np.zeros(n_envs)
current_lengths = np.zeros(n_envs, dtype="int")
observations = env.reset()
states = None
current_episode = 0
while (episode_counts < episode_count_targets).any():
actions, states = model.predict(observations, state=states, deterministic=deterministic)
observations, rewards, dones, infos = env.step(actions)
current_rewards += rewards
current_lengths += 1
for i in range(n_envs):
if episode_counts[i] < episode_count_targets[i]:
# unpack values so that the callback can access the local variables
reward = rewards[i]
done = dones[i]
info = infos[i]
if callback is not None:
callback(locals(), globals())
if dones[i]:
if is_monitor_wrapped:
# Atari wrapper can send a "done" signal when
# the agent loses a life, but it does not correspond
# to the true end of episode
if "episode" in info.keys():
# Do not trust "done" with episode endings.
# Monitor wrapper includes "episode" key in info if environment
# has been wrapped with it. Use those rewards instead.
episode_rewards.append(info["episode"]["r"])
episode_lengths.append(info["episode"]["l"])
# Only increment at the real end of an episode
episode_counts[i] += 1
else:
episode_rewards.append(current_rewards[i])
episode_lengths.append(current_lengths[i])
episode_counts[i] += 1
current_episode += 1
current_rewards[i] = 0
current_lengths[i] = 0
if states is not None:
states[i] *= 0
if render:
env.render()
mean_reward = np.mean(episode_rewards)
std_reward = np.std(episode_rewards)
if reward_threshold is not None:
assert mean_reward > reward_threshold, "Mean reward below threshold: " f"{mean_reward:.2f} < {reward_threshold:.2f}"
if return_episode_rewards:
return episode_rewards, episode_lengths
return mean_reward, std_reward
def evaluate_policy_gif(
model: "base_class.BaseAlgorithm",
env: Union[gym.Env, VecEnv],
n_eval_episodes: int = 10,
deterministic: bool = True,
render: bool = False,
callback: Optional[Callable[[Dict[str, Any], Dict[str, Any]], None]] = None,
reward_threshold: Optional[float] = None,
return_episode_rewards: bool = False,
warn: bool = True,
path: str = '',
gif: bool = True,
heatmap: bool = False
) -> Union[Tuple[float, float], Tuple[List[float], List[int]]]:
"""
Runs policy for ``n_eval_episodes`` episodes and returns average reward.
If a vector env is passed in, this divides the episodes to evaluate onto the
different elements of the vector env. This static division of work is done to
remove bias. See https://github.com/DLR-RM/stable-baselines3/issues/402 for more
details and discussion.
.. note::
If environment has not been wrapped with ``Monitor`` wrapper, reward and
episode lengths are counted as it appears with ``env.step`` calls. If
the environment contains wrappers that modify rewards or episode lengths
(e.g. reward scaling, early episode reset), these will affect the evaluation
results as well. You can avoid this by wrapping environment with ``Monitor``
wrapper before anything else.
:param model: The RL agent you want to evaluate.
:param env: The gym environment or ``VecEnv`` environment.
:param n_eval_episodes: Number of episode to evaluate the agent
:param deterministic: Whether to use deterministic or stochastic actions
:param render: Whether to render the environment or not
:param callback: callback function to do additional checks,
called after each step. Gets locals() and globals() passed as parameters.
:param reward_threshold: Minimum expected reward per episode,
this will raise an error if the performance is not met
:param return_episode_rewards: If True, a list of rewards and episode lengths
per episode will be returned instead of the mean.
:param warn: If True (default), warns user about lack of a Monitor wrapper in the
evaluation environment.
:return: Mean reward per episode, std of reward per episode.
Returns ([float], [int]) when ``return_episode_rewards`` is True, first
list containing per-episode rewards and second containing per-episode lengths
(in number of steps).
"""
is_monitor_wrapped = False
# Avoid circular import
from stable_baselines3.common.monitor import Monitor
if not isinstance(env, VecEnv):
env = DummyVecEnv([lambda: env])
is_monitor_wrapped = is_vecenv_wrapped(env, VecMonitor) or env.env_is_wrapped(Monitor)[0]
if not is_monitor_wrapped and warn:
warnings.warn(
"Evaluation environment is not wrapped with a ``Monitor`` wrapper. "
"This may result in reporting modified episode lengths and rewards, if other wrappers happen to modify these. "
"Consider wrapping environment first with ``Monitor`` wrapper.",
UserWarning,
)
n_envs = env.num_envs
episode_rewards = []
episode_lengths = []
episode_counts = np.zeros(n_envs, dtype="int")
# Divides episodes among different sub environments in the vector as evenly as possible
episode_count_targets = np.array([(n_eval_episodes + i) // n_envs for i in range(n_envs)], dtype="int")
current_rewards = np.zeros(n_envs)
current_lengths = np.zeros(n_envs, dtype="int")
observations = env.reset()
states = None
frames = [[] for _ in range(n_eval_episodes)]
current_episode = 0
while (episode_counts < episode_count_targets).any():
env.render('human')
actions, states = model.predict(observations, state=states, deterministic=deterministic)
observations, rewards, dones, infos = env.step(actions)
current_rewards += rewards
current_lengths += 1
for i in range(n_envs):
frames[current_episode].append(np.moveaxis(env.render("rgb_array"), 2, 0))
if episode_counts[i] < episode_count_targets[i]:
# unpack values so that the callback can access the local variables
reward = rewards[i]
done = dones[i]
info = infos[i]
if callback is not None:
callback(locals(), globals())
if dones[i]:
if is_monitor_wrapped:
# Atari wrapper can send a "done" signal when
# the agent loses a life, but it does not correspond
# to the true end of episode
if "episode" in info.keys():
# Do not trust "done" with episode endings.
# Monitor wrapper includes "episode" key in info if environment
# has been wrapped with it. Use those rewards instead.
episode_rewards.append(info["episode"]["r"])
episode_lengths.append(info["episode"]["l"])
# Only increment at the real end of an episode
episode_counts[i] += 1
else:
episode_rewards.append(current_rewards[i])
episode_lengths.append(current_lengths[i])
episode_counts[i] += 1
current_episode += 1
current_rewards[i] = 0
current_lengths[i] = 0
if states is not None:
states[i] *= 0
if render:
env.render()
print("Saving gifs... ")
gif_path = os.path.join(path, "gif")
os.makedirs(gif_path)
for i in range(n_eval_episodes):
write_gif(np.array(frames[i]),
os.path.join(gif_path, "{}.gif".format(i)),
1/0.1)
print("Done.")
mean_reward = np.mean(episode_rewards)
std_reward = np.std(episode_rewards)
if reward_threshold is not None:
assert mean_reward > reward_threshold, "Mean reward below threshold: " f"{mean_reward:.2f} < {reward_threshold:.2f}"
if return_episode_rewards:
return episode_rewards, episode_lengths
return mean_reward, std_reward
def evaluate_policy_heatmap(
model: "base_class.BaseAlgorithm",
env: Union[gym.Env, VecEnv],
n_eval_episodes: int = 10,
deterministic: bool = True,
render: bool = False,
callback: Optional[Callable[[Dict[str, Any], Dict[str, Any]], None]] = None,
reward_threshold: Optional[float] = None,
return_episode_rewards: bool = False,
warn: bool = True,
path: str = '',
gif: bool = False,
heatmap: int = False
) -> Union[Tuple[float, float], Tuple[List[float], List[int]]]:
"""
Runs policy for ``n_eval_episodes`` episodes and returns average reward.
If a vector env is passed in, this divides the episodes to evaluate onto the
different elements of the vector env. This static division of work is done to
remove bias. See https://github.com/DLR-RM/stable-baselines3/issues/402 for more
details and discussion.
.. note::
If environment has not been wrapped with ``Monitor`` wrapper, reward and
episode lengths are counted as it appears with ``env.step`` calls. If
the environment contains wrappers that modify rewards or episode lengths
(e.g. reward scaling, early episode reset), these will affect the evaluation
results as well. You can avoid this by wrapping environment with ``Monitor``
wrapper before anything else.
:param model: The RL agent you want to evaluate.
:param env: The gym environment or ``VecEnv`` environment.
:param n_eval_episodes: Number of episode to evaluate the agent
:param deterministic: Whether to use deterministic or stochastic actions
:param render: Whether to render the environment or not
:param callback: callback function to do additional checks,
called after each step. Gets locals() and globals() passed as parameters.
:param reward_threshold: Minimum expected reward per episode,
this will raise an error if the performance is not met
:param return_episode_rewards: If True, a list of rewards and episode lengths
per episode will be returned instead of the mean.
:param warn: If True (default), warns user about lack of a Monitor wrapper in the
evaluation environment.
:return: Mean reward per episode, std of reward per episode.
Returns ([float], [int]) when ``return_episode_rewards`` is True, first
list containing per-episode rewards and second containing per-episode lengths
(in number of steps).
"""
is_monitor_wrapped = False
# Avoid circular import
from stable_baselines3.common.monitor import Monitor
if not isinstance(env, VecEnv):
env = DummyVecEnv([lambda: env])
is_monitor_wrapped = is_vecenv_wrapped(env, VecMonitor) or env.env_is_wrapped(Monitor)[0]
if not is_monitor_wrapped and warn:
warnings.warn(
"Evaluation environment is not wrapped with a ``Monitor`` wrapper. "
"This may result in reporting modified episode lengths and rewards, if other wrappers happen to modify these. "
"Consider wrapping environment first with ``Monitor`` wrapper.",
UserWarning,
)
n_envs = env.num_envs
episode_rewards = []
episode_lengths = []
episode_counts = np.zeros(n_envs, dtype="int")
# Divides episodes among different sub environments in the vector as evenly as possible
episode_count_targets = np.array([(n_eval_episodes + i) // n_envs for i in range(n_envs)], dtype="int")
current_rewards = np.zeros(n_envs)
current_lengths = np.zeros(n_envs, dtype="int")
observations = env.reset()
states = None
grid = np.zeros((n_eval_episodes, env.get_attr("height")[0],
env.get_attr("width")[0]), dtype=np.float64)
total_steps = [0 for _ in range(n_eval_episodes)]
current_episode = 0
while (episode_counts < episode_count_targets).any():
env.render('human')
actions, states = model.predict(observations, state=states, deterministic=deterministic)
observations, rewards, dones, infos = env.step(actions)
current_rewards += rewards
current_lengths += 1
for i in range(n_envs):
total_steps[current_episode] += 1
grid[current_episode][env.get_attr("agent_pos")[0][1]][env.get_attr("agent_pos")[0][0]] += 1
if episode_counts[i] < episode_count_targets[i]:
# unpack values so that the callback can access the local variables
reward = rewards[i]
done = dones[i]
info = infos[i]
if callback is not None:
callback(locals(), globals())
if dones[i]:
if is_monitor_wrapped:
# Atari wrapper can send a "done" signal when
# the agent loses a life, but it does not correspond
# to the true end of episode
if "episode" in info.keys():
# Do not trust "done" with episode endings.
# Monitor wrapper includes "episode" key in info if environment
# has been wrapped with it. Use those rewards instead.
episode_rewards.append(info["episode"]["r"])
episode_lengths.append(info["episode"]["l"])
# Only increment at the real end of an episode
episode_counts[i] += 1
else:
episode_rewards.append(current_rewards[i])
episode_lengths.append(current_lengths[i])
episode_counts[i] += 1
current_episode += 1
current_rewards[i] = 0
current_lengths[i] = 0
if states is not None:
states[i] *= 0
if render:
env.render()
print("Saving heatmaps... ")
heatmap_path = os.path.join(path, "heatmap")
os.makedirs(heatmap_path)
def save_heatmap(i):
fig, ax = plt.subplots()
x = list(range(1, env.get_attr("height")[0] - 1))
y = list(range(1, env.get_attr("width")[0] - 1))
real_grid = grid[i, 1:len(x) + 1, 1:len(y) + 1] / total_steps[i]
im, cbar = heatmap_(real_grid, x, y, cmap="YlGn", cbarlabel="# of steps [%] with total {}".format(total_steps[i]))
texts = annotate_heatmap(im, valfmt="{x:.3f}")
fig.tight_layout()
plt.savefig(os.path.join(heatmap_path, '{}.png'.format(i)))
for i in range(n_eval_episodes):
save_heatmap(i)
print("Done.")
mean_reward = np.mean(episode_rewards)
std_reward = np.std(episode_rewards)
if reward_threshold is not None:
assert mean_reward > reward_threshold, "Mean reward below threshold: " f"{mean_reward:.2f} < {reward_threshold:.2f}"
if return_episode_rewards:
return episode_rewards, episode_lengths
return mean_reward, std_reward
def evaluate_policy_gif_heatmap(
model: "base_class.BaseAlgorithm",
env: Union[gym.Env, VecEnv],
n_eval_episodes: int = 10,
deterministic: bool = True,
render: bool = False,
callback: Optional[Callable[[Dict[str, Any], Dict[str, Any]], None]] = None,
reward_threshold: Optional[float] = None,
return_episode_rewards: bool = False,
warn: bool = True,
path: str = '',
gif: bool = True,
heatmap: bool = True
) -> Union[Tuple[float, float], Tuple[List[float], List[int]]]:
"""
Runs policy for ``n_eval_episodes`` episodes and returns average reward.
If a vector env is passed in, this divides the episodes to evaluate onto the
different elements of the vector env. This static division of work is done to
remove bias. See https://github.com/DLR-RM/stable-baselines3/issues/402 for more
details and discussion.
.. note::
If environment has not been wrapped with ``Monitor`` wrapper, reward and
episode lengths are counted as it appears with ``env.step`` calls. If
the environment contains wrappers that modify rewards or episode lengths
(e.g. reward scaling, early episode reset), these will affect the evaluation
results as well. You can avoid this by wrapping environment with ``Monitor``
wrapper before anything else.
:param model: The RL agent you want to evaluate.
:param env: The gym environment or ``VecEnv`` environment.
:param n_eval_episodes: Number of episode to evaluate the agent
:param deterministic: Whether to use deterministic or stochastic actions
:param render: Whether to render the environment or not
:param callback: callback function to do additional checks,
called after each step. Gets locals() and globals() passed as parameters.
:param reward_threshold: Minimum expected reward per episode,
this will raise an error if the performance is not met
:param return_episode_rewards: If True, a list of rewards and episode lengths
per episode will be returned instead of the mean.
:param warn: If True (default), warns user about lack of a Monitor wrapper in the
evaluation environment.
:return: Mean reward per episode, std of reward per episode.
Returns ([float], [int]) when ``return_episode_rewards`` is True, first
list containing per-episode rewards and second containing per-episode lengths
(in number of steps).
"""
is_monitor_wrapped = False
# Avoid circular import
from stable_baselines3.common.monitor import Monitor
if not isinstance(env, VecEnv):
env = DummyVecEnv([lambda: env])
is_monitor_wrapped = is_vecenv_wrapped(env, VecMonitor) or env.env_is_wrapped(Monitor)[0]
if not is_monitor_wrapped and warn:
warnings.warn(
"Evaluation environment is not wrapped with a ``Monitor`` wrapper. "
"This may result in reporting modified episode lengths and rewards, if other wrappers happen to modify these. "
"Consider wrapping environment first with ``Monitor`` wrapper.",
UserWarning,
)
n_envs = env.num_envs
episode_rewards = []
episode_lengths = []
episode_counts = np.zeros(n_envs, dtype="int")
# Divides episodes among different sub environments in the vector as evenly as possible
episode_count_targets = np.array([(n_eval_episodes + i) // n_envs for i in range(n_envs)], dtype="int")
current_rewards = np.zeros(n_envs)
current_lengths = np.zeros(n_envs, dtype="int")
observations = env.reset()
states = None
frames = [[] for _ in range(n_eval_episodes)]
grid = np.zeros((n_eval_episodes, env.get_attr("height")[0],
env.get_attr("width")[0]), dtype=np.float64)
total_steps = [0 for _ in range(n_eval_episodes)]
current_episode = 0
while (episode_counts < episode_count_targets).any():
env.render('human')
actions, states = model.predict(observations, state=states, deterministic=deterministic)
observations, rewards, dones, infos = env.step(actions)
current_rewards += rewards
current_lengths += 1
for i in range(n_envs):
total_steps[current_episode] += 1
frames[current_episode].append(np.moveaxis(env.render("rgb_array"), 2, 0))
grid[current_episode][env.get_attr("agent_pos")[0][1]][env.get_attr("agent_pos")[0][0]] += 1
if episode_counts[i] < episode_count_targets[i]:
# unpack values so that the callback can access the local variables
reward = rewards[i]
done = dones[i]
info = infos[i]
if callback is not None:
callback(locals(), globals())
if dones[i]:
if is_monitor_wrapped:
# Atari wrapper can send a "done" signal when
# the agent loses a life, but it does not correspond
# to the true end of episode
if "episode" in info.keys():
# Do not trust "done" with episode endings.
# Monitor wrapper includes "episode" key in info if environment
# has been wrapped with it. Use those rewards instead.
episode_rewards.append(info["episode"]["r"])
episode_lengths.append(info["episode"]["l"])
# Only increment at the real end of an episode
episode_counts[i] += 1
else:
episode_rewards.append(current_rewards[i])
episode_lengths.append(current_lengths[i])
episode_counts[i] += 1
current_episode += 1
current_rewards[i] = 0
current_lengths[i] = 0
if states is not None:
states[i] *= 0
if render:
env.render()
print("Saving gifs... ")
gif_path = os.path.join(path, "gif")
os.makedirs(gif_path)
for i in range(n_eval_episodes):
write_gif(np.array(frames[i]),
os.path.join(gif_path, "{}.gif".format(i)), 1/0.1)
print("Done.")
print("Saving heatmaps... ")
heatmap_path = os.path.join(path, "heatmap")
os.makedirs(heatmap_path)
def save_heatmap(i):
fig, ax = plt.subplots()
x = list(range(1, env.get_attr("height")[0] - 1))
y = list(range(1, env.get_attr("width")[0] - 1))
real_grid = grid[i, 1:len(x) + 1, 1:len(y) + 1] / total_steps[i]
im, cbar = heatmap_(real_grid, x, y, cmap="YlGn", cbarlabel="# of steps [%] with total {}".format(total_steps[i]))
texts = annotate_heatmap(im, valfmt="{x:.3f}")
fig.tight_layout()
plt.savefig(os.path.join(heatmap_path, '{}.png'.format(i)))
for i in range(n_eval_episodes):
save_heatmap(i)
print("Done.")
mean_reward = np.mean(episode_rewards)
std_reward = np.std(episode_rewards)
if reward_threshold is not None:
assert mean_reward > reward_threshold, "Mean reward below threshold: " f"{mean_reward:.2f} < {reward_threshold:.2f}"
if return_episode_rewards:
return episode_rewards, episode_lengths
return mean_reward, std_reward
| 43.072802 | 124 | 0.628568 | 4,040 | 31,357 | 4.768317 | 0.104455 | 0.031977 | 0.017546 | 0.007423 | 0.866435 | 0.859635 | 0.859635 | 0.856935 | 0.846242 | 0.846242 | 0 | 0.006567 | 0.281245 | 31,357 | 727 | 125 | 43.13205 | 0.848168 | 0.356316 | 0 | 0.828431 | 0 | 0 | 0.095346 | 0.009463 | 0 | 0 | 0 | 0 | 0.009804 | 1 | 0.019608 | false | 0 | 0.039216 | 0 | 0.083333 | 0.019608 | 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 |
7c413a1eee2cc44f275374a0f39ad3413fe50aee | 777,846 | py | Python | TweakApi/apis/portal_api.py | tweak-com-public/tweak-api-client-python | 019f86da11fdb12683d516f8f37db5d717380bcc | [
"Apache-2.0"
] | null | null | null | TweakApi/apis/portal_api.py | tweak-com-public/tweak-api-client-python | 019f86da11fdb12683d516f8f37db5d717380bcc | [
"Apache-2.0"
] | null | null | null | TweakApi/apis/portal_api.py | tweak-com-public/tweak-api-client-python | 019f86da11fdb12683d516f8f37db5d717380bcc | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
tweak-api
Tweak API to integrate with all the Tweak services. You can find out more about Tweak at <a href='https://www.tweak.com'>https://www.tweak.com</a>, #tweak.
OpenAPI spec version: 1.0.8-beta.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from six import iteritems
from ..configuration import Configuration
from ..api_client import ApiClient
class PortalApi(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
config = Configuration()
if api_client:
self.api_client = api_client
else:
if not config.api_client:
config.api_client = ApiClient()
self.api_client = config.api_client
def portals_change_stream_get(self, **kwargs):
"""
Create a change stream.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_change_stream_get(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str options:
:return: file
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_change_stream_get_with_http_info(**kwargs)
else:
(data) = self.portals_change_stream_get_with_http_info(**kwargs)
return data
def portals_change_stream_get_with_http_info(self, **kwargs):
"""
Create a change stream.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_change_stream_get_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str options:
:return: file
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['options']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_change_stream_get" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
resource_path = '/Portals/change-stream'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'options' in params:
query_params['options'] = params['options']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='file',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_change_stream_post(self, **kwargs):
"""
Create a change stream.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_change_stream_post(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str options:
:return: file
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_change_stream_post_with_http_info(**kwargs)
else:
(data) = self.portals_change_stream_post_with_http_info(**kwargs)
return data
def portals_change_stream_post_with_http_info(self, **kwargs):
"""
Create a change stream.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_change_stream_post_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str options:
:return: file
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['options']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_change_stream_post" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
resource_path = '/Portals/change-stream'.replace('{format}', 'json')
path_params = {}
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
if 'options' in params:
form_params.append(('options', params['options']))
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='file',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_count_get(self, **kwargs):
"""
Count instances of the model matched by where from the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_count_get(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_count_get_with_http_info(**kwargs)
else:
(data) = self.portals_count_get_with_http_info(**kwargs)
return data
def portals_count_get_with_http_info(self, **kwargs):
"""
Count instances of the model matched by where from the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_count_get_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_count_get" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
resource_path = '/Portals/count'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_find_one_get(self, **kwargs):
"""
Find first instance of the model matched by filter from the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_find_one_get(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_find_one_get_with_http_info(**kwargs)
else:
(data) = self.portals_find_one_get_with_http_info(**kwargs)
return data
def portals_find_one_get_with_http_info(self, **kwargs):
"""
Find first instance of the model matched by filter from the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_find_one_get_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_find_one_get" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
resource_path = '/Portals/findOne'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Portal',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_get(self, **kwargs):
"""
Find all instances of the model matched by filter from the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_get(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})
:return: list[Portal]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_get_with_http_info(**kwargs)
else:
(data) = self.portals_get_with_http_info(**kwargs)
return data
def portals_get_with_http_info(self, **kwargs):
"""
Find all instances of the model matched by filter from the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_get_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})
:return: list[Portal]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_get" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
resource_path = '/Portals'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[Portal]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_builder_config_default_get(self, id, **kwargs):
"""
Get default TeamBuilderConfig for this Portal
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_builder_config_default_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: TeamBuilderConfig
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_builder_config_default_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_builder_config_default_get_with_http_info(id, **kwargs)
return data
def portals_id_builder_config_default_get_with_http_info(self, id, **kwargs):
"""
Get default TeamBuilderConfig for this Portal
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_builder_config_default_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: TeamBuilderConfig
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_builder_config_default_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_builder_config_default_get`")
collection_formats = {}
resource_path = '/Portals/{id}/builderConfig/default'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamBuilderConfig',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_default_builder_config_get(self, id, **kwargs):
"""
Fetches belongsTo relation defaultBuilderConfig.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_default_builder_config_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param bool refresh:
:return: TeamBuilderConfig
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_default_builder_config_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_default_builder_config_get_with_http_info(id, **kwargs)
return data
def portals_id_default_builder_config_get_with_http_info(self, id, **kwargs):
"""
Fetches belongsTo relation defaultBuilderConfig.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_default_builder_config_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param bool refresh:
:return: TeamBuilderConfig
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_default_builder_config_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_default_builder_config_get`")
collection_formats = {}
resource_path = '/Portals/{id}/defaultBuilderConfig'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamBuilderConfig',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_delete(self, id, **kwargs):
"""
Delete a model instance by {{id}} from the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_delete(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Model id (required)
:return: object
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_delete_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_delete_with_http_info(id, **kwargs)
return data
def portals_id_delete_with_http_info(self, id, **kwargs):
"""
Delete a model instance by {{id}} from the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_delete_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Model id (required)
:return: object
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_delete`")
collection_formats = {}
resource_path = '/Portals/{id}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='object',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_design_folders_count_get(self, id, **kwargs):
"""
Counts designFolders of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_count_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_design_folders_count_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_design_folders_count_get_with_http_info(id, **kwargs)
return data
def portals_id_design_folders_count_get_with_http_info(self, id, **kwargs):
"""
Counts designFolders of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_count_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_design_folders_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_design_folders_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designFolders/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_design_folders_delete(self, id, **kwargs):
"""
Deletes all designFolders of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_delete(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_design_folders_delete_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_design_folders_delete_with_http_info(id, **kwargs)
return data
def portals_id_design_folders_delete_with_http_info(self, id, **kwargs):
"""
Deletes all designFolders of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_delete_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_design_folders_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_design_folders_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designFolders'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_design_folders_fk_delete(self, id, fk, **kwargs):
"""
Delete a related item by id for designFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_fk_delete(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for designFolders (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_design_folders_fk_delete_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_design_folders_fk_delete_with_http_info(id, fk, **kwargs)
return data
def portals_id_design_folders_fk_delete_with_http_info(self, id, fk, **kwargs):
"""
Delete a related item by id for designFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_fk_delete_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for designFolders (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_design_folders_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_design_folders_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_design_folders_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designFolders/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_design_folders_fk_get(self, id, fk, **kwargs):
"""
Find a related item by id for designFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_fk_get(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for designFolders (required)
:return: DesignFolder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_design_folders_fk_get_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_design_folders_fk_get_with_http_info(id, fk, **kwargs)
return data
def portals_id_design_folders_fk_get_with_http_info(self, id, fk, **kwargs):
"""
Find a related item by id for designFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_fk_get_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for designFolders (required)
:return: DesignFolder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_design_folders_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_design_folders_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_design_folders_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designFolders/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignFolder',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_design_folders_fk_put(self, id, fk, **kwargs):
"""
Update a related item by id for designFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_fk_put(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for designFolders (required)
:param DesignFolder data:
:return: DesignFolder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_design_folders_fk_put_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_design_folders_fk_put_with_http_info(id, fk, **kwargs)
return data
def portals_id_design_folders_fk_put_with_http_info(self, id, fk, **kwargs):
"""
Update a related item by id for designFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_fk_put_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for designFolders (required)
:param DesignFolder data:
:return: DesignFolder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_design_folders_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_design_folders_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_design_folders_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/designFolders/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignFolder',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_design_folders_get(self, id, **kwargs):
"""
Queries designFolders of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[DesignFolder]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_design_folders_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_design_folders_get_with_http_info(id, **kwargs)
return data
def portals_id_design_folders_get_with_http_info(self, id, **kwargs):
"""
Queries designFolders of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[DesignFolder]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_design_folders_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_design_folders_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designFolders'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[DesignFolder]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_design_folders_post(self, id, **kwargs):
"""
Creates a new instance in designFolders of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_post(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param DesignFolder data:
:return: DesignFolder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_design_folders_post_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_design_folders_post_with_http_info(id, **kwargs)
return data
def portals_id_design_folders_post_with_http_info(self, id, **kwargs):
"""
Creates a new instance in designFolders of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_design_folders_post_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param DesignFolder data:
:return: DesignFolder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_design_folders_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_design_folders_post`")
collection_formats = {}
resource_path = '/Portals/{id}/designFolders'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignFolder',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_count_get(self, id, **kwargs):
"""
Counts designs of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_count_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_count_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_designs_count_get_with_http_info(id, **kwargs)
return data
def portals_id_designs_count_get_with_http_info(self, id, **kwargs):
"""
Counts designs of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_count_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_fk_delete(self, id, fk, **kwargs):
"""
Delete a related item by id for designs.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_fk_delete(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for designs (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_fk_delete_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_designs_fk_delete_with_http_info(id, fk, **kwargs)
return data
def portals_id_designs_fk_delete_with_http_info(self, id, fk, **kwargs):
"""
Delete a related item by id for designs.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_fk_delete_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for designs (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_fk_get(self, id, fk, **kwargs):
"""
Find a related item by id for designs.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_fk_get(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for designs (required)
:return: Design
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_fk_get_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_designs_fk_get_with_http_info(id, fk, **kwargs)
return data
def portals_id_designs_fk_get_with_http_info(self, id, fk, **kwargs):
"""
Find a related item by id for designs.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_fk_get_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for designs (required)
:return: Design
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Design',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_fk_put(self, id, fk, **kwargs):
"""
Update a related item by id for designs.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_fk_put(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for designs (required)
:param Design data:
:return: Design
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_fk_put_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_designs_fk_put_with_http_info(id, fk, **kwargs)
return data
def portals_id_designs_fk_put_with_http_info(self, id, fk, **kwargs):
"""
Update a related item by id for designs.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_fk_put_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for designs (required)
:param Design data:
:return: Design
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Design',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_get(self, id, **kwargs):
"""
Queries designs of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[Design]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_designs_get_with_http_info(id, **kwargs)
return data
def portals_id_designs_get_with_http_info(self, id, **kwargs):
"""
Queries designs of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[Design]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[Design]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_assignee_get(self, id, nk, **kwargs):
"""
Fetches belongsTo relation assignee.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_assignee_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_assignee_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_assignee_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_assignee_get_with_http_info(self, id, nk, **kwargs):
"""
Fetches belongsTo relation assignee.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_assignee_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_assignee_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_assignee_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_assignee_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/assignee'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_commenters_count_get(self, id, nk, **kwargs):
"""
Counts commenters of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_count_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_commenters_count_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_commenters_count_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_commenters_count_get_with_http_info(self, id, nk, **kwargs):
"""
Counts commenters of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_count_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_commenters_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_commenters_count_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_commenters_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/commenters/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_commenters_delete(self, id, nk, **kwargs):
"""
Deletes all commenters of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_delete(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_commenters_delete_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_commenters_delete_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_commenters_delete_with_http_info(self, id, nk, **kwargs):
"""
Deletes all commenters of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_delete_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_commenters_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_commenters_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_commenters_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/commenters'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_commenters_fk_delete(self, id, nk, fk, **kwargs):
"""
Delete a related item by id for commenters.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_fk_delete(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for commenters (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_commenters_fk_delete_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_commenters_fk_delete_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_commenters_fk_delete_with_http_info(self, id, nk, fk, **kwargs):
"""
Delete a related item by id for commenters.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_fk_delete_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for commenters (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_commenters_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_commenters_fk_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_commenters_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_commenters_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/commenters/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_commenters_fk_get(self, id, nk, fk, **kwargs):
"""
Find a related item by id for commenters.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_fk_get(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for commenters (required)
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_commenters_fk_get_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_commenters_fk_get_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_commenters_fk_get_with_http_info(self, id, nk, fk, **kwargs):
"""
Find a related item by id for commenters.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_fk_get_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for commenters (required)
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_commenters_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_commenters_fk_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_commenters_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_commenters_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/commenters/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_commenters_fk_put(self, id, nk, fk, **kwargs):
"""
Update a related item by id for commenters.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_fk_put(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for commenters (required)
:param TeamMember data:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_commenters_fk_put_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_commenters_fk_put_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_commenters_fk_put_with_http_info(self, id, nk, fk, **kwargs):
"""
Update a related item by id for commenters.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_fk_put_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for commenters (required)
:param TeamMember data:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_commenters_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_commenters_fk_put`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_commenters_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_commenters_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/commenters/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_commenters_get(self, id, nk, **kwargs):
"""
Queries commenters of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str filter:
:return: list[TeamMember]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_commenters_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_commenters_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_commenters_get_with_http_info(self, id, nk, **kwargs):
"""
Queries commenters of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str filter:
:return: list[TeamMember]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_commenters_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_commenters_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_commenters_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/commenters'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[TeamMember]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_commenters_post(self, id, nk, **kwargs):
"""
Creates a new instance in commenters of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_post(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param TeamMember data:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_commenters_post_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_commenters_post_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_commenters_post_with_http_info(self, id, nk, **kwargs):
"""
Creates a new instance in commenters of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_post_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param TeamMember data:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_commenters_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_commenters_post`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_commenters_post`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/commenters'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_commenters_rel_fk_delete(self, id, nk, fk, **kwargs):
"""
Remove the commenters relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_rel_fk_delete(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for commenters (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_commenters_rel_fk_delete_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_commenters_rel_fk_delete_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_commenters_rel_fk_delete_with_http_info(self, id, nk, fk, **kwargs):
"""
Remove the commenters relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_rel_fk_delete_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for commenters (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_commenters_rel_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_commenters_rel_fk_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_commenters_rel_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_commenters_rel_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/commenters/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_commenters_rel_fk_head(self, id, nk, fk, **kwargs):
"""
Check the existence of commenters relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_rel_fk_head(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for commenters (required)
:return: bool
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_commenters_rel_fk_head_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_commenters_rel_fk_head_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_commenters_rel_fk_head_with_http_info(self, id, nk, fk, **kwargs):
"""
Check the existence of commenters relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_rel_fk_head_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for commenters (required)
:return: bool
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_commenters_rel_fk_head" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_commenters_rel_fk_head`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_commenters_rel_fk_head`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_commenters_rel_fk_head`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/commenters/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'HEAD',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='bool',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_commenters_rel_fk_put(self, id, nk, fk, **kwargs):
"""
Add a related item by id for commenters.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_rel_fk_put(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for commenters (required)
:param DesignComment data:
:return: DesignComment
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_commenters_rel_fk_put_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_commenters_rel_fk_put_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_commenters_rel_fk_put_with_http_info(self, id, nk, fk, **kwargs):
"""
Add a related item by id for commenters.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_commenters_rel_fk_put_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for commenters (required)
:param DesignComment data:
:return: DesignComment
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_commenters_rel_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_commenters_rel_fk_put`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_commenters_rel_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_commenters_rel_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/commenters/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignComment',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_comments_count_get(self, id, nk, **kwargs):
"""
Counts comments of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_count_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_comments_count_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_comments_count_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_comments_count_get_with_http_info(self, id, nk, **kwargs):
"""
Counts comments of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_count_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_comments_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_comments_count_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_comments_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/comments/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_comments_delete(self, id, nk, **kwargs):
"""
Deletes all comments of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_delete(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_comments_delete_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_comments_delete_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_comments_delete_with_http_info(self, id, nk, **kwargs):
"""
Deletes all comments of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_delete_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_comments_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_comments_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_comments_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/comments'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_comments_fk_delete(self, id, nk, fk, **kwargs):
"""
Delete a related item by id for comments.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_fk_delete(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for comments (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_comments_fk_delete_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_comments_fk_delete_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_comments_fk_delete_with_http_info(self, id, nk, fk, **kwargs):
"""
Delete a related item by id for comments.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_fk_delete_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for comments (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_comments_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_comments_fk_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_comments_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_comments_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/comments/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_comments_fk_get(self, id, nk, fk, **kwargs):
"""
Find a related item by id for comments.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_fk_get(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for comments (required)
:return: DesignComment
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_comments_fk_get_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_comments_fk_get_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_comments_fk_get_with_http_info(self, id, nk, fk, **kwargs):
"""
Find a related item by id for comments.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_fk_get_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for comments (required)
:return: DesignComment
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_comments_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_comments_fk_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_comments_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_comments_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/comments/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignComment',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_comments_fk_put(self, id, nk, fk, **kwargs):
"""
Update a related item by id for comments.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_fk_put(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for comments (required)
:param DesignComment data:
:return: DesignComment
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_comments_fk_put_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_comments_fk_put_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_comments_fk_put_with_http_info(self, id, nk, fk, **kwargs):
"""
Update a related item by id for comments.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_fk_put_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for comments (required)
:param DesignComment data:
:return: DesignComment
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_comments_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_comments_fk_put`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_comments_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_comments_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/comments/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignComment',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_comments_get(self, id, nk, **kwargs):
"""
Queries comments of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str filter:
:return: list[DesignComment]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_comments_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_comments_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_comments_get_with_http_info(self, id, nk, **kwargs):
"""
Queries comments of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str filter:
:return: list[DesignComment]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_comments_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_comments_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_comments_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/comments'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[DesignComment]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_comments_post(self, id, nk, **kwargs):
"""
Creates a new instance in comments of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_post(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param DesignComment data:
:return: DesignComment
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_comments_post_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_comments_post_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_comments_post_with_http_info(self, id, nk, **kwargs):
"""
Creates a new instance in comments of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_comments_post_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param DesignComment data:
:return: DesignComment
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_comments_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_comments_post`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_comments_post`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/comments'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignComment',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_design_members_count_get(self, id, nk, **kwargs):
"""
Counts designMembers of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_count_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_design_members_count_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_design_members_count_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_design_members_count_get_with_http_info(self, id, nk, **kwargs):
"""
Counts designMembers of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_count_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_design_members_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_design_members_count_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_design_members_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/designMembers/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_design_members_delete(self, id, nk, **kwargs):
"""
Deletes all designMembers of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_delete(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_design_members_delete_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_design_members_delete_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_design_members_delete_with_http_info(self, id, nk, **kwargs):
"""
Deletes all designMembers of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_delete_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_design_members_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_design_members_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_design_members_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/designMembers'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_design_members_fk_delete(self, id, nk, fk, **kwargs):
"""
Delete a related item by id for designMembers.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_fk_delete(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for designMembers (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_design_members_fk_delete_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_design_members_fk_delete_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_design_members_fk_delete_with_http_info(self, id, nk, fk, **kwargs):
"""
Delete a related item by id for designMembers.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_fk_delete_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for designMembers (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_design_members_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_design_members_fk_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_design_members_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_design_members_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/designMembers/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_design_members_fk_get(self, id, nk, fk, **kwargs):
"""
Find a related item by id for designMembers.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_fk_get(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for designMembers (required)
:return: DesignMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_design_members_fk_get_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_design_members_fk_get_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_design_members_fk_get_with_http_info(self, id, nk, fk, **kwargs):
"""
Find a related item by id for designMembers.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_fk_get_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for designMembers (required)
:return: DesignMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_design_members_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_design_members_fk_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_design_members_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_design_members_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/designMembers/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_design_members_fk_put(self, id, nk, fk, **kwargs):
"""
Update a related item by id for designMembers.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_fk_put(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for designMembers (required)
:param DesignMember data:
:return: DesignMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_design_members_fk_put_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_design_members_fk_put_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_design_members_fk_put_with_http_info(self, id, nk, fk, **kwargs):
"""
Update a related item by id for designMembers.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_fk_put_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for designMembers (required)
:param DesignMember data:
:return: DesignMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_design_members_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_design_members_fk_put`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_design_members_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_design_members_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/designMembers/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_design_members_get(self, id, nk, **kwargs):
"""
Queries designMembers of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str filter:
:return: list[DesignMember]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_design_members_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_design_members_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_design_members_get_with_http_info(self, id, nk, **kwargs):
"""
Queries designMembers of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str filter:
:return: list[DesignMember]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_design_members_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_design_members_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_design_members_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/designMembers'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[DesignMember]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_design_members_post(self, id, nk, **kwargs):
"""
Creates a new instance in designMembers of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_post(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param DesignMember data:
:return: DesignMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_design_members_post_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_design_members_post_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_design_members_post_with_http_info(self, id, nk, **kwargs):
"""
Creates a new instance in designMembers of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_design_members_post_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param DesignMember data:
:return: DesignMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_design_members_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_design_members_post`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_design_members_post`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/designMembers'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_dynamic_data_get(self, id, nk, **kwargs):
"""
Fetches belongsTo relation dynamicData.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_dynamic_data_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: DynamicData
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_dynamic_data_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_dynamic_data_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_dynamic_data_get_with_http_info(self, id, nk, **kwargs):
"""
Fetches belongsTo relation dynamicData.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_dynamic_data_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: DynamicData
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_dynamic_data_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_dynamic_data_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_dynamic_data_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/dynamicData'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DynamicData',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_exports_count_get(self, id, nk, **kwargs):
"""
Counts exports of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_count_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_exports_count_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_exports_count_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_exports_count_get_with_http_info(self, id, nk, **kwargs):
"""
Counts exports of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_count_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_exports_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_exports_count_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_exports_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/exports/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_exports_delete(self, id, nk, **kwargs):
"""
Deletes all exports of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_delete(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_exports_delete_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_exports_delete_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_exports_delete_with_http_info(self, id, nk, **kwargs):
"""
Deletes all exports of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_delete_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_exports_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_exports_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_exports_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/exports'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_exports_fk_delete(self, id, nk, fk, **kwargs):
"""
Delete a related item by id for exports.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_fk_delete(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for exports (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_exports_fk_delete_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_exports_fk_delete_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_exports_fk_delete_with_http_info(self, id, nk, fk, **kwargs):
"""
Delete a related item by id for exports.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_fk_delete_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for exports (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_exports_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_exports_fk_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_exports_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_exports_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/exports/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_exports_fk_get(self, id, nk, fk, **kwargs):
"""
Find a related item by id for exports.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_fk_get(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for exports (required)
:return: DesignExport
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_exports_fk_get_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_exports_fk_get_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_exports_fk_get_with_http_info(self, id, nk, fk, **kwargs):
"""
Find a related item by id for exports.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_fk_get_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for exports (required)
:return: DesignExport
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_exports_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_exports_fk_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_exports_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_exports_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/exports/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignExport',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_exports_fk_put(self, id, nk, fk, **kwargs):
"""
Update a related item by id for exports.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_fk_put(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for exports (required)
:param DesignExport data:
:return: DesignExport
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_exports_fk_put_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_exports_fk_put_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_exports_fk_put_with_http_info(self, id, nk, fk, **kwargs):
"""
Update a related item by id for exports.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_fk_put_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for exports (required)
:param DesignExport data:
:return: DesignExport
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_exports_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_exports_fk_put`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_exports_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_exports_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/exports/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignExport',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_exports_get(self, id, nk, **kwargs):
"""
Queries exports of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str filter:
:return: list[DesignExport]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_exports_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_exports_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_exports_get_with_http_info(self, id, nk, **kwargs):
"""
Queries exports of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str filter:
:return: list[DesignExport]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_exports_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_exports_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_exports_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/exports'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[DesignExport]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_exports_post(self, id, nk, **kwargs):
"""
Creates a new instance in exports of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_post(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param DesignExport data:
:return: DesignExport
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_exports_post_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_exports_post_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_exports_post_with_http_info(self, id, nk, **kwargs):
"""
Creates a new instance in exports of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_exports_post_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param DesignExport data:
:return: DesignExport
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_exports_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_exports_post`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_exports_post`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/exports'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignExport',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_folder_get(self, id, nk, **kwargs):
"""
Fetches belongsTo relation folder.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_folder_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: DesignFolder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_folder_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_folder_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_folder_get_with_http_info(self, id, nk, **kwargs):
"""
Fetches belongsTo relation folder.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_folder_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: DesignFolder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_folder_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_folder_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_folder_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/folder'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignFolder',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_members_count_get(self, id, nk, **kwargs):
"""
Counts members of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_count_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_members_count_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_members_count_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_members_count_get_with_http_info(self, id, nk, **kwargs):
"""
Counts members of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_count_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_members_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_members_count_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_members_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/members/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_members_delete(self, id, nk, **kwargs):
"""
Deletes all members of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_delete(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_members_delete_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_members_delete_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_members_delete_with_http_info(self, id, nk, **kwargs):
"""
Deletes all members of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_delete_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_members_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_members_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_members_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/members'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_members_fk_delete(self, id, nk, fk, **kwargs):
"""
Delete a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_fk_delete(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for members (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_members_fk_delete_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_members_fk_delete_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_members_fk_delete_with_http_info(self, id, nk, fk, **kwargs):
"""
Delete a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_fk_delete_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for members (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_members_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_members_fk_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_members_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_members_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/members/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_members_fk_get(self, id, nk, fk, **kwargs):
"""
Find a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_fk_get(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for members (required)
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_members_fk_get_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_members_fk_get_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_members_fk_get_with_http_info(self, id, nk, fk, **kwargs):
"""
Find a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_fk_get_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for members (required)
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_members_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_members_fk_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_members_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_members_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/members/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_members_fk_put(self, id, nk, fk, **kwargs):
"""
Update a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_fk_put(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for members (required)
:param TeamMember data:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_members_fk_put_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_members_fk_put_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_members_fk_put_with_http_info(self, id, nk, fk, **kwargs):
"""
Update a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_fk_put_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for members (required)
:param TeamMember data:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_members_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_members_fk_put`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_members_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_members_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/members/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_members_get(self, id, nk, **kwargs):
"""
Queries members of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str filter:
:return: list[TeamMember]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_members_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_members_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_members_get_with_http_info(self, id, nk, **kwargs):
"""
Queries members of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str filter:
:return: list[TeamMember]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_members_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_members_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_members_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/members'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[TeamMember]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_members_post(self, id, nk, **kwargs):
"""
Creates a new instance in members of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_post(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param TeamMember data:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_members_post_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_members_post_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_members_post_with_http_info(self, id, nk, **kwargs):
"""
Creates a new instance in members of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_post_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param TeamMember data:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_members_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_members_post`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_members_post`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/members'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_members_rel_fk_delete(self, id, nk, fk, **kwargs):
"""
Remove the members relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_rel_fk_delete(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for members (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_members_rel_fk_delete_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_members_rel_fk_delete_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_members_rel_fk_delete_with_http_info(self, id, nk, fk, **kwargs):
"""
Remove the members relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_rel_fk_delete_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for members (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_members_rel_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_members_rel_fk_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_members_rel_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_members_rel_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/members/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_members_rel_fk_head(self, id, nk, fk, **kwargs):
"""
Check the existence of members relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_rel_fk_head(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for members (required)
:return: bool
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_members_rel_fk_head_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_members_rel_fk_head_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_members_rel_fk_head_with_http_info(self, id, nk, fk, **kwargs):
"""
Check the existence of members relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_rel_fk_head_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for members (required)
:return: bool
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_members_rel_fk_head" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_members_rel_fk_head`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_members_rel_fk_head`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_members_rel_fk_head`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/members/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'HEAD',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='bool',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_members_rel_fk_put(self, id, nk, fk, **kwargs):
"""
Add a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_rel_fk_put(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for members (required)
:param DesignMember data:
:return: DesignMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_members_rel_fk_put_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_members_rel_fk_put_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_members_rel_fk_put_with_http_info(self, id, nk, fk, **kwargs):
"""
Add a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_members_rel_fk_put_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for members (required)
:param DesignMember data:
:return: DesignMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_members_rel_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_members_rel_fk_put`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_members_rel_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_members_rel_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/members/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_permission_delete(self, id, nk, **kwargs):
"""
Deletes permission of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_permission_delete(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_permission_delete_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_permission_delete_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_permission_delete_with_http_info(self, id, nk, **kwargs):
"""
Deletes permission of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_permission_delete_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_permission_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_permission_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_permission_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/permission'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_permission_get(self, id, nk, **kwargs):
"""
Fetches hasOne relation permission.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_permission_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: DesignPermissionSet
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_permission_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_permission_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_permission_get_with_http_info(self, id, nk, **kwargs):
"""
Fetches hasOne relation permission.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_permission_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: DesignPermissionSet
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_permission_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_permission_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_permission_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/permission'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignPermissionSet',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_permission_post(self, id, nk, **kwargs):
"""
Creates a new instance in permission of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_permission_post(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param DesignPermissionSet data:
:return: DesignPermissionSet
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_permission_post_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_permission_post_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_permission_post_with_http_info(self, id, nk, **kwargs):
"""
Creates a new instance in permission of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_permission_post_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param DesignPermissionSet data:
:return: DesignPermissionSet
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_permission_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_permission_post`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_permission_post`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/permission'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignPermissionSet',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_permission_put(self, id, nk, **kwargs):
"""
Update permission of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_permission_put(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param DesignPermissionSet data:
:return: DesignPermissionSet
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_permission_put_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_permission_put_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_permission_put_with_http_info(self, id, nk, **kwargs):
"""
Update permission of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_permission_put_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param DesignPermissionSet data:
:return: DesignPermissionSet
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_permission_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_permission_put`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_permission_put`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/permission'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignPermissionSet',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_portal_get(self, id, nk, **kwargs):
"""
Fetches belongsTo relation portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_portal_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_portal_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_portal_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_portal_get_with_http_info(self, id, nk, **kwargs):
"""
Fetches belongsTo relation portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_portal_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_portal_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_portal_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_portal_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/portal'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Portal',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_rejection_comment_get(self, id, nk, **kwargs):
"""
Fetches belongsTo relation rejectionComment.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_rejection_comment_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: DesignComment
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_rejection_comment_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_rejection_comment_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_rejection_comment_get_with_http_info(self, id, nk, **kwargs):
"""
Fetches belongsTo relation rejectionComment.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_rejection_comment_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: DesignComment
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_rejection_comment_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_rejection_comment_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_rejection_comment_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/rejectionComment'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignComment',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_requester_get(self, id, nk, **kwargs):
"""
Fetches belongsTo relation requester.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_requester_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_requester_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_requester_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_requester_get_with_http_info(self, id, nk, **kwargs):
"""
Fetches belongsTo relation requester.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_requester_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_requester_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_requester_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_requester_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/requester'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_reviewer_get(self, id, nk, **kwargs):
"""
Fetches belongsTo relation reviewer.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_reviewer_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_reviewer_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_reviewer_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_reviewer_get_with_http_info(self, id, nk, **kwargs):
"""
Fetches belongsTo relation reviewer.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_reviewer_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_reviewer_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_reviewer_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_reviewer_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/reviewer'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_tags_count_get(self, id, nk, **kwargs):
"""
Counts tags of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_count_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_tags_count_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_tags_count_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_tags_count_get_with_http_info(self, id, nk, **kwargs):
"""
Counts tags of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_count_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_tags_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_tags_count_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_tags_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/tags/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_tags_delete(self, id, nk, **kwargs):
"""
Deletes all tags of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_delete(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_tags_delete_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_tags_delete_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_tags_delete_with_http_info(self, id, nk, **kwargs):
"""
Deletes all tags of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_delete_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_tags_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_tags_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_tags_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/tags'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_tags_fk_delete(self, id, nk, fk, **kwargs):
"""
Delete a related item by id for tags.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_fk_delete(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for tags (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_tags_fk_delete_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_tags_fk_delete_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_tags_fk_delete_with_http_info(self, id, nk, fk, **kwargs):
"""
Delete a related item by id for tags.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_fk_delete_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for tags (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_tags_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_tags_fk_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_tags_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_tags_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/tags/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_tags_fk_get(self, id, nk, fk, **kwargs):
"""
Find a related item by id for tags.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_fk_get(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for tags (required)
:return: Tag
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_tags_fk_get_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_tags_fk_get_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_tags_fk_get_with_http_info(self, id, nk, fk, **kwargs):
"""
Find a related item by id for tags.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_fk_get_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for tags (required)
:return: Tag
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_tags_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_tags_fk_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_tags_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_tags_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/tags/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Tag',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_tags_fk_put(self, id, nk, fk, **kwargs):
"""
Update a related item by id for tags.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_fk_put(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for tags (required)
:param Tag data:
:return: Tag
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_tags_fk_put_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_tags_fk_put_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_tags_fk_put_with_http_info(self, id, nk, fk, **kwargs):
"""
Update a related item by id for tags.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_fk_put_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for tags (required)
:param Tag data:
:return: Tag
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_tags_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_tags_fk_put`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_tags_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_tags_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/tags/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Tag',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_tags_get(self, id, nk, **kwargs):
"""
Queries tags of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str filter:
:return: list[Tag]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_tags_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_tags_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_tags_get_with_http_info(self, id, nk, **kwargs):
"""
Queries tags of Design.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str filter:
:return: list[Tag]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_tags_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_tags_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_tags_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/tags'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[Tag]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_tags_post(self, id, nk, **kwargs):
"""
Creates a new instance in tags of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_post(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param Tag data:
:return: Tag
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_tags_post_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_tags_post_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_tags_post_with_http_info(self, id, nk, **kwargs):
"""
Creates a new instance in tags of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_post_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param Tag data:
:return: Tag
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_tags_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_tags_post`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_tags_post`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/tags'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Tag',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_tags_rel_fk_delete(self, id, nk, fk, **kwargs):
"""
Remove the tags relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_rel_fk_delete(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for tags (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_tags_rel_fk_delete_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_tags_rel_fk_delete_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_tags_rel_fk_delete_with_http_info(self, id, nk, fk, **kwargs):
"""
Remove the tags relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_rel_fk_delete_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for tags (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_tags_rel_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_tags_rel_fk_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_tags_rel_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_tags_rel_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/tags/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_tags_rel_fk_head(self, id, nk, fk, **kwargs):
"""
Check the existence of tags relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_rel_fk_head(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for tags (required)
:return: bool
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_tags_rel_fk_head_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_tags_rel_fk_head_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_tags_rel_fk_head_with_http_info(self, id, nk, fk, **kwargs):
"""
Check the existence of tags relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_rel_fk_head_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for tags (required)
:return: bool
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_tags_rel_fk_head" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_tags_rel_fk_head`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_tags_rel_fk_head`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_tags_rel_fk_head`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/tags/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'HEAD',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='bool',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_tags_rel_fk_put(self, id, nk, fk, **kwargs):
"""
Add a related item by id for tags.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_rel_fk_put(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for tags (required)
:param DesignTag data:
:return: DesignTag
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_tags_rel_fk_put_with_http_info(id, nk, fk, **kwargs)
else:
(data) = self.portals_id_designs_nk_tags_rel_fk_put_with_http_info(id, nk, fk, **kwargs)
return data
def portals_id_designs_nk_tags_rel_fk_put_with_http_info(self, id, nk, fk, **kwargs):
"""
Add a related item by id for tags.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_tags_rel_fk_put_with_http_info(id, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param str fk: Foreign key for tags (required)
:param DesignTag data:
:return: DesignTag
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_tags_rel_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_tags_rel_fk_put`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_tags_rel_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_designs_nk_tags_rel_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/tags/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DesignTag',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_team_get(self, id, nk, **kwargs):
"""
Fetches belongsTo relation team.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_team_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: Team
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_team_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_team_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_team_get_with_http_info(self, id, nk, **kwargs):
"""
Fetches belongsTo relation team.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_team_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: Team
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_team_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_team_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_team_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/team'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Team',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_nk_template_get(self, id, nk, **kwargs):
"""
Fetches belongsTo relation template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_template_get(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: Template
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_nk_template_get_with_http_info(id, nk, **kwargs)
else:
(data) = self.portals_id_designs_nk_template_get_with_http_info(id, nk, **kwargs)
return data
def portals_id_designs_nk_template_get_with_http_info(self, id, nk, **kwargs):
"""
Fetches belongsTo relation template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_nk_template_get_with_http_info(id, nk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str nk: Foreign key for designs. (required)
:param bool refresh:
:return: Template
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'nk', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_nk_template_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_nk_template_get`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_designs_nk_template_get`")
collection_formats = {}
resource_path = '/Portals/{id}/designs/{nk}/template'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'nk' in params:
path_params['nk'] = params['nk']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Template',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_designs_post(self, id, **kwargs):
"""
Creates a new instance in designs of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_post(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param Design data:
:return: Design
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_designs_post_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_designs_post_with_http_info(id, **kwargs)
return data
def portals_id_designs_post_with_http_info(self, id, **kwargs):
"""
Creates a new instance in designs of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_designs_post_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param Design data:
:return: Design
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_designs_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_designs_post`")
collection_formats = {}
resource_path = '/Portals/{id}/designs'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Design',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_exists_get(self, id, **kwargs):
"""
Check whether a model instance exists in the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_exists_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Model id (required)
:return: InlineResponse2002
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_exists_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_exists_get_with_http_info(id, **kwargs)
return data
def portals_id_exists_get_with_http_info(self, id, **kwargs):
"""
Check whether a model instance exists in the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_exists_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Model id (required)
:return: InlineResponse2002
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_exists_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_exists_get`")
collection_formats = {}
resource_path = '/Portals/{id}/exists'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2002',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_get(self, id, **kwargs):
"""
Find a model instance by {{id}} from the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Model id (required)
:param str filter: Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_get_with_http_info(id, **kwargs)
return data
def portals_id_get_with_http_info(self, id, **kwargs):
"""
Find a model instance by {{id}} from the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Model id (required)
:param str filter: Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_get`")
collection_formats = {}
resource_path = '/Portals/{id}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Portal',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_head(self, id, **kwargs):
"""
Check whether a model instance exists in the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_head(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Model id (required)
:return: InlineResponse2002
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_head_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_head_with_http_info(id, **kwargs)
return data
def portals_id_head_with_http_info(self, id, **kwargs):
"""
Check whether a model instance exists in the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_head_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Model id (required)
:return: InlineResponse2002
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_head" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_head`")
collection_formats = {}
resource_path = '/Portals/{id}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'HEAD',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2002',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_image_folders_count_get(self, id, **kwargs):
"""
Counts imageFolders of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_count_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_image_folders_count_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_image_folders_count_get_with_http_info(id, **kwargs)
return data
def portals_id_image_folders_count_get_with_http_info(self, id, **kwargs):
"""
Counts imageFolders of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_count_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_image_folders_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_image_folders_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/imageFolders/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_image_folders_delete(self, id, **kwargs):
"""
Deletes all imageFolders of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_delete(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_image_folders_delete_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_image_folders_delete_with_http_info(id, **kwargs)
return data
def portals_id_image_folders_delete_with_http_info(self, id, **kwargs):
"""
Deletes all imageFolders of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_delete_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_image_folders_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_image_folders_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/imageFolders'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_image_folders_fk_delete(self, id, fk, **kwargs):
"""
Delete a related item by id for imageFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_fk_delete(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for imageFolders (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_image_folders_fk_delete_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_image_folders_fk_delete_with_http_info(id, fk, **kwargs)
return data
def portals_id_image_folders_fk_delete_with_http_info(self, id, fk, **kwargs):
"""
Delete a related item by id for imageFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_fk_delete_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for imageFolders (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_image_folders_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_image_folders_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_image_folders_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/imageFolders/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_image_folders_fk_get(self, id, fk, **kwargs):
"""
Find a related item by id for imageFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_fk_get(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for imageFolders (required)
:return: ImageFolder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_image_folders_fk_get_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_image_folders_fk_get_with_http_info(id, fk, **kwargs)
return data
def portals_id_image_folders_fk_get_with_http_info(self, id, fk, **kwargs):
"""
Find a related item by id for imageFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_fk_get_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for imageFolders (required)
:return: ImageFolder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_image_folders_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_image_folders_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_image_folders_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/imageFolders/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ImageFolder',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_image_folders_fk_put(self, id, fk, **kwargs):
"""
Update a related item by id for imageFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_fk_put(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for imageFolders (required)
:param ImageFolder data:
:return: ImageFolder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_image_folders_fk_put_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_image_folders_fk_put_with_http_info(id, fk, **kwargs)
return data
def portals_id_image_folders_fk_put_with_http_info(self, id, fk, **kwargs):
"""
Update a related item by id for imageFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_fk_put_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for imageFolders (required)
:param ImageFolder data:
:return: ImageFolder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_image_folders_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_image_folders_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_image_folders_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/imageFolders/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ImageFolder',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_image_folders_get(self, id, **kwargs):
"""
Queries imageFolders of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[ImageFolder]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_image_folders_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_image_folders_get_with_http_info(id, **kwargs)
return data
def portals_id_image_folders_get_with_http_info(self, id, **kwargs):
"""
Queries imageFolders of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[ImageFolder]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_image_folders_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_image_folders_get`")
collection_formats = {}
resource_path = '/Portals/{id}/imageFolders'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[ImageFolder]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_image_folders_post(self, id, **kwargs):
"""
Creates a new instance in imageFolders of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_post(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param ImageFolder data:
:return: ImageFolder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_image_folders_post_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_image_folders_post_with_http_info(id, **kwargs)
return data
def portals_id_image_folders_post_with_http_info(self, id, **kwargs):
"""
Creates a new instance in imageFolders of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_post_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param ImageFolder data:
:return: ImageFolder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_image_folders_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_image_folders_post`")
collection_formats = {}
resource_path = '/Portals/{id}/imageFolders'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ImageFolder',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_image_folders_rel_fk_delete(self, id, fk, **kwargs):
"""
Remove the imageFolders relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_rel_fk_delete(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for imageFolders (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_image_folders_rel_fk_delete_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_image_folders_rel_fk_delete_with_http_info(id, fk, **kwargs)
return data
def portals_id_image_folders_rel_fk_delete_with_http_info(self, id, fk, **kwargs):
"""
Remove the imageFolders relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_rel_fk_delete_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for imageFolders (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_image_folders_rel_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_image_folders_rel_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_image_folders_rel_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/imageFolders/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_image_folders_rel_fk_head(self, id, fk, **kwargs):
"""
Check the existence of imageFolders relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_rel_fk_head(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for imageFolders (required)
:return: bool
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_image_folders_rel_fk_head_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_image_folders_rel_fk_head_with_http_info(id, fk, **kwargs)
return data
def portals_id_image_folders_rel_fk_head_with_http_info(self, id, fk, **kwargs):
"""
Check the existence of imageFolders relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_rel_fk_head_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for imageFolders (required)
:return: bool
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_image_folders_rel_fk_head" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_image_folders_rel_fk_head`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_image_folders_rel_fk_head`")
collection_formats = {}
resource_path = '/Portals/{id}/imageFolders/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'HEAD',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='bool',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_image_folders_rel_fk_put(self, id, fk, **kwargs):
"""
Add a related item by id for imageFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_rel_fk_put(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for imageFolders (required)
:param PortalImageFolder data:
:return: PortalImageFolder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_image_folders_rel_fk_put_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_image_folders_rel_fk_put_with_http_info(id, fk, **kwargs)
return data
def portals_id_image_folders_rel_fk_put_with_http_info(self, id, fk, **kwargs):
"""
Add a related item by id for imageFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_image_folders_rel_fk_put_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for imageFolders (required)
:param PortalImageFolder data:
:return: PortalImageFolder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_image_folders_rel_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_image_folders_rel_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_image_folders_rel_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/imageFolders/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalImageFolder',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_invitation_tickets_fk_delete(self, id, id2, fk, **kwargs):
"""
Delete InvitationTickets for this Portal
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_invitation_tickets_fk_delete(id, id2, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param str fk: InvitationTicket id (required)
:return: object
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_invitation_tickets_fk_delete_with_http_info(id, id2, fk, **kwargs)
else:
(data) = self.portals_id_invitation_tickets_fk_delete_with_http_info(id, id2, fk, **kwargs)
return data
def portals_id_invitation_tickets_fk_delete_with_http_info(self, id, id2, fk, **kwargs):
"""
Delete InvitationTickets for this Portal
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_invitation_tickets_fk_delete_with_http_info(id, id2, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param str fk: InvitationTicket id (required)
:return: object
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'id2', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_invitation_tickets_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_invitation_tickets_fk_delete`")
# verify the required parameter 'id2' is set
if ('id2' not in params) or (params['id2'] is None):
raise ValueError("Missing the required parameter `id2` when calling `portals_id_invitation_tickets_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_invitation_tickets_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/invitationTickets/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'id2' in params:
path_params['id'] = params['id2']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='object',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_invitation_tickets_fk_get(self, id, id2, fk, **kwargs):
"""
Get InvitationTicket by Id for this Portal
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_invitation_tickets_fk_get(id, id2, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param str fk: InvitationTicket id (required)
:param str filter: Only include changes that match this filter
:return: InvitationTicket
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_invitation_tickets_fk_get_with_http_info(id, id2, fk, **kwargs)
else:
(data) = self.portals_id_invitation_tickets_fk_get_with_http_info(id, id2, fk, **kwargs)
return data
def portals_id_invitation_tickets_fk_get_with_http_info(self, id, id2, fk, **kwargs):
"""
Get InvitationTicket by Id for this Portal
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_invitation_tickets_fk_get_with_http_info(id, id2, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param str fk: InvitationTicket id (required)
:param str filter: Only include changes that match this filter
:return: InvitationTicket
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'id2', 'fk', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_invitation_tickets_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_invitation_tickets_fk_get`")
# verify the required parameter 'id2' is set
if ('id2' not in params) or (params['id2'] is None):
raise ValueError("Missing the required parameter `id2` when calling `portals_id_invitation_tickets_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_invitation_tickets_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/invitationTickets/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'id2' in params:
path_params['id'] = params['id2']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InvitationTicket',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_invitation_tickets_get(self, id, id2, **kwargs):
"""
List InvitationTickets for this Portal
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_invitation_tickets_get(id, id2, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param str filter: Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})
:return: list[InvitationTicket]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_invitation_tickets_get_with_http_info(id, id2, **kwargs)
else:
(data) = self.portals_id_invitation_tickets_get_with_http_info(id, id2, **kwargs)
return data
def portals_id_invitation_tickets_get_with_http_info(self, id, id2, **kwargs):
"""
List InvitationTickets for this Portal
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_invitation_tickets_get_with_http_info(id, id2, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param str filter: Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})
:return: list[InvitationTicket]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'id2', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_invitation_tickets_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_invitation_tickets_get`")
# verify the required parameter 'id2' is set
if ('id2' not in params) or (params['id2'] is None):
raise ValueError("Missing the required parameter `id2` when calling `portals_id_invitation_tickets_get`")
collection_formats = {}
resource_path = '/Portals/{id}/invitationTickets'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'id2' in params:
path_params['id'] = params['id2']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[InvitationTicket]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_logo_put(self, id, id2, data, **kwargs):
"""
Change logo
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_logo_put(id, id2, data, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param Portal data: Logo (required)
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_logo_put_with_http_info(id, id2, data, **kwargs)
else:
(data) = self.portals_id_logo_put_with_http_info(id, id2, data, **kwargs)
return data
def portals_id_logo_put_with_http_info(self, id, id2, data, **kwargs):
"""
Change logo
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_logo_put_with_http_info(id, id2, data, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param Portal data: Logo (required)
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'id2', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_logo_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_logo_put`")
# verify the required parameter 'id2' is set
if ('id2' not in params) or (params['id2'] is None):
raise ValueError("Missing the required parameter `id2` when calling `portals_id_logo_put`")
# verify the required parameter 'data' is set
if ('data' not in params) or (params['data'] is None):
raise ValueError("Missing the required parameter `data` when calling `portals_id_logo_put`")
collection_formats = {}
resource_path = '/Portals/{id}/logo'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'id2' in params:
path_params['id'] = params['id2']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Portal',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_members_count_get(self, id, **kwargs):
"""
Counts members of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_count_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_members_count_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_members_count_get_with_http_info(id, **kwargs)
return data
def portals_id_members_count_get_with_http_info(self, id, **kwargs):
"""
Counts members of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_count_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_members_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_members_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/members/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_members_delete(self, id, **kwargs):
"""
Deletes all members of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_delete(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_members_delete_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_members_delete_with_http_info(id, **kwargs)
return data
def portals_id_members_delete_with_http_info(self, id, **kwargs):
"""
Deletes all members of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_delete_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_members_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_members_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/members'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_members_fk_delete(self, id, fk, **kwargs):
"""
Delete a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_fk_delete(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for members (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_members_fk_delete_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_members_fk_delete_with_http_info(id, fk, **kwargs)
return data
def portals_id_members_fk_delete_with_http_info(self, id, fk, **kwargs):
"""
Delete a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_fk_delete_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for members (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_members_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_members_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_members_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/members/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_members_fk_get(self, id, fk, **kwargs):
"""
Find a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_fk_get(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for members (required)
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_members_fk_get_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_members_fk_get_with_http_info(id, fk, **kwargs)
return data
def portals_id_members_fk_get_with_http_info(self, id, fk, **kwargs):
"""
Find a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_fk_get_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for members (required)
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_members_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_members_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_members_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/members/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_members_fk_put(self, id, fk, **kwargs):
"""
Update a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_fk_put(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for members (required)
:param TeamMember data:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_members_fk_put_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_members_fk_put_with_http_info(id, fk, **kwargs)
return data
def portals_id_members_fk_put_with_http_info(self, id, fk, **kwargs):
"""
Update a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_fk_put_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for members (required)
:param TeamMember data:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_members_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_members_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_members_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/members/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_members_get(self, id, **kwargs):
"""
Queries members of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[TeamMember]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_members_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_members_get_with_http_info(id, **kwargs)
return data
def portals_id_members_get_with_http_info(self, id, **kwargs):
"""
Queries members of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[TeamMember]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_members_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_members_get`")
collection_formats = {}
resource_path = '/Portals/{id}/members'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[TeamMember]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_members_post(self, id, **kwargs):
"""
Creates a new instance in members of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_post(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param TeamMember data:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_members_post_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_members_post_with_http_info(id, **kwargs)
return data
def portals_id_members_post_with_http_info(self, id, **kwargs):
"""
Creates a new instance in members of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_post_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param TeamMember data:
:return: TeamMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_members_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_members_post`")
collection_formats = {}
resource_path = '/Portals/{id}/members'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TeamMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_members_rel_fk_delete(self, id, fk, **kwargs):
"""
Remove the members relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_rel_fk_delete(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for members (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_members_rel_fk_delete_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_members_rel_fk_delete_with_http_info(id, fk, **kwargs)
return data
def portals_id_members_rel_fk_delete_with_http_info(self, id, fk, **kwargs):
"""
Remove the members relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_rel_fk_delete_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for members (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_members_rel_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_members_rel_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_members_rel_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/members/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_members_rel_fk_head(self, id, fk, **kwargs):
"""
Check the existence of members relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_rel_fk_head(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for members (required)
:return: bool
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_members_rel_fk_head_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_members_rel_fk_head_with_http_info(id, fk, **kwargs)
return data
def portals_id_members_rel_fk_head_with_http_info(self, id, fk, **kwargs):
"""
Check the existence of members relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_rel_fk_head_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for members (required)
:return: bool
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_members_rel_fk_head" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_members_rel_fk_head`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_members_rel_fk_head`")
collection_formats = {}
resource_path = '/Portals/{id}/members/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'HEAD',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='bool',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_members_rel_fk_put(self, id, fk, **kwargs):
"""
Add a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_rel_fk_put(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for members (required)
:param PortalMember data:
:return: PortalMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_members_rel_fk_put_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_members_rel_fk_put_with_http_info(id, fk, **kwargs)
return data
def portals_id_members_rel_fk_put_with_http_info(self, id, fk, **kwargs):
"""
Add a related item by id for members.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_members_rel_fk_put_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for members (required)
:param PortalMember data:
:return: PortalMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_members_rel_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_members_rel_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_members_rel_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/members/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_patch(self, id, **kwargs):
"""
Patch attributes for a model instance and persist it into the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_patch(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param Portal data: An object of model property name/value pairs
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_patch_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_patch_with_http_info(id, **kwargs)
return data
def portals_id_patch_with_http_info(self, id, **kwargs):
"""
Patch attributes for a model instance and persist it into the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_patch_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param Portal data: An object of model property name/value pairs
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_patch" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_patch`")
collection_formats = {}
resource_path = '/Portals/{id}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Portal',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_permission_delete(self, id, **kwargs):
"""
Deletes permission of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_permission_delete(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_permission_delete_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_permission_delete_with_http_info(id, **kwargs)
return data
def portals_id_permission_delete_with_http_info(self, id, **kwargs):
"""
Deletes permission of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_permission_delete_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_permission_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_permission_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/permission'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_permission_get(self, id, **kwargs):
"""
Fetches hasOne relation permission.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_permission_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param bool refresh:
:return: PortalPermissionSet
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_permission_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_permission_get_with_http_info(id, **kwargs)
return data
def portals_id_permission_get_with_http_info(self, id, **kwargs):
"""
Fetches hasOne relation permission.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_permission_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param bool refresh:
:return: PortalPermissionSet
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_permission_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_permission_get`")
collection_formats = {}
resource_path = '/Portals/{id}/permission'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalPermissionSet',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_permission_post(self, id, **kwargs):
"""
Creates a new instance in permission of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_permission_post(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param PortalPermissionSet data:
:return: PortalPermissionSet
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_permission_post_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_permission_post_with_http_info(id, **kwargs)
return data
def portals_id_permission_post_with_http_info(self, id, **kwargs):
"""
Creates a new instance in permission of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_permission_post_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param PortalPermissionSet data:
:return: PortalPermissionSet
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_permission_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_permission_post`")
collection_formats = {}
resource_path = '/Portals/{id}/permission'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalPermissionSet',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_permission_put(self, id, **kwargs):
"""
Update permission of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_permission_put(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param PortalPermissionSet data:
:return: PortalPermissionSet
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_permission_put_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_permission_put_with_http_info(id, **kwargs)
return data
def portals_id_permission_put_with_http_info(self, id, **kwargs):
"""
Update permission of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_permission_put_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param PortalPermissionSet data:
:return: PortalPermissionSet
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_permission_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_permission_put`")
collection_formats = {}
resource_path = '/Portals/{id}/permission'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalPermissionSet',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_portal_members_count_get(self, id, **kwargs):
"""
Counts portalMembers of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_count_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_portal_members_count_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_portal_members_count_get_with_http_info(id, **kwargs)
return data
def portals_id_portal_members_count_get_with_http_info(self, id, **kwargs):
"""
Counts portalMembers of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_count_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_portal_members_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_portal_members_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/portalMembers/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_portal_members_delete(self, id, **kwargs):
"""
Deletes all portalMembers of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_delete(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_portal_members_delete_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_portal_members_delete_with_http_info(id, **kwargs)
return data
def portals_id_portal_members_delete_with_http_info(self, id, **kwargs):
"""
Deletes all portalMembers of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_delete_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_portal_members_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_portal_members_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/portalMembers'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_portal_members_fk_delete(self, id, fk, **kwargs):
"""
Delete a related item by id for portalMembers.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_fk_delete(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for portalMembers (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_portal_members_fk_delete_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_portal_members_fk_delete_with_http_info(id, fk, **kwargs)
return data
def portals_id_portal_members_fk_delete_with_http_info(self, id, fk, **kwargs):
"""
Delete a related item by id for portalMembers.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_fk_delete_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for portalMembers (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_portal_members_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_portal_members_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_portal_members_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/portalMembers/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_portal_members_fk_get(self, id, fk, **kwargs):
"""
Find a related item by id for portalMembers.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_fk_get(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for portalMembers (required)
:return: PortalMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_portal_members_fk_get_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_portal_members_fk_get_with_http_info(id, fk, **kwargs)
return data
def portals_id_portal_members_fk_get_with_http_info(self, id, fk, **kwargs):
"""
Find a related item by id for portalMembers.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_fk_get_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for portalMembers (required)
:return: PortalMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_portal_members_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_portal_members_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_portal_members_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/portalMembers/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_portal_members_fk_put(self, id, fk, **kwargs):
"""
Update a related item by id for portalMembers.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_fk_put(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for portalMembers (required)
:param PortalMember data:
:return: PortalMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_portal_members_fk_put_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_portal_members_fk_put_with_http_info(id, fk, **kwargs)
return data
def portals_id_portal_members_fk_put_with_http_info(self, id, fk, **kwargs):
"""
Update a related item by id for portalMembers.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_fk_put_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for portalMembers (required)
:param PortalMember data:
:return: PortalMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_portal_members_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_portal_members_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_portal_members_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/portalMembers/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_portal_members_get(self, id, **kwargs):
"""
Queries portalMembers of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[PortalMember]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_portal_members_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_portal_members_get_with_http_info(id, **kwargs)
return data
def portals_id_portal_members_get_with_http_info(self, id, **kwargs):
"""
Queries portalMembers of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[PortalMember]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_portal_members_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_portal_members_get`")
collection_formats = {}
resource_path = '/Portals/{id}/portalMembers'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[PortalMember]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_portal_members_post(self, id, **kwargs):
"""
Creates a new instance in portalMembers of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_post(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param PortalMember data:
:return: PortalMember
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_portal_members_post_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_portal_members_post_with_http_info(id, **kwargs)
return data
def portals_id_portal_members_post_with_http_info(self, id, **kwargs):
"""
Creates a new instance in portalMembers of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_portal_members_post_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param PortalMember data:
:return: PortalMember
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_portal_members_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_portal_members_post`")
collection_formats = {}
resource_path = '/Portals/{id}/portalMembers'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalMember',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_put(self, id, **kwargs):
"""
Replace attributes for a model instance and persist it into the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_put(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Model id (required)
:param Portal data: Model instance data
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_put_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_put_with_http_info(id, **kwargs)
return data
def portals_id_put_with_http_info(self, id, **kwargs):
"""
Replace attributes for a model instance and persist it into the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_put_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Model id (required)
:param Portal data: Model instance data
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_put`")
collection_formats = {}
resource_path = '/Portals/{id}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Portal',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_replace_post(self, id, **kwargs):
"""
Replace attributes for a model instance and persist it into the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_replace_post(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Model id (required)
:param Portal data: Model instance data
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_replace_post_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_replace_post_with_http_info(id, **kwargs)
return data
def portals_id_replace_post_with_http_info(self, id, **kwargs):
"""
Replace attributes for a model instance and persist it into the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_replace_post_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Model id (required)
:param Portal data: Model instance data
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_replace_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_replace_post`")
collection_formats = {}
resource_path = '/Portals/{id}/replace'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Portal',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_team_get(self, id, **kwargs):
"""
Fetches belongsTo relation team.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_team_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param bool refresh:
:return: Team
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_team_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_team_get_with_http_info(id, **kwargs)
return data
def portals_id_team_get_with_http_info(self, id, **kwargs):
"""
Fetches belongsTo relation team.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_team_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param bool refresh:
:return: Team
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'refresh']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_team_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_team_get`")
collection_formats = {}
resource_path = '/Portals/{id}/team'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'refresh' in params:
query_params['refresh'] = params['refresh']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Team',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_folders_count_get(self, id, **kwargs):
"""
Counts templateFolders of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_count_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_folders_count_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_template_folders_count_get_with_http_info(id, **kwargs)
return data
def portals_id_template_folders_count_get_with_http_info(self, id, **kwargs):
"""
Counts templateFolders of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_count_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_folders_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_folders_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/templateFolders/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_folders_delete(self, id, **kwargs):
"""
Deletes all templateFolders of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_delete(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_folders_delete_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_template_folders_delete_with_http_info(id, **kwargs)
return data
def portals_id_template_folders_delete_with_http_info(self, id, **kwargs):
"""
Deletes all templateFolders of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_delete_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_folders_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_folders_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/templateFolders'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_folders_fk_delete(self, id, fk, **kwargs):
"""
Delete a related item by id for templateFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_fk_delete(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templateFolders (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_folders_fk_delete_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_template_folders_fk_delete_with_http_info(id, fk, **kwargs)
return data
def portals_id_template_folders_fk_delete_with_http_info(self, id, fk, **kwargs):
"""
Delete a related item by id for templateFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_fk_delete_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templateFolders (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_folders_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_folders_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_template_folders_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/templateFolders/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_folders_fk_get(self, id, fk, **kwargs):
"""
Find a related item by id for templateFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_fk_get(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templateFolders (required)
:return: PortalTemplateFolder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_folders_fk_get_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_template_folders_fk_get_with_http_info(id, fk, **kwargs)
return data
def portals_id_template_folders_fk_get_with_http_info(self, id, fk, **kwargs):
"""
Find a related item by id for templateFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_fk_get_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templateFolders (required)
:return: PortalTemplateFolder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_folders_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_folders_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_template_folders_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/templateFolders/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalTemplateFolder',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_folders_fk_put(self, id, fk, **kwargs):
"""
Update a related item by id for templateFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_fk_put(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templateFolders (required)
:param PortalTemplateFolder data:
:return: PortalTemplateFolder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_folders_fk_put_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_template_folders_fk_put_with_http_info(id, fk, **kwargs)
return data
def portals_id_template_folders_fk_put_with_http_info(self, id, fk, **kwargs):
"""
Update a related item by id for templateFolders.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_fk_put_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templateFolders (required)
:param PortalTemplateFolder data:
:return: PortalTemplateFolder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_folders_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_folders_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_template_folders_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/templateFolders/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalTemplateFolder',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_folders_get(self, id, **kwargs):
"""
Queries templateFolders of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[PortalTemplateFolder]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_folders_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_template_folders_get_with_http_info(id, **kwargs)
return data
def portals_id_template_folders_get_with_http_info(self, id, **kwargs):
"""
Queries templateFolders of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[PortalTemplateFolder]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_folders_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_folders_get`")
collection_formats = {}
resource_path = '/Portals/{id}/templateFolders'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[PortalTemplateFolder]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_folders_nk_templates_fk_rel_delete(self, id, id2, nk, fk, **kwargs):
"""
Unlink folder with Template and Portal
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_nk_templates_fk_rel_delete(id, id2, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param str nk: PortalTemplateFolder id (required)
:param str fk: Template id (required)
:return: PortalTemplate
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_folders_nk_templates_fk_rel_delete_with_http_info(id, id2, nk, fk, **kwargs)
else:
(data) = self.portals_id_template_folders_nk_templates_fk_rel_delete_with_http_info(id, id2, nk, fk, **kwargs)
return data
def portals_id_template_folders_nk_templates_fk_rel_delete_with_http_info(self, id, id2, nk, fk, **kwargs):
"""
Unlink folder with Template and Portal
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_nk_templates_fk_rel_delete_with_http_info(id, id2, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param str nk: PortalTemplateFolder id (required)
:param str fk: Template id (required)
:return: PortalTemplate
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'id2', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_folders_nk_templates_fk_rel_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_folders_nk_templates_fk_rel_delete`")
# verify the required parameter 'id2' is set
if ('id2' not in params) or (params['id2'] is None):
raise ValueError("Missing the required parameter `id2` when calling `portals_id_template_folders_nk_templates_fk_rel_delete`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_template_folders_nk_templates_fk_rel_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_template_folders_nk_templates_fk_rel_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/templateFolders/{nk}/templates/{fk}/rel'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'id2' in params:
path_params['id'] = params['id2']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalTemplate',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_folders_nk_templates_fk_rel_put(self, id, id2, nk, fk, **kwargs):
"""
Link folder with Template and Portal
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_nk_templates_fk_rel_put(id, id2, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param str nk: PortalTemplateFolder id (required)
:param str fk: Template id (required)
:return: PortalTemplate
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_folders_nk_templates_fk_rel_put_with_http_info(id, id2, nk, fk, **kwargs)
else:
(data) = self.portals_id_template_folders_nk_templates_fk_rel_put_with_http_info(id, id2, nk, fk, **kwargs)
return data
def portals_id_template_folders_nk_templates_fk_rel_put_with_http_info(self, id, id2, nk, fk, **kwargs):
"""
Link folder with Template and Portal
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_nk_templates_fk_rel_put_with_http_info(id, id2, nk, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param str nk: PortalTemplateFolder id (required)
:param str fk: Template id (required)
:return: PortalTemplate
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'id2', 'nk', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_folders_nk_templates_fk_rel_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_folders_nk_templates_fk_rel_put`")
# verify the required parameter 'id2' is set
if ('id2' not in params) or (params['id2'] is None):
raise ValueError("Missing the required parameter `id2` when calling `portals_id_template_folders_nk_templates_fk_rel_put`")
# verify the required parameter 'nk' is set
if ('nk' not in params) or (params['nk'] is None):
raise ValueError("Missing the required parameter `nk` when calling `portals_id_template_folders_nk_templates_fk_rel_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_template_folders_nk_templates_fk_rel_put`")
collection_formats = {}
resource_path = '/Portals/{id}/templateFolders/{nk}/templates/{fk}/rel'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'id2' in params:
path_params['id'] = params['id2']
if 'nk' in params:
path_params['nk'] = params['nk']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalTemplate',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_folders_post(self, id, **kwargs):
"""
Creates a new instance in templateFolders of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_post(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param PortalTemplateFolder data:
:return: PortalTemplateFolder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_folders_post_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_template_folders_post_with_http_info(id, **kwargs)
return data
def portals_id_template_folders_post_with_http_info(self, id, **kwargs):
"""
Creates a new instance in templateFolders of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_post_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param PortalTemplateFolder data:
:return: PortalTemplateFolder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_folders_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_folders_post`")
collection_formats = {}
resource_path = '/Portals/{id}/templateFolders'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalTemplateFolder',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_folders_root_templates_get(self, id, id2, **kwargs):
"""
List templates on root folder
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_root_templates_get(id, id2, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param str filter: Only include changes that match this filter
:return: list[PortalTemplate]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_folders_root_templates_get_with_http_info(id, id2, **kwargs)
else:
(data) = self.portals_id_template_folders_root_templates_get_with_http_info(id, id2, **kwargs)
return data
def portals_id_template_folders_root_templates_get_with_http_info(self, id, id2, **kwargs):
"""
List templates on root folder
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_folders_root_templates_get_with_http_info(id, id2, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: Portal id (required)
:param str filter: Only include changes that match this filter
:return: list[PortalTemplate]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'id2', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_folders_root_templates_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_folders_root_templates_get`")
# verify the required parameter 'id2' is set
if ('id2' not in params) or (params['id2'] is None):
raise ValueError("Missing the required parameter `id2` when calling `portals_id_template_folders_root_templates_get`")
collection_formats = {}
resource_path = '/Portals/{id}/templateFolders/root/templates'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'id2' in params:
path_params['id'] = params['id2']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[PortalTemplate]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_rels_count_get(self, id, **kwargs):
"""
Counts templateRels of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_count_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_rels_count_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_template_rels_count_get_with_http_info(id, **kwargs)
return data
def portals_id_template_rels_count_get_with_http_info(self, id, **kwargs):
"""
Counts templateRels of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_count_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_rels_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_rels_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/templateRels/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_rels_delete(self, id, **kwargs):
"""
Deletes all templateRels of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_delete(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_rels_delete_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_template_rels_delete_with_http_info(id, **kwargs)
return data
def portals_id_template_rels_delete_with_http_info(self, id, **kwargs):
"""
Deletes all templateRels of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_delete_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_rels_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_rels_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/templateRels'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_rels_fk_delete(self, id, fk, **kwargs):
"""
Delete a related item by id for templateRels.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_fk_delete(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templateRels (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_rels_fk_delete_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_template_rels_fk_delete_with_http_info(id, fk, **kwargs)
return data
def portals_id_template_rels_fk_delete_with_http_info(self, id, fk, **kwargs):
"""
Delete a related item by id for templateRels.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_fk_delete_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templateRels (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_rels_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_rels_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_template_rels_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/templateRels/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_rels_fk_get(self, id, fk, **kwargs):
"""
Find a related item by id for templateRels.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_fk_get(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templateRels (required)
:return: PortalTemplate
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_rels_fk_get_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_template_rels_fk_get_with_http_info(id, fk, **kwargs)
return data
def portals_id_template_rels_fk_get_with_http_info(self, id, fk, **kwargs):
"""
Find a related item by id for templateRels.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_fk_get_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templateRels (required)
:return: PortalTemplate
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_rels_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_rels_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_template_rels_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/templateRels/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalTemplate',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_rels_fk_put(self, id, fk, **kwargs):
"""
Update a related item by id for templateRels.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_fk_put(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templateRels (required)
:param PortalTemplate data:
:return: PortalTemplate
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_rels_fk_put_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_template_rels_fk_put_with_http_info(id, fk, **kwargs)
return data
def portals_id_template_rels_fk_put_with_http_info(self, id, fk, **kwargs):
"""
Update a related item by id for templateRels.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_fk_put_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templateRels (required)
:param PortalTemplate data:
:return: PortalTemplate
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_rels_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_rels_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_template_rels_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/templateRels/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalTemplate',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_rels_get(self, id, **kwargs):
"""
Queries templateRels of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[PortalTemplate]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_rels_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_template_rels_get_with_http_info(id, **kwargs)
return data
def portals_id_template_rels_get_with_http_info(self, id, **kwargs):
"""
Queries templateRels of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[PortalTemplate]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_rels_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_rels_get`")
collection_formats = {}
resource_path = '/Portals/{id}/templateRels'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[PortalTemplate]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_template_rels_post(self, id, **kwargs):
"""
Creates a new instance in templateRels of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_post(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param PortalTemplate data:
:return: PortalTemplate
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_template_rels_post_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_template_rels_post_with_http_info(id, **kwargs)
return data
def portals_id_template_rels_post_with_http_info(self, id, **kwargs):
"""
Creates a new instance in templateRels of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_template_rels_post_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param PortalTemplate data:
:return: PortalTemplate
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_template_rels_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_template_rels_post`")
collection_formats = {}
resource_path = '/Portals/{id}/templateRels'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalTemplate',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_templates_count_get(self, id, **kwargs):
"""
Counts templates of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_count_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_templates_count_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_templates_count_get_with_http_info(id, **kwargs)
return data
def portals_id_templates_count_get_with_http_info(self, id, **kwargs):
"""
Counts templates of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_count_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str where: Criteria to match model instances
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'where']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_templates_count_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_templates_count_get`")
collection_formats = {}
resource_path = '/Portals/{id}/templates/count'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'where' in params:
query_params['where'] = params['where']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2001',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_templates_delete(self, id, **kwargs):
"""
Deletes all templates of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_delete(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_templates_delete_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_templates_delete_with_http_info(id, **kwargs)
return data
def portals_id_templates_delete_with_http_info(self, id, **kwargs):
"""
Deletes all templates of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_delete_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_templates_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_templates_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/templates'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_templates_fk_delete(self, id, fk, **kwargs):
"""
Delete a related item by id for templates.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_fk_delete(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templates (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_templates_fk_delete_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_templates_fk_delete_with_http_info(id, fk, **kwargs)
return data
def portals_id_templates_fk_delete_with_http_info(self, id, fk, **kwargs):
"""
Delete a related item by id for templates.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_fk_delete_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templates (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_templates_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_templates_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_templates_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/templates/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_templates_fk_designs_generate_bulk_post(self, id, id2, fk, **kwargs):
"""
Generate Design from Template
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_fk_designs_generate_bulk_post(id, id2, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: (required)
:param str fk: (required)
:param list[object] data:
:return: list[Design]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_templates_fk_designs_generate_bulk_post_with_http_info(id, id2, fk, **kwargs)
else:
(data) = self.portals_id_templates_fk_designs_generate_bulk_post_with_http_info(id, id2, fk, **kwargs)
return data
def portals_id_templates_fk_designs_generate_bulk_post_with_http_info(self, id, id2, fk, **kwargs):
"""
Generate Design from Template
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_fk_designs_generate_bulk_post_with_http_info(id, id2, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: (required)
:param str fk: (required)
:param list[object] data:
:return: list[Design]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'id2', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_templates_fk_designs_generate_bulk_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_templates_fk_designs_generate_bulk_post`")
# verify the required parameter 'id2' is set
if ('id2' not in params) or (params['id2'] is None):
raise ValueError("Missing the required parameter `id2` when calling `portals_id_templates_fk_designs_generate_bulk_post`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_templates_fk_designs_generate_bulk_post`")
collection_formats = {}
resource_path = '/Portals/{id}/templates/{fk}/designs/generate/bulk'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'id2' in params:
path_params['id'] = params['id2']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[Design]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_templates_fk_designs_generate_post(self, id, id2, fk, **kwargs):
"""
Generate Design from Template
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_fk_designs_generate_post(id, id2, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: (required)
:param str fk: (required)
:param Portal data:
:return: Design
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_templates_fk_designs_generate_post_with_http_info(id, id2, fk, **kwargs)
else:
(data) = self.portals_id_templates_fk_designs_generate_post_with_http_info(id, id2, fk, **kwargs)
return data
def portals_id_templates_fk_designs_generate_post_with_http_info(self, id, id2, fk, **kwargs):
"""
Generate Design from Template
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_fk_designs_generate_post_with_http_info(id, id2, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str id2: (required)
:param str fk: (required)
:param Portal data:
:return: Design
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'id2', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_templates_fk_designs_generate_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_templates_fk_designs_generate_post`")
# verify the required parameter 'id2' is set
if ('id2' not in params) or (params['id2'] is None):
raise ValueError("Missing the required parameter `id2` when calling `portals_id_templates_fk_designs_generate_post`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_templates_fk_designs_generate_post`")
collection_formats = {}
resource_path = '/Portals/{id}/templates/{fk}/designs/generate'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'id2' in params:
path_params['id'] = params['id2']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Design',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_templates_fk_get(self, id, fk, **kwargs):
"""
Find a related item by id for templates.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_fk_get(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templates (required)
:return: Template
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_templates_fk_get_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_templates_fk_get_with_http_info(id, fk, **kwargs)
return data
def portals_id_templates_fk_get_with_http_info(self, id, fk, **kwargs):
"""
Find a related item by id for templates.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_fk_get_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templates (required)
:return: Template
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_templates_fk_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_templates_fk_get`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_templates_fk_get`")
collection_formats = {}
resource_path = '/Portals/{id}/templates/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Template',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_templates_fk_put(self, id, fk, **kwargs):
"""
Update a related item by id for templates.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_fk_put(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templates (required)
:param Template data:
:return: Template
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_templates_fk_put_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_templates_fk_put_with_http_info(id, fk, **kwargs)
return data
def portals_id_templates_fk_put_with_http_info(self, id, fk, **kwargs):
"""
Update a related item by id for templates.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_fk_put_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templates (required)
:param Template data:
:return: Template
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_templates_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_templates_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_templates_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/templates/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Template',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_templates_get(self, id, **kwargs):
"""
Queries templates of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_get(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[Template]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_templates_get_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_templates_get_with_http_info(id, **kwargs)
return data
def portals_id_templates_get_with_http_info(self, id, **kwargs):
"""
Queries templates of Portal.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_get_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str filter:
:return: list[Template]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'filter']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_templates_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_templates_get`")
collection_formats = {}
resource_path = '/Portals/{id}/templates'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
if 'filter' in params:
query_params['filter'] = params['filter']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[Template]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_templates_post(self, id, **kwargs):
"""
Creates a new instance in templates of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_post(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param Template data:
:return: Template
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_templates_post_with_http_info(id, **kwargs)
else:
(data) = self.portals_id_templates_post_with_http_info(id, **kwargs)
return data
def portals_id_templates_post_with_http_info(self, id, **kwargs):
"""
Creates a new instance in templates of this model.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_post_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param Template data:
:return: Template
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_templates_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_templates_post`")
collection_formats = {}
resource_path = '/Portals/{id}/templates'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Template',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_templates_rel_fk_delete(self, id, fk, **kwargs):
"""
Remove the templates relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_rel_fk_delete(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templates (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_templates_rel_fk_delete_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_templates_rel_fk_delete_with_http_info(id, fk, **kwargs)
return data
def portals_id_templates_rel_fk_delete_with_http_info(self, id, fk, **kwargs):
"""
Remove the templates relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_rel_fk_delete_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templates (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_templates_rel_fk_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_templates_rel_fk_delete`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_templates_rel_fk_delete`")
collection_formats = {}
resource_path = '/Portals/{id}/templates/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None,
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_templates_rel_fk_head(self, id, fk, **kwargs):
"""
Check the existence of templates relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_rel_fk_head(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templates (required)
:return: bool
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_templates_rel_fk_head_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_templates_rel_fk_head_with_http_info(id, fk, **kwargs)
return data
def portals_id_templates_rel_fk_head_with_http_info(self, id, fk, **kwargs):
"""
Check the existence of templates relation to an item by id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_rel_fk_head_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templates (required)
:return: bool
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_templates_rel_fk_head" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_templates_rel_fk_head`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_templates_rel_fk_head`")
collection_formats = {}
resource_path = '/Portals/{id}/templates/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
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/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'HEAD',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='bool',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_id_templates_rel_fk_put(self, id, fk, **kwargs):
"""
Add a related item by id for templates.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_rel_fk_put(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templates (required)
:param PortalTemplate data:
:return: PortalTemplate
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_id_templates_rel_fk_put_with_http_info(id, fk, **kwargs)
else:
(data) = self.portals_id_templates_rel_fk_put_with_http_info(id, fk, **kwargs)
return data
def portals_id_templates_rel_fk_put_with_http_info(self, id, fk, **kwargs):
"""
Add a related item by id for templates.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_id_templates_rel_fk_put_with_http_info(id, fk, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str id: Portal id (required)
:param str fk: Foreign key for templates (required)
:param PortalTemplate data:
:return: PortalTemplate
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'fk', 'data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_id_templates_rel_fk_put" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `portals_id_templates_rel_fk_put`")
# verify the required parameter 'fk' is set
if ('fk' not in params) or (params['fk'] is None):
raise ValueError("Missing the required parameter `fk` when calling `portals_id_templates_rel_fk_put`")
collection_formats = {}
resource_path = '/Portals/{id}/templates/rel/{fk}'.replace('{format}', 'json')
path_params = {}
if 'id' in params:
path_params['id'] = params['id']
if 'fk' in params:
path_params['fk'] = params['fk']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PortalTemplate',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
def portals_post(self, **kwargs):
"""
Create a new instance of the model and persist it into the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_post(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param Portal data: Model instance data
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.portals_post_with_http_info(**kwargs)
else:
(data) = self.portals_post_with_http_info(**kwargs)
return data
def portals_post_with_http_info(self, **kwargs):
"""
Create a new instance of the model and persist it into the data source.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.portals_post_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param Portal data: Model instance data
:return: Portal
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['data']
all_params.append('callback')
all_params.append('_return_http_data_only')
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 portals_post" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
resource_path = '/Portals'.replace('{format}', 'json')
path_params = {}
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'data' in params:
body_params = params['data']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])
# Authentication setting
auth_settings = ['access_token']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Portal',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
collection_formats=collection_formats)
| 42.41948 | 165 | 0.567463 | 82,434 | 777,846 | 5.125543 | 0.004003 | 0.059453 | 0.027417 | 0.028415 | 0.996902 | 0.996391 | 0.995764 | 0.994052 | 0.991958 | 0.987676 | 0 | 0.000687 | 0.344897 | 777,846 | 18,336 | 166 | 42.421793 | 0.828483 | 0.303889 | 0 | 0.850485 | 0 | 0 | 0.199093 | 0.080275 | 0 | 0 | 0 | 0 | 0 | 1 | 0.035979 | false | 0 | 0.0008 | 0 | 0.090691 | 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 |
7c4f237d0e469d347c2903d696654e200859f237 | 128 | py | Python | python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_1/_pkg0_1_1_1/_pkg0_1_1_1_0/_mod0_1_1_1_0_2.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2018-12-29T09:53:39.000Z | 2018-12-29T09:53:42.000Z | python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_1/_pkg0_1_1_1/_pkg0_1_1_1_0/_mod0_1_1_1_0_2.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_1/_pkg0_1_1_1/_pkg0_1_1_1_0/_mod0_1_1_1_0_2.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | name0_1_1_1_0_2_0 = None
name0_1_1_1_0_2_1 = None
name0_1_1_1_0_2_2 = None
name0_1_1_1_0_2_3 = None
name0_1_1_1_0_2_4 = None | 14.222222 | 24 | 0.820313 | 40 | 128 | 1.875 | 0.175 | 0.266667 | 0.466667 | 0.533333 | 0.88 | 0.88 | 0.746667 | 0 | 0 | 0 | 0 | 0.318182 | 0.140625 | 128 | 9 | 25 | 14.222222 | 0.363636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
7c82dcacb1265555e458803fdda0437e181ab26f | 75 | py | Python | dcp/data_copy/copiers/__init__.py | kvh/dcp | 1332b0fa44e755202d5f13342e834fe165b36ca5 | [
"BSD-3-Clause"
] | 3 | 2021-04-13T22:12:34.000Z | 2021-07-17T19:01:08.000Z | dcp/data_copy/copiers/__init__.py | kvh/dcp | 1332b0fa44e755202d5f13342e834fe165b36ca5 | [
"BSD-3-Clause"
] | 1 | 2021-04-13T22:12:21.000Z | 2021-04-13T22:12:21.000Z | dcp/data_copy/copiers/__init__.py | kvh/dcp | 1332b0fa44e755202d5f13342e834fe165b36ca5 | [
"BSD-3-Clause"
] | null | null | null | from .to_database import *
from .to_file import *
from .to_memory import *
| 18.75 | 26 | 0.76 | 12 | 75 | 4.5 | 0.5 | 0.333333 | 0.444444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16 | 75 | 3 | 27 | 25 | 0.857143 | 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 |
7c96f0f7e28461432102653390e3d41e1aef1207 | 16,318 | py | Python | test/test_senders/test_smtp.py | jwodder/outgoing | 133d38c980fd6fe59e4edf0bb0f89392ecde68de | [
"MIT"
] | 4 | 2021-03-05T00:53:03.000Z | 2022-01-04T20:59:19.000Z | test/test_senders/test_smtp.py | jwodder/outgoing | 133d38c980fd6fe59e4edf0bb0f89392ecde68de | [
"MIT"
] | null | null | null | test/test_senders/test_smtp.py | jwodder/outgoing | 133d38c980fd6fe59e4edf0bb0f89392ecde68de | [
"MIT"
] | 1 | 2021-09-04T13:25:51.000Z | 2021-09-04T13:25:51.000Z | from email.message import EmailMessage
import logging
from pathlib import Path
import smtplib
from typing import Union
from mailbits import email2dict
from pydantic import SecretStr
import pytest
from pytest_mock import MockerFixture
from smtpdfix import SMTPDFix
from outgoing import Sender, from_dict
from outgoing.errors import InvalidConfigError
from outgoing.senders.smtp import SMTPSender
smtpdfix_headers = ["x-mailfrom", "x-peer", "x-rcptto"]
def test_smtp_construct_default_ssl(
monkeypatch: pytest.MonkeyPatch, tmp_path: Path
) -> None:
monkeypatch.setenv("MY_PASSWORD", "hunter2")
sender = from_dict(
{
"method": "smtp",
"host": "mx.example.com",
"username": "me",
"password": {"env": "MY_PASSWORD"},
},
configpath=str(tmp_path / "foo.txt"),
)
assert isinstance(sender, Sender)
assert isinstance(sender, SMTPSender)
assert sender.dict() == {
"configpath": tmp_path / "foo.txt",
"host": "mx.example.com",
"username": "me",
"password": SecretStr("hunter2"),
"port": 25,
"ssl": False,
"netrc": False,
}
assert sender._client is None
def test_smtp_construct_no_ssl(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
monkeypatch.setenv("MY_PASSWORD", "hunter2")
sender = from_dict(
{
"method": "smtp",
"host": "mx.example.com",
"username": "me",
"password": {"env": "MY_PASSWORD"},
"ssl": False,
},
configpath=str(tmp_path / "foo.txt"),
)
assert isinstance(sender, SMTPSender)
assert sender.dict() == {
"configpath": tmp_path / "foo.txt",
"host": "mx.example.com",
"username": "me",
"password": SecretStr("hunter2"),
"port": 25,
"ssl": False,
"netrc": False,
}
assert sender._client is None
def test_smtp_construct_ssl(tmp_path: Path) -> None:
(tmp_path / "secret").write_text("12345\n")
sender = from_dict(
{
"method": "smtp",
"host": "mx.example.com",
"username": "me",
"password": {"file": "secret"},
"ssl": True,
},
configpath=str(tmp_path / "foo.txt"),
)
assert isinstance(sender, SMTPSender)
assert sender.dict() == {
"configpath": tmp_path / "foo.txt",
"host": "mx.example.com",
"username": "me",
"password": SecretStr("12345"),
"port": 465,
"ssl": True,
"netrc": False,
}
assert sender._client is None
def test_smtp_construct_starttls(tmp_path: Path) -> None:
(tmp_path / "net.rc").write_text(
"machine mx.example.com\nlogin me\npassword secret\n"
)
sender = from_dict(
{
"method": "smtp",
"host": "mx.example.com",
"netrc": "net.rc",
"ssl": "starttls",
},
configpath=str(tmp_path / "foo.txt"),
)
assert isinstance(sender, SMTPSender)
assert sender.dict() == {
"configpath": tmp_path / "foo.txt",
"host": "mx.example.com",
"username": "me",
"password": SecretStr("secret"),
"port": 587,
"ssl": "starttls",
"netrc": tmp_path / "net.rc",
}
assert sender._client is None
@pytest.mark.parametrize("ssl", [False, True, "starttls"])
def test_smtp_construct_explicit_port(ssl: Union[bool, str], tmp_path: Path) -> None:
sender = from_dict(
{
"method": "smtp",
"host": "mx.example.com",
"port": 1337,
"ssl": ssl,
},
configpath=str(tmp_path / "foo.txt"),
)
assert isinstance(sender, SMTPSender)
assert sender.dict() == {
"configpath": tmp_path / "foo.txt",
"host": "mx.example.com",
"username": None,
"password": None,
"port": 1337,
"ssl": ssl,
"netrc": False,
}
def test_smtp_construct_negative_port(tmp_path: Path) -> None:
with pytest.raises(InvalidConfigError):
from_dict(
{
"method": "smtp",
"host": "mx.example.com",
"port": -1,
},
configpath=str(tmp_path / "foo.txt"),
)
def test_smtp_send_no_ssl_no_auth(
caplog: pytest.LogCaptureFixture, mocker: MockerFixture, test_email1: EmailMessage
) -> None:
caplog.set_level(logging.DEBUG, logger="outgoing")
m = mocker.patch("smtplib.SMTP", autospec=True)
sender = from_dict({"method": "smtp", "host": "mx.example.com"})
with sender:
sender.send(test_email1)
assert m.call_args_list == [mocker.call("mx.example.com", 25)]
assert m.return_value.method_calls == [
mocker.call.send_message(test_email1),
mocker.call.quit(),
]
assert caplog.record_tuples == [
(
"outgoing.senders.smtp",
logging.DEBUG,
"Connecting to SMTP server at mx.example.com, port 25",
),
(
"outgoing.senders.smtp",
logging.INFO,
f"Sending e-mail {test_email1['Subject']!r} via SMTP",
),
(
"outgoing.senders.smtp",
logging.DEBUG,
"Closing connection to mx.example.com",
),
]
def test_smtp_send_no_ssl_auth(
caplog: pytest.LogCaptureFixture, mocker: MockerFixture, test_email1: EmailMessage
) -> None:
caplog.set_level(logging.DEBUG, logger="outgoing")
m = mocker.patch("smtplib.SMTP", autospec=True)
sender = from_dict(
{
"method": "smtp",
"host": "mx.example.com",
"username": "luser",
"password": "54321",
}
)
with sender:
sender.send(test_email1)
assert m.call_args_list == [mocker.call("mx.example.com", 25)]
assert m.return_value.method_calls == [
mocker.call.login("luser", "54321"),
mocker.call.send_message(test_email1),
mocker.call.quit(),
]
assert caplog.record_tuples == [
(
"outgoing.senders.smtp",
logging.DEBUG,
"Connecting to SMTP server at mx.example.com, port 25",
),
("outgoing.senders.smtp", logging.DEBUG, "Logging in as 'luser'"),
(
"outgoing.senders.smtp",
logging.INFO,
f"Sending e-mail {test_email1['Subject']!r} via SMTP",
),
(
"outgoing.senders.smtp",
logging.DEBUG,
"Closing connection to mx.example.com",
),
]
def test_smtp_send_ssl_no_auth(
caplog: pytest.LogCaptureFixture, mocker: MockerFixture, test_email1: EmailMessage
) -> None:
caplog.set_level(logging.DEBUG, logger="outgoing")
m = mocker.patch("smtplib.SMTP_SSL", autospec=True)
sender = from_dict({"method": "smtp", "host": "mx.example.com", "ssl": True})
with sender:
sender.send(test_email1)
assert m.call_args_list == [mocker.call("mx.example.com", 465)]
assert m.return_value.method_calls == [
mocker.call.send_message(test_email1),
mocker.call.quit(),
]
assert caplog.record_tuples == [
(
"outgoing.senders.smtp",
logging.DEBUG,
"Connecting to SMTP server at mx.example.com, port 465, using TLS",
),
(
"outgoing.senders.smtp",
logging.INFO,
f"Sending e-mail {test_email1['Subject']!r} via SMTP",
),
(
"outgoing.senders.smtp",
logging.DEBUG,
"Closing connection to mx.example.com",
),
]
def test_smtp_send_ssl_auth(
caplog: pytest.LogCaptureFixture,
mocker: MockerFixture,
test_email1: EmailMessage,
) -> None:
caplog.set_level(logging.DEBUG, logger="outgoing")
m = mocker.patch("smtplib.SMTP_SSL", autospec=True)
sender = from_dict(
{
"method": "smtp",
"host": "mx.example.com",
"username": "luser",
"password": "54321",
"ssl": True,
}
)
with sender:
sender.send(test_email1)
assert m.call_args_list == [mocker.call("mx.example.com", 465)]
assert m.return_value.method_calls == [
mocker.call.login("luser", "54321"),
mocker.call.send_message(test_email1),
mocker.call.quit(),
]
assert caplog.record_tuples == [
(
"outgoing.senders.smtp",
logging.DEBUG,
"Connecting to SMTP server at mx.example.com, port 465, using TLS",
),
("outgoing.senders.smtp", logging.DEBUG, "Logging in as 'luser'"),
(
"outgoing.senders.smtp",
logging.INFO,
f"Sending e-mail {test_email1['Subject']!r} via SMTP",
),
(
"outgoing.senders.smtp",
logging.DEBUG,
"Closing connection to mx.example.com",
),
]
def test_smtp_send_starttls_no_auth(
caplog: pytest.LogCaptureFixture, mocker: MockerFixture, test_email1: EmailMessage
) -> None:
caplog.set_level(logging.DEBUG, logger="outgoing")
m = mocker.patch("smtplib.SMTP", autospec=True)
sender = from_dict({"method": "smtp", "host": "mx.example.com", "ssl": "starttls"})
with sender:
sender.send(test_email1)
assert m.call_args_list == [mocker.call("mx.example.com", 587)]
assert m.return_value.method_calls == [
mocker.call.starttls(),
mocker.call.send_message(test_email1),
mocker.call.quit(),
]
assert caplog.record_tuples == [
(
"outgoing.senders.smtp",
logging.DEBUG,
"Connecting to SMTP server at mx.example.com, port 587",
),
("outgoing.senders.smtp", logging.DEBUG, "Enabling STARTTLS"),
(
"outgoing.senders.smtp",
logging.INFO,
f"Sending e-mail {test_email1['Subject']!r} via SMTP",
),
(
"outgoing.senders.smtp",
logging.DEBUG,
"Closing connection to mx.example.com",
),
]
def test_smtp_send_starttls_auth(
caplog: pytest.LogCaptureFixture, mocker: MockerFixture, test_email1: EmailMessage
) -> None:
caplog.set_level(logging.DEBUG, logger="outgoing")
m = mocker.patch("smtplib.SMTP", autospec=True)
sender = from_dict(
{
"method": "smtp",
"host": "mx.example.com",
"username": "luser",
"password": "54321",
"ssl": "starttls",
}
)
with sender:
sender.send(test_email1)
assert m.call_args_list == [mocker.call("mx.example.com", 587)]
assert m.return_value.method_calls == [
mocker.call.starttls(),
mocker.call.login("luser", "54321"),
mocker.call.send_message(test_email1),
mocker.call.quit(),
]
assert caplog.record_tuples == [
(
"outgoing.senders.smtp",
logging.DEBUG,
"Connecting to SMTP server at mx.example.com, port 587",
),
("outgoing.senders.smtp", logging.DEBUG, "Enabling STARTTLS"),
("outgoing.senders.smtp", logging.DEBUG, "Logging in as 'luser'"),
(
"outgoing.senders.smtp",
logging.INFO,
f"Sending e-mail {test_email1['Subject']!r} via SMTP",
),
(
"outgoing.senders.smtp",
logging.DEBUG,
"Closing connection to mx.example.com",
),
]
# Spied-on smtplib classes don't work with smtpdfix for some reason (or at
# all?), so we need to split the tests apart.
def test_smtp_fix_send_no_ssl_no_auth(
smtpd: SMTPDFix, test_email1: EmailMessage
) -> None:
sender = from_dict({"method": "smtp", "host": smtpd.hostname, "port": smtpd.port})
with sender:
sender.send(test_email1)
assert len(smtpd.messages) == 1
msgdict = email2dict(smtpd.messages[0])
for h in smtpdfix_headers:
msgdict["headers"].pop(h, None)
assert email2dict(test_email1) == msgdict
def test_smtp_fix_send_no_ssl_auth(smtpd: SMTPDFix, test_email1: EmailMessage) -> None:
smtpd.config.enforce_auth = True
smtpd.config.auth_require_tls = False
smtpd.config.login_username = "luser"
smtpd.config.login_password = "hunter2"
sender = from_dict(
{
"method": "smtp",
"host": smtpd.hostname,
"port": smtpd.port,
"username": "luser",
"password": "hunter2",
}
)
with sender:
sender.send(test_email1)
assert len(smtpd.messages) == 1
msgdict = email2dict(smtpd.messages[0])
for h in smtpdfix_headers:
msgdict["headers"].pop(h, None)
assert email2dict(test_email1) == msgdict
def test_smtp_fix_send_ssl_no_auth(smtpd: SMTPDFix, test_email1: EmailMessage) -> None:
smtpd.config.use_ssl = True
sender = from_dict(
{"method": "smtp", "host": smtpd.hostname, "port": smtpd.port, "ssl": True}
)
with sender:
sender.send(test_email1)
assert len(smtpd.messages) == 1
msgdict = email2dict(smtpd.messages[0])
for h in smtpdfix_headers:
msgdict["headers"].pop(h, None)
assert email2dict(test_email1) == msgdict
@pytest.mark.skip(reason="Produces PytestUnraisableExceptionWarning on pytest 6.2.3+")
@pytest.mark.xfail(
raises=smtplib.SMTPNotSupportedError,
reason="https://github.com/bebleo/smtpdfix/issues/10",
)
def test_smtp_fix_send_ssl_auth(
smtpd: SMTPDFix,
test_email1: EmailMessage,
) -> None:
smtpd.config.enforce_auth = True
smtpd.config.login_username = "luser"
smtpd.config.login_password = "hunter2"
smtpd.config.use_ssl = True
sender = from_dict(
{
"method": "smtp",
"host": smtpd.hostname,
"port": smtpd.port,
"username": "luser",
"password": "hunter2",
"ssl": True,
}
)
with sender:
sender.send(test_email1)
assert len(smtpd.messages) == 1
msgdict = email2dict(smtpd.messages[0])
for h in smtpdfix_headers:
msgdict["headers"].pop(h, None)
assert email2dict(test_email1) == msgdict
def test_smtp_fix_send_starttls_no_auth(
smtpd: SMTPDFix, test_email1: EmailMessage
) -> None:
smtpd.config.use_starttls = True
sender = from_dict(
{
"method": "smtp",
"host": smtpd.hostname,
"port": smtpd.port,
"ssl": "starttls",
}
)
with sender:
sender.send(test_email1)
assert len(smtpd.messages) == 1
msgdict = email2dict(smtpd.messages[0])
for h in smtpdfix_headers:
msgdict["headers"].pop(h, None)
assert email2dict(test_email1) == msgdict
def test_smtp_fix_send_starttls_auth(
smtpd: SMTPDFix, test_email1: EmailMessage
) -> None:
smtpd.config.use_starttls = True
smtpd.config.enforce_auth = True
smtpd.config.login_username = "luser"
smtpd.config.login_password = "hunter2"
sender = from_dict(
{
"method": "smtp",
"host": smtpd.hostname,
"port": smtpd.port,
"username": "luser",
"password": "hunter2",
"ssl": "starttls",
}
)
with sender:
sender.send(test_email1)
assert len(smtpd.messages) == 1
msgdict = email2dict(smtpd.messages[0])
for h in smtpdfix_headers:
msgdict["headers"].pop(h, None)
assert email2dict(test_email1) == msgdict
def test_smtp_send_no_context(mocker: MockerFixture, test_email1: EmailMessage) -> None:
m = mocker.patch("smtplib.SMTP", autospec=True)
sender = from_dict({"method": "smtp", "host": "mx.example.com"})
sender.send(test_email1)
assert m.call_args_list == [mocker.call("mx.example.com", 25)]
assert m.return_value.method_calls == [
mocker.call.send_message(test_email1),
mocker.call.quit(),
]
def test_smtp_close_unopened() -> None:
sender = from_dict({"method": "smtp", "host": "mx.example.com"})
assert isinstance(sender, SMTPSender)
with pytest.raises(ValueError) as excinfo:
sender.close()
assert str(excinfo.value) == "SMTPSender is not open"
| 30.615385 | 88 | 0.583037 | 1,804 | 16,318 | 5.129157 | 0.101996 | 0.048633 | 0.050578 | 0.064628 | 0.864368 | 0.861126 | 0.844699 | 0.842321 | 0.842321 | 0.827083 | 0 | 0.015159 | 0.280427 | 16,318 | 532 | 89 | 30.672932 | 0.772867 | 0.007109 | 0 | 0.702259 | 0 | 0 | 0.203593 | 0.042719 | 0 | 0 | 0 | 0 | 0.100616 | 1 | 0.041068 | false | 0.041068 | 0.026694 | 0 | 0.067762 | 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 |
7cc249fc85a3a6a60aa8796b0d0e48e6e13d4c79 | 2,946 | py | Python | py37/django11/dailyfresh/apps/goods/migrations/0002_auto_20191124_2031.py | Fly365/py-learn | a7c747af70ca2d6dcf244dc89344fbd26b125987 | [
"Apache-2.0"
] | null | null | null | py37/django11/dailyfresh/apps/goods/migrations/0002_auto_20191124_2031.py | Fly365/py-learn | a7c747af70ca2d6dcf244dc89344fbd26b125987 | [
"Apache-2.0"
] | null | null | null | py37/django11/dailyfresh/apps/goods/migrations/0002_auto_20191124_2031.py | Fly365/py-learn | a7c747af70ca2d6dcf244dc89344fbd26b125987 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('goods', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='goods',
name='create_time',
field=models.DateTimeField(verbose_name='创建时间', auto_now_add=True),
),
migrations.AlterField(
model_name='goods',
name='update_time',
field=models.DateTimeField(verbose_name='更新时间', auto_now_add=True),
),
migrations.AlterField(
model_name='goodsimage',
name='create_time',
field=models.DateTimeField(verbose_name='创建时间', auto_now_add=True),
),
migrations.AlterField(
model_name='goodsimage',
name='update_time',
field=models.DateTimeField(verbose_name='更新时间', auto_now_add=True),
),
migrations.AlterField(
model_name='goodssku',
name='create_time',
field=models.DateTimeField(verbose_name='创建时间', auto_now_add=True),
),
migrations.AlterField(
model_name='goodssku',
name='update_time',
field=models.DateTimeField(verbose_name='更新时间', auto_now_add=True),
),
migrations.AlterField(
model_name='goodstype',
name='create_time',
field=models.DateTimeField(verbose_name='创建时间', auto_now_add=True),
),
migrations.AlterField(
model_name='goodstype',
name='update_time',
field=models.DateTimeField(verbose_name='更新时间', auto_now_add=True),
),
migrations.AlterField(
model_name='indexgoodsbanner',
name='create_time',
field=models.DateTimeField(verbose_name='创建时间', auto_now_add=True),
),
migrations.AlterField(
model_name='indexgoodsbanner',
name='update_time',
field=models.DateTimeField(verbose_name='更新时间', auto_now_add=True),
),
migrations.AlterField(
model_name='indexpromotionbanner',
name='create_time',
field=models.DateTimeField(verbose_name='创建时间', auto_now_add=True),
),
migrations.AlterField(
model_name='indexpromotionbanner',
name='update_time',
field=models.DateTimeField(verbose_name='更新时间', auto_now_add=True),
),
migrations.AlterField(
model_name='indextypegoodsbanner',
name='create_time',
field=models.DateTimeField(verbose_name='创建时间', auto_now_add=True),
),
migrations.AlterField(
model_name='indextypegoodsbanner',
name='update_time',
field=models.DateTimeField(verbose_name='更新时间', auto_now_add=True),
),
]
| 34.658824 | 79 | 0.59131 | 275 | 2,946 | 6.058182 | 0.145455 | 0.168067 | 0.210084 | 0.243697 | 0.912365 | 0.912365 | 0.888956 | 0.888956 | 0.888956 | 0.888956 | 0 | 0.002405 | 0.294297 | 2,946 | 84 | 80 | 35.071429 | 0.798942 | 0.007128 | 0 | 0.897436 | 0 | 0 | 0.137872 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.025641 | 0 | 0.064103 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
7cf1e7d05be4a4558c27a1e9e53f409a419743fe | 12,137 | py | Python | bot/cogs/fun.py | zloutek1/MasarykBOT | 7504cb8fdd6d0790ba8a04a146508ec7f31eb071 | [
"MIT"
] | 13 | 2019-09-14T16:51:35.000Z | 2021-03-03T22:20:44.000Z | bot/cogs/fun.py | zloutek1/MasarykBOT | 7504cb8fdd6d0790ba8a04a146508ec7f31eb071 | [
"MIT"
] | 15 | 2019-09-29T19:25:31.000Z | 2022-02-13T16:40:45.000Z | bot/cogs/fun.py | zloutek1/MasarykBOT | 7504cb8fdd6d0790ba8a04a146508ec7f31eb071 | [
"MIT"
] | 15 | 2019-09-18T10:50:59.000Z | 2022-02-11T20:55:19.000Z | import os
from datetime import datetime
from io import BytesIO
from random import choice, shuffle
from urllib.parse import urlparse
import requests
from discord import Embed, File, Member, PartialEmoji
from discord.ext import commands
from PIL import Image
class Fun(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def emoji_list(self, ctx):
await ctx.message.delete()
emojis = sorted(ctx.guild.emojis, key=lambda emoji: emoji.name)
for i in range(0, len(emojis), 10):
await ctx.send(" ".join(list(map(str, emojis[i:i + 10]))))
if len(emojis) == 0:
await ctx.send("This guild has no emojis")
@commands.command()
async def emoji_url(self, ctx, emoji: PartialEmoji):
await ctx.send(f"`{emoji.url}`")
@commands.command(aliases=['emote'])
async def emoji(self, ctx, emoji: PartialEmoji):
filename = '{name}.{ext}'.format(name = emoji.name,
ext="png" if not emoji.animated else "gif")
with open(filename, 'wb') as file:
file.write(requests.get(emoji.url).content)
await ctx.send(file=File(filename))
os.remove(filename)
@commands.command(aliases=['icon_url'])
async def logo_url(self, ctx):
await ctx.send(f"`{ctx.guild.icon_url}`")
@commands.command(aliases=['icon'])
async def logo(self, ctx):
if ctx.guild.icon is None:
await ctx.send("this guild has no logo")
return
await self.send_asset(ctx, ctx.guild.icon_url)
@commands.command()
async def banner_url(self, ctx):
await ctx.send(f"`{ctx.guild.banner_url}`")
@commands.command()
async def banner(self, ctx):
if ctx.guild.banner is None:
await ctx.send("this guild has no banner")
return
await self.send_asset(ctx, ctx.guild.banner_url)
@commands.command()
async def avatar_url(self, ctx):
await ctx.send(f"`{ctx.author.avatar_url}`")
@commands.command()
async def avatar(self, ctx, member: Member = None):
if member is None:
member = ctx.author
if member is None:
await ctx.send(f"{member} has no avatar")
return
await self.send_asset(ctx, member.avatar_url)
@commands.command(aliases=['choice', 'pick'])
async def choose(self, ctx, *choices):
"""Chooses between multiple choices."""
embed = Embed()
if not choices:
await ctx.send("no options to choose from")
return
extended_choices = list(choices) * 7
for _ in range(7):
shuffle(extended_choices)
chosen = choice(extended_choices)
await ctx.send_embed(" / ".join(choices), name="I choose " + chosen)
@commands.command()
async def hug(self, ctx, user: Member, intensity: int = 1):
"""Because everyone likes hugs"""
emojis = ["(っ˘̩╭╮˘̩)っ", "(っ´▽`)っ", "╰(*´︶`*)╯",
"(つ≧▽≦)つ", "(づ ̄ ³ ̄)づ", "(づ。◕‿‿◕。)づ",
"(づ ̄ ³ ̄)づ", "(っ˘̩╭╮˘̩)っ", "⁽₍੭ ՞̑◞ළ̫̉◟՞̑₎⁾੭",
"(੭ु。╹▿╹。)੭ु⁾⁾ ", "(*´σЗ`)σ", "(っ´▽`)っ",
"(っ´∀`)っ", "c⌒っ╹v╹ )っ", "(σ・з・)σ",
"(੭ु´・ω・`)੭ु⁾⁾", "(o゚▽゚)o", "༼つ ் ▽ ் ༽つ",
"༼つ . •́ _ʖ •̀ . ༽つ", "╏つ ͜ಠ ‸ ͜ಠ ╏つ", "༼ つ ̥◕͙_̙◕͖ ͓༽つ",
"༼ つ ◕o◕ ༽つ", "༼ つ ͡ ͡° ͜ ʖ ͡ ͡° ༽つ", "(っಠ‿ಠ)っ",
"༼ つ ◕_◕ ༽つ", "ʕっ•ᴥ•ʔっ", "", "༼ つ ▀̿_▀̿ ༽つ",
"ʕ ⊃・ ◡ ・ ʔ⊃", "╏つ” ⊡ 〜 ⊡ ” ╏つ", "(⊃。•́‿•̀。)⊃",
"(っ⇀⑃↼)っ", "(.づ◡﹏◡)づ.", "(.づσ▿σ)づ.",
"(っ⇀`皿′↼)っ", "(.づ▣ ͜ʖ▣)づ.", "(つ ͡° ͜ʖ ͡°)つ",
"(⊃ • ʖ̫ • )⊃", "(っ・∀・)っ", "(つ´∀`)つ",
"(っ*´∀`*)っ", "(つ▀¯▀)つ", "(つ◉益◉)つ",
" ^_^ )>",
"───==≡≡ΣΣ((( つºل͜º)つ", "─=≡Σ((( つ◕ل͜◕)つ",
"─=≡Σ((( つ ◕o◕ )つ", "~~~~(/ ̄ー(・・。)/",
"───==≡≡ΣΣ(づ ̄ ³ ̄)づ", "─=≡Σʕっ•ᴥ•ʔっ",
"───==≡≡ΣΣ(> ^_^ )>", "─=≡Σ༼ つ ▀̿_▀̿ ༽つ",
"───==≡≡ΣΣ(っ´▽`)っ", "───==≡≡ΣΣ(っ´∀`)っ",
"~~(つˆДˆ)つノ>。☆)ノ"]
if 0 <= intensity < len(emojis):
await ctx.send(emojis[intensity] + f" **{user}**")
else:
await ctx.send(choice(emojis) + f" **{user}**")
@commands.command()
async def answer(self, ctx, *, question):
await ctx.send_embed(question, name=choice(("Yes", "No")))
@commands.command()
@commands.cooldown(rate=1, per=600, type=commands.BucketType.guild)
async def nightsky(self, ctx):
await ctx.send("\n".join(['.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 ✦ \u3000\u3000\u3000\u3000\u2002\u2002 \u3000', '\u3000\u3000\u3000˚\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000*\u3000\u3000\u3000\u3000\u3000\u3000\u2008', '\u2008\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.', '\u3000\u3000\u2008\u3000\u3000\u3000\u3000\u3000\u3000\u3000 ✦ \u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 \u3000 \u200d \u200d \u200d \u200d \u3000\u3000\u3000\u3000 \u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000,\u3000\u3000\u2002\u2002\u2002\u3000', '', '.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000゚\u3000\u2002\u2002\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.', '', '\u3000\u3000\u3000\u3000\u3000\u3000,\u3000\u3000\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u2008\u2008\u2008\u2008\u3000\u3000\u3000\u3000:alien: doot doot', '\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u2008\u2008', '\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000:sunny:\u3000\u3000\u2008\u2008\u200a\u200a\u3000\u2008\u2008\u2008\u2008\u2008\u200a\u3000\u3000\u3000\u3000\u3000\u2008\u2008\u200a\u200a\u2008\u2008\u200a\u200a\u3000\u3000\u3000\u3000*\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.', '\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.', '\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u200a\u200a\u200a\u2008\u2008\u200a\u200a\u3000\u2008\u2008\u2008\u3000\u3000\u3000\u3000', '\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u200a\u200a\u200a\u2008\u2008\u200a\u200a\u3000\u2008\u2008\u2008\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u200a\u200a\u200a\u2008\u2008\u200a\u200a\u3000\u2008\u2008\u2008 ✦', '\u3000\u2002\u2002\u2002\u3000\u3000\u3000,\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000*\u3000\u3000\u2008\u200a\u200a\u200a \u3000\u3000\u3000\u3000 \u3000\u3000,\u3000\u3000\u3000 \u200d \u200d \u200d \u200d \u3000 \u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u2008\u3000\u3000', '\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u2008\u3000\u200a\u200a\u2008\u2008\u2008\u2008\u2008\u2008\u2008\u200a\u200a\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000˚\u3000\u3000\u3000', '\u3000 \u2002\u2002\u3000\u3000\u3000\u3000,\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u200a\u200a\u200a\u200a\u200a\u200a\u200a\u3000\u200a\u2008\u2008\u2008:rocket:\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000', '\u2008\u3000\u3000\u2002\u2002\u2002\u2002\u3000\u3000\u3000\u3000\u3000\u2008\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000*', '\u3000\u3000 \u2002\u2002\u3000\u3000\u3000\u3000\u3000 ✦ \u3000\u3000\u3000\u3000\u3000\u3000\u3000\u200a\u200a\u200a\u200a\u200a\u200a\u200a\u200a\u200a\u3000\u2008\u2008\u2008\u2008\u2008\u2008\u2008\u2008\u3000\u3000\u3000\u3000', '\u3000\u3000\u2008\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u2008\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u2002\u2002\u2002\u2002\u3000\u3000.', '\u3000\u2008\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000 \u3000\u3000\u3000\u3000\u3000\u200a\u200a\u200a\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u2002\u2002 \u3000', '', '\u3000˚\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000゚\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.', '\u3000\u3000\u2008\u3000', '\u200d \u200d \u200d \u200d \u200d \u200d \u200d \u200d \u200d \u200d ,\u3000 \u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000*', '.\u3000\u3000\u3000\u3000\u3000\u2008\u3000\u3000\u3000\u3000:full_moon: \u3000\u3000\u3000\u3000\u3000\u3000\u3000:earth_americas: \u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 ✦ \u3000\u3000\u3000\u3000\u2002\u2002 \u3000', '\u3000\u3000\u3000˚\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000*\u3000\u3000\u3000\u3000\u3000\u3000\u2008', '\u2008\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000.', '\u3000\u3000\u2008\u3000\u3000\u3000\u3000\u3000\u3000\u3000 ✦ \u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 \u3000 \u200d \u200d \u200d \u200d \u3000\u3000\u3000\u3000 \u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000,', '']))
@commands.command()
async def cat(self, ctx, http_err_code: int):
await self.send_asset(ctx, f"https://http.cat/{http_err_code}.jpg")
@staticmethod
async def send_asset(ctx, url: str):
url = str(url)
filename = os.path.basename(urlparse(url).path)
with open(filename, 'wb') as file:
file.write(requests.get(url).content)
await ctx.send(file=File(filename))
os.remove(filename)
@commands.command()
async def asciify(self, ctx, emoji: PartialEmoji, treshold: int = 127, size: int = 60, inverted: bool = False):
if size < 0 or size > 300: return
if treshold < 0 or treshold > 255: return
response = requests.get(emoji.url)
img = Image.open(BytesIO(response.content)).convert('L')
img = img.resize((size, size))
asciiXDots = 2
asciiYDots = 4
ascii = ""
for y in range(0, img.height, asciiYDots):
line = ""
for x in range(0, img.width, asciiXDots):
c = self.chunk2braille( img.crop((x, y, x+asciiXDots, y+asciiYDots)), treshold, inverted )
line += c
ascii += line+"\n"
await ctx.send(ascii)
@staticmethod
def chunk2braille( slice: Image, treshold = 127, inverted = False ):
"""https://en.wikipedia.org/wiki/Braille_Patterns"""
dots = [ (1 + int(inverted) + int(slice.getpixel((x, y)) < treshold)) % 2
for y in range(slice.height)
for x in range(slice.width)]
dots = [ dots[ 0 ], dots[ 2 ], dots[ 4 ], dots[ 1 ], dots[ 3 ], dots[ 5 ], dots[ 6 ], dots[ 7 ] ]
return chr( 10240 + int( '0b' + ''.join(map(str, reversed(dots))), 2) )
def setup(bot):
bot.add_cog(Fun(bot))
| 64.558511 | 5,709 | 0.643981 | 1,877 | 12,137 | 4.27171 | 0.150773 | 0.841856 | 1.167373 | 1.436767 | 0.665253 | 0.644924 | 0.623472 | 0.607134 | 0.571589 | 0.547019 | 0 | 0.354447 | 0.166186 | 12,137 | 187 | 5,710 | 64.903743 | 0.413735 | 0.00379 | 0 | 0.176056 | 0 | 0.169014 | 0.540831 | 0.446849 | 0 | 0 | 0 | 0 | 0 | 1 | 0.021127 | false | 0 | 0.06338 | 0 | 0.126761 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
6b09cf57627914ab9ce433e77cd1c0e5b36e80bf | 29,048 | py | Python | Security-Admin-master/security-admin.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Security-Admin-master/security-admin.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Security-Admin-master/security-admin.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/env python3
import sys , urllib.request , os, time
def timebanner(s):
for c in s + '\n' :
sys.stdout.write(c)
sys.stdout.flush()
time.sleep( 0 / 100)
timebanner(" ")
timebanner("\033[1;1m███████╗███████╗ ██████╗██╗ ██╗██████╗ ██╗████████╗██╗ ██╗ █████╗ ██████╗ ███╗ ███╗██╗███╗ ██╗")
timebanner("██╔════╝██╔════╝██╔════╝██║ ██║██╔══██╗██║╚══██╔══╝╚██╗ ██╔╝ ██╔══██╗██╔══██╗████╗ ████║██║████╗ ██║")
timebanner("███████╗█████╗ ██║ ██║ ██║██████╔╝██║ ██║ ╚████╔╝█████╗███████║██║ ██║██╔████╔██║██║██╔██╗ ██║")
timebanner("╚════██║██╔══╝ ██║ ██║ ██║██╔══██╗██║ ██║ ╚██╔╝ ╚════╝██╔══██║██║ ██║██║╚██╔╝██║██║██║╚██╗██║")
timebanner("███████║███████╗╚██████╗╚██████╔╝██║ ██║██║ ██║ ██║ ██║ ██║██████╔╝██║ ╚═╝ ██║██║██║ ╚████║")
timebanner("╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝")
timebanner(" |AngelSecurityTeam|")
timebanner("HTTP y HTTPS [ http://www.example.com ] [ https://www.example.com ] ")
url = input("\nWebsite : ")
print("")
print ("-----------------------------------------------------------------------------------------------------------")
print(" ")
link = ('admin/','administrator/','wp-login.php','login.php','administration/','admin1/','admin2/','admin3/','admin4/','admin5/','moderator/','webadmin/','adminarea/','bb-admin/','adminLogin/','admin_area/','panel-administracion/','instadmin/',
'memberadmin/','administratorlogin/','adm/','account.asp','admin/account.asp','admin/index.asp','admin/login.asp','admin/admin.asp','/login.aspx',
'admin_area/admin.asp','admin_area/login.asp','admin/account.html','admin/index.html','admin/login.html','admin/admin.html',
'admin_area/admin.html','admin_area/login.html','admin_area/index.html','admin_area/index.asp','bb-admin/index.asp','bb-admin/login.asp','bb-admin/admin.asp',
'bb-admin/index.html','bb-admin/login.html','bb-admin/admin.html','admin/home.html','admin/controlpanel.html','admin.html','admin/cp.html','cp.html',
'administrator/index.html','administrator/login.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html','moderator.html',
'moderator/login.html','moderator/admin.html','account.html','controlpanel.html','admincontrol.html','admin_login.html','panel-administracion/login.html',
'admin/home.asp','admin/controlpanel.asp','admin.asp','pages/admin/admin-login.asp','admin/admin-login.asp','admin-login.asp','admin/cp.asp','cp.asp',
'administrator/account.asp','administrator.asp','acceso.asp','login.asp','modelsearch/login.asp','moderator.asp','moderator/login.asp','administrator/login.asp',
'moderator/admin.asp','controlpanel.asp','admin/account.html','adminpanel.html','webadmin.html','administration','pages/admin/admin-login.html','admin/admin-login.html',
'webadmin/index.html','webadmin/admin.html','webadmin/login.html','user.asp','user.html','admincp/index.asp','admincp/login.asp','admincp/index.html',
'admin/adminLogin.html','adminLogin.html','admin/adminLogin.html','home.html','adminarea/index.html','adminarea/admin.html','adminarea/login.html',
'panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html','admin/admin_login.html',
'admincontrol/login.html','adm/index.html','adm.html','admincontrol.asp','admin/account.asp','adminpanel.asp','webadmin.asp','webadmin/index.asp',
'webadmin/admin.asp','webadmin/login.asp','admin/admin_login.asp','admin_login.asp','panel-administracion/login.asp','adminLogin.asp',
'admin/adminLogin.asp','home.asp','admin.asp','adminarea/index.asp','adminarea/admin.asp','adminarea/login.asp','admin-login.html',
'panel-administracion/index.asp','panel-administracion/admin.asp','modelsearch/index.asp','modelsearch/admin.asp','administrator/index.asp',
'admincontrol/login.asp','adm/admloginuser.asp','admloginuser.asp','admin2.asp','admin2/login.asp','admin2/index.asp','adm/index.asp',
'adm.asp','affiliate.asp','adm_auth.asp','memberadmin.asp','administratorlogin.asp','siteadmin/login.asp','siteadmin/index.asp','siteadmin/login.html','memberadmin/','administratorlogin/','adm/','admin/account.php','admin/index.php','admin/login.php','admin/admin.php','admin/account.php',
'admin_area/admin.php','admin_area/login.php','siteadmin/login.php','siteadmin/index.php','siteadmin/login.html','admin/account.html','admin/index.html','admin/login.html','admin/admin.html',
'admin_area/index.php','bb-admin/index.php','bb-admin/login.php','bb-admin/admin.php','admin/home.php','admin_area/login.html','admin_area/index.html',
'admin/controlpanel.php','admin.php','admincp/index.asp','admincp/login.asp','admincp/index.html','admin/account.html','adminpanel.html','webadmin.html',
'webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html',
'admin/cp.php','cp.php','administrator/index.php','administrator/login.php','nsw/admin/login.php','webadmin/login.php','admin/admin_login.php','admin_login.php',
'administrator/account.php','administrator.php','admin_area/admin.html','pages/admin/admin-login.php','admin/admin-login.php','admin-login.php',
'bb-admin/index.html','bb-admin/login.html','acceso.php','bb-admin/admin.html','admin/home.html','login.php','modelsearch/login.php','moderator.php','moderator/login.php',
'moderator/admin.php','account.php','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.php','admincontrol.php',
'admin/adminLogin.html','adminLogin.html','admin/adminLogin.html','home.html','rcjakar/admin/login.php','adminarea/index.html','adminarea/admin.html',
'webadmin.php','webadmin/index.php','webadmin/admin.php','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.php','moderator.html',
'administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html',
'moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html',
'admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.php','account.html','controlpanel.html','admincontrol.html',
'panel-administracion/login.php','wp-login.php','adminLogin.php','admin/adminLogin.php','home.php','admin.php','adminarea/index.php',
'adminarea/admin.php','adminarea/login.php','panel-administracion/index.php','panel-administracion/admin.php','modelsearch/index.php',
'modelsearch/admin.php','admincontrol/login.php','adm/admloginuser.php','admloginuser.php','admin2.php','admin2/login.php','admin2/index.php','usuarios/login.php',
'adm/index.php','adm.php','affiliate.php','adm_auth.php','memberadmin.php','administratorlogin.php','adm/','admin/account.cfm','admin/index.cfm','admin/login.cfm','admin/admin.cfm','admin/account.cfm',
'admin_area/admin.cfm','admin_area/login.cfm','siteadmin/login.cfm','siteadmin/index.cfm','siteadmin/login.html','admin/account.html','admin/index.html','admin/login.html','admin/admin.html',
'admin_area/index.cfm','bb-admin/index.cfm','bb-admin/login.cfm','bb-admin/admin.cfm','admin/home.cfm','admin_area/login.html','admin_area/index.html',
'admin/controlpanel.cfm','admin.cfm','admincp/index.asp','admincp/login.asp','admincp/index.html','admin/account.html','adminpanel.html','webadmin.html',
'webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html',
'admin/cp.cfm','cp.cfm','administrator/index.cfm','administrator/login.cfm','nsw/admin/login.cfm','webadmin/login.cfm','admin/admin_login.cfm','admin_login.cfm',
'administrator/account.cfm','administrator.cfm','admin_area/admin.html','pages/admin/admin-login.cfm','admin/admin-login.cfm','admin-login.cfm',
'bb-admin/index.html','bb-admin/login.html','bb-admin/admin.html','admin/home.html','login.cfm','modelsearch/login.cfm','moderator.cfm','moderator/login.cfm',
'moderator/admin.cfm','account.cfm','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.cfm','admincontrol.cfm',
'admin/adminLogin.html','acceso.cfm','adminLogin.html','admin/adminLogin.html','home.html','rcjakar/admin/login.cfm','adminarea/index.html','adminarea/admin.html',
'webadmin.cfm','webadmin/index.cfm','webadmin/admin.cfm','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.cfm','moderator.html',
'administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html',
'moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html',
'admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.cfm','account.html','controlpanel.html','admincontrol.html',
'panel-administracion/login.cfm','wp-login.cfm','adminLogin.cfm','admin/adminLogin.cfm','home.cfm','admin.cfm','adminarea/index.cfm',
'adminarea/admin.cfm','adminarea/login.cfm','panel-administracion/index.cfm','panel-administracion/admin.cfm','modelsearch/index.cfm',
'modelsearch/admin.cfm','admincontrol/login.cfm','adm/admloginuser.cfm','admloginuser.cfm','admin2.cfm','admin2/login.cfm','admin2/index.cfm','usuarios/login.cfm',
'adm/index.cfm','adm.cfm','affiliate.cfm','adm_auth.cfm','memberadmin.cfm','administratorlogin.cfm','adminLogin/','admin_area/','panel-administracion/','instadmin/','login.aspx',
'memberadmin/','administratorlogin/','adm/','admin/account.aspx','admin/index.aspx','admin/login.aspx','admin/admin.aspx','admin/account.aspx',
'admin_area/admin.aspx','admin_area/login.aspx','siteadmin/login.aspx','siteadmin/index.aspx','siteadmin/login.html','admin/account.html','admin/index.html','admin/login.html','admin/admin.html',
'admin_area/index.aspx','bb-admin/index.aspx','bb-admin/login.aspx','bb-admin/admin.aspx','admin/home.aspx','admin_area/login.html','admin_area/index.html',
'admin/controlpanel.aspx','admin.aspx','admincp/index.asp','admincp/login.asp','admincp/index.html','admin/account.html','adminpanel.html','webadmin.html',
'webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html',
'admin/cp.aspx','cp.aspx','administrator/index.aspx','administrator/login.aspx','nsw/admin/login.aspx','webadmin/login.aspx','admin/admin_login.aspx','admin_login.aspx',
'administrator/account.aspx','administrator.aspx','admin_area/admin.html','pages/admin/admin-login.aspx','admin/admin-login.aspx','admin-login.aspx',
'bb-admin/index.html','bb-admin/login.html','bb-admin/admin.html','admin/home.html','login.aspx','modelsearch/login.aspx','moderator.aspx','moderator/login.aspx',
'moderator/admin.aspx','acceso.aspx','account.aspx','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.aspx','admincontrol.aspx',
'admin/adminLogin.html','adminLogin.html','admin/adminLogin.html','home.html','rcjakar/admin/login.aspx','adminarea/index.html','adminarea/admin.html',
'webadmin.aspx','webadmin/index.aspx','webadmin/admin.aspx','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.aspx','moderator.html',
'administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html',
'moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html',
'admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.aspx','account.html','controlpanel.html','admincontrol.html',
'panel-administracion/login.aspx','wp-login.aspx','adminLogin.aspx','admin/adminLogin.aspx','home.aspx','admin.aspx','adminarea/index.aspx',
'adminarea/admin.aspx','adminarea/login.aspx','panel-administracion/index.aspx','panel-administracion/admin.aspx','modelsearch/index.aspx',
'modelsearch/admin.aspx','admincontrol/login.aspx','adm/admloginuser.aspx','admloginuser.aspx','admin2.aspx','admin2/login.aspx','admin2/index.aspx','usuarios/login.aspx',
'adm/index.aspx','adm.aspx','affiliate.aspx','adm_auth.aspx','memberadmin.aspx','administratorlogin.aspx','memberadmin/','administratorlogin/','adm/','admin/account.js','admin/index.js','admin/login.js','admin/admin.js','admin/account.js',
'admin_area/admin.js','admin_area/login.js','siteadmin/login.js','siteadmin/index.js','siteadmin/login.html','admin/account.html','admin/index.html','admin/login.html','admin/admin.html',
'admin_area/index.js','bb-admin/index.js','bb-admin/login.js','bb-admin/admin.js','admin/home.js','admin_area/login.html','admin_area/index.html',
'admin/controlpanel.js','admin.js','admincp/index.asp','admincp/login.asp','admincp/index.html','admin/account.html','adminpanel.html','webadmin.html',
'webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html',
'admin/cp.js','cp.js','administrator/index.js','administrator/login.js','nsw/admin/login.js','webadmin/login.js','admin/admin_login.js','admin_login.js',
'administrator/account.js','administrator.js','admin_area/admin.html','pages/admin/admin-login.js','admin/admin-login.js','admin-login.js',
'bb-admin/index.html','bb-admin/login.html','bb-admin/admin.html','admin/home.html','login.js','modelsearch/login.js','moderator.js','moderator/login.js',
'moderator/admin.js','account.js','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.js','admincontrol.js',
'admin/adminLogin.html','adminLogin.html','admin/adminLogin.html','home.html','rcjakar/admin/login.js','adminarea/index.html','adminarea/admin.html',
'webadmin.js','webadmin/index.js','acceso.js','webadmin/admin.js','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.js','moderator.html',
'administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html',
'moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html',
'admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.js','account.html','controlpanel.html','admincontrol.html',
'panel-administracion/login.js','wp-login.js','adminLogin.js','admin/adminLogin.js','home.js','admin.js','adminarea/index.js',
'adminarea/admin.js','adminarea/login.js','panel-administracion/index.js','panel-administracion/admin.js','modelsearch/index.js',
'modelsearch/admin.js','admincontrol/login.js','adm/admloginuser.js','admloginuser.js','admin2.js','admin2/login.js','admin2/index.js','usuarios/login.js',
'adm/index.js','adm.js','affiliate.js','adm_auth.js','memberadmin.js','administratorlogin.js','bb-admin/index.cgi','bb-admin/login.cgi','bb-admin/admin.cgi','admin/home.cgi','admin_area/login.html','admin_area/index.html',
'admin/controlpanel.cgi','admin.cgi','admincp/index.asp','admincp/login.asp','admincp/index.html','admin/account.html','adminpanel.html','webadmin.html',
'webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html',
'admin/cp.cgi','cp.cgi','administrator/index.cgi','administrator/login.cgi','nsw/admin/login.cgi','webadmin/login.cgi','admin/admin_login.cgi','admin_login.cgi',
'administrator/account.cgi','administrator.cgi','admin_area/admin.html','pages/admin/admin-login.cgi','admin/admin-login.cgi','admin-login.cgi',
'bb-admin/index.html','bb-admin/login.html','bb-admin/admin.html','admin/home.html','login.cgi','modelsearch/login.cgi','moderator.cgi','moderator/login.cgi',
'moderator/admin.cgi','account.cgi','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.cgi','admincontrol.cgi',
'admin/adminLogin.html','adminLogin.html','admin/adminLogin.html','home.html','rcjakar/admin/login.cgi','adminarea/index.html','adminarea/admin.html',
'webadmin.cgi','webadmin/index.cgi','acceso.cgi','webadmin/admin.cgi','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.cgi','moderator.html',
'administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html',
'moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html',
'admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.cgi','account.html','controlpanel.html','admincontrol.html',
'panel-administracion/login.cgi','wp-login.cgi','adminLogin.cgi','admin/adminLogin.cgi','home.cgi','admin.cgi','adminarea/index.cgi',
'adminarea/admin.cgi','adminarea/login.cgi','panel-administracion/index.cgi','panel-administracion/admin.cgi','modelsearch/index.cgi',
'modelsearch/admin.cgi','admincontrol/login.cgi','adm/admloginuser.cgi','admloginuser.cgi','admin2.cgi','admin2/login.cgi','admin2/index.cgi','usuarios/login.cgi',
'adm/index.cgi','adm.cgi','affiliate.cgi','adm_auth.cgi','memberadmin.cgi','administratorlogin.cgi','admin_area/admin.brf','admin_area/login.brf','siteadmin/login.brf','siteadmin/index.brf','siteadmin/login.html','admin/account.html','admin/index.html','admin/login.html','admin/admin.html',
'admin_area/index.brf','bb-admin/index.brf','bb-admin/login.brf','bb-admin/admin.brf','admin/home.brf','admin_area/login.html','admin_area/index.html',
'admin/controlpanel.brf','admin.brf','admincp/index.asp','admincp/login.asp','admincp/index.html','admin/account.html','adminpanel.html','webadmin.html',
'webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html',
'admin/cp.brf','cp.brf','administrator/index.brf','administrator/login.brf','nsw/admin/login.brf','webadmin/login.brfbrf','admin/admin_login.brf','admin_login.brf',
'administrator/account.brf','administrator.brf','acceso.brf','admin_area/admin.html','pages/admin/admin-login.brf','admin/admin-login.brf','admin-login.brf',
'bb-admin/index.html','bb-admin/login.html','bb-admin/admin.html','admin/home.html','login.brf','modelsearch/login.brf','moderator.brf','moderator/login.brf',
'moderator/admin.brf','account.brf','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.brf','admincontrol.brf',
'admin/adminLogin.html','adminLogin.html','admin/adminLogin.html','home.html','rcjakar/admin/login.brf','adminarea/index.html','adminarea/admin.html',
'webadmin.brf','webadmin/index.brf','webadmin/admin.brf','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.brf','moderator.html',
'administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html',
'moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html',
'admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.brf','account.html','controlpanel.html','admincontrol.html',
'panel-administracion/login.brf','wp-login.brf','adminLogin.brf','admin/adminLogin.brf','home.brf','admin.brf','adminarea/index.brf',
'adminarea/admin.brf','adminarea/login.brf','panel-administracion/index.brf','panel-administracion/admin.brf','modelsearch/index.brf',
'modelsearch/admin.brf','admincontrol/login.brf','adm/admloginuser.brf','admloginuser.brf','admin2.brf','admin2/login.brf','admin2/index.brf','usuarios/login.brf',
'admindex.brf','adm.brf','affiliate.brf','adm_auth.brf','memberadmin.brf','administratorlogin.brf','cpanel','cpanel.php','cpanel.html','cpanel.html','admin','administrator','admin1','adm_cp','admin_panel.html','admin_panel','administratorlogin.cgi','memberadmin.cgi','adm_auth.cgi','affiliate.cgi','adm.cgi','adm/index.cgi','usuarios/login.cgi','admin2/index.cgi','admin2/login.cgi','admin2.cgi','admloginuser.cgi','adm/admloginuser.cgi','admincontrol/login.cgi','modelsearch/admin.cgi','modelsearch/index.cgi','panel-administracion/admin.cgi','panel-administracion/index.cgi','adminarea/login.cgi','adminarea/admin.cgi','adminarea/index.cgi','home.cgi','admin/adminLogin.cgi','adminLogin.cgi','wp-login.cgi','panel-administracion/login.cgi','user.cgi','adminpanel.cgi','webadmin/admin.cgi','acceso.cgi','webadmin/index.cgi','webadmin.cgi','rcjakar/admin/login.cgi','admincontrol.cgi','controlpanel.cgi','account.cgi','moderator/admin.cgi','moderator/login.cgi','moderator.cgi','modelsearch/login.cgi','login.cgi','admin-login.cgi','admin/admin-login.cgi','pages/admin/admin-login.cgi','administrator.cgi','administrator/account.cgi','admin_login.cgi','admin/admin_login.cgi','webadmin/login.cgi','nsw/admin/login.cgi','administrator/login.cgi','administrator/index.cgi','cp.cgi','admin/cp.cgi','admin.cgi','admin/controlpanel.cgi','admin/home.cgi','bb-admin/admin.cgi','bb-admin/login.cgi','bb-admin/index.cgi','bb-admin/index.cgi','admin_area/index.cgi','siteadmin/index.cgi','siteadmin/login.cgi','admin_area/login.cgi','admin2','admin3','admin4','admin5','usuarios','usuario','moderator','webadmin','adminarea','bb-admin','adminLogin','admin_area','panel-administracion','instadmin','memberadmin','administratorlogin','adm','admin/account.php','admin/index.php','admin/login.php','admin/admin.php','admin_area/admin.php','admin_area/login.php','siteadmin/login.php','siteadmin/index.php','siteadmin/login.html','admin/account.html','admin/index.html','admin/login.html','admin/admin.html','admin_area/index.php','bb-admin/index.php','bb-admin/login.php','admin/home.php','bb-admin/admin.php','admin_area/login.html','admin/controlpanel.php','admin_area/index.html','admin.php','admincp/index.asp','admincp/login.asp','admincp/index.html','adminpanel.html','webadmin.html','webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html','admin/cp.php','cp.php','administrator/index.php','administrator/login.php','nsw/admin/login.php','webadmin/login.php','admin/admin_login.php','admin_login.php','administrator/account.php','administrator.php','admin_area/admin.html','pages/admin/admin-login.php','admin/admin-login.php','admin-login.php','bb-admin/index.html','bb-admin/login.html','acceso.php','bb-admin/admin.html','admin/home.html','login.php','modelsearch/login.php','moderator.php','moderator/login.php','moderator/admin.php','account.php','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.php','admincontrol.php','admin/adminLogin.html','adminLogin.html','rcjakar/admin/login.php','home.html','adminarea/index.html','adminarea/admin.html','webadmin.php','webadmin/index.php','webadmin/admin.php','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.php','moderator.html','administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html','moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html','admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.php','account.html','controlpanel.html','admincontrol.html','panel-administracion/login.php','wp-login.php','adminLogin.php','admin/adminLogin.php','home.php','adminarea/index.php','adminarea/admin.php','adminarea/login.php','panel-administracion/index.php','panel-administracion/admin.php','modelsearch/index.php','modelsearch/admin.php','admincontrol/login.php','adm/admloginuser.php','admloginuser.php','admin2.php','admin2/login.php','admin2/index.php','usuarios/login.php','adm/index.php','adm.php','affiliate.php','adm_auth.php','memberadmin.php','administratorlogin.php','account.asp','admin/account.asp','admin/index.asp','admin/login.asp','admin/admin.asp','admin_area/admin.asp','admin_area/login.asp','admin_area/index.asp','bb-admin/index.asp','bb-admin/login.asp','bb-admin/admin.asp','admin/home.asp','admin/controlpanel.asp','admin.asp','pages/admin/admin-login.asp','admin/admin-login.asp','admin-login.asp','admin/cp.asp','cp.asp','administrator/account.asp','administrator.asp','acceso.asp','login.asp','modelsearch/login.asp','moderator.asp','moderator/login.asp','administrator/login.asp','moderator/admin.asp','controlpanel.asp','user.asp','admincontrol.asp','adminpanel.asp','webadmin.asp','webadmin/index.asp','webadmin/admin.asp','webadmin/login.asp','admin/admin_login.asp','admin_login.asp','panel-administracion/login.asp','adminLogin.asp','admin/adminLogin.asp','home.asp','adminarea/index.asp','adminarea/admin.asp','adminarea/login.asp','panel-administracion/index.asp','panel-administracion/admin.asp','modelsearch/index.asp','modelsearch/admin.asp','administrator/index.asp','admincontrol/login.asp','adm/admloginuser.asp','admloginuser.asp','admin2.asp','admin2/login.asp','admin2/index.asp','adm/index.asp','adm.asp','affiliate.asp','adm_auth.asp','memberadmin.asp','administratorlogin.asp','siteadmin/login.asp','siteadmin/index.asp','admin/account.cfm','admin/index.cfm','admin/login.cfm','admin/admin.cfm','admin_area/admin.cfm','admin_area/login.cfm','siteadmin/login.cfm','siteadmin/index.cfm','admin_area/index.cfm','bb-admin/index.cfm','bb-admin/login.cfm','bb-admin/admin.cfm','admin/home.cfm','admin/controlpanel.cfm','admin.cfm','admin/cp.cfm','cp.cfm','administrator/index.cfm','administrator/login.cfm','nsw/admin/login.cfm','webadmin/login.cfm','admin/admin_login.cfm','admin_login.cfm','administrator/account.cfm','administrator.cfm','pages/admin/admin-login.cfm','admin/admin-login.cfm','admin-login.cfm','login.cfm','modelsearch/login.cfm','moderator.cfm','moderator/login.cfm','moderator/admin.cfm','account.cfm','controlpanel.cfm','admincontrol.cfm','acceso.cfm','rcjakar/admin/login.cfm','webadmin.cfm','webadmin/index.cfm','webadmin/admin.cfm','adminpanel.cfm','user.cfm','panel-administracion/login.cfm','wp-login.cfm','adminLogin.cfm','admin/adminLogin.cfm','home.cfm','adminarea/index.cfm','adminarea/admin.cfm','adminarea/login.cfm','panel-administracion/index.cfm','panel-administracion/admin.cfm','modelsearch/index.cfm','modelsearch/admin.cfm','admincontrol/login.cfm','adm/admloginuser.cfm','admin2.cfm','admin2/login.cfm','admin2/index.cfm','usuarios/login.cfm','adm/index.cfm','adm.cfm','affiliate.cfm','adm_auth.cfm','memberadmin.cfm','administratorlogin.cfm','admin/account.js','admin/index.js','admin/login.js','admin/admin.js','admin_area/admin.js','admin_area/login.js','siteadmin/login.js','siteadmin/index.js','admin_area/index.js','bb-admin/index.js','bb-admin/login.js','bb-admin/admin.js','admin/home.js','admin/controlpanel.js','admin.js','admin/cp.js','cp.js','administrator/index.js','administrator/login.js','nsw/admin/login.js','webadmin/login.js','admin/admin_login.js','admin_login.js','administrator/account.js','administrator.js','pages/admin/admin-login.js','admin/admin-login.js','admin-login.js','login.js','modelsearch/login.js','moderator.js','moderator/login.js','moderator/admin.js','account.js','controlpanel.js','admincontrol.js','rcjakar/admin/login.js','webadmin.js','webadmin/index.js','acceso.js','webadmin/admin.js','adminpanel.js','user.js','panel-administracion/login.js','wp-login.js','adminLogin.js','admin/adminLogin.js','home.js','adminarea/index.js','adminarea/admin.js','adminarea/login.js','panel-administracion/index.js','panel-administracion/admin.js','modelsearch/index.js','modelsearch/admin.js','admincontrol/login.js','adm/admloginuser.js','admloginuser.js','admin2.js','admin2/login.js','admin2/index.js','usuarios/login.js','adm/index.js','adm.js','affiliate.js','adm_auth.js','memberadmin.js','administratorlogin.js','admin/account.cgi','admin/index.cgi','admin/login.cgi','admin/admin.cgi',)
for link2 in link :
link3 = url+"/"+link2
try :
openurl = urllib.request.urlopen(link3)
print("\n\033[1;34m" + "ADMIN PAGE ITS FOUND : "+link3)
except urllib.error.URLError as msg :
print ("\n\033[33;39mADMIN PAGE NOT FOUND : "+link3)
print ("-----------------------------------------------------------------------------------------------------------")
| 101.566434 | 8,335 | 0.721736 | 3,944 | 29,048 | 5.416329 | 0.036258 | 0.073495 | 0.042131 | 0.025793 | 0.798942 | 0.769919 | 0.750211 | 0.731579 | 0.715944 | 0.684018 | 0 | 0.002659 | 0.028952 | 29,048 | 285 | 8,336 | 101.922807 | 0.736555 | 0.000723 | 0 | 0.150685 | 0 | 0.006849 | 0.830152 | 0.294253 | 0 | 0 | 0 | 0 | 0 | 1 | 0.006849 | false | 0 | 0.006849 | 0 | 0.013699 | 0.041096 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
862f52700a0ab8e10e12ce8a215c4417d60b450e | 28,065 | py | Python | fairseq/models/wav2vec/lsqplus_quantize_V2.py | ghostchoir/fairseq_old | 17ea4e97827c33f77cb188bc6e5aed42209dccc1 | [
"MIT"
] | null | null | null | fairseq/models/wav2vec/lsqplus_quantize_V2.py | ghostchoir/fairseq_old | 17ea4e97827c33f77cb188bc6e5aed42209dccc1 | [
"MIT"
] | null | null | null | fairseq/models/wav2vec/lsqplus_quantize_V2.py | ghostchoir/fairseq_old | 17ea4e97827c33f77cb188bc6e5aed42209dccc1 | [
"MIT"
] | null | null | null | import copy
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Function
from .lsqquantize_V1 import Round
class ALSQPlus(Function):
@staticmethod
def forward(ctx, weight, alpha, g, Qn, Qp, beta):
# assert alpha > 0, "alpha={}".format(alpha)
ctx.save_for_backward(weight, alpha, beta)
ctx.other = g, Qn, Qp
w_q = Round.apply(torch.div((weight - beta), alpha)).clamp(Qn, Qp)
w_q = w_q * alpha + beta
return w_q
@staticmethod
def backward(ctx, grad_weight):
weight, alpha, beta = ctx.saved_tensors
g, Qn, Qp = ctx.other
q_w = (weight - beta) / alpha
smaller = (q_w < Qn).float() # bool值转浮点值,1.0或者0.0
bigger = (q_w > Qp).float() # bool值转浮点值,1.0或者0.0
between = 1.0 - smaller - bigger # 得到位于量化区间的index
grad_alpha = ((smaller * Qn + bigger * Qp +
between * Round.apply(q_w) - between * q_w) * grad_weight * g).sum().unsqueeze(dim=0)
grad_beta = ((smaller + bigger) * grad_weight * g).sum().unsqueeze(dim=0)
# 在量化区间之外的值都是常数,故导数也是0
grad_weight = between * grad_weight
# 返回的梯度要和forward的参数对应起来
return grad_weight, grad_alpha, None, None, None, grad_beta
class WLSQPlus(Function):
@staticmethod
def forward(ctx, weight, alpha, g, Qn, Qp, per_channel):
# assert alpha > 0, "alpha={}".format(alpha)
ctx.save_for_backward(weight, alpha)
ctx.other = g, Qn, Qp, per_channel
if per_channel:
sizes = weight.size()
weight = weight.contiguous().view(weight.size()[0], -1)
weight = torch.transpose(weight, 0, 1)
alpha = torch.broadcast_to(alpha, weight.size())
w_q = Round.apply(torch.div(weight, alpha)).clamp(Qn, Qp)
w_q = w_q * alpha
w_q = torch.transpose(w_q, 0, 1)
w_q = w_q.contiguous().view(sizes)
else:
w_q = Round.apply(torch.div(weight, alpha)).clamp(Qn, Qp)
w_q = w_q * alpha
return w_q
@staticmethod
def backward(ctx, grad_weight):
weight, alpha = ctx.saved_tensors
g, Qn, Qp, per_channel = ctx.other
if per_channel:
sizes = weight.size()
weight = weight.contiguous().view(weight.size()[0], -1)
weight = torch.transpose(weight, 0, 1)
alpha = torch.broadcast_to(alpha, weight.size())
q_w = weight / alpha
q_w = torch.transpose(q_w, 0, 1)
q_w = q_w.contiguous().view(sizes)
else:
q_w = weight / alpha
smaller = (q_w < Qn).float() # bool值转浮点值,1.0或者0.0
bigger = (q_w > Qp).float() # bool值转浮点值,1.0或者0.0
between = 1.0 - smaller - bigger # 得到位于量化区间的index
if per_channel:
grad_alpha = ((smaller * Qn + bigger * Qp +
between * Round.apply(q_w) - between * q_w) * grad_weight * g)
grad_alpha = grad_alpha.contiguous().view(grad_alpha.size()[0], -1).sum(dim=1)
else:
grad_alpha = ((smaller * Qn + bigger * Qp +
between * Round.apply(q_w) - between * q_w) * grad_weight * g).sum().unsqueeze(dim=0)
# 在量化区间之外的值都是常数,故导数也是0
grad_weight = between * grad_weight
return grad_weight, grad_alpha, None, None, None, None
def grad_scale(x, scale):
y = x
y_grad = x * scale
return (y - y_grad).detach() + y_grad
def round_pass(x):
y = x.round()
y_grad = x
return (y - y_grad).detach() + y_grad
def get_percentile_min_max(input, lower_percentile, uppper_percentile, output_tensor):
batch_size = input.shape[0]
lower_index = round(batch_size * (1 - lower_percentile * 0.01))
upper_index = round(batch_size * (1 - uppper_percentile * 0.01))
upper_bound = torch.kthvalue(input, k=upper_index).values
if lower_percentile == 0:
lower_bound = upper_bound * 0
else:
low_bound = -torch.kthvalue(-input, k=lower_index).values
# def update_scale_betas():
# for m in model.modules():
# if isinstance(m, nn.)
# A(特征)量化
class LSQPlusActivationQuantizer(nn.Module):
def __init__(self, a_bits, all_positive=False, batch_init=20):
# activations 没有per-channel这个选项的
super(LSQPlusActivationQuantizer, self).__init__()
self.a_bits = a_bits
self.all_positive = all_positive
self.batch_init = batch_init
if self.all_positive:
# unsigned activation is quantized to [0, 2^b-1]
self.Qn = 0
self.Qp = 2 ** self.a_bits - 1
else:
# signed weight/activation is quantized to [-2^(b-1), 2^(b-1)-1]
self.Qn = - 2 ** (self.a_bits - 1)
self.Qp = 2 ** (self.a_bits - 1) - 1
self.s = torch.nn.Parameter(torch.ones(1), requires_grad=True)
self.beta = torch.nn.Parameter(torch.ones(0), requires_grad=True)
self.init_state = 0
# 量化/反量化
def forward(self, activation):
if self.init_state == 0:
self.g = 1.0 / math.sqrt(activation.numel() * self.Qp)
mina = torch.min(activation.detach())
self.s.data = (torch.max(activation.detach()) - mina) / (self.Qp - self.Qn)
self.beta.data = mina - self.s.data * self.Qn
self.init_state += 1
elif self.init_state < self.batch_init:
mina = torch.min(activation.detach())
self.s.data = self.s.data * 0.9 + 0.1 * (torch.max(activation.detach()) - mina) / (self.Qp - self.Qn)
self.beta.data = self.s.data * 0.9 + 0.1 * (mina - self.s.data * self.Qn)
self.init_state += 1
elif self.init_state == self.batch_init:
# self.s = torch.nn.Parameter(self.s)
# self.beta = torch.nn.Parameter(self.beta)
self.init_state += 1
if self.a_bits == 32:
q_a = activation
elif self.a_bits == 1:
print('!Binary quantization is not supported !')
assert self.a_bits != 1
else:
q_a = ALSQPlus.apply(activation, self.s, self.g, self.Qn, self.Qp, self.beta)
return q_a
# W(权重)量化
class LSQPlusWeightQuantizer(nn.Module):
def __init__(self, w_bits, all_positive=False, per_channel=False, batch_init=20):
super(LSQPlusWeightQuantizer, self).__init__()
self.w_bits = w_bits
self.all_positive = all_positive
self.batch_init = batch_init
if self.all_positive:
# unsigned activation is quantized to [0, 2^b-1]
self.Qn = 0
self.Qp = 2 ** w_bits - 1
else:
# signed weight/activation is quantized to [-2^(b-1), 2^(b-1)-1]
self.Qn = - 2 ** (w_bits - 1)
self.Qp = 2 ** (w_bits - 1) - 1
self.per_channel = per_channel
self.init_state = 0
self.s = torch.nn.Parameter(torch.ones(1), requires_grad=True)
# 量化/反量化
def forward(self, weight):
'''
For this work, each layer of weights and each layer of activations has a distinct step size, represented
as an fp32 value, initialized to 2h|v|i/√OP , computed on either the initial weights values or the first
batch of activations, respectively
'''
if self.init_state == 0:
self.g = 1.0 / math.sqrt(weight.numel() * self.Qp)
self.div = 2 ** self.w_bits - 1
if self.per_channel:
weight_tmp = weight.detach().contiguous().view(weight.size()[0], -1)
mean = torch.mean(weight_tmp, dim=1)
std = torch.std(weight_tmp, dim=1)
self.s.data, _ = torch.max(torch.stack([torch.abs(mean - 3 * std), torch.abs(mean + 3 * std)]), dim=0)
self.s.data = self.s.data / self.div
else:
mean = torch.mean(weight.detach())
std = torch.std(weight.detach())
self.s.data = max([torch.abs(mean - 3 * std), torch.abs(mean + 3 * std)]) / self.div
self.init_state += 1
elif self.init_state < self.batch_init:
self.div = 2 ** self.w_bits - 1
if self.per_channel:
weight_tmp = weight.detach().contiguous().view(weight.size()[0], -1)
mean = torch.mean(weight_tmp, dim=1)
std = torch.std(weight_tmp, dim=1)
self.s.data, _ = torch.max(torch.stack([torch.abs(mean - 3 * std), torch.abs(mean + 3 * std)]), dim=0)
self.s.data = self.s.data * 0.9 + 0.1 * self.s.data / self.div
else:
mean = torch.mean(weight.detach())
std = torch.std(weight.detach())
self.s.data = self.s.data * 0.9 + 0.1 * max(
[torch.abs(mean - 3 * std), torch.abs(mean + 3 * std)]) / self.div
self.init_state += 1
elif self.init_state == self.batch_init:
# self.s = torch.nn.Parameter(self.s)
self.init_state += 1
if self.w_bits == 32:
output = weight
elif self.w_bits == 1:
print('!Binary quantization is not supported !')
assert self.w_bits != 1
else:
w_q = WLSQPlus.apply(weight, self.s, self.g, self.Qn, self.Qp, self.per_channel)
# alpha = grad_scale(self.s, g)
# w_q = Round.apply((weight/alpha).clamp(Qn, Qp)) * alpha
return w_q
class QuantConv1d(nn.Conv1d):
def __init__(self,
in_channels,
out_channels,
kernel_size,
stride=1,
padding=0,
dilation=1,
groups=1,
bias=True,
padding_mode='zeros',
a_bits=8,
w_bits=8,
quant_inference=False,
all_positive=False,
per_channel=False,
batch_init=20):
super(QuantConv1d, self).__init__(in_channels, out_channels, kernel_size, stride, padding, dilation, groups,
bias, padding_mode)
self.quant_inference = quant_inference
self.activation_quantizer = LSQPlusActivationQuantizer(a_bits=a_bits, all_positive=all_positive,
batch_init=batch_init)
self.weight_quantizer = LSQPlusWeightQuantizer(w_bits=w_bits, all_positive=all_positive,
per_channel=per_channel, batch_init=batch_init)
def forward(self, input):
quant_input = self.activation_quantizer(input)
if not self.quant_inference:
quant_weight = self.weight_quantizer(self.weight)
else:
quant_weight = self.weight
output = F.conv1d(quant_input, quant_weight, self.bias, self.stride, self.padding, self.dilation, self.groups)
return output
class QuantConv2d(nn.Conv2d):
def __init__(self,
in_channels,
out_channels,
kernel_size,
stride=1,
padding=0,
dilation=1,
groups=1,
bias=True,
padding_mode='zeros',
a_bits=8,
w_bits=8,
quant_inference=False,
all_positive=False,
per_channel=False,
batch_init=20):
super(QuantConv2d, self).__init__(in_channels, out_channels, kernel_size, stride, padding, dilation, groups,
bias, padding_mode)
self.quant_inference = quant_inference
self.activation_quantizer = LSQPlusActivationQuantizer(a_bits=a_bits, all_positive=all_positive,
batch_init=batch_init)
self.weight_quantizer = LSQPlusWeightQuantizer(w_bits=w_bits, all_positive=all_positive,
per_channel=per_channel, batch_init=batch_init)
def forward(self, input):
quant_input = self.activation_quantizer(input)
if not self.quant_inference:
quant_weight = self.weight_quantizer(self.weight)
else:
quant_weight = self.weight
output = F.conv2d(quant_input, quant_weight, self.bias, self.stride, self.padding, self.dilation,
self.groups)
return output
class QuantConvTranspose2d(nn.ConvTranspose2d):
def __init__(self,
in_channels,
out_channels,
kernel_size,
stride=1,
padding=0,
output_padding=0,
dilation=1,
groups=1,
bias=True,
padding_mode='zeros',
a_bits=8,
w_bits=8,
quant_inference=False,
all_positive=False,
per_channel=False,
batch_init=20):
super(QuantConvTranspose2d, self).__init__(in_channels, out_channels, kernel_size, stride, padding,
output_padding,
dilation, groups, bias, padding_mode)
self.quant_inference = quant_inference
self.activation_quantizer = LSQPlusActivationQuantizer(a_bits=a_bits, all_positive=all_positive,
batch_init=batch_init)
self.weight_quantizer = LSQPlusWeightQuantizer(w_bits=w_bits, all_positive=all_positive,
per_channel=per_channel, batch_init=batch_init)
def forward(self, input):
quant_input = self.activation_quantizer(input)
if not self.quant_inference:
quant_weight = self.weight_quantizer(self.weight)
else:
quant_weight = self.weight
output = F.conv_transpose2d(quant_input, quant_weight, self.bias, self.stride, self.padding,
self.output_padding,
self.groups, self.dilation)
return output
class QuantLinear(nn.Linear):
def __init__(self,
in_features,
out_features,
bias=True,
a_bits=8,
w_bits=8,
quant_inference=False,
all_positive=False,
per_channel=False,
batch_init=20):
super(QuantLinear, self).__init__(in_features, out_features, bias)
self.quant_inference = quant_inference
self.activation_quantizer = LSQPlusActivationQuantizer(a_bits=a_bits, all_positive=all_positive,
batch_init=batch_init)
self.weight_quantizer = LSQPlusWeightQuantizer(w_bits=w_bits, all_positive=all_positive,
per_channel=per_channel, batch_init=batch_init)
def forward(self, input):
quant_input = self.activation_quantizer(input)
if not self.quant_inference:
quant_weight = self.weight_quantizer(self.weight)
else:
quant_weight = self.weight
output = F.linear(quant_input, quant_weight, self.bias)
return output
def add_quant_op(module, layer_counter, a_bits=8, w_bits=8,
quant_inference=False, all_positive=False, per_channel=False, batch_init=20):
for name, child in module.named_children():
if isinstance(child, nn.Conv2d):
layer_counter[0] += 1
if layer_counter[0] >= 1: # 第一层也量化
if child.bias is not None:
quant_conv = QuantConv2d(child.in_channels, child.out_channels,
child.kernel_size, stride=child.stride,
padding=child.padding, dilation=child.dilation,
groups=child.groups, bias=True, padding_mode=child.padding_mode,
a_bits=a_bits, w_bits=w_bits, quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel, batch_init=batch_init)
quant_conv.bias.data = child.bias
else:
quant_conv = QuantConv2d(child.in_channels, child.out_channels,
child.kernel_size, stride=child.stride,
padding=child.padding, dilation=child.dilation,
groups=child.groups, bias=False, padding_mode=child.padding_mode,
a_bits=a_bits, w_bits=w_bits, quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel, batch_init=batch_init)
quant_conv.weight.data = child.weight
module._modules[name] = quant_conv
elif isinstance(child, nn.ConvTranspose2d):
layer_counter[0] += 1
if layer_counter[0] >= 1: # 第一层也量化
if child.bias is not None:
quant_conv_transpose = QuantConvTranspose2d(child.in_channels,
child.out_channels,
child.kernel_size,
stride=child.stride,
padding=child.padding,
output_padding=child.output_padding,
dilation=child.dilation,
groups=child.groups,
bias=True,
padding_mode=child.padding_mode,
a_bits=a_bits,
w_bits=w_bits,
quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel,
batch_init=batch_init)
quant_conv_transpose.bias.data = child.bias
else:
quant_conv_transpose = QuantConvTranspose2d(child.in_channels,
child.out_channels,
child.kernel_size,
stride=child.stride,
padding=child.padding,
output_padding=child.output_padding,
dilation=child.dilation,
groups=child.groups, bias=False,
padding_mode=child.padding_mode,
a_bits=a_bits,
w_bits=w_bits,
quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel,
batch_init=batch_init)
quant_conv_transpose.weight.data = child.weight
module._modules[name] = quant_conv_transpose
elif isinstance(child, nn.Linear):
layer_counter[0] += 1
if layer_counter[0] >= 1: # 第一层也量化
if child.bias is not None:
quant_linear = QuantLinear(child.in_features, child.out_features,
bias=True, a_bits=a_bits, w_bits=w_bits,
quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel,
batch_init=batch_init)
quant_linear.bias.data = child.bias
else:
quant_linear = QuantLinear(child.in_features, child.out_features,
bias=False, a_bits=a_bits, w_bits=w_bits,
quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel,
batch_init=batch_init)
quant_linear.weight.data = child.weight
module._modules[name] = quant_linear
else:
add_quant_op(child, layer_counter, a_bits=a_bits, w_bits=w_bits,
quant_inference=quant_inference, all_positive=all_positive,
per_channel=per_channel, batch_init=batch_init)
def prepare(model, inplace=False, a_bits=8, w_bits=8, quant_inference=False,
all_positive=False, per_channel=False, batch_init=20):
if not inplace:
model = copy.deepcopy(model)
layer_counter = [0]
add_quant_op(model, layer_counter, a_bits=a_bits, w_bits=w_bits,
quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel, batch_init=batch_init)
return model
def add_quant_ops(args, net, device, a_bits=8, w_bits=8, quant_inference=False, all_positive=False, per_channel=False,
batch_init=20):
for name, child in net.named_children():
if args.exclude_conv and 'extractor' in name:
continue
if isinstance(child, nn.Conv1d):
# print(name, 'conv1d')
if child.bias is not None:
quant_conv = QuantConv1d(child.in_channels, child.out_channels,
child.kernel_size, stride=child.stride,
padding=child.padding, dilation=child.dilation,
groups=child.groups, bias=True, padding_mode=child.padding_mode,
a_bits=a_bits, w_bits=w_bits, quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel, batch_init=batch_init)
quant_conv.bias.data = child.bias
else:
quant_conv = QuantConv1d(child.in_channels, child.out_channels,
child.kernel_size, stride=child.stride,
padding=child.padding, dilation=child.dilation,
groups=child.groups, bias=False, padding_mode=child.padding_mode,
a_bits=a_bits, w_bits=w_bits, quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel, batch_init=batch_init)
quant_conv.weight.data = child.weight
if args.fp16:
quant_conv = quant_conv.half()
elif args.bf16:
quant_conv = quant_conv.to(dtype=torch.bfloat16)
if not args.pipeline_model_parallel:
quant_conv = quant_conv.to(device)
quant_conv = quant_conv.to(device)
net._modules[name] = quant_conv
# setattr(net, name, quant_conv)
# names = name.split('.')
# p = net
# for n in names:
# p = getattr(p, n)
# p = quant_conv
elif isinstance(child, nn.Conv2d):
# print(name, 'conv2d')
if child.bias is not None:
quant_conv = QuantConv2d(child.in_channels, child.out_channels,
child.kernel_size, stride=child.stride,
padding=child.padding, dilation=child.dilation,
groups=child.groups, bias=True, padding_mode=child.padding_mode,
a_bits=a_bits, w_bits=w_bits, quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel, batch_init=batch_init)
quant_conv.bias.data = child.bias
else:
quant_conv = QuantConv2d(child.in_channels, child.out_channels,
child.kernel_size, stride=child.stride,
padding=child.padding, dilation=child.dilation,
groups=child.groups, bias=False, padding_mode=child.padding_mode,
a_bits=a_bits, w_bits=w_bits, quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel, batch_init=batch_init)
quant_conv.weight.data = child.weight
if args.fp16:
quant_conv = quant_conv.half()
elif args.bf16:
quant_conv = quant_conv.to(dtype=torch.bfloat16)
if not args.pipeline_model_parallel:
quant_conv = quant_conv.to(device)
quant_conv = quant_conv.to(device)
net._modules[name] = quant_conv
# names = name.split('.')
# p = net
# for n in names:
# p = getattr(p, n)
# p = quant_conv
elif isinstance(child, nn.Linear):
# print(name, 'linear')
if child.bias is not None:
quant_linear = QuantLinear(child.in_features, child.out_features,
bias=True, a_bits=a_bits, w_bits=w_bits,
quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel,
batch_init=batch_init)
quant_linear.bias.data = child.bias
else:
quant_linear = QuantLinear(child.in_features, child.out_features,
bias=False, a_bits=a_bits, w_bits=w_bits,
quant_inference=quant_inference,
all_positive=all_positive, per_channel=per_channel,
batch_init=batch_init)
quant_linear.weight.data = child.weight
if args.fp16:
quant_linear = quant_linear.half()
elif args.bf16:
quant_linear = quant_linear.to(dtype=torch.bfloat16)
if not args.pipeline_model_parallel:
quant_linear = quant_linear.to(device)
quant_linear = quant_linear.to(device)
net._modules[name] = quant_linear
# names = name.split('.')
# p = net
# for n in names:
# p = getattr(p, n)
# p = quant_linear
else:
add_quant_ops(args, child, device, a_bits=a_bits, w_bits=w_bits,
quant_inference=quant_inference, all_positive=all_positive,
per_channel=per_channel, batch_init=batch_init)
| 49.150613 | 119 | 0.518261 | 3,053 | 28,065 | 4.525057 | 0.076318 | 0.041042 | 0.022801 | 0.039812 | 0.841983 | 0.807673 | 0.790807 | 0.785813 | 0.767354 | 0.756641 | 0 | 0.014976 | 0.395653 | 28,065 | 570 | 120 | 49.236842 | 0.799481 | 0.05163 | 0 | 0.718163 | 0 | 0 | 0.003842 | 0 | 0 | 0 | 0 | 0 | 0.004175 | 1 | 0.045929 | false | 0.002088 | 0.014614 | 0 | 0.104384 | 0.004175 | 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 |
86cfef05828cc56f206e06d2f3bc272b6b237868 | 29,867 | py | Python | sds/distributions/lingauss.py | hanyas/sds | 3c195fb9cbd88a9284287d62c0eacb6afc4598a7 | [
"MIT"
] | 12 | 2019-09-21T13:52:09.000Z | 2022-02-14T06:48:46.000Z | sds/distributions/lingauss.py | hanyas/sds | 3c195fb9cbd88a9284287d62c0eacb6afc4598a7 | [
"MIT"
] | 1 | 2020-01-22T12:34:52.000Z | 2020-01-26T21:14:11.000Z | sds/distributions/lingauss.py | hanyas/sds | 3c195fb9cbd88a9284287d62c0eacb6afc4598a7 | [
"MIT"
] | 5 | 2019-09-18T15:11:26.000Z | 2021-12-10T14:04:53.000Z | import numpy as np
import numpy.random as npr
import scipy as sc
from operator import add
from functools import reduce
from sds.utils.general import Statistics as Stats
from sds.utils.linalg import symmetrize
class LinearGaussianWithPrecision:
def __init__(self, column_dim, row_dim,
A=None, lmbda=None, affine=True):
self.column_dim = column_dim
self.row_dim = row_dim
self.A = A
self.affine = affine
self._lmbda = lmbda
self._lmbda_chol = None
self._lmbda_chol_inv = None
@property
def params(self):
return self.A, self.lmbda
@params.setter
def params(self, values):
self.A, self.lmbda = values
@property
def nb_params(self):
return self.column_dim * self.row_dim \
+ self.row_dim * (self.row_dim + 1) / 2
@property
def input_dim(self):
return self.column_dim - 1 if self.affine\
else self.column_dim
@property
def output_dim(self):
return self.row_dim
@property
def lmbda(self):
return self._lmbda
@lmbda.setter
def lmbda(self, value):
self._lmbda = value
self._lmbda_chol = None
self._lmbda_chol_inv = None
@property
def lmbda_chol(self):
if self._lmbda_chol is None:
self._lmbda_chol = sc.linalg.cholesky(self.lmbda, lower=False)
return self._lmbda_chol
@property
def lmbda_chol_inv(self):
if self._lmbda_chol_inv is None:
self._lmbda_chol_inv = sc.linalg.inv(self.lmbda_chol)
return self._lmbda_chol_inv
@property
def sigma(self):
return self.lmbda_chol_inv @ self.lmbda_chol_inv.T
def predict(self, x):
if self.affine:
A, b = self.A[:, :-1], self.A[:, -1]
y = np.einsum('dl,...l->...d', A, x, optimize=True) + b.T
else:
y = np.einsum('dl,...l->...d', self.A, x, optimize=True)
return y
def mean(self, x):
return self.predict(x)
def mode(self, x):
return self.predict(x)
def rvs(self, x):
return self.mean(x) + npr.normal(size=self.output_dim).dot(self.lmbda_chol_inv.T)
@property
def base(self):
return np.power(2. * np.pi, - self.output_dim / 2.)
def log_base(self):
return np.log(self.base)
def statistics(self, x, y):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
idx = np.logical_and(~np.isnan(x).any(axis=1),
~np.isnan(y).any(axis=1))
x, y = x[idx], y[idx]
if self.affine:
x = np.hstack((x, np.ones((x.shape[0], 1))))
contract = 'nd,nl->dl'
yxT = np.einsum(contract, y, x, optimize=True)
xxT = np.einsum(contract, x, x, optimize=True)
yyT = np.einsum(contract, y, y, optimize=True)
n = y.shape[0]
return Stats([yxT, xxT, yyT, n])
else:
stats = list(map(self.statistics, x, y))
return reduce(add, stats)
def weighted_statistics(self, x, y, weights):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
idx = np.logical_and(~np.isnan(x).any(axis=1),
~np.isnan(y).any(axis=1))
x, y, weights = x[idx], y[idx], weights[idx]
if self.affine:
x = np.hstack((x, np.ones((x.shape[0], 1))))
contract = 'nd,n,nl->dl'
yxT = np.einsum(contract, y, weights, x, optimize=True)
xxT = np.einsum(contract, x, weights, x, optimize=True)
yyT = np.einsum(contract, y, weights, y, optimize=True)
n = np.sum(weights)
return Stats([yxT, xxT, yyT, n])
else:
stats = list(map(self.weighted_statistics, x, y, weights))
return reduce(add, stats)
def log_partition(self, x):
mu = self.predict(x)
return 0.5 * np.einsum('nd,dl,nl->n', mu, self.lmbda, mu)\
- np.sum(np.log(np.diag(self.lmbda_chol)))
def log_likelihood(self, x, y):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
bads = np.logical_and(np.isnan(np.atleast_2d(x)).any(axis=1),
np.isnan(np.atleast_2d(y)).any(axis=1))
x = np.nan_to_num(x, copy=False).reshape((-1, self.input_dim))
y = np.nan_to_num(y, copy=False).reshape((-1, self.output_dim))
mu = self.mean(x)
log_lik = np.einsum('nd,dl,nl->n', mu, self.lmbda, y, optimize=True)\
- 0.5 * np.einsum('nd,dl,nl->n', y, self.lmbda, y, optimize=True)
log_lik[bads] = 0.
log_lik += - self.log_partition(x) + self.log_base()
return log_lik
else:
return list(map(self.log_likelihood, x, y))
# Max likelihood
def max_likelihood(self, x, y, weights=None):
yxT, xxT, yyT, n = self.statistics(x, y) if weights is None\
else self.weighted_statistics(x, y, weights)
self.A = np.linalg.solve(xxT, yxT.T).T
sigma = (yyT - self.A.dot(yxT.T)) / n
# numerical stabilization
sigma = symmetrize(sigma) + 1e-16 * np.eye(self.output_dim)
assert np.allclose(sigma, sigma.T)
assert np.all(np.linalg.eigvalsh(sigma) > 0.)
self.lmbda = np.linalg.inv(sigma)
class StackedLinearGaussiansWithPrecision:
def __init__(self, size, column_dim, row_dim,
As=None, lmbdas=None, affine=True):
self.size = size
self.column_dim = column_dim
self.row_dim = row_dim
self.affine = affine
As = [None] * self.size if As is None else As
lmbdas = [None] * self.size if lmbdas is None else lmbdas
self.dists = [LinearGaussianWithPrecision(column_dim, row_dim,
As[k], lmbdas[k], affine=affine)
for k in range(self.size)]
@property
def params(self):
return self.As, self.lmbdas
@params.setter
def params(self, values):
self.As, self.lmbdas = values
@property
def input_dim(self):
return self.column_dim - 1 if self.affine\
else self.column_dim
@property
def output_dim(self):
return self.row_dim
@property
def As(self):
return np.array([dist.A for dist in self.dists])
@As.setter
def As(self, value):
for k, dist in enumerate(self.dists):
dist.A = value[k]
@property
def lmbdas(self):
return np.array([dist.lmbda for dist in self.dists])
@lmbdas.setter
def lmbdas(self, value):
for k, dist in enumerate(self.dists):
dist.lmbda = value[k]
@property
def lmbdas_chol(self):
return np.array([dist.lmbda_chol for dist in self.dists])
@property
def lmbdas_chol_inv(self):
return np.array([dist.lmbda_chol_inv for dist in self.dists])
@property
def sigmas(self):
return np.array([dist.sigma for dist in self.dists])
def predict(self, x):
if self.affine:
As, bs = self.As[:, :, :-1], self.As[:, :, -1]
y = np.einsum('kdl,...l->...kd', As, x, optimize=True) + bs[None, ...]
else:
y = np.einsum('kdl,...l->...kd', self.As, x, optimize=True)
return y
def mean(self, x):
return self.predict(x)
def mode(self, x):
return self.predict(x)
def rvs(self, x):
return np.array([dist.rvs(x) for dist in self.dists])
@property
def base(self):
return np.array([dist.base for dist in self.dists])
def log_base(self):
return np.log(self.base)
def statistics(self, x, y):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
idx = np.logical_and(~np.isnan(x).any(axis=1),
~np.isnan(y).any(axis=1))
x, y = x[idx], y[idx]
if self.affine:
x = np.hstack((x, np.ones((x.shape[0], 1))))
contract = 'nd,nl->dl'
yxT = np.einsum(contract, y, x, optimize=True)
xxT = np.einsum(contract, x, x, optimize=True)
yyT = np.einsum(contract, y, y, optimize=True)
n = y.shape[0]
yxTk = np.array([yxT for _ in range(self.size)])
xxTk = np.array([xxT for _ in range(self.size)])
yyTk = np.array([yyT for _ in range(self.size)])
nk = np.array([n for _ in range(self.size)])
return Stats([yxTk, xxTk, yyTk, nk])
else:
stats = list(map(self.statistics, x, y))
return reduce(add, stats)
def weighted_statistics(self, x, y, weights):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
idx = np.logical_and(~np.isnan(x).any(axis=1),
~np.isnan(y).any(axis=1))
x, y, weights = x[idx], y[idx], weights[idx]
if self.affine:
x = np.hstack((x, np.ones((x.shape[0], 1))))
contract = 'nd,nk,nl->kdl'
yxTk = np.einsum(contract, y, weights, x, optimize=True)
xxTk = np.einsum(contract, x, weights, x, optimize=True)
yyTk = np.einsum(contract, y, weights, y, optimize=True)
nk = np.sum(weights, axis=0)
return Stats([yxTk, xxTk, yyTk, nk])
else:
stats = list(map(self.weighted_statistics, x, y, weights))
return reduce(add, stats)
def log_partition(self, x):
return np.array([dist.log_partition(x) for dist in self.dists]).T
def log_likelihood(self, x, y):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
bads = np.logical_and(np.isnan(np.atleast_2d(x)).any(axis=1),
np.isnan(np.atleast_2d(y)).any(axis=1))
x = np.nan_to_num(x, copy=False).reshape((-1, self.input_dim))
y = np.nan_to_num(y, copy=False).reshape((-1, self.output_dim))
mu = self.mean(x)
log_lik = np.einsum('nkd,kdl,nl->nk', mu, self.lmbdas, y, optimize=True)\
- 0.5 * np.einsum('nd,kdl,nl->nk', y, self.lmbdas, y, optimize=True)
log_lik[bads] = 0.
log_lik += - self.log_partition(x) + self.log_base()
return log_lik
else:
return list(map(self.log_likelihood, x, y))
# Max likelihood
def max_likelihood(self, x, y, weights):
yxTk, xxTk, yyTk, nk = self.weighted_statistics(x, y, weights)
As = np.zeros((self.size, self.column_dim, self.row_dim))
lmbdas = np.zeros((self.size, self.output_dim, self.output_dim))
for k in range(self.size):
As[k] = np.linalg.solve(xxTk[k], yxTk[k].T).T
sigma = (yyTk[k] - As[k].dot(yxTk[k].T)) / nk[k]
# numerical stabilization
sigma = symmetrize(sigma) + 1e-16 * np.eye(self.output_dim)
assert np.allclose(sigma, sigma.T)
assert np.all(np.linalg.eigvalsh(sigma) > 0.)
lmbdas[k] = np.linalg.inv(sigma)
self.As = As
self.lmbdas = lmbdas
class TiedLinearGaussiansWithPrecision(StackedLinearGaussiansWithPrecision):
def __init__(self, size, column_dim, row_dim,
As=None, lmbdas=None, affine=True):
super(TiedLinearGaussiansWithPrecision, self).__init__(size, column_dim, row_dim,
As, lmbdas, affine)
# Max likelihood
def max_likelihood(self, x, y, weights):
yxTk, xxTk, yyT, n = self.weighted_statistics(x, y, weights)
As = np.zeros((self.size, self.column_dim, self.row_dim))
sigma = np.zeros((self.output_dim, self.output_dim))
sigma = yyT
for k in range(self.size):
As[k] = np.linalg.solve(xxTk[k], yxTk[k].T).T
sigma -= As[k].dot(yxTk[k].T)
sigma /= n
# numerical stabilization
sigma = symmetrize(sigma) + 1e-16 * np.eye(self.output_dim)
assert np.allclose(sigma, sigma.T)
assert np.all(np.linalg.eigvalsh(sigma) > 0.)
self.As = As
lmbda = np.linalg.inv(sigma)
self.lmbdas = np.array(self.size * [lmbda])
class LinearGaussianWithDiagonalPrecision:
def __init__(self, column_dim, row_dim,
A=None, lmbda_diag=None, affine=True):
self.column_dim = column_dim
self.row_dim = row_dim
self.A = A
self.affine = affine
self._lmbda_diag = lmbda_diag
self._lmbda_chol = None
self._lmbda_chol_inv = None
@property
def params(self):
return self.A, self.lmbda_diag
@params.setter
def params(self, values):
self.A, self.lmbda_diag = values
@property
def nb_params(self):
return self.column_dim * self.row_dim + self.row_dim
@property
def input_dim(self):
return self.column_dim - 1 if self.affine\
else self.column_dim
@property
def output_dim(self):
return self.row_dim
@property
def lmbda_diag(self):
return self._lmbda_diag
@lmbda_diag.setter
def lmbda_diag(self, value):
self._lmbda_diag = value
self._lmbda_chol = None
self._lmbda_chol_inv = None
@property
def lmbda(self):
assert self._lmbda_diag is not None
return np.diag(self._lmbda_diag)
@property
def lmbda_chol(self):
if self._lmbda_chol is None:
self._lmbda_chol = np.diag(np.sqrt(self.lmbda_diag))
return self._lmbda_chol
@property
def lmbda_chol_inv(self):
if self._lmbda_chol_inv is None:
self._lmbda_chol_inv = np.diag(1. / np.sqrt(self.lmbda_diag))
return self._lmbda_chol_inv
@property
def sigma_diag(self):
return 1. / self.lmbda_diag
@property
def sigma(self):
return np.diag(self.sigma_diag)
def predict(self, x):
if self.affine:
A, b = self.A[:, :-1], self.A[:, -1]
y = np.einsum('dl,...l->...d', A, x, optimize=True) + b.T
else:
y = np.einsum('dl,...l->...d', self.A, x, optimize=True)
return y
def mean(self, x):
return self.predict(x)
def mode(self, x):
return self.predict(x)
def rvs(self, x):
return self.mean(x) + npr.normal(size=self.output_dim).dot(self.lmbda_chol_inv.T)
@property
def base(self):
return np.power(2. * np.pi, - self.output_dim / 2.)
def log_base(self):
return np.log(self.base)
def statistics(self, x, y):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
idx = np.logical_and(~np.isnan(x).any(axis=1),
~np.isnan(y).any(axis=1))
x, y = x[idx], y[idx]
if self.affine:
x = np.hstack((x, np.ones((x.shape[0], 1))))
xxT = np.einsum('nd,nl->dl', x, x, optimize=True)
yxT = np.einsum('nd,nl->dl', y, x, optimize=True)
yy = np.einsum('nd,nd->d', y, y, optimize=True)
nd = np.broadcast_to(y.shape[0], (self.output_dim, ))
return Stats([yxT, xxT, nd, yy])
else:
stats = list(map(self.statistics, x, y))
return reduce(add, stats)
def weighted_statistics(self, x, y, weights):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
idx = np.logical_and(~np.isnan(x).any(axis=1),
~np.isnan(y).any(axis=1))
x, y, weights = x[idx], y[idx], weights[idx]
if self.affine:
x = np.hstack((x, np.ones((x.shape[0], 1))))
xxT = np.einsum('nd,n,nl->dl', x, weights, x, optimize=True)
yxT = np.einsum('nd,n,nl->dl', y, weights, x, optimize=True)
yy = np.einsum('nd,n,nd->d', y, weights, y, optimize=True)
nd = np.broadcast_to(np.sum(weights), (self.output_dim, ))
return Stats([yxT, xxT, nd, yy])
else:
stats = list(map(self.weighted_statistics, x, y, weights))
return reduce(add, stats)
def log_partition(self, x):
mu = self.predict(x)
return 0.5 * np.einsum('nd,dl,nl->n', mu, self.lmbda, mu)\
- np.sum(np.log(np.diag(self.lmbda_chol)))
def log_likelihood(self, x, y):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
bads = np.logical_and(np.isnan(np.atleast_2d(x)).any(axis=1),
np.isnan(np.atleast_2d(y)).any(axis=1))
x = np.nan_to_num(x, copy=False).reshape((-1, self.input_dim))
y = np.nan_to_num(y, copy=False).reshape((-1, self.output_dim))
mu = self.mean(x)
log_lik = np.einsum('nd,dl,nl->n', mu, self.lmbda, y, optimize=True) \
- 0.5 * np.einsum('nd,dl,nl->n', y, self.lmbda, y, optimize=True)
log_lik[bads] = 0.
log_lik += - self.log_partition(x) + self.log_base()
return log_lik
else:
return list(map(self.log_likelihood, x, y))
# Max likelihood
def max_likelihood(self, x, y, weights=None):
yxT, xxT, nd, yy = self.statistics(x, y) if weights is None\
else self.weighted_statistics(x, y, weights)
self.A = np.linalg.solve(xxT, yxT.T).T
sigmas = (yy - np.einsum('dl,dl->d', self.A, yxT)) / nd
self.lmbda_diag = 1. / sigmas
class StackedLinearGaussiansWithDiagonalPrecision:
def __init__(self, size, column_dim, row_dim,
As=None, lmbdas_diags=None, affine=True):
self.size = size
self.column_dim = column_dim
self.row_dim = row_dim
self.affine = affine
As = [None] * self.size if As is None else As
lmbdas_diags = [None] * self.size if lmbdas_diags is None else lmbdas_diags
self.dists = [LinearGaussianWithDiagonalPrecision(column_dim, row_dim,
As[k], lmbdas_diags[k],
affine=affine)
for k in range(self.size)]
@property
def params(self):
return self.As, self.lmbdas_diags
@params.setter
def params(self, values):
self.As, self.lmbdas_diags = values
@property
def input_dim(self):
return self.column_dim - 1 if self.affine\
else self.column_dim
@property
def output_dim(self):
return self.row_dim
@property
def As(self):
return np.array([dist.A for dist in self.dists])
@As.setter
def As(self, value):
for k, dist in enumerate(self.dists):
dist.A = value[k]
@property
def lmbdas_diags(self):
return np.array([dist.lmbda_diag for dist in self.dists])
@lmbdas_diags.setter
def lmbdas_diags(self, value):
for k, dist in enumerate(self.dists):
dist.lmbda_diag = value[k]
@property
def lmbdas(self):
return np.array([dist.lmbda for dist in self.dists])
@property
def lmbdas_chol(self):
return np.array([dist.lmbda_chol for dist in self.dists])
@property
def lmbdas_chol_inv(self):
return np.array([dist.lmbda_chol_inv for dist in self.dists])
@property
def sigmas_diag(self):
return np.array([dist.sigma_diag for dist in self.dists])
@property
def sigmas(self):
return np.array([dist.sigma for dist in self.dists])
def predict(self, x):
if self.affine:
As, bs = self.As[:, :, :-1], self.As[:, :, -1]
y = np.einsum('kdl,...l->...kd', As, x, optimize=True) + bs[None, ...]
else:
y = np.einsum('kdl,...l->...kd', self.As, x, optimize=True)
return y
def mean(self, x):
return self.predict(x)
def mode(self, x):
return self.predict(x)
def rvs(self, x):
return np.array([dist.rvs(x) for dist in self.dists])
@property
def base(self):
return np.array([dist.base for dist in self.dists])
def log_base(self):
return np.log(self.base)
def statistics(self, x, y):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
idx = np.logical_and(~np.isnan(x).any(axis=1),
~np.isnan(y).any(axis=1))
x, y = x[idx], y[idx]
if self.affine:
x = np.hstack((x, np.ones((x.shape[0], 1))))
xxT = np.einsum('nd,nl->dl', x, x, optimize=True)
yxT = np.einsum('nd,nl->dl', y, x, optimize=True)
yy = np.einsum('nd,nd->d', y, y, optimize=True)
nd = np.broadcast_to(y.shape[0], (self.output_dim, ))
xxTk = np.array([xxT for _ in range(self.size)])
yxTk = np.array([yxT for _ in range(self.size)])
yyk = np.array([yy for _ in range(self.size)])
ndk = np.array([nd for _ in range(self.size)])
return Stats([yxTk, xxTk, ndk, yyk])
else:
stats = list(map(self.statistics, x, y))
return reduce(add, stats)
def weighted_statistics(self, x, y, weights):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
idx = np.logical_and(~np.isnan(x).any(axis=1),
~np.isnan(y).any(axis=1))
x, y, weights = x[idx], y[idx], weights[idx]
if self.affine:
x = np.hstack((x, np.ones((x.shape[0], 1))))
xxTk = np.einsum('nd,nk,nl->kdl', x, weights, x, optimize=True)
yxTk = np.einsum('nd,nk,nl->kdl', y, weights, x, optimize=True)
yyk = np.einsum('nd,nk,nd->kd', y, weights, y, optimize=True)
ndk = np.broadcast_to(np.sum(weights, axis=0, keepdims=True),
(self.size, self.output_dim))
return Stats([yxTk, xxTk, ndk, yyk])
else:
stats = list(map(self.weighted_statistics, x, y, weights))
return reduce(add, stats)
def log_partition(self, x):
return np.array([dist.log_partition(x) for dist in self.dists]).T
def log_likelihood(self, x, y):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
bads = np.logical_and(np.isnan(np.atleast_2d(x)).any(axis=1),
np.isnan(np.atleast_2d(y)).any(axis=1))
x = np.nan_to_num(x, copy=False).reshape((-1, self.input_dim))
y = np.nan_to_num(y, copy=False).reshape((-1, self.output_dim))
mu = self.mean(x)
log_lik = np.einsum('nkd,kdl,nl->nk', mu, self.lmbdas, y, optimize=True)\
- 0.5 * np.einsum('nd,kdl,nl->nk', y, self.lmbdas, y, optimize=True)
log_lik[bads] = 0.
log_lik += - self.log_partition(x) + self.log_base()
return log_lik
else:
return list(map(self.log_likelihood, x, y))
# Max likelihood
def max_likelihood(self, x, y, weights):
yxTk, xxTk, ndk, yyk = self.weighted_statistics(x, y, weights)
As = np.zeros((self.size, self.column_dim, self.row_dim))
lmbdas = np.zeros((self.size, self.output_dim))
for k in range(self.size):
As[k] = np.linalg.solve(xxTk[k], yxTk[k].T).T
sigmas = (yyk[k] - np.einsum('dl,dl->d', As[k], yxTk[k])) / ndk[k]
lmbdas[k] = 1. / sigmas
self.As = As
self.lmbdas_diags = lmbdas
class TiedLinearGaussiansWithDiagonalPrecision(StackedLinearGaussiansWithDiagonalPrecision):
def __init__(self, size, column_dim, row_dim,
As=None, lmbdas_diags=None, affine=True):
super(TiedLinearGaussiansWithDiagonalPrecision, self).__init__(size, column_dim, row_dim,
As, lmbdas_diags, affine)
# Max likelihood
def max_likelihood(self, x, y, weights):
yxTk, xxTk, nd, yy = self.weighted_statistics(x, y, weights)
As = np.zeros((self.size, self.column_dim, self.row_dim))
sigma_diag = np.zeros((self.output_dim, ))
sigma_diag = yy
for k in range(self.size):
As[k] = np.linalg.solve(xxTk[k], yxTk[k].T).T
sigma_diag -= np.einsum('dl,dl->d', As[k], yxTk[k])
sigma_diag /= nd
self.As = As
lmbda_diag = 1. / sigma_diag
self.lmbdas_diags = np.array(self.size * [lmbda_diag])
class _SingleOutputLinearGaussianBase:
def __init__(self, column_dim, W=None, lmbda=None, affine=True):
self.column_dim = column_dim
self.W = W
self.lmbda = lmbda
self.affine = affine
@property
def params(self):
raise NotImplementedError
@params.setter
def params(self, values):
raise NotImplementedError
@property
def nb_params(self):
raise NotImplementedError
@property
def input_dim(self):
return self.column_dim - 1 if self.affine\
else self.column_dim
@property
def sigma(self):
return 1. / self.lmbda
def predict(self, x):
if self.affine:
W, c = self.W[:-1], self.W[-1]
return x @ W + c
else:
return x @ self.W
def mean(self, x):
return self.predict(x)
def mode(self, x):
return self.predict(x)
def rvs(self, x):
return self.mean(x) + npr.randn() * np.sqrt(self.sigma)
def statistics(self, x, y):
raise NotImplementedError
def weighted_statistics(self, x, y, weights):
raise NotImplementedError
class SingleOutputLinearGaussianWithKnownPrecision(_SingleOutputLinearGaussianBase):
def __init__(self, column_dim, W=None, lmbda=None, affine=True):
super(SingleOutputLinearGaussianWithKnownPrecision, self).__init__(column_dim, W,
lmbda, affine)
@property
def params(self):
return self.W
@params.setter
def params(self, values):
self.W = values
@property
def nb_params(self):
return self.column_dim
def statistics(self, x, y):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
idx = np.logical_and(~np.isnan(x).any(axis=1),
~np.isnan(y).any(axis=0))
x, y = x[idx], y[idx]
if self.affine:
x = np.hstack((x, np.ones((x.shape[0], 1))))
xxT = - 0.5 * self.lmbda * np.einsum('nd,nl->dl', x, x, optimize=True)
yxT = self.lmbda * np.einsum('n,nl->l', y, x, optimize=True)
return Stats([yxT, xxT])
else:
stats = list(map(self.statistics, x, y))
return reduce(add, stats)
def weighted_statistics(self, x, y, weights):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
idx = np.logical_and(~np.isnan(x).any(axis=1),
~np.isnan(y).any(axis=0))
x, y, weights = x[idx], y[idx], weights[idx]
if self.affine:
x = np.hstack((x, np.ones((x.shape[0], 1))))
xxT = - 0.5 * np.einsum('nd,n,nl->dl', x, weights, x, optimize=True)
yxT = np.einsum('n,n,nl->l', y, weights, x, optimize=True)
return Stats([yxT, xxT])
else:
stats = list(map(self.weighted_statistics, x, y, weights))
return reduce(add, stats)
class SingleOutputLinearGaussianWithKnownMean(_SingleOutputLinearGaussianBase):
def __init__(self, column_dim, W=None, lmbda=None, affine=True):
super(SingleOutputLinearGaussianWithKnownMean, self).__init__(column_dim, W,
lmbda, affine)
@property
def params(self):
return self.lmbda
@params.setter
def params(self, values):
self.lmbda = values
@property
def nb_params(self):
return 1
def statistics(self, x, y):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
idx = np.logical_and(~np.isnan(x).any(axis=1),
~np.isnan(y).any(axis=0))
x, y = x[idx], y[idx]
if self.affine:
x = np.hstack((x, np.ones((x.shape[0], 1))))
n = 0.5 * y.shape[0]
yy = - 0.5 * np.sum(y * y)
yxTa = np.einsum('n,nl,l->', y, x, self.W, optimize=True)
xTaaTx = - 0.5 * np.einsum('l,nl,nd,d->', self.W, x, x, self.W, optimize=True)
return Stats([n, yy + yxTa + xTaaTx])
else:
stats = list(map(self.statistics, x, y))
return reduce(add, stats)
def weighted_statistics(self, x, y, weights):
if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
idx = np.logical_and(~np.isnan(x).any(axis=1),
~np.isnan(y).any(axis=0))
x, y, weights = x[idx], y[idx], weights[idx]
if self.affine:
x = np.hstack((x, np.ones((x.shape[0], 1))))
n = 0.5 * np.sum(weights)
yy = - 0.5 * np.sum(weights * y * y)
yxTa = np.einsum('n,n,nl,l->', y, weights, x, self.W, optimize=True)
xTaaTx = - 0.5 * np.einsum('l,nl,n,nd,d->', self.W, x, weights, x, self.W, optimize=True)
return Stats([n, yy + yxTa + xTaaTx])
else:
stats = list(map(self.weighted_statistics, x, y, weights))
return reduce(add, stats)
| 32.323593 | 101 | 0.551445 | 4,130 | 29,867 | 3.887167 | 0.039952 | 0.007475 | 0.017379 | 0.019061 | 0.896661 | 0.853681 | 0.837112 | 0.822038 | 0.804286 | 0.776442 | 0 | 0.007356 | 0.312686 | 29,867 | 923 | 102 | 32.358613 | 0.774698 | 0.005391 | 0 | 0.777941 | 0 | 0 | 0.01677 | 0 | 0 | 0 | 0 | 0 | 0.010294 | 1 | 0.179412 | false | 0 | 0.010294 | 0.091176 | 0.360294 | 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 |
86f296647f3e6172b5124be9fb58ee80c9acc424 | 16,599 | py | Python | examples/famafrench_bisorts_ep_cfp_dp.py | christianjauregui/famafrench | 8ae3dc9a29c49e37acdbda6f717f58c7ad5401e3 | [
"MIT"
] | 22 | 2020-01-14T03:06:11.000Z | 2022-03-09T11:22:14.000Z | examples/famafrench_bisorts_ep_cfp_dp.py | aliawaischeema/famafrench | 8ae3dc9a29c49e37acdbda6f717f58c7ad5401e3 | [
"MIT"
] | 1 | 2020-04-25T06:41:23.000Z | 2020-04-25T07:54:13.000Z | examples/famafrench_bisorts_ep_cfp_dp.py | aliawaischeema/famafrench | 8ae3dc9a29c49e37acdbda6f717f58c7ad5401e3 | [
"MIT"
] | 14 | 2020-04-26T00:17:08.000Z | 2021-12-16T13:36:24.000Z | """
This file is part of famafrench.
Copyright (c) 2020, Christian Jauregui <chris.jauregui@berkeley.edu>
See file LICENSE.txt for license information.
Filename
_________
`examples/famafrenchbisorts_ep_cfp_dp.py`
Construct portfolio returns based using bivariate sorts on
* Earnings/Price (EP)
* Cashflow/Price (CFP)
* Dividend Yield (DP)
Ken French online library:
6 Portfolios Formed on Size and Earnings/Price
____________________________________
https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/Data_Library/six_portfolios_me_ep.html
6 Portfolios Formed on Size and Cashflow/Price
____________________________________
https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/Data_Library/six_portfolios_me_cfp.html
6 Portfolios Formed on Size and Dividend Yield
____________________________________
https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/Data_Library/six_portfolios_me_dp.html
"""
import os
import datetime as dt
import famafrench.famafrench as ff
startDate = dt.date(1960, 1, 1) # "default" startDate
endDate = dt.date.today() # "default" endDate
#startDate = dt.date(1970, 1, 1)
#endDate = dt.date(2019, 12, 31)
# pickled_dir
pickled_dir = os.getcwd() + '/famafrench/pickled_db/'
#%%
#**************************************************************************#
#**************************************************************************#
#************** Size (ME) x Earnings/Price (EP) *****************#
#**************************************************************************#
#**************************************************************************#
#**********************************************************************************************#
# Daily Portfolios Formed on Size (ME) x Earnings/Price (EP)
#**********************************************************************************************#
runQuery = True
ffFreq = 'D'
ffFactors, ffsortCharac, ffportCharac = [], ['ME', 'EP'], ['ME', 'EP']
ff_D = ff.FamaFrench(pickled_dir, runQuery, ffFreq, ffsortCharac, ffFactors, ffportCharac)
# - 6 portfolios (2x3) sorted on ['ME', 'EP']
sortingDim = [2, 3]
ff_D.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_D.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_D.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 25 daily portfolios (5x5) sorted on ['ME', 'EP']
sortingDim = [5, 5]
ff_D.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_D.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_D.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 100 portfolios (10x10) sorted on ['ME', 'EP']
sortingDim = [10, 10]
ff_D.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_D.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_D.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
#%%
#**********************************************************************************************#
# Monthly Portfolios Formed on Size (ME) x Earnings/Price (EP)
#**********************************************************************************************#
runQuery = True
ffFreq = 'M'
ffFactors, ffsortCharac, ffportCharac = [], ['ME', 'EP'], ['ME', 'EP']
ff_M = ff.FamaFrench(pickled_dir, runQuery, ffFreq, ffsortCharac, ffFactors, ffportCharac)
# - 6 daily portfolios (3x2) sorted on ['ME', 'EP']
sortingDim = [2, 3]
#portTableM = ff_M.getPortfolioReturns(False, startDate, endDate, sortingDim, 'vw')
#kfportTableM = ff_M.getkfPortfolioReturns(ffFreq, startDate, endDate, sortingDim, 'vw')
_, _, _, = ff_M.comparePortfolios('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
_, _, _, = ff_M.comparePortfolios('NumFirms', ffFreq, startDate, endDate, sortingDim)
_, _, _, = ff_M.comparePortfolios('Characs', ffFreq, startDate, endDate, sortingDim)
ff_M.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_M.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_M.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 25 daily portfolios (5x5) sorted on ['ME', 'EP']
sortingDim = [5, 5]
ff_M.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_M.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_M.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 100 portfolios (10x10) sorted on ['ME', 'EP']
sortingDim = [10, 10]
ff_M.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_M.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_M.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
#%%
#**********************************************************************************************#
# Annual Portfolios Formed on Size (ME) x Earnings/Price (EP)
#**********************************************************************************************#
runQuery = False
ffFreq = 'A'
ffFactors, ffsortCharac, ffportCharac = [], ['ME', 'EP'], ['ME', 'EP']
ff_A = ff.FamaFrench(pickled_dir, runQuery, ffFreq, ffsortCharac, ffFactors, ffportCharac)
# - 6 daily portfolios (3x2) sorted on ['ME', 'EP']
sortingDim = [2, 3]
_, _, _, = ff_A.comparePortfolios('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
_, _, _, = ff_A.comparePortfolios('Characs', ffFreq, startDate, endDate, sortingDim)
ff_A.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_A.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_A.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 25 daily portfolios (5x5) sorted on ['ME', 'EP']
sortingDim = [5, 5]
ff_A.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_A.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_A.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 100 portfolios (10x10) sorted on ['ME', 'EP']
sortingDim = [10, 10]
ff_A.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_A.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_A.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
#%%
#**************************************************************************#
#**************************************************************************#
#************* Size (ME) x Cash Flow/Price (CFP) ****************#
#**************************************************************************#
#**************************************************************************#
#**********************************************************************************************#
# Daily Portfolios Formed on Size (ME) x Cash Flow/Price (CFP)
#**********************************************************************************************#
runQuery = False
ffFreq = 'D'
ffFactors, ffsortCharac, ffportCharac = [], ['ME', 'CFP'], ['ME', 'CFP']
ff_D = ff.FamaFrench(pickled_dir, runQuery, ffFreq, ffsortCharac, ffFactors, ffportCharac)
# - 6 portfolios (2x3) sorted on ['ME', 'CFP']
sortingDim = [2, 3]
ff_D.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_D.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_D.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 25 daily portfolios (5x5) sorted on ['ME', 'CFP']
sortingDim = [5, 5]
ff_D.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_D.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_D.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 100 portfolios (10x10) sorted on ['ME', 'CFP']
sortingDim = [10, 10]
ff_D.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_D.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_D.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
#%%
#**********************************************************************************************#
# Monthly Portfolios Formed on Size (ME) x Cash Flow/Price (CFP)
#**********************************************************************************************#
runQuery = True
ffFreq = 'M'
ffFactors, ffsortCharac, ffportCharac = [], ['ME', 'CFP'], ['ME', 'CFP']
ff_M = ff.FamaFrench(pickled_dir, runQuery, ffFreq, ffsortCharac, ffFactors, ffportCharac)
# - 6 daily portfolios (3x2) sorted on ['ME', 'CFP']
sortingDim = [2, 3]
#portTableM = ff_M.getPortfolioReturns(False, startDate, endDate, sortingDim, 'vw')
#kfportTableM = ff_M.getkfPortfolioReturns(ffFreq, startDate, endDate, sortingDim, 'vw')
_, _, _, = ff_M.comparePortfolios('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
_, _, _, = ff_M.comparePortfolios('NumFirms', ffFreq, startDate, endDate, sortingDim)
_, _, _, = ff_M.comparePortfolios('Characs', ffFreq, startDate, endDate, sortingDim)
ff_M.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_M.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_M.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 25 daily portfolios (5x5) sorted on ['ME', 'CFP']
sortingDim = [5, 5]
ff_M.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_M.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_M.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 100 portfolios (10x10) sorted on ['ME', 'CFP']
sortingDim = [10, 10]
ff_M.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_M.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_M.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
#%%
#**********************************************************************************************#
# Annual Portfolios Formed on Size (ME) x Cash Flow/Price (CFP)
#**********************************************************************************************#
runQuery = False
ffFreq = 'A'
ffFactors, ffsortCharac, ffportCharac = [], ['ME', 'CFP'], ['ME', 'CFP']
ff_A = ff.FamaFrench(pickled_dir, runQuery, ffFreq, ffsortCharac, ffFactors, ffportCharac)
# - 6 daily portfolios (3x2) sorted on ['ME', 'CFP']
sortingDim = [2, 3]
_, _, _, = ff_A.comparePortfolios('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
_, _, _, = ff_A.comparePortfolios('Characs', ffFreq, startDate, endDate, sortingDim)
ff_A.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_A.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_A.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 25 daily portfolios (5x5) sorted on ['ME', 'CFP']
sortingDim = [5, 5]
ff_A.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_A.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_A.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 100 portfolios (10x10) sorted on ['ME', 'CFP']
sortingDim = [10, 10]
ff_A.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_A.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_A.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
#%%
#**************************************************************************#
#**************************************************************************#
#************** Size (ME) x Dividend Yield (DP) *****************#
#**************************************************************************#
#**************************************************************************#
#**********************************************************************************************#
# Daily Portfolios Formed on Size (ME) x Dividend Yield (DP)
#**********************************************************************************************#
runQuery = True
ffFreq = 'D'
ffFactors, ffsortCharac, ffportCharac = [], ['ME', 'DP'], ['ME', 'DP']
ff_D = ff.FamaFrench(pickled_dir, runQuery, ffFreq, ffsortCharac, ffFactors, ffportCharac)
# - 6 portfolios (2x3) sorted on ['ME', 'DP']
sortingDim = [2, 3]
ff_D.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_D.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_D.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 25 daily portfolios (5x5) sorted on ['ME', 'DP']
sortingDim = [5, 5]
ff_D.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_D.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_D.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 100 portfolios (10x10) sorted on ['ME', 'DP']
sortingDim = [10, 10]
ff_D.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_D.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_D.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
#%%
#**********************************************************************************************#
# Monthly Portfolios Formed on Size (ME) x Dividend Yield (DP)
#**********************************************************************************************#
runQuery = True
ffFreq = 'M'
ffFactors, ffsortCharac, ffportCharac = [], ['ME', 'DP'], ['ME', 'DP']
ff_M = ff.FamaFrench(pickled_dir, runQuery, ffFreq, ffsortCharac, ffFactors, ffportCharac)
# - 6 daily portfolios (3x2) sorted on ['ME', 'DP']
sortingDim = [2, 3]
#portTableM = ff_M.getPortfolioReturns(False, startDate, endDate, sortingDim, 'vw')
#kfportTableM = ff_M.getkfPortfolioReturns(ffFreq, startDate, endDate, sortingDim, 'vw')
_, _, _, = ff_M.comparePortfolios('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
_, _, _, = ff_M.comparePortfolios('NumFirms', ffFreq, startDate, endDate, sortingDim)
_, _, _, = ff_M.comparePortfolios('Characs', ffFreq, startDate, endDate, sortingDim)
ff_M.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_M.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_M.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 25 daily portfolios (5x5) sorted on ['ME', 'DP']
sortingDim = [5, 5]
ff_M.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_M.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_M.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 100 portfolios (10x10) sorted on ['ME', 'DP']
sortingDim = [10, 10]
ff_M.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_M.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_M.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
#%%
#**********************************************************************************************#
# Annual Portfolios Formed on Size (ME) x Dividend Yield (DP)
#**********************************************************************************************#
runQuery = False
ffFreq = 'A'
ffFactors, ffsortCharac, ffportCharac = [], ['ME', 'DP'], ['ME', 'DP']
ff_A = ff.FamaFrench(pickled_dir, runQuery, ffFreq, ffsortCharac, ffFactors, ffportCharac)
# - 6 daily portfolios (3x2) sorted on ['ME', 'DP']
sortingDim = [2, 3]
_, _, _, = ff_A.comparePortfolios('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
_, _, _, = ff_A.comparePortfolios('Characs', ffFreq, startDate, endDate, sortingDim)
ff_A.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_A.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_A.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 25 daily portfolios (5x5) sorted on ['ME', 'DP']
sortingDim = [5, 5]
ff_A.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_A.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_A.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
# - 100 portfolios (10x10) sorted on ['ME', 'DP']
sortingDim = [10, 10]
ff_A.getFamaFrenchStats('Returns', ffFreq, startDate, endDate, sortingDim, 'vw')
ff_A.getFamaFrenchStats('NumFirms', ffFreq, startDate, endDate, sortingDim)
ff_A.getFamaFrenchStats('Characs', ffFreq, startDate, endDate, sortingDim)
| 50.606707 | 96 | 0.617146 | 1,618 | 16,599 | 6.145859 | 0.071693 | 0.165728 | 0.266693 | 0.318584 | 0.946299 | 0.946299 | 0.939863 | 0.930712 | 0.888274 | 0.888274 | 0 | 0.01501 | 0.096934 | 16,599 | 327 | 97 | 50.761468 | 0.648366 | 0.374842 | 0 | 0.963636 | 0 | 0 | 0.085684 | 0.002245 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.018182 | 0 | 0.018182 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
86ff51d8bcde975274581b0299fbbb96b36cf70e | 14,206 | py | Python | sdk/python/pulumi_okta/app/group_assignment.py | pulumi/pulumi-okta | 83f7617a85b3d05213901773fa4e6a151ab6076b | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2019-10-29T21:59:22.000Z | 2021-11-08T12:00:24.000Z | sdk/python/pulumi_okta/app/group_assignment.py | pulumi/pulumi-okta | 83f7617a85b3d05213901773fa4e6a151ab6076b | [
"ECL-2.0",
"Apache-2.0"
] | 109 | 2020-01-06T10:28:09.000Z | 2022-03-25T19:52:40.000Z | sdk/python/pulumi_okta/app/group_assignment.py | pulumi/pulumi-okta | 83f7617a85b3d05213901773fa4e6a151ab6076b | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-09-11T16:31:04.000Z | 2020-11-24T12:23:17.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__ = ['GroupAssignmentArgs', 'GroupAssignment']
@pulumi.input_type
class GroupAssignmentArgs:
def __init__(__self__, *,
app_id: pulumi.Input[str],
group_id: pulumi.Input[str],
priority: Optional[pulumi.Input[int]] = None,
profile: Optional[pulumi.Input[str]] = None,
retain_assignment: Optional[pulumi.Input[bool]] = None):
"""
The set of arguments for constructing a GroupAssignment resource.
:param pulumi.Input[str] app_id: The ID of the application to assign a group to.
:param pulumi.Input[str] group_id: The ID of the group to assign the app to.
:param pulumi.Input[str] profile: JSON document containing [application profile](https://developer.okta.com/docs/reference/api/apps/#profile-object)
:param pulumi.Input[bool] retain_assignment: Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
"""
pulumi.set(__self__, "app_id", app_id)
pulumi.set(__self__, "group_id", group_id)
if priority is not None:
pulumi.set(__self__, "priority", priority)
if profile is not None:
pulumi.set(__self__, "profile", profile)
if retain_assignment is not None:
pulumi.set(__self__, "retain_assignment", retain_assignment)
@property
@pulumi.getter(name="appId")
def app_id(self) -> pulumi.Input[str]:
"""
The ID of the application to assign a group to.
"""
return pulumi.get(self, "app_id")
@app_id.setter
def app_id(self, value: pulumi.Input[str]):
pulumi.set(self, "app_id", value)
@property
@pulumi.getter(name="groupId")
def group_id(self) -> pulumi.Input[str]:
"""
The ID of the group to assign the app to.
"""
return pulumi.get(self, "group_id")
@group_id.setter
def group_id(self, value: pulumi.Input[str]):
pulumi.set(self, "group_id", value)
@property
@pulumi.getter
def priority(self) -> Optional[pulumi.Input[int]]:
return pulumi.get(self, "priority")
@priority.setter
def priority(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "priority", value)
@property
@pulumi.getter
def profile(self) -> Optional[pulumi.Input[str]]:
"""
JSON document containing [application profile](https://developer.okta.com/docs/reference/api/apps/#profile-object)
"""
return pulumi.get(self, "profile")
@profile.setter
def profile(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "profile", value)
@property
@pulumi.getter(name="retainAssignment")
def retain_assignment(self) -> Optional[pulumi.Input[bool]]:
"""
Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
"""
return pulumi.get(self, "retain_assignment")
@retain_assignment.setter
def retain_assignment(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "retain_assignment", value)
@pulumi.input_type
class _GroupAssignmentState:
def __init__(__self__, *,
app_id: Optional[pulumi.Input[str]] = None,
group_id: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[int]] = None,
profile: Optional[pulumi.Input[str]] = None,
retain_assignment: Optional[pulumi.Input[bool]] = None):
"""
Input properties used for looking up and filtering GroupAssignment resources.
:param pulumi.Input[str] app_id: The ID of the application to assign a group to.
:param pulumi.Input[str] group_id: The ID of the group to assign the app to.
:param pulumi.Input[str] profile: JSON document containing [application profile](https://developer.okta.com/docs/reference/api/apps/#profile-object)
:param pulumi.Input[bool] retain_assignment: Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
"""
if app_id is not None:
pulumi.set(__self__, "app_id", app_id)
if group_id is not None:
pulumi.set(__self__, "group_id", group_id)
if priority is not None:
pulumi.set(__self__, "priority", priority)
if profile is not None:
pulumi.set(__self__, "profile", profile)
if retain_assignment is not None:
pulumi.set(__self__, "retain_assignment", retain_assignment)
@property
@pulumi.getter(name="appId")
def app_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the application to assign a group to.
"""
return pulumi.get(self, "app_id")
@app_id.setter
def app_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "app_id", value)
@property
@pulumi.getter(name="groupId")
def group_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the group to assign the app to.
"""
return pulumi.get(self, "group_id")
@group_id.setter
def group_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "group_id", value)
@property
@pulumi.getter
def priority(self) -> Optional[pulumi.Input[int]]:
return pulumi.get(self, "priority")
@priority.setter
def priority(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "priority", value)
@property
@pulumi.getter
def profile(self) -> Optional[pulumi.Input[str]]:
"""
JSON document containing [application profile](https://developer.okta.com/docs/reference/api/apps/#profile-object)
"""
return pulumi.get(self, "profile")
@profile.setter
def profile(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "profile", value)
@property
@pulumi.getter(name="retainAssignment")
def retain_assignment(self) -> Optional[pulumi.Input[bool]]:
"""
Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
"""
return pulumi.get(self, "retain_assignment")
@retain_assignment.setter
def retain_assignment(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "retain_assignment", value)
class GroupAssignment(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
app_id: Optional[pulumi.Input[str]] = None,
group_id: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[int]] = None,
profile: Optional[pulumi.Input[str]] = None,
retain_assignment: Optional[pulumi.Input[bool]] = None,
__props__=None):
"""
## Import
An application group assignment can be imported via the `app_id` and the `group_id`.
```sh
$ pulumi import okta:app/groupAssignment:GroupAssignment example <app_id>/<group_id>
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] app_id: The ID of the application to assign a group to.
:param pulumi.Input[str] group_id: The ID of the group to assign the app to.
:param pulumi.Input[str] profile: JSON document containing [application profile](https://developer.okta.com/docs/reference/api/apps/#profile-object)
:param pulumi.Input[bool] retain_assignment: Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: GroupAssignmentArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
## Import
An application group assignment can be imported via the `app_id` and the `group_id`.
```sh
$ pulumi import okta:app/groupAssignment:GroupAssignment example <app_id>/<group_id>
```
:param str resource_name: The name of the resource.
:param GroupAssignmentArgs 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(GroupAssignmentArgs, 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,
app_id: Optional[pulumi.Input[str]] = None,
group_id: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[int]] = None,
profile: Optional[pulumi.Input[str]] = None,
retain_assignment: Optional[pulumi.Input[bool]] = 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__ = GroupAssignmentArgs.__new__(GroupAssignmentArgs)
if app_id is None and not opts.urn:
raise TypeError("Missing required property 'app_id'")
__props__.__dict__["app_id"] = app_id
if group_id is None and not opts.urn:
raise TypeError("Missing required property 'group_id'")
__props__.__dict__["group_id"] = group_id
__props__.__dict__["priority"] = priority
__props__.__dict__["profile"] = profile
__props__.__dict__["retain_assignment"] = retain_assignment
super(GroupAssignment, __self__).__init__(
'okta:app/groupAssignment:GroupAssignment',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
app_id: Optional[pulumi.Input[str]] = None,
group_id: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[int]] = None,
profile: Optional[pulumi.Input[str]] = None,
retain_assignment: Optional[pulumi.Input[bool]] = None) -> 'GroupAssignment':
"""
Get an existing GroupAssignment 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] app_id: The ID of the application to assign a group to.
:param pulumi.Input[str] group_id: The ID of the group to assign the app to.
:param pulumi.Input[str] profile: JSON document containing [application profile](https://developer.okta.com/docs/reference/api/apps/#profile-object)
:param pulumi.Input[bool] retain_assignment: Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _GroupAssignmentState.__new__(_GroupAssignmentState)
__props__.__dict__["app_id"] = app_id
__props__.__dict__["group_id"] = group_id
__props__.__dict__["priority"] = priority
__props__.__dict__["profile"] = profile
__props__.__dict__["retain_assignment"] = retain_assignment
return GroupAssignment(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="appId")
def app_id(self) -> pulumi.Output[str]:
"""
The ID of the application to assign a group to.
"""
return pulumi.get(self, "app_id")
@property
@pulumi.getter(name="groupId")
def group_id(self) -> pulumi.Output[str]:
"""
The ID of the group to assign the app to.
"""
return pulumi.get(self, "group_id")
@property
@pulumi.getter
def priority(self) -> pulumi.Output[Optional[int]]:
return pulumi.get(self, "priority")
@property
@pulumi.getter
def profile(self) -> pulumi.Output[Optional[str]]:
"""
JSON document containing [application profile](https://developer.okta.com/docs/reference/api/apps/#profile-object)
"""
return pulumi.get(self, "profile")
@property
@pulumi.getter(name="retainAssignment")
def retain_assignment(self) -> pulumi.Output[Optional[bool]]:
"""
Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
"""
return pulumi.get(self, "retain_assignment")
| 42.154303 | 175 | 0.640856 | 1,722 | 14,206 | 5.073171 | 0.091754 | 0.081845 | 0.065705 | 0.052885 | 0.804373 | 0.782967 | 0.768658 | 0.753434 | 0.743246 | 0.734661 | 0 | 0.000094 | 0.253625 | 14,206 | 336 | 176 | 42.279762 | 0.823823 | 0.299803 | 0 | 0.70098 | 1 | 0 | 0.08764 | 0.004307 | 0 | 0 | 0 | 0 | 0 | 1 | 0.156863 | false | 0.063725 | 0.02451 | 0.014706 | 0.27451 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 9 |
811cd65e25b493ec4d708100ed2a66980d68cf55 | 2,394 | py | Python | src/pbn_api/migrations/0030_auto_20210818_2343.py | iplweb/django-bpp | 85f183a99d8d5027ae4772efac1e4a9f21675849 | [
"BSD-3-Clause"
] | 1 | 2017-04-27T19:50:02.000Z | 2017-04-27T19:50:02.000Z | src/pbn_api/migrations/0030_auto_20210818_2343.py | mpasternak/django-bpp | 434338821d5ad1aaee598f6327151aba0af66f5e | [
"BSD-3-Clause"
] | 41 | 2019-11-07T00:07:02.000Z | 2022-02-27T22:09:39.000Z | src/pbn_api/migrations/0030_auto_20210818_2343.py | iplweb/bpp | f027415cc3faf1ca79082bf7bacd4be35b1a6fdf | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 3.0.14 on 2021-08-18 21:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("pbn_api", "0029_indeksy_gist_inne_tabele"),
]
operations = [
migrations.AlterField(
model_name="conference",
name="verificationLevel",
field=models.CharField(db_index=True, max_length=32),
),
migrations.AlterField(
model_name="conference",
name="verified",
field=models.BooleanField(db_index=True, default=False),
),
migrations.AlterField(
model_name="institution",
name="verificationLevel",
field=models.CharField(db_index=True, max_length=32),
),
migrations.AlterField(
model_name="institution",
name="verified",
field=models.BooleanField(db_index=True, default=False),
),
migrations.AlterField(
model_name="journal",
name="verificationLevel",
field=models.CharField(db_index=True, max_length=32),
),
migrations.AlterField(
model_name="journal",
name="verified",
field=models.BooleanField(db_index=True, default=False),
),
migrations.AlterField(
model_name="publication",
name="verificationLevel",
field=models.CharField(db_index=True, max_length=32),
),
migrations.AlterField(
model_name="publication",
name="verified",
field=models.BooleanField(db_index=True, default=False),
),
migrations.AlterField(
model_name="publisher",
name="verificationLevel",
field=models.CharField(db_index=True, max_length=32),
),
migrations.AlterField(
model_name="publisher",
name="verified",
field=models.BooleanField(db_index=True, default=False),
),
migrations.AlterField(
model_name="scientist",
name="verificationLevel",
field=models.CharField(db_index=True, max_length=32),
),
migrations.AlterField(
model_name="scientist",
name="verified",
field=models.BooleanField(db_index=True, default=False),
),
]
| 32.351351 | 68 | 0.575606 | 217 | 2,394 | 6.18894 | 0.225806 | 0.178704 | 0.22338 | 0.259121 | 0.884587 | 0.884587 | 0.778109 | 0.778109 | 0.778109 | 0.778109 | 0 | 0.019465 | 0.313283 | 2,394 | 73 | 69 | 32.794521 | 0.797445 | 0.019215 | 0 | 0.895522 | 1 | 0 | 0.127877 | 0.012361 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.014925 | 0 | 0.059701 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 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 | 10 |
811ebd4dbb50fcc859e6ee9f300ecde0ad39eb4a | 14,777 | py | Python | tests/unit/internal/test_lock.py | Sage-Bionetworks/spccore | c63a88ef472b83be11594b820a072f6d79080a73 | [
"Apache-2.0"
] | 1 | 2019-06-13T20:47:59.000Z | 2019-06-13T20:47:59.000Z | tests/unit/internal/test_lock.py | Sage-Bionetworks/spccore | c63a88ef472b83be11594b820a072f6d79080a73 | [
"Apache-2.0"
] | 12 | 2019-06-13T23:32:59.000Z | 2019-08-27T01:24:57.000Z | tests/unit/internal/test_lock.py | Sage-Bionetworks/spccore | c63a88ef472b83be11594b820a072f6d79080a73 | [
"Apache-2.0"
] | 3 | 2019-06-13T20:50:01.000Z | 2019-08-29T19:34:31.000Z | import pytest
from unittest.mock import patch, call
from spccore.internal.lock import *
@pytest.fixture
def lock(name, cwd, max_age, timeout):
return Lock(name, current_working_directory=cwd, max_age=max_age, default_blocking_timeout=timeout)
@pytest.fixture
def name():
return "some_folder"
@pytest.fixture
def cwd():
return "test_dir"
@pytest.fixture
def max_age():
return datetime.timedelta(seconds=1)
@pytest.fixture
def timeout():
return datetime.timedelta(seconds=5)
@pytest.fixture
def lock_dir_path(cwd, name):
return cwd+"/"+name+"."+LOCK_FILE_SUFFIX
@pytest.fixture
def error():
error = OSError()
error.errno = errno.EACCES
return error
class TestLock:
# __init__
def test_constructor(self, name, cwd, lock_dir_path):
with patch.object(os, "getcwd", return_value=cwd) as mock_getcwd, \
patch.object(os.path, "join", return_value=lock_dir_path) as mock_join:
lock = Lock(name)
assert lock.name == name
assert lock.last_updated_time is None
assert lock.current_working_directory == cwd
assert lock.lock_dir_path == lock_dir_path
assert lock.max_age == LOCK_DEFAULT_MAX_AGE
assert lock.default_blocking_timeout == DEFAULT_BLOCKING_TIMEOUT
mock_getcwd.assert_called_once_with()
mock_join.assert_called_once_with(cwd, name+"."+LOCK_FILE_SUFFIX)
def test_custom_lock(self, name, cwd, lock_dir_path, max_age, timeout):
with patch.object(os, "getcwd") as mock_getcwd, \
patch.object(os.path, "join", return_value=lock_dir_path) as mock_join:
lock = Lock(name, current_working_directory=cwd, max_age=max_age, default_blocking_timeout=timeout)
assert lock.name == name
assert lock.current_working_directory == cwd
assert lock.lock_dir_path == lock_dir_path
assert lock.max_age == max_age
assert lock.default_blocking_timeout == timeout
mock_getcwd.assert_not_called()
mock_join.assert_called_once_with(cwd, name + "." + LOCK_FILE_SUFFIX)
# _update_lock_time
def test_update_lock_time(self, lock):
lock_time = 1
with patch.object(time, "sleep") as mock_sleep, \
patch.object(time, "time", return_value=lock_time) as mock_time, \
patch.object(os, "utime") as mock_utime:
lock._update_lock_time()
mock_sleep.assert_called_once_with(LOCK_UPDATE_WAIT_TIME_SEC)
mock_time.assert_called_once_with()
mock_utime.assert_called_once_with(lock.lock_dir_path, (0, lock_time))
assert lock.last_updated_time == from_epoch_time_to_iso(lock_time)
# _has_lock
def test_private_has_lock(self, lock):
lock.last_updated_time = from_epoch_time_to_iso(0)
with patch.object(os.path, "getmtime", return_value=0) as mock_get_mtime:
assert lock._has_lock()
mock_get_mtime.assert_called_once_with(lock.lock_dir_path)
def test_private_has_lock_out_of_date(self, lock):
lock.last_updated_time = from_epoch_time_to_iso(0)
with patch.object(os.path, "getmtime", return_value=1) as mock_get_mtime:
assert lock._has_lock() is False
mock_get_mtime.assert_called_once_with(lock.lock_dir_path)
def test_private_has_lock_fails(self, lock, error):
lock.last_updated_time = from_epoch_time_to_iso(0)
with patch.object(os.path, "getmtime", side_effect=error) as mock_get_mtime:
assert lock._has_lock() is False
mock_get_mtime.assert_called_once_with(lock.lock_dir_path)
# _get_age
def test_private_get_age(self, lock):
with patch.object(time, "time", return_value=2) as mock_time, \
patch.object(os.path, "getmtime", return_value=1) as mock_getmtime:
assert 1 == lock._get_age()
mock_time.assert_called_once_with()
mock_getmtime.assert_called_once_with(lock.lock_dir_path)
def test_private_get_age_throws_error(self, lock):
with pytest.raises(OSError), \
patch.object(time, "time", return_value=2) as mock_time, \
patch.object(os.path, "getmtime", side_effect=OSError()) as mock_getmtime:
lock._get_age()
mock_time.assert_called_once_with()
mock_getmtime.assert_called_once_with(lock.lock_dir_path)
def test_private_get_age_throws_known_error(self, lock, error):
with patch.object(time, "time", return_value=2) as mock_time, \
patch.object(os.path, "getmtime", side_effect=error) as mock_getmtime:
assert 0 == lock._get_age()
mock_time.assert_called_once_with()
mock_getmtime.assert_called_once_with(lock.lock_dir_path)
# _acquire_lock
def test_private_acquire_lock_with_renew(self, lock):
with patch.object(lock, "renew", return_value=True) as mock_renew, \
patch.object(os, "makedirs") as mock_makedirs, \
patch.object(os, "utime") as mock_utime, \
patch.object(time, "time") as mock_time, \
patch.object(lock, "_get_age", return_value=lock.max_age.total_seconds()+1) as mock_get_age, \
patch.object(lock, "_has_lock", return_value=True) as mock_has_lock:
assert lock._acquire_lock()
mock_renew.assert_called_once_with()
mock_makedirs.assert_not_called()
mock_utime.assert_not_called()
mock_time.assert_not_called()
mock_get_age.assert_not_called()
mock_has_lock.assert_not_called()
def test_private_acquire_lock_with_uncaught_error(self, lock):
utime = 1
with pytest.raises(OSError), \
patch.object(lock, "renew", return_value=False) as mock_renew, \
patch.object(os, "makedirs") as mock_makedirs, \
patch.object(os, "utime", side_effect=OSError()) as mock_utime, \
patch.object(time, "time", return_value=utime) as mock_time, \
patch.object(lock, "_get_age", return_value=lock.max_age.total_seconds()+1) as mock_get_age, \
patch.object(lock, "_has_lock", return_value=True) as mock_has_lock:
lock._acquire_lock()
mock_renew.assert_not_called()
mock_makedirs.assert_called_once_with(lock.lock_dir_path)
mock_utime.assert_called_once_with(lock.lock_dir_path, (0, utime))
mock_time.assert_called_once_with()
mock_get_age.assert_not_called()
mock_has_lock.assert_not_called()
def test_private_acquire_lock_not_break_old_lock(self, lock, error):
utime = 1
with patch.object(lock, "renew", return_value=False) as mock_renew, \
patch.object(os, "makedirs") as mock_makedirs, \
patch.object(os, "utime", side_effect=error) as mock_utime, \
patch.object(time, "time", return_value=utime) as mock_time, \
patch.object(lock, "_get_age", return_value=lock.max_age.total_seconds()+1) as mock_get_age, \
patch.object(lock, "_has_lock", return_value=True) as mock_has_lock:
assert lock._acquire_lock(break_old_locks=False) is False
mock_renew.assert_called_once_with()
mock_makedirs.assert_called_once_with(lock.lock_dir_path)
mock_utime.assert_called_once_with(lock.lock_dir_path, (0, utime))
mock_time.assert_called_once_with()
mock_get_age.assert_not_called()
mock_has_lock.assert_not_called()
def test_private_acquire_lock_break_old_lock(self, lock, error):
utime = 1
with patch.object(lock, "renew", return_value=False) as mock_renew, \
patch.object(os, "makedirs", side_effect=error) as mock_makedirs, \
patch.object(os, "utime") as mock_utime, \
patch.object(time, "time", return_value=utime) as mock_time, \
patch.object(lock, "_get_age", return_value=lock.max_age.total_seconds()+1) as mock_get_age, \
patch.object(lock, "_has_lock", return_value=True) as mock_has_lock:
assert lock._acquire_lock()
mock_renew.assert_called_once_with()
mock_makedirs.assert_called_once_with(lock.lock_dir_path)
mock_utime.assert_called_once_with(lock.lock_dir_path, (0, utime))
mock_time.assert_called_once_with()
mock_get_age.assert_called_once_with()
mock_has_lock.assert_called_once_with()
def test_private_acquire_lock_break_old_lock_with_non_expired_lock(self, lock, error):
utime = 1
with patch.object(lock, "renew", return_value=False) as mock_renew, \
patch.object(os, "makedirs", side_effect=error) as mock_makedirs, \
patch.object(os, "utime") as mock_utime, \
patch.object(time, "time", return_value=utime) as mock_time, \
patch.object(lock, "_get_age", return_value=lock.max_age.total_seconds()-1) as mock_get_age, \
patch.object(lock, "_has_lock", return_value=True) as mock_has_lock:
assert lock._acquire_lock() is False
mock_renew.assert_called_once_with()
mock_makedirs.assert_called_once_with(lock.lock_dir_path)
mock_utime.assert_not_called()
mock_time.assert_not_called()
mock_get_age.assert_called_once_with()
mock_has_lock.assert_not_called()
# __enter__
def test_private_enter(self, lock):
with patch.object(lock, "blocking_acquire") as mock_blocking_acquire:
assert lock == lock.__enter__()
mock_blocking_acquire.assert_called_once_with()
# __exit__
def test_private_exit(self, lock):
with patch.object(lock, "release") as mock_release:
lock.__exit__(None, None, None)
mock_release.assert_called_once_with()
# renew
def test_renew_not_already_have_lock(self, lock):
with patch.object(lock, "_has_lock", return_value=False) as mock_has_lock, \
patch.object(lock, "_get_age", return_value=0) as mock_get_age, \
patch.object(os, "utime") as mock_utime, \
patch.object(time, "time") as mock_time:
assert lock.renew() is False
mock_has_lock.assert_called_once_with()
mock_utime.assert_not_called()
mock_time.assert_not_called()
mock_get_age.assert_not_called()
def test_renew_lock_fails(self, lock):
utime = 1
with patch.object(lock, "_has_lock", return_value=True) as mock_has_lock, \
patch.object(os, "utime", side_effect=OSError()) as mock_utime, \
patch.object(lock, "_get_age", return_value=0) as mock_get_age, \
patch.object(time, "time", return_value=utime) as mock_time:
assert lock.renew() is False
mock_has_lock.assert_called_once_with()
mock_utime.assert_called_once_with(lock.lock_dir_path, (0, utime))
mock_time.assert_called_once_with()
mock_get_age.assert_called_once_with()
def test_renew_lock_success(self, lock):
utime = 1
with patch.object(lock, "_has_lock", return_value=True) as mock_has_lock, \
patch.object(os, "utime") as mock_utime, \
patch.object(lock, "_get_age", return_value=0) as mock_get_age, \
patch.object(time, "time", return_value=utime) as mock_time:
assert lock.renew()
mock_has_lock.assert_called_once_with()
mock_utime.assert_called_once_with(lock.lock_dir_path, (0, utime))
mock_time.assert_called_once_with()
mock_get_age.assert_called_once_with()
# release
def test_release_not_have_lock(self, lock):
with patch.object(lock, "_has_lock", return_value=False) as mock_has_lock, \
patch.object(shutil, "rmtree") as mock_rmtree:
lock.release()
mock_rmtree.assert_not_called()
mock_has_lock.assert_called_once_with()
def test_release_success(self, lock):
with patch.object(lock, "_has_lock", return_value=True) as mock_has_lock, \
patch.object(shutil, "rmtree") as mock_rmtree:
lock.release()
mock_rmtree.assert_called_once_with(lock.lock_dir_path)
mock_has_lock.assert_called_once_with()
def test_release_throws_error(self, lock):
with patch.object(lock, "_has_lock", return_value=True) as mock_has_lock, \
pytest.raises(OSError), \
patch.object(shutil, "rmtree", side_effect=OSError()) as mock_rmtree:
lock.release()
mock_rmtree.assert_called_once_with(lock.lock_dir_path)
mock_has_lock.assert_called_once_with()
# blocking_acquire
def test_blocking_acquire(self, lock):
with patch.object(time, "time", side_effect=(0, 1, 2)) as mock_time, \
patch.object(lock, "_acquire_lock", side_effect=(False, True)) as mock_acquire_lock, \
patch("spccore.internal.lock.doze") as mock_doze:
assert lock.blocking_acquire()
assert mock_time.call_count == 3
mock_acquire_lock.assert_has_calls([call(break_old_locks=True), call(break_old_locks=True)])
mock_doze.assert_called_once_with(CACHE_UNLOCK_WAIT_TIME_SEC)
def test_blocking_acquire_timeout(self, lock):
with pytest.raises(LockException), \
patch.object(time, "time", side_effect=(0, 1, 2)) as mock_time, \
patch.object(lock, "_acquire_lock", side_effect=(False, True)) as mock_acquire_lock, \
patch("spccore.internal.lock.doze") as mock_doze:
lock.blocking_acquire(timeout=datetime.timedelta(seconds=2))
assert mock_time.call_count == 3
mock_acquire_lock.assert_has_calls([call(break_old_locks=True), call(break_old_locks=True)])
mock_doze.assert_called_once_with(CACHE_UNLOCK_WAIT_TIME_SEC)
def test_blocking_acquire_with_no_break_old_lock(self, lock):
with patch.object(time, "time", side_effect=(0, 1)) as mock_time, \
patch.object(lock, "_acquire_lock", return_value=True) as mock_acquire_lock, \
patch("spccore.internal.lock.doze") as mock_doze:
assert lock.blocking_acquire(break_old_locks=False)
assert mock_time.call_count == 2
mock_acquire_lock.assert_has_calls([call(break_old_locks=False)])
mock_doze.assert_not_called()
| 48.29085 | 111 | 0.662651 | 2,000 | 14,777 | 4.4865 | 0.0565 | 0.05015 | 0.089156 | 0.111445 | 0.847988 | 0.809874 | 0.772317 | 0.753928 | 0.743118 | 0.736654 | 0 | 0.004102 | 0.241186 | 14,777 | 305 | 112 | 48.44918 | 0.796129 | 0.007376 | 0 | 0.577075 | 0 | 0 | 0.040049 | 0.005322 | 0 | 0 | 0 | 0 | 0.403162 | 1 | 0.126482 | false | 0 | 0.011858 | 0.023715 | 0.16996 | 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 |
d48eb58491d7fe9e21b467481d5766e0089f55dd | 56 | py | Python | 001113StepikPyGEK/StepikPyGEK001113сh02p04st10C02_20200407.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | 001113StepikPyGEK/StepikPyGEK001113сh02p04st10C02_20200407.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | 001113StepikPyGEK/StepikPyGEK001113сh02p04st10C02_20200407.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | print(float(input()) * float(input()) * float(input()))
| 28 | 55 | 0.625 | 7 | 56 | 5 | 0.428571 | 0.857143 | 0.857143 | 1.142857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.089286 | 56 | 1 | 56 | 56 | 0.686275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 7 |
d490ac412e0d7eebd3c0a0de8c945f4b003e40e2 | 9,566 | py | Python | tests/integration/docusaurus/connecting_to_your_data/how_to_introspect_and_partition_your_data/files/yaml_example_gradual.py | OmriBromberg/great_expectations | 60eb81ebfb08fef5d37d55c316dc962928beb165 | [
"Apache-2.0"
] | 1 | 2021-04-11T20:54:23.000Z | 2021-04-11T20:54:23.000Z | tests/integration/docusaurus/connecting_to_your_data/how_to_introspect_and_partition_your_data/files/yaml_example_gradual.py | OmriBromberg/great_expectations | 60eb81ebfb08fef5d37d55c316dc962928beb165 | [
"Apache-2.0"
] | 53 | 2021-10-02T02:26:51.000Z | 2021-12-28T20:49:25.000Z | tests/integration/docusaurus/connecting_to_your_data/how_to_introspect_and_partition_your_data/files/yaml_example_gradual.py | OmriBromberg/great_expectations | 60eb81ebfb08fef5d37d55c316dc962928beb165 | [
"Apache-2.0"
] | 1 | 2021-12-23T13:37:32.000Z | 2021-12-23T13:37:32.000Z | import os
from ruamel import yaml
import great_expectations as ge
context = ge.get_context()
datasource_yaml = f"""
name: taxi_datasource
class_name: Datasource
module_name: great_expectations.datasource
execution_engine:
module_name: great_expectations.execution_engine
class_name: PandasExecutionEngine
data_connectors:
default_inferred_data_connector_name:
class_name: InferredAssetFilesystemDataConnector
base_directory: <PATH_TO_YOUR_DATA_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names:
- data_asset_name
"""
# Please note this override is only to provide good UX for docs and tests.
# In normal usage you'd set your path directly in the yaml above.
data_dir_path = os.path.join("..", "data")
datasource_yaml = datasource_yaml.replace("<PATH_TO_YOUR_DATA_HERE>", data_dir_path)
context.test_yaml_config(datasource_yaml)
buggy_data_connector_yaml = f"""
buggy_inferred_data_connector_name:
class_name: InferredAssetFilesystemDataConnector
base_directory: <PATH_TO_YOUR_DATA_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names: # required "data_asset_name" reserved group name for "InferredAssetFilePathDataConnector" is absent
- nonexistent_group_name
"""
# noinspection PyRedeclaration
buggy_datasource_yaml = f"""
name: taxi_datasource
class_name: Datasource
module_name: great_expectations.datasource
execution_engine:
module_name: great_expectations.execution_engine
class_name: PandasExecutionEngine
data_connectors:
default_inferred_data_connector_name:
class_name: InferredAssetFilesystemDataConnector
base_directory: <PATH_TO_YOUR_DATA_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names:
- data_asset_name
buggy_inferred_data_connector_name:
class_name: InferredAssetFilesystemDataConnector
base_directory: <PATH_TO_YOUR_DATA_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names: # required "data_asset_name" reserved group name for "InferredAssetFilePathDataConnector" is absent
- nonexistent_group_name
"""
buggy_datasource_yaml = buggy_datasource_yaml.replace(
"<PATH_TO_YOUR_DATA_HERE>", data_dir_path
)
context.test_yaml_config(buggy_datasource_yaml)
another_buggy_data_connector_yaml = f"""
buggy_inferred_data_connector_name:
class_name: InferredAssetFilesystemDataConnector
base_directory: <PATH_TO_BAD_DATA_DIRECTORY_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names:
- data_asset_name
"""
# noinspection PyRedeclaration
buggy_datasource_yaml = f"""
name: taxi_datasource
class_name: Datasource
module_name: great_expectations.datasource
execution_engine:
module_name: great_expectations.execution_engine
class_name: PandasExecutionEngine
data_connectors:
default_inferred_data_connector_name:
class_name: InferredAssetFilesystemDataConnector
base_directory: <PATH_TO_BAD_DATA_DIRECTORY_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names:
- data_asset_name
buggy_inferred_data_connector_name:
class_name: InferredAssetFilesystemDataConnector
base_directory: <PATH_TO_YOUR_DATA_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names:
- data_asset_name
"""
buggy_datasource_yaml = buggy_datasource_yaml.replace(
"<PATH_TO_BAD_DATA_DIRECTORY_HERE>", data_dir_path
)
report = context.test_yaml_config(
buggy_datasource_yaml, return_mode="report_object", shorten_tracebacks=True
)
context.add_datasource(**yaml.load(datasource_yaml))
available_data_asset_names = context.datasources[
"taxi_datasource"
].get_available_data_asset_names(
data_connector_names="default_inferred_data_connector_name"
)[
"default_inferred_data_connector_name"
]
assert len(available_data_asset_names) == 36
bare_bones_configured_data_connector_yaml = f"""
configured_data_connector_name:
class_name: ConfiguredAssetFilesystemDataConnector
base_directory: <PATH_TO_YOUR_DATA_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names:
- data_asset_name
assets: {{}}
"""
datasource_yaml = f"""
name: taxi_datasource
class_name: Datasource
module_name: great_expectations.datasource
execution_engine:
module_name: great_expectations.execution_engine
class_name: PandasExecutionEngine
data_connectors:
configured_data_connector_name:
class_name: ConfiguredAssetFilesystemDataConnector
base_directory: <PATH_TO_YOUR_DATA_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names:
- data_asset_name
assets: {{}}
"""
datasource_yaml = datasource_yaml.replace("<PATH_TO_YOUR_DATA_HERE>", data_dir_path)
context.test_yaml_config(datasource_yaml)
configured_data_connector_yaml = f"""
configured_data_connector_name:
class_name: ConfiguredAssetFilesystemDataConnector
base_directory: <PATH_TO_YOUR_DATA_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names:
- data_asset_name
assets:
taxi_data_flat:
base_directory: samples_2020
pattern: (yellow_tripdata_sample_.+)\\.csv
group_names:
- filename
"""
datasource_yaml = f"""
name: taxi_datasource
class_name: Datasource
module_name: great_expectations.datasource
execution_engine:
module_name: great_expectations.execution_engine
class_name: PandasExecutionEngine
data_connectors:
configured_data_connector_name:
class_name: ConfiguredAssetFilesystemDataConnector
base_directory: <PATH_TO_YOUR_DATA_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names:
- data_asset_name
assets:
taxi_data_flat:
base_directory: samples_2020
pattern: (yellow_tripdata_sample_.+)\\.csv
group_names:
- filename
"""
datasource_yaml = datasource_yaml.replace("<PATH_TO_YOUR_DATA_HERE>", data_dir_path)
context.test_yaml_config(datasource_yaml)
context.add_datasource(**yaml.load(datasource_yaml))
available_data_asset_names = context.datasources[
"taxi_datasource"
].get_available_data_asset_names(data_connector_names="configured_data_connector_name")[
"configured_data_connector_name"
]
assert len(available_data_asset_names) == 1
# noinspection PyRedeclaration
configured_data_connector_yaml = f"""
configured_data_connector_name:
class_name: ConfiguredAssetFilesystemDataConnector
base_directory: <PATH_TO_YOUR_DATA_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names:
- data_asset_name
assets:
taxi_data_flat:
base_directory: samples_2020
pattern: (yellow_tripdata_sample_.+)\\.csv
group_names:
- filename
taxi_data_year_month:
base_directory: samples_2020
pattern: ([\\w]+)_tripdata_sample_(\\d{{4}})-(\\d{{2}})\\.csv
group_names:
- name
- year
- month
"""
datasource_yaml = f"""
name: taxi_datasource
class_name: Datasource
module_name: great_expectations.datasource
execution_engine:
module_name: great_expectations.execution_engine
class_name: PandasExecutionEngine
data_connectors:
default_inferred_data_connector_name:
class_name: InferredAssetFilesystemDataConnector
base_directory: <PATH_TO_YOUR_DATA_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names:
- data_asset_name
configured_data_connector_name:
class_name: ConfiguredAssetFilesystemDataConnector
base_directory: <PATH_TO_YOUR_DATA_HERE>
glob_directive: "*.csv"
default_regex:
pattern: (.*)
group_names:
- data_asset_name
assets:
taxi_data_flat:
base_directory: samples_2020
pattern: (yellow_tripdata_sample_.+)\\.csv
group_names:
- filename
taxi_data_year_month:
base_directory: samples_2020
pattern: ([\\w]+)_tripdata_sample_(\\d{{4}})-(\\d{{2}})\\.csv
group_names:
- name
- year
- month
"""
datasource_yaml = datasource_yaml.replace("<PATH_TO_YOUR_DATA_HERE>", data_dir_path)
context.test_yaml_config(datasource_yaml)
context.add_datasource(**yaml.load(datasource_yaml))
available_data_asset_names = context.datasources[
"taxi_datasource"
].get_available_data_asset_names(data_connector_names="configured_data_connector_name")[
"configured_data_connector_name"
]
assert len(available_data_asset_names) == 2
# NOTE: The following code is only for testing and can be ignored by users.
assert "taxi_datasource" in [ds["name"] for ds in context.list_datasources()]
assert "yellow_tripdata_sample_2019-01.csv" in set(
context.get_available_data_asset_names()["taxi_datasource"][
"default_inferred_data_connector_name"
]
)
| 31.159609 | 123 | 0.705729 | 1,032 | 9,566 | 6.052326 | 0.117248 | 0.067243 | 0.057157 | 0.038104 | 0.92155 | 0.904739 | 0.901537 | 0.892091 | 0.892091 | 0.884246 | 0 | 0.005072 | 0.21681 | 9,566 | 306 | 124 | 31.261438 | 0.828617 | 0.031047 | 0 | 0.88806 | 0 | 0 | 0.774347 | 0.287519 | 0 | 0 | 0 | 0 | 0.018657 | 1 | 0 | false | 0 | 0.011194 | 0 | 0.011194 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
d4ac95b26697208d65ccc73c601ed33ecedd34c4 | 13,977 | py | Python | iotbx/pdb/tst_secondary_structure_2.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | iotbx/pdb/tst_secondary_structure_2.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | iotbx/pdb/tst_secondary_structure_2.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 115 | 2016-11-15T08:17:28.000Z | 2022-02-09T15:30:14.000Z | from __future__ import absolute_import, division, print_function
from libtbx import test_utils
import sys
from iotbx.pdb.tst_secondary_structure import pdb_1ywf_sample_strings, \
get_annotation
import iotbx.pdb
from iotbx.pdb.utils import all_chain_ids
from iotbx.pdb.secondary_structure import annotation
from six.moves import cStringIO as StringIO
def tst_parsing_phil_single_helix():
phil_hbond_portion = """\
hbond {
donor = chain A and resid 37 and name O
acceptor = chain A and resid 41 and name N
}
hbond {
donor = chain A and resid 38 and name O
acceptor = chain A and resid 42 and name N
}
hbond {
donor = chain A and resid 39 and name O
acceptor = chain A and resid 43 and name N
}
hbond {
donor = chain A and resid 40 and name O
acceptor = chain A and resid 44 and name N
}
hbond {
donor = chain A and resid 41 and name O
acceptor = chain A and resid 45 and name N
}
hbond {
donor = chain A and resid 42 and name O
acceptor = chain A and resid 46 and name N
}
hbond {
donor = chain A and resid 43 and name O
acceptor = chain A and resid 47 and name N
}
hbond {
donor = chain A and resid 44 and name O
acceptor = chain A and resid 48 and name N
}
"""
phil_str1 = """\
secondary_structure.protein.helix {
selection = chain A and resseq 37:48
helix_type = *alpha pi 3_10 unknown
%s
}
""" % phil_hbond_portion
phil_str2 = """\
secondary_structure.protein.helix {
selection = chain A and resseq 37:48
helix_type = alpha *pi 3_10 unknown
}
"""
phil_str3 = """\
secondary_structure.protein.helix {
selection = chain A and resseq 37:48
helix_type = alpha pi *3_10 unknown
}
"""
phil_str4 = """\
secondary_structure.protein.helix {
selection = chain A and resseq 37:48
helix_type = alpha pi 3_10 *unknown
}
"""
phil_str5 = """\
secondary_structure.protein.helix {
serial_number = 1
selection = chain A and resseq 37:48
helix_type = *alpha pi 3_10 unknown
}
"""
phil_str6 = """\
secondary_structure.protein.helix {
serial_number = 2
helix_identifier = A
selection = chain A and resseq 37:48
helix_type = *alpha pi 3_10 unknown
}
"""
phil_str7 = """\
secondary_structure.protein.helix {
serial_number = 3
helix_identifier = BB
selection = chain A and resseq 37:48
helix_type = *alpha pi 3_10 unknown
}
"""
phil_str8 = """\
secondary_structure.protein.helix {
serial_number = 1
helix_identifier = C12
selection = chain A and resseq 37:48
helix_type = *alpha pi 3_10 unknown
}
"""
phil_str9 = """\
secondary_structure.protein.helix {
serial_number = 1
helix_identifier = D123
selection = chain A and resseq 37:48
helix_type = *alpha pi 3_10 unknown
}
"""
result1 = """\
protein.helix {
helix_identifier = 0
selection = chain 'A' and resid 37 through 48
helix_type = alpha
hbond {
donor = chain A and resid 37 and name O
acceptor = chain A and resid 41 and name N
}
hbond {
donor = chain A and resid 38 and name O
acceptor = chain A and resid 42 and name N
}
hbond {
donor = chain A and resid 39 and name O
acceptor = chain A and resid 43 and name N
}
hbond {
donor = chain A and resid 40 and name O
acceptor = chain A and resid 44 and name N
}
hbond {
donor = chain A and resid 41 and name O
acceptor = chain A and resid 45 and name N
}
hbond {
donor = chain A and resid 42 and name O
acceptor = chain A and resid 46 and name N
}
hbond {
donor = chain A and resid 43 and name O
acceptor = chain A and resid 47 and name N
}
hbond {
donor = chain A and resid 44 and name O
acceptor = chain A and resid 48 and name N
}
}"""
result1_1 = """\
protein.helix {
helix_identifier = 0
selection = chain 'A' and resid 37 through 48
helix_type = alpha
}"""
result2_9 = """\
==================================================
protein.helix {
helix_identifier = 0
selection = chain 'A' and resid 37 through 48
helix_type = pi
}
HELIX 0 0 ASP A 37 GLY A 48 3 12
==================================================
protein.helix {
helix_identifier = 0
selection = chain 'A' and resid 37 through 48
helix_type = 3_10
}
HELIX 0 0 ASP A 37 GLY A 48 5 12
==================================================
protein.helix {
helix_identifier = 0
selection = chain 'A' and resid 37 through 48
helix_type = unknown
}
HELIX 0 0 ASP A 37 GLY A 48 1 12
==================================================
protein.helix {
serial_number = 1
helix_identifier = 1
selection = chain 'A' and resid 37 through 48
helix_type = alpha
}
HELIX 1 1 ASP A 37 GLY A 48 1 12
==================================================
protein.helix {
serial_number = 2
helix_identifier = A
selection = chain 'A' and resid 37 through 48
helix_type = alpha
}
HELIX 2 A ASP A 37 GLY A 48 1 12
==================================================
protein.helix {
serial_number = 3
helix_identifier = BB
selection = chain 'A' and resid 37 through 48
helix_type = alpha
}
HELIX 3 BB ASP A 37 GLY A 48 1 12
==================================================
protein.helix {
serial_number = 1
helix_identifier = C12
selection = chain 'A' and resid 37 through 48
helix_type = alpha
}
HELIX 1 C12 ASP A 37 GLY A 48 1 12
==================================================
protein.helix {
serial_number = 1
helix_identifier = D123
selection = chain 'A' and resid 37 through 48
helix_type = alpha
}
HELIX 1 D12 ASP A 37 GLY A 48 1 12
"""
annot, ss_from_file = get_annotation(
phil_lines=phil_str1,
pdb_lines=pdb_1ywf_sample_strings)
assert annot.get_n_helices() == 1
assert annot.get_n_sheets() == 0
h = annot.helices[0]
assert h.get_n_defined_hbonds() == 8
assert annot.get_n_defined_hbonds() == 8
res = h.as_restraint_group(show_hbonds=True)
assert not test_utils.show_diff(res, result1,
strip_trailing_whitespace=True)
res = h.as_restraint_group(show_hbonds=False)
assert not test_utils.show_diff(res, result1_1,
strip_trailing_whitespace=True)
out = StringIO()
for ph_str in [phil_str2, phil_str3, phil_str4, phil_str5, phil_str6,
phil_str7, phil_str8, phil_str9]:
print("="*50, file=out)
annot, ss_from_file = get_annotation(
phil_lines=ph_str,
pdb_lines=pdb_1ywf_sample_strings)
assert annot.get_n_defined_hbonds() == 0
assert annot.get_n_helices() == 1
assert annot.get_n_sheets() == 0
h = annot.helices[0]
print(h.as_restraint_group(), file=out)
print(h.as_pdb_str(), file=out)
assert not test_utils.show_diff(out.getvalue(), result2_9,
strip_trailing_whitespace=True)
print("OK")
def tst_parsing_phil_single_sheet():
phil_hbond_portion = """\
hbond {
donor = chain A and resid 29 and name O
acceptor = chain A and resid 13 and name N
}
hbond {
donor = chain A and resid 13 and name O
acceptor = chain A and resid 29 and name N
}
hbond {
donor = chain A and resid 53 and name O
acceptor = chain A and resid 159 and name N
}
hbond {
donor = chain A and resid 157 and name O
acceptor = chain A and resid 53 and name N
}
hbond {
donor = chain A and resid 51 and name O
acceptor = chain A and resid 157 and name N
}
hbond {
donor = chain A and resid 76 and name O
acceptor = chain A and resid 54 and name N
}
hbond {
donor = chain A and resid 52 and name O
acceptor = chain A and resid 76 and name N
}
hbond {
donor = chain A and resid 74 and name O
acceptor = chain A and resid 52 and name N
}
"""
phil_str_1 = """\
secondary_structure.protein.sheet {
first_strand = chain A and resseq 13:14
sheet_id = A
strand {
selection = chain A and resseq 27:30
sense = antiparallel
bond_start_current = chain A and resseq 29 and name O
bond_start_previous = chain A and resseq 13 and name N
}
strand {
selection = chain A and resseq 156:159
sense = parallel
bond_start_current = chain A and resseq 156 and name O
bond_start_previous = chain A and resseq 28 and name N
}
strand {
selection = chain A and resseq 51:54
sense = parallel
bond_start_current = chain A and resseq 51 and name O
bond_start_previous = chain A and resseq 157 and name N
}
strand {
selection = chain A and resseq 74:77
sense = parallel
bond_start_current = chain A and resseq 74 and name O
bond_start_previous = chain A and resseq 52 and name N
}
%s
}
""" % phil_hbond_portion
phil_str_1_1 = """\
secondary_structure.protein.sheet {
first_strand = chain A and resseq 13:14
sheet_id = AA
strand {
selection = chain A and resseq 27:30
sense = antiparallel
bond_start_current = chain A and resseq 29 and name O
bond_start_previous = chain A and resseq 13 and name N
}
strand {
selection = chain A and resseq 156:159
sense = parallel
bond_start_current = chain A and resseq 156 and name O
bond_start_previous = chain A and resseq 28 and name N
}
strand {
selection = chain A and resseq 51:54
sense = parallel
bond_start_current = chain A and resseq 51 and name O
bond_start_previous = chain A and resseq 157 and name N
}
strand {
selection = chain A and resseq 74:77
sense = parallel
bond_start_current = chain A and resseq 74 and name O
bond_start_previous = chain A and resseq 52 and name N
}
}
"""
result1 = """
protein.sheet {
sheet_id = " A"
first_strand = chain 'A' and resid 13 through 14
strand {
selection = chain 'A' and resid 27 through 30
sense = antiparallel
bond_start_current = chain 'A' and resid 29 and name O
bond_start_previous = chain 'A' and resid 13 and name N
}
strand {
selection = chain 'A' and resid 156 through 159
sense = parallel
bond_start_current = chain 'A' and resid 156 and name O
bond_start_previous = chain 'A' and resid 28 and name N
}
strand {
selection = chain 'A' and resid 51 through 54
sense = parallel
bond_start_current = chain 'A' and resid 51 and name O
bond_start_previous = chain 'A' and resid 157 and name N
}
strand {
selection = chain 'A' and resid 74 through 77
sense = parallel
bond_start_current = chain 'A' and resid 74 and name O
bond_start_previous = chain 'A' and resid 52 and name N
}
hbond {
donor = chain A and resid 29 and name O
acceptor = chain A and resid 13 and name N
}
hbond {
donor = chain A and resid 13 and name O
acceptor = chain A and resid 29 and name N
}
hbond {
donor = chain A and resid 53 and name O
acceptor = chain A and resid 159 and name N
}
hbond {
donor = chain A and resid 157 and name O
acceptor = chain A and resid 53 and name N
}
hbond {
donor = chain A and resid 51 and name O
acceptor = chain A and resid 157 and name N
}
hbond {
donor = chain A and resid 76 and name O
acceptor = chain A and resid 54 and name N
}
hbond {
donor = chain A and resid 52 and name O
acceptor = chain A and resid 76 and name N
}
hbond {
donor = chain A and resid 74 and name O
acceptor = chain A and resid 52 and name N
}
}"""
result1_1 = """
protein.sheet {
sheet_id = " A"
first_strand = chain 'A' and resid 13 through 14
strand {
selection = chain 'A' and resid 27 through 30
sense = antiparallel
bond_start_current = chain 'A' and resid 29 and name O
bond_start_previous = chain 'A' and resid 13 and name N
}
strand {
selection = chain 'A' and resid 156 through 159
sense = parallel
bond_start_current = chain 'A' and resid 156 and name O
bond_start_previous = chain 'A' and resid 28 and name N
}
strand {
selection = chain 'A' and resid 51 through 54
sense = parallel
bond_start_current = chain 'A' and resid 51 and name O
bond_start_previous = chain 'A' and resid 157 and name N
}
strand {
selection = chain 'A' and resid 74 through 77
sense = parallel
bond_start_current = chain 'A' and resid 74 and name O
bond_start_previous = chain 'A' and resid 52 and name N
}
}"""
annot, ss_from_file = get_annotation(
phil_lines=phil_str_1,
pdb_lines=pdb_1ywf_sample_strings)
assert annot.get_n_helices() == 0
assert annot.get_n_sheets() == 1
sh = annot.sheets[0]
assert sh.get_n_defined_hbonds() == 8
assert annot.get_n_defined_hbonds() == 8
res = sh.as_restraint_group(show_hbonds=True)
assert not test_utils.show_diff(res, result1,
strip_trailing_whitespace=True)
res = sh.as_restraint_group(show_hbonds=False)
assert not test_utils.show_diff(res, result1_1,
strip_trailing_whitespace=True)
print("OK")
def tst_hybrid_ids():
inp = iotbx.pdb.input(source_info=None, lines=pdb_1ywf_sample_strings)
ss_ann = inp.extract_secondary_structure()
ch_ids = all_chain_ids()[1:1000]
chain_ids_dict = {'A': ch_ids}
ss_ann.multiply_to_asu_2(chain_ids_dict)
# print (ss_ann.as_pdb_str())
ss_big = annotation.from_records(ss_ann.as_pdb_str().split('\n'))
# print (ss_big.as_restraint_groups())
ss_big.as_restraint_groups()
def exercise(args):
tst_parsing_phil_single_helix()
tst_parsing_phil_single_sheet()
tst_hybrid_ids()
if (__name__ == "__main__"):
exercise(sys.argv[1:])
| 28.937888 | 76 | 0.632253 | 2,119 | 13,977 | 4.009438 | 0.082586 | 0.095339 | 0.143008 | 0.164783 | 0.902189 | 0.870645 | 0.859934 | 0.854167 | 0.841808 | 0.818856 | 0 | 0.055605 | 0.274308 | 13,977 | 482 | 77 | 28.997925 | 0.782017 | 0.004579 | 0 | 0.684783 | 0 | 0 | 0.775557 | 0.054853 | 0 | 0 | 0 | 0 | 0.034783 | 1 | 0.008696 | false | 0 | 0.017391 | 0 | 0.026087 | 0.013043 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
be00d972e85a8d21c3b35a21ed6547bc19520e43 | 7,034 | py | Python | backend/wod_board/tests/routers/test_round.py | GuillaumeOj/P13-WOD-Board | 36df7979e63c354507edb56eabdfc548b1964d08 | [
"MIT"
] | null | null | null | backend/wod_board/tests/routers/test_round.py | GuillaumeOj/P13-WOD-Board | 36df7979e63c354507edb56eabdfc548b1964d08 | [
"MIT"
] | 82 | 2021-01-17T18:12:23.000Z | 2021-06-12T21:46:49.000Z | backend/wod_board/tests/routers/test_round.py | GuillaumeOj/WodBoard | 1ac12404f6094909c9bf116bcaf6ccd60e85bc00 | [
"MIT"
] | null | null | null | import daiquiri
import pytest
from wod_board.models import wod_round
from wod_board.schemas import round_schemas
LOG = daiquiri.getLogger(__name__)
@pytest.mark.asyncio
async def test_create_round(db, client, db_wod, token, admin):
assert db.query(wod_round.Round).count() == 0
round_json = {
"position": 1,
"wodId": db_wod.id,
}
response = await client.post(
"/api/round",
json=round_json,
headers={"Authorization": f"Bearer {token.access_token}"},
)
expected_response = round_json | {
"id": 1,
"parentId": None,
"durationSeconds": 0,
"repetition": 0,
"subRounds": [],
"goals": [],
}
assert response.status_code == 200
assert response.json() == expected_response
assert db.query(wod_round.Round).count() == 1
round_json = {
"position": 1,
"wodId": 0,
}
response = await client.post(
"/api/round",
json=round_json,
headers={"Authorization": f"Bearer {token.access_token}"},
)
assert response.status_code == 422
assert response.json() == {"detail": "This WOD doesn't exist"}
assert db.query(wod_round.Round).count() == 1
round_json = {
"position": 1,
"wodId": db_wod.id,
}
response = await client.post(
"/api/round",
json=round_json,
headers={"Authorization": f"Bearer {token.access_token}"},
)
assert response.status_code == 422
assert response.json() == {"detail": "Rounds have the same position"}
assert db.query(wod_round.Round).count() == 1
response = await client.post(
"/api/round",
json=round_json,
)
assert response.status_code == 401
assert response.json() == {"detail": "Not authenticated"}
assert db.query(wod_round.Round).count() == 1
db_wod.author_id = admin.id
db.commit()
response = await client.post(
"/api/round",
json=round_json,
headers={"Authorization": f"Bearer {token.access_token}"},
)
assert response.status_code == 422
assert response.json() == {"detail": "Author don't match with authenticated user"}
assert db.query(wod_round.Round).count() == 1
@pytest.mark.asyncio
async def test_update_round(db, client, db_round, db_wod, admin, token):
assert db.query(wod_round.Round).count() == 1
round_json = {
"position": db_round.position,
"durationSeconds": 60,
"repetition": 5,
"wodId": db_round.wod_id,
}
response = await client.put(
f"/api/round/{db_round.id}",
json=round_json,
headers={"Authorization": f"Bearer {token.access_token}"},
)
expected_response = round_json | {
"id": db_round.id,
"parentId": None,
"subRounds": [],
"goals": [],
}
assert response.status_code == 200
assert response.json() == expected_response
assert db.query(wod_round.Round).count() == 1
response = await client.put(
"/api/round/2",
json=round_json,
headers={"Authorization": f"Bearer {token.access_token}"},
)
assert response.status_code == 422
assert response.json() == {"detail": "This round doesn't exist"}
assert db.query(wod_round.Round).count() == 1
response = await client.put(
f"/api/round/{db_round.id}",
json=round_json,
)
assert response.status_code == 401
assert response.json() == {"detail": "Not authenticated"}
assert db.query(wod_round.Round).count() == 1
round_json = {
"position": db_round.position,
"durationSeconds": 60,
"repetition": 5,
"wodId": 0,
}
response = await client.put(
f"/api/round/{db_round.id}",
json=round_json,
headers={"Authorization": f"Bearer {token.access_token}"},
)
assert response.status_code == 422
assert response.json() == {"detail": "This WOD doesn't exist"}
assert db.query(wod_round.Round).count() == 1
db.add(
wod_round.Round(
position=2,
repetition=0,
duration_seconds=0,
wod_id=db_round.wod_id,
)
)
db.commit()
assert db.query(wod_round.Round).count() == 2
round_json = {
"position": 2,
"durationSeconds": 60,
"repetition": 5,
"wodId": db_round.wod_id,
}
response = await client.put(
f"/api/round/{db_round.id}",
json=round_json,
headers={"Authorization": f"Bearer {token.access_token}"},
)
assert response.status_code == 422
assert response.json() == {"detail": "Rounds have the same position"}
assert db.query(wod_round.Round).count() == 2
db_wod.author_id = admin.id
db.commit()
response = await client.put(
f"/api/round/{db_round.id}",
json=round_json,
headers={"Authorization": f"Bearer {token.access_token}"},
)
assert response.status_code == 422
assert response.json() == {"detail": "Author don't match with authenticated user"}
assert db.query(wod_round.Round).count() == 2
@pytest.mark.asyncio
async def test_delete_round_by_id(db, client, db_round, db_wod, db_user, admin, token):
assert db.query(wod_round.Round).count() == 1
response = await client.delete(
"api/round/2", headers={"Authorization": f"Bearer {token.access_token}"}
)
assert response.status_code == 422
assert response.json() == {"detail": "This round doesn't exist"}
assert db.query(wod_round.Round).count() == 1
response = await client.delete(
f"api/round/{db_round.id}",
)
assert response.status_code == 401
assert response.json() == {"detail": "Not authenticated"}
assert db.query(wod_round.Round).count() == 1
db_wod.author_id = admin.id
db.commit()
response = await client.delete(
f"api/round/{db_round.id}",
headers={"Authorization": f"Bearer {token.access_token}"},
)
assert response.status_code == 422
assert response.json() == {"detail": "Author don't match with authenticated user"}
assert db.query(wod_round.Round).count() == 1
db_wod.author_id = db_user.id
db.commit()
response = await client.delete(
f"api/round/{db_round.id}",
headers={"Authorization": f"Bearer {token.access_token}"},
)
assert response.status_code == 200
assert response.json() == {"detail": "Round successfully deleted"}
assert db.query(wod_round.Round).count() == 0
@pytest.mark.asyncio
async def test_get_rounds_by_wod_id(db, client, db_round, db_wod):
assert db.query(wod_round.Round).count() == 1
response = await client.get(f"/api/round/rounds/{db_wod.id}")
assert response.status_code == 200
assert response.json() == [
round_schemas.Round.from_orm(db_round).dict(by_alias=True)
]
response = await client.get("/api/round/rounds/2")
assert response.status_code == 422
assert response.json() == {"detail": "This WOD doesn't exist"}
| 30.188841 | 87 | 0.616861 | 880 | 7,034 | 4.775 | 0.097727 | 0.113279 | 0.064969 | 0.076154 | 0.877915 | 0.876963 | 0.844598 | 0.834127 | 0.795098 | 0.791766 | 0 | 0.017701 | 0.236992 | 7,034 | 232 | 88 | 30.318966 | 0.765232 | 0 | 0 | 0.728643 | 0 | 0 | 0.209696 | 0.030992 | 0 | 0 | 0 | 0 | 0.271357 | 1 | 0 | false | 0 | 0.020101 | 0 | 0.020101 | 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 |
be1431eb4b753d38a425bb301e591e901943a00d | 2,264 | py | Python | app/__init__.py | GinnyGaga/lanbo | d0bd200b93643d3ede69b5fcce72cefd5c167e37 | [
"MIT"
] | null | null | null | app/__init__.py | GinnyGaga/lanbo | d0bd200b93643d3ede69b5fcce72cefd5c167e37 | [
"MIT"
] | null | null | null | app/__init__.py | GinnyGaga/lanbo | d0bd200b93643d3ede69b5fcce72cefd5c167e37 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_bootstrap import Bootstrap
from flask_mail import Mail
from flask_moment import Moment
from flask_sqlalchemy import SQLAlchemy
<<<<<<< HEAD
from flask_login import LoginManager
from flask_pagedown import PageDown
from config import config
=======
from config import config
from flask_login import LoginManager
from flask_pagedown import PageDown
login_manager = LoginManager()
login_manager.session_protection='strong'
login_manager.login_view = 'auth.login'
>>>>>>> 17-app-1
bootstrap = Bootstrap()
mail = Mail()
moment = Moment()
db = SQLAlchemy()
pagedown = PageDown()
<<<<<<< HEAD
login_manager = LoginManager()
login_manager.session_protection = 'strong'
login_manager.login_view = 'auth.login'
def create_app(config_name):
app = Flask(__name__)
app.config.from_object(config[config_name])
config[config_name].init_app(app)
bootstrap.init_app(app)
mail.init_app(app)
moment.init_app(app)
db.init_app(app)
login_manager.init_app(app)
pagedown.init_app(app)
if not app.debug and not app.testing and not app.config['SSL_DISABLE']:
from flask_sslify import SSLify
sslify = SSLify(app)
from .main import main as main_blueprint
app.register_blueprint(main_blueprint)
from .auth import auth as auth_blueprint
app.register_blueprint(auth_blueprint, url_prefix='/auth')
from .api_1_0 import api as api_1_0_blueprint
app.register_blueprint(api_1_0_blueprint, url_prefix='/api/v1.0')
return app
=======
def create_app(config_name):
app = Flask(__name__)
app.config.from_object(config[config_name])
config[config_name].init_app(app)
bootstrap.init_app(app)
mail.init_app(app)
moment.init_app(app)
db.init_app(app)
login_manager.init_app(app)
pagedown.init_app(app)
if not app.debug and not app.testing and not app.config['SSL_DISABLE']:
from flask_sslify import SSLify
sslify = SSLify(app)
from .main import main as main_blueprint
app.register_blueprint(main_blueprint)
from .auth import auth as auth_blueprint
app.register_blueprint(auth_blueprint,url_prefix='/auth')
from .api_1_0 import api as api_1_0_blueprint
app.register_blueprint(api_1_0_blueprint,url_prefix='/api/v1.0')
return app
>>>>>>> 17-app-1
| 25.438202 | 75 | 0.759717 | 338 | 2,264 | 4.822485 | 0.133136 | 0.060123 | 0.08589 | 0.106748 | 0.862577 | 0.835583 | 0.835583 | 0.835583 | 0.835583 | 0.835583 | 0 | 0.011311 | 0.140901 | 2,264 | 88 | 76 | 25.727273 | 0.826735 | 0 | 0 | 0.852941 | 0 | 0 | 0.036219 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.279412 | null | null | 0.176471 | 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 |
07b3e0ff34e4b26e0c7f1d79c31b95a91365c0f2 | 2,469 | py | Python | hanlp/pretrained/mtl.py | chen88358323/HanLP | ee9066c3b7aad405dfe0ccffb7f66c59017169ae | [
"Apache-2.0"
] | 3 | 2022-03-07T08:33:16.000Z | 2022-03-07T08:38:08.000Z | hanlp/pretrained/mtl.py | hushaoyun/HanLP | 967b52404c9d0adbc0cff2699690c127ecfca36e | [
"Apache-2.0"
] | null | null | null | hanlp/pretrained/mtl.py | hushaoyun/HanLP | 967b52404c9d0adbc0cff2699690c127ecfca36e | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2020-12-22 13:16
from hanlp_common.constant import HANLP_URL
OPEN_TOK_POS_NER_SRL_DEP_SDP_CON_ELECTRA_SMALL_ZH = HANLP_URL + 'mtl/open_tok_pos_ner_srl_dep_sdp_con_electra_small_20201223_035557.zip'
"Electra (:cite:`clark2020electra`) small version of joint tok, pos, ner, srl, dep, sdp and con model trained on open-source Chinese corpus."
OPEN_TOK_POS_NER_SRL_DEP_SDP_CON_ELECTRA_BASE_ZH = HANLP_URL + 'mtl/open_tok_pos_ner_srl_dep_sdp_con_electra_base_20201223_201906.zip'
"Electra (:cite:`clark2020electra`) base version of joint tok, pos, ner, srl, dep, sdp and con model trained on open-source Chinese corpus."
CLOSE_TOK_POS_NER_SRL_DEP_SDP_CON_ELECTRA_SMALL_ZH = HANLP_URL + 'mtl/close_tok_pos_ner_srl_dep_sdp_con_electra_small_20210111_124159.zip'
"Electra (:cite:`clark2020electra`) small version of joint tok, pos, ner, srl, dep, sdp and con model trained on close-source Chinese corpus."
CLOSE_TOK_POS_NER_SRL_DEP_SDP_CON_ELECTRA_BASE_ZH = HANLP_URL + 'mtl/close_tok_pos_ner_srl_dep_sdp_con_electra_base_20210111_124519.zip'
"Electra (:cite:`clark2020electra`) base version of joint tok, pos, ner, srl, dep, sdp and con model trained on close-source Chinese corpus."
CLOSE_TOK_POS_NER_SRL_DEP_SDP_CON_ERNIE_GRAM_ZH = HANLP_URL + 'mtl/close_tok_pos_ner_srl_dep_sdp_con_ernie_gram_base_aug_20210904_145403.zip'
"ERNIE (:cite:`xiao-etal-2021-ernie`) base version of joint tok, pos, ner, srl, dep, sdp and con model trained on close-source Chinese corpus."
UD_ONTONOTES_TOK_POS_LEM_FEA_NER_SRL_DEP_SDP_CON_MT5_SMALL = HANLP_URL + 'mtl/ud_ontonotes_tok_pos_lem_fea_ner_srl_dep_sdp_con_mt5_small_20210228_123458.zip'
'mT5 (:cite:`xue-etal-2021-mt5`) small version of joint tok, pos, lem, fea, ner, srl, dep, sdp and con model trained on UD and OntoNotes5 corpus.'
UD_ONTONOTES_TOK_POS_LEM_FEA_NER_SRL_DEP_SDP_CON_XLMR_BASE = HANLP_URL + 'mtl/ud_ontonotes_tok_pos_lem_fea_ner_srl_dep_sdp_con_xlm_base_20210602_211620.zip'
'XLM-R (:cite:`conneau-etal-2020-unsupervised`) base version of joint tok, pos, lem, fea, ner, srl, dep, sdp and con model trained on UD and OntoNotes5 corpus.'
NPCMJ_UD_KYOTO_TOK_POS_CON_BERT_BASE_CHAR_JA = HANLP_URL + 'mtl/npcmj_ud_kyoto_tok_pos_ner_dep_con_srl_bert_base_char_ja_20210914_133742.zip'
'BERT (:cite:`devlin-etal-2019-bert`) base char encoder trained on NPCMJ/UD/Kyoto corpora with decoders including tok, pos, ner, dep, con, srl.'
# Will be filled up during runtime
ALL = {}
| 91.444444 | 160 | 0.8226 | 447 | 2,469 | 4.114094 | 0.212528 | 0.078303 | 0.102773 | 0.137031 | 0.747145 | 0.730832 | 0.706362 | 0.706362 | 0.706362 | 0.706362 | 0 | 0.072898 | 0.09437 | 2,469 | 26 | 161 | 94.961538 | 0.749553 | 0.036857 | 0 | 0 | 0 | 0.444444 | 0.73367 | 0.350611 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.055556 | 0 | 0.055556 | 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 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
07c595614b4ed4aa326e851e695e14899c186880 | 116 | py | Python | typed_python/dummy_test_module/__init__.py | APrioriInvestments/nativepython | 94e6b09d788e49cbe34b9b0d3c948218d7a8dcc5 | [
"Apache-2.0"
] | 52 | 2019-04-12T18:07:56.000Z | 2019-10-07T10:26:19.000Z | typed_python/dummy_test_module/__init__.py | APrioriInvestments/nativepython | 94e6b09d788e49cbe34b9b0d3c948218d7a8dcc5 | [
"Apache-2.0"
] | 135 | 2019-04-15T12:52:56.000Z | 2019-10-08T18:39:58.000Z | typed_python/dummy_test_module/__init__.py | APrioriInvestments/nativepython | 94e6b09d788e49cbe34b9b0d3c948218d7a8dcc5 | [
"Apache-2.0"
] | 1 | 2019-04-12T13:03:38.000Z | 2019-04-12T13:03:38.000Z | """A dummy module for testing purposes."""
import pytz
import numpy
def testfunction():
return "testfunction"
| 14.5 | 42 | 0.724138 | 14 | 116 | 6 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.172414 | 116 | 7 | 43 | 16.571429 | 0.875 | 0.310345 | 0 | 0 | 0 | 0 | 0.162162 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | true | 0 | 0.5 | 0.25 | 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 |
07f57722a58ff2fdb5f8361cb04238b084f5de5a | 5,034 | py | Python | waffle/tests/test_decorators.py | zenotech/django-waffle | ceee659dab521e79c6467787b9193888cf7182e2 | [
"BSD-3-Clause"
] | null | null | null | waffle/tests/test_decorators.py | zenotech/django-waffle | ceee659dab521e79c6467787b9193888cf7182e2 | [
"BSD-3-Clause"
] | null | null | null | waffle/tests/test_decorators.py | zenotech/django-waffle | ceee659dab521e79c6467787b9193888cf7182e2 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from waffle.models import Flag, Switch
from waffle.tests.base import TestCase
class DecoratorTests(TestCase):
def test_flag_must_be_active(self):
resp = self.client.get('/flag-on')
self.assertEqual(404, resp.status_code)
Flag.objects.create(name='foo', everyone=True)
resp = self.client.get('/flag-on')
self.assertEqual(200, resp.status_code)
def test_flag_must_be_inactive(self):
resp = self.client.get('/flag-off')
self.assertEqual(200, resp.status_code)
Flag.objects.create(name='foo', everyone=True)
resp = self.client.get('/flag-off')
self.assertEqual(404, resp.status_code)
def test_switch_must_be_active(self):
resp = self.client.get('/switch-on')
self.assertEqual(404, resp.status_code)
Switch.objects.create(name='foo', active=True)
resp = self.client.get('/switch-on')
self.assertEqual(200, resp.status_code)
def test_switch_must_be_inactive(self):
resp = self.client.get('/switch-off')
self.assertEqual(200, resp.status_code)
Switch.objects.create(name='foo', active=True)
resp = self.client.get('/switch-off')
self.assertEqual(404, resp.status_code)
def test_switch_must_be_inactive_and_redirect_to_view(self):
resp = self.client.get('/switched_view_with_valid_redirect')
self.assertEqual(302, resp.status_code)
Switch.objects.create(name='foo', active=True)
resp = self.client.get('/switched_view_with_valid_redirect')
self.assertEqual(200, resp.status_code)
def test_switch_must_be_inactive_and_redirect_to_named_view(self):
resp = self.client.get('/switched_view_with_valid_url_name')
self.assertEqual(302, resp.status_code)
Switch.objects.create(name='foo', active=True)
resp = self.client.get('/switched_view_with_valid_url_name')
self.assertEqual(200, resp.status_code)
def test_switch_must_be_inactive_and_redirect_to_view_with_args(self):
resp = self.client.get('/switched_view_with_args_with_valid_redirect/1/')
self.assertRedirects(resp, '/foo_view_with_args/1/')
Switch.objects.create(name='foo', active=True)
resp = self.client.get('/switched_view_with_args_with_valid_redirect/1/')
self.assertEqual(200, resp.status_code)
def test_switch_must_be_inactive_and_redirect_to_named_view_with_args(self):
resp = self.client.get('/switched_view_with_args_with_valid_url_name/1/')
self.assertRedirects(resp, '/foo_view_with_args/1/')
Switch.objects.create(name='foo', active=True)
resp = self.client.get('/switched_view_with_args_with_valid_url_name/1/')
self.assertEqual(200, resp.status_code)
def test_switch_must_be_inactive_and_not_redirect(self):
resp = self.client.get('/switched_view_with_invalid_redirect')
self.assertEqual(404, resp.status_code)
Switch.objects.create(name='foo', active=True)
resp = self.client.get('/switched_view_with_invalid_redirect')
self.assertEqual(200, resp.status_code)
def test_flag_must_be_inactive_and_redirect_to_view(self):
resp = self.client.get('/flagged_view_with_valid_redirect')
self.assertEqual(302, resp.status_code)
Flag.objects.create(name='foo', everyone=True)
resp = self.client.get('/flagged_view_with_valid_redirect')
self.assertEqual(200, resp.status_code)
def test_flag_must_be_inactive_and_redirect_to_named_view(self):
resp = self.client.get('/flagged_view_with_valid_url_name')
self.assertEqual(302, resp.status_code)
Flag.objects.create(name='foo', everyone=True)
resp = self.client.get('/flagged_view_with_valid_url_name')
self.assertEqual(200, resp.status_code)
def test_flag_must_be_inactive_and_redirect_to_view_with_args(self):
resp = self.client.get('/flagged_view_with_args_with_valid_redirect/1/')
self.assertRedirects(resp, '/foo_view_with_args/1/')
Flag.objects.create(name='foo', everyone=True)
resp = self.client.get('/flagged_view_with_args_with_valid_redirect/1/')
self.assertEqual(200, resp.status_code)
def test_flag_must_be_inactive_and_redirect_to_named_view_with_args(self):
resp = self.client.get('/flagged_view_with_args_with_valid_url_name/1/')
self.assertRedirects(resp, '/foo_view_with_args/1/')
Flag.objects.create(name='foo', everyone=True)
resp = self.client.get('/flagged_view_with_args_with_valid_url_name/1/')
self.assertEqual(200, resp.status_code)
def test_flag_must_be_inactive_and_not_redirect(self):
resp = self.client.get('/flagged_view_with_invalid_redirect')
self.assertEqual(404, resp.status_code)
Flag.objects.create(name='foo', everyone=True)
resp = self.client.get('/flagged_view_with_invalid_redirect')
self.assertEqual(200, resp.status_code)
| 47.942857 | 81 | 0.717521 | 702 | 5,034 | 4.787749 | 0.075499 | 0.066647 | 0.116632 | 0.141625 | 0.963404 | 0.960131 | 0.960131 | 0.958346 | 0.910146 | 0.908956 | 0 | 0.020043 | 0.167461 | 5,034 | 104 | 82 | 48.403846 | 0.781914 | 0 | 0 | 0.795455 | 0 | 0 | 0.196265 | 0.172825 | 0 | 0 | 0 | 0 | 0.318182 | 1 | 0.159091 | false | 0 | 0.034091 | 0 | 0.204545 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
ed34ea96b49f5bf4f89cd10da6f125cb2d5a7968 | 3,674 | py | Python | tests/components/hassio/test_auth.py | kdschlosser/home-assistant | a94a24f6f83508642e220fadf2799789dc32a25b | [
"Apache-2.0"
] | 4 | 2019-07-03T22:36:57.000Z | 2019-08-10T15:33:25.000Z | tests/components/hassio/test_auth.py | kdschlosser/home-assistant | a94a24f6f83508642e220fadf2799789dc32a25b | [
"Apache-2.0"
] | 7 | 2019-08-23T05:26:02.000Z | 2022-03-11T23:57:18.000Z | tests/components/hassio/test_auth.py | kdschlosser/home-assistant | a94a24f6f83508642e220fadf2799789dc32a25b | [
"Apache-2.0"
] | 3 | 2016-08-26T12:32:49.000Z | 2020-02-26T21:01:35.000Z | """The tests for the hassio component."""
from unittest.mock import patch, Mock
from homeassistant.const import HTTP_HEADER_HA_AUTH
from homeassistant.exceptions import HomeAssistantError
from tests.common import mock_coro
from . import API_PASSWORD
async def test_login_success(hass, hassio_client):
"""Test no auth needed for ."""
with patch('homeassistant.auth.providers.homeassistant.'
'HassAuthProvider.async_validate_login',
Mock(return_value=mock_coro())) as mock_login:
resp = await hassio_client.post(
'/api/hassio_auth',
json={
"username": "test",
"password": "123456",
"addon": "samba",
},
headers={
HTTP_HEADER_HA_AUTH: API_PASSWORD
}
)
# Check we got right response
assert resp.status == 200
mock_login.assert_called_with("test", "123456")
async def test_login_error(hass, hassio_client):
"""Test no auth needed for error."""
with patch('homeassistant.auth.providers.homeassistant.'
'HassAuthProvider.async_validate_login',
Mock(side_effect=HomeAssistantError())) as mock_login:
resp = await hassio_client.post(
'/api/hassio_auth',
json={
"username": "test",
"password": "123456",
"addon": "samba",
},
headers={
HTTP_HEADER_HA_AUTH: API_PASSWORD
}
)
# Check we got right response
assert resp.status == 403
mock_login.assert_called_with("test", "123456")
async def test_login_no_data(hass, hassio_client):
"""Test auth with no data -> error."""
with patch('homeassistant.auth.providers.homeassistant.'
'HassAuthProvider.async_validate_login',
Mock(side_effect=HomeAssistantError())) as mock_login:
resp = await hassio_client.post(
'/api/hassio_auth',
headers={
HTTP_HEADER_HA_AUTH: API_PASSWORD
}
)
# Check we got right response
assert resp.status == 400
assert not mock_login.called
async def test_login_no_username(hass, hassio_client):
"""Test auth with no username in data -> error."""
with patch('homeassistant.auth.providers.homeassistant.'
'HassAuthProvider.async_validate_login',
Mock(side_effect=HomeAssistantError())) as mock_login:
resp = await hassio_client.post(
'/api/hassio_auth',
json={
"password": "123456",
"addon": "samba",
},
headers={
HTTP_HEADER_HA_AUTH: API_PASSWORD
}
)
# Check we got right response
assert resp.status == 400
assert not mock_login.called
async def test_login_success_extra(hass, hassio_client):
"""Test auth with extra data."""
with patch('homeassistant.auth.providers.homeassistant.'
'HassAuthProvider.async_validate_login',
Mock(return_value=mock_coro())) as mock_login:
resp = await hassio_client.post(
'/api/hassio_auth',
json={
"username": "test",
"password": "123456",
"addon": "samba",
"path": "/share",
},
headers={
HTTP_HEADER_HA_AUTH: API_PASSWORD
}
)
# Check we got right response
assert resp.status == 200
mock_login.assert_called_with("test", "123456")
| 32.22807 | 69 | 0.572401 | 374 | 3,674 | 5.393048 | 0.179144 | 0.059494 | 0.035697 | 0.047595 | 0.872087 | 0.854735 | 0.840853 | 0.811106 | 0.776401 | 0.776401 | 0 | 0.023124 | 0.329069 | 3,674 | 113 | 70 | 32.513274 | 0.795132 | 0.047904 | 0 | 0.694118 | 0 | 0 | 0.197516 | 0.121175 | 0 | 0 | 0 | 0 | 0.117647 | 1 | 0 | false | 0.117647 | 0.058824 | 0 | 0.058824 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.